/* =====================================================================
   tokens.css — نظام الإدارة المدرسية / مدرسة رواد العلم الأولى
   Design tokens: color, type, spacing, radius, shadow, motion.
   Brand palette supplied by the school:
     #055BA6 (dark blue)  #0568A6 (blue)        #18A2D9 (light blue)
     #F28C0F (orange)     #0D0D0D (black)
   Audience: older, non-technical staff on desktop, weak connectivity.
   Priority: legibility and unambiguous state over decoration (§11, §72).
   ===================================================================== */

:root {
  /* ---- Shared scrollbar ---- */
  --scrollbar-size: 0.7rem;
  --scrollbar-track: rgba(28, 44, 64, 0.06);
  --scrollbar-thumb: rgba(70, 93, 117, 0.68);
  --scrollbar-thumb-hover: rgba(38, 60, 85, 0.88);

  /* ---- Brand palette ---- */
  --c-ink: #1c2c40; /* primary text, headers */
  --c-grey: #ccd3d9; /* borders, dividers, disabled */
  --c-blue: #03588c; /* primary action, links, focus */
  --c-blue-deep: #024873; /* primary hover/active */
  --c-sand: #bf9e75; /* secondary accent (badges, highlights) */
  --c-ochre: #c7985b; /* secondary accent, warm alerts */
  --c-ochre-back: #c7985b21; /* secondary accent, warm alerts */
  --color-blood-gazelle: #8b1e1e; /* دم الغزال: accent داكن للاستخدام المحدود */
  --color-blood-gazelle-hover: #721818;
  --color-blood-gazelle-active: #5f1414;
  --color-blood-gazelle-soft: #f8eeee;
  --color-blood-gazelle-text: #741919;

  /* ---- School logo palette (additive; existing c-* tokens stay stable) ---- */
  --brand-blue-dark: #055ba6;
  --brand-blue: #0568a6;
  --brand-blue-light: #18a2d9;
  --brand-orange: #f28c0f;
  --brand-black: #0d0d0d;

  /* ---- Semantic surface & text ---- */
  --bg-page: #f7f8fa;
  --bg-surface: #ffffff;
  --bg-sunken: #eef1f4;
  --bg-hover: #eaf1f7;
  --text-primary: var(--c-ink);
  --text-secondary: #4b5a6b;
  --text-muted: #7c8a9a;
  --text-on-brand: #ffffff;
  --border-default: var(--c-grey);
  --border-strong: #a8b3be;
  --focus-ring: var(--c-blue);

  /* ---- Semantic status colors (never rely on color alone — pair with icon/text, §11) ---- */
  --status-success: #1e7b45;
  --status-success-bg: #e7f5ec;
  --status-danger: #b3261e;
  --status-danger-bg: #fbeae9;
  --status-warning: #8a5a00;
  --status-warning-bg: #fbf1dc;
  --status-info: var(--c-blue);
  --status-info-bg: #e4eef6;
  --status-neutral: var(--text-muted);
  --status-neutral-bg: var(--bg-sunken);

  /* ---- Typography ----
     Arabic-first stack; Tahoma/Segoe UI read cleanly at small sizes on
     older Windows machines common in schools; Latin fallback for mixed
     English/numeral content (§55, §104). */
  --font-ar: "Segoe UI", Tahoma, "Noto Kufi Arabic", "Dubai", sans-serif;
  --font-en: "Segoe UI", Tahoma, Arial, sans-serif;
  --font-mono: "Consolas", "Courier New", monospace;

  --fs-caption: 0.8125rem; /* 13px */
  --fs-body: 0.9375rem; /* 15px */
  --fs-body-lg: 1.0625rem; /* 17px */
  --fs-h4: 1.1875rem; /* 19px */
  --fs-h3: 1.4375rem; /* 23px */
  --fs-h2: 1.75rem; /* 28px */
  --fs-h1: 2.125rem; /* 34px */
  --lh-tight: 1.25;
  --lh-normal: 1.55;
  --lh-loose: 1.75;

  /* ---- Spacing scale (4px base) ---- */
  --sp-1: 0.25rem;
  --sp-2: 0.5rem;
  --sp-3: 0.75rem;
  --sp-4: 1rem;
  --sp-5: 1.5rem;
  --sp-6: 2rem;
  --sp-7: 3rem;
  --sp-8: 4rem;

  /* ---- Shape ---- */
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-pill: 999px;

  /* ---- Elevation (subtle; this is a working tool, not a showcase) ---- */
  --shadow-sm: 0 1px 2px rgba(28, 44, 64, 0.06);
  --shadow-md: 0 4px 12px rgba(28, 44, 64, 0.1);
  --shadow-lg: 0 12px 32px rgba(28, 44, 64, 0.16);

  /* ---- Motion ---- */
  --dur-fast: 120ms;
  --dur-normal: 200ms;
  --ease-standard: cubic-bezier(0.2, 0, 0, 1);

  /* ---- Layout ---- */
  --sidebar-w: 15.5rem;
  --topbar-h: 3.75rem;
  --content-max: 84rem;
}

@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}
