/* Header Tracker - CSS Variables / Design System */
/* Apple-inspired design tokens with maroon + gold color scheme */

:root {
    /* ========================================
       TYPOGRAPHY
       ======================================== */
    --font-sans: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", system-ui, -system-ui, Segoe UI, Roboto, Helvetica, Arial, sans-serif;
    --font-mono: "SF Mono", SFMono-Regular, ui-monospace, Menlo, Monaco, Consolas, monospace;

    /* Font Sizes - Harmonious scale */
    --text-xs: 0.6875rem;    /* 11px */
    --text-sm: 0.8125rem;    /* 13px */
    --text-base: 0.9375rem;  /* 15px */
    --text-md: 1rem;         /* 16px */
    --text-lg: 1.125rem;     /* 18px */
    --text-xl: 1.25rem;      /* 20px */
    --text-2xl: 1.5rem;      /* 24px */
    --text-3xl: 1.875rem;    /* 30px */
    --text-4xl: 2.25rem;     /* 36px */

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

    /* Line Heights */
    --leading-tight: 1.25;
    --leading-snug: 1.375;
    --leading-normal: 1.5;
    --leading-relaxed: 1.625;

    /* Letter Spacing */
    --tracking-tight: -0.025em;
    --tracking-normal: 0;
    --tracking-wide: 0.025em;
    --tracking-wider: 0.05em;
    --tracking-widest: 0.1em;

    /* ========================================
       COLORS - Dark Maroon Theme
       ======================================== */

    /* Primary - Dark Maroon */
    --color-primary: #722F37;
    --color-primary-dark: #4A1515;
    --color-primary-light: #8B4049;
    --color-primary-hover: #8B4049;
    --color-primary-subtle: rgba(114, 47, 55, 0.15);

    /* Accent - Gold */
    --color-accent: #D4AF37;
    --color-accent-light: #E5C76B;
    --color-accent-dark: #B8962E;
    --color-accent-subtle: rgba(212, 175, 55, 0.15);

    /* Background Colors */
    --color-bg: #1A1A1A;
    --color-bg-secondary: #222222;
    --color-bg-elevated: #2A2A2A;

    /* Surface Colors - Slate Gray for card contrast */
    --color-surface: #374151;
    --color-surface-light: #4B5563;
    --color-surface-hover: #6B7280;
    --color-surface-active: #9CA3AF;

    /* Text Colors */
    --color-text: #FFFFFF;
    --color-text-secondary: #E5E5E5;
    --color-text-muted: #A0A0A0;
    --color-text-subtle: #707070;
    --color-text-dark: #1A1A1A;

    /* Status Colors - Desaturated for Apple feel */
    --color-success: #34C759;
    --color-success-muted: #30B050;
    --color-success-bg: rgba(52, 199, 89, 0.12);

    --color-warning: #FF9F0A;
    --color-warning-muted: #E59009;
    --color-warning-bg: rgba(255, 159, 10, 0.12);

    --color-danger: #FF453A;
    --color-danger-muted: #E53E35;
    --color-danger-bg: rgba(255, 69, 58, 0.12);

    --color-info: #0A84FF;
    --color-info-muted: #0977E5;
    --color-info-bg: rgba(10, 132, 255, 0.12);

    /* Border Colors */
    --color-border: rgba(255, 255, 255, 0.08);
    --color-border-light: rgba(255, 255, 255, 0.12);
    --color-border-strong: rgba(255, 255, 255, 0.16);
    --color-border-accent: rgba(212, 175, 55, 0.3);

    /* Input Colors */
    --color-input-bg: #4B5563;
    --color-input-border: rgba(255, 255, 255, 0.15);
    --color-input-focus: var(--color-primary);
    --color-input-text: #FFFFFF;
    --color-input-placeholder: #9CA3AF;

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

    /* Semantic spacing aliases */
    --spacing-xs: var(--space-1);
    --spacing-sm: var(--space-2);
    --spacing-md: var(--space-4);
    --spacing-lg: var(--space-6);
    --spacing-xl: var(--space-8);
    --spacing-2xl: var(--space-12);

    /* ========================================
       BORDER RADIUS - Rounded corners
       ======================================== */
    --radius-xs: 4px;
    --radius-sm: 6px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-xl: 16px;
    --radius-2xl: 20px;
    --radius-full: 9999px;

    /* ========================================
       SHADOWS - Subtle, layered
       ======================================== */
    --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.2);
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.25), 0 1px 2px rgba(0, 0, 0, 0.15);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.3), 0 2px 4px -1px rgba(0, 0, 0, 0.2);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.35), 0 4px 6px -2px rgba(0, 0, 0, 0.2);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.4), 0 10px 10px -5px rgba(0, 0, 0, 0.2);

    /* Inset shadows */
    --shadow-inner: inset 0 2px 4px rgba(0, 0, 0, 0.15);
    --shadow-inner-sm: inset 0 1px 2px rgba(0, 0, 0, 0.1);

    /* Card shadow */
    --shadow-card: 0 2px 8px rgba(0, 0, 0, 0.2), 0 1px 3px rgba(0, 0, 0, 0.15);
    --shadow-card-hover: 0 4px 12px rgba(0, 0, 0, 0.25), 0 2px 4px rgba(0, 0, 0, 0.15);

    /* Glow effects */
    --glow-primary: 0 0 20px rgba(114, 47, 55, 0.3);
    --glow-accent: 0 0 20px rgba(212, 175, 55, 0.25);

    /* ========================================
       TRANSITIONS
       ======================================== */
    --ease-default: cubic-bezier(0.4, 0, 0.2, 1);
    --ease-in: cubic-bezier(0.4, 0, 1, 1);
    --ease-out: cubic-bezier(0, 0, 0.2, 1);
    --ease-in-out: cubic-bezier(0.4, 0, 0.2, 1);
    --ease-bounce: cubic-bezier(0.34, 1.56, 0.64, 1);

    --duration-fast: 150ms;
    --duration-normal: 200ms;
    --duration-slow: 300ms;

    --transition-fast: var(--duration-fast) var(--ease-default);
    --transition-normal: var(--duration-normal) var(--ease-default);
    --transition-slow: var(--duration-slow) var(--ease-default);

    /* ========================================
       LAYOUT
       ======================================== */
    --nav-height: 56px;
    --sidebar-width: 240px;
    --content-max-width: 1280px;
    --content-padding: var(--space-6);

    /* ========================================
       Z-INDEX SCALE
       ======================================== */
    --z-base: 0;
    --z-dropdown: 100;
    --z-sticky: 200;
    --z-overlay: 300;
    --z-modal-backdrop: 400;
    --z-modal: 500;
    --z-toast: 600;
    --z-tooltip: 700;

    /* ========================================
       LEGACY COMPATIBILITY
       Keep old variable names working
       ======================================== */
    --font-family: var(--font-sans);
    --font-size-xs: var(--text-xs);
    --font-size-sm: var(--text-sm);
    --font-size-md: var(--text-base);
    --font-size-lg: var(--text-lg);
    --font-size-xl: var(--text-xl);
    --font-size-2xl: var(--text-2xl);
    --font-size-3xl: var(--text-3xl);
    --font-weight-normal: var(--font-normal);
    --font-weight-medium: var(--font-medium);
    --font-weight-semibold: var(--font-semibold);
    --font-weight-bold: var(--font-bold);

    /* Legacy font size references used in inline styles */
    --font-xs: var(--text-xs);
    --font-sm: var(--text-sm);
    --font-md: var(--text-base);
}

/* ========================================
   LIGHT MODE (Future)
   ======================================== */
[data-theme="light"] {
    --color-bg: #F5F5F7;
    --color-bg-secondary: #EEEEEF;
    --color-bg-elevated: #FFFFFF;

    --color-surface: #FFFFFF;
    --color-surface-light: #FAFAFA;
    --color-surface-hover: #F0F0F0;

    --color-text: #1D1D1F;
    --color-text-secondary: #424245;
    --color-text-muted: #6E6E73;
    --color-text-subtle: #86868B;

    --color-border: rgba(0, 0, 0, 0.08);
    --color-border-light: rgba(0, 0, 0, 0.06);
    --color-border-strong: rgba(0, 0, 0, 0.12);

    --color-input-bg: #FFFFFF;
    --color-input-border: rgba(0, 0, 0, 0.12);
    --color-input-text: #1D1D1F;
    --color-input-placeholder: #86868B;

    --shadow-card: 0 2px 8px rgba(0, 0, 0, 0.08), 0 1px 3px rgba(0, 0, 0, 0.06);
    --shadow-card-hover: 0 4px 12px rgba(0, 0, 0, 0.1), 0 2px 4px rgba(0, 0, 0, 0.06);
}
