    /* ==========================================================================
       CRYPTOALGOBOT QUANT TERMINAL — INSTITUTIONAL DESIGN TOKENS
       ========================================================================== */
    :root, [data-theme="volt"] {
      --bg-dark: #04060a;
      --bg-card: rgba(10, 14, 23, 0.90);
      --bg-card-hover: rgba(15, 22, 36, 0.96);
      --bg-panel-elevated: #0d1424;
      --border-subtle: rgba(255, 255, 255, 0.08);
      --border-focus: rgba(198, 255, 0, 0.6);
      --border-accent: rgba(198, 255, 0, 0.3);
      --accent: #c6ff00;
      --accent-glow: rgba(198, 255, 0, 0.22);
      --gold: #c6ff00;
      --gold-glow: rgba(198, 255, 0, 0.25);
      --green: #00f090;
      --green-glow: rgba(0, 240, 144, 0.25);
      --red: #ff2a55;
      --red-glow: rgba(255, 42, 85, 0.25);
      --blue: #00e5ff;
      --blue-glow: rgba(0, 229, 255, 0.25);
      --text-main: #f0f4fc;
      --text-muted: #8899b3;
      --text-dim: #4d5f78;
      --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
      --font-mono: 'JetBrains Mono', 'SF Mono', Consolas, monospace;
      --radius-sm: 4px;
      --radius-md: 6px;
      --radius-lg: 8px;
    }

    [data-theme="cobalt"] {
      --bg-dark: #040914;
      --bg-card: rgba(8, 16, 32, 0.90);
      --bg-card-hover: rgba(12, 24, 48, 0.96);
      --bg-panel-elevated: #0c1c38;
      --border-subtle: rgba(0, 229, 255, 0.12);
      --border-focus: rgba(0, 229, 255, 0.65);
      --border-accent: rgba(0, 229, 255, 0.3);
      --accent: #00e5ff;
      --accent-glow: rgba(0, 229, 255, 0.25);
      --gold: #00e5ff;
      --gold-glow: rgba(0, 229, 255, 0.25);
      --green: #00f090;
      --green-glow: rgba(0, 240, 144, 0.25);
      --red: #ff2a55;
      --red-glow: rgba(255, 42, 85, 0.25);
      --blue: #3b82f6;
      --blue-glow: rgba(59, 130, 246, 0.25);
      --text-main: #f0f8ff;
      --text-muted: #88a8d0;
      --text-dim: #49688f;
    }

    [data-theme="matrix"] {
      --bg-dark: #020b06;
      --bg-card: rgba(4, 18, 12, 0.90);
      --bg-card-hover: rgba(8, 28, 18, 0.96);
      --bg-panel-elevated: #082417;
      --border-subtle: rgba(0, 240, 144, 0.12);
      --border-focus: rgba(0, 240, 144, 0.65);
      --border-accent: rgba(0, 240, 144, 0.3);
      --accent: #00f090;
      --accent-glow: rgba(0, 240, 144, 0.25);
      --gold: #00f090;
      --gold-glow: rgba(0, 240, 144, 0.25);
      --green: #00f090;
      --green-glow: rgba(0, 240, 144, 0.25);
      --red: #ff2a55;
      --red-glow: rgba(255, 42, 85, 0.25);
      --blue: #00e5ff;
      --blue-glow: rgba(0, 229, 255, 0.25);
      --text-main: #e8faf2;
      --text-muted: #82bfa2;
      --text-dim: #3f7359;
    }

    [data-theme="slate"] {
      --bg-dark: #0b0d12;
      --bg-card: rgba(18, 21, 28, 0.90);
      --bg-card-hover: rgba(26, 31, 42, 0.96);
      --bg-panel-elevated: #202636;
      --border-subtle: rgba(255, 255, 255, 0.1);
      --border-focus: rgba(245, 166, 35, 0.65);
      --border-accent: rgba(245, 166, 35, 0.3);
      --accent: #f5a623;
      --accent-glow: rgba(245, 166, 35, 0.25);
      --gold: #f5a623;
      --gold-glow: rgba(245, 166, 35, 0.25);
      --green: #00f090;
      --green-glow: rgba(0, 240, 144, 0.25);
      --red: #ff2a55;
      --red-glow: rgba(255, 42, 85, 0.25);
      --blue: #00e5ff;
      --blue-glow: rgba(0, 229, 255, 0.25);
      --text-main: #f4f5f8;
      --text-muted: #9ba3b5;
      --text-dim: #5c6478;
    }

    [data-theme="daylight"], [data-theme="light"] {
      --bg-dark: #f0f4f9;
      --bg-card: #ffffff;
      --bg-card-hover: #f8fafc;
      --bg-panel-elevated: #e9eef6;
      --bg-nav: rgba(255, 255, 255, 0.94);
      --border-subtle: rgba(15, 23, 42, 0.09);
      --border-focus: rgba(37, 99, 235, 0.65);
      --border-accent: rgba(37, 99, 235, 0.35);
      --accent: #2563eb;
      --accent-glow: rgba(37, 99, 235, 0.16);
      --gold: #d97706;
      --gold-glow: rgba(217, 119, 6, 0.18);
      --green: #059669;
      --green-glow: rgba(5, 150, 105, 0.18);
      --red: #dc2626;
      --red-glow: rgba(220, 38, 38, 0.18);
      --blue: #0284c7;
      --blue-glow: rgba(2, 132, 199, 0.18);
      --text-main: #0f172a;
      --text-muted: #475569;
      --text-dim: #64748b;
      --btn-gold-text: #ffffff;
      --shadow-card: 0 4px 18px rgba(15, 23, 42, 0.06);
    }

    [data-theme="paper"] {
      --bg-dark: #fbf9f4;
      --bg-card: #ffffff;
      --bg-card-hover: #f7f4ec;
      --bg-panel-elevated: #efe9dc;
      --bg-nav: rgba(251, 249, 244, 0.96);
      --border-subtle: rgba(70, 50, 30, 0.10);
      --border-focus: rgba(180, 83, 9, 0.65);
      --border-accent: rgba(180, 83, 9, 0.35);
      --accent: #b45309;
      --accent-glow: rgba(180, 83, 9, 0.16);
      --gold: #b45309;
      --gold-glow: rgba(180, 83, 9, 0.18);
      --green: #15803d;
      --green-glow: rgba(21, 128, 61, 0.18);
      --red: #b91c1c;
      --red-glow: rgba(185, 28, 28, 0.18);
      --blue: #0369a1;
      --blue-glow: rgba(3, 105, 161, 0.18);
      --text-main: #1c1917;
      --text-muted: #57534e;
      --text-dim: #78716c;
      --btn-gold-text: #ffffff;
      --shadow-card: 0 4px 18px rgba(70, 50, 30, 0.05);
    }

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

    /* Custom Scrollbars */
    ::-webkit-scrollbar { width: 6px; height: 6px; }
    ::-webkit-scrollbar-track { background: var(--bg-dark); }
    ::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, 0.12); border-radius: 3px; }
    ::-webkit-scrollbar-thumb:hover { background: var(--accent); }

    body {
      background-color: var(--bg-dark);
      background-image: 
        linear-gradient(rgba(255, 255, 255, 0.015) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.015) 1px, transparent 1px),
        radial-gradient(circle at 12% 10%, var(--accent-glow) 0%, transparent 45%),
        radial-gradient(circle at 88% 85%, var(--blue-glow) 0%, transparent 45%);
      background-size: 32px 32px, 32px 32px, 100% 100%, 100% 100%;
      background-attachment: fixed;
      color: var(--text-main);
      font-family: var(--font-sans);
      min-height: 100vh;
      overflow-x: hidden;
      display: flex;
      flex-direction: column;
      -webkit-font-smoothing: antialiased;
    }

    /* LIGHT MODE ADAPTATION RULES */
    html[data-theme="daylight"] body,
    html[data-theme="light"] body,
    html[data-theme="paper"] body {
      background-image: 
        linear-gradient(rgba(15, 23, 42, 0.035) 1px, transparent 1px),
        linear-gradient(90deg, rgba(15, 23, 42, 0.035) 1px, transparent 1px),
        radial-gradient(circle at 12% 10%, var(--accent-glow) 0%, transparent 45%),
        radial-gradient(circle at 88% 85%, var(--blue-glow) 0%, transparent 45%);
    }

    html[data-theme="daylight"] ::-webkit-scrollbar-thumb,
    html[data-theme="light"] ::-webkit-scrollbar-thumb,
    html[data-theme="paper"] ::-webkit-scrollbar-thumb {
      background: rgba(15, 23, 42, 0.18);
    }

    html[data-theme="daylight"] .master-header,
    html[data-theme="light"] .master-header,
    html[data-theme="paper"] .master-header,
    html[data-theme="daylight"] .navbar,
    html[data-theme="light"] .navbar,
    html[data-theme="paper"] .navbar {
      background: var(--bg-nav, rgba(255, 255, 255, 0.96));
      border-bottom: 1px solid #e2e8f0;
      box-shadow: 0 1px 4px rgba(15, 23, 42, 0.06);
    }

    html[data-theme="daylight"] .nav-toolbar,
    html[data-theme="light"] .nav-toolbar,
    html[data-theme="paper"] .nav-toolbar {
      background: rgba(248, 250, 252, 0.96);
      border-bottom: 1px solid #e2e8f0;
    }

    html[data-theme="daylight"] .user-dropdown-popover,
    html[data-theme="light"] .user-dropdown-popover,
    html[data-theme="paper"] .user-dropdown-popover,
    html[data-theme="daylight"] .mobile-drawer,
    html[data-theme="light"] .mobile-drawer,
    html[data-theme="paper"] .mobile-drawer {
      background: #ffffff;
      border: 1px solid #cbd5e1;
      box-shadow: 0 16px 40px rgba(15, 23, 42, 0.15);
    }

    html[data-theme="daylight"] .theme-menu,
    html[data-theme="light"] .theme-menu,
    html[data-theme="paper"] .theme-menu {
      background: #ffffff;
      border: 1px solid #cbd5e1;
      box-shadow: 0 12px 30px rgba(15, 23, 42, 0.12);
    }

    html[data-theme="daylight"] .brand-text,
    html[data-theme="light"] .brand-text,
    html[data-theme="paper"] .brand-text {
      color: var(--text-main);
    }

    html[data-theme="daylight"] .card,
    html[data-theme="light"] .card,
    html[data-theme="paper"] .card {
      background: var(--bg-card);
      box-shadow: var(--shadow-card, 0 2px 12px rgba(15, 23, 42, 0.05));
    }

    html[data-theme="daylight"] .metric-card,
    html[data-theme="light"] .metric-card,
    html[data-theme="paper"] .metric-card {
      background: var(--bg-card);
      box-shadow: 0 2px 8px rgba(15, 23, 42, 0.04);
    }

    html[data-theme="daylight"] .tent-box,
    html[data-theme="light"] .tent-box,
    html[data-theme="paper"] .tent-box {
      background: var(--bg-card);
    }

    html[data-theme="daylight"] .modal-box,
    html[data-theme="light"] .modal-box,
    html[data-theme="paper"] .modal-box,
    html[data-theme="daylight"] .auth-card,
    html[data-theme="light"] .auth-card,
    html[data-theme="paper"] .auth-card {
      background: #ffffff;
      color: var(--text-main);
      border-color: rgba(15, 23, 42, 0.12);
      box-shadow: 0 20px 45px rgba(15, 23, 42, 0.15);
    }

    html[data-theme="daylight"] .modal-overlay,
    html[data-theme="light"] .modal-overlay,
    html[data-theme="paper"] .modal-overlay,
    html[data-theme="daylight"] .auth-overlay,
    html[data-theme="light"] .auth-overlay,
    html[data-theme="paper"] .auth-overlay {
      background: rgba(15, 23, 42, 0.45);
    }

    html[data-theme="daylight"] .form-input,
    html[data-theme="daylight"] .form-select,
    html[data-theme="light"] .form-input,
    html[data-theme="light"] .form-select,
    html[data-theme="paper"] .form-input,
    html[data-theme="paper"] .form-select {
      background: #ffffff;
      color: var(--text-main);
      border-color: #cbd5e1;
    }

    html[data-theme="daylight"] .form-select option,
    html[data-theme="light"] .form-select option,
    html[data-theme="paper"] .form-select option {
      background: #ffffff;
      color: #0f172a;
    }

    html[data-theme="daylight"] .theme-menu,
    html[data-theme="light"] .theme-menu,
    html[data-theme="paper"] .theme-menu {
      background: #ffffff;
      border-color: #cbd5e1;
      box-shadow: 0 10px 30px rgba(15, 23, 42, 0.12);
    }

    html[data-theme="daylight"] .theme-option:hover,
    html[data-theme="light"] .theme-option:hover,
    html[data-theme="paper"] .theme-option:hover {
      background: #f1f5f9;
      color: var(--text-main);
    }

    html[data-theme="daylight"] .theme-option.active,
    html[data-theme="light"] .theme-option.active,
    html[data-theme="paper"] .theme-option.active {
      background: #e2e8f0;
      color: var(--text-main);
    }

    html[data-theme="daylight"] .btn-outline,
    html[data-theme="light"] .btn-outline,
    html[data-theme="paper"] .btn-outline {
      background: #ffffff;
      border-color: #cbd5e1;
      color: var(--text-main);
    }

    html[data-theme="daylight"] .btn-outline:hover,
    html[data-theme="light"] .btn-outline:hover,
    html[data-theme="paper"] .btn-outline:hover {
      background: #f8fafc;
      border-color: #94a3b8;
      color: var(--text-main);
    }

    html[data-theme="daylight"] .btn-gold,
    html[data-theme="light"] .btn-gold,
    html[data-theme="paper"] .btn-gold {
      color: #ffffff;
    }

    html[data-theme="daylight"] .nav-tabs,
    html[data-theme="light"] .nav-tabs,
    html[data-theme="paper"] .nav-tabs {
      background: #e2e8f0;
      border-color: #cbd5e1;
    }

    html[data-theme="daylight"] .nav-tab-btn,
    html[data-theme="light"] .nav-tab-btn,
    html[data-theme="paper"] .nav-tab-btn {
      color: #475569;
    }

    html[data-theme="daylight"] .nav-tab-btn:hover,
    html[data-theme="light"] .nav-tab-btn:hover,
    html[data-theme="paper"] .nav-tab-btn:hover {
      color: #0f172a;
      background: rgba(255, 255, 255, 0.6);
    }

    html[data-theme="daylight"] .nav-tab-btn.active,
    html[data-theme="light"] .nav-tab-btn.active,
    html[data-theme="paper"] .nav-tab-btn.active {
      background: var(--accent) !important;
      color: #ffffff !important;
    }

    html[data-theme="daylight"] .nav-tab-btn.active span,
    html[data-theme="light"] .nav-tab-btn.active span,
    html[data-theme="paper"] .nav-tab-btn.active span {
      color: #ffffff !important;
    }

    html[data-theme="daylight"] .custom-table th,
    html[data-theme="light"] .custom-table th,
    html[data-theme="paper"] .custom-table th {
      background: #f8fafc;
      color: #475569;
      border-bottom: 1px solid #e2e8f0;
    }

    html[data-theme="daylight"] .custom-table td,
    html[data-theme="light"] .custom-table td,
    html[data-theme="paper"] .custom-table td {
      border-bottom: 1px solid #e2e8f0;
      color: var(--text-main);
    }

    html[data-theme="daylight"] .custom-table tr:hover td,
    html[data-theme="light"] .custom-table tr:hover td,
    html[data-theme="paper"] .custom-table tr:hover td {
      background: #f1f5f9;
    }

    /* Invert hardcoded dark container styles in light theme */
    html[data-theme="daylight"] [style*="background: rgba(10, 14, 24"],
    html[data-theme="daylight"] [style*="background: rgba(10, 14, 23"],
    html[data-theme="daylight"] [style*="background: rgba(15, 20, 32"],
    html[data-theme="daylight"] [style*="background: rgba(6, 9, 15"],
    html[data-theme="light"] [style*="background: rgba(10, 14, 24"],
    html[data-theme="light"] [style*="background: rgba(10, 14, 23"],
    html[data-theme="light"] [style*="background: rgba(15, 20, 32"],
    html[data-theme="light"] [style*="background: rgba(6, 9, 15"],
    html[data-theme="paper"] [style*="background: rgba(10, 14, 24"],
    html[data-theme="paper"] [style*="background: rgba(10, 14, 23"],
    html[data-theme="paper"] [style*="background: rgba(15, 20, 32"],
    html[data-theme="paper"] [style*="background: rgba(6, 9, 15"] {
      background: var(--bg-panel-elevated) !important;
      border-color: var(--border-subtle) !important;
    }

    html[data-theme="daylight"] [style*="color: #fff"],
    html[data-theme="daylight"] [style*="color: rgb(255, 255, 255)"],
    html[data-theme="light"] [style*="color: #fff"],
    html[data-theme="light"] [style*="color: rgb(255, 255, 255)"],
    html[data-theme="paper"] [style*="color: #fff"],
    html[data-theme="paper"] [style*="color: rgb(255, 255, 255)"] {
      color: var(--text-main) !important;
    }

    /* TOP BAR CONTROLS IN LIGHT / PAPER THEMES */
    html[data-theme="daylight"] .theme-btn,
    html[data-theme="light"] .theme-btn,
    html[data-theme="paper"] .theme-btn {
      background: #ffffff;
      border: 1px solid #cbd5e1;
      color: #334155;
    }

    html[data-theme="daylight"] .theme-btn:hover,
    html[data-theme="light"] .theme-btn:hover,
    html[data-theme="paper"] .theme-btn:hover {
      background: #f1f5f9;
      border-color: var(--accent);
      color: var(--accent) !important;
    }

    html[data-theme="daylight"] .btn-util-toggle,
    html[data-theme="light"] .btn-util-toggle,
    html[data-theme="paper"] .btn-util-toggle,
    html[data-theme="daylight"] .btn-util-theme,
    html[data-theme="light"] .btn-util-theme,
    html[data-theme="paper"] .btn-util-theme,
    html[data-theme="daylight"] .user-profile-pill,
    html[data-theme="light"] .user-profile-pill,
    html[data-theme="paper"] .user-profile-pill,
    html[data-theme="daylight"] .mobile-menu-toggle,
    html[data-theme="light"] .mobile-menu-toggle,
    html[data-theme="paper"] .mobile-menu-toggle,
    html[data-theme="daylight"] .btn-day-night,
    html[data-theme="light"] .btn-day-night,
    html[data-theme="paper"] .btn-day-night {
      background: #ffffff;
      border: 1px solid #cbd5e1;
      color: #1e293b;
    }

    html[data-theme="daylight"] .user-profile-pill:hover,
    html[data-theme="light"] .user-profile-pill:hover,
    html[data-theme="paper"] .user-profile-pill:hover,
    html[data-theme="daylight"] .btn-util-toggle:hover,
    html[data-theme="light"] .btn-util-toggle:hover,
    html[data-theme="paper"] .btn-util-toggle:hover,
    html[data-theme="daylight"] .btn-util-theme:hover,
    html[data-theme="light"] .btn-util-theme:hover,
    html[data-theme="paper"] .btn-util-theme:hover,
    html[data-theme="daylight"] .btn-day-night:hover,
    html[data-theme="light"] .btn-day-night:hover,
    html[data-theme="paper"] .btn-day-night:hover {
      background: #eff6ff;
      border-color: var(--accent);
      color: var(--accent) !important;
    }

    html[data-theme="daylight"] .fuel-badge-pill,
    html[data-theme="light"] .fuel-badge-pill,
    html[data-theme="paper"] .fuel-badge-pill {
      background: #ecfdf5;
      border: 1px solid #a7f3d0;
      color: #059669;
    }

    html[data-theme="daylight"] .user-popover-fuel,
    html[data-theme="light"] .user-popover-fuel,
    html[data-theme="paper"] .user-popover-fuel {
      background: #f8fafc;
      border: 1px solid #e2e8f0;
    }

    html[data-theme="daylight"] .user-action-item,
    html[data-theme="light"] .user-action-item,
    html[data-theme="paper"] .user-action-item {
      color: #334155;
    }

    html[data-theme="daylight"] .user-action-item:hover,
    html[data-theme="light"] .user-action-item:hover,
    html[data-theme="paper"] .user-action-item:hover {
      background: #f1f5f9;
      color: #0f172a;
    }

    html[data-theme="daylight"] .mobile-user-card,
    html[data-theme="light"] .mobile-user-card,
    html[data-theme="paper"] .mobile-user-card {
      background: #f8fafc;
      border: 1px solid #e2e8f0;
    }

    html[data-theme="daylight"] .mobile-nav-item,
    html[data-theme="light"] .mobile-nav-item,
    html[data-theme="paper"] .mobile-nav-item {
      color: #475569;
    }

    html[data-theme="daylight"] .mobile-nav-item:hover,
    html[data-theme="light"] .mobile-nav-item:hover,
    html[data-theme="paper"] .mobile-nav-item:hover {
      background: #f1f5f9;
      color: #0f172a;
    }

    html[data-theme="daylight"] .mobile-nav-item.active,
    html[data-theme="light"] .mobile-nav-item.active,
    html[data-theme="paper"] .mobile-nav-item.active {
      background: #2563eb !important;
      color: #ffffff !important;
    }

    html[data-theme="daylight"] .mobile-drawer-themes,
    html[data-theme="light"] .mobile-drawer-themes,
    html[data-theme="paper"] .mobile-drawer-themes {
      background: #f8fafc;
      border: 1px solid #e2e8f0;
    }

    html[data-theme="daylight"] .chip-theme,
    html[data-theme="light"] .chip-theme,
    html[data-theme="paper"] .chip-theme {
      background: #ffffff;
      border: 1px solid #cbd5e1;
      color: #334155;
    }

    html[data-theme="daylight"] .btn-logout,
    html[data-theme="light"] .btn-logout,
    html[data-theme="paper"] .btn-logout {
      background: #ffffff;
      border: 1px solid #cbd5e1;
      color: #64748b;
    }

    html[data-theme="daylight"] .btn-logout:hover,
    html[data-theme="light"] .btn-logout:hover,
    html[data-theme="paper"] .btn-logout:hover {
      background: #fef2f2;
      border-color: #fca5a5;
      color: #dc2626 !important;
    }

    html[data-theme="daylight"] .role-switch-btn,
    html[data-theme="light"] .role-switch-btn,
    html[data-theme="paper"] .role-switch-btn {
      background: #eff6ff;
      border: 1px solid #bfdbfe;
      color: var(--accent);
    }

    html[data-theme="daylight"] .role-switch-btn:hover,
    html[data-theme="light"] .role-switch-btn:hover,
    html[data-theme="paper"] .role-switch-btn:hover {
      background: var(--accent);
      border-color: var(--accent);
      color: #ffffff !important;
    }

    html[data-theme="daylight"] .fuel-badge,
    html[data-theme="light"] .fuel-badge,
    html[data-theme="paper"] .fuel-badge {
      background: #ecfdf5;
      border: 1px solid #a7f3d0;
      color: #059669;
    }

    html[data-theme="daylight"] .fuel-badge:hover,
    html[data-theme="light"] .fuel-badge:hover,
    html[data-theme="paper"] .fuel-badge:hover {
      background: #d1fae5;
      border-color: #059669;
      box-shadow: 0 2px 8px rgba(5, 150, 105, 0.2);
    }

    html[data-theme="daylight"] .system-heartbeat,
    html[data-theme="light"] .system-heartbeat,
    html[data-theme="paper"] .system-heartbeat {
      color: #64748b;
    }

    /* TOAST IN LIGHT / PAPER THEMES */
    html[data-theme="daylight"] .toast,
    html[data-theme="light"] .toast,
    html[data-theme="paper"] .toast {
      background: #ffffff !important;
      color: #0f172a !important;
      border: 1px solid #cbd5e1;
      box-shadow: 0 16px 45px rgba(15, 23, 42, 0.18) !important;
    }

    html[data-theme="daylight"] #toastMsg,
    html[data-theme="light"] #toastMsg,
    html[data-theme="paper"] #toastMsg {
      color: #0f172a !important;
    }



