/* Floating app menu: real platform destinations, no permanent right rail. */
body.chat-shell .sidebar-mode-tab.is-coming-soon {
    gap: 7px;
}
body.chat-shell .sidebar-mode-tab.is-coming-soon:not([aria-disabled="false"]) {
    cursor: default;
    opacity: .78;
}
body.chat-shell .sidebar-mode-tab .sidebar-mode-label {
    display: inline-flex;
    min-width: 0;
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
    line-height: 1.1;
}
body.chat-shell .sidebar-mode-tab .sidebar-mode-label > span {
    overflow: hidden;
    max-width: 100%;
    text-overflow: ellipsis;
    white-space: nowrap;
}
body.chat-shell .sidebar-mode-tab .sidebar-mode-label small {
    color: rgba(182, 187, 194, .62);
    font-size: 9px;
    font-weight: 500;
    white-space: nowrap;
}
body.chat-shell .sidebar-mode-tab.active .sidebar-mode-label small {
    color: rgba(211, 205, 255, .72);
}
body.chat-shell.theme-light .sidebar-mode-tab .sidebar-mode-label small {
    color: rgba(92, 82, 121, .62);
}
body.chat-shell.theme-light .sidebar-mode-tab.active .sidebar-mode-label small {
    color: rgba(87, 71, 173, .72);
}

body.chat-shell .fx-app-menu {
    --fx-panel: rgba(13, 15, 23, .97);
    --fx-card: rgba(255, 255, 255, .035);
    --fx-card-hover: rgba(255, 255, 255, .065);
    --fx-border: rgba(255, 255, 255, .085);
    --fx-text: rgba(250, 250, 255, .98);
    --fx-muted: rgba(224, 225, 238, .7);
    width: min(430px, calc(100vw - 28px));
    max-height: calc(100vh - 86px);
    padding: 12px;
    overflow: auto;
    color: var(--fx-text);
    background: radial-gradient(circle at 8% 0%, rgba(112, 91, 255, .12), transparent 31%), radial-gradient(circle at 98% 14%, rgba(45, 190, 205, .07), transparent 26%), var(--fx-panel);
    border: 1px solid var(--fx-border);
    border-radius: 18px;
    box-shadow: 0 28px 80px rgba(0, 0, 0, .48), 0 5px 18px rgba(0, 0, 0, .22), inset 0 1px 0 rgba(255, 255, 255, .055);
    backdrop-filter: blur(28px) saturate(135%);
    -webkit-backdrop-filter: blur(28px) saturate(135%);
    scrollbar-width: thin;
    scrollbar-color: rgba(144, 132, 255, .32) transparent;
    animation: fxMenuOpen .2s cubic-bezier(.16, 1, .3, 1);
    -webkit-font-smoothing: subpixel-antialiased;
    text-rendering: optimizeLegibility;
}
@keyframes fxMenuOpen { from { opacity: 0; transform: translateY(-8px) scale(.975); } to { opacity: 1; transform: none; } }
body.chat-shell .fx-app-menu::-webkit-scrollbar { width: 5px; }
body.chat-shell .fx-app-menu::-webkit-scrollbar-thumb { background: rgba(144, 132, 255, .28); border-radius: 9px; }

