/* ==========================================================================
   پنل مدیریت نارنج — Design tokens
   Single source of truth: palette, typography, spacing, radius, elevation, motion.
   Components never use raw values; they only use these variables.
   ========================================================================== */

/* ---- Font: IRANSansX (Persian numerals build) ---- */
@font-face { font-family: "IRANSansX"; font-weight: 300; font-display: swap; src: url("../fonts/IRANSansXFaNum-Light.woff2") format("woff2"); }
@font-face { font-family: "IRANSansX"; font-weight: 400; font-display: swap; src: url("../fonts/IRANSansXFaNum-Regular.woff2") format("woff2"); }
@font-face { font-family: "IRANSansX"; font-weight: 500; font-display: swap; src: url("../fonts/IRANSansXFaNum-Medium.woff2") format("woff2"); }
@font-face { font-family: "IRANSansX"; font-weight: 600; font-display: swap; src: url("../fonts/IRANSansXFaNum-DemiBold.woff2") format("woff2"); }
@font-face { font-family: "IRANSansX"; font-weight: 700; font-display: swap; src: url("../fonts/IRANSansXFaNum-Bold.woff2") format("woff2"); }
@font-face { font-family: "IRANSansX"; font-weight: 800; font-display: swap; src: url("../fonts/IRANSansXFaNum-ExtraBold.woff2") format("woff2"); }

:root {
  color-scheme: dark;

  /* ---------- Brand: Narenj orange (#FE7100) ---------- */
  --orange-50:  #fff4ea;
  --orange-100: #ffe4cc;
  --orange-200: #ffc999;
  --orange-300: #ffa95f;
  --orange-400: #ff8d2e;
  --orange-500: #fe7100;   /* primary */
  --orange-600: #e06400;
  --orange-700: #b85000;
  --orange-800: #8a3c00;
  --orange-900: #5c2800;

  /* ---------- Neutrals (warm-tinted greys, dark theme) ---------- */
  --neutral-0:   #ffffff;
  --neutral-50:  #f4f3f2;
  --neutral-100: #e4e2e0;
  --neutral-200: #c9c6c3;
  --neutral-300: #a39f9b;
  --neutral-400: #7c7873;
  --neutral-500: #5c5955;
  --neutral-600: #403e3b;
  --neutral-700: #2c2b29;
  --neutral-800: #1c1b1a;
  --neutral-850: #151413;
  --neutral-900: #0e0d0d;
  --neutral-950: #080808;

  /* ---------- Semantic status colors ---------- */
  --success-500: #2fbf71;
  --success-bg:  rgba(47, 191, 113, .12);
  --warning-500: #f5b83d;
  --warning-bg:  rgba(245, 184, 61, .12);
  --danger-500:  #f0524f;
  --danger-bg:   rgba(240, 82, 79, .12);
  --info-500:    #4aa3ff;
  --info-bg:     rgba(74, 163, 255, .12);

  /* ---------- Roles (what components actually use) ---------- */
  /* depth ladder: sidebar (darkest) < page < card < raised — each step is clearly visible */
  --bg-sidebar:     #050505;
  --bg-page:        #121110;
  --bg-surface:     #1c1b19;   /* cards */
  --bg-raised:      #262421;   /* inputs, chips, table head */
  --bg-hover:       var(--neutral-700);

  --border-subtle:  rgba(255, 255, 255, .08);
  --border-default: rgba(255, 255, 255, .14);
  --border-strong:  rgba(255, 255, 255, .24);

  --text-strong:    var(--neutral-0);
  --text-default:   var(--neutral-100);
  --text-muted:     var(--neutral-300);
  --text-faint:     var(--neutral-400);
  --text-on-brand:  #1a0b00;

  --brand:          var(--orange-500);
  --brand-hover:    var(--orange-400);
  --brand-press:    var(--orange-600);
  --brand-soft:     rgba(254, 113, 0, .12);
  --brand-line:     rgba(254, 113, 0, .35);
  --brand-glow:     rgba(254, 113, 0, .28);
  --focus-ring:     0 0 0 3px rgba(254, 113, 0, .35);

  /* ---------- Typography ---------- */
  --font-sans: "IRANSansX", "Vazirmatn", system-ui, -apple-system, "Segoe UI", Tahoma, sans-serif;
  --font-latin: "Inter", system-ui, sans-serif;

  /* modular scale (rem, base 16px) — body text is 14px */
  --fs-2xs: .6875rem;  /* 11 — micro labels */
  --fs-xs:  .75rem;    /* 12 — captions, table meta */
  --fs-sm:  .8125rem;  /* 13 — secondary text, chips */
  --fs-md:  .875rem;   /* 14 — body, inputs, table cells */
  --fs-lg:  1rem;      /* 16 — card titles, nav */
  --fs-xl:  1.25rem;   /* 20 — page title */
  --fs-2xl: 1.625rem;  /* 26 — stat numbers */
  --fs-3xl: 2rem;      /* 32 — hero numbers */

  --lh-tight: 1.3;
  --lh-normal: 1.65;   /* Persian reads better with generous leading */

  --fw-light: 300;
  --fw-regular: 400;
  --fw-medium: 500;
  --fw-semibold: 600;
  --fw-bold: 700;
  --fw-black: 800;

  /* ---------- Spacing (4px grid) ---------- */
  --sp-1: .25rem;  --sp-2: .5rem;   --sp-3: .75rem;  --sp-4: 1rem;
  --sp-5: 1.25rem; --sp-6: 1.5rem;  --sp-8: 2rem;    --sp-10: 2.5rem;

  /* ---------- Radius ---------- */
  --r-sm: 10px;
  --r-md: 14px;
  --r-lg: 20px;
  --r-xl: 26px;
  --r-pill: 999px;

  /* ---------- Elevation ---------- */
  --shadow-card: 0 1px 0 rgba(255,255,255,.04) inset, 0 12px 30px -18px rgba(0,0,0,.8);
  --shadow-pop:  0 24px 60px -20px rgba(0,0,0,.9), 0 0 0 1px var(--border-default);

  /* ---------- Layout ---------- */
  --sidebar-w: 272px;
  --sidebar-w-collapsed: 84px;
  --topbar-h: 76px;
  --bottomnav-h: 72px;
  --content-max: 1480px;

  /* ---------- Motion ---------- */
  --ease: cubic-bezier(.2, .7, .2, 1);
  --t-fast: .15s var(--ease);
  --t-base: .25s var(--ease);
}
