/* ═══════════════════════════════════════════════════
   MASAR — Design System V4 (Ultra Premium Edition)
   نظام التصميم — تصميم فاخر ومنافس عالمياً
   ═══════════════════════════════════════════════════ */

:root {
  /* ─── Brand Colors (Violet-Indigo — فخامة وابتكار) ─── */
  --primary-50:  #F5F3FF;
  --primary-100: #EDE9FE;
  --primary-200: #DDD6FE;
  --primary-300: #C4B5FD;
  --primary-400: #A78BFA;
  --primary-500: #8B5CF6;
  --primary-600: #7C3AED;
  --primary-700: #6D28D9;
  --primary-800: #5B21B6;
  --primary-900: #4C1D95;

  /* ─── Secondary (Electric Indigo — ديناميكية) ─── */
  --secondary-50:  #EEF2FF;
  --secondary-100: #E0E7FF;
  --secondary-200: #C7D2FE;
  --secondary-300: #A5B4FC;
  --secondary-400: #818CF8;
  --secondary-500: #6366F1;
  --secondary-600: #4F46E5;
  --secondary-700: #4338CA;
  --secondary-800: #3730A3;
  --secondary-900: #312E81;

  /* ─── Accent (Royal Gold — لمسات ذهبية فاخرة) ─── */
  --accent-50:  #FFFBEB;
  --accent-100: #FEF3C7;
  --accent-200: #FDE68A;
  --accent-300: #FCD34D;
  --accent-400: #FBBF24;
  --accent-500: #F59E0B;
  --accent-600: #D97706;
  --accent-700: #B45309;
  --accent-800: #92400E;
  --accent-900: #78350F;

  /* ─── Semantic Colors ─── */
  --success-50:  #ECFDF5;
  --success-500: #10B981;
  --success-600: #059669;
  --success-700: #047857;

  --warning-50:  #FFFBEB;
  --warning-500: #F59E0B;
  --warning-600: #D97706;

  --danger-50:  #FEF2F2;
  --danger-500: #EF4444;
  --danger-600: #DC2626;
  --danger-700: #B91C1C;

  --info-50:  #EFF6FF;
  --info-500: #3B82F6;
  --info-600: #2563EB;

  /* ─── Neutral Colors (Cool 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;
  --gray-950: #020617;

  /* ─── Theme Colors (Light Mode) ─── */
  --bg-primary:    #FFFFFF;
  --bg-secondary:  #F8FAFC;
  --bg-tertiary:   #F1F5F9;
  --bg-elevated:   #FFFFFF;
  --bg-overlay:    rgba(15, 23, 42, 0.6);
  --bg-glass:      rgba(255, 255, 255, 0.72);
  --bg-glass-heavy: rgba(255, 255, 255, 0.88);

  --text-primary:   #0F172A;
  --text-secondary: #475569;
  --text-tertiary:  #94A3B8;
  --text-inverse:   #FFFFFF;
  --text-link:      #7C3AED;
  --text-link-hover:#6D28D9;

  --border-light:   rgba(148, 163, 184, 0.2);
  --border-default: rgba(148, 163, 184, 0.3);
  --border-focus:   #7C3AED;
  --border-glass:   rgba(255, 255, 255, 0.18);

  --input-bg:       rgba(241, 245, 249, 0.6);
  --input-border:   rgba(148, 163, 184, 0.3);
  --input-focus:    #7C3AED;
  --input-error:    #EF4444;
  --input-placeholder: #94A3B8;

  --card-bg:        rgba(255, 255, 255, 0.75);
  --card-border:    rgba(148, 163, 184, 0.15);
  --card-shadow:    0 1px 3px rgba(0, 0, 0, 0.04), 0 4px 16px rgba(124, 58, 237, 0.04);
  --card-shadow-hover: 0 8px 30px rgba(124, 58, 237, 0.1), 0 2px 8px rgba(0, 0, 0, 0.04);

  --navbar-bg:      rgba(255, 255, 255, 0.72);
  --navbar-border:  rgba(148, 163, 184, 0.15);
  --sidebar-bg:     rgba(255, 255, 255, 0.65);

  /* ─── Gradients (Premium Mesh & Aurora) ─── */
  --gradient-primary: linear-gradient(135deg, #7C3AED 0%, #6366F1 50%, #818CF8 100%);
  --gradient-secondary: linear-gradient(135deg, #6366F1 0%, #8B5CF6 100%);
  --gradient-accent: linear-gradient(135deg, #F59E0B 0%, #FBBF24 100%);
  --gradient-hero: linear-gradient(135deg, #4C1D95 0%, #7C3AED 30%, #6366F1 60%, #818CF8 100%);
  --gradient-card: linear-gradient(135deg, rgba(124, 58, 237, 0.03) 0%, rgba(99, 102, 241, 0.03) 100%);
  --gradient-glass: linear-gradient(135deg, rgba(255,255,255,0.8) 0%, rgba(255,255,255,0.5) 100%);
  --gradient-mesh: radial-gradient(at 20% 80%, rgba(124, 58, 237, 0.08) 0%, transparent 50%),
                   radial-gradient(at 80% 20%, rgba(99, 102, 241, 0.06) 0%, transparent 50%),
                   radial-gradient(at 50% 50%, rgba(251, 191, 36, 0.03) 0%, transparent 70%);
  --gradient-aurora: linear-gradient(135deg, 
    rgba(124, 58, 237, 0.1) 0%, 
    rgba(99, 102, 241, 0.05) 25%, 
    rgba(139, 92, 246, 0.08) 50%, 
    rgba(251, 191, 36, 0.04) 75%, 
    rgba(124, 58, 237, 0.06) 100%);
  --gradient-shine: linear-gradient(120deg, transparent 30%, rgba(255,255,255,0.4) 50%, transparent 70%);
  --gradient-border: linear-gradient(135deg, rgba(124, 58, 237, 0.5), rgba(99, 102, 241, 0.3), rgba(251, 191, 36, 0.3));

  /* ─── Typography ─── */
  --font-primary: 'IBM Plex Sans Arabic', 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-display: 'Outfit', 'IBM Plex Sans Arabic', sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', 'Consolas', monospace;

  --text-xs:   0.75rem;    /* 12px */
  --text-sm:   0.875rem;   /* 14px */
  --text-base: 1rem;       /* 16px */
  --text-lg:   1.125rem;   /* 18px */
  --text-xl:   1.25rem;    /* 20px */
  --text-2xl:  1.5rem;     /* 24px */
  --text-3xl:  1.875rem;   /* 30px */
  --text-4xl:  2.25rem;    /* 36px */
  --text-5xl:  3rem;       /* 48px */

  --font-light:    300;
  --font-regular:  400;
  --font-medium:   500;
  --font-semibold: 600;
  --font-bold:     700;
  --font-extrabold:800;

  --leading-tight:  1.25;
  --leading-normal: 1.5;
  --leading-relaxed:1.75;

  /* ─── Spacing ─── */
  --space-0\.5: 0.125rem;  /* 2px */
  --space-1:  0.25rem;     /* 4px */
  --space-1\.5: 0.375rem;  /* 6px */
  --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 */
  --space-24: 6rem;        /* 96px */

  /* ─── Border Radius (Smooth & Modern) ─── */
  --radius-sm:   0.5rem;   /* 8px */
  --radius-md:   0.75rem;  /* 12px */
  --radius-lg:   1rem;     /* 16px */
  --radius-xl:   1.25rem;  /* 20px */
  --radius-2xl:  1.5rem;   /* 24px */
  --radius-3xl:  2rem;     /* 32px */
  --radius-full: 9999px;

  /* ─── Shadows (Premium with Colored Glow) ─── */
  --shadow-xs:  0 1px 2px rgba(0, 0, 0, 0.04);
  --shadow-sm:  0 1px 3px rgba(0, 0, 0, 0.05), 0 1px 2px rgba(0, 0, 0, 0.03);
  --shadow-md:  0 4px 6px -1px rgba(0, 0, 0, 0.06), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
  --shadow-lg:  0 10px 15px -3px rgba(0, 0, 0, 0.06), 0 4px 6px -2px rgba(0, 0, 0, 0.03);
  --shadow-xl:  0 20px 25px -5px rgba(0, 0, 0, 0.06), 0 10px 10px -5px rgba(0, 0, 0, 0.02);
  --shadow-2xl: 0 25px 50px -12px rgba(0, 0, 0, 0.12);
  --shadow-inner: inset 0 2px 4px rgba(0, 0, 0, 0.04);
  --shadow-glow: 0 0 20px rgba(124, 58, 237, 0.2), 0 0 40px rgba(124, 58, 237, 0.08);
  --shadow-glow-sm: 0 0 12px rgba(124, 58, 237, 0.15);
  --shadow-glow-lg: 0 0 60px rgba(124, 58, 237, 0.25), 0 0 100px rgba(99, 102, 241, 0.1);
  --shadow-glow-gold: 0 0 20px rgba(251, 191, 36, 0.2), 0 0 40px rgba(251, 191, 36, 0.08);
  --shadow-glass: 0 8px 32px rgba(0, 0, 0, 0.06), inset 0 0 0 1px rgba(255, 255, 255, 0.1);

  /* ─── Transitions ─── */
  --transition-fast:    150ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-base:    250ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow:    350ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slower:  500ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-spring:  500ms cubic-bezier(0.34, 1.56, 0.64, 1);
  --transition-bounce:  600ms cubic-bezier(0.68, -0.55, 0.265, 1.55);

  /* ─── Z-Index ─── */
  --z-dropdown:  1000;
  --z-sticky:    1020;
  --z-fixed:     1030;
  --z-backdrop:  1040;
  --z-modal:     1050;
  --z-popover:   1060;
  --z-tooltip:   1070;
  --z-toast:     1080;

  /* ─── Layout ─── */
  --navbar-height: 64px;
  --sidebar-width: 260px;
  --sidebar-collapsed-width: 72px;
  --right-panel-width: 300px;
  --container-max: 1280px;
  --content-max: 680px;
  --bottom-nav-height: 64px;

  /* ─── Avatar Sizes ─── */
  --avatar-xs: 28px;
  --avatar-sm: 36px;
  --avatar-md: 44px;
  --avatar-lg: 56px;
  --avatar-xl: 80px;
  --avatar-2xl: 120px;

  /* ─── Glass Properties ─── */
  --glass-blur: 20px;
  --glass-saturation: 180%;
  --glass-opacity: 0.72;
}
