/**
 * Design Tokens - CSS Custom Properties
 * Premium UI Redesign v2.0
 * 
 * This file contains all design tokens for the application.
 * Use these variables consistently throughout all stylesheets.
 */

:root {
  /* ============================================
     COLOR TOKENS
     ============================================ */
  
  /* Neutral Palette */
  --color-neutral-50: #FAFAFA;   /* Lightest backgrounds */
  --color-neutral-100: #F5F5F5;  /* Card backgrounds */
  --color-neutral-200: #E5E5E5;  /* Borders, dividers */
  --color-neutral-300: #D4D4D4;  /* Disabled states */
  --color-neutral-400: #A3A3A3;  /* Placeholder text */
  --color-neutral-500: #737373;  /* Secondary text */
  --color-neutral-600: #525252;  /* Body text */
  --color-neutral-700: #404040;  /* Headings */
  --color-neutral-800: #262626;  /* Sidebar background */
  --color-neutral-900: #171717;  /* Darkest elements */
  
  /* Primary Accent Colors - Modern Blue/Purple Gradient */
  --color-primary-50: #EFF6FF;
  --color-primary-100: #DBEAFE;
  --color-primary-400: #60A5FA;
  --color-primary-500: #3B82F6;  /* Main brand color */
  --color-primary-600: #2563EB;  /* Hover states */
  --color-primary-700: #1D4ED8;  /* Active states */
  --color-primary-800: #1E40AF;
  
  /* Secondary Accent - Purple */
  --color-secondary-400: #A78BFA;
  --color-secondary-500: #8B5CF6;
  --color-secondary-600: #7C3AED;
  
  /* Semantic Colors */
  --color-success-400: #34D399;
  --color-success-500: #10B981;  /* Muted green */
  --color-success-600: #059669;
  
  --color-warning-400: #FBBF24;
  --color-warning-500: #F59E0B;  /* Amber */
  --color-warning-600: #D97706;
  
  --color-error-400: #F87171;
  --color-error-500: #EF4444;    /* Refined red */
  --color-error-600: #DC2626;
  
  --color-info-400: #818CF8;
  --color-info-500: #6366F1;     /* Indigo */
  --color-info-600: #4F46E5;
  
  /* Gradient Colors */
  --gradient-primary: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  --gradient-secondary: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
  --gradient-success: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
  --gradient-sunset: linear-gradient(135deg, #fa709a 0%, #fee140 100%);
  --gradient-ocean: linear-gradient(135deg, #2e3192 0%, #1bffff 100%);
  --gradient-purple: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  --gradient-blue: linear-gradient(135deg, #3B82F6 0%, #8B5CF6 100%);
  
  /* Surface Colors */
  --color-surface-white: #FFFFFF;
  --color-surface-light: var(--color-neutral-50);
  --color-surface-dark: var(--color-neutral-800);
  
  /* Glass Effect */
  --glass-bg: rgba(255, 255, 255, 0.7);
  --glass-border: rgba(255, 255, 255, 0.18);
  --glass-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.15);
  
  /* ============================================
     TYPOGRAPHY TOKENS
     ============================================ */
  
  /* Font Families */
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Helvetica Neue', Arial, sans-serif;
  --font-display: 'Inter', system-ui, sans-serif;
  
  /* Type Scale */
  --text-xs: 0.75rem;    /* 12px */
  --text-sm: 0.875rem;   /* 14px */
  --text-base: 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 */
  --text-5xl: 3rem;      /* 48px */
  
  /* Font Weights */
  --font-normal: 400;
  --font-medium: 500;
  --font-semibold: 600;
  --font-bold: 700;
  --font-extrabold: 800;
  
  /* Line Heights */
  --leading-none: 1;
  --leading-tight: 1.25;
  --leading-snug: 1.375;
  --leading-normal: 1.5;
  --leading-relaxed: 1.625;
  --leading-loose: 2;
  
  /* ============================================
     SPACING TOKENS (4px base unit)
     ============================================ */
  
  --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 */
  --space-20: 5rem;     /* 80px */
  --space-24: 6rem;     /* 96px */
  
  /* ============================================
     SHADOW TOKENS
     ============================================ */
  
  --shadow-xs: 0 1px 2px 0 rgba(0, 0, 0, 0.03);
  --shadow-sm: 0 1px 3px 0 rgba(0, 0, 0, 0.08), 0 1px 2px 0 rgba(0, 0, 0, 0.04);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  --shadow-2xl: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  --shadow-inner: inset 0 2px 4px 0 rgba(0, 0, 0, 0.06);
  
  /* Colored Shadows */
  --shadow-primary: 0 10px 25px -5px rgba(59, 130, 246, 0.3);
  --shadow-success: 0 10px 25px -5px rgba(16, 185, 129, 0.3);
  --shadow-warning: 0 10px 25px -5px rgba(245, 158, 11, 0.3);
  --shadow-error: 0 10px 25px -5px rgba(239, 68, 68, 0.3);
  
  /* ============================================
     BORDER TOKENS
     ============================================ */
  
  /* Border Radius */
  --radius-sm: 0.375rem;  /* 6px */
  --radius-md: 0.5rem;    /* 8px */
  --radius-lg: 0.75rem;   /* 12px */
  --radius-xl: 1rem;      /* 16px */
  --radius-2xl: 1.5rem;   /* 24px */
  --radius-3xl: 2rem;     /* 32px */
  --radius-full: 9999px;  /* Fully rounded */
  
  /* Border Widths */
  --border-width-thin: 1px;
  --border-width-medium: 2px;
  --border-width-thick: 3px;
  --border-width-heavy: 4px;
  
  /* ============================================
     TRANSITION TOKENS
     ============================================ */
  
  --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-base: 250ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 350ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-bounce: 500ms cubic-bezier(0.68, -0.55, 0.265, 1.55);
  
  /* 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);
  
  /* ============================================
     Z-INDEX SCALE
     ============================================ */
  
  --z-base: 0;
  --z-dropdown: 1000;
  --z-sticky: 1020;
  --z-fixed: 1030;
  --z-modal-backdrop: 1040;
  --z-modal: 1050;
  --z-popover: 1060;
  --z-tooltip: 1070;
  
  /* ============================================
     ANIMATION TOKENS
     ============================================ */
  
  --animation-spin: spin 1s linear infinite;
  --animation-ping: ping 1s cubic-bezier(0, 0, 0.2, 1) infinite;
  --animation-pulse: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
  --animation-bounce: bounce 1s infinite;
}

/* ============================================
   KEYFRAME ANIMATIONS
   ============================================ */

@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

@keyframes ping {
  75%, 100% {
    transform: scale(2);
    opacity: 0;
  }
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

@keyframes bounce {
  0%, 100% {
    transform: translateY(-25%);
    animation-timing-function: cubic-bezier(0.8, 0, 1, 1);
  }
  50% {
    transform: translateY(0);
    animation-timing-function: cubic-bezier(0, 0, 0.2, 1);
  }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes scaleIn {
  from {
    opacity: 0;
    transform: scale(0.9);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}
