/* ====================================================
   DESIGN TOKENS - Light Mode (Default)
   Warm Palette - Friendly, approachable, inviting
   Same color across light and dark modes for consistency
   ==================================================== */

:root {
    /* Color scheme indicator */
    color-scheme: light dark;

    /* ===================
       SEMANTIC COLORS
       =================== */
    
    /* Primary - Warm Coral (friendly, good contrast) */
    --primary: #e07a5f;
    --primary-hover: #c96a50;
    --primary-active: #b25a42;
    --primary-light: #fef3f0;
    --primary-rgb: 224, 122, 95;
    
    /* Secondary - Sky Blue from palette */
    --secondary: #97ddff;
    --secondary-hover: #7bcef5;
    --secondary-light: #e8f7ff;
    
    /* Status Colors */
    --success: #10b981;
    --success-hover: #059669;
    --success-light: #ecfdf5;
    --success-rgb: 16, 185, 129;
    --success-border: #a7f3d0;
    
    --warning: #f59e0b;
    --warning-hover: #d97706;
    --warning-light: #fffbeb;
    --warning-rgb: 245, 158, 11;
    --warning-bg: #fef3c7;
    --warning-text: #92400e;
    --warning-border: #fde68a;
    
    --danger: #ef4444;
    --danger-hover: #dc2626;
    --danger-light: #fef2f2;
    --danger-rgb: 239, 68, 68;
    --danger-bg: #fef2f2;
    --danger-border: #fecaca;
    --danger-text: #991b1b;
    
    --info: #3b82f6;
    --info-hover: #2563eb;
    --info-light: #eff6ff;
    --info-rgb: 59, 130, 246;
    --info-bg: #dbeafe;
    
    /* ===================
       TEXT COLORS
       =================== */
    --text: #1e293b;
    --text-primary: #1e293b;
    --text-secondary: #475569;
    --text-muted: #94a3b8;
    --text-inverse: #ffffff;
    --muted: #94a3b8;
    
    /* ===================
       BACKGROUND COLORS
       =================== */
    --bg: #ffffff;
    --bg-primary: #f8fafc;
    --bg-secondary: #f1f5f9;
    --bg-surface: #ffffff;
    --bg-hover: #f1f5f9;
    --bg-elevated: #ffffff;
    --bg-overlay: rgba(0, 0, 0, 0.5);
    
    /* ===================
       BORDER COLORS
       =================== */
    --border: #e2e8f0;
    --border-color: #e2e8f0;
    --border-hover: #cbd5e1;
    --border-focus: var(--primary);
    
    /* ===================
       SHADOWS - Clean, subtle shadows without colored glow
       =================== */
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
    --shadow-primary: 0 1px 3px 0 rgb(0 0 0 / 0.1);
    --shadow-primary-hover: 0 4px 6px -1px rgb(0 0 0 / 0.1);
    
    /* ===================
       SPACING
       =================== */
    --space-1: 4px;
    --space-2: 8px;
    --space-3: 12px;
    --space-4: 16px;
    --space-5: 20px;
    --space-6: 24px;
    --space-8: 32px;
    --space-10: 40px;
    --space-12: 48px;
    --space-xs: 4px;
    --space-sm: 8px;
    --space-md: 16px;
    --space-lg: 24px;
    --space-xl: 32px;

    /* ===================
       TYPOGRAPHY
       =================== */
    --font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    --font-mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
    
    --text-xs: 12px;
    --text-sm: 14px;
    --text-base: 16px;
    --text-lg: 18px;
    --text-xl: 20px;
    --text-2xl: 24px;
    --text-3xl: 30px;
    --text-4xl: 36px;
    
    --font-size-xs: 12px;
    --font-size-sm: 14px;
    --font-size-base: 16px;
    --font-size-lg: 18px;
    --font-size-xl: 20px;
    --font-size-2xl: 24px;
    --font-size-3xl: 30px;
    
    --font-weight-normal: 400;
    --font-weight-medium: 500;
    --font-weight-semibold: 600;
    --font-weight-bold: 700;
    
    --line-height-tight: 1.25;
    --line-height-normal: 1.5;
    --line-height-relaxed: 1.75;

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

    /* ===================
       TRANSITIONS
       =================== */
    --transition-fast: 150ms ease;
    --transition-normal: 200ms ease;
    --transition-slow: 300ms ease;
    
    /* ===================
       Z-INDEX SCALE
       =================== */
    --z-dropdown: 100;
    --z-sticky: 200;
    --z-modal: 300;
    --z-toast: 400;
    --z-tooltip: 500;
}

/* ====================================================
   DARK MODE
   ==================================================== */

