:root {
  /* ==========================================================================
     DEFAULT: TRUE AMOLED DARK DISPLAY
     ========================================================================== */
  --bg-primary: #000000;              /* True 100% AMOLED Pitch Black */
  --bg-secondary: #080b11;            /* Deep Obsidian Elevation 1 */
  --bg-surface: #101522;              /* High-Contrast Surface Elevation 2 */
  --bg-surface-hover: #171f32;
  --bg-glass: rgba(8, 11, 17, 0.88);
  --bg-glass-card: rgba(14, 19, 31, 0.85);
  --bg-glass-subtle: rgba(255, 255, 255, 0.05);

  /* Visible Borders with high OLED contrast */
  --border-subtle: rgba(255, 255, 255, 0.14);
  --border-light: rgba(255, 255, 255, 0.24);
  --border-focus: rgba(99, 102, 241, 0.85);

  /* Brand Accents */
  --primary: #6366f1;
  --primary-hover: #4f46e5;
  --primary-glow: rgba(99, 102, 241, 0.45);
  --primary-gradient: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
  --accent-cyan: #06b6d4;

  /* Status Colors (High Contrast on True Black) */
  --income: #10b981;
  --income-hover: #059669;
  --income-glow: rgba(16, 185, 129, 0.35);
  --income-subtle: rgba(16, 185, 129, 0.18);

  --expense: #f43f5e;
  --expense-hover: #e11d48;
  --expense-glow: rgba(244, 63, 94, 0.35);
  --expense-subtle: rgba(244, 63, 94, 0.18);

  --warning: #fbbf24;
  --warning-subtle: rgba(251, 191, 36, 0.18);
  --info: #38bdf8;

  /* High-Contrast Surface & Card Aliases */
  --bg-card: var(--bg-glass-card);
  --bg-hover: var(--bg-surface-hover);
  --border-medium: var(--border-light);
  --primary-subtle: rgba(99, 102, 241, 0.16);
  --text-secondary: var(--text-muted);

  /* High Visibility Typography for AMOLED */
  --text-main: #ffffff;
  --text-muted: #cbd5e1;
  --text-dim: #94a3b8;
  --text-inverse: #000000;

  /* Spacing Scale (8pt rhythmic spatial scale) */
  --space-3xs: 0.125rem; /* 2px */
  --space-2xs: 0.25rem;  /* 4px */
  --space-xs: 0.5rem;    /* 8px */
  --space-sm: 0.75rem;   /* 12px */
  --space-md: 1rem;      /* 16px */
  --space-lg: 1.5rem;    /* 24px */
  --space-xl: 2rem;      /* 32px */
  --space-2xl: 3rem;     /* 48px */

  /* Typography */
  --font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  /* Border Radii */
  --radius-xs: 6px;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 22px;
  --radius-full: 9999px;

  /* Shadows */
  --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.4);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.6);
  --shadow-lg: 0 10px 32px rgba(0, 0, 0, 0.8);
  --shadow-glow: 0 0 25px var(--primary-glow);

  /* Motion & Easing Tokens */
  --ease-out-quart: cubic-bezier(0.25, 1, 0.5, 1);
  --ease-out-quint: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out-smooth: cubic-bezier(0.4, 0, 0.2, 1);

  --duration-instant: 120ms;
  --duration-fast: 200ms;
  --duration-normal: 300ms;
  --duration-smooth: 450ms;

  --transition-instant: var(--duration-instant) var(--ease-out-quint);
  --transition-fast: var(--duration-fast) var(--ease-out-quart);
  --transition-normal: var(--duration-normal) var(--ease-out-quint);
  --transition-smooth: var(--duration-smooth) var(--ease-out-expo);

  /* Z-Index Hierarchy */
  --z-header: 40;
  --z-nav: 50;
  --z-fab: 45;
  --z-modal-backdrop: 100;
  --z-modal: 101;
  --z-toast: 200;
}

/* ==========================================================================
   MODERN, CRISP & COMPACT LIGHT MODE
   ========================================================================== */
[data-theme="light"] {
  --bg-primary: #f8fafc;
  --bg-secondary: #ffffff;
  --bg-surface: #f1f5f9;
  --bg-surface-hover: #e2e8f0;
  --bg-glass: rgba(255, 255, 255, 0.9);
  --bg-glass-card: #ffffff;
  --bg-glass-subtle: rgba(0, 0, 0, 0.03);

  --border-subtle: #e2e8f0;
  --border-light: #cbd5e1;
  --border-focus: #4f46e5;

  --primary: #4f46e5;
  --primary-hover: #4338ca;
  --primary-glow: rgba(79, 70, 229, 0.22);
  --primary-gradient: linear-gradient(135deg, #4f46e5 0%, #6366f1 100%);
  --accent-cyan: #0891b2;

  --income: #059669;
  --income-hover: #047857;
  --income-glow: rgba(5, 150, 105, 0.2);
  --income-subtle: rgba(5, 150, 105, 0.1);

  --expense: #e11d48;
  --expense-hover: #be123c;
  --expense-glow: rgba(225, 29, 72, 0.2);
  --expense-subtle: rgba(225, 29, 72, 0.1);

  --warning: #d97706;
  --warning-subtle: rgba(217, 119, 6, 0.1);
  --info: #0284c7;

  /* High-Contrast Light Mode Aliases */
  --bg-card: #ffffff;
  --bg-hover: var(--bg-surface-hover);
  --border-medium: var(--border-light);
  --primary-subtle: rgba(79, 70, 229, 0.12);
  --text-secondary: var(--text-muted);

  /* High-Contrast Light Mode Typography */
  --text-main: #0f172a;
  --text-muted: #475569;
  --text-dim: #64748b;
  --text-inverse: #ffffff;

  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.06);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 12px 28px rgba(0, 0, 0, 0.12);
  --shadow-glow: 0 0 15px rgba(79, 70, 229, 0.15);
}
