/* ═══════════════════════════════════════════════════════════════
   OIC Design Tokens v1.1.001
   نظام القيم الجاهزة — المصدر الوحيد للحقيقة
   Single Source of Truth for all design values
   ═══════════════════════════════════════════════════════════════ */

:root {

  /* ── 1. الألوان الأساسية / Base Colors ── */
  --c-primary:       #2563eb;
  --c-secondary:     #7c3aed;
  --c-accent:        #f59e0b;
  --c-primary-text:  #ffffff;
  --c-secondary-text:#ffffff;

  --c-bg:            #ffffff;
  --c-bg-alt:        #f8fafc;
  --c-surface:       #ffffff;

  --c-text:          #1e293b;
  --c-text-light:    #64748b;
  --c-text-muted:    #94a3b8;

  --c-link:          var(--c-primary);
  --c-link-hover:    var(--c-secondary);

  --c-border:        #e2e8f0;
  --c-border-light:  #f1f5f9;

  --c-success:       #10b981;
  --c-warning:       #f59e0b;
  --c-error:         #ef4444;
  --c-info:          #3b82f6;

  /* ── 2. أحجام الخطوط / Font Sizes ── */
  --font-xs:    0.75rem;    /* 12px */
  --font-sm:    0.875rem;   /* 14px */
  --font-base:  1rem;       /* 16px */
  --font-lg:    1.125rem;   /* 18px */
  --font-xl:    1.25rem;    /* 20px */
  --font-2xl:   1.5rem;     /* 24px */
  --font-3xl:   1.875rem;   /* 30px */
  --font-4xl:   2.25rem;    /* 36px */
  --font-5xl:   3rem;       /* 48px */

  /* ── 3. سماكة الخطوط / Font Weights ── */
  --weight-light:    300;
  --weight-regular:  400;
  --weight-medium:   500;
  --weight-semibold: 600;
  --weight-bold:     700;
  --weight-black:    900;

  /* ── 4. ارتفاع الأسطر / Line Heights ── */
  --leading-tight:   1.25;
  --leading-normal:  1.5;
  --leading-relaxed: 1.75;
  --leading-loose:   2;

  /* ── 5. عائلات الخطوط / Font Families ── */
  --ff-heading: 'Tajawal', system-ui, sans-serif;
  --ff-body:    'Tajawal', system-ui, sans-serif;
  --ff-ui:      'Tajawal', system-ui, sans-serif;
  --ff-meta:    'Tajawal', system-ui, sans-serif;
  --ff-mono:    'IBM Plex Mono', monospace;

  /* ── 6. المسافات / Spacing ── */
  --space-1:    0.25rem;    /* 4px  */
  --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 */

  /* ── 7. نصف قطر الزوايا / Border Radius ── */
  --radius-none: 0;
  --radius-sm:   0.25rem;   /* 4px  */
  --radius-md:   0.5rem;    /* 8px  */
  --radius-lg:   0.75rem;   /* 12px */
  --radius-xl:   1rem;      /* 16px */
  --radius-2xl:  1.5rem;    /* 24px */
  --radius-full: 9999px;    /* دائري */

  /* ── 8. الظلال / Shadows ── */
  --shadow-none: none;
  --shadow-sm:   0 1px 2px rgba(0,0,0,0.05);
  --shadow-md:   0 4px 6px rgba(0,0,0,0.07);
  --shadow-lg:   0 10px 15px rgba(0,0,0,0.1);
  --shadow-xl:   0 20px 25px rgba(0,0,0,0.1);
  --shadow-2xl:  0 25px 50px rgba(0,0,0,0.15);

  /* ── 9. عرض الحاويات / Container Widths ── */
  --container-sm:   640px;
  --container-md:   768px;
  --container-lg:   1024px;
  --container-xl:   1200px;
  --container-2xl:  1400px;

  /* ── 10. سرعات الحركة / Transitions ── */
  --duration-fast:   150ms;
  --duration-normal: 300ms;
  --duration-slow:   500ms;
  --ease-default:    cubic-bezier(0.4, 0, 0.2, 1);

  /* ── 11. متغيرات التخطيط / Layout ── */
  --sidebar-w:   320px;
  --gap:         var(--space-3);        /* 12px mobile default */
  --radius:      var(--radius-md);      /* 8px  global default */
  --shadow:      var(--shadow-sm);      /* global default */
}

/* ═══════════════════════════════════════════════════════════════
   Breakpoints Reference (min-width — Mobile First)
   ───────────────────────────────────────────────────────────────
   xs:   320px   موبايل صغير  (base — no media query needed)
   sm:   480px   موبايل كبير
   md:   640px   تابلت
   lg:   768px   تابلت أفقي
   xl:   1024px  لابتوب
   2xl:  1280px  شاشة كبيرة
   3xl:  1536px  شاشة عريضة
   ═══════════════════════════════════════════════════════════════ */

/* ── Scale up tokens at breakpoints ── */
@media (min-width: 480px) {
  :root { --gap: var(--space-3); }
}
@media (min-width: 768px) {
  :root { --gap: var(--space-4); }
}
@media (min-width: 1024px) {
  :root { --gap: var(--space-4); --sidebar-w: 360px; }
}
@media (min-width: 1280px) {
  :root { --sidebar-w: 400px; }
}
