/* ══════════════════════════════════════════════════════════════
   THE TRADING PLAN — "Aurora Glass" design system
   Light, premium, app-like. Shared by public, member, admin & market shells.
══════════════════════════════════════════════════════════════ */

:root {
    /* Ink */
    --ink:          #0f172a;
    --ink-2:        #1e293b;
    --sub:          #475569;
    --muted:        #64748b;
    --faint:        #94a3b8;

    /* Brand */
    --primary:      #4f46e5;
    --primary-2:    #6366f1;
    --primary-deep: #4338ca;
    --accent:       #8b5cf6;
    --sky:          #0ea5e9;
    --success:      #059669;
    --success-2:    #10b981;
    --danger:       #e11d48;
    --danger-2:     #f43f5e;
    --warning:      #d97706;
    --info:         #0284c7;

    --grad-primary: linear-gradient(135deg, #6366f1 0%, #4f46e5 45%, #7c3aed 100%);
    --grad-success: linear-gradient(135deg, #34d399, #059669);
    --grad-danger:  linear-gradient(135deg, #fb7185, #e11d48);
    --grad-warm:    linear-gradient(135deg, #fbbf24, #f97316);
    --grad-sky:     linear-gradient(135deg, #38bdf8, #6366f1);

    /* Surfaces */
    --page:         #eef1f8;
    --surface:      #ffffff;
    --surface-2:    #f6f8fc;
    --glass:        rgba(255,255,255,0.62);
    --glass-strong: rgba(255,255,255,0.80);
    --glass-border: rgba(255,255,255,0.75);
    --line:         rgba(15,23,42,0.07);
    --line-hi:      rgba(15,23,42,0.12);

    --radius-sm:    10px;
    --radius:       18px;
    --radius-lg:    24px;
    --radius-xl:    30px;

    --shadow-xs:    0 1px 2px rgba(15,23,42,0.05);
    --shadow-sm:    0 1px 2px rgba(15,23,42,0.04), 0 6px 20px -8px rgba(15,23,42,0.10);
    --shadow:       0 1px 2px rgba(15,23,42,0.04), 0 14px 34px -14px rgba(15,23,42,0.18);
    --shadow-lg:    0 2px 6px rgba(15,23,42,0.04), 0 30px 60px -22px rgba(15,23,42,0.28);
    --shadow-brand: 0 10px 26px -10px rgba(79,70,229,0.55);

    --font:         'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
    --font-display: 'Plus Jakarta Sans', 'Inter', system-ui, sans-serif;

    --sidebar-w:    268px;
    --sidebar-rail: 84px;
    --gap:          16px;
    --topbar-h:     68px;

    /* Legacy aliases (older views reference these) */
    --bg:        var(--page);
    --bg-s:      #ffffff;
    --bg-e:      var(--surface-2);
    --bg-card:   #ffffff;
    --bg-section:var(--surface-2);
    --border:    rgba(15,23,42,0.09);
    --border-hi: rgba(15,23,42,0.15);
    --txt:       var(--ink);
    --text:      var(--ink);
    --txt-sub:   var(--sub);
    --txt-muted: var(--faint);
    --blue:      var(--primary);
    --blue-dim:  rgba(79,70,229,0.10);
    --green:     var(--success);
    --green-dim: rgba(5,150,105,0.10);
    --red:       var(--danger);
    --red-dim:   rgba(225,29,72,0.08);
    --yellow:    var(--warning);
    --purple:    #7c3aed;
    --cyan:      #0891b2;
}

/* ══════════════ BASE ══════════════ */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
    margin: 0;
    min-height: 100vh;
    font-family: var(--font);
    font-size: 14px;
    color: var(--ink);
    background: var(--page);
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
    overflow-x: hidden;
}
h1, h2, h3, h4, h5, h6, .font-display { font-family: var(--font-display); letter-spacing: -0.022em; color: var(--ink); }
a { color: var(--primary); text-decoration: none; }
a:hover { color: var(--primary-deep); }
::selection { background: rgba(99,102,241,0.22); }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(15,23,42,0.14); border-radius: 999px; border: 3px solid transparent; background-clip: padding-box; }
::-webkit-scrollbar-thumb:hover { background-color: rgba(15,23,42,0.26); }
.text-muted { color: var(--muted) !important; }
.text-success { color: var(--success) !important; }
.text-danger { color: var(--danger) !important; }
.text-primary { color: var(--primary) !important; }
.tabular { font-variant-numeric: tabular-nums; }

/* Ambient aurora background */
.app-bg { position: fixed; inset: 0; z-index: -1; pointer-events: none; overflow: hidden; background: linear-gradient(180deg, #f3f5fb 0%, #eceff8 100%); }
.app-bg::before, .app-bg::after, .app-bg span {
    content: ''; position: absolute; border-radius: 50%; filter: blur(80px); opacity: .9;
}
.app-bg::before { width: 720px; height: 620px; left: -180px; top: -220px; background: radial-gradient(circle, rgba(129,140,248,0.38), transparent 65%); }
.app-bg::after  { width: 760px; height: 640px; right: -220px; top: -160px; background: radial-gradient(circle, rgba(56,189,248,0.30), transparent 65%); }
.app-bg span:nth-child(1) { width: 640px; height: 560px; right: 12%; bottom: -260px; background: radial-gradient(circle, rgba(244,114,182,0.20), transparent 65%); }
.app-bg span:nth-child(2) { width: 560px; height: 520px; left: 18%; bottom: -240px; background: radial-gradient(circle, rgba(52,211,153,0.18), transparent 65%); }
.app-bg i { position: absolute; inset: 0; background-image: radial-gradient(rgba(15,23,42,0.045) 1px, transparent 1px); background-size: 22px 22px; mask-image: linear-gradient(180deg, rgba(0,0,0,.55), transparent 70%); -webkit-mask-image: linear-gradient(180deg, rgba(0,0,0,.55), transparent 70%); }

/* Glass primitive */
.glass {
    background: var(--glass);
    backdrop-filter: blur(24px) saturate(170%);
    -webkit-backdrop-filter: blur(24px) saturate(170%);
    border: 1px solid var(--glass-border);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.7), var(--shadow);
}

/* ══════════════ APP SHELL ══════════════ */
.app-shell { min-height: 100vh; }

/* ── Sidebar ── */
.sidebar {
    position: fixed; z-index: 1040;
    top: var(--gap); bottom: var(--gap); left: var(--gap);
    width: var(--sidebar-w);
    display: flex; flex-direction: column;
    border-radius: var(--radius-xl);
    transition: width .28s cubic-bezier(.4,0,.2,1), transform .32s cubic-bezier(.4,0,.2,1);
    overflow: hidden;
}
.sb-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 18px 16px 12px 18px; }
.brand { display: inline-flex; align-items: center; gap: 11px; color: var(--ink) !important; min-width: 0; }
.brand-mark {
    width: 38px; height: 38px; flex-shrink: 0; border-radius: 12px;
    display: inline-flex; align-items: center; justify-content: center;
    background: var(--grad-primary); color: #fff; font-size: 17px;
    box-shadow: var(--shadow-brand), inset 0 1px 0 rgba(255,255,255,.35);
}
.brand-text { line-height: 1.1; white-space: nowrap; }
.brand-text b { display: block; font-family: var(--font-display); font-weight: 800; font-size: 15.5px; letter-spacing: -.02em; }
.brand-text small { display: block; font-size: 10.5px; font-weight: 600; color: var(--muted); letter-spacing: .02em; margin-top: 2px; }
.sb-collapse {
    width: 30px; height: 30px; border-radius: 10px; border: 1px solid var(--line);
    background: rgba(255,255,255,.6); color: var(--sub); flex-shrink: 0;
    display: inline-flex; align-items: center; justify-content: center; cursor: pointer; transition: all .2s;
}
.sb-collapse:hover { background: #fff; color: var(--ink); }

.sb-search {
    margin: 4px 14px 8px; display: flex; align-items: center; gap: 9px;
    padding: 9px 12px; border-radius: 13px; border: 1px solid var(--line);
    background: rgba(255,255,255,.55); color: var(--muted); font-size: 13px; cursor: pointer;
    transition: all .2s; white-space: nowrap;
}
.sb-search:hover { background: #fff; border-color: var(--line-hi); }
.sb-search kbd { margin-left: auto; font-family: var(--font); font-size: 10.5px; font-weight: 600; color: var(--muted); background: rgba(15,23,42,.05); border: 1px solid var(--line); border-radius: 6px; padding: 1px 6px; box-shadow: none; }

.sb-nav { flex: 1; overflow-y: auto; overflow-x: hidden; padding: 4px 12px 12px; scrollbar-width: thin; scrollbar-color: rgba(15,23,42,.12) transparent; }
.sb-section { font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .12em; color: var(--faint); padding: 16px 10px 7px; white-space: nowrap; }
.sb-link {
    position: relative; display: flex; align-items: center; gap: 12px;
    padding: 9px 11px; margin-bottom: 2px; border-radius: 13px;
    color: var(--sub); font-size: 13.5px; font-weight: 500; white-space: nowrap;
    transition: background .18s, color .18s, transform .18s;
    border: 0; background: none; width: 100%; text-align: left; cursor: pointer;
}
.sb-link .ic {
    width: 32px; height: 32px; flex-shrink: 0; border-radius: 10px;
    display: inline-flex; align-items: center; justify-content: center;
    font-size: 15px; color: var(--muted); background: rgba(15,23,42,.04);
    transition: all .2s;
}
.sb-link .lbl { flex: 1; overflow: hidden; text-overflow: ellipsis; }
.sb-link .chev { font-size: 11px; color: var(--faint); transition: transform .25s; }
.sb-link:hover { background: rgba(255,255,255,.75); color: var(--ink); }
.sb-link:hover .ic { color: var(--primary); background: rgba(99,102,241,.10); }
.sb-link.active { background: #fff; color: var(--ink); font-weight: 600; box-shadow: var(--shadow-sm); }
.sb-link.active .ic { background: var(--grad-primary); color: #fff; box-shadow: 0 6px 14px -6px rgba(79,70,229,.7); }
.sb-link .badge-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--success-2); box-shadow: 0 0 0 3px rgba(16,185,129,.18); }
.sb-group.open > .sb-link .chev { transform: rotate(180deg); }
.sb-sub { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .28s ease; }
.sb-sub > div { overflow: hidden; }
.sb-group.open > .sb-sub { grid-template-rows: 1fr; }
.sb-sub a {
    display: flex; align-items: center; gap: 10px; position: relative;
    padding: 7px 10px 7px 55px; margin: 1px 0; border-radius: 11px;
    font-size: 13px; color: var(--muted); font-weight: 500; white-space: nowrap;
}
.sb-sub a::before { content: ''; position: absolute; left: 26px; top: 50%; width: 6px; height: 6px; margin-top: -3px; border-radius: 50%; background: rgba(15,23,42,.15); transition: all .2s; }
.sb-sub a:hover { color: var(--ink); background: rgba(255,255,255,.65); }
.sb-sub a.active { color: var(--primary); font-weight: 600; }
.sb-sub a.active::before { background: var(--primary); box-shadow: 0 0 0 3px rgba(99,102,241,.18); }

.sb-foot { padding: 12px; border-top: 1px solid var(--line); }
.sb-user { display: flex; align-items: center; gap: 11px; padding: 8px; border-radius: 16px; background: rgba(255,255,255,.6); border: 1px solid var(--line); }
.avatar {
    width: 38px; height: 38px; border-radius: 12px; flex-shrink: 0;
    display: inline-flex; align-items: center; justify-content: center;
    font-family: var(--font-display); font-weight: 800; font-size: 14px; color: #fff;
    background: linear-gradient(135deg, #f472b6, #8b5cf6 55%, #6366f1);
    box-shadow: 0 6px 14px -6px rgba(139,92,246,.7);
}
.avatar.sm { width: 32px; height: 32px; border-radius: 10px; font-size: 12.5px; }
.sb-user .meta { min-width: 0; flex: 1; line-height: 1.2; }
.sb-user .meta b { display: block; font-size: 13px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sb-user .meta small { font-size: 11px; color: var(--muted); }
.sb-user .out { width: 32px; height: 32px; border-radius: 10px; display: inline-flex; align-items: center; justify-content: center; color: var(--muted); }
.sb-user .out:hover { background: rgba(225,29,72,.08); color: var(--danger); }
.sb-cta { padding: 16px; border-radius: 18px; color: #fff; position: relative; overflow: hidden; background: var(--grad-primary); box-shadow: var(--shadow-brand); }
.sb-cta::after { content: ''; position: absolute; width: 160px; height: 160px; right: -60px; top: -70px; border-radius: 50%; background: rgba(255,255,255,.14); }
.sb-cta b { font-family: var(--font-display); font-size: 14.5px; display: block; margin-bottom: 4px; position: relative; }
.sb-cta p { font-size: 12px; color: rgba(255,255,255,.82); margin: 0 0 12px; position: relative; line-height: 1.5; white-space: normal; }
.sb-cta .btn-row { display: flex; gap: 8px; position: relative; }
.sb-cta a { flex: 1; text-align: center; padding: 8px 10px; border-radius: 11px; font-size: 12.5px; font-weight: 700; }
.sb-cta a.light { background: #fff; color: var(--primary-deep); }
.sb-cta a.ghost { background: rgba(255,255,255,.16); color: #fff; border: 1px solid rgba(255,255,255,.3); }

/* Collapsed rail (desktop) */
@media (min-width: 992px) {
    html.sb-mini .sidebar { width: var(--sidebar-rail); }
    html.sb-mini .app-main { margin-left: calc(var(--sidebar-rail) + var(--gap) * 2); }
    html.sb-mini .brand-text, html.sb-mini .sb-search span, html.sb-mini .sb-search kbd,
    html.sb-mini .sb-link .lbl, html.sb-mini .sb-link .chev, html.sb-mini .sb-section,
    html.sb-mini .sb-user .meta, html.sb-mini .sb-user .out, html.sb-mini .sb-cta, html.sb-mini .sb-sub { display: none !important; }
    html.sb-mini .sb-head { flex-direction: column; padding: 16px 0 10px; }
    html.sb-mini .sb-search { justify-content: center; margin: 4px 14px 8px; padding: 9px 0; }
    html.sb-mini .sb-link { justify-content: center; padding: 6px 0; }
    html.sb-mini .sb-link .ic { width: 40px; height: 40px; border-radius: 13px; font-size: 16px; }
    html.sb-mini .sb-link.active { background: transparent; box-shadow: none; }
    html.sb-mini .sb-section { display: block !important; height: 1px; padding: 0; margin: 10px 18px; background: var(--line); font-size: 0; }
    html.sb-mini .sb-user { justify-content: center; background: transparent; border: 0; padding: 0; }
    html.sb-mini .sb-collapse i { transform: rotate(180deg); }
}

/* ── Main column ── */
.app-main {
    margin-left: calc(var(--sidebar-w) + var(--gap) * 2);
    margin-right: var(--gap);
    min-height: 100vh;
    display: flex; flex-direction: column;
    transition: margin-left .28s cubic-bezier(.4,0,.2,1);
}

/* ── Topbar ── */
.topbar {
    position: sticky; top: var(--gap); z-index: 1030;
    margin-top: var(--gap);
    min-height: var(--topbar-h);
    border-radius: 22px;
    display: flex; align-items: center; gap: 14px;
    padding: 10px 12px 10px 20px;
}
.tb-icon.tb-burger { display: none; }
.tb-title { min-width: 0; flex-shrink: 1; }
.tb-crumbs { font-size: 11.5px; color: var(--muted); font-weight: 500; display: flex; align-items: center; gap: 6px; white-space: nowrap; }
.tb-crumbs i { font-size: 9px; opacity: .6; }
.tb-title h1 { font-size: 18px; font-weight: 800; margin: 1px 0 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tb-center { flex: 1; display: flex; align-items: center; gap: 12px; min-width: 0; padding: 0 8px; overflow: hidden; }
.tb-right { display: flex; align-items: center; gap: 8px; margin-left: auto; flex-shrink: 0; }
.tb-icon {
    position: relative; width: 42px; height: 42px; border-radius: 14px;
    display: inline-flex; align-items: center; justify-content: center;
    background: rgba(255,255,255,.7); border: 1px solid var(--line);
    color: var(--sub); font-size: 17px; cursor: pointer; transition: all .2s;
}
.tb-icon:hover { background: #fff; color: var(--ink); box-shadow: var(--shadow-sm); transform: translateY(-1px); }
.tb-search {
    display: flex; align-items: center; gap: 10px; width: 100%; max-width: 380px;
    padding: 10px 14px; border-radius: 14px; border: 1px solid var(--line);
    background: rgba(255,255,255,.7); color: var(--faint); font-size: 13.5px; cursor: pointer; transition: all .2s;
}
.tb-search:hover { background: #fff; box-shadow: var(--shadow-sm); }
.tb-search kbd { margin-left: auto; font-family: var(--font); font-size: 11px; color: var(--muted); background: rgba(15,23,42,.05); border: 1px solid var(--line); border-radius: 7px; padding: 2px 7px; box-shadow: none; }
.tb-clock { display: flex; align-items: center; gap: 8px; padding: 8px 12px; border-radius: 14px; background: rgba(255,255,255,.55); border: 1px solid var(--line); font-size: 12px; color: var(--sub); white-space: nowrap; }
.tb-clock .live { width: 8px; height: 8px; border-radius: 50%; background: var(--success-2); box-shadow: 0 0 0 0 rgba(16,185,129,.5); animation: pulse 2s infinite; }
.tb-clock b { color: var(--ink); font-weight: 700; font-variant-numeric: tabular-nums; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(16,185,129,.5); } 70% { box-shadow: 0 0 0 8px rgba(16,185,129,0); } 100% { box-shadow: 0 0 0 0 rgba(16,185,129,0); } }
.tb-user { display: flex; align-items: center; gap: 10px; padding: 4px 12px 4px 4px; border-radius: 15px; border: 1px solid var(--line); background: rgba(255,255,255,.7); cursor: pointer; transition: all .2s; color: var(--ink); }
.tb-user:hover { background: #fff; box-shadow: var(--shadow-sm); }
.tb-user .nm { font-size: 13px; font-weight: 600; line-height: 1.1; }
.tb-user .nm small { display: block; font-size: 11px; font-weight: 500; color: var(--muted); }
.tb-user::after { display: none; }

/* ── Content ── */
.app-content { flex: 1; padding: 26px 8px 34px; width: 100%; min-width: 0; }
.app-content.narrow { max-width: 1180px; margin: 0 auto; }

/* ── Footer ── */
.app-footer {
    margin: 0 0 var(--gap); border-radius: 22px; padding: 16px 22px;
    display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
    font-size: 12.5px; color: var(--muted);
}
.app-footer nav { display: flex; gap: 18px; flex-wrap: wrap; }
.app-footer a { color: var(--sub); font-weight: 500; }
.app-footer a:hover { color: var(--primary); }

/* ── Dropdowns ── */
.dropdown-menu.glass-dropdown, .glass-dropdown {
    background: rgba(255,255,255,0.88);
    backdrop-filter: blur(26px) saturate(180%);
    -webkit-backdrop-filter: blur(26px) saturate(180%);
    border: 1px solid rgba(255,255,255,0.9);
    border-radius: 18px; padding: 8px; min-width: 240px;
    box-shadow: 0 0 0 1px var(--line), var(--shadow-lg);
    margin-top: 10px !important;
    animation: popIn .18s ease;
}
@keyframes popIn { from { opacity: 0; transform: translateY(-6px) scale(.98); } to { opacity: 1; transform: none; } }
.glass-dropdown .dropdown-item { color: var(--ink-2); border-radius: 12px; padding: 9px 11px; font-size: 13.5px; font-weight: 500; display: flex; align-items: center; gap: 11px; transition: all .14s; }
.glass-dropdown .dropdown-item i { width: 30px; height: 30px; border-radius: 9px; display: inline-flex; align-items: center; justify-content: center; background: rgba(15,23,42,.05); color: var(--sub); font-size: 14px; flex-shrink: 0; transition: all .14s; }
.glass-dropdown .dropdown-item:hover, .glass-dropdown .dropdown-item:focus { background: rgba(99,102,241,.08); color: var(--primary-deep); }
.glass-dropdown .dropdown-item:hover i { background: var(--grad-primary); color: #fff; }
.glass-dropdown .dropdown-item.text-danger { color: var(--danger) !important; }
.glass-dropdown .dropdown-item.text-danger:hover { background: rgba(225,29,72,.07); }
.glass-dropdown .dropdown-item.text-danger:hover i { background: var(--grad-danger); }
.glass-dropdown .dropdown-divider { border-color: var(--line); margin: 6px 6px; }
.glass-dropdown .dropdown-header { font-size: 10.5px; font-weight: 700; color: var(--faint); text-transform: uppercase; letter-spacing: .1em; padding: 8px 11px 4px; }
.dd-profile { display: flex; align-items: center; gap: 11px; padding: 8px 10px 12px; margin-bottom: 4px; border-bottom: 1px solid var(--line); }
.dd-profile b { display: block; font-size: 13.5px; }
.dd-profile small { color: var(--muted); font-size: 12px; }

/* ── Mobile tab bar ── */
.tabbar { display: none; }
.sb-scrim { display: none; }

@media (max-width: 991.98px) {
    :root { --gap: 10px; }
    .sidebar { transform: translateX(calc(-100% - 24px)); width: min(86vw, 320px); z-index: 1060; }
    html.sb-open .sidebar { transform: none; }
    .sb-scrim { display: block; position: fixed; inset: 0; z-index: 1055; background: rgba(15,23,42,.28); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); opacity: 0; pointer-events: none; transition: opacity .25s; }
    html.sb-open .sb-scrim { opacity: 1; pointer-events: auto; }
    html.sb-open { overflow: hidden; }
    .sb-collapse { display: none; }
    .app-main { margin-left: var(--gap); margin-right: var(--gap); }
    .topbar { padding: 8px 8px 8px 8px; border-radius: 20px; min-height: 60px; gap: 10px; }
    .tb-icon.tb-burger { display: inline-flex; }
    .tb-title h1 { font-size: 16px; }
    .tb-crumbs { display: none; }
    .tb-center, .tb-user .nm, .tb-hide-m { display: none !important; }
    .tb-user { padding: 3px; border-radius: 14px; }
    .app-content { padding: 18px 2px 120px; }
    .app-footer { margin-bottom: 96px; justify-content: center; text-align: center; }

    .tabbar {
        display: flex; position: fixed; z-index: 1050;
        left: 12px; right: 12px; bottom: calc(12px + env(safe-area-inset-bottom));
        height: 68px; border-radius: 24px; padding: 6px;
        align-items: center; justify-content: space-around;
    }
    .tabbar a {
        flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
        height: 100%; border-radius: 18px; color: var(--muted); font-size: 10.5px; font-weight: 600;
        transition: all .2s; border: 0; background: none;
    }
    .tabbar a i { font-size: 20px; line-height: 1; transition: transform .2s; }
    .tabbar a.active { color: var(--primary); }
    .tabbar a.active i { transform: translateY(-1px); }
    .tabbar a.active::after { content: ''; width: 5px; height: 5px; border-radius: 50%; background: var(--primary); margin-top: 1px; }
    .tabbar a.fab { flex: 0 0 auto; width: 56px; height: 56px; margin: 0 4px; border-radius: 19px; background: var(--grad-primary); color: #fff; box-shadow: var(--shadow-brand); transform: translateY(-14px); }
    .tabbar a.fab i { font-size: 24px; }
    .tabbar a.fab::after { display: none; }
}

/* ══════════════ COMMAND PALETTE ══════════════ */
.cmdk { position: fixed; inset: 0; z-index: 2000; display: none; align-items: flex-start; justify-content: center; padding: 12vh 16px 16px; background: rgba(15,23,42,.22); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.cmdk.open { display: flex; animation: fadeIn .15s ease; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.cmdk-box { width: 100%; max-width: 620px; border-radius: 24px; overflow: hidden; background: rgba(255,255,255,.9); backdrop-filter: blur(30px) saturate(180%); -webkit-backdrop-filter: blur(30px) saturate(180%); border: 1px solid #fff; box-shadow: 0 0 0 1px var(--line), 0 40px 80px -24px rgba(15,23,42,.4); animation: popIn .2s ease; }
.cmdk-input { display: flex; align-items: center; gap: 12px; padding: 18px 20px; border-bottom: 1px solid var(--line); }
.cmdk-input i { font-size: 18px; color: var(--muted); }
.cmdk-input input { flex: 1; border: 0; outline: 0; background: transparent; font-size: 16px; color: var(--ink); font-family: var(--font); }
.cmdk-input kbd { font-family: var(--font); font-size: 11px; color: var(--muted); background: rgba(15,23,42,.05); border: 1px solid var(--line); border-radius: 7px; padding: 2px 7px; box-shadow: none; }
.cmdk-list { max-height: 52vh; overflow-y: auto; padding: 8px; }
.cmdk-group { font-size: 10.5px; font-weight: 700; color: var(--faint); text-transform: uppercase; letter-spacing: .1em; padding: 10px 12px 6px; }
.cmdk-item { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 14px; color: var(--ink-2); font-weight: 500; font-size: 14px; cursor: pointer; }
.cmdk-item i { width: 34px; height: 34px; border-radius: 11px; display: inline-flex; align-items: center; justify-content: center; background: rgba(15,23,42,.05); color: var(--sub); }
.cmdk-item small { margin-left: auto; color: var(--faint); font-size: 12px; }
.cmdk-item.sel { background: rgba(99,102,241,.09); color: var(--primary-deep); }
.cmdk-item.sel i { background: var(--grad-primary); color: #fff; }
.cmdk-empty { padding: 30px; text-align: center; color: var(--muted); }

/* ══════════════ PAGE PRIMITIVES ══════════════ */
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 22px; }
.page-head h2 { font-size: clamp(1.4rem, 2.2vw, 1.9rem); font-weight: 800; margin: 0; }
.page-head p { color: var(--muted); margin: 4px 0 0; font-size: 14px; }
.page-head .actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 700; color: var(--primary); background: rgba(99,102,241,.09); border: 1px solid rgba(99,102,241,.18); border-radius: 999px; padding: 5px 12px; }
.eyebrow .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--success-2); box-shadow: 0 0 0 3px rgba(16,185,129,.2); }

/* Cards */
.card-x, .glass-card {
    position: relative;
    background: rgba(255,255,255,0.72);
    backdrop-filter: blur(20px) saturate(160%);
    -webkit-backdrop-filter: blur(20px) saturate(160%);
    border: 1px solid rgba(255,255,255,0.85);
    border-radius: var(--radius-lg);
    padding: 22px;
    box-shadow: 0 0 0 1px var(--line), var(--shadow-sm);
    color: var(--ink);
}
.card-x.hover, .glass-card.hover { transition: transform .22s ease, box-shadow .22s ease; }
.card-x.hover:hover, .glass-card.hover:hover { transform: translateY(-3px); box-shadow: 0 0 0 1px rgba(99,102,241,.18), var(--shadow-lg); }
.card-x.flush { padding: 0; overflow: hidden; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.card-head h3, .card-head h5, .card-head h6 { font-size: 15.5px; font-weight: 750; margin: 0; display: flex; align-items: center; gap: 10px; }
.card-head .sub { font-size: 12.5px; color: var(--muted); }
.ic-chip { width: 34px; height: 34px; border-radius: 11px; display: inline-flex; align-items: center; justify-content: center; font-size: 15px; flex-shrink: 0; background: rgba(99,102,241,.10); color: var(--primary); }
.ic-chip.green { background: rgba(16,185,129,.12); color: var(--success); }
.ic-chip.red { background: rgba(244,63,94,.10); color: var(--danger); }
.ic-chip.amber { background: rgba(245,158,11,.13); color: var(--warning); }
.ic-chip.sky { background: rgba(14,165,233,.12); color: var(--info); }
.ic-chip.violet { background: rgba(139,92,246,.12); color: #7c3aed; }
.ic-chip.solid { background: var(--grad-primary); color: #fff; box-shadow: var(--shadow-brand); }
.glass-subcard { background: rgba(246,248,252,.8); border: 1px solid var(--line); border-radius: 16px; padding: 16px; }
.glass-divider { border-color: var(--line); opacity: 1; }

/* Hero / feature card (gradient) */
.card-hero {
    position: relative; overflow: hidden; color: #fff; border-radius: var(--radius-xl); padding: 28px;
    background: radial-gradient(500px 300px at 100% 0%, rgba(255,255,255,.18), transparent 60%), radial-gradient(400px 260px at 0% 120%, rgba(56,189,248,.45), transparent 60%), var(--grad-primary);
    box-shadow: 0 30px 60px -28px rgba(79,70,229,.65);
}
.card-hero h1, .card-hero h2, .card-hero h3, .card-hero h4 { color: #fff; }
.card-hero .muted { color: rgba(255,255,255,.75); }
.card-hero .pill-glass { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 999px; background: rgba(255,255,255,.16); border: 1px solid rgba(255,255,255,.28); font-size: 12px; font-weight: 600; color: #fff; }
.card-hero .grid-lines { position: absolute; inset: 0; background-image: linear-gradient(rgba(255,255,255,.07) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.07) 1px, transparent 1px); background-size: 34px 34px; mask-image: radial-gradient(circle at 80% 20%, #000, transparent 70%); -webkit-mask-image: radial-gradient(circle at 80% 20%, #000, transparent 70%); pointer-events: none; }

/* KPI tiles */
.kpi-grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.kpi { position: relative; padding: 18px 18px 16px; }
.kpi .kpi-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.kpi .kpi-label { font-size: 12.5px; font-weight: 600; color: var(--muted); }
.kpi .kpi-value { font-family: var(--font-display); font-size: 26px; font-weight: 800; letter-spacing: -.03em; line-height: 1.1; font-variant-numeric: tabular-nums; }
.kpi .kpi-foot { font-size: 12px; color: var(--muted); margin-top: 6px; }
.stat-label { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; font-weight: 700; }
.stat-value { font-size: 24px; font-weight: 800; color: var(--ink); font-family: var(--font-display); letter-spacing: -.02em; }
.mini-stat-card { background: rgba(255,255,255,.7); border: 1px solid var(--line); border-radius: 14px; padding: 12px; }
.mini-stat-card.profit { background: rgba(16,185,129,.08); border-color: rgba(16,185,129,.2); }
.mini-stat-card.loss, .mini-stat-card.danger { background: rgba(244,63,94,.07); border-color: rgba(244,63,94,.18); }
.up { color: var(--success) !important; }
.down { color: var(--danger) !important; }
.delta { display: inline-flex; align-items: center; gap: 3px; font-size: 11.5px; font-weight: 700; padding: 3px 8px; border-radius: 999px; }
.delta.up { background: rgba(16,185,129,.12); }
.delta.down { background: rgba(244,63,94,.10); }

/* Segmented control / chips */
.segmented { display: inline-flex; padding: 4px; gap: 2px; border-radius: 14px; background: rgba(15,23,42,.05); border: 1px solid var(--line); }
.segmented a, .segmented button { padding: 7px 14px; border-radius: 10px; font-size: 13px; font-weight: 600; color: var(--sub); border: 0; background: none; white-space: nowrap; transition: all .18s; display: inline-flex; align-items: center; gap: 6px; }
.segmented a:hover, .segmented button:hover { color: var(--ink); }
.segmented a.active, .segmented button.active { background: #fff; color: var(--ink); box-shadow: var(--shadow-sm); }
.chip-row { display: flex; gap: 8px; flex-wrap: wrap; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 7px 14px; border-radius: 999px; font-size: 12.5px; font-weight: 600; color: var(--sub); background: rgba(255,255,255,.7); border: 1px solid var(--line); transition: all .18s; white-space: nowrap; }
.chip:hover { color: var(--ink); background: #fff; box-shadow: var(--shadow-xs); }
.chip.active { background: var(--ink); color: #fff; border-color: var(--ink); }

/* Status / tags */
.tag { display: inline-flex; align-items: center; gap: 5px; font-size: 10.5px; font-weight: 700; padding: 4px 10px; border-radius: 999px; text-transform: uppercase; letter-spacing: .05em; background: rgba(15,23,42,.06); color: var(--sub); white-space: nowrap; }
.tag.green, .tag.win, .tag.taken, .tag.hit_tp { background: rgba(16,185,129,.12); color: var(--success); }
.tag.red, .tag.loss, .tag.hit_sl { background: rgba(244,63,94,.10); color: var(--danger); }
.tag.amber, .tag.planned { background: rgba(245,158,11,.14); color: #b45309; }
.tag.indigo { background: rgba(99,102,241,.11); color: var(--primary); }
.tag.sky { background: rgba(14,165,233,.12); color: var(--info); }
.tag.violet { background: rgba(139,92,246,.12); color: #7c3aed; }
.tag.skipped, .tag.cancelled { background: rgba(15,23,42,.06); color: var(--muted); }
.glass-status { font-size: 10px; font-weight: 700; padding: 4px 10px; border-radius: 999px; background: rgba(15,23,42,.06); color: var(--sub); text-transform: uppercase; letter-spacing: .05em; }
.glass-status.win, .glass-status.taken, .glass-status.hit_tp { background: rgba(16,185,129,.12); color: var(--success); }
.glass-status.loss, .glass-status.hit_sl { background: rgba(244,63,94,.10); color: var(--danger); }
.glass-status.planned { background: rgba(245,158,11,.14); color: #b45309; }
.glass-status.skipped, .glass-status.cancelled { color: var(--muted); }
.glass-score { font-size: 12px; font-weight: 600; padding: 5px 12px; border-radius: 999px; background: rgba(15,23,42,.05); border: 1px solid var(--line); display: inline-block; }

/* Buttons */
.btn { border-radius: 12px; font-weight: 600; }
.btn-x {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    padding: 10px 18px; border-radius: 14px; font-size: 13.5px; font-weight: 650; line-height: 1.2;
    border: 1px solid transparent; cursor: pointer; transition: all .2s ease; white-space: nowrap; text-decoration: none;
    font-family: var(--font);
}
.btn-x.sm { padding: 7px 13px; border-radius: 11px; font-size: 12.5px; }
.btn-x.lg { padding: 13px 24px; border-radius: 16px; font-size: 15px; }
.btn-x.block { width: 100%; }
.btn-primary-x, .glass-btn-primary, .btn-submit { background: var(--grad-primary); color: #fff !important; box-shadow: var(--shadow-brand), inset 0 1px 0 rgba(255,255,255,.25); border: 0; }
.btn-primary-x:hover, .glass-btn-primary:hover, .btn-submit:hover { transform: translateY(-1px); box-shadow: 0 14px 30px -10px rgba(79,70,229,.65); color: #fff; filter: saturate(1.1); }
.btn-ghost-x, .glass-btn, .btn-cancel { background: rgba(255,255,255,.75); color: var(--ink-2) !important; border: 1px solid var(--line-hi); box-shadow: var(--shadow-xs); }
.btn-ghost-x:hover, .glass-btn:hover, .btn-cancel:hover { background: #fff; color: var(--ink) !important; transform: translateY(-1px); box-shadow: var(--shadow-sm); }
.btn-dark-x, .glass-btn-dark { background: var(--ink); color: #fff !important; border: 0; }
.btn-dark-x:hover, .glass-btn-dark:hover { background: #1e293b; color: #fff; transform: translateY(-1px); }
.btn-soft-x { background: rgba(99,102,241,.10); color: var(--primary) !important; border: 1px solid rgba(99,102,241,.16); }
.btn-soft-x:hover { background: rgba(99,102,241,.16); }
.btn-danger-x { background: rgba(244,63,94,.08); color: var(--danger) !important; border: 1px solid rgba(244,63,94,.2); }
.btn-danger-x:hover { background: rgba(244,63,94,.14); }
.glass-btn, .glass-btn-primary, .glass-btn-dark { border-radius: 12px; font-weight: 600; }
.btn-submit, .btn-cancel { display: inline-flex; align-items: center; gap: 8px; padding: 11px 22px; border-radius: 14px; font-size: 13.5px; font-weight: 650; cursor: pointer; transition: all .2s; }

/* Forms */
.field { margin-bottom: 16px; }
.field label, .glass-label, .form-label-x { display: block; font-size: 12.5px; font-weight: 600; color: var(--sub); margin-bottom: 7px; }
.field label .req { color: var(--danger); margin-left: 2px; }
.field .hint { font-size: 11.5px; color: var(--faint); margin-top: 5px; }
.input-x, .field input, .field select, .field textarea, .glass-input, .form-control.glass-input, .form-select.glass-input {
    width: 100%; padding: 11px 14px; font-size: 14px; font-family: var(--font); color: var(--ink) !important;
    background: rgba(255,255,255,.85) !important; border: 1px solid var(--line-hi) !important; border-radius: 13px !important;
    outline: none; transition: border-color .18s, box-shadow .18s, background .18s; box-shadow: var(--shadow-xs);
}
.field select, select.input-x, .form-select.glass-input { appearance: none; -webkit-appearance: none; padding-right: 38px; background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%2364748b' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3e%3c/svg%3e") !important; background-repeat: no-repeat !important; background-position: right 14px center !important; background-size: 12px !important; }
.input-x:focus, .field input:focus, .field select:focus, .field textarea:focus, .glass-input:focus {
    background-color: #fff !important; border-color: rgba(99,102,241,.6) !important; box-shadow: 0 0 0 4px rgba(99,102,241,.14) !important;
}
.input-x::placeholder, .field input::placeholder, .field textarea::placeholder, .glass-input::placeholder { color: var(--faint) !important; }
.input-icon { position: relative; }
.input-icon > i { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--faint); font-size: 15px; pointer-events: none; z-index: 1; }
.input-icon > input { padding-left: 42px !important; }
.form-grid { display: grid; gap: 0 16px; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.form-section-title { display: flex; align-items: center; gap: 10px; font-size: 14px; font-weight: 700; color: var(--ink); margin: 0 0 16px; font-family: var(--font-display); }
.form-actions { display: flex; gap: 10px; justify-content: flex-end; flex-wrap: wrap; margin-top: 8px; }
.glass-check .form-check-input { background-color: #fff; border-color: var(--line-hi); }
.glass-check .form-check-input:checked { background-color: var(--primary); border-color: var(--primary); }
.form-check-input:focus { box-shadow: 0 0 0 4px rgba(99,102,241,.14); border-color: var(--primary-2); }

/* Toggle-tiles (checklists) */
.tile-check { position: relative; display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-radius: 14px; background: rgba(255,255,255,.75); border: 1px solid var(--line-hi); cursor: pointer; transition: all .18s; font-size: 13px; font-weight: 600; color: var(--sub); user-select: none; margin: 0; }
.tile-check:hover { background: #fff; box-shadow: var(--shadow-xs); }
.tile-check input { position: absolute; opacity: 0; pointer-events: none; }
.tile-check .box { width: 22px; height: 22px; border-radius: 7px; border: 1.5px solid var(--line-hi); background: #fff; display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; transition: all .18s; color: transparent; font-size: 13px; }
.tile-check:has(input:checked) { background: rgba(99,102,241,.08); border-color: rgba(99,102,241,.35); color: var(--primary-deep); }
.tile-check:has(input:checked) .box { background: var(--grad-primary); border-color: transparent; color: #fff; }
.radio-tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.radio-tile { position: relative; margin: 0; cursor: pointer; }
.radio-tile input { position: absolute; opacity: 0; }
.radio-tile span { display: flex; align-items: center; justify-content: center; gap: 8px; padding: 11px; border-radius: 13px; border: 1px solid var(--line-hi); background: rgba(255,255,255,.8); font-weight: 700; font-size: 13.5px; color: var(--sub); transition: all .18s; }
.radio-tile input:checked + span.buy { background: rgba(16,185,129,.1); border-color: rgba(16,185,129,.45); color: var(--success); box-shadow: 0 0 0 3px rgba(16,185,129,.12); }
.radio-tile input:checked + span.sell { background: rgba(244,63,94,.08); border-color: rgba(244,63,94,.4); color: var(--danger); box-shadow: 0 0 0 3px rgba(244,63,94,.1); }
.radio-tile input:focus-visible + span { outline: 2px solid var(--primary-2); outline-offset: 2px; }

/* Alerts */
.flash-success, .flash-error, .flash-info, .glass-alert {
    display: flex; align-items: flex-start; gap: 11px; border-radius: 16px; padding: 13px 16px;
    font-size: 13.5px; font-weight: 500; margin-bottom: 1rem; border: 1px solid; backdrop-filter: blur(10px);
}
.flash-success::before, .flash-error::before, .flash-info::before { font-family: 'bootstrap-icons'; font-size: 16px; line-height: 1.2; }
.flash-success { background: rgba(236,253,245,.9); border-color: rgba(16,185,129,.25); color: #047857; }
.flash-success::before { content: '\F26B'; }
.flash-error, .glass-alert { background: rgba(255,241,242,.92); border-color: rgba(244,63,94,.22); color: #be123c; }
.flash-error::before { content: '\F33B'; }
.flash-info { background: rgba(238,242,255,.92); border-color: rgba(99,102,241,.22); color: var(--primary-deep); }
.flash-info::before { content: '\F431'; }
.flash-error p, .flash-success p { margin: 0; }

/* Tables */
.table { --bs-table-bg: transparent; --bs-table-color: var(--ink-2); --bs-table-border-color: var(--line); color: var(--ink-2); font-size: 13.5px; margin-bottom: 0; }
.table thead th { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); border-bottom: 1px solid var(--line-hi); padding-top: 12px; padding-bottom: 12px; background: transparent; white-space: nowrap; }
.table tbody td { padding-top: 13px; padding-bottom: 13px; vertical-align: middle; border-color: var(--line); }
.table-hover tbody tr:hover { --bs-table-hover-bg: rgba(99,102,241,.04); --bs-table-hover-color: var(--ink); }
.card { background: rgba(255,255,255,.75); border: 1px solid var(--line); border-radius: var(--radius); color: var(--ink); }
.badge { font-weight: 600; letter-spacing: .02em; border-radius: 999px; padding: .4em .75em; }

/* Empty state */
.empty-x { text-align: center; padding: 56px 20px; border-radius: var(--radius-lg); border: 1.5px dashed rgba(15,23,42,.12); background: rgba(255,255,255,.45); }
.empty-x .ill { width: 72px; height: 72px; margin: 0 auto 16px; border-radius: 22px; display: flex; align-items: center; justify-content: center; font-size: 30px; color: var(--primary); background: linear-gradient(135deg, rgba(99,102,241,.14), rgba(139,92,246,.10)); }
.empty-x h4 { font-size: 17px; font-weight: 750; margin-bottom: 6px; }
.empty-x p { color: var(--muted); font-size: 13.5px; max-width: 360px; margin: 0 auto 18px; }

/* Calendar (dashboard) */
.calendar-weekdays { display: grid; grid-template-columns: repeat(7, 1fr); gap: 8px; font-size: 11px; color: var(--faint); text-align: center; margin-bottom: 8px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.calendar-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 8px; }
.calendar-day { position: relative; min-height: 84px; padding: 10px; border-radius: 16px; background: rgba(255,255,255,.65); border: 1px solid var(--line); display: flex; flex-direction: column; justify-content: space-between; transition: transform .18s, box-shadow .18s; overflow: hidden; }
.calendar-day:not(.empty):hover { transform: translateY(-2px); box-shadow: var(--shadow-sm); background: #fff; }
.calendar-day.profit { background: linear-gradient(160deg, rgba(16,185,129,.16), rgba(16,185,129,.05)); border-color: rgba(16,185,129,.28); }
.calendar-day.loss { background: linear-gradient(160deg, rgba(244,63,94,.14), rgba(244,63,94,.04)); border-color: rgba(244,63,94,.24); }
.calendar-day.today { box-shadow: 0 0 0 2px var(--primary-2), var(--shadow-sm); }
.calendar-day.today .day-number { background: var(--grad-primary); color: #fff; }
.calendar-day.empty { background: transparent; border: 0; }
.calendar-day .day-number { font-size: 12px; font-weight: 700; color: var(--sub); width: 26px; height: 26px; border-radius: 9px; display: inline-flex; align-items: center; justify-content: center; }
.calendar-day .pl, .calendar-day .day-pl { font-size: 13px; font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-variant-numeric: tabular-nums; font-family: var(--font-display); letter-spacing: -.01em; }
.calendar-day.profit .pl, .calendar-day.profit .day-pl { color: var(--success); }
.calendar-day.loss .pl, .calendar-day.loss .day-pl { color: var(--danger); }
@media (max-width: 767px) { .calendar-day { min-height: 56px; padding: 6px; border-radius: 12px; } .calendar-day .pl { font-size: 9.5px; } .calendar-grid, .calendar-weekdays { gap: 5px; } .calendar-day .day-number { width: 20px; height: 20px; font-size: 10.5px; } }
.nav-btn { width: 38px; height: 38px; border-radius: 12px; display: inline-flex; align-items: center; justify-content: center; background: rgba(255,255,255,.8); border: 1px solid var(--line-hi); color: var(--ink); font-size: 16px; cursor: pointer; box-shadow: var(--shadow-xs); transition: all .18s; }
.nav-btn:hover { background: #fff; box-shadow: var(--shadow-sm); color: var(--primary); }
.today-btn { padding: 9px 14px; border-radius: 12px; background: rgba(99,102,241,.1); border: 1px solid rgba(99,102,241,.2); color: var(--primary); font-size: 12px; font-weight: 700; cursor: pointer; letter-spacing: .03em; transition: all .18s; }
.today-btn:hover { background: rgba(99,102,241,.16); }
.week-card { padding: 14px 16px; border-radius: 16px; background: rgba(255,255,255,.7); border: 1px solid var(--line); transition: all .2s; }
.week-card .week-head { display: flex; justify-content: space-between; font-size: 12px; font-weight: 600; color: var(--muted); }
.week-card.profit { background: linear-gradient(135deg, rgba(16,185,129,.12), rgba(16,185,129,.03)); border-color: rgba(16,185,129,.25); }
.week-card.loss { background: linear-gradient(135deg, rgba(244,63,94,.10), rgba(244,63,94,.03)); border-color: rgba(244,63,94,.22); }
.week-amount { font-family: var(--font-display); font-size: 19px; font-weight: 800; color: var(--ink); margin-top: 4px; font-variant-numeric: tabular-nums; }
.week-card.profit .week-amount { color: var(--success); }
.week-card.loss .week-amount { color: var(--danger); }
.week-days { font-size: 11.5px; color: var(--muted); margin-top: 2px; }

/* Trade cards (ideas) */
.trade-card { transition: transform .2s ease, box-shadow .2s ease; }
.trade-card:hover { transform: translateY(-3px); box-shadow: 0 0 0 1px rgba(99,102,241,.18), var(--shadow-lg); }
.trade-icon { width: 42px; height: 42px; border-radius: 13px; display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 18px; flex-shrink: 0; }
.icon-buy { background: rgba(16,185,129,.13); color: var(--success); }
.icon-sell { background: rgba(244,63,94,.11); color: var(--danger); }
.trade-meta { display: flex; gap: 6px; font-size: 11.5px; color: var(--sub); flex-wrap: wrap; }
.levels { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.levels > div { background: rgba(246,248,252,.9); border: 1px solid var(--line); border-radius: 12px; padding: 9px 11px; min-width: 0; }
.levels small { display: block; font-size: 10.5px; font-weight: 600; color: var(--faint); text-transform: uppercase; letter-spacing: .06em; margin-bottom: 2px; }
.levels strong { font-size: 14px; font-weight: 750; font-variant-numeric: tabular-nums; display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.levels .sl strong { color: var(--danger); }
.levels .tp strong { color: var(--success); }
.progress-x { height: 7px; border-radius: 999px; background: rgba(15,23,42,.07); overflow: hidden; }
.progress-x > span { display: block; height: 100%; border-radius: 999px; background: linear-gradient(90deg, #6366f1, #8b5cf6, #10b981); }

/* Grid helpers */
.grid-auto { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); }
.grid-auto.sm { grid-template-columns: repeat(auto-fill, minmax(min(100%, 240px), 1fr)); }
.grid-auto.lg { grid-template-columns: repeat(auto-fill, minmax(min(100%, 380px), 1fr)); }
.stack { display: flex; flex-direction: column; gap: 16px; }

/* Reveal animation */
.reveal { animation: rise .5s cubic-bezier(.2,.7,.2,1) both; }
.reveal.d1 { animation-delay: .05s; } .reveal.d2 { animation-delay: .1s; } .reveal.d3 { animation-delay: .15s; } .reveal.d4 { animation-delay: .2s; }
@keyframes rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }

/* Bootstrap container inside full-width shell */
.app-content > .container, .app-content > .container-xl, .app-content > .container-fluid { max-width: 100%; padding-left: 0; padding-right: 0; }
.dashboard-wrapper { max-width: none; }

/* ══════════════ AUTH (bare) ══════════════ */
.auth-screen { min-height: 100vh; display: grid; grid-template-columns: 1.05fr 1fr; padding: var(--gap); gap: var(--gap); }
.auth-visual { position: relative; border-radius: 32px; overflow: hidden; padding: 44px; display: flex; flex-direction: column; justify-content: space-between; color: #fff;
    background: radial-gradient(700px 420px at 100% 0%, rgba(255,255,255,.2), transparent 60%), radial-gradient(600px 400px at 0% 100%, rgba(56,189,248,.5), transparent 60%), linear-gradient(150deg, #4f46e5 0%, #6d28d9 60%, #7c3aed 100%); box-shadow: 0 40px 80px -40px rgba(79,70,229,.7); }
.auth-visual .grid-lines { position: absolute; inset: 0; background-image: linear-gradient(rgba(255,255,255,.08) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.08) 1px, transparent 1px); background-size: 40px 40px; mask-image: radial-gradient(circle at 70% 30%, #000, transparent 75%); -webkit-mask-image: radial-gradient(circle at 70% 30%, #000, transparent 75%); }
.auth-visual > * { position: relative; }
.auth-visual .brand { color: #fff !important; }
.auth-visual .brand-mark { background: rgba(255,255,255,.18); border: 1px solid rgba(255,255,255,.3); box-shadow: none; }
.auth-visual h2 { color: #fff; font-size: clamp(2rem, 3.4vw, 3.1rem); font-weight: 800; line-height: 1.08; letter-spacing: -.035em; margin: 0 0 16px; }
.auth-visual p.lead-x { color: rgba(255,255,255,.8); font-size: 15.5px; max-width: 440px; line-height: 1.65; }
.auth-float { background: rgba(255,255,255,.14); border: 1px solid rgba(255,255,255,.28); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); border-radius: 22px; padding: 18px 20px; }
.auth-points { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.auth-points div { display: flex; align-items: center; gap: 10px; font-size: 13px; font-weight: 600; }
.auth-points i { width: 30px; height: 30px; border-radius: 10px; display: inline-flex; align-items: center; justify-content: center; background: rgba(255,255,255,.18); }
.auth-panel-x { display: flex; align-items: center; justify-content: center; padding: 30px 20px; }
.auth-card { width: 100%; max-width: 440px; padding: 38px 36px; border-radius: 30px; }
.auth-card h1 { font-size: 28px; font-weight: 800; margin: 0 0 6px; }
.auth-card .sub { color: var(--muted); font-size: 14px; margin-bottom: 26px; }
.auth-card .alt { text-align: center; font-size: 13.5px; color: var(--muted); margin-top: 22px; }
.auth-card .alt a { font-weight: 700; }
.auth-mobile-brand { display: none; }
@media (max-width: 991.98px) {
    .auth-screen { grid-template-columns: 1fr; }
    .auth-visual { display: none; }
    .auth-mobile-brand { display: flex; justify-content: center; margin-bottom: 22px; }
    .auth-card { padding: 30px 22px; }
}
