
:root {
  color-scheme: light dark;
  --bg-base: #050b2e;
  --bg-elevated: #0a1850;
  --bg-surface: #102068;
  --bg-raised: #1a2e80;
  --bg-overlay: #050f2a;
  --bg-base-rgb: 5, 11, 46;
  --bg-elevated-rgb: 10, 24, 80;
  --bg-surface-rgb: 16, 32, 104;
  --bg-raised-rgb: 26, 46, 128;
  --accent-fill: #f2c94c;
  --accent-ink: #f2c94c;
  --accent-fill-rgb: 242, 201, 76;
  --accent-teal: #00c9b8;
  --accent-teal-rgb: 0, 201, 184;
  --accent-purple: #9b87f5;
  --accent-purple-rgb: 155, 135, 245;
  --accent-amber: #f59e0b;
  --accent-amber-rgb: 245, 158, 11;
  --accent-green: #4ade80;
  --accent-green-rgb: 74, 222, 128;
  --accent-red: #f87171;
  --accent-red-rgb: 248, 113, 113;
  --text-primary: #e8eeff;
  --text-secondary: #a8b8e8;
  --text-muted: #8090c0;
  --text-inverse: #050b2e;
  --button-primary-text: #050b2e;
  --border-subtle: #1e3080;
  --border-subtle-rgb: 30, 48, 128;
  --border-active: #4a6ae0;
  --border-active-rgb: 74, 106, 224;
  --shadow-card: 0 24px 54px rgba(2, 6, 23, 0.34);
  --shadow-soft: 0 14px 34px rgba(2, 6, 23, 0.26);
  --shadow-glow: 0 0 0 1px rgba(var(--accent-fill-rgb), 0.24), 0 18px 36px rgba(var(--accent-fill-rgb), 0.18);
  --buy: #4ade80;
  --watch: #f59e0b;
  --avoid: #f87171;
  --pillar-value: #4ade80;
  --pillar-quality: #9b87f5;
  --pillar-risk: #f87171;
  --pillar-dip: #f59e0b;
  --table-surface: var(--bg-elevated);
  --table-border: rgba(112, 144, 192, 0.26);
  --table-head-bg: rgba(26, 46, 128, 0.75);
  --table-head-text: #b9c5eb;
  --table-header-active: var(--accent-ink);
  --table-row-bg: rgba(10, 24, 80, 0.92);
  --table-row-alt: rgba(15, 30, 96, 0.96);
  --table-row-hover: rgba(23, 41, 115, 0.98);
  --table-sticky-bg: rgba(10, 24, 80, 0.96);
  --table-sticky-bg-alt: rgba(15, 30, 96, 0.98);
  --table-sticky-hover: rgba(23, 41, 115, 1);
  --table-grid: rgba(112, 144, 192, 0.25);
  --table-blur-text: rgba(203, 213, 225, 0.56);
  --table-blur-text-soft: rgba(148, 163, 184, 0.45);
  --table-positive: var(--buy);
  --table-negative: var(--avoid);
  --bg-dark: var(--bg-base);
  --bg-card: var(--bg-elevated);
  --border-color: rgba(168, 184, 232, 0.18);
  --accent-green-dark: #178a46;
  --accent-red-dark: #ef4444;
  --card-radius: 18px;
  --shadow: var(--shadow-card);
}

@media (prefers-color-scheme: light) {
  :root {
    color-scheme: light;
    --bg-base: #f6f8ff;
    --bg-elevated: #ffffff;
    --bg-surface: #eef3ff;
    --bg-raised: #dde7ff;
    --bg-overlay: #d9e3fb;
    --bg-base-rgb: 246, 248, 255;
    --bg-elevated-rgb: 255, 255, 255;
    --bg-surface-rgb: 238, 243, 255;
    --bg-raised-rgb: 221, 231, 255;
    --accent-fill: #c9a030;
    --accent-ink: #8a6200;
    --accent-fill-rgb: 201, 160, 48;
    --accent-teal: #007a6e;
    --accent-teal-rgb: 0, 122, 110;
    --accent-purple: #5e38cc;
    --accent-purple-rgb: 94, 56, 204;
    --accent-amber: #b45309;
    --accent-amber-rgb: 180, 83, 9;
    --accent-green: #15803d;
    --accent-green-rgb: 21, 128, 61;
    --accent-red: #c53030;
    --accent-red-rgb: 197, 48, 48;
    --text-primary: #0f172a;
    --text-secondary: #334155;
    --text-muted: #64748b;
    --text-inverse: #ffffff;
    --button-primary-text: #0a0d2e;
    --border-subtle: #cdd7ee;
    --border-subtle-rgb: 205, 215, 238;
    --border-active: #4060d0;
    --border-active-rgb: 64, 96, 208;
    --shadow-card: 0 20px 48px rgba(64, 96, 208, 0.12);
    --shadow-soft: 0 10px 28px rgba(64, 96, 208, 0.1);
    --shadow-glow: 0 0 0 1px rgba(var(--accent-fill-rgb), 0.2), 0 18px 34px rgba(var(--accent-fill-rgb), 0.12);
    --buy: #15803d;
    --watch: #b45309;
    --avoid: #c53030;
    --pillar-value: #15803d;
    --pillar-quality: #5e38cc;
    --pillar-risk: #c53030;
    --pillar-dip: #b45309;
    --table-surface: #ffffff;
    --table-border: rgba(80, 96, 160, 0.16);
    --table-head-bg: rgba(228, 235, 255, 0.92);
    --table-head-text: #42526b;
    --table-header-active: var(--accent-ink);
    --table-row-bg: rgba(255, 255, 255, 0.96);
    --table-row-alt: rgba(245, 248, 255, 0.96);
    --table-row-hover: rgba(233, 239, 255, 0.96);
    --table-sticky-bg: rgba(255, 255, 255, 0.98);
    --table-sticky-bg-alt: rgba(245, 248, 255, 0.98);
    --table-sticky-hover: rgba(233, 239, 255, 1);
    --table-grid: rgba(80, 96, 160, 0.16);
    --table-blur-text: rgba(71, 85, 105, 0.72);
    --table-blur-text-soft: rgba(100, 116, 139, 0.56);
    --bg-dark: var(--bg-base);
    --bg-card: var(--bg-elevated);
    --border-color: rgba(64, 96, 208, 0.16);
    --accent-green-dark: #0f6b35;
    --accent-red-dark: #a92d2d;
    --card-radius: 18px;
    --shadow: var(--shadow-card);
  }
}
