/* ===================================================================
   أطلس كودات البناء العالمية - متغيرات التصميم ونظام السمات (Design Tokens)
   LUXURY ENTERPRISE SAAS DESIGN SYSTEM — VERSION 1
   =================================================================== */

@import url('https://fonts.googleapis.com/css2?family=IBM+Plex+Sans+Arabic:wght@300;400;500;600;700&family=Inter:wght@400;500;600;700;800&family=JetBrains+Mono:wght@400;500;600;700&family=Cairo:wght@400;600;700;800;900&display=swap');

:root {
  /* الوضع الفاتح المؤسسي (Precision Enterprise Light) */
  --bg-primary: #f8fafc;
  --bg-secondary: #f1f5f9;
  --bg-tertiary: #e2e8f0;
  --surface: #ffffff;
  --surface-glass: rgba(255, 255, 255, 0.88);
  --surface-dock: rgba(255, 255, 255, 0.92);
  --surface-card: #ffffff;
  --surface-hover: #f8fafc;
  --surface-active: #f1f5f9;
  
  --text-primary: #090e1a;
  --text-secondary: #334155;
  --text-muted: #64748b;
  --text-inverse: #ffffff;

  --border-subtle: #e2e8f0;
  --border-medium: #cbd5e1;
  --border-strong: #94a3b8;
  --border-focus: #2563eb;

  /* لوحة الألوان الهندسية المميزة (Executive Engineering Palette) */
  --brand-navy: #091326;
  --brand-navy-light: #132448;
  --brand-blue: #1d4ed8;
  --brand-blue-hover: #1e40af;
  --brand-blue-glow: rgba(29, 78, 216, 0.12);
  --brand-cyan: #0284c7;
  --brand-gold: #b45309;
  --brand-gold-glow: rgba(180, 83, 9, 0.12);
  --brand-emerald: #047857;
  --brand-emerald-glow: rgba(4, 120, 87, 0.12);
  --brand-amber: #d97706;
  --brand-rose: #be123c;
  --brand-purple: #6d28d9;

  /* الطباعة المتوافقة للغتين العربية واللاتينية */
  --font-arabic: 'IBM Plex Sans Arabic', 'Cairo', system-ui, -apple-system, sans-serif;
  --font-latin: 'Inter', system-ui, -apple-system, sans-serif;
  --font-mono: 'JetBrains Mono', 'SF Mono', monospace;

  /* الحجم الطباعي السلس (Fluid Typography Scale) */
  --font-size-2xs: clamp(0.68rem, 0.65rem + 0.15vw, 0.72rem);
  --font-size-xs: clamp(0.75rem, 0.72rem + 0.15vw, 0.8rem);
  --font-size-sm: clamp(0.82rem, 0.78rem + 0.2vw, 0.88rem);
  --font-size-base: clamp(0.92rem, 0.88rem + 0.2vw, 0.98rem);
  --font-size-md: clamp(1.05rem, 1rem + 0.3vw, 1.15rem);
  --font-size-lg: clamp(1.2rem, 1.12rem + 0.4vw, 1.35rem);
  --font-size-xl: clamp(1.45rem, 1.3rem + 0.7vw, 1.75rem);
  --font-size-2xl: clamp(1.8rem, 1.55rem + 1vw, 2.25rem);
  --font-size-3xl: clamp(2.2rem, 1.9rem + 1.5vw, 2.85rem);

  /* الظلال المؤسسية الدقيقة */
  --shadow-xs: 0 1px 2px rgba(15, 23, 42, 0.04);
  --shadow-sm: 0 2px 6px rgba(15, 23, 42, 0.05);
  --shadow-md: 0 8px 24px -4px rgba(15, 23, 42, 0.08);
  --shadow-lg: 0 16px 40px -8px rgba(15, 23, 42, 0.12);
  --shadow-xl: 0 24px 64px -12px rgba(15, 23, 42, 0.16);
  --shadow-dock: 0 10px 30px -4px rgba(15, 23, 42, 0.15);
  --shadow-glow-blue: 0 0 35px rgba(37, 99, 235, 0.2);
  --shadow-glow-gold: 0 0 35px rgba(217, 119, 6, 0.2);

  /* حواف الزوايا المتناسقة */
  --radius-2xs: 4px;
  --radius-xs: 6px;
  --radius-sm: 10px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-xl: 28px;
  --radius-full: 9999px;

  /* الانتقالات والأنيميشن التفاعلية السلسة */
  --transition-fast: 0.15s cubic-bezier(0.25, 1, 0.5, 1);
  --transition-normal: 0.22s cubic-bezier(0.25, 1, 0.5, 1);
  --transition-smooth: 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  --transition-bounce: 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* الوضع الداكن الفخم للمهندسين (Deep Obsidian & Sapphire Engineering Dark) */
[data-theme="dark"] {
  --bg-primary: #040810;
  --bg-secondary: #091222;
  --bg-tertiary: #101d36;
  --surface: #0b1528;
  --surface-glass: rgba(11, 21, 40, 0.88);
  --surface-dock: rgba(11, 21, 40, 0.94);
  --surface-card: #0d1930;
  --surface-hover: #132444;
  --surface-active: #192e56;

  --text-primary: #f8fafc;
  --text-secondary: #cbd5e1;
  --text-muted: #8393af;
  --text-inverse: #090e1a;

  --border-subtle: #162444;
  --border-medium: #1f335d;
  --border-strong: #2f487e;
  --border-focus: #60a5fa;

  --brand-navy: #02050b;
  --brand-navy-light: #0b162d;
  --brand-blue: #3b82f6;
  --brand-blue-hover: #60a5fa;
  --brand-blue-glow: rgba(59, 130, 246, 0.25);
  --brand-cyan: #38bdf8;
  --brand-gold: #f59e0b;
  --brand-gold-glow: rgba(245, 158, 11, 0.25);
  --brand-emerald: #10b981;
  --brand-emerald-glow: rgba(16, 185, 129, 0.22);
  --brand-rose: #f43f5e;
  --brand-purple: #a855f7;

  --shadow-xs: 0 1px 3px rgba(0, 0, 0, 0.35);
  --shadow-sm: 0 4px 12px rgba(0, 0, 0, 0.4);
  --shadow-md: 0 10px 30px rgba(0, 0, 0, 0.5);
  --shadow-lg: 0 18px 50px rgba(0, 0, 0, 0.6);
  --shadow-xl: 0 28px 75px rgba(0, 0, 0, 0.75);
  --shadow-dock: 0 10px 35px rgba(0, 0, 0, 0.65);
  --shadow-glow-blue: 0 0 40px rgba(59, 130, 246, 0.3);
  --shadow-glow-gold: 0 0 40px rgba(245, 158, 11, 0.3);
}
