/* ============================================
   Design System - Core Tokens
   Modern, Clean, Production-Ready
   ============================================ */

:root {
    /* ========================================
       Primary Brand Colors
       ======================================== */
    --primary-50: #f0f7ff;
    --primary-100: #e0efff;
    --primary-200: #b8ddff;
    --primary-300: #7bc2ff;
    --primary-400: #36a3ff;
    --primary-500: #0d88ff;    /* Main Primary */
    --primary-600: #0069d9;    /* Hover/Active */
    --primary-700: #0052b3;
    --primary-800: #004494;
    --primary-900: #003a7a;
    
    /* ========================================
       Accent Colors
       ======================================== */
    --accent-orange: #ff6b35;   /* CTA, Highlights */
    --accent-teal: #00d4aa;     /* Success, Positive */
    --accent-purple: #8b5cf6;   /* Premium Features */
    
    /* ========================================
       Semantic Colors
       ======================================== */
    --success: #10b981;
    --success-50: #ecfdf5;
    --success-100: #d1fae5;
    --success-200: #a7f3d0;
    --success-500: #10b981;
    --success-600: #059669;
    --success-700: #047857;
    
    --warning: #f59e0b;
    --warning-50: #fffbeb;
    --warning-100: #fef3c7;
    --warning-200: #fde68a;
    --warning-500: #f59e0b;
    --warning-600: #d97706;
    --warning-700: #b45309;
    
    --error: #ef4444;
    --error-50: #fef2f2;
    --error-100: #fee2e2;
    --error-200: #fecaca;
    --error-500: #ef4444;
    --error-600: #dc2626;
    --error-700: #b91c1c;
    
    --info: #3b82f6;
    --info-50: #eff6ff;
    --info-100: #dbeafe;
    --info-200: #bfdbfe;
    --info-500: #3b82f6;
    --info-600: #2563eb;
    --info-700: #1d4ed8;
    
    /* ========================================
       Neutral Grays (RTL Optimized)
       ======================================== */
    --gray-50: #f9fafb;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-300: #d1d5db;
    --gray-400: #9ca3af;
    --gray-500: #6b7280;
    --gray-600: #4b5563;
    --gray-700: #374151;
    --gray-800: #1f2937;
    --gray-900: #111827;
    
    /* ========================================
       Background Colors
       ======================================== */
    --bg-primary: #ffffff;
    --bg-secondary: #f9fafb;
    --bg-tertiary: #f3f4f6;
    --bg-overlay: rgba(0, 0, 0, 0.5);
    
    /* ========================================
       Text Colors
       ======================================== */
    --text-primary: #111827;
    --text-secondary: #4b5563;
    --text-tertiary: #6b7280;
    --text-inverse: #ffffff;
    --text-disabled: #9ca3af;
    
    /* ========================================
       Typography
       ======================================== */
    /* Font Families */
    --font-arabic: 'Cairo', 'Tajawal', 'Almarai', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-english: 'Inter', 'SF Pro Display', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-mono: 'SF Mono', 'Monaco', 'Cascadia Code', 'Consolas', monospace;
    
    /* Font Sizes - Reduced */
    --text-xs: 0.7rem;      /* 11.2px - Labels, Captions */
    --text-sm: 0.8rem;     /* 12.8px - Body Small, Secondary Text */
    --text-base: 0.9rem;       /* 14.4px - Body Text */
    --text-lg: 1rem;     /* 16px - Body Large */
    --text-xl: 1.1rem;      /* 17.6px - Subheadings */
    --text-2xl: 1.3rem;      /* 20.8px - Section Headings */
    --text-3xl: 1.6rem;    /* 25.6px - Page Titles */
    --text-4xl: 1.9rem;     /* 30.4px - Hero Headings */
    --text-5xl: 2.4rem;        /* 38.4px - Display Headings */
    --text-6xl: 3rem;     /* 48px - Large Display */
    
    /* Font Weights */
    --font-light: 300;
    --font-normal: 400;
    --font-medium: 500;
    --font-semibold: 600;
    --font-bold: 700;
    --font-extrabold: 800;
    --font-black: 900;
    
    /* Line Heights */
    --leading-none: 1;
    --leading-tight: 1.25;
    --leading-snug: 1.375;
    --leading-normal: 1.5;
    --leading-relaxed: 1.625;
    --leading-loose: 2;
    
    /* Letter Spacing */
    --tracking-tighter: -0.05em;
    --tracking-tight: -0.025em;
    --tracking-normal: 0;
    --tracking-wide: 0.025em;
    --tracking-wider: 0.05em;
    --tracking-widest: 0.1em;
    
    /* ========================================
       Spacing System (6px base - Reduced)
       ======================================== */
    --space-0: 0;
    --space-1: 0.2rem;   /* 3.2px */
    --space-2: 0.4rem;    /* 6.4px */
    --space-3: 0.6rem;   /* 9.6px */
    --space-4: 0.8rem;      /* 12.8px */
    --space-5: 1rem;   /* 16px */
    --space-6: 1.2rem;    /* 19.2px */
    --space-8: 1.6rem;      /* 25.6px */
    --space-10: 2rem;   /* 32px */
    --space-12: 2.4rem;     /* 38.4px */
    --space-16: 3.2rem;     /* 51.2px */
    --space-20: 4rem;     /* 64px */
    --space-24: 4.8rem;     /* 76.8px */
    --space-32: 6.4rem;     /* 102.4px */
    
    /* ========================================
       Shadows
       ======================================== */
    --shadow-xs: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-sm: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
    --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);
    --shadow-none: none;
    
    /* Colored Shadows */
    --shadow-primary: 0 4px 14px 0 rgba(13, 136, 255, 0.15);
    --shadow-success: 0 4px 14px 0 rgba(16, 185, 129, 0.15);
    --shadow-error: 0 4px 14px 0 rgba(239, 68, 68, 0.15);
    
    /* ========================================
       Borders
       ======================================== */
    --border-width: 1px;
    --border-width-thick: 2px;
    --border-width-thin: 0.5px;
    
    --border-radius-none: 0;
    --border-radius-sm: 0.25rem;   /* 4px */
    --border-radius: 0.5rem;       /* 8px */
    --border-radius-md: 0.75rem;   /* 12px */
    --border-radius-lg: 1rem;      /* 16px */
    --border-radius-xl: 1.5rem;    /* 24px */
    --border-radius-2xl: 2rem;     /* 32px */
    --border-radius-full: 9999px;
    
    --border-color: var(--gray-200);
    --border-color-hover: var(--gray-300);
    --border-color-focus: var(--primary-500);
    --border-color-error: var(--error-500);
    --border-color-success: var(--success-500);
    
    /* ========================================
       Transitions & Animations
       ======================================== */
    --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-base: 200ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 300ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slower: 500ms cubic-bezier(0.4, 0, 0.2, 1);
    
    /* 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);
    --ease-spring: cubic-bezier(0.175, 0.885, 0.32, 1.275);
    
    /* Animation Durations */
    --duration-fast: 150ms;
    --duration-base: 200ms;
    --duration-slow: 300ms;
    --duration-slower: 500ms;
    
    /* ========================================
       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;
    --z-toast: 1080;
    
    /* ========================================
       Breakpoints (for reference in JS)
       ======================================== */
    --breakpoint-sm: 640px;
    --breakpoint-md: 768px;
    --breakpoint-lg: 1024px;
    --breakpoint-xl: 1280px;
    --breakpoint-2xl: 1536px;
}

/* ========================================
   Dark Mode Support (Optional)
   ======================================== */
[data-theme="dark"] {
    --bg-primary: #1f2937;
    --bg-secondary: #111827;
    --bg-tertiary: #0f172a;
    
    --text-primary: #f9fafb;
    --text-secondary: #d1d5db;
    --text-tertiary: #9ca3af;
    
    --border-color: var(--gray-700);
    --border-color-hover: var(--gray-600);
}

/* ========================================
   RTL Support
   ======================================== */
[dir="rtl"] {
    direction: rtl;
    text-align: right;
}

[dir="ltr"] {
    direction: ltr;
    text-align: left;
}

/* ========================================
   Print Styles
   ======================================== */
@media print {
    :root {
        --shadow-sm: none;
        --shadow-md: none;
        --shadow-lg: none;
    }
}

