/* ==========================================================================
   GET ENGINEERING SEAT — Design Tokens (v1.0)
   Authoritative Reference: docs/02-ui-ux-branding.md & docs/05-FRONTEND.md
   ========================================================================== */

:root {
  /* --- Brand Color System: Primary (Deep Blue) --- */
  --color-primary: #0f2b48;
  --color-primary-dark: #0a1c30;
  --color-primary-light: #1a365d;
  --color-primary-accent: #1e40af;
  --color-primary-contrast: #ffffff;

  /* --- Brand Color System: Secondary (Teal / Emerald) --- */
  --color-secondary: #0d9488;
  --color-secondary-dark: #0f766e;
  --color-secondary-light: #14b8a6;
  --color-secondary-contrast: #ffffff;

  /* --- Neutral Color System (Light Default) --- */
  --color-bg: #f8fafc;
  --color-background: var(--color-bg);
  --color-surface: #ffffff;
  --color-surface-hover: #f1f5f9;
  --color-surface-active: #e2e8f0;
  --color-border: #e2e8f0;
  --color-border-hover: #cbd5e1;
  --color-border-focus: #0f2b48;

  --color-text: #0f172a;
  --color-text-primary: var(--color-text);
  --color-heading: #0f2b48;
  --color-text-secondary: #334155;
  --color-text-muted: #64748b;
  --color-text-inverse: #ffffff;
  --color-placeholder: #94a3b8;
  --color-link: #0f2b48;
  --color-link-hover: #0d9488;
  --color-on-primary: #ffffff;
  --color-on-secondary: #ffffff;
  --color-teal-bright: #0d9488;

  /* --- Semantic Feedback & Admission Chance Colors --- */
  /* Good Chance / Success */
  --color-success: #16a34a;
  --color-success-dark: #15803d;
  --color-success-bg: #dcfce7;
  --color-success-text: #166534;
  --color-chance-good: var(--color-success);

  /* Moderate Chance / Warning */
  --color-warning: #d97706;
  --color-warning-dark: #b45309;
  --color-warning-bg: #fef3c7;
  --color-warning-text: #92400e;
  --color-chance-moderate: var(--color-warning);

  /* Low Chance / Alert */
  --color-danger: #ea580c;
  --color-danger-dark: #c2410c;
  --color-danger-bg: #ffedd5;
  --color-danger-text: #9a3412;
  --color-chance-low: var(--color-danger);

  /* Very Low Chance / Critical Error */
  --color-error: #dc2626;
  --color-error-dark: #b91c1c;
  --color-error-bg: #fee2e2;
  --color-error-text: #991b1b;
  --color-chance-very-low: var(--color-error);

  /* Informational / System */
  --color-info: #2563eb;
  --color-info-dark: #1d4ed8;
  --color-info-bg: #dbeafe;
  --color-info-text: #1e40af;

  /* --- Typography --- */
  --font-family-primary: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  --font-family-display: 'Manrope', 'Inter', system-ui, sans-serif;
  --font-family-mono: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, Courier, monospace;

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

  --font-weight-regular: 400;
  --font-weight-medium: 500;
  --font-weight-semibold: 600;
  --font-weight-bold: 700;

  --line-height-none: 1;
  --line-height-tight: 1.25;
  --line-height-snug: 1.375;
  --line-height-normal: 1.5;
  --line-height-relaxed: 1.625;

  /* --- Spacing Scale --- */
  --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 */
  --spacing-20: 5rem;     /* 80px */
  --spacing-24: 6rem;     /* 96px */

  /* Aliases for spacing */
  --space-0: var(--spacing-0);
  --space-1: var(--spacing-1);
  --space-2: var(--spacing-2);
  --space-3: var(--spacing-3);
  --space-4: var(--spacing-4);
  --space-5: var(--spacing-5);
  --space-6: var(--spacing-6);
  --space-8: var(--spacing-8);
  --space-10: var(--spacing-10);
  --space-12: var(--spacing-12);
  --space-16: var(--spacing-16);
  --space-20: var(--spacing-20);
  --space-24: var(--spacing-24);

  /* --- Border Radius --- */
  --radius-none: 0;
  --radius-xs: 0.125rem;  /* 2px */
  --radius-sm: 0.25rem;   /* 4px */
  --radius-md: 0.375rem;  /* 6px */
  --radius-lg: 0.5rem;    /* 8px */
  --radius-xl: 0.75rem;   /* 12px */
  --radius-2xl: 1rem;     /* 16px */
  --radius-full: 9999px;

  /* --- Box Shadows --- */
  --shadow-none: none;
  --shadow-sm: 0 1px 2px rgba(15, 43, 72, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(15, 43, 72, 0.08), 0 2px 4px -2px rgba(15, 43, 72, 0.04);
  --shadow-lg: 0 10px 15px -3px rgba(15, 43, 72, 0.08), 0 4px 6px -4px rgba(15, 43, 72, 0.04);
  --shadow-card: 0 2px 8px rgba(15, 43, 72, 0.06);
  --shadow-elevated: 0 12px 24px -4px rgba(15, 43, 72, 0.12);

  /* --- Transitions --- */
  --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-base: 200ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-normal: var(--transition-base);
  --transition-slow: 300ms cubic-bezier(0.4, 0, 0.2, 1);

  /* --- Layout & Breakpoint Containers --- */
  --container-sm: 640px;
  --container-md: 768px;
  --container-lg: 1024px;
  --container-xl: 1280px;
  --container-2xl: 1440px;

  /* --- Z-Index Scale --- */
  --z-base: 1;
  --z-dropdown: 100;
  --z-sticky: 200;
  --z-fixed: 300;
  --z-drawer: 400;
  --z-modal-backdrop: 500;
  --z-modal: 510;
  --z-toast: 600;
}

/* ==========================================================================
   Dark Theme Overrides
   ========================================================================== */
[data-theme="dark"] {
  --color-bg: #0b1120;
  --color-surface: #1e293b;
  --color-surface-hover: #26354a;
  --color-surface-active: #334155;
  --color-border: #334155;
  --color-border-hover: #475569;
  --color-border-focus: #2dd4bf;

  /* --- Semantic Dark-Mode Text Hierarchy --- */
  /* Primary: headings, important values, primary labels (crisp near-white) */
  --color-text: #f8fafc;
  --color-text-primary: #f8fafc;
  --color-heading: #ffffff;

  /* Secondary: supporting information, nav links, active card labels (Slate 200) */
  --color-text-secondary: #e2e8f0;

  /* Muted: metadata, helper text, uppercase section tags (Slate 300 - clear & readable, not faded) */
  --color-text-muted: #cbd5e1;

  --color-text-inverse: #0b1120;

  /* Placeholder: visibly distinct from text, but comfortably readable */
  --color-placeholder: #94a3b8;

  /* Links */
  --color-link: #38bdf8;
  --color-link-hover: #2dd4bf;

  /* Brand Colors & High Contrast Surfaces */
  --color-primary: #0284c7;
  --color-primary-dark: #0369a1;
  --color-primary-light: #38bdf8;
  --color-primary-contrast: #ffffff;
  --color-on-primary: #ffffff;

  /* Teal: filled surfaces use rich teal + crisp white text/icon */
  --color-secondary: #0d9488;
  --color-secondary-dark: #0f766e;
  --color-secondary-light: #2dd4bf;
  --color-secondary-contrast: #ffffff;
  --color-on-secondary: #ffffff;

  /* Vibrant light teal for text links, icons, and active highlights on dark surfaces */
  --color-teal-bright: #2dd4bf;

  /* Semantic backgrounds for dark theme */
  --color-success-bg: rgba(22, 163, 74, 0.15);
  --color-success-text: #4ade80;
  --color-warning-bg: rgba(217, 119, 6, 0.15);
  --color-warning-text: #fbbf24;
  --color-danger-bg: rgba(234, 88, 12, 0.15);
  --color-danger-text: #fb923c;
  --color-error-bg: rgba(220, 38, 38, 0.15);
  --color-error-text: #f87171;
  --color-info-bg: rgba(37, 99, 235, 0.15);
  --color-info-text: #60a5fa;

  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.5);
  --shadow-card: 0 2px 8px rgba(0, 0, 0, 0.4);
  --shadow-elevated: 0 12px 24px -4px rgba(0, 0, 0, 0.6);
}
