/* ========================================
   BRAND DESIGN SYSTEM VARIABLES
   ========================================

   This file contains ALL design tokens for easy rebranding.
   Change your brand identity by modifying values here.

   Usage in CSS:
   color: var(--color-primary);
   font-size: var(--font-size-lg);

   Usage in HTML inline styles:
   style="color: var(--color-primary);"
======================================== */

:root {
    /* ========================================
       COLORS - Brand Identity
       ======================================== */

    /* Primary Brand Colors */
    --color-primary: #667eea;          /* Main brand color (purple-blue) */
    --color-primary-dark: #5568d3;     /* Darker variant for hover states */
    --color-primary-light: #7e90f5;    /* Lighter variant */
    --color-primary-alpha-10: rgba(102, 126, 234, 0.1);
    --color-primary-alpha-20: rgba(102, 126, 234, 0.2);

    /* Secondary Brand Colors */
    --color-secondary: #764ba2;         /* Gradient accent color (purple) */
    --color-secondary-dark: #5d3a82;

    /* Accent Colors */
    --color-accent: #00B4D8;            /* Bright accent (cyan) */
    --color-accent-dark: #0096B8;
    --color-accent-light: #33c5e2;

    /* Semantic Colors */
    --color-success: #10b981;
    --color-success-light: #34d399;
    --color-success-dark: #059669;

    --color-warning: #f59e0b;
    --color-warning-light: #fbbf24;
    --color-warning-dark: #d97706;

    --color-error: #ef4444;
    --color-error-light: #f87171;
    --color-error-dark: #dc2626;

    --color-info: #3b82f6;
    --color-info-light: #60a5fa;
    --color-info-dark: #2563eb;

    /* Neutral Colors - Light Theme */
    --color-bg-primary: #F8F9FA;        /* Main background */
    --color-bg-secondary: #ffffff;      /* Cards, modals */
    --color-bg-tertiary: #f1f3f5;       /* Subtle backgrounds */

    --color-text-primary: #0D1B2A;      /* Main text (dark navy) */
    --color-text-secondary: #3E4C59;    /* Secondary text */
    --color-text-tertiary: #64748b;     /* Muted text */
    --color-text-quaternary: #94a3b8;   /* Very muted */

    --color-border-primary: #e0e3e8;    /* Main borders */
    --color-border-secondary: #e2e8f0;  /* Subtle borders */
    --color-border-light: #f1f3f5;      /* Very subtle */

    /* ========================================
       GRADIENTS
       ======================================== */

    --gradient-primary: linear-gradient(135deg, var(--color-primary) 0%, var(--color-secondary) 100%);
    --gradient-accent: linear-gradient(135deg, var(--color-accent) 0%, var(--color-primary) 100%);
    --gradient-success: linear-gradient(135deg, #10b981 0%, #059669 100%);
    --gradient-warning: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    --gradient-error: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    --gradient-dark: linear-gradient(135deg, #0D1B2A 0%, #1B263B 100%);
    --gradient-light: linear-gradient(135deg, #F8F9FA 0%, #E5E7EB 100%);

    /* ========================================
       TYPOGRAPHY
       ======================================== */

    /* Font Families */
    --font-primary: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', sans-serif;
    --font-secondary: 'Source Sans Pro', -apple-system, sans-serif;
    --font-monospace: 'Courier New', 'Monaco', monospace;

    /* Font Sizes */
    --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-5xl: 3.75rem;     /* 60px */

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

    /* Line Heights */
    --line-height-tight: 1.25;
    --line-height-snug: 1.375;
    --line-height-normal: 1.5;
    --line-height-relaxed: 1.625;
    --line-height-loose: 2;

    /* Letter Spacing */
    --letter-spacing-tight: -0.05em;
    --letter-spacing-normal: 0;
    --letter-spacing-wide: 0.025em;
    --letter-spacing-wider: 0.05em;

    /* ========================================
       SPACING - Consistent 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-7: 1.75rem;   /* 28px */
    --space-8: 2rem;      /* 32px */
    --space-10: 2.5rem;   /* 40px */
    --space-12: 3rem;     /* 48px */
    --space-16: 4rem;     /* 64px */
    --space-20: 5rem;     /* 80px */
    --space-24: 6rem;     /* 96px */

    /* ========================================
       BORDERS
       ======================================== */

    /* Border Radius */
    --radius-sm: 4px;
    --radius-md: 6px;
    --radius-base: 8px;
    --radius-lg: 12px;
    --radius-xl: 16px;
    --radius-2xl: 24px;
    --radius-full: 9999px;
    --radius-circle: 50%;

    /* Border Widths */
    --border-width-thin: 1px;
    --border-width-base: 2px;
    --border-width-thick: 3px;
    --border-width-heavy: 4px;

    /* ========================================
       SHADOWS - Depth System
       ======================================== */

    --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.06);
    --shadow-base: 0 2px 8px rgba(13, 27, 42, 0.08);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.12);
    --shadow-xl: 0 12px 36px rgba(0, 0, 0, 0.15);
    --shadow-2xl: 0 20px 48px rgba(0, 0, 0, 0.2);

    /* Focus Shadows */
    --shadow-focus-primary: 0 0 0 3px rgba(102, 126, 234, 0.2);
    --shadow-focus-accent: 0 0 0 3px rgba(0, 180, 216, 0.2);
    --shadow-focus-error: 0 0 0 3px rgba(239, 68, 68, 0.2);

    /* ========================================
       TRANSITIONS & ANIMATIONS
       ======================================== */

    /* Duration */
    --transition-fast: 150ms;
    --transition-base: 200ms;
    --transition-medium: 300ms;
    --transition-slow: 500ms;

    /* Easing Functions */
    --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.68, -0.55, 0.265, 1.55);

    /* Common Transitions */
    --transition-all: all var(--transition-base) var(--ease-in-out);
    --transition-colors: color var(--transition-base) var(--ease-in-out),
                         background-color var(--transition-base) var(--ease-in-out),
                         border-color var(--transition-base) var(--ease-in-out);
    --transition-transform: transform var(--transition-base) var(--ease-in-out);
    --transition-opacity: opacity var(--transition-base) var(--ease-in-out);

    /* ========================================
       Z-INDEX SCALE - Organized Layering
       ======================================== */

    --z-index-base: 0;
    --z-index-dropdown: 100;
    --z-index-sticky: 200;
    --z-index-fixed: 300;
    --z-index-modal-backdrop: 900;
    --z-index-modal: 1000;
    --z-index-popover: 1100;
    --z-index-tooltip: 1200;
    --z-index-toast: 9999;

    /* ========================================
       BREAKPOINTS (for reference in media queries)
       ======================================== */

    --breakpoint-xs: 480px;
    --breakpoint-sm: 640px;
    --breakpoint-md: 768px;
    --breakpoint-lg: 1024px;
    --breakpoint-xl: 1280px;
    --breakpoint-2xl: 1536px;

    /* ========================================
       COMPONENT-SPECIFIC VARIABLES
       ======================================== */

    /* Container */
    --container-max-width: 1200px;
    --container-padding: var(--space-8);

    /* Cards */
    --card-padding: var(--space-8);
    --card-radius: var(--radius-lg);
    --card-shadow: var(--shadow-base);

    /* Buttons */
    --button-padding-y: 0.75rem;
    --button-padding-x: 1.5rem;
    --button-radius: var(--radius-base);
    --button-font-weight: var(--font-weight-semibold);

    /* Inputs */
    --input-padding-y: 0.75rem;
    --input-padding-x: 1rem;
    --input-radius: var(--radius-base);
    --input-border-width: var(--border-width-base);
    --input-font-size: var(--font-size-base);

    /* Navigation */
    --nav-height: 70px;
    --nav-padding: var(--space-4) var(--space-8);
}

