    *, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

    :root {
      --navy-950: #020A14;
      --navy-900: #060F1E;
      --navy-800: #0A1828;
      --navy-700: #0F2238;
      --navy-600: #162E4A;
      --navy-500: #1E3E60;
      --gold-300: #FEDD8A;
      --gold-400: #F5C842;
      --gold-500: #D4A827;
      --gold-600: #A8821A;
      --white:    #FFFFFF;
      --grey-50:  #F5F7FA;
      --grey-100: #EBEEF4;
      --grey-150: #DFE4ED;
      --grey-200: #CDD4E0;
      --grey-300: #A8B4C5;
      --grey-400: #7E8FA4;
      --grey-500: #5A6B81;
      --grey-700: #344156;
      --grey-900: #111D2C;
      --green-400: #34D399;
      --green-500: #10B981;
      --green-bg:  rgba(16,185,129,0.08);
      --red-400:   #F87171;
      --red-500:   #EF4444;
      --red-bg:    rgba(239,68,68,0.08);
      --header-h:  60px;
      --sidebar-w: 256px;
      --r-sm:  8px;
      --r-md:  14px;
      --r-lg:  20px;
      --shadow-sm: 0 1px 3px rgba(10,20,50,0.07), 0 2px 8px rgba(10,20,50,0.05);
      --shadow-md: 0 4px 16px rgba(10,20,50,0.10), 0 1px 4px rgba(10,20,50,0.06);
      --shadow-lg: 0 10px 40px rgba(10,20,50,0.14), 0 2px 8px rgba(10,20,50,0.06);
    }

    /* ── THEME VARIABLES (light defaults) ── */
    :root {
      --bg-page:     #F5F7FA;
      --bg-card:     #FFFFFF;
      --bg-card-alt: #F5F7FA;
      --border-card: #DFE4ED;
      --text-primary:   #111D2C;
      --text-secondary: #7E8FA4;
      --text-muted:     #A8B4C5;
      --bg-chart:    #0B1426;
      --bg-sidebar:  rgba(10,24,40,0.97);
      --bg-header:   #060F1E;
      --bg-input:    #F5F7FA;
      --border-input: #DFE4ED;
      --chart-up:    #00FFA3;
      --chart-down:  #FF3B6A;
      --chart-grid:  rgba(255,255,255,0.06);
      --chart-tick:  #475569;
    }

    [data-theme="dark"] {
      --bg-page:     #0B0E11;
      --bg-card:     #1C1F26;
      --bg-card-alt: #16191F;
      --border-card: #2A2E39;
      --text-primary:   #E0E3E8;
      --text-secondary: #6B7280;
      --text-muted:     #4B5563;
      --bg-chart:    #131722;
      --bg-sidebar:  #0F1218;
      --bg-header:   #0B0E11;
      --bg-input:    #1C1F26;
      --border-input: #2A2E39;
      --chart-up:    #00C853;
      --chart-down:  #FF1744;
      --chart-grid:  rgba(255,255,255,0.04);
      --chart-tick:  #6B7280;
    }

    [data-theme="dark"] .card-name { color: var(--text-secondary); }
    [data-theme="dark"] .stat-label { color: var(--text-secondary); }
    [data-theme="dark"] .stat-val { color: var(--text-primary); }
    [data-theme="dark"] .meta-val { color: var(--text-primary); }
    [data-theme="dark"] .meta-label { color: var(--text-secondary); }
    [data-theme="dark"] .alert-display { color: var(--text-primary); border-color: var(--border-card); }
    [data-theme="dark"] .alert-hint { color: var(--text-muted); }
    [data-theme="dark"] .alert-input { background: var(--bg-input); border-color: var(--border-input); color: var(--text-primary); }
    [data-theme="dark"] .page-sub { color: var(--text-secondary); }
    [data-theme="dark"] .s-card-title { color: var(--text-primary); }
    [data-theme="dark"] .s-card-desc { color: var(--text-secondary); }
    [data-theme="dark"] .s-row-lbl { color: var(--text-primary); }
    [data-theme="dark"] .s-row-desc { color: var(--text-secondary); }
    [data-theme="dark"] .wl-manage-item { background: var(--bg-card-alt); border-color: var(--border-card); }
    [data-theme="dark"] .wl-manage-sym { color: var(--text-primary); }
    [data-theme="dark"] .alert-hist-item { background: var(--bg-card-alt); border-color: var(--border-card); }
    [data-theme="dark"] .ah-sym { color: var(--text-primary); }
    [data-theme="dark"] .footer { background: var(--bg-header); }
    [data-theme="dark"] .time-range-btn { background: var(--bg-card-alt); border-color: var(--border-card); color: var(--text-secondary); }
    [data-theme="dark"] .skeleton { background: linear-gradient(90deg, #1C1F26 25%, #2A2E39 50%, #1C1F26 75%); background-size: 200% 100%; }

    html { font-size: 16px; scroll-behavior: smooth; }
    body {
      font-family: 'IBM Plex Sans', system-ui, sans-serif;
      background: var(--bg-page); color: var(--text-primary);
      min-height: 100vh; line-height: 1.5;
      -webkit-font-smoothing: antialiased;
    }
    ::-webkit-scrollbar { width: 5px; height: 5px; }
    ::-webkit-scrollbar-track { background: transparent; }
    ::-webkit-scrollbar-thumb { background: var(--navy-600); border-radius: 99px; }

    /* ── HEADER ── */
    .header {
      position: fixed; top: 0; left: 0; right: 0;
      height: var(--header-h);
      background: var(--bg-header);
      display: flex; align-items: center; padding: 0 20px 0 0;
      z-index: 300; border-bottom: 1px solid rgba(212,168,39,0.12);
    }
    .header::after {
      content: ''; position: absolute; bottom: 0; left: 0; right: 0; height: 1px;
      background: linear-gradient(90deg, var(--gold-500) 0%, transparent 55%);
    }

    .hamburger {
      display: none; background: none; border: none;
      color: rgba(255,255,255,0.6); cursor: pointer;
      padding: 10px 14px; transition: color 0.2s; flex-shrink: 0;
    }
    .hamburger:hover { color: var(--gold-400); }

    .logo-wrap {
      display: flex; align-items: center; gap: 10px;
      padding: 0 20px; width: var(--sidebar-w);
      border-right: 1px solid rgba(255,255,255,0.05);
      height: 100%; text-decoration: none; flex-shrink: 0;
    }
    .logo-mark {
      width: 32px; height: 32px;
      background: linear-gradient(135deg, var(--gold-400), var(--gold-500));
      border-radius: 9px; display: flex; align-items: center; justify-content: center;
      font-family: 'Syne', sans-serif; font-weight: 800; font-size: 17px;
      color: var(--navy-900); flex-shrink: 0;
      box-shadow: 0 2px 10px rgba(212,168,39,0.35);
    }
    .logo-text {
      font-family: 'Syne', sans-serif; font-weight: 700;
      font-size: 14.5px; color: var(--white); letter-spacing: 0.01em; line-height: 1.2;
    }
    .logo-text em {
      display: block; font-style: normal; font-size: 9.5px;
      letter-spacing: 0.18em; text-transform: uppercase;
      color: var(--gold-400); font-weight: 500; font-family: 'IBM Plex Sans', sans-serif;
    }

    .header-center {
      flex: 1; display: flex; align-items: center; padding: 0 22px; gap: 18px;
    }
    .market-badge {
      display: flex; align-items: center; gap: 7px; padding: 5px 12px;
      background: rgba(255,255,255,0.04); border: 1px solid rgba(255,255,255,0.06);
      border-radius: 99px; font-size: 12px; font-weight: 500;
      color: rgba(255,255,255,0.55); white-space: nowrap;
    }
    .live-dot {
      width: 7px; height: 7px; border-radius: 50%;
      background: var(--green-500); box-shadow: 0 0 0 2px rgba(16,185,129,0.22);
      animation: pulseDot 2.5s ease infinite; flex-shrink: 0;
    }
    @keyframes pulseDot {
      0%,100% { box-shadow: 0 0 0 2px rgba(16,185,129,0.22); }
      50%      { box-shadow: 0 0 0 5px rgba(16,185,129,0.07); }
    }

    .countdown-wrap { display: flex; align-items: center; gap: 9px; }
    .countdown-bar {
      width: 70px; height: 3px; background: rgba(255,255,255,0.07);
      border-radius: 99px; overflow: hidden;
    }
    .countdown-fill { height: 100%; background: var(--gold-400); border-radius: 99px; transition: width 1s linear; width: 100%; }
    .countdown-label { font-family: 'IBM Plex Mono', monospace; font-size: 11px; color: rgba(255,255,255,0.3); white-space: nowrap; }

    .header-right { display: flex; align-items: center; gap: 14px; }
    .clock-display {
      font-family: 'IBM Plex Mono', monospace; font-size: 13px;
      font-weight: 500; color: var(--gold-300); letter-spacing: 0.04em; white-space: nowrap;
    }
    .alerts-btn {
      display: flex; align-items: center; gap: 7px; padding: 7px 14px;
      border-radius: var(--r-sm); border: 1px solid rgba(255,255,255,0.1);
      background: rgba(255,255,255,0.04); color: rgba(255,255,255,0.6);
      font-size: 12px; font-weight: 600; cursor: pointer;
      transition: all 0.2s; font-family: 'IBM Plex Sans', sans-serif; white-space: nowrap;
    }
    .alerts-btn:hover { background: rgba(255,255,255,0.08); color: var(--white); }
    .alerts-btn.on  { background: rgba(16,185,129,0.12); border-color: rgba(16,185,129,0.28); color: var(--green-400); }
    .alerts-btn.off { background: rgba(239,68,68,0.10);  border-color: rgba(239,68,68,0.24);  color: var(--red-400); }

    /* ── SIDEBAR ── */
    .sidebar {
      position: fixed; top: var(--header-h); left: 0;
      width: var(--sidebar-w); bottom: 0;
      background: var(--navy-800); z-index: 200;
      display: flex; flex-direction: column; overflow: hidden;
      border-right: 1px solid rgba(255,255,255,0.04);
      transition: transform 0.3s cubic-bezier(0.4,0,0.2,1);
    }
    .sidebar-overlay {
      display: none; position: fixed; inset: 0;
      background: rgba(5,13,26,0.65); z-index: 190; backdrop-filter: blur(3px);
    }
    .sidebar-overlay.open { display: block; }
    .sidebar.mobile-open  { transform: translateX(0) !important; }

    .sidebar-nav { padding: 18px 0 0; flex-shrink: 0; }
    .nav-section-label {
      font-size: 9px; font-weight: 700; letter-spacing: 0.20em;
      text-transform: uppercase; color: rgba(255,255,255,0.18);
      padding: 0 18px; margin-bottom: 5px;
    }
    .nav-link {
      display: flex; align-items: center; gap: 10px;
      padding: 10px 18px; font-size: 13.5px; font-weight: 500;
      color: rgba(255,255,255,0.45); cursor: pointer;
      border-left: 3px solid transparent; transition: all 0.18s; user-select: none;
    }
    .nav-link:hover { color: rgba(255,255,255,0.80); background: rgba(255,255,255,0.04); }
    .nav-link.active { color: var(--gold-400); background: rgba(212,168,39,0.07); border-left-color: var(--gold-500); }
    .nav-link svg { flex-shrink: 0; opacity: 0.7; }
    .nav-link.active svg { opacity: 1; }
    .sidebar-sep { height: 1px; background: rgba(255,255,255,0.05); margin: 14px 16px; }

    .sidebar-watchlist { flex: 1; overflow-y: auto; padding-bottom: 16px; }
    .wl-item { display: flex; align-items: center; justify-content: space-between; padding: 9px 18px; transition: background 0.14s; }
    .wl-item:hover { background: rgba(255,255,255,0.03); }
    .wl-symbol { font-family: 'IBM Plex Sans', sans-serif; font-weight: 700; font-size: 13px; color: rgba(255,255,255,0.78); letter-spacing: 0.03em; }
    .wl-price  { font-family: 'IBM Plex Mono', monospace; font-size: 11.5px; color: rgba(255,255,255,0.38); }
    .wl-change { font-size: 10.5px; font-weight: 700; padding: 2px 7px; border-radius: 99px; }
    .wl-change.up   { color: var(--green-400); background: rgba(52,211,153,0.10); }
    .wl-change.down { color: var(--red-400);   background: rgba(248,113,113,0.10); }
    .sidebar-foot   { padding: 12px 18px; border-top: 1px solid rgba(255,255,255,0.05); flex-shrink: 0; }
    .sidebar-foot p { font-size: 10px; color: rgba(255,255,255,0.18); line-height: 1.7; }

    /* ── MAIN ── */
    .app-body {
      margin-top: var(--header-h);
      margin-left: max(var(--sidebar-w), calc((100vw + var(--sidebar-w) - 1440px) / 2));
      max-width: 1440px;
      min-height: calc(100vh - var(--header-h));
      display: grid;
      grid-template-columns: auto 1fr auto;
      grid-template-rows: 1fr auto;
      grid-template-areas:
        "left main right"
        "foot foot foot";
    }
    .page-wrap { grid-area: main; min-width: 0; padding: 28px 28px 48px; }
    .page { display: none; pointer-events: none; opacity: 0; transform: translateY(8px); }
    .page.active { display: block; pointer-events: auto; opacity: 1; transform: translateY(0); }

    .page-hd {
      display: flex; align-items: flex-start; justify-content: space-between;
      margin-bottom: 24px; gap: 14px; flex-wrap: wrap;
    }
    .page-title {
      font-family: 'IBM Plex Sans', sans-serif; font-weight: 700; font-size: 26px;
      color: var(--text-primary); letter-spacing: -0.04em; line-height: 1;
    }
    .page-sub { font-size: 13px; color: var(--grey-400); margin-top: 5px; }
    .page-actions { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }

    .btn {
      display: inline-flex; align-items: center; gap: 7px;
      padding: 8px 16px; border-radius: var(--r-sm);
      font-size: 13px; font-weight: 600; cursor: pointer; border: none;
      transition: all 0.18s; font-family: 'IBM Plex Sans', sans-serif; white-space: nowrap;
    }
    .btn svg { flex-shrink: 0; }
    .btn-navy { background: var(--navy-700); color: var(--gold-400); border: 1px solid var(--navy-600); }
    .btn-navy:hover { background: var(--navy-600); transform: translateY(-1px); box-shadow: 0 4px 14px rgba(10,34,74,0.25); }
    .btn.spinning svg { animation: spin 0.8s linear infinite; }
    @keyframes spin { to { transform: rotate(360deg); } }

    /* ── STATS ── */
    .stats-row { display: grid; grid-template-columns: repeat(4,1fr); gap: 14px; margin-bottom: 24px; }
    .stat-card {
      background: var(--bg-card); border: 1px solid var(--border-card);
      border-radius: var(--r-md); padding: 18px 20px;
      box-shadow: var(--shadow-sm); position: relative; overflow: hidden;
    }
    .stat-card::before {
      content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px;
      background: linear-gradient(90deg, var(--navy-600), transparent); opacity: 0.5;
    }
    .stat-label { font-size: 10px; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--grey-400); margin-bottom: 8px; }
    .stat-val   { font-family: 'IBM Plex Sans', sans-serif; font-size: 30px; font-weight: 700; color: var(--text-primary); letter-spacing: -0.05em; line-height: 1; }
    .stat-val.green { color: var(--green-500); }
    .stat-val.red   { color: var(--red-500); }
    .stat-val.gold  { color: var(--gold-500); }

    /* ── STOCK GRID ── */
    .stock-grid { display: flex; flex-direction: column; gap: 18px; }

    /* ── STOCK CARD ── */
    .stock-card {
      background: var(--bg-card); border: 1px solid var(--border-card);
      border-radius: var(--r-lg); box-shadow: var(--shadow-sm);
      overflow: hidden; position: relative;
    }
    .stock-card.alert-high {
      border-color: rgba(239,68,68,0.4);
      box-shadow: 0 0 0 3px rgba(239,68,68,0.07), var(--shadow-lg);
      animation: alertFlash 0.55s ease 3;
    }
    .stock-card.alert-low {
      border-color: rgba(52,211,153,0.4);
      box-shadow: 0 0 0 3px rgba(52,211,153,0.07), var(--shadow-lg);
      animation: alertFlash 0.55s ease 3;
    }
    @keyframes alertFlash { 0%,100% { opacity:1; } 50% { opacity:0.75; } }

    .stock-card.hero-card .card-chart { height: 350px; padding: 0 16px; }
    .stock-card.hero-card .card-price { font-size: 42px; }
    .stock-card.hero-card .time-range-bar { padding: 10px 16px 6px; }
    .stock-card.hero-card .time-range-btn { font-size: 12px; padding: 5px 12px; }

    .stock-card.compact-card .card-chart { height: 160px; }

    .pin-btn {
      background: none; border: none; cursor: pointer;
      color: var(--grey-300); padding: 4px;
      transition: color 0.15s; display: flex; align-items: center;
    }
    .pin-btn:hover { color: var(--gold-500); }
    .pin-btn.pinned { color: var(--gold-500); }

    .card-accent { height: 4px; background: var(--grey-100); transition: background 0.5s; }
    .card-accent.up   { background: linear-gradient(90deg, var(--green-500), var(--green-400)); }
    .card-accent.down { background: linear-gradient(90deg, var(--red-500),   var(--red-400)); }

    .card-top { display: flex; align-items: flex-start; justify-content: space-between; padding: 18px 20px 14px; }
    .card-symbol { font-family: 'IBM Plex Sans', sans-serif; font-weight: 700; font-size: 21px; color: var(--text-primary); letter-spacing: -0.02em; line-height: 1; }
    .card-name   { font-size: 11px; color: var(--grey-400); margin-top: 4px; }

    .indicator {
      width: 30px; height: 30px; border-radius: 8px;
      display: flex; align-items: center; justify-content: center;
      flex-shrink: 0; transition: all 0.3s;
    }
    .indicator.up      { background: var(--green-bg); color: var(--green-500); }
    .indicator.down    { background: var(--red-bg);   color: var(--red-500); }
    .indicator.neutral { background: var(--grey-100); color: var(--grey-400); }

    .card-price-area { padding: 0 20px 14px; }
    .card-price {
      font-family: 'IBM Plex Mono', monospace; font-size: 34px;
      font-weight: 500; color: var(--text-primary); letter-spacing: -0.03em; line-height: 1;
    }
    .card-price.loading { color: transparent; font-size: 34px; }
    .card-price.error   { color: var(--grey-300); font-size: 16px; font-family: 'IBM Plex Sans', sans-serif; }

    .change-row { display: flex; align-items: center; gap: 8px; margin-top: 7px; }
    .change-amt { font-family: 'IBM Plex Mono', monospace; font-size: 14px; font-weight: 500; }
    .change-amt.up   { color: var(--green-500); }
    .change-amt.down { color: var(--red-500); }
    .change-pct { font-size: 12px; font-weight: 700; padding: 3px 9px; border-radius: 99px; }
    .change-pct.up      { background: var(--green-bg); color: var(--green-500); }
    .change-pct.down    { background: var(--red-bg);   color: var(--red-500); }
    .change-pct.neutral { background: var(--grey-100); color: var(--grey-400); }

    .card-chart { height: 96px; padding: 0 8px; position: relative; background: var(--bg-chart); border-radius: 0; }
    .chart-empty-msg {
      position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
      font-size: 11px; color: #475569; font-style: italic; pointer-events: none;
    }
    .time-range-bar {
      display: flex; gap: 4px; padding: 8px 12px 4px;
      flex-wrap: wrap;
    }
    .time-range-btn {
      font-family: 'IBM Plex Sans', sans-serif;
      font-size: 11px; font-weight: 600;
      padding: 4px 10px; border-radius: 6px;
      border: 1px solid var(--grey-150);
      background: var(--bg-card); color: var(--grey-500);
      cursor: pointer; transition: all 0.15s;
      line-height: 1;
    }
    .time-range-btn:hover { border-color: var(--navy-600); color: var(--navy-700); }
    .time-range-btn.active {
      background: var(--navy-700); color: var(--gold-400);
      border-color: var(--navy-700);
    }
    .time-range-btn.live { border-color: var(--green-500); color: var(--green-500); }
    .time-range-btn.live:hover { background: var(--green-bg); }
    .time-range-btn.live.active { background: var(--green-500); color: var(--white); border-color: var(--green-500); }

    .card-meta { display: grid; grid-template-columns: 1fr 1fr; border-top: 1px solid var(--border-card); background: var(--bg-card-alt); }
    .meta-cell { padding: 12px 20px; }
    .meta-cell:first-child { border-right: 1px solid var(--border-card); }
    .meta-label { font-size: 9px; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--grey-400); margin-bottom: 4px; }
    .meta-val   { font-family: 'IBM Plex Mono', monospace; font-size: 14px; font-weight: 500; color: var(--text-primary); }
    .meta-val.green { color: var(--green-500); }
    .meta-val.red   { color: var(--red-500); }

    .card-alerts { display: grid; grid-template-columns: 1fr 1fr; border-top: 1px solid var(--border-card); }
    .alert-cell  { padding: 14px 20px; position: relative; }
    .alert-cell:first-child { border-right: 1px solid var(--border-card); }
    .alert-cell-lbl {
      display: flex; align-items: center; gap: 5px;
      font-size: 9px; font-weight: 700; letter-spacing: 0.14em;
      text-transform: uppercase; margin-bottom: 5px;
    }
    .alert-cell-lbl.high { color: var(--red-500); }
    .alert-cell-lbl.low  { color: var(--green-500); }
    .alert-dot { width: 5px; height: 5px; border-radius: 50%; flex-shrink: 0; }
    .alert-dot.high { background: var(--red-500); }
    .alert-dot.low  { background: var(--green-500); }

    .alert-display {
      font-family: 'IBM Plex Mono', monospace; font-size: 16px; font-weight: 500;
      color: var(--text-primary); cursor: pointer;
      border-bottom: 1.5px dashed var(--border-card);
      display: inline-block; padding-bottom: 1px; min-width: 70px;
      transition: border-color 0.18s; user-select: none;
    }
    .alert-display:hover { border-color: var(--navy-600); color: var(--navy-700); }
    .alert-input {
      font-family: 'IBM Plex Mono', monospace; font-size: 15px; font-weight: 500;
      color: var(--navy-700); border: 1.5px solid var(--navy-600);
      border-radius: 5px; padding: 2px 7px; width: 105px;
      outline: none; background: var(--bg-input); display: none;
    }
    .alert-input.editing { display: inline-block; }
    .alert-hint { font-size: 9px; color: var(--grey-300); margin-top: 2px; }

    /* ── NOTIFICATIONS ── */
    #notif-container {
      position: fixed; top: 70px; right: 18px; z-index: 999;
      display: flex; flex-direction: column; gap: 8px; pointer-events: none;
    }
    .notif {
      background: var(--navy-950); border: 1px solid rgba(212,168,39,0.22);
      border-left: 3px solid var(--gold-500); border-radius: 10px;
      padding: 13px 16px; width: 306px;
      box-shadow: 0 8px 32px rgba(5,13,26,0.5);
      animation: notifIn 0.38s cubic-bezier(0.34,1.56,0.64,1) forwards;
      pointer-events: auto;
    }
    .notif.high { border-left-color: var(--red-400); }
    .notif.low  { border-left-color: var(--green-400); }
    @keyframes notifIn  { from { transform: translateX(115%); opacity:0; } to { transform: translateX(0); opacity:1; } }
    @keyframes notifOut { to   { transform: translateX(115%); opacity:0; } }
    .notif-head  { display: flex; align-items: center; gap: 7px; margin-bottom: 5px; }
    .notif-icon  { font-size: 14px; }
    .notif-title { font-family: 'IBM Plex Sans', sans-serif; font-size: 13px; font-weight: 700; color: var(--gold-400); }
    .notif-title.high { color: var(--red-400); }
    .notif-title.low  { color: var(--green-400); }
    .notif-body  { font-size: 12px; color: rgba(255,255,255,0.60); line-height: 1.55; }
    .notif-mono  { font-family: 'IBM Plex Mono', monospace; color: rgba(255,255,255,0.88); }

    /* ── SETTINGS ── */
    .settings-layout { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; align-items: start; }
    .s-card { background: var(--bg-card); border: 1px solid var(--border-card); border-radius: var(--r-lg); padding: 26px; box-shadow: var(--shadow-sm); }
    .s-card.full { grid-column: 1 / -1; }
    .s-card-title { font-family: 'IBM Plex Sans', sans-serif; font-weight: 700; font-size: 16px; color: var(--text-primary); margin-bottom: 4px; }
    .s-card-desc  { font-size: 12px; color: var(--grey-400); margin-bottom: 20px; line-height: 1.5; }

    .s-row { display: flex; align-items: center; justify-content: space-between; padding: 14px 0; border-bottom: 1px solid var(--border-card); gap: 14px; }
    .s-row:last-of-type { border-bottom: none; padding-bottom: 0; }
    .s-row-lbl  { font-size: 13px; font-weight: 600; color: var(--text-primary); display: block; margin-bottom: 3px; }
    .s-row-desc { font-size: 11px; color: var(--grey-400); }
    .s-badge    { font-size: 12px; font-weight: 600; color: var(--grey-500); padding: 6px 12px; background: var(--grey-100); border-radius: 7px; white-space: nowrap; flex-shrink: 0; }
    .s-badge.green { color: var(--green-500); background: var(--green-bg); }
    .s-input {
      font-family: 'IBM Plex Mono', monospace; font-size: 14px; font-weight: 500;
      color: var(--text-primary); border: 1.5px solid var(--border-input);
      border-radius: var(--r-sm); padding: 7px 11px; width: 110px;
      outline: none; transition: border-color 0.18s; background: var(--bg-input);
    }
    .s-input:focus { border-color: var(--navy-600); background: var(--bg-card); }

    .wl-manage { display: flex; flex-direction: column; gap: 8px; margin-bottom: 16px; }
    .wl-manage-item {
      display: flex; align-items: center; justify-content: space-between;
      padding: 10px 14px; background: var(--bg-card-alt);
      border: 1px solid var(--border-card); border-radius: var(--r-sm); transition: border-color 0.15s;
    }
    .wl-manage-item:hover { border-color: var(--border-card); }
    .wl-manage-sym  { font-family: 'IBM Plex Sans', sans-serif; font-weight: 700; font-size: 14px; color: var(--text-primary); }
    .wl-manage-name { font-size: 11px; color: var(--grey-400); margin-top: 1px; }
    .remove-btn {
      width: 27px; height: 27px; border-radius: 7px;
      border: 1px solid rgba(239,68,68,0.2); background: var(--red-bg); color: var(--red-500);
      cursor: pointer; display: flex; align-items: center; justify-content: center;
      font-size: 18px; line-height: 1; transition: all 0.15s; flex-shrink: 0;
    }
    .remove-btn:hover { background: var(--red-500); color: white; border-color: var(--red-500); }
    .add-row { display: flex; gap: 8px; }
    .add-input {
      flex: 1; font-family: 'IBM Plex Mono', monospace; font-size: 14px;
      font-weight: 500; text-transform: uppercase; color: var(--text-primary);
      border: 1.5px solid var(--border-input); border-radius: var(--r-sm);
      padding: 9px 14px; outline: none; transition: border-color 0.18s; background: var(--bg-input);
    }
    .add-input:focus { border-color: var(--navy-600); background: var(--bg-card); }
    .add-input::placeholder { text-transform: none; color: var(--grey-300); }
    .add-input.err { border-color: var(--red-400); }

    .save-btn {
      margin-top: 20px; padding: 10px 22px;
      background: var(--navy-700); color: var(--gold-400); border: 1px solid var(--navy-600);
      border-radius: var(--r-sm); font-family: 'IBM Plex Sans', sans-serif;
      font-size: 13px; font-weight: 700; cursor: pointer; transition: all 0.18s;
      display: inline-flex; align-items: center; gap: 7px;
    }
    .save-btn:hover { background: var(--navy-600); transform: translateY(-1px); }
    .save-btn.saved { background: var(--green-500); color: white; border-color: var(--green-500); }

    .alert-hist-list { display: flex; flex-direction: column; gap: 8px; }
    .alert-hist-empty { font-size: 13px; color: var(--grey-400); padding: 8px 0; font-style: italic; }
    .alert-hist-item {
      display: flex; align-items: center; gap: 10px;
      padding: 10px 14px; background: var(--bg-card-alt);
      border: 1px solid var(--border-card); border-radius: var(--r-sm); font-size: 13px;
    }
    .ah-badge { font-size: 10px; font-weight: 700; letter-spacing: 0.05em; padding: 3px 8px; border-radius: 99px; flex-shrink: 0; }
    .ah-badge.high { background: var(--red-bg);   color: var(--red-500); }
    .ah-badge.low  { background: var(--green-bg); color: var(--green-500); }
    .ah-sym   { font-family: 'IBM Plex Sans', sans-serif; font-weight: 700; color: var(--text-primary); }
    .ah-price { font-family: 'IBM Plex Mono', monospace; color: var(--grey-700); }
    .ah-time  { margin-left: auto; font-family: 'IBM Plex Mono', monospace; font-size: 11px; color: var(--grey-400); white-space: nowrap; }

    /* ── FOOTER ── */
    .footer {
      background: var(--bg-header); color: rgba(255,255,255,0.20);
      text-align: center; padding: 15px 24px; font-size: 11px;
      letter-spacing: 0.04em; border-top: 1px solid rgba(255,255,255,0.04);
    }
    .footer span { color: rgba(255,255,255,0.12); }

    /* ── THEME TOGGLE ── */
    .theme-toggle {
      display: flex; align-items: center; justify-content: center;
      width: 34px; height: 34px; border-radius: 8px;
      border: 1px solid rgba(255,255,255,0.1);
      background: rgba(255,255,255,0.04);
      color: rgba(255,255,255,0.6);
      cursor: pointer; transition: all 0.2s;
    }
    .theme-toggle:hover { background: rgba(255,255,255,0.08); color: var(--gold-400); }
    .theme-icon-moon { display: none; }
    [data-theme="dark"] .theme-icon-sun { display: none; }
    [data-theme="dark"] .theme-icon-moon { display: block; }

    /* ── DEMO BUTTON ── */
    .btn-demo {
      background: rgba(245,200,66,0.10); color: var(--gold-400);
      border: 1px solid rgba(245,200,66,0.25);
    }
    .btn-demo:hover { background: rgba(245,200,66,0.18); transform: translateY(-1px); }
    .btn-demo-active {
      background: rgba(245,200,66,0.15); color: var(--gold-300);
      border: 1px solid rgba(245,200,66,0.4);
      animation: demoPulse 2s ease infinite;
    }
    .btn-demo-active:hover { background: rgba(239,68,68,0.15); color: var(--red-400); border-color: rgba(239,68,68,0.35); animation: none; }
    @keyframes demoPulse {
      0%,100% { box-shadow: 0 0 0 0 rgba(245,200,66,0); }
      50%      { box-shadow: 0 0 0 4px rgba(245,200,66,0.12); }
    }
    .demo-banner {
      display: none; align-items: center; gap: 10px;
      background: rgba(245,200,66,0.08);
      border: 1px solid rgba(245,200,66,0.2);
      border-radius: var(--r-sm); padding: 8px 14px;
      font-size: 12px; font-weight: 600; color: var(--gold-400);
      margin-bottom: 18px;
    }
    .demo-banner.visible { display: flex; }
    .demo-banner-dot {
      width: 7px; height: 7px; border-radius: 50%;
      background: var(--gold-400); flex-shrink: 0;
      animation: demoPulse 1.2s ease infinite;
    }
    .demo-timer { font-family: 'IBM Plex Mono', monospace; }

    /* ── SKELETON LOADING ── */
    .skeleton {
      background: linear-gradient(90deg, var(--grey-100) 25%, var(--grey-50) 50%, var(--grey-100) 75%);
      background-size: 200% 100%;
      animation: shimmer 1.8s ease-in-out infinite;
      border-radius: 6px;
      color: transparent !important;
      pointer-events: none;
      user-select: none;
    }
    .skeleton * { visibility: hidden; }
    @keyframes shimmer {
      0%   { background-position: 200% 0; }
      100% { background-position: -200% 0; }
    }
    .skeleton-price { width: 140px; height: 36px; display: inline-block; }
    .skeleton-change { width: 100px; height: 20px; display: inline-block; }
    .skeleton-meta { width: 80px; height: 18px; display: inline-block; }
    .skeleton-chart { width: 100%; height: 80px; border-radius: 8px; }

    /* ── STAGGERED ENTRANCE ── */
    @keyframes fadeSlideUp {
      from { opacity: 0; transform: translateY(22px); }
      to   { opacity: 1; transform: translateY(0); }
    }
    .stagger-in {
      opacity: 0;
      animation: fadeSlideUp 0.5s cubic-bezier(0.22, 1, 0.36, 1) forwards;
    }
    .stat-card { transition: transform 0.2s, box-shadow 0.2s; }
    .stat-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }

    /* ── ENHANCED DEPTH ── */
    .stock-card {
      transition: transform 0.28s cubic-bezier(0.22, 1, 0.36, 1),
                  box-shadow 0.28s cubic-bezier(0.22, 1, 0.36, 1),
                  border-color 0.3s;
    }
    .stock-card:hover {
      transform: translateY(-4px) scale(1.005);
      box-shadow: 0 12px 40px rgba(10,20,50,0.12), 0 4px 12px rgba(10,20,50,0.06);
      border-color: var(--grey-200);
    }
    .stock-card:active { transform: translateY(-1px) scale(0.998); }

    /* ── GLASS SIDEBAR ── */
    .sidebar {
      background: linear-gradient(180deg, rgba(10,24,40,0.97) 0%, rgba(6,15,30,0.99) 100%);
      backdrop-filter: blur(16px);
      -webkit-backdrop-filter: blur(16px);
    }
    .sidebar::-webkit-scrollbar-thumb { background: rgba(245,200,66,0.2); }
    .sidebar::-webkit-scrollbar-thumb:hover { background: rgba(245,200,66,0.35); }

    /* ── BUTTON MICRO-INTERACTIONS ── */
    .btn { transition: all 0.18s cubic-bezier(0.22, 1, 0.36, 1); }
    .btn:active { transform: translateY(0) scale(0.97); }
    .btn-navy:hover {
      background: var(--navy-600);
      transform: translateY(-2px);
      box-shadow: 0 6px 20px rgba(10,34,74,0.3);
    }

    /* ── NUMBER TRANSITION ── */
    .num-transition {
      display: inline-block;
      transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.2s;
    }
    .num-bump-up {
      animation: numBumpUp 0.4s cubic-bezier(0.22, 1, 0.36, 1);
    }
    .num-bump-down {
      animation: numBumpDown 0.4s cubic-bezier(0.22, 1, 0.36, 1);
    }
    @keyframes numBumpUp {
      0%   { transform: translateY(0); }
      30%  { transform: translateY(-4px); color: var(--green-500); }
      100% { transform: translateY(0); }
    }
    @keyframes numBumpDown {
      0%   { transform: translateY(0); }
      30%  { transform: translateY(4px); color: var(--red-500); }
      100% { transform: translateY(0); }
    }

    /* ── ALERT RIPPLE ── */
    @keyframes alertRipple {
      0%   { box-shadow: 0 0 0 0 rgba(239,68,68,0.3); }
      50%  { box-shadow: 0 0 0 12px rgba(239,68,68,0); }
      100% { box-shadow: 0 0 0 0 rgba(239,68,68,0); }
    }
    @keyframes alertRippleGreen {
      0%   { box-shadow: 0 0 0 0 rgba(52,211,153,0.3); }
      50%  { box-shadow: 0 0 0 12px rgba(52,211,153,0); }
      100% { box-shadow: 0 0 0 0 rgba(52,211,153,0); }
    }
    .stock-card.alert-high {
      animation: alertRipple 0.7s ease 3, alertFlash 0.55s ease 3;
    }
    .stock-card.alert-low {
      animation: alertRippleGreen 0.7s ease 3, alertFlash 0.55s ease 3;
    }

    /* ── ALERT INPUT GLOW ── */
    .alert-input:focus {
      border-color: var(--navy-500);
      box-shadow: 0 0 0 3px rgba(30,62,96,0.15);
      background: var(--bg-card);
    }

    /* ── PAGE TRANSITIONS (merged into main .page rule above) ── */

    /* ── NAV LINK TRANSITION ── */
    .nav-link {
      transition: all 0.22s cubic-bezier(0.22, 1, 0.36, 1);
      position: relative;
    }
    .nav-link::before {
      content: '';
      position: absolute;
      left: 0; top: 0; bottom: 0;
      width: 3px;
      background: var(--gold-500);
      transform: scaleY(0);
      transition: transform 0.22s cubic-bezier(0.22, 1, 0.36, 1);
      border-radius: 0 3px 3px 0;
    }
    .nav-link.active::before { transform: scaleY(1); }
    .nav-link.active { border-left-color: transparent; }

    /* ── CARD PRICE EMPHASIS ── */
    .card-price {
      font-size: 38px;
      font-weight: 500;
      letter-spacing: -0.04em;
      transition: color 0.3s;
    }
    .card-name {
      font-size: 11.5px;
      color: var(--grey-300);
      letter-spacing: 0.02em;
    }

    /* ── WATCHLIST ITEM HOVER ── */
    .wl-item {
      transition: all 0.18s cubic-bezier(0.22, 1, 0.36, 1);
      border-radius: 6px;
      margin: 0 8px;
      padding: 9px 10px;
    }
    .wl-item:hover {
      background: rgba(245,200,66,0.05);
      transform: translateX(3px);
    }

    /* ── SIDE PANELS ── */
    .side-panel {
      width: 200px; flex-shrink: 0;
      align-self: flex-start;
      position: sticky; top: var(--header-h);
      height: calc(100vh - var(--header-h));
      overflow-y: auto; padding: 16px 12px;
      display: flex; flex-direction: column; gap: 16px;
      z-index: 1;
    }
    .side-panel-left { order: 1; }
    .side-panel-right { order: 3; }
    .footer { order: 4; width: 100%; }

    .panel-section {
      background: var(--bg-card); border: 1px solid var(--border-card);
      border-radius: var(--r-md); padding: 14px; box-shadow: var(--shadow-sm);
    }
    .panel-title {
      font-family: 'IBM Plex Sans', sans-serif; font-weight: 700;
      font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase;
      color: var(--text-secondary); margin-bottom: 10px;
    }
    .panel-ad-placeholder {
      display: flex; flex-direction: column; align-items: center;
      padding: 20px 10px; border: 2px dashed var(--border-card);
      border-radius: var(--r-sm); text-align: center;
    }
    .panel-ad-label {
      font-size: 10px; font-weight: 700; letter-spacing: 0.12em;
      text-transform: uppercase; color: var(--text-muted); margin-bottom: 8px;
    }
    .panel-ad-box {
      font-family: 'IBM Plex Mono', monospace; font-size: 11px;
      color: var(--text-muted); padding: 40px 10px;
      border: 1px solid var(--border-card); border-radius: 4px;
      width: 100%;
    }
    /* ── NSK TAX AD ── */
    .nsk-ad {
      background: var(--navy-800); border-color: var(--navy-600);
      text-align: center; padding: 24px 16px 20px; position: relative; overflow: hidden;
    }
    .nsk-ad-accent {
      position: absolute; top: 0; left: 0; right: 0; height: 3px;
      background: linear-gradient(90deg, var(--gold-400), var(--gold-600));
    }
    .nsk-ad-headline {
      font-family: 'Syne', sans-serif; font-weight: 700; font-size: 16px;
      color: var(--gold-400); margin-bottom: 8px; line-height: 1.3;
    }
    .nsk-ad-body {
      font-size: 13px; color: rgba(255,255,255,0.55); line-height: 1.5; margin-bottom: 12px;
    }
    .nsk-ad-cta {
      font-size: 13px; font-weight: 600; color: rgba(255,255,255,0.8); margin-bottom: 16px; line-height: 1.4;
    }
    .nsk-ad-email {
      display: inline-block; font-family: 'IBM Plex Mono', monospace; font-size: 11px;
      color: var(--gold-300); text-decoration: none; padding: 6px 14px;
      border: 1px solid rgba(245,200,66,0.25); border-radius: 6px;
      transition: all 0.18s; margin-bottom: 10px;
    }
    .nsk-ad-email:hover { background: rgba(245,200,66,0.1); border-color: var(--gold-400); }
    .nsk-ad-brand {
      font-size: 10px; font-weight: 700; letter-spacing: 0.12em;
      text-transform: uppercase; color: rgba(255,255,255,0.2);
    }
    .panel-news-item {
      display: flex; align-items: flex-start; gap: 8px;
      padding: 6px 0; font-size: 12px; color: var(--text-secondary);
      line-height: 1.4; border-bottom: 1px solid var(--border-card);
    }
    .panel-news-item:last-child { border-bottom: none; }
    .panel-news-dot {
      width: 5px; height: 5px; border-radius: 50%;
      background: var(--gold-500); flex-shrink: 0; margin-top: 5px;
    }
    .panel-trending-item {
      display: flex; justify-content: space-between; align-items: center;
      padding: 6px 0; border-bottom: 1px solid var(--border-card);
    }
    .panel-trending-item:last-child { border-bottom: none; }
    .panel-trending-sym {
      font-family: 'IBM Plex Sans', sans-serif; font-weight: 700;
      font-size: 13px; color: var(--text-primary);
    }
    .panel-trending-chg {
      font-family: 'IBM Plex Mono', monospace; font-size: 11px; font-weight: 600;
    }
    .panel-trending-chg.up { color: var(--green-500); }
    .panel-trending-chg.down { color: var(--red-500); }

    /* ── USER DASHBOARD ── */
    .user-add-row {
      display: flex; gap: 10px; margin-bottom: 18px; align-items: flex-start;
    }
    .search-wrap {
      flex: 1; position: relative;
    }
    .search-dropdown {
      display: none; position: absolute; top: 100%; left: 0; right: 0;
      background: var(--bg-card); border: 1px solid var(--border-card);
      border-top: none; border-radius: 0 0 var(--r-sm) var(--r-sm);
      box-shadow: var(--shadow-md); z-index: 100; max-height: 240px;
      overflow-y: auto;
    }
    .search-dropdown.open { display: block; }
    .search-result {
      display: flex; align-items: center; gap: 10px;
      padding: 10px 14px; cursor: pointer; transition: background 0.12s;
      border-bottom: 1px solid var(--border-card);
    }
    .search-result:last-child { border-bottom: none; }
    .search-result:hover, .search-result.highlighted {
      background: var(--bg-card-alt);
    }
    .search-result-sym {
      font-family: 'IBM Plex Sans', sans-serif; font-weight: 700;
      font-size: 14px; color: var(--text-primary); min-width: 60px;
    }
    .search-result-name {
      font-size: 12px; color: var(--text-secondary); flex: 1;
      overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
    }
    .search-loading, .search-empty {
      padding: 14px; text-align: center; font-size: 12px;
      color: var(--text-secondary); font-style: italic;
    }

    .user-discover {
      display: flex; align-items: center; gap: 10px;
      margin-bottom: 18px; flex-wrap: wrap;
    }
    .discover-chips {
      display: flex; gap: 6px; flex-wrap: wrap;
    }
    .discover-chip {
      font-family: 'IBM Plex Sans', sans-serif; font-size: 12px; font-weight: 600;
      padding: 5px 12px; border-radius: 99px; cursor: pointer;
      border: 1px solid var(--border-card); background: var(--bg-card);
      color: var(--text-primary); transition: all 0.15s;
    }
    .discover-chip:hover {
      border-color: var(--gold-500); color: var(--gold-500);
      background: rgba(245,200,66,0.06);
    }

    .user-empty-state {
      text-align: center; padding: 60px 20px;
      display: flex; flex-direction: column; align-items: center; gap: 10px;
    }
    .user-empty-state .empty-icon { font-size: 48px; margin-bottom: 8px; }
    .user-empty-state h3 {
      font-family: 'IBM Plex Sans', sans-serif; font-size: 20px;
      font-weight: 700; color: var(--text-primary);
    }
    .user-empty-state p {
      font-size: 14px; color: var(--text-secondary); max-width: 400px;
    }

    .card-remove-btn {
      width: 26px; height: 26px; border-radius: 6px;
      border: 1px solid rgba(239,68,68,0.2); background: var(--red-bg);
      color: var(--red-500); cursor: pointer;
      display: flex; align-items: center; justify-content: center;
      font-size: 16px; line-height: 1; transition: all 0.15s;
    }
    .card-remove-btn:hover { background: var(--red-500); color: white; border-color: var(--red-500); }

    /* ── RESPONSIVE ── */
    @media (max-width: 1400px) {
      .side-panel-left { display: none; }
    }
    @media (max-width: 1100px) {
      .side-panel-left, .side-panel-right { display: none; }
      .stats-row { grid-template-columns: repeat(2, 1fr); }
      .settings-layout { grid-template-columns: 1fr; }
    }
    @media (max-width: 768px) {
      .sidebar { transform: translateX(-100%); }
      .app-body { margin-left: 0; }
      .logo-wrap { width: auto; border-right: none; padding: 0 14px; }
      .hamburger { display: flex; }
      .header-center { padding: 0 10px; gap: 10px; }
      .countdown-wrap { display: none; }
      .page-wrap { padding: 16px 14px 40px; }
      .stats-row { grid-template-columns: repeat(2, 1fr); gap: 10px; }
      .stock-grid { gap: 14px; }
      .stock-card.hero-card .card-chart { height: 250px; }
      .stock-card.hero-card .card-price { font-size: 32px; }
      .page-hd { flex-direction: column; gap: 12px; }
      .stock-card:hover { transform: none; box-shadow: var(--shadow-sm); }
      .alert-display { font-size: 18px; padding: 4px 0; min-width: 90px; }
      .alert-input { font-size: 17px; padding: 6px 10px; width: 120px; }
      .alert-cell { padding: 16px 20px; }
      .card-price { font-size: 32px; }
    }
    @media (max-width: 480px) {
      .clock-display { display: none; }
      .alerts-btn span { display: none; }
      .stat-card { padding: 14px 16px; }
      .stat-val { font-size: 24px; }
      .card-price { font-size: 28px; }
    }