@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) {
        /* Primary - Same warm coral as light mode */
        --primary: #e07a5f;
        --primary-hover: #e8917a;
        --primary-active: #c96a50;
        --primary-light: rgba(224, 122, 95, 0.15);
        --primary-rgb: 224, 122, 95;
        
        /* Secondary - Sky Blue */
        --secondary: #97ddff;
        --secondary-hover: #b0e5ff;
        --secondary-light: rgba(151, 221, 255, 0.18);
        
        /* Status Colors - Brighter for dark mode */
        --success: #34d399;
        --success-hover: #10b981;
        --success-light: rgba(52, 211, 153, 0.18);
        --success-rgb: 52, 211, 153;
        --success-border: rgba(52, 211, 153, 0.4);
        
        --warning: #fbbf24;
        --warning-hover: #f59e0b;
        --warning-light: rgba(251, 191, 36, 0.18);
        --warning-rgb: 251, 191, 36;
        --warning-bg: rgba(251, 191, 36, 0.15);
        --warning-text: #fcd34d;
        --warning-border: rgba(251, 191, 36, 0.4);
        
        --danger: #f87171;
        --danger-hover: #ef4444;
        --danger-light: rgba(248, 113, 113, 0.18);
        --danger-rgb: 248, 113, 113;
        --danger-bg: rgba(248, 113, 113, 0.15);
        --danger-border: rgba(248, 113, 113, 0.4);
        --danger-text: #fca5a5;
        
        --info: #60a5fa;
        --info-hover: #3b82f6;
        --info-light: rgba(96, 165, 250, 0.18);
        --info-rgb: 96, 165, 250;
        --info-bg: rgba(96, 165, 250, 0.25);
        
        /* Text Colors - Higher contrast for readability */
        --text: #f8fafc;
        --text-primary: #f8fafc;
        --text-secondary: #cbd5e1;
        --text-muted: #94a3b8;
        --text-inverse: #0f172a;
        --muted: #94a3b8;
        
        /* Background Colors - Softer dark for less strain */
        --bg: #0f172a;
        --bg-primary: #1e293b;
        --bg-secondary: #0f172a;
        --bg-surface: #1e293b;
        --bg-hover: #334155;
        --bg-elevated: #334155;
        --bg-overlay: rgba(0, 0, 0, 0.7);
        
        /* Border Colors */
        --border: #334155;
        --border-color: #334155;
        --border-hover: #475569;
        
        /* Shadows - Subtle in dark mode */
        --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.2);
        --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.3);
        --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.3);
        --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.4);
        --shadow-primary: 0 1px 3px 0 rgb(0 0 0 / 0.2);
        --shadow-primary-hover: 0 4px 6px -1px rgb(0 0 0 / 0.3);
    }
}

/* Manual dark mode override */
[data-theme="dark"] {
    /* Primary - Same warm coral as light mode */
    --primary: #e07a5f;
    --primary-hover: #e8917a;
    --primary-active: #c96a50;
    --primary-light: rgba(224, 122, 95, 0.15);
    --primary-rgb: 224, 122, 95;
    
    /* Secondary - Sky Blue */
    --secondary: #97ddff;
    --secondary-hover: #b0e5ff;
    --secondary-light: rgba(151, 221, 255, 0.18);
    
    /* Status Colors */
    --success: #34d399;
    --success-hover: #10b981;
    --success-light: rgba(52, 211, 153, 0.18);
    --success-rgb: 52, 211, 153;
    --success-border: rgba(52, 211, 153, 0.4);
    
    --warning: #fbbf24;
    --warning-hover: #f59e0b;
    --warning-light: rgba(251, 191, 36, 0.18);
    --warning-rgb: 251, 191, 36;
    --warning-bg: rgba(251, 191, 36, 0.15);
    --warning-text: #fcd34d;
    --warning-border: rgba(251, 191, 36, 0.4);
    
    --danger: #f87171;
    --danger-hover: #ef4444;
    --danger-light: rgba(248, 113, 113, 0.18);
    --danger-rgb: 248, 113, 113;
    --danger-bg: rgba(248, 113, 113, 0.15);
    --danger-border: rgba(248, 113, 113, 0.4);
    --danger-text: #fca5a5;
    
    --info: #60a5fa;
    --info-hover: #3b82f6;
    --info-light: rgba(96, 165, 250, 0.18);
    --info-rgb: 96, 165, 250;
    --info-bg: rgba(96, 165, 250, 0.25);
    
    /* Text Colors - Higher contrast for readability */
    --text: #f8fafc;
    --text-primary: #f8fafc;
    --text-secondary: #cbd5e1;
    --text-muted: #94a3b8;
    --text-inverse: #0f172a;
    --muted: #94a3b8;
    
    /* Background Colors */
    --bg: #0f172a;
    --bg-primary: #1e293b;
    --bg-secondary: #0f172a;
    --bg-surface: #1e293b;
    --bg-hover: #334155;
    --bg-elevated: #334155;
    --bg-overlay: rgba(0, 0, 0, 0.7);
    
    /* Border Colors */
    --border: #334155;
    --border-color: #334155;
    --border-hover: #475569;
    
    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.2);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.3);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.3);
    --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.4);
    --shadow-primary: 0 1px 3px 0 rgb(0 0 0 / 0.2);
    --shadow-primary-hover: 0 4px 6px -1px rgb(0 0 0 / 0.3);
}
