/* ===================================
   Design System - Variables & Tokens
   =================================== */

:root {
    /* Color Palette */
    --color-primary: #4fc3f7;
    --color-primary-light: #90caf9;
    --color-primary-dark: #29b6f6;
    --color-primary-darker: #039be5;
    
    --color-secondary: #6366f1;
    --color-secondary-light: #a5b4fc;
    --color-secondary-lighter: #c7d2fe;
    
    --color-accent: #ffa726;
    --color-accent-purple: #ab47bc;
    
    --color-success: #26b050;
    --color-success-light: #66bb6a;
    
    --color-danger: #f44336;
    --color-danger-light: #ff6b6b;
    --color-danger-dark: #e53935;
    --color-danger-darker: #d32f2f;
    
    --color-warning: #ff9800;
    --color-info: #2196f3;
    
    /* Background Colors */
    --bg-primary: #1a1a1a;
    --bg-secondary: #1e1e1e;
    --bg-tertiary: #2d2d2d;
    --bg-card: rgba(30, 30, 30, 0.8);
    --bg-card-hover: rgba(40, 40, 40, 0.9);
    --bg-input: rgba(40, 40, 40, 0.8);
    --bg-input-dark: rgba(30, 30, 30, 0.8);
    
    /* Text Colors */
    --text-primary: #ffffff;
    --text-secondary: #e0e0e0;
    --text-muted: #b0b0b0;
    --text-disabled: #666666;
    
    /* Border Colors */
    --border-primary: rgba(255, 255, 255, 0.1);
    --border-secondary: rgba(255, 255, 255, 0.2);
    --border-accent: rgba(79, 195, 247, 0.3);
    --border-hover: rgba(79, 195, 247, 0.5);
    
    /* Shadows */
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.4);
    --shadow-xl: 0 20px 60px rgba(0, 0, 0, 0.8);
    --shadow-glow: 0 0 10px rgba(79, 195, 247, 0.6);
    --shadow-text: 0 2px 10px rgba(79, 195, 247, 0.5);
    
    /* Spacing Scale (8px base) */
    --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-16: 64px;
    
    /* Border Radius */
    --radius-sm: 4px;
    --radius-md: 6px;
    --radius-lg: 8px;
    --radius-xl: 12px;
    --radius-2xl: 16px;
    --radius-full: 50%;
    
    /* Typography */
    --font-family-primary: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', sans-serif;
    --font-family-mono: 'Consolas', 'Monaco', 'Courier New', monospace;
    
    --font-size-xs: 0.7rem;
    --font-size-sm: 0.8rem;
    --font-size-base: 0.9rem;
    --font-size-md: 1rem;
    --font-size-lg: 1.1rem;
    --font-size-xl: 1.3rem;
    --font-size-2xl: 1.8rem;
    
    --font-weight-normal: 400;
    --font-weight-medium: 500;
    --font-weight-semibold: 600;
    --font-weight-bold: 700;
    
    --line-height-tight: 1.3;
    --line-height-base: 1.5;
    --line-height-relaxed: 1.6;
    
    /* Transitions */
    --transition-fast: 0.15s ease;
    --transition-base: 0.2s ease;
    --transition-slow: 0.3s ease;
    --transition-slower: 0.5s ease;
    
    /* Z-Index Scale - Organized Layering System
     * 
     * Layer 0 (1-9): Base content
     * Layer 1 (10-99): Elevated content (sticky headers, floating elements)
     * Layer 2 (100-999): Dropdowns and popovers
     * Layer 3 (1000-1999): Fixed headers/navigation
     * Layer 4 (10000-19999): Overlays and modals
     * Layer 5 (100000+): Critical UI (toasts, alerts, confirmations)
     */
    --z-base: 1;                    /* Default content layer */
    --z-elevated: 10;               /* Sticky headers, elevated cards */
    --z-dropdown: 100;              /* Dropdowns and popovers */
    --z-sticky: 1000;               /* Sticky navigation/header */
    --z-overlay: 10000;             /* Modal overlays */
    --z-modal: 10001;               /* Modal content */
    --z-modal-nested: 10002;        /* Nested/sub-modals */
    --z-loading: 10003;             /* Loading overlays */
    --z-tooltip: 20000;             /* Tooltips (above modals) */
    --z-confirmation: 20001;        /* Confirmation dialogs (above tooltips) */
    --z-toast: 20002;               /* Toast notifications (highest) */
    
    /* Layout */
    --container-max-width: 1400px;
    --sidebar-width: 280px;
    --header-height: 60px;
    
    /* Responsive Breakpoints */
    --breakpoint-sm: 576px;
    --breakpoint-md: 768px;
    --breakpoint-lg: 992px;
    --breakpoint-xl: 1200px;
}

/* Dark Theme Adjustments (Optional Light Theme Support) */
[data-theme="light"] {
    --bg-primary: #ffffff;
    --bg-secondary: #f5f5f5;
    --bg-tertiary: #e0e0e0;
    --text-primary: #1a1a1a;
    --text-secondary: #333333;
    --text-muted: #666666;
    --border-primary: rgba(0, 0, 0, 0.1);
    --border-secondary: rgba(0, 0, 0, 0.2);
}

/* Base Resets */
* {
    box-sizing: border-box;
}

html, body {
    margin: 0;
    padding: 0;
    font-family: var(--font-family-primary);
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: var(--line-height-relaxed);
}

h1, h2, h3, h4, h5, h6 {
    margin: 0;
    font-weight: var(--font-weight-semibold);
    line-height: var(--line-height-tight);
    color: var(--text-primary);
}

h1 { font-size: var(--font-size-2xl); }
h2 { font-size: var(--font-size-xl); }
h3 { font-size: var(--font-size-lg); }
h4 { font-size: var(--font-size-md); }
h5 { font-size: var(--font-size-base); }
h6 { font-size: var(--font-size-sm); }

p {
    margin: 0 0 var(--space-4) 0;
}

a {
    color: var(--color-primary);
    text-decoration: none;
    transition: color var(--transition-base);
}

a:hover {
    color: var(--color-primary-light);
}
