/* ========================================
   DreamCRM - CSS Variables (Design Tokens)
   ======================================== */

:root {
  /* ========================================
     Color Palette - Primary
     ======================================== */
  --primary-50: #eef2ff;
  --primary-100: #e0e7ff;
  --primary-200: #c7d2fe;
  --primary-300: #a5b4fc;
  --primary-400: #818cf8;
  --primary-500: #6366f1;
  --primary-600: #4f46e5;
  --primary-700: #4338ca;
  --primary-800: #3730a3;
  --primary-900: #312e81;

  /* ========================================
     Color Palette - Neutral (Slate)
     ======================================== */
  --gray-50: #f8fafc;
  --gray-100: #f1f5f9;
  --gray-200: #e2e8f0;
  --gray-300: #cbd5e1;
  --gray-400: #94a3b8;
  --gray-500: #64748b;
  --gray-600: #475569;
  --gray-700: #334155;
  --gray-800: #1e293b;
  --gray-900: #0f172a;

  /* ========================================
     Color Palette - Semantic
     ======================================== */
  --success-50: #ecfdf5;
  --success-100: #d1fae5;
  --success-500: #10b981;
  --success-600: #059669;
  
  --warning-50: #fffbeb;
  --warning-100: #fef3c7;
  --warning-500: #f59e0b;
  --warning-600: #d97706;
  
  --danger-50: #fef2f2;
  --danger-100: #fee2e2;
  --danger-500: #ef4444;
  --danger-600: #dc2626;
  
  --info-50: #ecfeff;
  --info-100: #cffafe;
  --info-500: #06b6d4;
  --info-600: #0891b2;

  /* ========================================
     Theme Colors (Alias Tokens)
     ======================================== */
  --primary: var(--primary-500);
  --primary-light: var(--primary-400);
  --primary-dark: var(--primary-600);
  --primary-soft: var(--primary-50);
  
  --success: var(--success-500);
  --success-soft: var(--success-50);
  
  --warning: var(--warning-500);
  --warning-soft: var(--warning-50);
  
  --danger: var(--danger-500);
  --danger-soft: var(--danger-50);
  
  --info: var(--info-500);
  --info-soft: var(--info-50);

  /* ========================================
     Background Colors
     ======================================== */
  --body-bg: #eceef2;
  --surface-primary: #ffffff;
  --surface-secondary: #f8fafc;
  --surface-tertiary: #f1f5f9;
  --header-bg: #ffffff;
  --submenu-bg: #ffffff;

  /* ========================================
     Text Colors
     ======================================== */
  --text-primary: var(--gray-900);
  --text-secondary: var(--gray-600);
  --text-tertiary: var(--gray-500);
  --text-muted: var(--gray-400);
  --text-inverse: #ffffff;

  /* ========================================
     Border Colors
     ======================================== */
  --border-color: var(--gray-200);
  --border-light: var(--gray-100);
  --border-dark: var(--gray-300);

  /* ========================================
     Spacing Scale (4px base)
     ======================================== */
  --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 */

  /* ========================================
     Border Radius Scale
     ======================================== */
  --radius-none: 0;
  --radius-sm: 4px;
  --radius: 6px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;
  --radius-full: 9999px;

  /* ========================================
     Shadows
     ======================================== */
  --shadow-none: none;
  --shadow-sm: 0 1px 2px 0 rgba(15, 23, 42, 0.08);
  --shadow: 0 4px 6px -1px rgba(15, 23, 42, 0.08), 0 2px 4px -1px rgba(15, 23, 42, 0.04);
  --shadow-md: 0 10px 15px -3px rgba(15, 23, 42, 0.08), 0 4px 6px -2px rgba(15, 23, 42, 0.04);
  --shadow-lg: 0 20px 25px -5px rgba(15, 23, 42, 0.08), 0 10px 10px -5px rgba(15, 23, 42, 0.03);
  --shadow-xl: 0 25px 50px -12px rgba(15, 23, 42, 0.25);
  --shadow-dropdown: 0 10px 40px -10px rgba(15, 23, 42, 0.15);

  /* ========================================
     Transitions
     ======================================== */
  --transition-fast: 150ms ease;
  --transition-base: 200ms ease;
  --transition-slow: 300ms ease;
  --transition-bounce: 300ms cubic-bezier(0.34, 1.56, 0.64, 1);

  /* ========================================
     Typography Scale
     ======================================== */
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  
  --text-xs: 0.6875rem;   /* 11px */
  --text-sm: 0.75rem;     /* 12px */
  --text-base: 0.875rem;  /* 14px */
  --text-md: 1rem;        /* 16px */
  --text-lg: 1.125rem;    /* 18px */
  --text-xl: 1.25rem;     /* 20px */
  --text-2xl: 1.5rem;     /* 24px */
  --text-3xl: 1.875rem;   /* 30px */

  --font-normal: 400;
  --font-medium: 500;
  --font-semibold: 600;
  --font-bold: 700;

  --leading-none: 1;
  --leading-tight: 1.25;
  --leading-snug: 1.375;
  --leading-normal: 1.5;
  --leading-relaxed: 1.625;

  /* ========================================
     Layout Dimensions
     ======================================== */
  --header-height: 70px;
  --submenu-height: 56px;
  --banner-height: 0px;
  --footer-height: 60px;
  --sidebar-width: 260px;

  /* ========================================
     Z-Index Scale
     ======================================== */
  --z-dropdown: 1000;
  --z-sticky: 1020;
  --z-submenu: 1020;
  --z-header: 1030;
  --z-modal-backdrop: 1040;
  --z-modal: 1050;
  --z-popover: 1060;
  --z-tooltip: 1070;

  /* ========================================
     Transitions
     ======================================== */
  --transition-fast: 150ms ease;
  --transition: 250ms ease;
  --transition-slow: 350ms ease;
  --transition-bounce: cubic-bezier(0.34, 1.56, 0.64, 1);

  /* ========================================
     Grid & Layout
     ======================================== */
  --container-max: 1440px;
  --container-padding: var(--space-4); /* Reduced from space-6 for tighter layout */
}

/* ========================================
   Dark Mode Support (Future)
   ======================================== */
@media (prefers-color-scheme: dark) {
  :root {
    /* Reserved for future dark mode implementation */
  }
}
