/* ===================================
   CSS Custom Properties (Variables)
   Deep Space design tokens — see DESIGN.md.
   The app surface is a single committed dark theme:
   the void carries the brand, Orbit Violet commands,
   Comet Cyan signals, Solar Amber beacons.
   =================================== */

:root {
    color-scheme: dark;

    /* ---------- Brand Colors ---------- */
    --color-primary: #7C6CF0;          /* Orbit Violet */
    --color-primary-hover: #8F81F3;
    --color-primary-light: #A78BFA;    /* Orbit Violet Soft */
    --color-primary-dark: #5A67E8;

    --color-secondary: #8B93B8;
    --color-secondary-hover: #A3ABCC;

    --color-accent: #4FD8EB;           /* Comet Cyan */
    --color-beacon: #F6B03F;           /* Solar Amber — at most once per viewport */

    /* ---------- Semantic Colors ---------- */
    --color-success: #34D399;
    --color-success-light: rgba(52, 211, 153, 0.14);
    --color-success-text: #6EE7B7;
    --color-warning: #F6B03F;
    --color-warning-light: rgba(246, 176, 63, 0.14);
    --color-warning-text: #F9C468;
    --color-danger: #EF4444;
    --color-danger-hover: #F87171;
    --color-danger-dark: #DC2626;
    --color-danger-light: rgba(248, 113, 113, 0.14);
    --color-info: #4FD8EB;
    --color-info-light: rgba(79, 216, 235, 0.12);

    /* Background Colors: void -> deep -> ink, elevation by surface step */
    --bg-primary: #050510;             /* Space Void */
    --bg-secondary: #0A0A1F;           /* Space Deep */
    --bg-tertiary: #10102A;            /* Space Ink */
    --bg-card: #0A0A1F;
    --bg-hover: rgba(148, 163, 255, 0.07);
    --bg-active: rgba(148, 163, 255, 0.12);

    /* Text Colors: starlight ramp */
    --text-primary: rgba(235, 238, 255, 0.95);
    --text-secondary: rgba(200, 208, 240, 0.75);
    --text-tertiary: rgba(200, 208, 240, 0.58);
    --text-inverse: #FFFFFF;

    /* Border Colors: violet-tinted hairlines, never gray (Tinted Line Rule) */
    --border-color: rgba(148, 163, 255, 0.16);
    --border-color-light: rgba(148, 163, 255, 0.10);
    --border-color-dark: rgba(148, 163, 255, 0.28);

    /* Shadow Colors */
    --shadow-color: rgba(0, 0, 0, 0.35);
    --shadow-color-dark: rgba(0, 0, 0, 0.55);

    /* ---------- Typography ---------- */
    --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    --font-display: 'Space Grotesk', 'Inter', sans-serif;
    --font-family-mono: 'SF Mono', 'Fira Code', 'Consolas', monospace;

    /* Font Sizes */
    --font-size-xs: 0.75rem;    /* 12px */
    --font-size-sm: 0.875rem;   /* 14px */
    --font-size-base: 1rem;     /* 16px */
    --font-size-lg: 1.125rem;   /* 18px */
    --font-size-xl: 1.25rem;    /* 20px */
    --font-size-2xl: 1.5rem;    /* 24px */
    --font-size-3xl: 1.875rem;  /* 30px */
    --font-size-4xl: 2.25rem;   /* 36px */

    /* Font Weights */
    --font-weight-normal: 400;
    --font-weight-medium: 500;
    --font-weight-semibold: 600;
    --font-weight-bold: 700;

    /* Line Heights */
    --line-height-tight: 1.25;
    --line-height-normal: 1.5;
    --line-height-relaxed: 1.75;

    /* ---------- Spacing ---------- */
    --spacing-0: 0;
    --spacing-1: 0.25rem;   /* 4px */
    --spacing-2: 0.5rem;    /* 8px */
    --spacing-3: 0.75rem;   /* 12px */
    --spacing-4: 1rem;      /* 16px */
    --spacing-5: 1.25rem;   /* 20px */
    --spacing-6: 1.5rem;    /* 24px */
    --spacing-8: 2rem;      /* 32px */
    --spacing-10: 2.5rem;   /* 40px */
    --spacing-12: 3rem;     /* 48px */
    --spacing-16: 4rem;     /* 64px */

    /* ---------- Border Radius ---------- */
    --radius-sm: 0.25rem;   /* 4px */
    --radius-md: 0.5rem;    /* 8px */
    --radius-lg: 0.75rem;   /* 12px */
    --radius-xl: 1rem;      /* 16px */
    --radius-2xl: 1.5rem;   /* 24px */
    --radius-full: 9999px;

    /* ---------- Shadows ---------- */
    --shadow-sm: 0 1px 2px 0 var(--shadow-color);
    --shadow-md: 0 4px 6px -1px var(--shadow-color), 0 2px 4px -2px var(--shadow-color);
    --shadow-lg: 0 10px 15px -3px var(--shadow-color), 0 4px 6px -4px var(--shadow-color);
    --shadow-xl: 0 20px 25px -5px var(--shadow-color), 0 8px 10px -6px var(--shadow-color);
    /* Emitted light for the primary action (Light-Source Rule) */
    --glow-primary: 0 0 0 1px rgba(167, 139, 250, 0.25), 0 4px 20px rgba(105, 92, 231, 0.35);

    /* ---------- Focus Ring ---------- */
    --focus-ring: 0 0 0 3px rgba(124, 108, 240, 0.28);

    /* ---------- Transitions ---------- */
    --transition-fast: 150ms ease;
    --transition-normal: 250ms ease;
    --transition-slow: 350ms ease;

    /* ---------- Z-Index ---------- */
    --z-dropdown: 100;
    --z-sticky: 200;
    --z-fixed: 300;
    --z-modal-backdrop: 400;
    --z-modal: 500;
    --z-popover: 600;
    --z-tooltip: 700;
    --z-toast: 800;

    /* ---------- Layout ---------- */
    --header-height: 64px;
    --sidebar-width: 280px;
    --sidebar-collapsed-width: 72px;
    --content-max-width: 1400px;

    /* ---------- Mail Status Colors ---------- */
    --status-new: #4ADE80;
    --status-in-progress: #F6B03F;
    --status-opened: #4FD8EB;
    --status-shred: #F87171;
    --status-discard: #94A3B8;
}
