/* ============================================================================
   Design Tokens - نظام المتغيرات الموحد
   نادي أدِيب - المصدر الوحيد لجميع المتغيرات
   ============================================================================ */

:root {
    /* ============================================================================
       الألوان الأساسية - Brand Colors
       ============================================================================ */
    --color-primary: #274060;
    --color-primary-light: #3d8fd6;
    --color-primary-lighter: #6ba8e2;
    --color-primary-dark: #1a2a3a;
    --color-primary-rgb: 39, 64, 96;
    --color-accent-rgb: 61, 143, 214;
    
    /* الألوان المساعدة - Semantic Colors */
    --color-success: #10b981;
    --color-success-light: #34d399;
    --color-success-dark: #059669;
    --color-success-rgb: 16, 185, 129;
    
    --color-warning: #f59e0b;
    --color-warning-light: #fbbf24;
    --color-warning-dark: #d97706;
    --color-warning-rgb: 245, 158, 11;
    
    --color-danger: #ef4444;
    --color-danger-light: #f87171;
    --color-danger-dark: #dc2626;
    --color-danger-rgb: 239, 68, 68;
    
    --color-info: #3b82f6;
    --color-info-light: #60a5fa;
    --color-info-dark: #2563eb;
    --color-info-rgb: 59, 130, 246;
    
    --color-purple: #8b5cf6;
    --color-purple-light: #a78bfa;
    --color-purple-dark: #7c3aed;
    --color-purple-rgb: 139, 92, 246;
    
    --color-teal: #14b8a6;
    --color-teal-light: #2dd4bf;
    --color-teal-dark: #0d9488;
    --color-teal-rgb: 20, 184, 166;
    
    --color-pink: #ec4899;
    --color-pink-light: #f472b6;
    --color-pink-dark: #db2777;
    --color-pink-rgb: 236, 72, 153;
    
    /* ============================================================================
       ألوان النصوص - Text Colors
       ============================================================================ */
    --text-primary: #274060;
    --text-secondary: #335c81;
    --text-muted: #64748b;
    --text-light: #94a3b8;
    --text-white: #ffffff;
    --text-dark: #1e293b;
    
    /* ============================================================================
       ألوان الخلفيات - Background Colors
       ============================================================================ */
    --bg-primary: #ffffff;
    --bg-secondary: #f8f9fa;
    --bg-tertiary: #f1f5f9;
    --bg-dark: #1e293b;
    --bg-gradient: linear-gradient(135deg, #f8f9fa 0%, #e6f0f9 100%);
    --bg-gradient-dark: linear-gradient(135deg, #1a1a1a 0%, #0f1419 100%);
    
    /* ============================================================================
       ألوان الحدود - Border Colors
       ============================================================================ */
    --border-light: #e2e8f0;
    --border-medium: #cbd5e1;
    --border-dark: #94a3b8;
    --border-primary: rgba(61, 143, 214, 0.2);
    --border-primary-hover: rgba(61, 143, 214, 0.35);
    
    /* ============================================================================
       الظلال - Shadows
       ============================================================================ */
    --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.15);
    --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.2);
    --shadow-xl: 0 20px 60px rgba(0, 0, 0, 0.3);
    --shadow-primary: 0 4px 20px rgba(61, 143, 214, 0.25);
    --shadow-primary-lg: 0 8px 30px rgba(61, 143, 214, 0.35);
    --shadow-card: 0 4px 15px rgba(39, 64, 96, 0.08);
    --shadow-card-hover: 0 8px 25px rgba(39, 64, 96, 0.12);
    
    /* ============================================================================
       الزوايا - Border Radius
       ============================================================================ */
    --radius-xs: 4px;
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --radius-full: 9999px;
    
    /* ============================================================================
       المسافات - Spacing
       ============================================================================ */
    --spacing-xs: 0.25rem;
    --spacing-sm: 0.5rem;
    --spacing-md: 1rem;
    --spacing-lg: 1.5rem;
    --spacing-xl: 2rem;
    --spacing-2xl: 3rem;
    --spacing-3xl: 4rem;
    
    /* ============================================================================
       أبعاد التخطيط - Layout Dimensions
       ============================================================================ */
    --header-height: 70px;
    --sidebar-width: 280px;
    --sidebar-collapsed-width: 70px;
    --content-padding: 2rem;
    --layout-gap: 0px;
    --sidebar-main-gap: 0px;
    
    /* ============================================================================
       طبقات Z-Index
       ============================================================================ */
    --z-dropdown: 100;
    --z-sticky: 200;
    --z-fixed: 300;
    --z-sidebar: 800;
    --z-backdrop: 899;
    --z-header: 900;
    --z-modal: 1000;
    --z-popover: 1100;
    --z-tooltip: 1200;
    --z-fab: 999;
    
    /* ============================================================================
       الانتقالات - Transitions
       ============================================================================ */
    --transition-fast: 0.15s ease;
    --transition-normal: 0.3s ease;
    --transition-slow: 0.5s ease;
    --transition-bounce: 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    --transition-smooth: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    
    /* ============================================================================
       الخطوط - Typography
       ============================================================================ */
    --font-family-base: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    --font-family-arabic: 'ERA', 'Lyon Arabic', var(--font-family-base);
    --font-family-light: fl, var(--font-family-arabic);
    --font-family-regular: fr, var(--font-family-arabic);
    --font-family-medium: fm, var(--font-family-arabic);
    --font-family-bold: fb, var(--font-family-arabic);
    
    --font-size-xs: 0.75rem;
    --font-size-sm: 0.875rem;
    --font-size-base: 1rem;
    --font-size-lg: 1.125rem;
    --font-size-xl: 1.25rem;
    --font-size-2xl: 1.5rem;
    --font-size-3xl: 2rem;
    --font-size-4xl: 2.5rem;
    
    --font-weight-light: 300;
    --font-weight-normal: 400;
    --font-weight-medium: 500;
    --font-weight-semibold: 600;
    --font-weight-bold: 700;
    
    --line-height-tight: 1.25;
    --line-height-normal: 1.5;
    --line-height-relaxed: 1.75;
    
    /* ============================================================================
       حقول الإدخال - Form Inputs
       ============================================================================ */
    --input-bg: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(249, 251, 255, 0.98));
    --input-bg-hover: linear-gradient(180deg, #ffffff, #f7fbff);
    --input-bg-disabled: #f5f5f5;
    --input-border: #e3eef9;
    --input-border-focus: rgba(61, 143, 214, 0.35);
    --input-shadow: 0 1px 0 rgba(255, 255, 255, 0.8) inset, 0 2px 10px rgba(39, 64, 96, 0.06);
    --input-shadow-focus: 0 0 0 4px rgba(61, 143, 214, 0.18), 0 2px 10px rgba(39, 64, 96, 0.06);
    --input-placeholder: #7c8aa3;
    --input-radius: var(--radius-md);
    
    /* ============================================================================
       الأزرار - Buttons
       ============================================================================ */
    --btn-padding-sm: 0.65rem 1.25rem;
    --btn-padding-md: 0.875rem 1.75rem;
    --btn-padding-lg: 1.1rem 2.25rem;
    --btn-radius: var(--radius-md);
    --btn-transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    
    /* ============================================================================
       البطاقات - Cards
       ============================================================================ */
    --card-bg: #ffffff;
    --card-border: rgba(61, 143, 214, 0.1);
    --card-radius: var(--radius-lg);
    --card-padding: 1.5rem;
    --card-shadow: var(--shadow-card);
    --card-shadow-hover: var(--shadow-card-hover);
    
    /* ============================================================================
       النوافذ المنبثقة - Modals
       ============================================================================ */
    --modal-bg: linear-gradient(135deg, #ffffff, #f8fbff);
    --modal-backdrop: linear-gradient(135deg, rgba(39, 64, 96, 0.85), rgba(26, 42, 58, 0.9));
    --modal-radius: var(--radius-xl);
    --modal-shadow: var(--shadow-xl);
    
    /* ============================================================================
       الشريط الجانبي - Sidebar
       ============================================================================ */
    --sidebar-bg: linear-gradient(180deg, #274060 0%, #1a2a3a 100%);
    --sidebar-hover: rgba(61, 143, 214, 0.15);
    --sidebar-active: rgba(61, 143, 214, 0.25);
    --sidebar-shadow: 0 10px 40px rgba(39, 64, 96, 0.3);
    
    /* ============================================================================
       الهيدر - Header
       ============================================================================ */
    --header-bg: rgba(255, 255, 255, 0.95);
    --header-shadow: 0 5px 30px rgba(39, 64, 96, 0.1);
}


/* ============================================================================
   Accessibility - تقليل الحركة
   ============================================================================ */
@media (prefers-reduced-motion: reduce) {
    :root {
        --transition-fast: 0.01ms;
        --transition-normal: 0.01ms;
        --transition-slow: 0.01ms;
        --transition-bounce: 0.01ms;
        --transition-smooth: 0.01ms;
    }
}
