/* ========================================
   CSS Variables - Enterprise Design Tokens
   ======================================== */

:root {
  /* ========================================
     COLOR SYSTEM
     ======================================== */

  /* Primary - Deep, professional blue */
  --color-primary: #1e40af;
  --color-primary-hover: #1e3a8a;
  --color-primary-light: #3b82f6;
  --color-primary-lighter: #60a5fa;
  --color-primary-subtle: #eff6ff;

  /* Secondary - Neutral slate */
  --color-secondary: #475569;
  --color-secondary-hover: #334155;
  --color-secondary-light: #64748b;
  --color-secondary-dark: #334155;

  /* Semantic Colors - Slightly muted for professional look */
  --color-success: #059669;
  --color-success-dark: #047857;
  --color-success-light: #10b981;
  --color-success-subtle: #ecfdf5;

  --color-warning: #d97706;
  --color-warning-dark: #b45309;
  --color-warning-light: #f59e0b;
  --color-warning-subtle: #fffbeb;

  --color-danger: #dc2626;
  --color-danger-dark: #b91c1c;
  --color-danger-light: #ef4444;
  --color-danger-subtle: #fef2f2;

  --color-info: #0284c7;
  --color-info-dark: #0369a1;
  --color-info-light: #0ea5e9;
  --color-info-subtle: #f0f9ff;

  /* Neutral/Gray Scale - Slate for professional feel */
  --color-white: #ffffff;
  --color-black: #000000;
  --color-gray-50: #f8fafc;
  --color-gray-100: #f1f5f9;
  --color-gray-200: #e2e8f0;
  --color-gray-300: #cbd5e1;
  --color-gray-400: #94a3b8;
  --color-gray-500: #64748b;
  --color-gray-600: #475569;
  --color-gray-700: #334155;
  --color-gray-800: #1e293b;
  --color-gray-900: #0f172a;

  /* ========================================
     BACKGROUND COLORS
     ======================================== */

  /* Neutral backgrounds - no blue tint */
  --bg-page: #f8fafc;
  --bg-primary: #f8fafc;
  --bg-secondary: #f1f5f9;
  --bg-card: #ffffff;
  --bg-hover: #f1f5f9;
  --bg-active: #e2e8f0;
  --bg-dark: #1e293b;
  --bg-darker: #0f172a;
  --bg-sidebar: #1e293b;

  /* Remove blue-tinted gradient, use neutral */
  --bg-gradient-light: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);

  /* ========================================
     TEXT COLORS
     ======================================== */

  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-muted: #94a3b8;
  --text-light: #94a3b8;
  --text-dark: #0f172a;
  --text-white: #ffffff;

  /* ========================================
     BORDER COLORS
     ======================================== */

  --border-color: #e2e8f0;
  --border-color-light: #f1f5f9;
  --border-color-dark: #cbd5e1;
  --border-color-strong: #cbd5e1;

  /* ========================================
     SPACING SYSTEM (8px Grid)
     ======================================== */

  --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-8: 2rem;       /* 32px */
  --space-10: 2.5rem;    /* 40px */
  --space-12: 3rem;      /* 48px */
  --space-16: 4rem;      /* 64px */
  --space-20: 5rem;      /* 80px */

  /* Legacy spacing names (for backwards compatibility) */
  --spacing-xs: 0.25rem;
  --spacing-sm: 0.5rem;
  --spacing-md: 0.75rem;
  --spacing-lg: 1rem;
  --spacing-xl: 1.25rem;
  --spacing-2xl: 1.5rem;
  --spacing-3xl: 2rem;
  --spacing-4xl: 3rem;
  --spacing-5xl: 4rem;

  /* ========================================
     BORDER RADIUS (Subtle, Professional)
     ======================================== */

  --radius-none: 0;
  --radius-sm: 0.25rem;    /* 4px - inputs, badges */
  --radius-md: 0.375rem;   /* 6px - buttons, cards */
  --radius-lg: 0.5rem;     /* 8px - modals, panels */
  --radius-xl: 0.75rem;    /* 12px - large cards */
  --radius-2xl: 1rem;      /* 16px - feature cards */
  --radius-full: 9999px;   /* Pills, avatars */
  --radius-pill: 9999px;

  /* ========================================
     BOX SHADOWS (Neutral, No Blue Tint)
     ======================================== */

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.04);
  --shadow-md: 0 2px 4px rgba(0, 0, 0, 0.06), 0 4px 6px rgba(0, 0, 0, 0.04);
  --shadow-lg: 0 4px 6px rgba(0, 0, 0, 0.05), 0 10px 15px rgba(0, 0, 0, 0.08);
  --shadow-xl: 0 10px 25px rgba(0, 0, 0, 0.1);
  --shadow-2xl: 0 25px 50px rgba(0, 0, 0, 0.12);

  /* For colored shadows on special elements (use sparingly) */
  --shadow-colored: 0 4px 12px rgba(30, 64, 175, 0.15);

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

  /* Font Families */
  --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI',
                 Roboto, Oxygen, Ubuntu, sans-serif;
  --font-family-base: var(--font-family);
  --font-family-mono: 'JetBrains Mono', 'Fira Code', 'Courier New', monospace;

  /* Font Sizes - Tighter, professional scale */
  --text-xs: 0.6875rem;    /* 11px - labels, captions */
  --text-sm: 0.75rem;      /* 12px - secondary text */
  --text-base: 0.875rem;   /* 14px - body text */
  --text-md: 1rem;         /* 16px - emphasized body */
  --text-lg: 1.125rem;     /* 18px - section headers */
  --text-xl: 1.25rem;      /* 20px - card titles */
  --text-2xl: 1.5rem;      /* 24px - page titles */
  --text-3xl: 1.875rem;    /* 30px - hero text */
  --text-4xl: 2.25rem;     /* 36px - display */

  /* Legacy font-size names */
  --font-size-xs: var(--text-xs);
  --font-size-sm: var(--text-sm);
  --font-size-base: var(--text-base);
  --font-size-lg: var(--text-lg);
  --font-size-xl: var(--text-xl);
  --font-size-2xl: var(--text-2xl);
  --font-size-3xl: var(--text-3xl);
  --font-size-4xl: var(--text-4xl);

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

  /* Line Heights */
  --leading-tight: 1.2;
  --leading-snug: 1.375;
  --leading-normal: 1.5;
  --leading-relaxed: 1.625;

  /* Legacy line-height names */
  --line-height-tight: 1.2;
  --line-height-normal: 1.5;
  --line-height-relaxed: 1.625;

  /* Letter Spacing */
  --tracking-tight: -0.025em;
  --tracking-normal: 0;
  --tracking-wide: 0.025em;

  /* ========================================
     TRANSITIONS (Fast, Professional)
     ======================================== */

  --transition-fast: 0.1s ease;
  --transition-base: 0.15s ease;
  --transition-slow: 0.2s ease;
  --transition-all: all 0.15s ease;

  /* ========================================
     Z-INDEX SCALE
     ======================================== */

  --z-dropdown: 1000;
  --z-sticky: 1020;
  --z-fixed: 1030;
  --z-modal-backdrop: 1040;
  --z-modal: 1050;
  --z-popover: 1060;
  --z-tooltip: 1070;

  /* ========================================
     LAYOUT
     ======================================== */

  --container-max-width: 1200px;
  --sidebar-width: 250px;
  --header-height: 60px;

  /* ========================================
     GRADIENTS (Subtle, Professional)
     ======================================== */

  /* Use gradients sparingly - prefer solid colors */
  --gradient-primary: linear-gradient(135deg, #1e40af 0%, #1e3a8a 100%);
  --gradient-subtle: linear-gradient(90deg, #1e40af, #0284c7);
  --gradient-text: linear-gradient(135deg, #1e40af, #0284c7);
}

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

html[data-theme="dark"] {
  /* Backgrounds */
  --bg-page: #0f172a;
  --bg-primary: #0f172a;
  --bg-secondary: #1e293b;
  --bg-card: #1e293b;
  --bg-hover: #334155;
  --bg-active: #475569;

  /* Text */
  --text-primary: #f8fafc;
  --text-secondary: #cbd5e1;
  --text-muted: #64748b;

  /* Borders */
  --border-color: #334155;
  --border-color-light: #1e293b;
  --border-color-dark: #475569;
  --border-color-strong: #475569;

  /* Shadows - stronger for dark mode */
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.2);
  --shadow-md: 0 2px 4px rgba(0, 0, 0, 0.3), 0 4px 6px rgba(0, 0, 0, 0.2);
  --shadow-lg: 0 4px 6px rgba(0, 0, 0, 0.25), 0 10px 15px rgba(0, 0, 0, 0.3);
  --shadow-xl: 0 10px 25px rgba(0, 0, 0, 0.4);
}
