/**
 * CSS Variables (Design Tokens)
 *
 * Centralized design system for consistent theming across the application.
 * Using CSS custom properties for easy maintenance and theme switching.
 */

:root {
  /* ========================================================================
     COLOR PALETTE
     ======================================================================== */

  /* Primary Colors - Brand Blue */
  --color-primary: #1E88E5;
  --color-primary-dark: #1565C0;
  --color-primary-light: #42A5F5;
  --color-primary-lighter: #E3F2FD;

  /* Secondary Colors - Accent */
  --color-secondary: #26A69A;
  --color-secondary-dark: #00897B;
  --color-secondary-light: #80CBC4;

  /* Neutral Colors */
  --color-white: #FFFFFF;
  --color-black: #000000;
  --color-gray-100: #F5F5F5;
  --color-gray-200: #EEEEEE;
  --color-gray-300: #E0E0E0;
  --color-gray-400: #BDBDBD;
  --color-gray-500: #9E9E9E;
  --color-gray-600: #757575;
  --color-gray-700: #616161;
  --color-gray-800: #424242;
  --color-gray-900: #212121;

  /* Semantic Colors */
  --color-success: #4CAF50;
  --color-success-light: #E8F5E9;
  --color-warning: #FF9800;
  --color-warning-light: #FFF3E0;
  --color-error: #F44336;
  --color-error-light: #FFEBEE;
  --color-info: #2196F3;
  --color-info-light: #E3F2FD;

  /* ========================================================================
     TYPOGRAPHY
     ======================================================================== */

  /* Font Families */
  --font-primary: 'Segoe UI', -apple-system, BlinkMacSystemFont, 'Roboto', 'Helvetica Neue', Arial, sans-serif;
  --font-mono: 'Courier New', Courier, monospace;

  /* Font Sizes */
  --font-size-xs: 0.75rem;    /* 12px */
  --font-size-sm: 0.875rem;   /* 14px */
  --font-size-base: 1rem;     /* 16px */
  --font-size-lg: 1.125rem;   /* 18px */
  --font-size-xl: 1.25rem;    /* 20px */
  --font-size-2xl: 1.5rem;    /* 24px */
  --font-size-3xl: 1.875rem;  /* 30px */
  --font-size-4xl: 2.25rem;   /* 36px */
  --font-size-5xl: 3rem;      /* 48px */

  /* Font Weights */
  --font-weight-normal: 400;
  --font-weight-medium: 500;
  --font-weight-semibold: 600;
  --font-weight-bold: 700;

  /* Line Heights */
  --line-height-tight: 1.25;
  --line-height-normal: 1.5;
  --line-height-relaxed: 1.75;

  /* ========================================================================
     SPACING
     ======================================================================== */

  --spacing-xs: 0.25rem;   /* 4px */
  --spacing-sm: 0.5rem;    /* 8px */
  --spacing-md: 1rem;      /* 16px */
  --spacing-lg: 1.5rem;    /* 24px */
  --spacing-xl: 2rem;      /* 32px */
  --spacing-2xl: 3rem;     /* 48px */
  --spacing-3xl: 4rem;     /* 64px */
  --spacing-4xl: 6rem;     /* 96px */

  /* ========================================================================
     LAYOUT
     ======================================================================== */

  /* Container Widths */
  --container-sm: 640px;
  --container-md: 768px;
  --container-lg: 1024px;
  --container-xl: 1280px;
  --container-2xl: 1536px;

  /* Breakpoints (for reference in media queries) */
  --breakpoint-sm: 640px;
  --breakpoint-md: 768px;
  --breakpoint-lg: 1024px;
  --breakpoint-xl: 1280px;
  --breakpoint-2xl: 1536px;

  /* Sidebar & Navigation */
  --sidebar-width: 250px;
  --sidebar-width-collapsed: 60px;
  --navbar-height: 64px;

  /* ========================================================================
     BORDERS & RADIUS
     ======================================================================== */

  --border-width-thin: 1px;
  --border-width-medium: 2px;
  --border-width-thick: 4px;

  --border-radius-sm: 4px;
  --border-radius-md: 6px;
  --border-radius-lg: 8px;
  --border-radius-xl: 12px;
  --border-radius-2xl: 16px;
  --border-radius-full: 9999px;

  /* ========================================================================
     SHADOWS
     ======================================================================== */

  --shadow-xs: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-sm: 0 2px 4px 0 rgba(0, 0, 0, 0.1);
  --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);

  /* Focus Shadows */
  --shadow-focus: 0 0 0 3px rgba(30, 136, 229, 0.3);
  --shadow-focus-error: 0 0 0 3px rgba(244, 67, 54, 0.3);

  /* ========================================================================
     TRANSITIONS & ANIMATIONS
     ======================================================================== */

  --transition-fast: 150ms ease-in-out;
  --transition-base: 250ms ease-in-out;
  --transition-slow: 350ms ease-in-out;

  --easing-linear: linear;
  --easing-ease-in: cubic-bezier(0.4, 0, 1, 1);
  --easing-ease-out: cubic-bezier(0, 0, 0.2, 1);
  --easing-ease-in-out: cubic-bezier(0.4, 0, 0.2, 1);

  /* ========================================================================
     Z-INDEX LAYERS
     ======================================================================== */

  --z-index-dropdown: 1000;
  --z-index-sticky: 1020;
  --z-index-fixed: 1030;
  --z-index-modal-backdrop: 1040;
  --z-index-modal: 1050;
  --z-index-popover: 1060;
  --z-index-tooltip: 1070;

  /* ========================================================================
     CARD STYLES
     ======================================================================== */

  --card-bg: var(--color-white);
  --card-border: var(--color-gray-200);
  --card-shadow: var(--shadow-sm);
  --card-shadow-hover: var(--shadow-md);
  --card-radius: var(--border-radius-lg);
  --card-padding: var(--spacing-lg);

  /* ========================================================================
     BUTTON STYLES
     ======================================================================== */

  --button-padding-sm: var(--spacing-sm) var(--spacing-md);
  --button-padding-md: var(--spacing-sm) var(--spacing-lg);
  --button-padding-lg: var(--spacing-md) var(--spacing-xl);
  --button-radius: var(--border-radius-md);

  /* ========================================================================
     FORM STYLES
     ======================================================================== */

  --input-bg: var(--color-white);
  --input-border: var(--color-gray-300);
  --input-border-focus: var(--color-primary);
  --input-padding: var(--spacing-sm) var(--spacing-md);
  --input-radius: var(--border-radius-md);
  --input-height: 42px;

  /* ========================================================================
     OPACITY LEVELS
     ======================================================================== */

  --opacity-disabled: 0.6;
  --opacity-hover: 0.8;
  --opacity-overlay: 0.5;
}

/* ========================================================================
   DARK MODE THEME (Optional - for future implementation)
   ======================================================================== */

@media (prefers-color-scheme: dark) {
  :root {
    /* Dark mode color overrides can be added here in the future */
    /* Example:
    --color-primary: #42A5F5;
    --color-gray-100: #424242;
    --card-bg: #1E1E1E;
    */
  }
}

/* ========================================================================
   UTILITY: Print Styles
   ======================================================================== */

@media print {
  :root {
    --shadow-sm: none;
    --shadow-md: none;
    --shadow-lg: none;
  }
}