/* ========================================
   DARK THEME OVERRIDES
   ======================================== */

[data-theme="dark"] {
    /* Background Colors */
    --color-bg-primary: #0D1B2A;
    --color-bg-secondary: #1B263B;
    --color-bg-tertiary: #2d3748;

    /* Text Colors */
    --color-text-primary: #F8F9FA;
    --color-text-secondary: #B8C5D6;
    --color-text-tertiary: #94a3b8;
    --color-text-quaternary: #64748b;

    /* Border Colors */
    --color-border-primary: #2d3748;
    --color-border-secondary: #374151;
    --color-border-light: #4b5563;

    /* Adjust Accent Colors for Dark Mode */
    --color-accent: #33c5e2;
    --color-primary: #7e90f5;

    /* Shadows for Dark Mode */
    --shadow-base: 0 2px 8px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.5);
}

/* ========================================
   UTILITY CLASSES (Optional)
   ======================================== */

/* Quick spacing utilities */
.m-0 { margin: var(--space-0) !important; }
.m-1 { margin: var(--space-1) !important; }
.m-2 { margin: var(--space-2) !important; }
.m-3 { margin: var(--space-3) !important; }
.m-4 { margin: var(--space-4) !important; }
.m-6 { margin: var(--space-6) !important; }
.m-8 { margin: var(--space-8) !important; }

.p-0 { padding: var(--space-0) !important; }
.p-1 { padding: var(--space-1) !important; }
.p-2 { padding: var(--space-2) !important; }
.p-3 { padding: var(--space-3) !important; }
.p-4 { padding: var(--space-4) !important; }
.p-6 { padding: var(--space-6) !important; }
.p-8 { padding: var(--space-8) !important; }

/* Text utilities */
.text-center { text-align: center !important; }
.text-left { text-align: left !important; }
.text-right { text-align: right !important; }

.font-bold { font-weight: var(--font-weight-bold) !important; }
.font-semibold { font-weight: var(--font-weight-semibold) !important; }
.font-medium { font-weight: var(--font-weight-medium) !important; }

/* Color utilities */
.text-primary { color: var(--color-primary) !important; }
.text-accent { color: var(--color-accent) !important; }
.text-success { color: var(--color-success) !important; }
.text-warning { color: var(--color-warning) !important; }
.text-error { color: var(--color-error) !important; }
.text-muted { color: var(--color-text-tertiary) !important; }

.bg-primary { background-color: var(--color-primary) !important; }
.bg-accent { background-color: var(--color-accent) !important; }
.bg-light { background-color: var(--color-bg-tertiary) !important; }

/* Display utilities */
.d-none { display: none !important; }
.d-block { display: block !important; }
.d-flex { display: flex !important; }
.d-grid { display: grid !important; }