.fx-menu-account {
    min-height: 68px;
    padding: 10px 11px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto auto;
    align-items: center;
    gap: 10px;
    border: 1px solid rgba(140, 125, 255, .18);
    border-radius: 14px;
    background: linear-gradient(135deg, rgba(125, 105, 255, .105), rgba(255, 255, 255, .025) 48%, rgba(52, 198, 210, .04));
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .055);
}
.fx-account-identity { min-width: 0; display: flex; align-items: center; gap: 10px; color: inherit; text-decoration: none; }
.fx-app-menu .rail-avatar { width: 38px; height: 38px; flex-basis: 38px; border-radius: 11px; }
.fx-app-menu .rail-account-copy strong { color: var(--fx-text); font-size: 13px; font-weight: 700; }
.fx-app-menu .rail-account-copy small { color: rgba(224, 225, 238, .66); font-size: 9.5px; font-weight: 500; }
.fx-wallet { padding-left: 11px; border-left: 1px solid rgba(255, 255, 255, .07); display: flex; flex-direction: column; gap: 2px; white-space: nowrap; }
.fx-wallet small { color: rgba(224, 225, 238, .66); font-size: 9.5px; font-weight: 500; }
.fx-wallet strong {
    color: #f4c96b;
    font-size: 13.5px;
    font-weight: 750;
    font-variant-numeric: tabular-nums;
    letter-spacing: .01em;
    text-shadow: 0 0 14px rgba(239, 184, 64, .18);
}
.fx-app-menu .rail-primary-btn {
    min-width: 50px;
    height: 30px;
    padding: 0 13px;
    border: 1px solid rgba(154, 140, 255, .52);
    border-radius: 9px;
    color: rgba(249, 248, 255, .96);
    background: linear-gradient(180deg, rgba(126, 109, 232, .34), rgba(91, 75, 187, .24));
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .16), 0 4px 12px rgba(47, 35, 126, .16);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .03em;
    transform: none;
    transition: border-color .22s ease, background .22s ease, box-shadow .22s ease, color .22s ease;
}
.fx-app-menu .rail-primary-btn:hover {
    border-color: rgba(177, 165, 255, .78);
    color: #fff;
    background: linear-gradient(180deg, rgba(139, 122, 243, .47), rgba(101, 83, 202, .34));
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .22), 0 0 0 3px rgba(123, 104, 232, .1), 0 6px 16px rgba(47, 35, 126, .2);
    transform: none;
}

.fx-menu-section { margin-top: 13px; }
.fx-menu-heading { height: 20px; padding: 0 3px; display: flex; align-items: center; justify-content: space-between; }
.fx-menu-heading span { color: rgba(242, 242, 250, .78); font-size: 10px; font-weight: 700; letter-spacing: .02em; }
.fx-menu-heading small { color: rgba(198, 196, 216, .43); font-size: 7.5px; font-weight: 700; letter-spacing: .13em; }
body.chat-shell .fx-app-menu .action-menu-grid { gap: 7px; }
body.chat-shell .fx-app-menu .action-menu-item {
    min-width: 0;
    min-height: 57px;
    padding: 9px 10px;
    gap: 10px;
    color: inherit;
    text-decoration: none;
    border: 1px solid var(--fx-border);
    border-radius: 12px;
    background: var(--fx-card);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .025);
    transform: none;
    position: relative;
    z-index: 0;
    transform-origin: center;
    will-change: transform, box-shadow;
    transition: transform .3s cubic-bezier(.16, 1, .3, 1), background .25s ease, border-color .25s ease, box-shadow .3s ease;
}
body.chat-shell .fx-app-menu .action-menu-item::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 1;
    display: block;
    border-radius: 13px;
    padding: 1.5px;
    opacity: 0;
    background: linear-gradient(135deg, rgba(255,255,255,.12), rgba(255,255,255,.03));
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
    transition: opacity .28s ease, background .28s ease;
}
body.chat-shell .fx-app-menu .action-menu-item:hover { background: rgba(255, 255, 255, .04); border-color: transparent; box-shadow: none; transform: scale(1.02); }
body.chat-shell .fx-app-menu .action-menu-item:hover::before { opacity: 1; }
body.chat-shell .fx-app-menu .action-menu-item .menu-icon { width: 33px; height: 33px; border-radius: 9px; transform: none; box-shadow: none; transition: transform .4s cubic-bezier(.34, 1.56, .64, 1), background .28s ease, color .28s ease, box-shadow .3s ease; }
body.chat-shell .fx-app-menu .action-menu-item:hover .menu-icon { transform: translateY(-4px) scale(1.1); }

