/* =====================================================
   نظام متغيرات CSS - Design System Variables
   ===================================================== */

:root {
  /* =====================================================
     الألوان - Colors
     ===================================================== */
  
  /* Primary Colors */
  --primary: #ee8424;
  --primary-light: #f5a84d;
  --primary-dark: #d67419;
  --primary-lighter: #faf4ef;
  
  /* Status Colors */
  --danger: #e32e21;
  --danger-light: #f8d4cf;
  --warning: #f8ce0c;
  --warning-light: #fef6d4;
  --success: #2da854;
  --success-light: #e6f5ed;
  --info: #0066cc;
  --info-light: #e6f0ff;
  
  /* Gray Scale */
  --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 & Text */
  --text-dark: #1a1a1a;
  --text-light: #666666;
  --text-lighter: #999999;
  --bg-light: #ffffff;
  --bg-lighter: #f5f5f5;
  --bg-card: #fafafa;
  --border: #e0e0e0;
  --border-light: #f0f0f0;
  
  /* =====================================================
     الخطوط - Fonts
     ===================================================== */
  
  --font-main: 'Cairo', -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif;
  --font-mono: 'Courier New', monospace;
  
  /* Font Sizes */
  --fs-xs: 12px;
  --fs-sm: 14px;
  --fs-base: 16px;
  --fs-lg: 18px;
  --fs-xl: 20px;
  --fs-2xl: 24px;
  --fs-3xl: 32px;
  --fs-4xl: 40px;
  
  /* Font Weights */
  --fw-normal: 400;
  --fw-medium: 500;
  --fw-semibold: 600;
  --fw-bold: 700;
  
  /* Line Heights */
  --lh-tight: 1.2;
  --lh-normal: 1.5;
  --lh-relaxed: 1.75;
  
  /* =====================================================
     المسافات - Spacing
     ===================================================== */
  
  --spacing-xs: 4px;
  --spacing-sm: 8px;
  --spacing-md: 16px;
  --spacing-lg: 24px;
  --spacing-xl: 32px;
  --spacing-2xl: 48px;
  --spacing-3xl: 64px;
  
  /* =====================================================
     الحدود - Border Radius
     ===================================================== */
  
  --radius-none: 0;
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;
  --radius-2xl: 20px;
  --radius-full: 9999px;
  
  /* =====================================================
     الظلال - Shadows
     ===================================================== */
  
  --shadow-none: none;
  --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);
  
  /* =====================================================
     الانتقالات - Transitions
     ===================================================== */
  
  --transition-fast: 150ms ease-in-out;
  --transition-base: 200ms ease-in-out;
  --transition-slow: 300ms ease-in-out;
  --transition-slower: 500ms ease-in-out;
  
  /* =====================================================
     الحدود العميقة - Z-index
     ===================================================== */
  
  --z-dropdown: 1000;
  --z-sticky: 1020;
  --z-fixed: 1030;
  --z-modal-backdrop: 1040;
  --z-modal: 1050;
  --z-popover: 1060;
  --z-tooltip: 1070;
  
  /* =====================================================
     Container & Breakpoints
     ===================================================== */
  
  --container-xs: 100%;
  --container-sm: 540px;
  --container-md: 720px;
  --container-lg: 960px;
  --container-xl: 1140px;
  --container-2xl: 1320px;
  
  /* =====================================================
     Grid
     ===================================================== */
  
  --grid-cols-1: repeat(1, minmax(0, 1fr));
  --grid-cols-2: repeat(2, minmax(0, 1fr));
  --grid-cols-3: repeat(3, minmax(0, 1fr));
  --grid-cols-4: repeat(4, minmax(0, 1fr));
  --grid-cols-6: repeat(6, minmax(0, 1fr));
  --grid-gap: var(--spacing-md);
}

/* =====================================================
   Dark Mode (اختياري)
   ===================================================== */

@media (prefers-color-scheme: dark) {
  :root {
    --text-dark: #f5f5f5;
    --text-light: #cccccc;
    --text-lighter: #999999;
    --bg-light: #1a1a1a;
    --bg-lighter: #2a2a2a;
    --bg-card: #252525;
    --border: #404040;
    --border-light: #333333;
  }
}

/* =====================================================
   RTL Support
   ===================================================== */

[dir="rtl"] {
  --margin-start: margin-right;
  --margin-end: margin-left;
  --padding-start: padding-right;
  --padding-end: padding-left;
  --text-align-start: text-align: right;
  --text-align-end: text-align: left;
}

[dir="ltr"] {
  --margin-start: margin-left;
  --margin-end: margin-right;
  --padding-start: padding-left;
  --padding-end: padding-right;
  --text-align-start: text-align: left;
  --text-align-end: text-align: right;
}

