/* ==========================================================================
   Design Tokens — پروتوتایپ مدیریت سازمان و پروژه
   تمام رنگ‌ها اینجا تعریف می‌شوند. هیچ فایل دیگری نباید رنگ خام بنویسد.
   ========================================================================== */

:root {
  /* --- Typography --- */
  --font-fa: "Vazirmatn", "Vazir", "IRANSans", "Segoe UI", Tahoma, sans-serif;
  --font-num: "Vazirmatn", "Segoe UI", Tahoma, sans-serif;
  --font-mono: "Cascadia Code", "Consolas", monospace;

  --fs-xs: 11px;
  --fs-sm: 12.5px;
  --fs-md: 13.5px;
  --fs-lg: 15px;
  --fs-xl: 18px;
  --fs-2xl: 22px;
  --fs-3xl: 28px;

  --lh-tight: 1.35;
  --lh-normal: 1.7;

  /* --- Spacing --- */
  --s-1: 4px;
  --s-2: 8px;
  --s-3: 12px;
  --s-4: 16px;
  --s-5: 20px;
  --s-6: 24px;
  --s-8: 32px;
  --s-10: 40px;
  --s-12: 48px;

  /* --- Radius --- */
  --r-xs: 4px;
  --r-sm: 6px;
  --r-md: 9px;
  --r-lg: 13px;
  --r-xl: 18px;
  --r-full: 999px;

  /* --- Layout --- */
  --sidebar-w: 248px;
  --topbar-h: 56px;
  --drawer-w: 720px;
  --content-max: 1560px;

  /* --- Motion --- */
  --t-fast: 110ms ease;
  --t-med: 200ms cubic-bezier(.4, 0, .2, 1);

  /* --- Neutral scale (light) --- */
  --bg: #f4f5f8;
  --surface: #ffffff;
  --surface-2: #fafbfc;
  --surface-3: #eef0f4;
  --surface-hover: #f2f4f7;
  --overlay: rgba(19, 22, 32, .48);

  --border: #e3e6ec;
  --border-2: #d3d8e2;
  --border-strong: #b9c0cd;

  --text: #171a21;
  --text-2: #5a6377;
  --text-3: #8b93a5;
  --text-inv: #ffffff;

  /* --- Brand --- */
  --primary: #4f46e5;
  --primary-hover: #4338ca;
  --primary-soft: #eef0fe;
  --primary-border: #c9cdfa;
  --primary-fg: #ffffff;

  --accent: #7c3aed;

  /* --- Semantic --- */
  --success: #0f9d63;
  --success-soft: #e5f6ef;
  --success-border: #a9e0c9;

  --warn: #b9761a;
  --warn-soft: #fdf3e3;
  --warn-border: #f0d3a3;

  --danger: #d13b3b;
  --danger-soft: #fdecec;
  --danger-border: #f4bfbf;

  --info: #1f6fd0;
  --info-soft: #e8f1fd;
  --info-border: #b6d3f5;

  --neutral-soft: #eef0f4;
  --neutral-border: #dce0e8;

  /* --- Task statuses (بند ۲۷) --- */
  --st-todo: #6b7385;
  --st-todo-bg: #eef0f4;
  --st-progress: #1f6fd0;
  --st-progress-bg: #e8f1fd;
  --st-review: #b9761a;
  --st-review-bg: #fdf3e3;
  --st-changes: #d1620f;
  --st-changes-bg: #fdf0e6;
  --st-approved: #0d8f8f;
  --st-approved-bg: #e2f5f5;
  --st-done: #0f9d63;
  --st-done-bg: #e5f6ef;
  --st-blocked: #d13b3b;
  --st-blocked-bg: #fdecec;
  --st-paused: #7a5fb5;
  --st-paused-bg: #f1ecfb;

  /* --- Priorities (بند ۲۳) --- */
  --pr-low: #7c8496;
  --pr-normal: #1f6fd0;
  --pr-high: #d1620f;
  --pr-urgent: #d13b3b;

  /* --- Chart / category palette (برای اهداف و نمودارها) --- */
  --c1: #4f46e5;
  --c2: #0d8f8f;
  --c3: #d1620f;
  --c4: #7c3aed;
  --c5: #0f9d63;
  --c6: #d13b3b;
  --c7: #1f6fd0;
  --c8: #b9761a;

  /* --- Shadow --- */
  --sh-xs: 0 1px 2px rgba(19, 22, 32, .06);
  --sh-sm: 0 1px 3px rgba(19, 22, 32, .08), 0 1px 2px rgba(19, 22, 32, .04);
  --sh-md: 0 4px 12px rgba(19, 22, 32, .09), 0 1px 3px rgba(19, 22, 32, .05);
  --sh-lg: 0 12px 32px rgba(19, 22, 32, .14), 0 2px 8px rgba(19, 22, 32, .06);
  --sh-focus: 0 0 0 3px rgba(79, 70, 229, .22);
}

/* ==========================================================================
   Dark theme
   ========================================================================== */
:root[data-theme="dark"] {
  --bg: #0e1117;
  --surface: #161a23;
  --surface-2: #1b2029;
  --surface-3: #222834;
  --surface-hover: #212734;
  --overlay: rgba(0, 0, 0, .62);

  --border: #272e3b;
  --border-2: #333c4c;
  --border-strong: #47526611;
  --border-strong: #475266;

  --text: #e6e9f0;
  --text-2: #98a2b6;
  --text-3: #6b7488;
  --text-inv: #0e1117;

  --primary: #7a73f0;
  --primary-hover: #8f89f5;
  --primary-soft: #1e1f3d;
  --primary-border: #3b3a72;
  --primary-fg: #ffffff;

  --accent: #a06ef5;

  --success: #34c98a;
  --success-soft: #10281f;
  --success-border: #1d4a37;

  --warn: #e0a44c;
  --warn-soft: #2a2013;
  --warn-border: #4d3b1c;

  --danger: #f07070;
  --danger-soft: #2c1618;
  --danger-border: #55282b;

  --info: #5aa2f0;
  --info-soft: #12222f;
  --info-border: #234459;

  --neutral-soft: #222834;
  --neutral-border: #303847;

  --st-todo: #98a2b6;
  --st-todo-bg: #222834;
  --st-progress: #5aa2f0;
  --st-progress-bg: #12222f;
  --st-review: #e0a44c;
  --st-review-bg: #2a2013;
  --st-changes: #ef8b52;
  --st-changes-bg: #2d1d13;
  --st-approved: #3ec5c5;
  --st-approved-bg: #0f2727;
  --st-done: #34c98a;
  --st-done-bg: #10281f;
  --st-blocked: #f07070;
  --st-blocked-bg: #2c1618;
  --st-paused: #a98ce0;
  --st-paused-bg: #201a30;

  --pr-low: #8b93a5;
  --pr-normal: #5aa2f0;
  --pr-high: #ef8b52;
  --pr-urgent: #f07070;

  --c1: #7a73f0;
  --c2: #3ec5c5;
  --c3: #ef8b52;
  --c4: #a06ef5;
  --c5: #34c98a;
  --c6: #f07070;
  --c7: #5aa2f0;
  --c8: #e0a44c;

  --sh-xs: 0 1px 2px rgba(0, 0, 0, .4);
  --sh-sm: 0 1px 3px rgba(0, 0, 0, .45);
  --sh-md: 0 4px 14px rgba(0, 0, 0, .5);
  --sh-lg: 0 14px 38px rgba(0, 0, 0, .6);
  --sh-focus: 0 0 0 3px rgba(122, 115, 240, .3);
}
