        .tv-legend { text-shadow: none; }
        .legend-up .legend-open,
        .legend-up .legend-high,
        .legend-up .legend-low,
        .legend-up .legend-close,
        .legend-up .legend-vol {
            color: var(--signal-bull) !important;
        }

        .legend-down .legend-open,
        .legend-down .legend-high,
        .legend-down .legend-low,
        .legend-down .legend-close,
        .legend-down .legend-vol {
            color: var(--signal-bear) !important;
        }

        /* ============================================================
           ChartLoop — BLOOMBERG TERMINAL EDITION
           Black / Amber-Yellow — Dense Institutional Data Terminal
        ============================================================ */

        :root {
            /* True terminal black, not navy */
            --bg-color: #000000;
            --surface-color: #0A0A0A;
            --surface-elevated: #121212;
            --surface-high: #181818;

            /* Bloomberg amber/yellow */
            --accent-color: #FFC400;
            --accent-dim: rgba(255, 196, 0, 0.12);
            --accent-glow: rgba(255, 196, 0, 0.3);
            --accent-deep: #B38600;

            /* Signal colors — Bloomberg uses amber for up, cyan for down traditionally,
               but for INR retail clarity we keep green/red with amber as the brand accent */
            --signal-bull: #10B981;
            --signal-bear: #FF3B30;
            --signal-neutral: #6B6B6B;

            /* Hairline borders — sharp, high contrast on black */
            --border-color: rgba(255, 196, 0, 0.14);
            --border-mid: rgba(255, 196, 0, 0.28);
            --border-strong: rgba(255, 196, 0, 0.55);

            /* Typography */
            --text-primary: #F5F5F0;
            --text-secondary: #ABABA0;
            --text-muted: #5C5C54;
            --text-accent: #FFC400;

            --glass-bg: rgba(10, 10, 10, 0.96);
            --pod-bg: #0A0A0A;
        }

        body.light-theme {
            /* Modern SaaS / Fintech Light Theme — Soft Ice-Blue Canvas with Floating White Cards */
            --bg-color: #EEF3FB;
            /* Soft ice-blue wash page ground */
            --surface-color: #FFFFFF;
            /* Pure crisp white card & container surfaces */
            --surface-elevated: #F8FAFC;
            /* Subtle hover / elevated surface */
            --surface-high: #EBF2FC;
            /* Capsule pill track & interactive segment background */
            --accent-color: #2563EB;
            /* Vibrant modern SaaS / fintech royal blue */
            --accent-dim: rgba(37, 99, 235, 0.08);
            --accent-glow: rgba(37, 99, 235, 0.22);
            --accent-deep: #1D4ED8;
            /* Deep royal blue for active borders/states */
            --signal-bull: #16A34A;
            --signal-bear: #DC2626;
            --border-color: #E2E8F0;
            /* Subtle hairline slate border */
            --border-mid: #CBD5E1;
            --border-strong: #94A3B8;
            --text-primary: #0F172A;
            /* Deep charcoal navy text */
            --text-secondary: #475569;
            /* Slate 600 secondary text */
            --text-muted: #64748B;
            /* Slate 500 muted text */
            --text-accent: #2563EB;
            /* Modern royal blue accent */
            --glass-bg: rgba(255, 255, 255, 0.96);
            --pod-bg: #FFFFFF;
        }

        .theme-transition {
            transition: background-color 200ms ease, border-color 200ms ease !important;
        }

        body {
            background-color: var(--bg-color);
            color: var(--text-secondary);
            -webkit-tap-highlight-color: transparent;
            position: relative;
            min-height: 100vh;
            overflow-x: hidden;
            font-feature-settings: "tnum" 1, "zero" 1;
        }

        /* ── Terminal scanline + grid texture ── */
        body::before {
            content: "";
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            z-index: 0;
            pointer-events: none;
            background-image:
                linear-gradient(rgba(255, 196, 0, 0.035) 1px, transparent 1px),
                linear-gradient(90deg, rgba(255, 196, 0, 0.035) 1px, transparent 1px);
            background-size: 24px 24px;
            opacity: 1;
        }

        body.light-theme::before {
            background-image: radial-gradient(ellipse 80% 50% at 50% -20%, rgba(199, 222, 255, 0.45), transparent 70%);
            background-size: 100% 100%;
        }

        body>* {
            position: relative;
            z-index: 1;
        }

        /* ── Typography ── */
        .text-primary {
            color: var(--text-primary) !important;
        }

        .text-secondary {
            color: var(--text-secondary) !important;
        }

        .text-accent {
            color: var(--accent-color) !important;
        }

        .text-slate-100,
        .text-slate-300,
        .text-white {
            color: var(--text-primary);
        }

        .text-slate-500 {
            color: var(--text-secondary);
        }

        body.light-theme .text-slate-100,
        body.light-theme .text-slate-300,
        body.light-theme .text-white {
            color: var(--text-primary) !important;
        }

        .signal-up {
            color: var(--signal-bull) !important;
            font-weight: 700 !important;
        }

        .signal-down {
            color: var(--signal-bear) !important;
            font-weight: 700 !important;
        }

        .bg-background {
            background-color: var(--bg-color);
        }

        .bg-surface {
            background-color: var(--surface-color);
        }

        .border-border {
            border-color: var(--border-color);
        }

        .glass {
            background: var(--glass-bg);
            backdrop-filter: blur(16px);
        }

        /* ── Tactical / terminal card ── */
        .tactical-card {
            background: var(--pod-bg);
            border: 1px solid var(--border-color);
            position: relative;
        }

        .tactical-card::before {
            content: "";
            position: absolute;
            top: 0;
            left: 0;
            right: 0;
            height: 2px;
            background: repeating-linear-gradient(90deg, var(--accent-color) 0px, var(--accent-color) 6px, transparent 6px, transparent 10px);
            opacity: 0.7;
        }

        /* ── Dense data rows ── */
        /* Instant Touch & Click Engine (0ms tap delay) */
        button, a, select, input, [role="button"], .hud-pill-btn, .hud-action-btn, .index-tf-btn, .index-type-btn {
            touch-action: manipulation;
            -webkit-tap-highlight-color: transparent;
        }

        .hud-dock-bar {
            will-change: transform, opacity;
            backface-visibility: hidden;
        }

        /* ── Dense data rows ── */
        .card-anim {
            background-color: var(--surface-color) !important;
            border: 1px solid var(--border-color);
            cursor: pointer;
            contain: layout style;
            content-visibility: auto;
            contain-intrinsic-size: auto 56px;
            will-change: transform;
            transform: translateZ(0);
        }

        .card-anim.card-expanded {
            contain: layout style !important;
        }

        .card-anim.maze-card {
            contain: layout style !important;
            contain-intrinsic-size: auto 560px;
        }

        /* 1-Column Maze Mode: Vertically taller charts optimizing available screen space */
        .maze-cols-1 .maze-chart-container-pane {
            height: 540px;
        }

        @media (min-width: 768px) {
            .maze-cols-1 .maze-chart-container-pane {
                height: 600px;
            }

            .maze-cols-1 .card-anim.maze-card {
                contain-intrinsic-size: auto 700px;
            }
        }

        @media (min-width: 1280px) {
            .maze-cols-1 .maze-chart-container-pane {
                height: 650px;
            }

            .maze-cols-1 .card-anim.maze-card {
                contain-intrinsic-size: auto 750px;
            }
        }

        @media (min-width: 1536px) {
            .maze-cols-1 .maze-chart-container-pane {
                height: 690px;
            }

            .maze-cols-1 .card-anim.maze-card {
                contain-intrinsic-size: auto 790px;
            }
        }

        .card-anim:hover {
            border-color: var(--border-strong) !important;
            background-color: var(--surface-elevated) !important;
            box-shadow: inset 2px 0 0 var(--accent-color) !important;
        }

        .card-anim:active {
            background-color: var(--surface-high) !important;
        }

        body.dark .card-anim {
            background-color: var(--surface-color) !important;
            border-color: var(--border-color) !important;
        }

        /* ── Select / dropdown — terminal style ── */
        select {
            cursor: pointer;
            border: 1px solid var(--border-mid);
            background-color: var(--surface-elevated);
            color: var(--text-primary);
            border-radius: 2px;
        }

        select:hover,
        select:focus {
            border-color: var(--accent-color) !important;
            outline: none;
            box-shadow: 0 0 0 1px var(--accent-dim);
        }

        body.light-theme select {
            color: var(--text-primary) !important;
            border-color: var(--border-color) !important;
            background-color: #FFFFFF !important;
            border-radius: 6px !important;
        }

        body.light-theme select option {
            color: var(--text-primary) !important;
            background-color: #FFFFFF !important;
        }

        /* ── Primary action — Bloomberg function-key button ── */
        #scan-btn,
        #export-btn {
            position: relative;
            overflow: hidden;
            transition: all 0.1s linear !important;
            letter-spacing: 0.18em;
        }

        #scan-btn {
            background: var(--accent-color);
            color: #000000;
            border: 1px solid var(--accent-color);
            box-shadow: 0 0 0 1px rgba(255, 196, 0, 0.2), 0 4px 16px var(--accent-glow);
            font-weight: 800;
            border-radius: 2px;
        }

        #scan-btn:hover {
            background: #FFD43B;
            box-shadow: 0 0 0 1px rgba(255, 196, 0, 0.35), 0 4px 24px var(--accent-glow);
        }

        #scan-btn:active {
            background: var(--accent-deep) !important;
            transform: scale(0.99) !important;
        }

        body.light-theme #scan-btn {
            color: #FFFFFF !important;
            background: linear-gradient(135deg, #3B82F6 0%, #2563EB 100%) !important;
            border: 1px solid #2563EB !important;
            border-radius: 8px !important;
            box-shadow: 0 4px 14px rgba(37, 99, 235, 0.22) !important;
            font-weight: 700 !important;
            letter-spacing: 0.10em !important;
        }

        body.light-theme #scan-btn:hover {
            background: linear-gradient(135deg, #2563EB 0%, #1D4ED8 100%) !important;
            border-color: #1D4ED8 !important;
            box-shadow: 0 6px 18px rgba(37, 99, 235, 0.32) !important;
            transform: translateY(-1px) !important;
        }

        body.light-theme #scan-btn:active {
            transform: translateY(0px) scale(0.99) !important;
        }

        /* ── Strategy switcher — Bloomberg function tabs ── */
        #strategy-scanner,
        #strategy-momentum-open,
        #strategy-ipo-base {
            border: 1px solid var(--border-mid);
            background: var(--surface-color);
            border-radius: 2px !important;
            font-size: 10px !important;
            letter-spacing: 0.16em !important;
            flex: 1 1 0% !important;
            padding-top: 0.55rem !important;
            padding-bottom: 0.55rem !important;
            transition: all 0.12s linear !important;
            color: var(--text-muted);
        }

        #strategy-scanner:hover,
        #strategy-momentum-open:hover,
        #strategy-ipo-base:hover {
            border-color: var(--border-strong);
            color: var(--accent-color);
            background: var(--accent-dim);
        }

        /* ── Brand text ── */
        .brand-text {
            font-family: "Iceland", sans-serif;
            font-weight: 400;
            font-style: italic;
            letter-spacing: 5px;
            text-transform: uppercase;
        }

        @keyframes brand-pulse {
            from {
                text-shadow: 0 0 6px rgba(255, 196, 0, 0.3);
            }

            to {
                text-shadow: 0 0 20px rgba(255, 196, 0, 0.85), 0 0 40px rgba(255, 196, 0, 0.3);
            }
        }

        .brand-glow {
            animation: brand-pulse 2.4s ease-in-out infinite alternate;
        }

        @keyframes pulse-accent {

            0%,
            100% {
                opacity: 1;
                transform: scale(1);
            }

            50% {
                opacity: 0.4;
                transform: scale(1.2);
            }
        }

        .pulse-emerald {
            animation: pulse-accent 1.6s infinite;
        }

        /* ── Ticker tape marquee ── */
        @keyframes ticker-scroll {
            from {
                transform: translateX(0);
            }

            to {
                transform: translateX(-50%);
            }
        }

        .ticker-track {
            animation: ticker-scroll 55s linear infinite;
            white-space: nowrap;
            display: inline-flex;
        }

        .ticker-tape-wrap:hover .ticker-track {
            animation-play-state: paused;
        }

        /* ── Cyber checkbox ── */
        .cyber-checkbox {
            appearance: none;
            width: 13px;
            height: 13px;
            border: 1px solid var(--border-mid);
            border-radius: 1px;
            background: rgba(0, 0, 0, 0.4);
            cursor: pointer;
            position: relative;
            transition: all 0.12s linear;
            margin-right: 4px;
            vertical-align: middle;
            flex-shrink: 0;
        }

        .cyber-checkbox:checked {
            background: var(--accent-color);
            border-color: var(--accent-color);
            box-shadow: 0 0 6px var(--accent-color);
        }

        .cyber-checkbox:checked::after {
            content: "✓";
            position: absolute;
            top: 50%;
            left: 50%;
            transform: translate(-50%, -50%);
            color: #000000;
            font-size: 9px;
            font-weight: 900;
        }

        /* ── Theme toggle ── */
        .switch {
            position: relative;
            display: inline-flex;
            align-items: center;
            width: 44px;
            height: 22px;
            cursor: pointer;
            touch-action: manipulation;
            user-select: none;
        }

        .switch input {
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            opacity: 0;
            margin: 0;
            cursor: pointer;
            z-index: 5;
        }

        .slider {
            position: absolute;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background-color: #0A0A0A;
            border: 1px solid rgba(255, 196, 0, 0.4);
            border-radius: 4px;
            box-shadow: inset 0 1px 4px rgba(0, 0, 0, 0.8);
            transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
            pointer-events: none;
        }

        .slider:before {
            content: "";
            position: absolute;
            height: 14px;
            width: 14px;
            left: 3px;
            bottom: 3px;
            background: var(--accent-color);
            border-radius: 2px;
            box-shadow: 0 0 10px rgba(255, 196, 0, 0.4);
            transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
        }

        input:checked+.slider {
            background-color: var(--surface-elevated);
            border-color: rgba(255, 196, 0, 0.4);
        }

        input:checked+.slider:before {
            transform: translateX(22px);
            background: var(--accent-deep);
            box-shadow: 0 0 8px rgba(196, 143, 0, 0.4);
        }



        /* ── Section header mask ── */
        .section-header-mask {
            background: var(--bg-color);
            box-shadow: 0 0 12px 12px var(--bg-color);
            border-radius: 2px;
            padding: 5px 10px;
            z-index: 10;
            position: relative;
            margin-left: -10px;
        }

        body.light-theme .section-header-mask {
            background: var(--bg-color) !important;
            box-shadow: 0 0 12px 12px var(--bg-color) !important;
        }

        .section-header-mask h2,
        .section-header-mask div {
            font-weight: 700 !important;
        }

        /* ── ApexCharts tooltip override ── */
        .apexcharts-tooltip {
            background: transparent !important;
            border: none !important;
            box-shadow: none !important;
        }

        .tooltip-emerald {
            color: #0A7D3C !important;
        }

        .dark .tooltip-emerald {
            color: #00E676 !important;
        }

        .tooltip-rose {
            color: #C8102E !important;
        }

        .dark .tooltip-rose {
            color: #FF3B30 !important;
        }

        .tooltip-blue {
            color: #B38600 !important;
        }

        .dark .tooltip-blue {
            color: #FFC400 !important;
        }

        .tooltip-amber {
            color: #8A6800 !important;
        }

        .dark .tooltip-amber {
            color: #FFD43B !important;
        }

        .apexcharts-yaxistooltip {
            background: #000000 !important;
            border: 1px solid #FFC400 !important;
            color: #FFC400 !important;
            font-family: 'JetBrains Mono', monospace !important;
            font-size: 9px !important;
            font-weight: bold !important;
            border-radius: 2px !important;
            box-shadow: 0 4px 14px rgba(0, 0, 0, 0.8) !important;
        }

        body.light-theme .apexcharts-yaxistooltip {
            background: #ffffff !important;
            border: 1px solid #B38600 !important;
            color: #B38600 !important;
        }

        .apexcharts-yaxistooltip-right::before,
        .apexcharts-yaxistooltip-right::after {
            border-left-color: #FFC400 !important;
            border-right-color: #FFC400 !important;
        }

        .apexcharts-yaxistooltip-right::after {
            border-left-color: #000000 !important;
            border-right-color: #000000 !important;
        }

        body.light-theme .apexcharts-yaxistooltip-right::before {
            border-left-color: #B38600 !important;
        }

        body.light-theme .apexcharts-yaxistooltip-right::after {
            border-left-color: #ffffff !important;
        }

        .apexcharts-yaxis,
        .apexcharts-yaxis-texts-g text,
        .apexcharts-yaxis-label {
            cursor: ns-resize !important;
            pointer-events: all !important;
        }

        .dragging-y .apexcharts-tooltip,
        .dragging-y .apexcharts-x-crosshairs,
        .dragging-y .apexcharts-y-crosshairs,
        .dragging-y .apexcharts-yaxistooltip,
        .dragging-y .apexcharts-xcrosshairs,
        .dragging-y .apexcharts-ycrosshairs {
            display: none !important;
            opacity: 0 !important;
            visibility: hidden !important;
            pointer-events: none !important;
        }

        /* ── Score badge ── */
        .score-badge {
            background: var(--accent-dim);
            border: 1px solid rgba(255, 196, 0, 0.35);
            color: var(--accent-color);
            font-family: 'JetBrains Mono', monospace;
            font-weight: 800;
            border-radius: 2px;
        }

        body.light-theme .score-badge {
            background: rgba(179, 134, 0, 0.08) !important;
            border-color: rgba(179, 134, 0, 0.3) !important;
            color: #8A6800 !important;
        }



        /* isolation:isolate creates stacking context without GPU-promoting the whole list container */
        #signals-container {
            isolation: isolate;
        }

        /* ── Modern Fintech Light Theme Card & Control Overrides ── */
        body.light-theme .card-anim {
            background-color: #FFFFFF !important;
            border: 1px solid #E2E8F0 !important;
            border-radius: 12px !important;
            box-shadow:
                0 1px 3px rgba(37, 99, 235, 0.04),
                0 3px 12px rgba(15, 23, 42, 0.04) !important;
        }

        body.light-theme .card-anim:hover {
            background-color: #FFFFFF !important;
            border-color: #CBD5E1 !important;
            box-shadow:
                0 4px 16px -2px rgba(37, 99, 235, 0.08),
                0 2px 6px -1px rgba(15, 23, 42, 0.04) !important;
            transform: translateY(-1px);
        }

        body.light-theme .tactical-card {
            background: #FFFFFF !important;
            border: 1px solid #E2E8F0 !important;
            border-radius: 12px !important;
            box-shadow:
                0 1px 3px rgba(37, 99, 235, 0.04),
                0 4px 14px rgba(15, 23, 42, 0.03) !important;
        }

        body.light-theme #strategy-scanner,
        body.light-theme #strategy-momentum-open,
        body.light-theme #strategy-ipo-base {
            background-color: #F8FAFC !important;
            border-color: #E2E8F0 !important;
            color: var(--text-secondary) !important;
            border-radius: 6px !important;
        }

        body.light-theme #strategy-scanner:hover,
        body.light-theme #strategy-momentum-open:hover,
        body.light-theme #strategy-ipo-base:hover {
            border-color: #BFDBFE !important;
            color: #2563EB !important;
            background-color: #EBF2FC !important;
        }

        body.light-theme #strategy-scanner[style*="background-color: var(--accent-dim)"],
        body.light-theme #strategy-momentum-open[style*="background-color: var(--accent-dim)"],
        body.light-theme #strategy-ipo-base[style*="background-color: var(--accent-dim)"] {
            background-color: #EBF2FC !important;
            border-color: #BFDBFE !important;
            color: #1D4ED8 !important;
            box-shadow:
                0 1px 3px rgba(37, 99, 235, 0.12) !important;
            font-weight: 800 !important;
        }

        body.light-theme [id^="tf-buttons-"] button {
            color: #64748B !important;
        }

        body.light-theme [id^="tf-buttons-"] button:hover {
            color: #2563EB !important;
        }

        body.light-theme [id^="tf-buttons-"] button.bg-accent {
            background-color: #FFFFFF !important;
            color: #2563EB !important;
            border: 1px solid rgba(220, 230, 245, 0.9) !important;
            box-shadow:
                0 1px 3px rgba(37, 99, 235, 0.12) !important;
            font-weight: 700 !important;
        }

        body.light-theme [id^="tf-buttons-"] button.bg-accent:hover {
            background-color: #FFFFFF !important;
            color: #1D4ED8 !important;
            border-color: #BFDBFE !important;
        }

        /* ── Stock Card Detail Tabs (Chart vs Profile) Light Theme ── */
        body.light-theme [id^="detail-tabs-"] {
            background-color: #EBF2FC !important;
            border: 1px solid #DCE6F5 !important;
            border-radius: 6px !important;
        }

        body.light-theme .stock-view-tab {
            color: #64748B !important;
            font-weight: 700 !important;
            background-color: transparent !important;
            border-color: transparent !important;
            box-shadow: none !important;
        }

        body.light-theme .stock-view-tab:hover {
            color: #0F172A !important;
        }

        body.light-theme .stock-view-tab.active {
            background-color: #FFFFFF !important;
            color: #2563EB !important;
            border: 1px solid rgba(220, 230, 245, 0.9) !important;
            box-shadow: 0 1px 3px rgba(37, 99, 235, 0.10) !important;
            font-weight: 700 !important;
        }

        body.light-theme .stock-view-tab.active:hover {
            color: #1D4ED8 !important;
            border-color: #BFDBFE !important;
        }

        /* ── Workstation Light Theme: Pure Crisp White Chart Background ── */
        body.light-theme div[id^="chart-wrapper-"],
        body.light-theme div[id^="chart-pane-"],
        body.light-theme div[id^="tv-chart-canvas-"],
        body.light-theme div[id^="tv-chart-container-"] {
            background-color: #FFFFFF !important;
        }

        body.light-theme div[id^="chart-toolbar-"] {
            background-color: #FAFCFF !important;
            border-bottom: 1px solid #EDF2F9 !important;
        }

        body.light-theme div[id^="chart-wrapper-"]:fullscreen,
        body.light-theme div[id^="chart-wrapper-"]:-webkit-full-screen,
        body.light-theme div[id^="chart-wrapper-"].pseudo-fullscreen {
            background-color: #FFFFFF !important;
        }

        /* chart legend is plain text written on the chart: never a box (any theme) */
        div[id^="chart-legend-"], body.light-theme div[id^="chart-legend-"] {
            background: transparent !important;
            border: 0 !important;
            box-shadow: none !important;
            padding: 0 !important;
            backdrop-filter: none !important;
        }

        body.light-theme .drawing-tool-btn.bg-accent\/20 {
            background-color: #EFF6FF !important;
            color: #2563EB !important;
            border-color: #BFDBFE !important;
        }

        body.light-theme #matrix-engine-display {
            color: var(--text-primary) !important;
        }

        body.light-theme #scan-status:not(.signal-up):not(.signal-down) {
            color: var(--text-muted) !important;
        }

        body.light-theme .card-anim h3,
        body.light-theme .card-anim span:not(.text-accent):not(.signal-up):not(.signal-down):not(.tooltip-emerald):not(.tooltip-rose):not(.tooltip-blue):not(.tooltip-amber) {
            color: var(--text-primary) !important;
        }

        body.light-theme #export-btn {
            box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04) !important;
            background-color: #FFFFFF !important;
            border: 1px solid #E2E8F0 !important;
            color: var(--text-secondary) !important;
            border-radius: 6px !important;
        }

        body.light-theme #export-btn:hover {
            background-color: #F8FAFC !important;
            border-color: #CBD5E1 !important;
            color: #0F172A !important;
        }

        /* ── Institutional Cyber-Terminal Custom Scrollbar ── */
        * {
            scrollbar-width: thin;
            scrollbar-color: #334155 transparent;
        }

        body.light-theme * {
            scrollbar-color: #CBD5E1 transparent;
        }

        ::-webkit-scrollbar,
        .custom-scrollbar::-webkit-scrollbar {
            width: 6px;
            height: 6px;
        }

        ::-webkit-scrollbar-track,
        .custom-scrollbar::-webkit-scrollbar-track {
            background: transparent;
        }

        ::-webkit-scrollbar-thumb,
        .custom-scrollbar::-webkit-scrollbar-thumb {
            background: #334155;
            border-radius: 9999px;
            border: 1px solid rgba(255, 255, 255, 0.05);
            transition: background 0.15s ease;
        }

        ::-webkit-scrollbar-thumb:hover,
        .custom-scrollbar::-webkit-scrollbar-thumb:hover {
            background: #475569;
        }

        ::-webkit-scrollbar-thumb:active,
        .custom-scrollbar::-webkit-scrollbar-thumb:active {
            background: var(--accent-color, #FFC400);
        }

        ::-webkit-scrollbar-button,
        .custom-scrollbar::-webkit-scrollbar-button {
            display: none !important;
            width: 0 !important;
            height: 0 !important;
        }

        ::-webkit-scrollbar-corner,
        .custom-scrollbar::-webkit-scrollbar-corner {
            background: transparent;
        }

        body.light-theme ::-webkit-scrollbar-thumb,
        body.light-theme .custom-scrollbar::-webkit-scrollbar-thumb {
            background: #CBD5E1;
            border: 1px solid rgba(0, 0, 0, 0.05);
        }

        body.light-theme ::-webkit-scrollbar-thumb:hover,
        body.light-theme .custom-scrollbar::-webkit-scrollbar-thumb:hover {
            background: #94A3B8;
        }

        body.light-theme ::-webkit-scrollbar-thumb:active,
        body.light-theme .custom-scrollbar::-webkit-scrollbar-thumb:active {
            background: var(--accent-color, #FFC400);
        }

        /* ── Header ── */
        header {
            background: rgba(0, 0, 0, 0.98) !important;
            border-bottom: 1px solid var(--border-color) !important;
            backdrop-filter: blur(16px);
        }

        body.light-theme header {
            background: rgba(238, 243, 251, 0.94) !important;
            border-bottom: 1px solid #E2E8F0 !important;
            box-shadow:
                0 1px 3px rgba(15, 23, 42, 0.04) !important;
            backdrop-filter: blur(12px) !important;
        }

        body.light-theme header::before {
            background: linear-gradient(90deg, #2563EB 0%, #38BDF8 50%, #2563EB 100%) !important;
        }

        header::before {
            content: "";
            position: absolute;
            top: 0;
            left: 0;
            right: 0;
            height: 2px;
            background: repeating-linear-gradient(90deg, var(--accent-color) 0px, var(--accent-color) 8px, transparent 8px, transparent 14px);
            opacity: 0.8;
        }

        /* ── Mono data labels (Bloomberg uses tabular figures everywhere) ── */
        .font-mono {
            font-variant-numeric: tabular-nums;
        }

        /* ── Blinking live cursor ── */
        @keyframes blink-cursor {

            0%,
            49% {
                opacity: 1;
            }

            50%,
            100% {
                opacity: 0;
            }
        }

        .live-cursor::after {
            content: "_";
            animation: blink-cursor 1s steps(1) infinite;
            color: var(--accent-color);
        }

        /* ── Mobile adjustments ── */
        @media (max-width: 767px) {
            header .max-w-full {
                flex-direction: row;
                flex-wrap: wrap;
                justify-content: space-between;
                align-items: center;
                padding: 8px 12px !important;
                height: auto;
                gap: 8px;
            }

            header {
                height: auto;
                min-height: 4rem;
            }

            .brand-text {
                font-size: 1.2rem;
            }

            .flex.items-center.gap-\[16px\] {
                gap: 8px;
            }

            .switch {
                width: 40px;
                height: 20px;
            }

            .slider:before {
                height: 14px;
                width: 14px;
                left: 3px;
                bottom: 2px;
            }

            input:checked+.slider:before {
                transform: translateX(20px);
            }

            .max-w-full.mx-auto.px-3.pt-24 {
                padding-top: 7.5rem !important;
            }

            #strategy-scanner,
            #strategy-momentum-open,
            #strategy-ipo-base {
                padding-top: 0.4rem !important;
                padding-bottom: 0.4rem !important;
                font-size: 8px !important;
            }
        }

        /* Pseudo-fullscreen fallback for iOS Safari and mobile layout containment */
        .pseudo-fullscreen-active {
            position: fixed !important;
            top: 0 !important;
            left: 0 !important;
            width: 100vw !important;
            height: 100dvh !important;
            /* Support dynamic viewport height on mobile */
            z-index: 99999 !important;
            margin: 0 !important;
            padding: 0 !important;
            background-color: var(--bg-color) !important;
        }

        /* Ensure background matches theme color in both native and pseudo fullscreen modes */
        div[id^="chart-wrapper-"]:fullscreen,
        div[id^="chart-wrapper-"]:-webkit-full-screen {
            background-color: var(--bg-color) !important;
            width: 100% !important;
            height: 100% !important;
            display: flex !important;
            flex-direction: column !important;
        }

        /* Fullscreen Layout Isolation */
        body.fullscreen-isolation-active header,
        body.fullscreen-isolation-active .ticker-tape-wrap,
        body.fullscreen-isolation-active #watchlist-drawer,
        body.fullscreen-isolation-active #control-sidebar-panel,
        body.fullscreen-isolation-active .tactical-card,
        body.fullscreen-isolation-active #strategy-switcher-wrapper,
        body.fullscreen-isolation-active #universe-selectors-wrapper,
        body.fullscreen-isolation-active #results-header-bar,
        body.fullscreen-isolation-active #monitor-filters-wrapper {
            display: none !important;
        }

        body.fullscreen-isolation-active .card-anim:not(.fullscreen-active-card) {
            display: none !important;
        }

        /* Ensure parent elements do not limit size of isolated fullscreen card */
        body.fullscreen-isolation-active #results-display-deck,
        body.fullscreen-isolation-active #signals-container {
            width: 100% !important;
            max-width: 100% !important;
            margin: 0 !important;
            padding: 0 !important;
        }

        /* ── Premium Live Sector Monitor overrides ── */
        .text-sentinel-green {
            color: #34D399 !important;
        }

        .text-sentinel-slate {
            color: #CBD5E1 !important;
        }

        .text-sentinel-fallback {
            color: rgba(245, 158, 11, 0.7) !important;
        }

        .sentinel-bar-fill-green {
            background: linear-gradient(to right, #10B981, #34D399) !important;
            box-shadow: 0 0 6px rgba(52, 211, 153, 0.6) !important;
        }

        .sentinel-bar-fill-slate {
            background: linear-gradient(to right, #64748B, #94A3B8) !important;
            box-shadow: 0 0 6px rgba(148, 163, 184, 0.4) !important;
        }

        /* ── Permanently Hide Native Scrollbars on No-Scrollbar Elements ── */
        .no-scrollbar::-webkit-scrollbar {
            display: none !important;
            width: 0 !important;
            height: 0 !important;
        }

        .no-scrollbar {
            -ms-overflow-style: none !important;
            /* IE and Edge */
            scrollbar-width: none !important;
            /* Firefox */
        }

        #monitor-filters-wrapper .no-scrollbar::-webkit-scrollbar,
        #sector-sentinel-ranks::-webkit-scrollbar,
        #sector-sentinel-scroll-wrap::-webkit-scrollbar {
            display: none !important;
            width: 0 !important;
            height: 0 !important;
        }

        #monitor-filters-wrapper .no-scrollbar,
        #sector-sentinel-ranks,
        #sector-sentinel-scroll-wrap {
            -ms-overflow-style: none !important;
            scrollbar-width: none !important;
        }

        .text-sentinel-green {
            color: #10B981;
        }

        .text-sentinel-slate {
            color: #94A3B8;
        }

        .text-sentinel-fallback {
            color: #64748B;
        }

        .sentinel-bar-track {
            background-color: rgba(15, 23, 42, 0.8);
            border-color: rgba(51, 65, 85, 0.6);
        }

        .sentinel-bar-fill-green {
            background-color: #10B981;
            box-shadow: 0 0 8px rgba(16, 185, 129, 0.4);
        }

        .sentinel-bar-fill-slate {
            background-color: #64748B;
            box-shadow: 0 0 6px rgba(100, 116, 139, 0.3);
        }

        .sentinel-log-row {
            border-bottom-color: rgba(30, 41, 59, 0.5);
        }

        .sentinel-log-row:hover {
            background-color: rgba(255, 255, 255, 0.03);
        }

        body.light-theme #sector-sentinel-monitor,
        body.light-theme #display-chunk-filter {
            background-color: #FFFFFF !important;
            border-color: #E2E8F0 !important;
        }

        body.light-theme #sector-sentinel-titlebar,
        body.light-theme #chunk-filter-titlebar {
            background: #F8FAFC !important;
            border-bottom-color: #E2E8F0 !important;
        }

        body.light-theme #sector-sentinel-title,
        body.light-theme #chunk-filter-title {
            color: var(--text-primary) !important;
        }

        body.light-theme #sector-sentinel-ranks,
        body.light-theme #chunk-filter-options {
            background-color: #FFFFFF !important;
        }

        body.light-theme .text-sentinel-green {
            color: #16A34A !important;
        }

        body.light-theme .text-sentinel-slate {
            color: var(--text-secondary) !important;
        }

        body.light-theme .text-sentinel-fallback {
            color: #2563EB !important;
        }

        body.light-theme .sentinel-bar-track {
            background-color: #F1F5F9 !important;
            border-color: #E2E8F0 !important;
        }

        body.light-theme .sentinel-bar-fill-green {
            background-color: #16A34A !important;
            box-shadow: 0 2px 4px rgba(22, 163, 74, 0.15) !important;
        }

        body.light-theme .sentinel-bar-fill-slate {
            background-color: var(--text-muted) !important;
        }

        body.light-theme .sentinel-log-row {
            border-bottom-color: #F1F5F9 !important;
        }

        body.light-theme .sentinel-log-row:hover {
            background-color: #EBF2FC !important;
        }

        body.light-theme #display-chunk-filter .text-cyan-400,
        body.light-theme #sector-sentinel-monitor .text-cyan-400 {
            color: #2563EB !important;
        }

        body.light-theme #monitor-filters-wrapper {
            background-color: #FFFFFF !important;
            border: 1px solid #E2E8F0 !important;
            border-radius: 12px !important;
            box-shadow: 0 1px 3px rgba(37, 99, 235, 0.04) !important;
        }

        body.light-theme .chunk-filter-btn.active {
            background-color: #EBF2FC !important;
            color: #2563EB !important;
            border-color: #BFDBFE !important;
            font-weight: 700 !important;
        }

        body.light-theme .chunk-filter-btn {
            color: var(--text-secondary);
            background-color: #F8FAFC !important;
            border-color: #E2E8F0 !important;
        }

        body.light-theme .chunk-filter-btn:hover {
            color: #2563EB !important;
            border-color: #CBD5E1 !important;
        }

        body.light-theme .brand-glow {
            animation: none !important;
            text-shadow: none !important;
            color: #2563EB !important;
        }

        body.light-theme #watchlist-drawer {
            background-color: #FFFFFF !important;
            border-left: 1px solid var(--border-color) !important;
            box-shadow: -10px 0 30px rgba(15, 23, 42, 0.06) !important;
        }

        body.light-theme .modal-backdrop>div {
            background-color: #FFFFFF !important;
            border: 1px solid var(--border-mid) !important;
            color: var(--text-primary) !important;
            box-shadow: 0 10px 40px rgba(0, 0, 0, 0.12) !important;
        }

        body.light-theme .modal-backdrop h3 {
            color: var(--text-primary) !important;
            border-bottom-color: var(--border-color) !important;
        }

        body.light-theme .modal-backdrop label {
            color: var(--text-secondary) !important;
        }

        body.light-theme .modal-backdrop select,
        body.light-theme .modal-backdrop textarea {
            background-color: var(--surface-elevated) !important;
            border-color: var(--border-mid) !important;
            color: var(--text-primary) !important;
        }

        body.light-theme .modal-backdrop textarea::placeholder {
            color: var(--text-muted) !important;
        }

        body.light-theme input[type="number"],
        body.light-theme input[type="text"] {
            background-color: var(--surface-elevated) !important;
            border-color: var(--border-mid) !important;
            color: var(--text-primary) !important;
        }

        body.light-theme input[type="number"]::placeholder,
        body.light-theme input[type="text"]::placeholder {
            color: var(--text-muted) !important;
        }

        body.light-theme input[type="number"]:focus,
        body.light-theme input[type="text"]:focus {
            border-color: #000000 !important;
            box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.08) !important;
        }

        /* ── Watchlist Modal Custom Styling & Light Theme Overrides ── */
        .watchlist-modal-item {
            background-color: rgba(6, 8, 16, 0.6);
            border-color: #1e293b;
            color: #cbd5e1;
        }

        .watchlist-modal-item:hover {
            background-color: rgba(15, 23, 42, 0.6);
        }

        .watchlist-modal-done-btn {
            background-color: #060810;
            border-color: #1e293b;
            color: #cbd5e1;
        }

        .watchlist-modal-done-btn:hover {
            border-color: rgba(255, 196, 0, 0.4);
            color: var(--accent-color);
            background-color: rgba(255, 196, 0, 0.1);
        }

        body.light-theme #watchlist-modal>div {
            background-color: #FFFFFF !important;
            border: 1px solid var(--border-mid) !important;
            color: var(--text-primary) !important;
            box-shadow: 0 10px 40px rgba(0, 0, 0, 0.12) !important;
        }

        body.light-theme #watchlist-modal h3 {
            color: var(--text-primary) !important;
            border-bottom-color: var(--border-color) !important;
        }

        body.light-theme #watchlist-modal span {
            color: var(--text-secondary) !important;
        }

        body.light-theme .watchlist-modal-item {
            background-color: #f8fafc !important;
            border-color: #e2e8f0 !important;
            color: var(--text-primary) !important;
        }

        body.light-theme .watchlist-modal-item:hover {
            background-color: #f1f5f9 !important;
        }

        body.light-theme .watchlist-modal-done-btn {
            background-color: #f8fafc !important;
            border-color: #e2e8f0 !important;
            color: var(--text-primary) !important;
        }

        body.light-theme .watchlist-modal-done-btn:hover {
            border-color: var(--accent-color) !important;
            color: var(--accent-deep) !important;
            background-color: var(--accent-dim) !important;
        }

        body.light-theme #watchlist-modal button svg {
            color: var(--text-secondary) !important;
        }

        body.light-theme #watchlist-modal button:hover svg {
            color: var(--text-primary) !important;
        }

        .line-clamp-3 {
            display: -webkit-box;
            -webkit-line-clamp: 3;
            -webkit-box-orient: vertical;
            overflow: hidden;
        }

        .company-profile-card {
            background-color: rgba(15, 23, 42, 0.4);
            border: 1px solid rgba(255, 255, 255, 0.08);
        }

        body.light-theme .company-profile-card {
            background-color: #F8FAFC !important;
            border-color: #E2E8F0 !important;
        }

        body.light-theme #company-profile-modal>div {
            background-color: #FFFFFF !important;
            border-color: #E2E8F0 !important;
            color: #0F172A !important;
            box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08) !important;
        }

        body.light-theme #company-profile-modal .text-slate-100 {
            color: #0F172A !important;
        }

        body.light-theme #company-profile-modal .text-slate-200,
        body.light-theme #company-profile-modal .text-slate-300 {
            color: #1E293B !important;
        }

        body.light-theme #company-profile-modal .text-slate-400,
        body.light-theme #company-profile-modal .text-slate-500 {
            color: #64748B !important;
        }

        /* ── Index Chart Modal Light Theme Overrides ── */
        body.light-theme #index-chart-modal>div {
            background-color: #FFFFFF !important;
            border-color: #E2E8F0 !important;
            color: #0F172A !important;
            box-shadow: 0 20px 50px rgba(0, 0, 0, 0.12) !important;
        }

        body.light-theme #index-chart-modal .text-slate-100 {
            color: #0F172A !important;
        }

        body.light-theme #index-chart-modal .text-slate-200,
        body.light-theme #index-chart-modal .text-slate-300 {
            color: #1E293B !important;
        }

        body.light-theme #index-chart-modal .text-slate-400,
        body.light-theme #index-chart-modal .text-slate-500 {
            color: #64748B !important;
        }

        body.light-theme #index-chart-modal #index-chart-type-selector,
        body.light-theme #index-chart-modal .bg-surface {
            background-color: #F1F5F9 !important;
            border-color: #CBD5E1 !important;
        }

        body.light-theme .index-type-btn.bg-accent\/20,
        body.light-theme .index-tf-btn.bg-accent\/20,
        body.light-theme .index-cat-tab.bg-accent\/20 {
            background-color: #EBF2FC !important;
            color: #2563EB !important;
            border-color: #93C5FD !important;
            box-shadow: 0 1px 3px rgba(37, 99, 235, 0.15) !important;
        }

        body.light-theme .index-type-btn:not(.bg-accent\/20),
        body.light-theme .index-tf-btn:not(.bg-accent\/20),
        body.light-theme .index-cat-tab:not(.bg-accent\/20) {
            color: #64748B !important;
        }

        body.light-theme .index-type-btn:not(.bg-accent\/20):hover,
        body.light-theme .index-tf-btn:not(.bg-accent\/20):hover,
        body.light-theme .index-cat-tab:not(.bg-accent\/20):hover {
            color: #0F172A !important;
            background-color: #FFFFFF !important;
        }

        /* ── Auth & Forgot Password Modal Light Theme Overrides ── */
        body.light-theme #auth-modal>div,
        body.light-theme #forgot-password-modal>div {
            background-color: #FFFFFF !important;
            border: 1px solid var(--border-mid) !important;
            box-shadow: 0 20px 50px rgba(0, 0, 0, 0.12) !important;
            color: var(--text-primary) !important;
        }

        body.light-theme #auth-modal .text-slate-100,
        body.light-theme #forgot-password-modal .text-slate-100 {
            color: #0F172A !important;
        }

        body.light-theme #auth-modal .text-slate-200,
        body.light-theme #auth-modal .text-slate-300,
        body.light-theme #forgot-password-modal .text-slate-200,
        body.light-theme #forgot-password-modal .text-slate-300 {
            color: #1E293B !important;
        }

        body.light-theme #auth-modal .text-slate-400,
        body.light-theme #auth-modal .text-slate-500,
        body.light-theme #forgot-password-modal .text-slate-400,
        body.light-theme #forgot-password-modal .text-slate-500 {
            color: #64748B !important;
        }

        body.light-theme #auth-modal input,
        body.light-theme #forgot-password-modal input {
            background-color: #F8F9FA !important;
            border-color: #CBD5E1 !important;
            color: #0F172A !important;
        }

        body.light-theme #auth-modal input::placeholder,
        body.light-theme #forgot-password-modal input::placeholder {
            color: #94A3B8 !important;
        }

        body.light-theme #auth-modal input:focus,
        body.light-theme #forgot-password-modal input:focus {
            border-color: var(--accent-deep) !important;
            box-shadow: 0 0 0 1px rgba(255, 196, 0, 0.3) !important;
        }

        body.light-theme #auth-modal .bg-\[\#0a0e17\],
        body.light-theme #forgot-password-modal .bg-\[\#0a0e17\] {
            background-color: #F1F5F9 !important;
            border-color: #E2E8F0 !important;
            color: #0F172A !important;
        }

        body.light-theme #auth-submit-btn,
        body.light-theme #forgot-request-btn {
            background: linear-gradient(135deg, #2563EB 0%, #1D4ED8 100%) !important;
            color: #FFFFFF !important;
            border: 1px solid #1D4ED8 !important;
            box-shadow: 0 4px 15px rgba(37, 99, 235, 0.3) !important;
        }

        body.light-theme #auth-submit-btn:hover,
        body.light-theme #forgot-request-btn:hover {
            background: linear-gradient(135deg, #1D4ED8 0%, #1E40AF 100%) !important;
            box-shadow: 0 6px 20px rgba(37, 99, 235, 0.4) !important;
        }

        body.light-theme #forgot-reset-btn {
            background: #10B981 !important;
            color: #FFFFFF !important;
            border: 1px solid #059669 !important;
            box-shadow: 0 4px 15px rgba(16, 185, 129, 0.3) !important;
        }

        /* ── Profile Modal Light Theme Overrides ── */
        body.light-theme #profile-modal>div {
            background-color: #FFFFFF !important;
            border: 1px solid var(--border-mid) !important;
            box-shadow: 0 20px 50px rgba(0, 0, 0, 0.12) !important;
            color: var(--text-primary) !important;
        }

        body.light-theme #profile-modal .text-slate-100 {
            color: #0F172A !important;
        }

        body.light-theme #profile-modal .text-slate-200,
        body.light-theme #profile-modal .text-slate-300 {
            color: #1E293B !important;
        }

        body.light-theme #profile-modal .text-slate-400,
        body.light-theme #profile-modal .text-slate-500 {
            color: #64748B !important;
        }

        body.light-theme #profile-modal .bg-\[\#0a0e17\] {
            background-color: #F1F5F9 !important;
            border-color: #E2E8F0 !important;
        }

        /* ── Pricing Modal Light Theme Overrides ── */
        body.light-theme #pricing-modal>div {
            background-color: #FFFFFF !important;
            border: 1px solid var(--border-mid) !important;
            box-shadow: 0 20px 50px rgba(0, 0, 0, 0.12) !important;
            color: var(--text-primary) !important;
        }

        body.light-theme #pricing-modal .text-slate-100 {
            color: #0F172A !important;
        }

        body.light-theme #pricing-modal .text-slate-200,
        body.light-theme #pricing-modal .text-slate-300 {
            color: #1E293B !important;
        }

        body.light-theme #pricing-modal .text-slate-400,
        body.light-theme #pricing-modal .text-slate-500 {
            color: #64748B !important;
        }

        body.light-theme #pricing-modal .bg-\[\#0a0e17\],
        body.light-theme #pricing-modal .bg-\[\#060810\] {
            background-color: #F8FAFC !important;
            border-color: #E2E8F0 !important;
        }

        /* ── New Scanner Modal Bloomberg Hairline Dark Theme (Exact Advanced Matrix Controls Match) ── */
        #new-scanner-modal,
        #new-scanner-modal * {
            border-color: var(--border-color);
        }

        #new-scanner-modal>div {
            border: 1px solid var(--border-mid) !important;
        }

        #new-scanner-modal select,
        #new-scanner-modal input[type="text"],
        #new-scanner-modal input[type="number"] {
            background-color: #121212 !important;
            border: 1px solid var(--border-color) !important;
            color: #E2E8F0 !important;
            outline: none !important;
            border-radius: 2px !important;
        }

        #new-scanner-modal select:focus,
        #new-scanner-modal input[type="text"]:focus,
        #new-scanner-modal input[type="number"]:focus {
            border-color: var(--accent-color) !important;
            box-shadow: 0 0 8px var(--accent-dim) !important;
        }

        #new-scanner-modal select {
            background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%23FFC400'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'%3E%3C/path%3E%3C/svg%3E") !important;
            background-repeat: no-repeat !important;
            background-position: right 0.5rem center !important;
            background-size: 0.9em !important;
            padding-right: 1.75rem !important;
            -webkit-appearance: none !important;
            -moz-appearance: none !important;
            appearance: none !important;
        }

        #new-scanner-modal .swing-filter-card {
            background-color: #0a0a0a !important;
            border: 1px solid var(--border-color) !important;
        }

        #new-scanner-modal .swing-filter-card:hover {
            border-color: var(--border-mid) !important;
        }

        #new-scanner-modal .border-border,
        #new-scanner-modal .border-b,
        #new-scanner-modal .border-t {
            border-color: var(--border-color) !important;
        }

        #new-scanner-modal #modal-match-counter-pill {
            border-color: rgba(16, 185, 129, 0.35) !important;
            background-color: rgba(16, 185, 129, 0.08) !important;
        }

        /* ── New Scanner Modal Light Theme Overrides ── */
        body.light-theme #new-scanner-modal>div {
            background-color: #FFFFFF !important;
            border: 1px solid var(--border-mid) !important;
            box-shadow: 0 20px 50px rgba(0, 0, 0, 0.12) !important;
            color: var(--text-primary) !important;
        }

        body.light-theme #new-scanner-modal input,
        body.light-theme #new-scanner-modal select {
            background-color: #F8F9FA !important;
            border-color: #CBD5E1 !important;
            color: #0F172A !important;
        }

        body.light-theme #new-scanner-modal .swing-filter-card {
            background-color: #F8FAFC !important;
            border-color: #E2E8F0 !important;
        }

        body.light-theme #new-scanner-modal .bg-\[\#0a0a0a\],
        body.light-theme #new-scanner-modal .bg-\[\#000000\],
        body.light-theme #new-scanner-modal .bg-\[\#0d0d0d\],
        body.light-theme #new-scanner-modal .bg-\[\#121212\] {
            background-color: #FFFFFF !important;
            border-color: #E2E8F0 !important;
        }

        body.light-theme #new-scanner-modal .text-slate-100 {
            color: #0F172A !important;
        }

        body.light-theme #new-scanner-modal .text-slate-200,
        body.light-theme #new-scanner-modal .text-slate-300 {
            color: #1E293B !important;
        }

        body.light-theme #new-scanner-modal .text-slate-400,
        body.light-theme #new-scanner-modal .text-slate-500 {
            color: #64748B !important;
        }

        /* ── Watchlist Symbol Autocomplete Suggestions ── */
        .autocomplete-suggestions-container {
            position: absolute;
            top: 100%;
            left: 0;
            right: 0;
            background-color: #0d131f;
            border: 1px solid #1e293b;
            /* border-slate-800 */
            border-radius: 6px;
            max-height: 180px;
            overflow-y: auto;
            z-index: 999999;
            box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.4), 0 8px 10px -6px rgba(0, 0, 0, 0.4);
            font-family: monospace;
            margin-top: 4px;
        }

        .autocomplete-suggestion-item {
            padding: 8px 12px;
            font-size: 10px;
            font-weight: 700;
            color: #cbd5e1;
            /* text-slate-300 */
            cursor: pointer;
            transition: all 0.1s linear;
            display: flex;
            justify-content: space-between;
            align-items: center;
        }

        .autocomplete-suggestion-item:hover,
        .autocomplete-suggestion-item.active {
            background-color: rgba(255, 196, 0, 0.1);
            color: var(--accent-color);
        }

        .autocomplete-suggestion-item .suggestion-exchange {
            font-size: 8px;
            color: #64748b;
            /* text-slate-500 */
        }

        /* Light Theme Overrides */
        body.light-theme .autocomplete-suggestions-container {
            background-color: #FFFFFF !important;
            border-color: var(--border-mid) !important;
            box-shadow: 0 10px 20px rgba(0, 0, 0, 0.08) !important;
        }

        body.light-theme .autocomplete-suggestion-item {
            color: var(--text-primary) !important;
        }

        body.light-theme .autocomplete-suggestion-item:hover,
        body.light-theme .autocomplete-suggestion-item.active {
            background-color: var(--accent-dim) !important;
            color: var(--accent-deep) !important;
        }

        body.light-theme .cyber-checkbox {
            background: #FFFFFF !important;
            border-color: var(--border-strong) !important;
        }

        body.light-theme .cyber-checkbox:checked {
            background-color: #FFC400 !important;
            border-color: #000000 !important;
            box-shadow: 0 0 6px rgba(255, 196, 0, 0.5) !important;
        }

        body.light-theme .cyber-checkbox:checked::after {
            color: #000000 !important;
        }

        body.light-theme .slider {
            background-color: var(--surface-high) !important;
            border-color: var(--border-mid) !important;
            box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.05) !important;
        }

        body.light-theme .ticker-tape-wrap {
            background-color: var(--surface-elevated) !important;
            border-bottom-color: var(--border-color) !important;
        }

        /* ── Button Typography Polish (Crisp Monospace Terminal Style) ── */
        #scan-btn,
        #strategy-scanner,
        #strategy-momentum-open,
        #strategy-ipo-base,
        [id^="tf-buttons-"] button {
            font-family: 'JetBrains Mono', monospace !important;
            letter-spacing: 0.15em !important;
            font-weight: 700 !important;
            -webkit-font-smoothing: antialiased;
            -moz-osx-font-smoothing: grayscale;
        }

        body.light-theme #scan-btn {
            font-size: 10.5px !important;
        }

        /* Market News Drawer & Watchlist Drawer Mobile Optimization */
        #news-drawer {
            width: 380px;
        }

        #watchlist-drawer {
            width: 420px;
        }

        #mobile-nav-drawer {
            width: 340px;
            max-width: 88vw;
        }

        @media (max-width: 640px) {

            #news-drawer,
            #watchlist-drawer,
            #mobile-nav-drawer {
                width: 100% !important;
                max-width: 100vw !important;
            }
        }

        @media (max-width: 768px) {

            button,
            a,
            select {
                touch-action: manipulation;
            }

            #news-drawer-list,
            #watchlist-list {
                -webkit-overflow-scrolling: touch;
            }
        }

        .news-card-item {
            border: 1px solid #2A2E39;
            background: rgba(18, 18, 18, 0.6);
            border-radius: 6px;
            padding: 12px;
            transition: background-color 0.2s ease, border-color 0.2s ease;
        }

        .news-card-item:hover {
            background: rgba(28, 28, 28, 0.85);
            border-color: #3e4453;
        }

        body.light-theme #news-drawer {
            background-color: #FFFFFF !important;
            border-left: 1px solid #E2E8F0 !important;
            box-shadow: -10px 0 35px rgba(15, 23, 42, 0.08) !important;
        }

        body.light-theme #news-drawer-backdrop {
            background-color: rgba(15, 23, 42, 0.25) !important;
        }

        /* News Drawer Header */
        body.light-theme #news-drawer > div:first-child {
            background-color: #F8FAFC !important;
            border-bottom: 1px solid #E2E8F0 !important;
        }

        body.light-theme #news-drawer svg.text-amber-400 {
            color: #2563EB !important;
        }

        body.light-theme #news-drawer h2 {
            color: #0F172A !important;
            font-weight: 800 !important;
        }

        body.light-theme #news-refresh-btn {
            background-color: #FFFFFF !important;
            border: 1px solid #E2E8F0 !important;
            color: #64748B !important;
        }

        body.light-theme #news-refresh-btn:hover {
            background-color: #EFF6FF !important;
            border-color: #BFDBFE !important;
            color: #2563EB !important;
        }

        body.light-theme #news-drawer button[onclick="closeNewsDrawer()"] {
            color: #64748B !important;
        }

        body.light-theme #news-drawer button[onclick="closeNewsDrawer()"]:hover {
            color: #0F172A !important;
        }

        /* News Drawer Sort Bar */
        body.light-theme #news-drawer .border-b.bg-surface\/20 {
            background-color: #F8FAFC !important;
            border-bottom-color: #E2E8F0 !important;
        }

        body.light-theme #news-drawer .border-b.bg-surface\/20 span {
            color: #64748B !important;
        }

        body.light-theme #news-drawer .inline-flex {
            background-color: #EBF2FC !important;
            border: 1px solid #DCE6F5 !important;
            border-radius: 6px !important;
        }

        body.light-theme #news-sort-latest.bg-accent\/20,
        body.light-theme #news-sort-ranking.bg-accent\/20 {
            background-color: #FFFFFF !important;
            color: #2563EB !important;
            border-color: rgba(220, 230, 245, 0.9) !important;
            box-shadow: 0 1px 3px rgba(37, 99, 235, 0.08) !important;
            font-weight: 700 !important;
        }

        body.light-theme #news-sort-latest:not(.bg-accent\/20),
        body.light-theme #news-sort-ranking:not(.bg-accent\/20) {
            background-color: transparent !important;
            color: #64748B !important;
            border-color: transparent !important;
            box-shadow: none !important;
        }

        body.light-theme #news-sort-latest:not(.bg-accent\/20):hover,
        body.light-theme #news-sort-ranking:not(.bg-accent\/20):hover {
            color: #0F172A !important;
        }

        /* News Card Items in Workstation Light Theme */
        body.light-theme .news-card-item {
            background-color: #FFFFFF !important;
            border: 1px solid #E2E8F0 !important;
            border-radius: 10px !important;
            padding: 12px !important;
            box-shadow: 0 1px 3px rgba(37, 99, 235, 0.04) !important;
            transition: all 0.2s ease !important;
        }

        body.light-theme .news-card-item:hover {
            background-color: #FFFFFF !important;
            border-color: #BFDBFE !important;
            box-shadow: 0 4px 14px rgba(37, 99, 235, 0.08) !important;
            transform: translateY(-1px) !important;
        }

        body.light-theme .news-card-item a {
            color: #0F172A !important;
            font-weight: 600 !important;
        }

        body.light-theme .news-card-item a:hover {
            color: #2563EB !important;
        }

        body.light-theme .news-card-item .border-t {
            border-top-color: #F1F5F9 !important;
        }

        body.light-theme .news-card-item span.bg-surface {
            background-color: #EFF6FF !important;
            border-color: #BFDBFE !important;
            color: #2563EB !important;
            font-weight: 700 !important;
        }

        body.light-theme #news-drawer-list span.bg-amber-500\/10,
        body.light-theme #news-drawer-list .news-rank-badge {
            background-color: #EFF6FF !important;
            border: 1px solid #BFDBFE !important;
            color: #2563EB !important;
            font-weight: 700 !important;
        }

        body.light-theme #news-drawer-list .text-slate-500,
        body.light-theme #news-drawer-list .text-slate-400 {
            color: #64748B !important;
        }

        /* News skeleton loader in light theme */
        body.light-theme #news-drawer-list .animate-pulse div {
            background-color: #E2E8F0 !important;
        }

        /* Chart Event & News Alert Popovers */
        body.light-theme [id^="chart-event-popover-"] {
            background-color: rgba(255, 255, 255, 0.98) !important;
            border: 1px solid #CBD5E1 !important;
            box-shadow: 0 10px 25px -5px rgba(15, 23, 42, 0.12), 0 4px 10px rgba(0, 0, 0, 0.05) !important;
            color: #0F172A !important;
        }

        body.light-theme [id^="chart-event-popover-"] .border-white\/\[0\.08\] {
            border-color: #E2E8F0 !important;
        }

        body.light-theme [id^="chart-event-popover-"] .text-slate-100 {
            color: #0F172A !important;
            font-weight: 700 !important;
        }

        body.light-theme [id^="chart-event-popover-"] .text-slate-300,
        body.light-theme [id^="chart-event-popover-"] .text-slate-400 {
            color: #475569 !important;
        }

        body.light-theme [id^="chart-event-popover-"] .text-amber-400 {
            color: #D97706 !important;
        }

        body.light-theme [id^="chart-event-popover-"] .text-cyan-400 {
            color: #0284C7 !important;
        }

        body.light-theme [id^="chart-event-popover-"] .bg-amber-950\/60 {
            background-color: #FEF3C7 !important;
            color: #B45309 !important;
            border-color: #FDE68A !important;
            font-weight: 700 !important;
        }

        body.light-theme [id^="chart-event-popover-"] .bg-emerald-950\/60 {
            background-color: #ECFDF5 !important;
            color: #059669 !important;
            border-color: #A7F3D0 !important;
            font-weight: 700 !important;
        }

        body.light-theme [id^="chart-event-popover-"] .bg-cyan-950\/60 {
            background-color: #EFF6FF !important;
            color: #0284C7 !important;
            border-color: #BFDBFE !important;
            font-weight: 700 !important;
        }

        /* Modal Alert Boxes (Auth & Reset Alerts) */
        body.light-theme #auth-alert.bg-rose-500\/10,
        body.light-theme #forgot-alert.bg-rose-500\/10 {
            background-color: #FEF2F2 !important;
            border-color: #FECACA !important;
            color: #DC2626 !important;
        }

        body.light-theme #auth-alert.bg-emerald-500\/10,
        body.light-theme #forgot-alert.bg-emerald-500\/10 {
            background-color: #ECFDF5 !important;
            border-color: #A7F3D0 !important;
            color: #059669 !important;
        }

        /* Mobile Navigation Drawer System-Wide Overrides for Workstation Light Theme */
        body.light-theme #mobile-nav-drawer {
            background-color: #FFFFFF !important;
            border-right: 1px solid #E2E8F0 !important;
            box-shadow: 10px 0 40px rgba(0, 0, 0, 0.08) !important;
            color: #0F172A !important;
        }

        body.light-theme #mobile-nav-drawer .text-slate-100 {
            color: #0F172A !important;
        }

        body.light-theme #mobile-nav-drawer .text-slate-200,
        body.light-theme #mobile-nav-drawer .text-slate-300 {
            color: #1E293B !important;
        }

        body.light-theme #mobile-nav-drawer .text-slate-400,
        body.light-theme #mobile-nav-drawer .text-slate-500 {
            color: #64748B !important;
        }

        body.light-theme #mobile-nav-drawer .bg-surface,
        body.light-theme #mobile-nav-drawer [class*="bg-surface"] {
            background-color: #F8FAFC !important;
            border-color: #E2E8F0 !important;
        }

        body.light-theme #mobile-nav-drawer .bg-surface-elevated {
            background-color: #F1F5F9 !important;
            border-color: #CBD5E1 !important;
        }

        body.light-theme #mobile-nav-drawer .bg-slate-800 {
            background-color: #F1F5F9 !important;
            color: #475569 !important;
            border-color: #CBD5E1 !important;
        }

        body.light-theme #mobile-nav-drawer .border-border,
        body.light-theme #mobile-nav-drawer .border-t,
        body.light-theme #mobile-nav-drawer .border-b {
            border-color: #E2E8F0 !important;
        }

        body.light-theme #mobile-nav-drawer button:hover,
        body.light-theme #mobile-nav-drawer a:hover {
            background-color: #F1F5F9 !important;
            border-color: #CBD5E1 !important;
        }

        /* User Profile Dropdown in Header */
        body.light-theme #user-profile-dropdown {
            background-color: #FFFFFF !important;
            border: 1px solid #E2E8F0 !important;
            box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1) !important;
        }

        body.light-theme #user-profile-dropdown .border-slate-800 {
            border-color: #E2E8F0 !important;
        }

        body.light-theme #user-profile-dropdown #user-dropdown-name {
            color: #0F172A !important;
        }

        body.light-theme #user-profile-dropdown #user-dropdown-email {
            color: #64748B !important;
        }

        body.light-theme #user-profile-dropdown button:hover {
            background-color: #F8FAFC !important;
        }

        /* Mobile Hamburger Button in Light Theme */
        body.light-theme #mobile-nav-toggle-btn {
            background-color: #F8FAFC !important;
            border-color: #E2E8F0 !important;
            color: #0F172A !important;
        }

        body.light-theme #mobile-nav-toggle-btn:hover {
            background-color: #F1F5F9 !important;
            border-color: #D4A300 !important;
            color: #B45309 !important;
        }

        /* Theme Slider in Light Theme */
        body.light-theme .slider {
            background-color: #E2E8F0 !important;
            border: 1px solid #CBD5E1 !important;
            box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.06) !important;
        }

        body.light-theme .slider:before {
            background: #D4A300 !important;
            box-shadow: 0 1px 4px rgba(0, 0, 0, 0.15), 0 0 8px rgba(212, 163, 0, 0.3) !important;
        }

        body.light-theme input:checked+.slider {
            background-color: #CBD5E1 !important;
            border-color: #94A3B8 !important;
        }

        body.light-theme input:checked+.slider:before {
            background: #B45309 !important;
            box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2), 0 0 10px rgba(180, 83, 9, 0.4) !important;
        }

        /* Tactical Console & Result Cards in Light Theme */
        body.light-theme .tactical-card {
            background-color: #FFFFFF !important;
            border: 1px solid #E2E8F0 !important;
            box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04) !important;
        }

        body.light-theme .tactical-card>div.bg-surface {
            background-color: #F8FAFC !important;
        }

        body.light-theme .tactical-card .bg-background {
            background-color: #FFFFFF !important;
        }

        body.light-theme .tactical-card .bg-border {
            background-color: #E2E8F0 !important;
        }

        body.light-theme #terminal-clock {
            color: #0F172A !important;
        }

        body.light-theme .card-anim {
            background-color: #FFFFFF !important;
            border: 1px solid #E2E8F0 !important;
            box-shadow: 0 1px 4px rgba(0, 0, 0, 0.03) !important;
        }

        body.light-theme .card-anim:hover {
            background-color: #FFFFFF !important;
            border-color: #CBD5E1 !important;
            box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06) !important;
        }

        body.light-theme .ticker-name-text {
            color: #0F172A !important;
            font-weight: 800 !important;
        }

        /* ============================================================
           ChartLoop TERMINAL PILL CONTROLS & FLOATING HUD (DARK & LIGHT)
        ============================================================ */

        /* 1. Capsule Pill Groups (View Mode & Grid Switcher) */
        .hud-pill-group {
            background-color: #0A0A0A !important;
            border: 1px solid #222222 !important;
            box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.6) !important;
        }

        .hud-pill-btn {
            background-color: transparent !important;
            color: #71717A !important;
            border: 1px solid transparent !important;
            transition: all 0.15s ease-in-out !important;
            cursor: pointer !important;
            font-weight: 700 !important;
        }

        .hud-pill-btn:hover {
            color: #FFC400 !important;
        }

        .hud-pill-btn-active {
            background-color: #181818 !important;
            color: #FFC400 !important;
            border: 1px solid rgba(255, 196, 0, 0.45) !important;
            box-shadow: 0 1px 4px rgba(0, 0, 0, 0.6), 0 0 10px rgba(255, 196, 0, 0.18) !important;
            font-weight: 800 !important;
        }

        /* 2. Floating Terminal HUD Dock */
        .hud-dock-bar {
            background-color: rgba(10, 10, 10, 0.96) !important;
            border: 1px solid rgba(255, 255, 255, 0.12) !important;
            backdrop-filter: blur(16px) !important;
            -webkit-backdrop-filter: blur(16px) !important;
            box-shadow: 0 12px 45px rgba(0, 0, 0, 0.85), 0 0 1px rgba(255, 196, 0, 0.25) !important;
        }

        #floating-scan-btn {
            background-color: #FFC400 !important;
            color: #000000 !important;
        }

        #floating-scan-btn:hover {
            background-color: #FFD43B !important;
        }

        .hud-divider {
            background-color: rgba(255, 255, 255, 0.12) !important;
        }

        .hud-action-btn {
            color: #A1A1AA !important;
        }

        .hud-action-btn:hover {
            color: #FFC400 !important;
            background-color: rgba(255, 196, 0, 0.08) !important;
        }

        .hud-muted-label {
            color: #71717A !important;
        }

        /* 3. Floating Filters Popover */
        #floating-filters-popover {
            background-color: #0A0A0A !important;
            border: 1px solid #222222 !important;
            box-shadow: 0 16px 40px rgba(0, 0, 0, 0.9) !important;
        }

        .popover-header {
            border-color: rgba(255, 255, 255, 0.08) !important;
        }

        .popover-title,
        .popover-label {
            color: #71717A !important;
        }

        .popover-select {
            background-color: #121212 !important;
            border: 1px solid #282828 !important;
            color: #E2E8F0 !important;
        }

        .popover-select:focus {
            border-color: rgba(255, 196, 0, 0.5) !important;
        }

        /* ── LIGHT THEME OVERRIDES FOR PILL CONTROLS & FLOATING HUD ── */
        body.light-theme .hud-pill-group {
            background-color: #EBF2FC !important;
            border: 1px solid #DCE6F5 !important;
            box-shadow: inset 0 1px 2px rgba(37, 99, 235, 0.04) !important;
        }

        body.light-theme .hud-pill-btn {
            color: #64748B !important;
        }

        body.light-theme .hud-pill-btn:hover {
            color: #2563EB !important;
        }

        body.light-theme .hud-pill-btn-active {
            background-color: #FFFFFF !important;
            color: #2563EB !important;
            border: 1px solid rgba(220, 230, 245, 0.9) !important;
            box-shadow: 0 1px 3px rgba(37, 99, 235, 0.1), 0 1px 2px rgba(0, 0, 0, 0.04) !important;
            font-weight: 700 !important;
        }

        body.light-theme .hud-dock-bar {
            background-color: rgba(255, 255, 255, 0.96) !important;
            border: 1px solid #DCE6F5 !important;
            box-shadow: 0 12px 32px rgba(37, 99, 235, 0.15), 0 2px 8px rgba(15, 23, 42, 0.06) !important;
        }

        body.light-theme #floating-scan-btn {
            background-color: #EFF6FF !important;
            background-image: none !important;
            color: #2563EB !important;
            border: 1px solid #BFDBFE !important;
            box-shadow: 0 1px 3px rgba(37, 99, 235, 0.08) !important;
            font-weight: 700 !important;
        }

        body.light-theme #floating-scan-btn:hover {
            background-color: #DBEAFE !important;
            border-color: #93C5FD !important;
            color: #1D4ED8 !important;
            box-shadow: 0 2px 6px rgba(37, 99, 235, 0.15) !important;
        }

        body.light-theme #floating-scan-btn #floating-scan-icon {
            color: #2563EB !important;
        }

        body.light-theme .hud-divider {
            background-color: #E2E8F0 !important;
        }

        body.light-theme .hud-action-btn {
            color: #64748B !important;
        }

        body.light-theme .hud-action-btn:hover {
            color: #2563EB !important;
            background-color: #EBF2FC !important;
        }

        body.light-theme .hud-muted-label {
            color: #94A3B8 !important;
        }

        body.light-theme #floating-filters-popover {
            background-color: #FFFFFF !important;
            border: 1px solid #DCE6F5 !important;
            box-shadow: 0 16px 36px rgba(15, 23, 42, 0.12) !important;
        }

        body.light-theme .popover-header {
            border-color: #E2E8F0 !important;
        }

        body.light-theme .popover-title,
        body.light-theme .popover-label {
            color: #64748B !important;
        }

        body.light-theme .popover-select {
            background-color: #F8FAFC !important;
            border: 1px solid #CBD5E1 !important;
            color: #0F172A !important;
        }
    
        /* ============================================================
           COMPREHENSIVE LIGHT THEME — ZERO UNWANTED YELLOW / AMBER
        ============================================================ */
        body.light-theme .text-amber-300,
        body.light-theme .text-amber-400,
        body.light-theme .text-amber-500,
        body.light-theme .text-amber-600 {
            color: #2563EB !important;
        }

        body.light-theme .bg-amber-500\/5,
        body.light-theme .bg-amber-500\/10,
        body.light-theme .bg-amber-500\/15,
        body.light-theme .bg-amber-500\/20,
        body.light-theme .bg-amber-500\/25,
        body.light-theme .bg-amber-500\/30,
        body.light-theme .bg-amber-400\/20 {
            background-color: #EBF2FC !important;
        }

        body.light-theme .border-amber-500\/20,
        body.light-theme .border-amber-500\/25,
        body.light-theme .border-amber-500\/30,
        body.light-theme .border-amber-500\/40,
        body.light-theme .border-amber-500\/50,
        body.light-theme .border-amber-400,
        body.light-theme .border-amber-300 {
            border-color: #BFDBFE !important;
        }

        body.light-theme .hover\:border-amber-500\/30:hover,
        body.light-theme .hover\:border-amber-500\/40:hover,
        body.light-theme .hover\:border-amber-500\/50:hover {
            border-color: #93C5FD !important;
        }

        body.light-theme .hover\:bg-amber-500\/10:hover,
        body.light-theme .hover\:bg-amber-500\/20:hover,
        body.light-theme .hover\:bg-amber-500\/25:hover {
            background-color: #DBEAFE !important;
        }

        body.light-theme .hover\:text-amber-400:hover,
        body.light-theme .group:hover .group-hover\:text-amber-400 {
            color: #2563EB !important;
        }

        /* Top glowing accent lines across modals & headers */
        body.light-theme [class*="from-amber-"],
        body.light-theme .from-amber-400,
        body.light-theme .from-amber-500,
        body.light-theme .from-amber-600 {
            --tw-gradient-from: #2563EB var(--tw-gradient-from-position) !important;
            --tw-gradient-to: #1D4ED8 var(--tw-gradient-to-position) !important;
            --tw-gradient-stops: var(--tw-gradient-from), #38BDF8 var(--tw-gradient-via-position), var(--tw-gradient-to) !important;
        }

        /* Header Navigation Buttons in Light Theme */
        body.light-theme a[href="/filters_guide.html"] {
            background-color: #EBF2FC !important;
            color: #2563EB !important;
            border: 1px solid #BFDBFE !important;
        }
        body.light-theme a[href="/filters_guide.html"]:hover {
            background-color: #DBEAFE !important;
            border-color: #93C5FD !important;
            color: #1D4ED8 !important;
        }

        body.light-theme #nav-upgrade-btn {
            background: #EFF6FF !important;
            color: #2563EB !important;
            border: 1px solid #BFDBFE !important;
            box-shadow: 0 1px 3px rgba(37, 99, 235, 0.08) !important;
            font-weight: 700 !important;
            border-radius: 6px !important;
        }
        body.light-theme #nav-upgrade-btn svg {
            color: #2563EB !important;
        }
        body.light-theme #nav-upgrade-btn:hover {
            background: #DBEAFE !important;
            border-color: #93C5FD !important;
            color: #1D4ED8 !important;
            box-shadow: 0 2px 6px rgba(37, 99, 235, 0.15) !important;
        }

        body.light-theme #auth-login-btn {
            background-color: #EBF2FC !important;
            color: #2563EB !important;
            border: 1px solid #BFDBFE !important;
        }
        body.light-theme #auth-login-btn:hover {
            background-color: #DBEAFE !important;
            border-color: #93C5FD !important;
            color: #1D4ED8 !important;
        }
        body.light-theme #auth-login-btn svg {
            color: #2563EB !important;
        }

        body.light-theme button[onclick="toggleWatchlistDrawer(true)"] {
            background-color: #EBF2FC !important;
            color: #2563EB !important;
            border: 1px solid #BFDBFE !important;
        }
        body.light-theme button[onclick="toggleWatchlistDrawer(true)"]:hover {
            background-color: #DBEAFE !important;
            border-color: #93C5FD !important;
        }
        body.light-theme #watchlist-header-badge,
        body.light-theme #watchlist-mobile-header-badge {
            background-color: #2563EB !important;
            color: #FFFFFF !important;
        }

        /* Cyber Checkboxes in Light Theme */
        body.light-theme .cyber-checkbox {
            background: #FFFFFF !important;
            border-color: #CBD5E1 !important;
        }
        body.light-theme .cyber-checkbox:checked {
            background-color: #2563EB !important;
            border-color: #1D4ED8 !important;
            box-shadow: 0 0 6px rgba(37, 99, 235, 0.35) !important;
        }
        body.light-theme .cyber-checkbox:checked::after {
            color: #FFFFFF !important;
        }

        /* Theme Toggle Slider */
        body.light-theme .slider {
            background-color: #E2E8F0 !important;
            border: 1px solid #CBD5E1 !important;
        }
        body.light-theme .slider:before {
            background: #2563EB !important;
            box-shadow: 0 1px 4px rgba(37, 99, 235, 0.3) !important;
        }
        body.light-theme input:checked + .slider {
            background-color: #BFDBFE !important;
            border-color: #93C5FD !important;
        }
        body.light-theme input:checked + .slider:before {
            background: #2563EB !important;
        }

        body.light-theme #mobile-nav-toggle-btn:hover {
            background-color: #F1F5F9 !important;
            border-color: #BFDBFE !important;
            color: #2563EB !important;
        }

        /* Select Dropdowns in Light Theme — Clean Native Arrow, Zero Repeating Blue V Shapes */
        body.light-theme select {
            background-image: none !important;
        }

        body.light-theme #new-scanner-modal select {
            background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%232563EB'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'%3E%3C/path%3E%3C/svg%3E") !important;
            background-repeat: no-repeat !important;
            background-position: right 0.65rem center !important;
            background-size: 0.9em !important;
        }

        /* Chunk Filter Item in Light Theme — Royal Blue, Zero Yellow */
        body.light-theme .chunk-filter-item.text-accent,
        body.light-theme .chunk-filter-item[class*="text-[#D4A300]"],
        body.light-theme .chunk-filter-item[class*="text-blue"],
        body.light-theme .chunk-filter-item .selector-bullet {
            color: #2563EB !important;
        }
        body.light-theme .chunk-filter-item.bg-accent\/10,
        body.light-theme .chunk-filter-item[class*="bg-blue-50"] {
            background-color: #EBF2FC !important;
            border-color: #BFDBFE !important;
        }

        /* Brand Logo in Light Theme */
        body.light-theme .brand-glow {
            text-shadow: none !important;
            color: #2563EB !important;
        }
        body.light-theme .brand-text .text-accent {
            color: #2563EB !important;
        }
        body.light-theme svg path[fill="#FFC400"]:not(.star-icon) {
            fill: #2563EB !important;
        }
        body.light-theme svg path[stroke="#FFC400"]:not(.star-icon) {
            stroke: #2563EB !important;
        }

        /* Strategy Builder Modal in Light Theme */
        body.light-theme #new-scanner-modal > div {
            background-color: #FFFFFF !important;
            border: 1px solid #E2E8F0 !important;
            box-shadow: 0 20px 50px rgba(15, 23, 42, 0.12) !important;
            color: #0F172A !important;
        }
        body.light-theme #new-scanner-modal .bg-\[\#000000\],
        body.light-theme #new-scanner-modal .bg-\[\#0a0a0a\],
        body.light-theme #new-scanner-modal .bg-\[\#121212\] {
            background-color: #FFFFFF !important;
        }
        body.light-theme #new-scanner-modal .border-border {
            border-color: #E2E8F0 !important;
        }
        body.light-theme #new-scanner-modal input,
        body.light-theme #new-scanner-modal select {
            background-color: #F8FAFC !important;
            border: 1px solid #CBD5E1 !important;
            color: #0F172A !important;
        }
        body.light-theme #new-scanner-modal input:focus,
        body.light-theme #new-scanner-modal select:focus {
            border-color: #2563EB !important;
            box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.15) !important;
        }
        body.light-theme #new-scanner-modal .swing-filter-card {
            background-color: #F8FAFC !important;
            border: 1px solid #E2E8F0 !important;
        }
        body.light-theme #new-scanner-modal .swing-filter-card:hover {
            border-color: #BFDBFE !important;
        }

        body.light-theme #save-custom-scanner-btn {
            background: linear-gradient(135deg, #2563EB 0%, #1D4ED8 100%) !important;
            color: #FFFFFF !important;
            border: 1px solid #1D4ED8 !important;
            box-shadow: 0 2px 8px rgba(37, 99, 235, 0.28) !important;
        }
        body.light-theme #save-custom-scanner-btn:hover {
            background: linear-gradient(135deg, #1D4ED8 0%, #1E40AF 100%) !important;
            box-shadow: 0 4px 14px rgba(37, 99, 235, 0.38) !important;
        }

        /* Pricing Modal CTA Button in Light Theme */
        body.light-theme #pricing-upgrade-btn {
            background: linear-gradient(135deg, #2563EB 0%, #1D4ED8 100%) !important;
            color: #FFFFFF !important;
            border: 1px solid #1D4ED8 !important;
            box-shadow: 0 4px 14px rgba(37, 99, 235, 0.28) !important;
        }
        body.light-theme #pricing-upgrade-btn:hover {
            background: linear-gradient(135deg, #1D4ED8 0%, #1E40AF 100%) !important;
        }

        /* Live Cursor in Light Theme */
        body.light-theme .live-cursor::after {
            color: #2563EB !important;
        }

        /* --- Heatmap Light Theme Adjustments --- */
        body.light-theme #heatmap-view-container {
            background-color: #FFFFFF !important;
            border-color: #E2E8F0 !important;
            box-shadow: 0 4px 20px -2px rgba(15, 23, 42, 0.06);
        }
        body.light-theme #heatmap-view-container .border-b {
            border-color: #F1F5F9 !important;
        }
        body.light-theme #heatmap-view-container select#heatmap-universe-select {
            background-color: #F8FAFC !important;
            border-color: #CBD5E1 !important;
            color: #0F172A !important;
        }
        body.light-theme #heatmap-view-container select#heatmap-universe-select option {
            background-color: #FFFFFF !important;
            color: #0F172A !important;
        }
        body.light-theme #heatmap-view-container span.text-slate-400 {
            color: #475569 !important;
        }
        #heatmap-popover-tooltip {
            pointer-events: none !important;
            transform: translate3d(0, 0, 0);
            will-change: left, top;
            transition: opacity 0.08s ease;
        }
        body.light-theme #heatmap-popover-tooltip {
            background-color: rgba(255, 255, 255, 0.98) !important;
            border-color: #E2E8F0 !important;
            color: #0F172A !important;
            box-shadow: 0 20px 35px -4px rgba(15, 23, 42, 0.14), 0 6px 16px rgba(15, 23, 42, 0.06) !important;
        }
        body:not(.light-theme) #heatmap-popover-tooltip {
            background-color: rgba(12, 16, 29, 0.96) !important;
            border-color: rgba(51, 65, 85, 0.8) !important;
            color: #F8FAFC !important;
            box-shadow: 0 20px 35px rgba(0, 0, 0, 0.85) !important;
        }