.fx-app-menu .action-menu-item.item-blue:hover::before { background: linear-gradient(135deg, #3b82f6, #60a5fa); }
.fx-app-menu .action-menu-item.item-indigo:hover::before { background: linear-gradient(135deg, #6366f1, #818cf8); }
.fx-app-menu .action-menu-item.item-amber:hover::before { background: linear-gradient(135deg, #f59e0b, #fbbf24); }
.fx-app-menu .action-menu-item.item-emerald:hover::before { background: linear-gradient(135deg, #10b981, #34d399); }
.fx-app-menu .action-menu-item.item-cyan:hover::before { background: linear-gradient(135deg, #06b6d4, #22d3ee); }
.fx-app-menu .action-menu-item.item-rose:hover::before { background: linear-gradient(135deg, #f43f5e, #fb7185); }
.fx-app-menu .action-menu-item.item-violet:hover::before { background: linear-gradient(135deg, #8b5cf6, #a78bfa); }

.fx-app-menu .action-menu-item.item-blue:hover .menu-icon { box-shadow: 0 0 20px rgba(59,130,246,.5); }
.fx-app-menu .action-menu-item.item-indigo:hover .menu-icon { box-shadow: 0 0 20px rgba(99,102,241,.5); }
.fx-app-menu .action-menu-item.item-amber:hover .menu-icon { box-shadow: 0 0 20px rgba(245,158,11,.5); }
.fx-app-menu .action-menu-item.item-emerald:hover .menu-icon { box-shadow: 0 0 20px rgba(16,185,129,.5); }
.fx-app-menu .action-menu-item.item-cyan:hover .menu-icon { box-shadow: 0 0 20px rgba(6,182,212,.5); }
.fx-app-menu .action-menu-item.item-rose:hover .menu-icon { box-shadow: 0 0 20px rgba(244,63,94,.5); }
.fx-app-menu .action-menu-item.item-violet:hover .menu-icon { box-shadow: 0 0 20px rgba(139,92,246,.5); }
.fx-app-menu .menu-icon svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
body.chat-shell .fx-app-menu .action-menu-item .menu-name { color: var(--fx-text); font-size: 12px; font-weight: 700; letter-spacing: .005em; }
body.chat-shell .fx-app-menu .action-menu-item .menu-desc { color: var(--fx-muted); font-size: 9.5px; font-weight: 500; line-height: 1.35; }
body.chat-shell .fx-app-menu .action-menu-item.item-blue:hover .menu-name { color: #60a5fa; }
body.chat-shell .fx-app-menu .action-menu-item.item-indigo:hover .menu-name { color: #818cf8; }
body.chat-shell .fx-app-menu .action-menu-item.item-amber:hover .menu-name { color: #fbbf24; }
body.chat-shell .fx-app-menu .action-menu-item.item-emerald:hover .menu-name { color: #34d399; }
body.chat-shell .fx-app-menu .action-menu-item.item-cyan:hover .menu-name { color: #22d3ee; }
body.chat-shell .fx-app-menu .action-menu-item.item-rose:hover .menu-name { color: #fb7185; }
body.chat-shell .fx-app-menu .action-menu-item.item-violet:hover .menu-name { color: #a78bfa; }

body.chat-shell.theme-light .fx-app-menu {
    --fx-panel: rgba(255, 255, 255, .975);
    --fx-card: rgba(78, 69, 116, .032);
    --fx-card-hover: rgba(110, 91, 220, .065);
    --fx-border: rgba(61, 49, 105, .105);
    --fx-text: rgba(31, 27, 49, .96);
    --fx-muted: rgba(59, 52, 78, .64);
    background: radial-gradient(circle at 8% 0%, rgba(120, 95, 255, .09), transparent 34%), radial-gradient(circle at 98% 14%, rgba(55, 199, 207, .055), transparent 27%), var(--fx-panel);
    border-color: rgba(69, 56, 119, .12);
    box-shadow: 0 28px 70px rgba(50, 40, 88, .17), 0 5px 16px rgba(50, 40, 88, .07), inset 0 1px 0 #fff;
}
body.chat-shell.theme-light .fx-menu-account { border-color: rgba(115, 91, 225, .14); background: linear-gradient(135deg, rgba(125, 98, 240, .075), rgba(255, 255, 255, .72) 52%, rgba(47, 193, 204, .035)); }
body.chat-shell.theme-light .fx-wallet { border-left-color: rgba(57, 47, 92, .09); }
body.chat-shell.theme-light .fx-app-menu .rail-account-copy small,
body.chat-shell.theme-light .fx-app-menu .fx-wallet small { color: rgba(57, 50, 76, .62); }
body.chat-shell.theme-light .fx-app-menu .fx-wallet strong {
    color: #a76508;
    text-shadow: none;
}
body.chat-shell.theme-light .fx-app-menu .rail-primary-btn {
    border-color: rgba(104, 86, 211, .32);
    color: #5f4dc7;
    background: linear-gradient(180deg, rgba(126, 104, 232, .1), rgba(105, 86, 207, .065));
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .92), 0 4px 12px rgba(73, 56, 153, .09);
}
body.chat-shell.theme-light .fx-app-menu .rail-primary-btn:hover {
    border-color: rgba(103, 84, 211, .5);
    color: #fff;
    background: linear-gradient(135deg, #7462df, #6250c6);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .22), 0 0 0 3px rgba(108, 88, 216, .09), 0 7px 16px rgba(73, 56, 153, .18);
}
body.chat-shell.theme-light .fx-menu-heading span { color: rgba(48, 41, 70, .72); }
body.chat-shell.theme-light .fx-menu-heading small { color: rgba(72, 62, 102, .42); }
body.chat-shell.theme-light .fx-app-menu .action-menu-item:hover { background: #fff; box-shadow: 0 6px 20px rgba(0,0,0,.08); }
body.chat-shell.theme-light .fx-app-menu .action-menu-item.item-blue:hover .menu-name { color: #3b82f6; }
body.chat-shell.theme-light .fx-app-menu .action-menu-item.item-indigo:hover .menu-name { color: #6366f1; }
body.chat-shell.theme-light .fx-app-menu .action-menu-item.item-amber:hover .menu-name { color: #b45309; }
body.chat-shell.theme-light .fx-app-menu .action-menu-item.item-emerald:hover .menu-name { color: #047857; }
body.chat-shell.theme-light .fx-app-menu .action-menu-item.item-cyan:hover .menu-name { color: #0e7490; }
body.chat-shell.theme-light .fx-app-menu .action-menu-item.item-rose:hover .menu-name { color: #be123c; }
body.chat-shell.theme-light .fx-app-menu .action-menu-item.item-violet:hover .menu-name { color: #6d28d9; }
body.chat-shell.theme-light .fx-app-menu .action-menu-item:hover .icon-blue { background: linear-gradient(135deg,#3b82f6,#60a5fa); color:#fff; box-shadow:0 0 24px rgba(59,130,246,.6),0 4px 16px rgba(59,130,246,.2); }
body.chat-shell.theme-light .fx-app-menu .action-menu-item:hover .icon-indigo { background: linear-gradient(135deg,#6366f1,#818cf8); color:#fff; box-shadow:0 0 24px rgba(99,102,241,.6),0 4px 16px rgba(99,102,241,.2); }
body.chat-shell.theme-light .fx-app-menu .action-menu-item:hover .icon-amber { background: linear-gradient(135deg,#f59e0b,#fbbf24); color:#fff; box-shadow:0 0 24px rgba(245,158,11,.6),0 4px 16px rgba(245,158,11,.2); }
body.chat-shell.theme-light .fx-app-menu .action-menu-item:hover .icon-emerald { background: linear-gradient(135deg,#10b981,#34d399); color:#fff; box-shadow:0 0 24px rgba(16,185,129,.6),0 4px 16px rgba(16,185,129,.2); }
body.chat-shell.theme-light .fx-app-menu .action-menu-item:hover .icon-cyan { background: linear-gradient(135deg,#06b6d4,#22d3ee); color:#fff; box-shadow:0 0 24px rgba(6,182,212,.6),0 4px 16px rgba(6,182,212,.2); }
body.chat-shell.theme-light .fx-app-menu .action-menu-item:hover .icon-rose { background: linear-gradient(135deg,#f43f5e,#fb7185); color:#fff; box-shadow:0 0 24px rgba(244,63,94,.6),0 4px 16px rgba(244,63,94,.2); }
body.chat-shell.theme-light .fx-app-menu .action-menu-item:hover .icon-violet { background: linear-gradient(135deg,#8b5cf6,#a78bfa); color:#fff; box-shadow:0 0 24px rgba(139,92,246,.6),0 4px 16px rgba(139,92,246,.2); }

@media (prefers-reduced-motion: reduce) {
    body.chat-shell .fx-app-menu .action-menu-item,
    body.chat-shell .fx-app-menu .action-menu-item .menu-icon { transition-duration: .01ms; }
}

.ms-feedback-overlay { position: fixed; inset: 0; z-index: 2000; padding: 20px; display: none; place-items: center; background: rgba(2, 3, 8, .68); backdrop-filter: blur(8px); }
.ms-feedback-overlay.active { display: grid; }
.ms-feedback-modal { width: min(440px, calc(100vw - 32px)); overflow: hidden; border: 1px solid rgba(255, 255, 255, .1); border-radius: 18px; color: #f6f5ff; background: #13151f; box-shadow: 0 30px 90px rgba(0, 0, 0, .5); animation: fxMenuOpen .2s cubic-bezier(.16, 1, .3, 1); }
.ms-feedback-header { height: 58px; padding: 0 18px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid rgba(255,255,255,.07); }
.ms-feedback-header h3 { margin: 0; font-size: 15px; }
.ms-feedback-header .ms-modal-close { width: 32px; height: 32px; display: grid; place-items: center; border: 0; border-radius: 9px; color: #aaa8b8; background: transparent; cursor: pointer; }
.ms-feedback-header .ms-modal-close:hover { color: #fff; background: rgba(255,255,255,.06); }
.ms-feedback-header .ms-modal-close svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 2; }
.ms-feedback-body { padding: 18px; }
.ms-feedback-body .form-group { margin-bottom: 14px; }
.ms-feedback-body label { margin-bottom: 7px; display: block; color: rgba(245,244,255,.78); font-size: 12px; }
.ms-feedback-body .optional { color: rgba(220,218,235,.4); }
.ms-feedback-body .ms-input { width: 100%; box-sizing: border-box; padding: 10px 12px; border: 1px solid rgba(255,255,255,.09); border-radius: 10px; color: #f6f5ff; background: rgba(255,255,255,.035); font: inherit; font-size: 12px; outline: 0; resize: vertical; }
.ms-feedback-body .ms-input:focus { border-color: rgba(132,113,255,.65); box-shadow: 0 0 0 3px rgba(115,93,255,.12); }
.ms-feedback-body select.ms-input option { color: #f6f5ff; background: #171923; }
.feedback-submit-btn { width: 100%; height: 40px; border: 0; border-radius: 10px; color: white; font: inherit; font-size: 12px; font-weight: 650; cursor: pointer; background: linear-gradient(135deg,#7866f5,#5e4bd6); box-shadow: 0 8px 24px rgba(84,65,205,.26); }
.feedback-submit-btn:disabled { cursor: wait; opacity: .75; }
.feedback-submit-btn.success { background: linear-gradient(135deg,#10b981,#059669); }
body.chat-shell.theme-light .ms-feedback-modal { color: #252038; background: rgba(255,255,255,.98); border-color: rgba(46,35,86,.12); box-shadow: 0 30px 80px rgba(56,43,95,.2); }
body.chat-shell.theme-light .ms-feedback-header .ms-modal-close { color: #777082; }
body.chat-shell.theme-light .ms-feedback-header .ms-modal-close:hover { color: #322b49; background: rgba(60,45,105,.06); }

@media (max-width: 560px) {
    body.chat-shell .fx-app-menu { right: -6px; width: min(390px, calc(100vw - 18px)); max-height: calc(100vh - 74px); border-radius: 16px; }
    .fx-menu-account { grid-template-columns: minmax(0, 1fr) auto; }
    .fx-menu-account .fx-wallet { display: none; }
    body.chat-shell .fx-app-menu .action-menu-grid { grid-template-columns: 1fr 1fr; }
    body.chat-shell .fx-app-menu .action-menu-item { min-height: 54px; padding: 8px; }
}
.action-menu-item.item-gold:hover { border-color: rgba(255, 196, 67, .45); background: linear-gradient(135deg, rgba(255, 185, 48, .12), rgba(255, 255, 255, .045)); }
.action-menu-item .icon-gold { color: #ffd45a; background: rgba(255, 185, 48, .12); box-shadow: 0 0 18px rgba(255, 185, 48, .14); }
.action-menu-item .menu-dot { width: 6px; height: 6px; margin-left: auto; border-radius: 50%; background: #ffd45a; box-shadow: 0 0 10px rgba(255, 205, 76, .75); }
