/*
 * GEX dark theme (2026-09-27 redesign).
 * Loaded after styles.css / health-styles.css / core.css and overrides their
 * :root tokens, so legacy pages inherit the new palette without per-page edits.
 * Colour roles: amber = spot / "you are here"; blue = positive gamma;
 * orange = negative gamma; green/red stay for P&L on legacy book pages.
 */
:root {
    color-scheme: dark;

    --bg-primary: #0F1115;
    --bg-secondary: #13161B;
    --bg-card: #171A20;
    --bg-hover: #1D2129;
    --bg-elevated: #1B1F26;

    --text-primary: #E8E6E1;
    --text-secondary: #B4B8C0;
    --text-muted: #8D929C;

    --border-color: #262A33;
    --border-hover: #3A3F4A;

    --accent-primary: #3373E0;
    --accent-blue: #6AA8FF;
    --accent-green: #4CC38A;
    --accent-red: #F0706A;
    --accent-yellow: #E9A23B;
    --accent-amber: #E9A23B;
    --accent-purple: #B08CFF;
    --accent-cyan: #4FC3D9;
    --accent-orange: #F2884B;

    --gamma-pos: #6AA8FF;
    --gamma-neg: #F2884B;
    --spot: #E9A23B;

    --gradient-bull: linear-gradient(135deg, #2E8F63 0%, #23704D 100%);
    --gradient-bear: linear-gradient(135deg, #C8514B 0%, #A23F3A 100%);
    --gradient-primary: linear-gradient(135deg, #3373E0 0%, #2A5FBB 100%);
    --gradient-card: linear-gradient(160deg, #171A20 0%, #171A20 100%);

    --shadow-sm: none;
    --shadow-md: 0 2px 8px rgba(0, 0, 0, 0.35);
    --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.45);
    --glow-blue: none;
    --glow-green: none;
    --glow-red: none;
    --glow-primary: none;

    --font-display: 'Instrument Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-primary: 'Instrument Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-serif: 'Instrument Serif', Georgia, serif;
    --font-mono: 'JetBrains Mono', 'DM Mono', monospace;

    --sidebar-width: 208px;
}

body { background-color: var(--bg-primary); line-height: 1.55; }

/* ---- shell ---- */
.sidebar { background: var(--bg-primary); box-shadow: none; }
.sidebar-brand { min-height: 64px; padding: 16px 20px; }
.brand-name { font-family: var(--font-mono); font-weight: 500; letter-spacing: 0.08em; font-size: 16px; }
.nav-item { padding: 10px 16px 10px 20px; margin: 2px 10px; border-radius: 8px; color: var(--text-secondary); font-size: 14px; }
.nav-item:hover { color: var(--text-primary); }
.nav-item.active { background: var(--bg-hover); color: var(--text-primary); font-weight: 600; }
.nav-item.active::before { display: none; }
.nav-item-health { margin: 0 0 8px; padding-left: 10px; font-size: 13px; }
.sidebar-footer { padding: 12px 10px; }

.top-bar { background: var(--bg-primary); box-shadow: none; height: 56px; }
/* Search only filters the pattern screener; show it only there. */
body:not([data-page="screener"]) .search-container { visibility: hidden; }
/* Regime and VIX are stated once, on Today; the global pills duplicated it on every page. */
.top-bar .regime-pill,
.top-bar .vix-widget { display: none; }

.section-tab.active { background: var(--bg-hover); border-color: var(--border-hover); color: var(--text-primary); }

/* ---- legacy light-only surfaces ---- */
.configuration-banner { background: #1C1810; border-color: #4A3A22; color: #E4D3B5; }
.ocmd-context-strip { background: var(--bg-card); border-color: var(--border-color); }

/* ---- strike profile (Levels) : blue/orange by gamma sign, amber spot ---- */
.gex-profile-grid { stroke: rgba(255, 255, 255, 0.05); }
.gex-profile-axis { stroke: rgba(255, 255, 255, 0.18); }
.gex-profile-bar.positive { fill: var(--gamma-pos); }
.gex-profile-bar.negative { fill: var(--gamma-neg); }
.gex-profile-bar.call-wall, .gex-profile-bar.put-wall { stroke: var(--text-primary); stroke-width: 1.5; }
.gex-profile-marker.spot { stroke: var(--spot); stroke-width: 2; }
.gex-profile-marker.flip { stroke: var(--text-primary); }
.gex-profile-marker.call-wall { stroke: var(--gamma-pos); }
.gex-profile-marker.put-wall { stroke: var(--gamma-neg); }
.gex-profile-marker-label.spot { fill: var(--spot); }
.gex-profile-marker-label.flip { fill: var(--text-primary); }
.gex-profile-marker-label.call-wall { fill: var(--gamma-pos); }
.gex-profile-marker-label.put-wall { fill: var(--gamma-neg); }
.legend-swatch.positive { background: var(--gamma-pos) !important; }
.legend-swatch.negative { background: var(--gamma-neg) !important; }
.legend-swatch.spot { background: var(--spot) !important; }
.legend-swatch.flip { background: var(--text-primary) !important; }
.legend-swatch.call-wall { background: var(--gamma-pos) !important; }
.legend-swatch.put-wall { background: var(--gamma-neg) !important; }
