/* ============================================================
   HUT BI Dashboard — Design System v2
   ------------------------------------------------------------
   ۱. فونت و ریست
   ۲. توکن‌ها: مقیاس تایپ، فاصله، رنگ معنایی
   ۳. چیدمان و هدر فشرده
   ۴. گرید بنتو (سه سطح کارت)
   ۵. کارت شاخص
   ۶. هیرو: گیج چندحلقه‌ای و نکات
   ۷. نمودارها
   ۸. جدول و ماتریس حرارتی
   ۹. اجزای کوچک
   ۱۰. حرکت و کورئوگرافی
   ۱۱. واکنش‌گرایی و حالت نمایش

   قاعده‌های خودم که در این نسخه رعایت شده:
     • هیچ color-mix() — سازگاری با مرورگرهای قدیمی‌تر دانشگاه
     • حداکثر ۶ رنگ مقوله‌ای با هیوهای جدا
     • قرمز/سبز فقط برای بد/خوب، نه برای تفکیک مقوله
     • مقیاس تایپ منظم، اعداد همه‌جا tabular
   ============================================================ */

/* ---------- ۱. فونت ---------- */
@font-face { font-family:'Vazirmatn'; src:url('../vendor/vazirmatn/Vazirmatn-Light.woff2') format('woff2');      font-weight:300; font-display:swap; }
@font-face { font-family:'Vazirmatn'; src:url('../vendor/vazirmatn/Vazirmatn-Regular.woff2') format('woff2');    font-weight:400; font-display:swap; }
@font-face { font-family:'Vazirmatn'; src:url('../vendor/vazirmatn/Vazirmatn-Medium.woff2') format('woff2');     font-weight:500; font-display:swap; }
@font-face { font-family:'Vazirmatn'; src:url('../vendor/vazirmatn/Vazirmatn-SemiBold.woff2') format('woff2');   font-weight:600; font-display:swap; }
@font-face { font-family:'Vazirmatn'; src:url('../vendor/vazirmatn/Vazirmatn-Bold.woff2') format('woff2');       font-weight:700; font-display:swap; }
@font-face { font-family:'Vazirmatn'; src:url('../vendor/vazirmatn/Vazirmatn-ExtraBold.woff2') format('woff2');  font-weight:800; font-display:swap; }

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; min-height: 100%; }

body {
  font-family: 'Vazirmatn', 'Segoe UI', Tahoma, sans-serif;
  font-size: var(--fs-base);
  line-height: 1.65;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  font-feature-settings: 'tnum' 1;   /* اعداد tabular در کل برنامه */
}

h1, h2, h3, h4, h5 { margin: 0; font-weight: 700; line-height: 1.35; }
p { margin: 0; }
button { font-family: inherit; cursor: pointer; }
a { color: var(--azure); text-decoration: none; }
a:hover { text-decoration: underline; }

:focus-visible { outline: 2px solid var(--azure); outline-offset: 2px; border-radius: 8px; }

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: 99px; border: 3px solid var(--bg); }
::-webkit-scrollbar-thumb:hover { background: var(--text-muted); }

/* ============================================================
   ۲. توکن‌ها
   ============================================================ */
:root {
  /* --- مقیاس تایپ (نسبت ۱.۲۵) --- */
  --fs-2xs: 10.5px;
  --fs-xs:  11.5px;
  --fs-sm:  12.5px;
  --fs-base: 13.5px;
  --fs-md:  15px;
  --fs-lg:  18px;
  --fs-xl:  23px;
  --fs-2xl: 30px;
  --fs-3xl: 40px;
  --fs-4xl: 52px;

  /* --- فاصله (شبکه‌ی ۴) --- */
  --s-1: 4px;  --s-2: 8px;  --s-3: 12px; --s-4: 16px;
  --s-5: 20px; --s-6: 24px; --s-8: 32px; --s-10: 40px;

  --radius-sm: 8px;
  --radius: 13px;
  --radius-lg: 18px;
  --radius-xl: 24px;

  --header-h: 52px;
  --maxw: 1680px;

  /* --- رمپ برند (سرمه‌ای دانشگاهی -> لاجوردی) --- */
  --brand-950: #0a1626;
  --brand-900: #0f2138;
  --brand-800: #16304d;
  --brand-700: #1d4066;
  --brand-600: #275685;
  --brand-500: #3572a8;
  --brand-400: #5591c4;
  --brand-300: #86b3da;

  /* --- پالت مقوله‌ای: ۶ رنگ با هیوهای جدا (فاصله‌ی حداقل ۴۵ درجه) --- */
  --azure:  #3f7fd8;   /* 215° */
  --teal:   #189e8a;   /* 172° */
  --amber:  #d18b1f;   /*  40° */
  --violet: #7c5cff;   /* 253° */
  --rose:   #d4536e;   /* 345° */
  --slate:  #6b7a90;   /* 214° بی‌اشباع */

  /* --- رنگ‌های وضعیت: فقط برای خوب/بد --- */
  --ok:   #189e8a;
  --warn: #d18b1f;
  --bad:  #d1443f;
  --info: #3f7fd8;

  /* --- سطوح --- */
  --bg: #f1f4f8;
  --surface: #ffffff;
  --surface-2: #f7f9fc;
  --surface-3: #edf1f7;
  --border: #dfe6ef;
  --border-strong: #c8d3e0;
  --text: #14202f;
  --text-secondary: #4a5a6f;
  --text-muted: #7a8899;

  /* --- آلفاهای پیش‌محاسبه‌شده (به‌جای color-mix) --- */
  --tint-ok:     rgba(24, 158, 138, .11);
  --tint-warn:   rgba(209, 139, 31, .12);
  --tint-bad:    rgba(209, 68, 63, .11);
  --tint-info:   rgba(63, 127, 216, .11);
  --tint-azure:  rgba(63, 127, 216, .12);
  --tint-teal:   rgba(24, 158, 138, .12);
  --tint-amber:  rgba(209, 139, 31, .13);
  --tint-violet: rgba(124, 92, 255, .12);
  --tint-rose:   rgba(212, 83, 110, .12);
  --tint-slate:  rgba(107, 122, 144, .12);
  --tint-brand:  rgba(53, 114, 168, .10);

  --grid-line: rgba(20, 32, 47, .07);
  --overlay: rgba(10, 22, 38, .55);

  /*
   * براقی ملایم روی نوارها.
   *
   * فقط «روشنایی» را عوض می‌کند نه هیو را — یعنی نوار سبز سبز می‌ماند و
   * معنی رنگ دست‌نخورده باقی می‌ماند؛ فقط از حالت تخت درمی‌آید و عمق
   * می‌گیرد. این جایگزینِ color-mix است که روی مرورگرهای قدیمی‌تر
   * سیستم‌های دانشگاه بی‌اثر می‌شود.
   *
   * روش استفاده: background-color رنگ معنادار، background-image این توکن.
   */
  --sheen: linear-gradient(180deg, rgba(255, 255, 255, .26), rgba(255, 255, 255, 0) 62%);

  --shadow-xs: 0 1px 2px rgba(16, 33, 56, .05);
  --shadow-sm: 0 1px 3px rgba(16, 33, 56, .07), 0 1px 2px rgba(16, 33, 56, .04);
  --shadow: 0 4px 14px rgba(16, 33, 56, .08);
  --shadow-lg: 0 16px 44px rgba(16, 33, 56, .16);

  --ease: cubic-bezier(.22, 1, .36, 1);
  --ease-out: cubic-bezier(.16, 1, .3, 1);
}

html[data-theme='dark'] {
  --azure:  #5b9ae8;
  --teal:   #2bbda6;
  --amber:  #e5a538;
  --violet: #977aff;
  --rose:   #e4708a;
  --slate:  #8c9cb2;

  --ok:   #2bbda6;
  --warn: #e5a538;
  --bad:  #e5615c;
  --info: #5b9ae8;

  --bg: #080e1a;
  --surface: #101a2b;
  --surface-2: #16223a;
  --surface-3: #1c2b46;
  --border: #253550;
  --border-strong: #35486a;
  --text: #e9eff8;
  --text-secondary: #a9b9cd;
  --text-muted: #76889f;

  --tint-ok:     rgba(43, 189, 166, .15);
  --tint-warn:   rgba(229, 165, 56, .15);
  --tint-bad:    rgba(229, 97, 92, .15);
  --tint-info:   rgba(91, 154, 232, .15);
  --tint-azure:  rgba(91, 154, 232, .16);
  --tint-teal:   rgba(43, 189, 166, .16);
  --tint-amber:  rgba(229, 165, 56, .16);
  --tint-violet: rgba(151, 122, 255, .16);
  --tint-rose:   rgba(228, 112, 138, .16);
  --tint-slate:  rgba(140, 156, 178, .16);
  --tint-brand:  rgba(91, 154, 232, .12);

  --grid-line: rgba(255, 255, 255, .06);
  --overlay: rgba(3, 8, 16, .68);

  /* در تم تیره براقی باید ضعیف‌تر باشد وگرنه نوارها شسته به نظر می‌رسند */
  --sheen: linear-gradient(180deg, rgba(255, 255, 255, .15), rgba(255, 255, 255, 0) 62%);

  --shadow-xs: 0 1px 2px rgba(0, 0, 0, .3);
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, .4);
  --shadow: 0 4px 16px rgba(0, 0, 0, .45);
  --shadow-lg: 0 18px 48px rgba(0, 0, 0, .6);
}

/* نگاشت نام رنگ لهجه -> متغیرها */
.accent-primary { --accent: var(--azure);  --accent-tint: var(--tint-azure); }
.accent-indigo  { --accent: var(--brand-500); --accent-tint: var(--tint-brand); }
.accent-violet  { --accent: var(--violet); --accent-tint: var(--tint-violet); }
.accent-teal    { --accent: var(--teal);   --accent-tint: var(--tint-teal); }
.accent-emerald { --accent: var(--ok);     --accent-tint: var(--tint-ok); }
.accent-amber   { --accent: var(--amber);  --accent-tint: var(--tint-amber); }
.accent-rose    { --accent: var(--rose);   --accent-tint: var(--tint-rose); }
.accent-slate   { --accent: var(--slate);  --accent-tint: var(--tint-slate); }

/* ============================================================
   ۳. چیدمان و هدر
   ============================================================ */
.app-shell { min-height: 100vh; display: flex; flex-direction: column; }

.container {
  width: 100%; max-width: var(--maxw);
  margin: 0 auto; padding: 0 var(--s-5);
}

.main { flex: 1; padding: var(--s-5) 0 var(--s-10); }

/* ---------- هدر ۵۲ پیکسلی: همه‌چیز در یک ردیف ---------- */
.header {
  position: sticky; top: 0; z-index: 70;
  height: var(--header-h);
  background: var(--brand-900);
  color: #eaf1fa;
  border-bottom: 1px solid rgba(255, 255, 255, .08);
}
html[data-theme='dark'] .header { background: #0b1524; border-bottom-color: var(--border); }

.header-inner { height: 100%; display: flex; align-items: center; gap: var(--s-3); }

.brand { display: flex; align-items: center; gap: var(--s-2); flex-shrink: 0; }
/*
 * نشان دانشگاه سرمه‌ای است؛ روی گرادیانِ آبیِ هدرِ تیره گل‌آلود و بی‌کنتراست
 * می‌شد. حالا داخل یک چیپ شفافِ روشن می‌نشیند و خودِ نشان با filter سفید
 * می‌شود تا تیز و خوانا باشد. filter در همه‌ی مرورگرهای هدف پشتیبانی می‌شود.
 */
.brand-chip {
  width: 32px; height: 32px; flex: 0 0 32px;
  border-radius: 9px;
  background: rgba(255, 255, 255, .12);
  border: 1px solid rgba(255, 255, 255, .16);
  display: grid; place-items: center;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .16);
}
.brand-mark {
  width: 22px; height: 22px; display: block;
  filter: brightness(0) invert(1);   /* سرمه‌ای → سفید */
}
.brand-title {
  font-size: var(--fs-base); font-weight: 700; letter-spacing: -.1px;
  white-space: nowrap;
}
.brand-title span { opacity: .55; font-weight: 400; font-size: var(--fs-xs); margin-inline-start: 6px; }

/* نوار وضعیت درون هدر — دیگر یک ردیف جدا نمی‌گیرد */
.header-status {
  display: flex; align-items: center; gap: var(--s-4);
  margin-inline-start: var(--s-4);
  padding-inline-start: var(--s-4);
  border-inline-start: 1px solid rgba(255, 255, 255, .12);
  font-size: var(--fs-xs);
  overflow: hidden;
}
.hstat { display: inline-flex; align-items: center; gap: 5px; white-space: nowrap; opacity: .82; }
.hstat b { font-weight: 700; opacity: 1; }
.hstat i { font-size: 10px; }
.hstat.clickable { cursor: pointer; }
.hstat.clickable:hover { opacity: 1; text-decoration: underline; }
.hstat.tone-ok i   { color: #4ddbb8; }
.hstat.tone-warn i { color: #ffc861; }
.hstat.tone-bad i  { color: #ff8a85; }

.dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: #4ddbb8; box-shadow: 0 0 0 3px rgba(77, 219, 184, .22);
  animation: breathe 2.6s ease-in-out infinite;
}
.dot.warn { background: #ffc861; box-shadow: 0 0 0 3px rgba(255, 200, 97, .22); }
.dot.bad  { background: #ff8a85; box-shadow: 0 0 0 3px rgba(255, 138, 133, .22); }
@keyframes breathe { 50% { opacity: .35; } }

.header-actions { display: flex; align-items: center; gap: 5px; margin-inline-start: auto; }

.hbtn {
  height: 32px; min-width: 32px; padding: 0 8px;
  border-radius: 9px;
  border: 1px solid rgba(255, 255, 255, .14);
  background: rgba(255, 255, 255, .07);
  color: #eaf1fa;
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  font-size: var(--fs-sm);
  transition: background .16s, border-color .16s, transform .12s;
}
.hbtn:hover { background: rgba(255, 255, 255, .16); border-color: rgba(255, 255, 255, .26); }
.hbtn:active { transform: scale(.95); }
.hbtn[disabled] { opacity: .4; cursor: not-allowed; }
.hbtn.on { background: var(--brand-500); border-color: var(--brand-400); }
.hbtn.spin i { animation: spin .85s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.hbtn .label { font-size: var(--fs-xs); }

/*
 * دکمه‌ی قابلیتِ در دست ساخت.
 * نقطه‌ی کهربایی لازم است: دکمه‌ای که مثل بقیه دیده شود ولی کار نکند،
 * خرابی به نظر می‌رسد. با نشان، همان دکمه تبدیل می‌شود به نقشه‌ی راه.
 * خطِ چین‌دار همین را بدون رنگِ هشدار تکرار می‌کند.
 */
.hbtn.soon {
  position: relative;
  border-style: dashed;
  border-color: rgba(255, 255, 255, .24);
  opacity: .92;
}
.hbtn.soon:hover { opacity: 1; }
.hbtn.soon .soon-dot {
  position: absolute; inset-block-start: -3px; inset-inline-end: -3px;
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--amber);
  /* حلقه‌ی هم‌رنگِ پس‌زمینه‌ی هدر تا نقطه از نوار جدا دیده شود */
  box-shadow: 0 0 0 2px var(--brand-900);
}
html[data-theme='dark'] .hbtn.soon .soon-dot { box-shadow: 0 0 0 2px #0b1524; }
@media (max-width: 1000px) { .hbtn.soon .label { display: none; } }
@media (max-width: 720px)  { .hbtn.soon { display: none; } }

.hsep { width: 1px; height: 20px; background: rgba(255, 255, 255, .14); margin: 0 3px; }

.user-pill {
  height: 32px; padding: 0 10px 0 6px;
  border-radius: 99px;
  background: rgba(255, 255, 255, .09);
  border: 1px solid rgba(255, 255, 255, .14);
  display: inline-flex; align-items: center; gap: 7px;
  font-size: var(--fs-xs);
}
.user-pill .av {
  width: 22px; height: 22px; border-radius: 50%;
  background: var(--brand-500); display: grid; place-items: center; font-size: 10px;
}

/* منوی سرریز */
.menu-wrap { position: relative; }
.menu {
  position: absolute; top: calc(100% + 7px); inset-inline-end: 0;
  min-width: 216px; padding: 6px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); box-shadow: var(--shadow-lg);
  display: none; z-index: 80;
}
.menu.open { display: block; animation: pop .16s var(--ease-out); }
@keyframes pop { from { opacity: 0; transform: translateY(-6px) scale(.98); } }
.menu-item {
  width: 100%; display: flex; align-items: center; gap: 10px;
  padding: 9px 11px; border: none; background: none;
  border-radius: 9px; color: var(--text);
  font-size: var(--fs-sm); text-align: start;
}
.menu-item:hover { background: var(--surface-3); }
.menu-item i { width: 15px; text-align: center; color: var(--text-muted); }
.menu-item kbd {
  margin-inline-start: auto; font-family: inherit;
  font-size: var(--fs-2xs); padding: 1px 6px;
  background: var(--surface-3); border: 1px solid var(--border);
  border-radius: 5px; color: var(--text-muted);
}
.menu-sep { height: 1px; background: var(--border); margin: 5px 4px; }

/* ---------- تب‌ها ---------- */
.tabs {
  display: flex; gap: 3px; padding: var(--s-3) 0 0;
  overflow-x: auto; scrollbar-width: none;
}
.tabs::-webkit-scrollbar { display: none; }

.tab {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 8px 15px; border-radius: 10px 10px 0 0;
  border: 1px solid transparent; border-bottom: none;
  background: transparent; color: var(--text-secondary);
  font-size: var(--fs-sm); font-weight: 500; white-space: nowrap;
  transition: color .16s, background .16s;
}
.tab:hover { color: var(--text); background: var(--surface-2); }
.tab.active {
  background: var(--surface); border-color: var(--border);
  color: var(--brand-500); font-weight: 700;
  box-shadow: inset 0 2px 0 var(--brand-500);
}
html[data-theme='dark'] .tab.active { color: var(--azure); box-shadow: inset 0 2px 0 var(--azure); }
.tab i { font-size: 12px; }
.tab .n {
  font-size: var(--fs-2xs); padding: 1px 6px; border-radius: 99px;
  background: var(--surface-3); color: var(--text-muted);
}
.tab.active .n { background: var(--tint-brand); color: var(--brand-500); }

.panel { display: none; }
.panel.active { display: block; }

/* ---------- بخش‌ها ---------- */
.sec { margin-bottom: var(--s-6); }
.sec-head {
  display: flex; align-items: baseline; gap: var(--s-3);
  margin-bottom: var(--s-3); padding-bottom: var(--s-2);
  border-bottom: 1px solid var(--border);
}
.sec-head h3 {
  font-size: var(--fs-base); font-weight: 700;
  display: flex; align-items: center; gap: 8px;
}
.sec-head h3 i { color: var(--brand-500); font-size: 12.5px; }
html[data-theme='dark'] .sec-head h3 i { color: var(--azure); }
/* توضیح کنار عنوان‌ها در نسخه‌ی نمایشی حذف شد — مخاطب عمومی نیازی به
   دانستن سازوکار داخلی داشبورد ندارد. کلاس برای سازگاری باقی می‌ماند. */
.sec-head .note { display: none; }

/* واحد اندازه‌گیری توضیح سازوکار نیست — اطلاعات لازم است و می‌ماند */
.sec-head .unit-note {
  font-size: var(--fs-xs); color: var(--text-muted);
  margin-inline-start: auto; font-weight: 500;
}

/* ============================================================
   هیرو — بنر معرفی دانشگاه + ردیف اعداد سرتیتر زیر آن
   ------------------------------------------------------------
   چرا اعداد دیگر روی بنر نمی‌نشینند؟ چون خودِ فایل تصویر، لوگو و
   اسم دانشگاه را در مرکزش دارد؛ گذاشتن لوگو، تیتر و کارت شیشه‌ای
   روی همان تصویرِ شلوغ، سه لایه‌ی متن روی هم می‌ساخت و «واو» را
   می‌کشت. حالا بنر فقط تصویرِ برندینگ است و اعداد به کارت‌های
   توپُرِ تمیزِ زیرش منتقل شده‌اند: هم بنر خلوت، هم اعداد خوانا.
   ============================================================ */
.banner {
  position: relative;
  margin-bottom: var(--s-6);
  border-radius: var(--radius-xl);
  overflow: hidden;
  background: #0a1626;
  box-shadow: 0 10px 40px rgba(10, 22, 38, .28);
  isolation: isolate;
}
/* تصویر حالا خودش ارتفاع بنر را می‌سازد (نه absolute). ارتفاع را با
   clamp مهار می‌کنیم تا روی مانیتور خیلی پهن غول‌پیکر نشود و لوگوی
   وسطِ تصویر همیشه در کادر بماند (object-position مرکز). */
.banner-bg {
  display: block;
  width: 100%;
  height: clamp(150px, 20vw, 288px);
  object-fit: cover; object-position: center;
}
/* براقی ملایم لبه‌ها برای پرداختِ حرفه‌ای، بدون تیره‌کردن تصویر */
.banner::after {
  content: '';
  position: absolute; inset: 0; pointer-events: none;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .06),
              inset 0 -40px 60px -30px rgba(6, 14, 26, .5);
}

/* بخش «در یک نگاه» — کمی فاصله‌ی منفی به بالا تا زیر بنر جمع‌وجور بماند */
.headline-sec { margin-top: calc(-1 * var(--s-2)); }

/* ردیف اعداد سرتیتر — کارت‌های توپُر روی زمینه‌ی صفحه */
.headline {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(178px, 1fr));
  grid-auto-rows: 1fr;
  gap: var(--s-3);
  width: 100%;
}
.hstat-card {
  position: relative; overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: var(--s-4) var(--s-3) var(--s-3);
  box-shadow: var(--shadow-xs);
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  text-align: center; cursor: pointer;
  transition: transform .18s var(--ease), box-shadow .18s, border-color .18s;
}
/* نوار لهجه‌ی بالای کارت — همان زبان بصری کارت‌های شاخص */
.hstat-card::before {
  content: ''; position: absolute; top: 0; inset-inline: 0; height: 3px;
  background: linear-gradient(90deg, var(--brand-400), var(--brand-600));
}
.hstat-card:hover {
  transform: translateY(-3px); box-shadow: var(--shadow);
  border-color: var(--brand-400);
}
.hstat-card .ico {
  width: 38px; height: 38px; border-radius: 11px;
  display: grid; place-items: center; font-size: 15px;
  background: var(--tint-brand); color: var(--brand-500);
  margin-bottom: 4px;
}
html[data-theme='dark'] .hstat-card .ico { color: var(--azure); }
.hstat-card .num {
  font-size: var(--fs-3xl); font-weight: 800; line-height: 1.05;
  letter-spacing: -1.2px; font-variant-numeric: tabular-nums;
  color: var(--text);
}
.hstat-card .unit { font-size: var(--fs-2xs); color: var(--text-muted); }
.hstat-card .name { font-size: var(--fs-xs); color: var(--text-secondary); font-weight: 500; }
.hstat-card .rise {
  display: inline-flex; align-items: center; gap: 3px;
  font-size: var(--fs-2xs); font-weight: 700;
  padding: 1px 7px; border-radius: 99px; margin-top: 3px;
  background: var(--tint-ok); color: var(--ok);
}
.hstat-card .rise.down { background: var(--tint-bad); color: var(--bad); }

@media (max-width: 760px) {
  .hstat-card .num { font-size: var(--fs-2xl); }
  .headline { grid-template-columns: repeat(2, 1fr); }
}

/* ============================================================
   ۴. گرید بنتو
   ============================================================ */
/*
 * شبکه‌ی یکنواخت — نه بنتوی مختلط.
 *
 * گرید بنتو با سه اندازه‌ی کارت، هر وقت تعداد کارت‌ها با ستون‌ها جور
 * درنیاید سوراخ می‌گذارد؛ در صفحه‌ی معرفی این فضای خالی به چشم می‌آید
 * و بی‌نظم دیده می‌شود. اینجا همه‌ی کارت‌های یک بخش هم‌اندازه‌اند و
 * سلسله‌مراتب از «بنر سرتیتر» و «تفکیک بخش‌ها» می‌آید، نه از اندازه‌ی
 * نامساوی کارت‌ها.
 */
.bento {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(232px, 1fr));
  grid-auto-rows: 1fr;      /* همه‌ی ردیف‌ها هم‌ارتفاع */
  gap: var(--s-3);
  align-items: stretch;
}
.bento > .kpi { min-height: 172px; }

/* سطح‌بندی فقط در تب تحلیلی «اهداف و عملکرد» معنا دارد */
.bento.tiered { grid-template-columns: repeat(12, minmax(0, 1fr)); grid-auto-rows: 96px; grid-auto-flow: dense; }
.bento.tiered > .tier-hero    { grid-column: span 4; grid-row: span 2; }
.bento.tiered > .tier-medium  { grid-column: span 3; grid-row: span 1; }
.bento.tiered > .tier-compact { grid-column: span 2; grid-row: span 1; }

.grid { display: grid; gap: var(--s-3); }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(440px, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.grid-4 { grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); }

/* ============================================================
   ۵. کارت شاخص
   ============================================================ */
.kpi {
  position: relative; overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: var(--s-3) var(--s-4);
  box-shadow: var(--shadow-xs);
  display: flex; flex-direction: column;
  transition: border-color .18s, box-shadow .18s, transform .18s;
}
.kpi:hover {
  border-color: var(--accent, var(--border-strong));
  box-shadow: var(--shadow);
  transform: translateY(-1px);
}

/* نوار وضعیت باریک بالای کارت — رنگش از وضعیت هدف می‌آید نه از سلیقه */
.kpi::before {
  content: ''; position: absolute; top: 0; inset-inline: 0; height: 2px;
  background: var(--status-color, var(--accent, var(--azure)));
  opacity: .85;
}
.kpi.st-excellent { --status-color: var(--ok); }
.kpi.st-good     { --status-color: var(--info); }
.kpi.st-poor     { --status-color: var(--bad); }
.kpi.st-neutral  { --status-color: var(--slate); }

.kpi-head { display: flex; align-items: flex-start; gap: var(--s-2); }
.kpi-ico {
  width: 28px; height: 28px; flex: 0 0 28px;
  border-radius: 8px; display: grid; place-items: center;
  font-size: 12.5px; color: var(--accent, var(--azure));
  background: var(--accent-tint, var(--tint-azure));
}
.kpi-name {
  font-size: var(--fs-sm); font-weight: 500; color: var(--text-secondary);
  line-height: 1.45; flex: 1; min-width: 0;
}
.kpi-target-chip {
  font-size: var(--fs-2xs); color: var(--text-muted);
  white-space: nowrap; padding-top: 2px;
}

.kpi-num {
  display: flex; align-items: baseline; gap: 5px;
  margin-top: auto; padding-top: var(--s-2);
  font-weight: 800; letter-spacing: -.7px; color: var(--text);
  font-variant-numeric: tabular-nums;
}
.kpi-unit { font-size: var(--fs-xs); font-weight: 500; color: var(--text-muted); letter-spacing: 0; }

.tier-compact .kpi-num { font-size: var(--fs-xl); }
.tier-medium  .kpi-num { font-size: var(--fs-2xl); }
.tier-hero    .kpi-num { font-size: var(--fs-3xl); }

.kpi-foot {
  display: flex; align-items: center; gap: var(--s-2);
  margin-top: var(--s-2); min-height: 34px;
}
/*
 * ارتفاع اسپارک‌لاین در همه‌ی کارت‌ها یکسان است.
 * قبلاً کارت قهرمان ۶۲ و بقیه ۲۶ پیکسل بودند و ردیف‌ها ناهماهنگ
 * دیده می‌شدند. حالا فقط عرض کارت فرق می‌کند، نه ارتفاع نمودار.
 */
.kpi-spark { flex: 1; min-width: 0; height: 34px; }
/* فقط در شبکه‌ی سطح‌بندی‌شده کارت فشرده نمودار ندارد؛ در شبکه‌ی
   یکنواخت همه‌ی کارت‌ها باید هم‌شکل باشند. */
.tiered .tier-compact .kpi-spark { display: none; }

.delta {
  display: inline-flex; align-items: center; gap: 3px;
  font-size: var(--fs-xs); font-weight: 700;
  padding: 2px 7px; border-radius: 99px; white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.delta.t-positive { color: var(--ok);  background: var(--tint-ok); }
.delta.t-negative { color: var(--bad); background: var(--tint-bad); }
.delta.t-neutral  { color: var(--text-muted); background: var(--surface-3); }

/*
 * نوار تحقق هدف فقط در تب «اهداف و عملکرد» معنا دارد.
 * در صفحه‌های معرفی، یک خط صافِ بی‌برچسب زیر کارت فقط سؤال می‌سازد،
 * پس آنجا نمایش داده نمی‌شود.
 */
.showcase .kpi-bar { display: none; }

/* چیپ «هدف ۲٬۵۰۰» هم تحلیلی است — در صفحه‌ی معرفی فقط شلوغی می‌سازد
   و خواننده را به مقایسه‌ی «نرسیدیم» دعوت می‌کند. */
.showcase .kpi-target-chip { display: none; }

.kpi-bar {
  position: relative; height: 3px; margin-top: var(--s-2);
  background: var(--surface-3); border-radius: 99px; overflow: visible;
}
.kpi-bar .fill {
  display: block; height: 100%; width: 0; border-radius: 99px;
  background: var(--status-color, var(--azure));
  transition: width .9s var(--ease);
}
.kpi-bar .goal {
  position: absolute; top: -2px; width: 2px; height: 7px;
  background: var(--text-muted); border-radius: 1px; opacity: .6;
}

/* حالت قهرمان: چیدمان دو بخشی */
.tier-hero { padding: var(--s-4) var(--s-5); }
.tier-hero .kpi-ico { width: 34px; height: 34px; flex-basis: 34px; font-size: 15px; }
.tier-hero .kpi-name { font-size: var(--fs-base); }

/* ============================================================
   ۶. هیرو: گیج چندحلقه‌ای + نکات
   ============================================================ */
.hero {
  display: grid;
  grid-template-columns: minmax(280px, 340px) 1fr;
  gap: var(--s-4);
  margin-bottom: var(--s-6);
}

.health {
  position: relative; overflow: hidden;
  border-radius: var(--radius-lg);
  padding: var(--s-4) var(--s-5) var(--s-5);
  color: #eef4fb;
  background:
    radial-gradient(120% 90% at 15% 0%, rgba(85, 145, 196, .38), transparent 60%),
    linear-gradient(155deg, var(--brand-800), var(--brand-950));
  box-shadow: var(--shadow);
  display: flex; flex-direction: column;
}
html[data-theme='dark'] .health { border: 1px solid var(--border); }

.health-top { display: flex; align-items: center; gap: var(--s-2); margin-bottom: var(--s-2); }
.health-top h4 { font-size: var(--fs-sm); font-weight: 600; opacity: .85; }
.health-src {
  margin-inline-start: auto; font-size: var(--fs-2xs);
  padding: 2px 8px; border-radius: 99px;
  background: rgba(255, 255, 255, .12); opacity: .8;
}

.gauge { position: relative; width: 100%; aspect-ratio: 1 / .78; min-height: 168px; }
.gauge canvas { position: absolute; inset: 0; width: 100% !important; height: 100% !important; }
.gauge-mid {
  position: absolute; inset: 0; display: flex; flex-direction: column;
  align-items: center; justify-content: center; pointer-events: none;
}
.gauge-score {
  font-size: var(--fs-4xl); font-weight: 800; line-height: .95;
  letter-spacing: -2px; font-variant-numeric: tabular-nums;
}
.gauge-score small { font-size: var(--fs-lg); font-weight: 600; opacity: .7; letter-spacing: 0; }
.gauge-label { font-size: var(--fs-sm); opacity: .78; margin-top: 3px; }

.rings { display: flex; flex-direction: column; gap: 7px; margin-top: var(--s-3); }
.ring-row {
  display: grid; grid-template-columns: 15px 1fr auto;
  align-items: center; gap: 9px; font-size: var(--fs-xs);
  padding: 3px 0; border-radius: 7px;
  cursor: pointer; transition: background .15s;
}
.ring-row:hover { background: rgba(255, 255, 255, .07); }
.ring-row .swatch { width: 9px; height: 9px; border-radius: 3px; }
.ring-row .name { opacity: .88; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ring-row .val { font-weight: 700; font-variant-numeric: tabular-nums; }

/* نکات */
/*
 * کارت‌های دستاورد کنار گیج سلامت.
 *
 * قبلاً این ستون با «نکات تحلیلی» پر می‌شد و چون تعدادشان کم بود،
 * زیرش فضای خالی می‌ماند. حالا شبکه ارتفاع گیج را پر می‌کند و
 * کارت‌ها کشیده می‌شوند تا فضای خالی نماند.
 */
.insights {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(236px, 1fr));
  grid-auto-rows: 1fr;
  gap: var(--s-3);
  height: 100%;
  align-content: stretch;
}
.insight {
  background: var(--surface);
  border: 1px solid var(--border);
  border-inline-start: 3px solid var(--tone-color, var(--info));
  border-radius: var(--radius);
  padding: var(--s-4);
  box-shadow: var(--shadow-xs);
  display: flex; gap: var(--s-3); align-items: center;
  cursor: pointer; transition: transform .16s, box-shadow .16s;
}
.insight .v { font-size: var(--fs-base); }
/* عدد برجسته در کارت دستاورد */
.insight .big {
  font-size: var(--fs-xl); font-weight: 800; line-height: 1.1;
  color: var(--tone-color, var(--info)); font-variant-numeric: tabular-nums;
  letter-spacing: -.5px;
}
.insight .big small { font-size: var(--fs-xs); font-weight: 600; opacity: .8; letter-spacing: 0; }
.insight:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.insight > i {
  width: 30px; height: 30px; flex: 0 0 30px;
  border-radius: 9px; display: grid; place-items: center; font-size: 12.5px;
  color: var(--tone-color, var(--info)); background: var(--tone-tint, var(--tint-info));
}
.insight .t { font-size: var(--fs-xs); color: var(--text-muted); font-weight: 500; }
.insight .v { font-size: var(--fs-sm); font-weight: 600; color: var(--text); line-height: 1.55; }
.insight.t-positive { --tone-color: var(--ok);   --tone-tint: var(--tint-ok); }
.insight.t-negative { --tone-color: var(--bad);  --tone-tint: var(--tint-bad); }
.insight.t-warning  { --tone-color: var(--warn); --tone-tint: var(--tint-warn); }
.insight.t-info     { --tone-color: var(--info); --tone-tint: var(--tint-info); }

/* ============================================================
   ۷. نمودارها
   ============================================================ */
.chart {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-xs);
  display: flex; flex-direction: column; overflow: hidden;
  transition: box-shadow .18s, border-color .18s;
}
/* بلند شدن کارت هنگام هاوِر عمداً نداریم: نمودار در حال جابه‌جایی
   خوانده نمی‌شود. فقط سایه و لبه عمق می‌گیرند. */
.chart:hover { box-shadow: var(--shadow); border-color: var(--border-strong); }
.chart-head {
  display: flex; align-items: center; gap: var(--s-2);
  padding: var(--s-3) var(--s-4);
  border-bottom: 1px solid var(--border);
  background: var(--surface-2);   /* سرِ کارت یک نوار مجزا خوانده شود */
}
.chart-head h4 { font-size: var(--fs-sm); font-weight: 700; display: flex; align-items: center; gap: 7px; }
.chart-head h4 i { color: var(--brand-500); font-size: 12px; }
html[data-theme='dark'] .chart-head h4 i { color: var(--azure); }
.chart-head .sub { font-size: var(--fs-2xs); color: var(--text-muted); }
.chart-tools { display: flex; gap: 3px; margin-inline-start: auto; }
.ctool {
  width: 26px; height: 26px; border-radius: 7px;
  border: 1px solid var(--border); background: var(--surface-2);
  color: var(--text-muted); display: grid; place-items: center; font-size: 11px;
  transition: color .15s, border-color .15s, background .15s;
}
.ctool:hover { color: var(--brand-500); border-color: var(--brand-500); }
.ctool.on { color: #fff; background: var(--brand-500); border-color: var(--brand-500); }

.chart-body { padding: var(--s-3) var(--s-4) var(--s-4); position: relative; }
.cwrap { position: relative; height: 300px; }
.cwrap.xs { height: 190px; }
.cwrap.sm { height: 240px; }
.cwrap.lg { height: 380px; }
.cwrap.xl { height: 460px; }

.chart-foot {
  font-size: var(--fs-2xs); color: var(--text-muted);
  padding: 0 var(--s-4) var(--s-3);
  display: flex; align-items: center; gap: 6px;
}

/* --- Bullet chart (HTML، نه canvas — دقیق‌تر و قابل چاپ) --- */
.bullets { display: flex; flex-direction: column; gap: var(--s-3); }
.bullet { display: grid; grid-template-columns: minmax(120px, 168px) 1fr auto; gap: var(--s-3); align-items: center; }
.bullet .lbl { font-size: var(--fs-sm); color: var(--text-secondary); text-align: start;
               white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bullet .track {
  position: relative; height: 20px; border-radius: 6px;
  background: var(--surface-3); overflow: visible;
}
.bullet .band {
  position: absolute; inset-block: 0; inset-inline-start: 0;
  border-radius: 6px; background: var(--tint-slate);
}
.bullet .fill {
  position: absolute; inset-block: 5px; inset-inline-start: 0;
  height: 10px; border-radius: 5px; width: 0;
  background-color: var(--bcolor, var(--info));
  background-image: var(--sheen);
  transition: width 1s var(--ease);
}
.bullet .marker {
  position: absolute; inset-block: 1px; width: 3px;
  background: var(--text); border-radius: 2px;
}
.bullet .marker::after {
  content: 'هدف'; position: absolute; top: -15px; inset-inline-start: 50%;
  transform: translateX(50%); font-size: 9px; color: var(--text-muted); white-space: nowrap;
}
.bullet .pct {
  font-size: var(--fs-sm); font-weight: 700; min-width: 74px; text-align: end;
  font-variant-numeric: tabular-nums;
}
.bullet.b-excellent { --bcolor: var(--ok); }
.bullet.b-good      { --bcolor: var(--info); }
.bullet.b-poor      { --bcolor: var(--bad); }
.bullet.b-neutral   { --bcolor: var(--slate); }

/* --- Slope / dumbbell --- */
.slopes { display: flex; flex-direction: column; gap: 7px; }
.slope-row { display: grid; grid-template-columns: minmax(120px, 170px) 1fr auto; gap: var(--s-3); align-items: center; }
.slope-row .lbl { font-size: var(--fs-sm); color: var(--text-secondary);
                  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.slope-line { position: relative; height: 18px; }
.slope-line .axis {
  position: absolute; inset-inline: 0; top: 50%; height: 1px;
  background: var(--grid-line);
}
.slope-line .seg {
  position: absolute; top: 50%; height: 3px; transform: translateY(-50%);
  border-radius: 2px; background: var(--scolor, var(--slate)); opacity: .85;
}
.slope-line .pt {
  position: absolute; top: 50%; width: 9px; height: 9px;
  transform: translate(50%, -50%); border-radius: 50%;
  border: 2px solid var(--surface);
}
.slope-line .pt.from { background: var(--slate); }
.slope-line .pt.to { background: var(--scolor, var(--slate)); }
.slope-row .chg { font-size: var(--fs-xs); font-weight: 700; min-width: 62px; text-align: end;
                  font-variant-numeric: tabular-nums; }
.slope-row.t-positive { --scolor: var(--ok); }
.slope-row.t-negative { --scolor: var(--bad); }
.slope-row.t-neutral  { --scolor: var(--slate); }

/* --- ماتریس حرارتی --- */
.heat-wrap { overflow-x: auto; }
/*
 * width:100% لازم است. بدون آن جدول فقط به اندازه‌ی محتوایش پهن
 * می‌شود و در چیدمان راست‌به‌چپ به لبه‌ی راستِ کارت می‌چسبد؛ نیمه‌ی
 * چپِ کارت یک حفره‌ی سفید می‌ماند. min-width هم می‌ماند تا در صفحه‌ی
 * باریک به‌جای له شدن، اسکرول افقی بگیرد.
 */
table.heat {
  border-collapse: separate; border-spacing: 3px; font-size: var(--fs-xs);
  width: 100%; min-width: 620px;
}
table.heat th {
  font-weight: 600; color: var(--text-secondary); padding: 5px 8px;
  font-size: var(--fs-2xs); text-align: center; vertical-align: bottom;
  max-width: 92px; line-height: 1.35;
}
/*
 * ستون اولِ نامِ دانشکده. بدون این override، قاعده‌ی عمومیِ بالا
 * (max-width:92px) نام دانشکده را کوتاه می‌کرد و متنِ nowrap روی
 * ستون بعدی سرریز می‌شد. اینجا سقفِ عرض برداشته و کفِ عرض تضمین
 * می‌شود؛ ستون هنگام اسکرول افقی هم چسبان می‌ماند و پس‌زمینه دارد
 * تا زیرِ سلول‌ها پنهان نشود.
 */
/*
 * width:1% به‌همراه nowrap یعنی «فقط به اندازه‌ی متنت پهن شو»؛ بقیه‌ی
 * عرضِ جدول به ستون‌های داده می‌رسد. بدون آن، این ستون تمام فضای
 * اضافه را می‌بلعید و بین نام‌ها و خانه‌ها یک شکاف سفید می‌ماند.
 */
table.heat th.row-h {
  text-align: start; color: var(--text); font-size: var(--fs-xs);
  white-space: nowrap; padding-inline-end: var(--s-4);
  max-width: none; min-width: 168px; width: 1%;
  position: sticky; inset-inline-start: 0; z-index: 2;
  background: var(--surface);
}
table.heat td {
  min-width: 72px; height: 40px; text-align: center; border-radius: 7px;
  font-weight: 700; font-variant-numeric: tabular-nums;
  color: var(--heat-fg, var(--text));
  background: var(--heat-bg, var(--surface-3));
  transition: transform .14s;
  cursor: default;
}
table.heat td:hover { transform: scale(1.06); box-shadow: var(--shadow-sm); }
table.heat td.empty { background: var(--surface-2); color: var(--text-muted); font-weight: 400; }

/* --- Waterfall --- */
.waterfall { display: flex; flex-direction: column; gap: var(--s-2); }
.wf-row { display: grid; grid-template-columns: minmax(96px, 130px) 1fr auto; gap: var(--s-3); align-items: center; }
.wf-row .lbl { font-size: var(--fs-sm); color: var(--text-secondary); white-space: nowrap; }
.wf-track { position: relative; height: 26px; background: var(--surface-2); border-radius: 7px; }
.wf-bar {
  position: absolute; inset-block: 4px; border-radius: 5px; width: 0;
  background-image: var(--sheen);
  transition: width .9s var(--ease), inset-inline-start .9s var(--ease);
}
.wf-bar.total { background-color: var(--brand-500); }
.wf-bar.subtotal { background-color: var(--azure); }
.wf-bar.negative { background-color: var(--bad); opacity: .8; }
.wf-row .amt { font-size: var(--fs-sm); font-weight: 700; min-width: 78px; text-align: end;
               font-variant-numeric: tabular-nums; }

/* --- Small multiples — شبکه‌ی روند همه‌ی شاخص‌ها ---
   تفکیک حوزه‌ها: سرتیترِ رنگی هر حوزه + نوارِ کناریِ هم‌رنگ روی کارت‌ها.
   ملایم و حرفه‌ای — رنگ فقط برای «کدام حوزه»، نه برای خوب/بد. */
.small-group { margin-bottom: var(--s-6); }
.small-group-head {
  display: flex; align-items: center; gap: 9px;
  margin-bottom: var(--s-3); padding-bottom: var(--s-2);
  font-size: var(--fs-sm); font-weight: 700; color: var(--text);
  border-bottom: 2px solid var(--accent-tint, var(--tint-azure));
}
.small-group-head .sg-ico {
  width: 26px; height: 26px; flex: 0 0 26px;
  border-radius: 8px; display: grid; place-items: center; font-size: 12px;
  color: var(--accent, var(--azure)); background: var(--accent-tint, var(--tint-azure));
}
.small-group-head .sg-name { color: var(--accent, var(--azure)); }
.small-group-head .sg-count {
  margin-inline-start: auto; font-size: var(--fs-2xs); font-weight: 700;
  padding: 2px 9px; border-radius: 99px;
  color: var(--accent, var(--azure)); background: var(--accent-tint, var(--tint-azure));
}

.smalls { display: grid; grid-template-columns: repeat(auto-fill, minmax(206px, 1fr)); gap: var(--s-3); }
.small {
  position: relative;
  background: var(--surface); border: 1px solid var(--border);
  border-inline-start: 3px solid var(--accent, var(--azure));  /* نوار کناریِ رنگِ حوزه */
  border-radius: var(--radius); padding: var(--s-3) var(--s-4) var(--s-2);
  box-shadow: var(--shadow-xs);
  transition: border-color .16s, transform .16s, box-shadow .16s;
  cursor: pointer;
  display: flex; flex-direction: column;
}
.small:hover {
  border-color: var(--accent, var(--azure));
  transform: translateY(-2px); box-shadow: var(--shadow);
}
.small .n {
  font-size: var(--fs-sm); color: var(--text-secondary); font-weight: 500;
  line-height: 1.5; min-height: 3em;
}
.small .v {
  font-size: var(--fs-2xl); font-weight: 800; font-variant-numeric: tabular-nums;
  letter-spacing: -.6px; color: var(--text);
  display: flex; align-items: baseline; gap: 5px; margin-top: 2px;
}
/* واحد همیشه دیده می‌شود — «۱۴» بدون واحد یعنی هیچ */
.small .u { font-size: var(--fs-xs); font-weight: 500; color: var(--text-muted); letter-spacing: 0; }
.small .d {
  font-size: var(--fs-xs); font-weight: 700;
  margin-inline-start: auto; white-space: nowrap;
}
.small .sp { height: 34px; margin-top: 6px; }

/* ============================================================
   ۷.۵ بخش‌های ویژه — عمرانی، کارکنان، ورزش، هیئت علمی
   ============================================================ */

/* ---------- پروژه‌ی عمرانی ---------- */
.cons-card {
  position: relative; overflow: hidden;
  padding: var(--s-4) var(--s-5) var(--s-5);
  border-radius: var(--radius-lg);
  margin-bottom: var(--s-3);
}
.cons-card::before {
  content: ''; position: absolute; top: 0; inset-inline: 0; height: 3px;
  background: linear-gradient(90deg, var(--amber), var(--brand-500));
}
.cons-head { display: flex; align-items: center; gap: var(--s-3); margin-bottom: var(--s-3); }
.cons-ico {
  width: 48px; height: 48px; flex: 0 0 48px;
  border-radius: 14px; display: grid; place-items: center;
  font-size: 20px; color: var(--amber); background: var(--tint-amber);
}
.cons-titles { flex: 1; min-width: 0; }
.cons-name { font-size: var(--fs-md); font-weight: 800; }
.cons-stage {
  font-size: var(--fs-xs); color: var(--text-secondary); margin-top: 2px;
  display: flex; align-items: center; gap: 5px;
}
.cons-stage i { color: var(--amber); font-size: 10px; }
.cons-pct { text-align: center; flex-shrink: 0; }
.cons-pct .v {
  font-size: var(--fs-3xl); font-weight: 800; line-height: 1; letter-spacing: -1.5px;
  color: var(--brand-500); font-variant-numeric: tabular-nums;
}
html[data-theme='dark'] .cons-pct .v { color: var(--azure); }
.cons-pct small { display: block; font-size: var(--fs-2xs); color: var(--text-muted); margin-top: 3px; }

.cons-bar {
  height: 10px; border-radius: 99px; background: var(--surface-3);
  overflow: hidden; margin-bottom: 7px;
}
.cons-bar .fill {
  display: block; height: 100%; width: 0; border-radius: 99px;
  background: linear-gradient(90deg, var(--brand-400), var(--brand-600));
  transition: width 1s var(--ease);
}
.cons-meta { font-size: var(--fs-xs); color: var(--text-muted); }
.cons-meta i { color: var(--ok); }

/* نوار مراحل — هر مرحله یک ردیف با وضعیت رنگی */
.cons-steps {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(252px, 1fr));
  gap: var(--s-3); margin-top: var(--s-4);
  padding-top: var(--s-4); border-top: 1px solid var(--border);
}
.cons-step {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 11px 13px; border-radius: 11px;
  background: var(--surface-2); border: 1px solid var(--border);
}
.cons-step .dot {
  width: 26px; height: 26px; flex: 0 0 26px;
  border-radius: 50%; display: grid; place-items: center;
  font-size: 11px; color: #fff; background: var(--border-strong);
}
.cons-step .sbody { flex: 1; min-width: 0; }
.cons-step .slabel { font-size: var(--fs-sm); font-weight: 700; }
.cons-step .sdesc {
  font-size: var(--fs-2xs); color: var(--text-muted); margin-top: 2px; line-height: 1.6;
}
.cons-step .strack {
  height: 4px; border-radius: 99px; background: var(--surface-3);
  margin-top: 7px; overflow: hidden;
}
.cons-step .sfill {
  display: block; height: 100%; width: 0; border-radius: 99px;
  background-color: var(--step-color, var(--border-strong));
  background-image: var(--sheen);
  transition: width .9s var(--ease);
}
.cons-step .spct {
  font-size: var(--fs-xs); font-weight: 700; color: var(--step-color, var(--text-muted));
  font-variant-numeric: tabular-nums; white-space: nowrap;
}
/* وضعیت مرحله: تمام‌شده سبز، در حال اجرا کهربایی، شروع‌نشده خاکستری.
   اینجا سبز/خاکستری «خوب/بد» نیست، «انجام‌شده/نشده» است — و همین
   تنها استثنای پذیرفتنی است چون معنای پیشرفت را می‌رساند. */
.cons-step.is-done   { --step-color: var(--ok); }
.cons-step.is-done .dot { background: var(--ok); }
.cons-step.is-active {
  --step-color: var(--amber);
  border-color: var(--amber); background: var(--tint-amber);
}
.cons-step.is-active .dot { background: var(--amber); }
.cons-step.is-todo   { --step-color: var(--text-muted); }
.cons-step.is-todo .slabel { color: var(--text-secondary); font-weight: 600; }

/* حالت خلاصه در صفحه‌ی معرفی */
.cons-card.is-brief { padding: var(--s-4); }
.cons-card.is-brief .cons-ico { width: 42px; height: 42px; flex-basis: 42px; font-size: 17px; }
.cons-card.is-brief .cons-pct .v { font-size: var(--fs-2xl); }

/* ---------- ساختار کارکنان ---------- */
.staff-row {
  display: grid;
  grid-template-columns: 12px minmax(72px, auto) 1fr auto auto;
  align-items: center; gap: 11px;
  padding: 9px 2px; border-bottom: 1px solid var(--border);
}
.staff-row:last-child { border-bottom: none; }
.staff-row .sw {
  width: 11px; height: 11px; border-radius: 4px;
  background: var(--accent, var(--azure));
}
.staff-row .nm { font-size: var(--fs-sm); font-weight: 600; white-space: nowrap; }
.staff-row .tr { height: 7px; border-radius: 99px; background: var(--surface-3); overflow: hidden; }
.staff-row .fl {
  display: block; height: 100%; width: 0; border-radius: 99px;
  background: var(--accent, var(--azure)); transition: width .9s var(--ease);
}
.staff-row .vl {
  font-size: var(--fs-md); font-weight: 800; min-width: 34px; text-align: end;
  font-variant-numeric: tabular-nums;
}
.staff-row .pc {
  font-size: var(--fs-xs); color: var(--text-muted); min-width: 48px; text-align: end;
  font-variant-numeric: tabular-nums;
}

/* ---------- تربیت بدنی ---------- */
.sports-wrap { display: grid; grid-template-columns: minmax(240px, 340px) 1fr; gap: var(--s-3); }
.sports-stats {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(104px, 1fr));
  gap: var(--s-3); align-content: start;
}
.sport-stat {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: var(--s-4) var(--s-2);
  box-shadow: var(--shadow-xs);
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  transition: transform .16s, box-shadow .16s;
}
.sport-stat:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.sport-stat .ico {
  width: 34px; height: 34px; border-radius: 10px;
  display: grid; place-items: center; font-size: 15px;
  color: var(--medal, var(--slate)); background: var(--medal-tint, var(--tint-slate));
  margin-bottom: 3px;
}
.sport-stat .num {
  font-size: var(--fs-2xl); font-weight: 800; line-height: 1;
  color: var(--medal, var(--text)); font-variant-numeric: tabular-nums; letter-spacing: -1px;
}
.sport-stat .lbl { font-size: var(--fs-2xs); color: var(--text-secondary); font-weight: 600; }
/* رنگ مدال معنای جهانی دارد و اینجا مقوله‌ی تصادفی نیست */
.sport-stat.is-gold   { --medal: #c8951b; --medal-tint: rgba(200, 149, 27, .14); }
.sport-stat.is-silver { --medal: #7d8b9c; --medal-tint: rgba(125, 139, 156, .16); }
.sport-stat.is-bronze { --medal: #a76b3c; --medal-tint: rgba(167, 107, 60, .14); }
.sport-stat.is-level  { --medal: var(--azure); --medal-tint: var(--tint-azure); }
html[data-theme='dark'] .sport-stat.is-gold   { --medal: #e0b544; }
html[data-theme='dark'] .sport-stat.is-bronze { --medal: #c68a5c; }

.sports-board { padding: var(--s-4); display: flex; flex-direction: column; }
.sports-board-head {
  display: flex; align-items: center; gap: 8px;
  font-size: var(--fs-sm); font-weight: 700;
  padding-bottom: var(--s-3); margin-bottom: var(--s-2);
  border-bottom: 1px solid var(--border);
}
.sports-board-head i { color: #c8951b; }
.sports-board-head .chip { margin-inline-start: auto; }
.sports-list { display: flex; flex-direction: column; gap: 6px; overflow-y: auto; max-height: 340px; }
.sport-item {
  display: flex; align-items: center; gap: 11px;
  padding: 9px 11px; border-radius: 10px;
  background: var(--surface-2); border: 1px solid var(--border);
  border-inline-start: 3px solid var(--medal, var(--slate));
  transition: background .14s, transform .14s;
}
.sport-item:hover { background: var(--surface-3); transform: translateX(-2px); }
.sport-item.is-gold   { --medal: #c8951b; }
.sport-item.is-silver { --medal: #7d8b9c; }
.sport-item.is-bronze { --medal: #a76b3c; }
.sport-item.is-other  { --medal: var(--slate); }
.sport-item .badge-rank {
  width: 30px; height: 30px; flex: 0 0 30px;
  border-radius: 9px; display: grid; place-items: center;
  font-size: 13px; color: #fff; background: var(--medal, var(--slate));
}
.sport-item .body { flex: 1; min-width: 0; }
.sport-item .t { font-size: var(--fs-sm); font-weight: 700; }
.sport-item .m { font-size: var(--fs-2xs); color: var(--text-muted); margin-top: 1px; }
.sport-item .m .rank { color: var(--medal); font-weight: 700; }

@media (max-width: 1180px) {
  .sports-wrap { grid-template-columns: 1fr; }
}

/* ---------- سرمایه‌ی انسانی هیئت علمی ---------- */
.hr-row {
  display: flex; align-items: center; gap: var(--s-3);
  padding: 13px 14px; margin-bottom: 8px;
  background: var(--surface-2); border: 1px solid var(--border);
  border-inline-start: 3px solid var(--accent, var(--azure));
  border-radius: 11px; cursor: pointer;
  transition: background .15s, transform .15s, box-shadow .15s;
}
.hr-row:last-child { margin-bottom: 0; }
.hr-row:hover { background: var(--surface-3); transform: translateY(-1px); box-shadow: var(--shadow-xs); }
.hr-row .ico {
  width: 36px; height: 36px; flex: 0 0 36px;
  border-radius: 11px; display: grid; place-items: center; font-size: 15px;
  color: var(--accent, var(--azure)); background: var(--accent-tint, var(--tint-azure));
}
.hr-row .body { flex: 1; min-width: 0; }
.hr-row .nm { font-size: var(--fs-sm); font-weight: 700; }
.hr-row .tg { font-size: var(--fs-2xs); color: var(--text-muted); margin-top: 1px; }
.hr-row .val { display: flex; align-items: center; gap: 9px; }
.hr-row .val .n {
  font-size: var(--fs-xl); font-weight: 800; letter-spacing: -.7px;
  font-variant-numeric: tabular-nums;
}

/* ============================================================
   ۸. جدول
   ============================================================ */
.table-wrap { overflow-x: auto; }
table.dt { width: 100%; border-collapse: collapse; font-size: var(--fs-sm); }
table.dt th {
  text-align: start; padding: 10px 12px;
  background: var(--surface-2); color: var(--text-secondary);
  font-size: var(--fs-xs); font-weight: 600;
  border-bottom: 1px solid var(--border); white-space: nowrap;
  position: sticky; top: 0; z-index: 1;
}
table.dt td { padding: 10px 12px; border-bottom: 1px solid var(--border); }
table.dt tbody tr:hover td { background: var(--surface-2); }
table.dt tfoot td {
  font-weight: 700; background: var(--surface-2);
  border-top: 2px solid var(--border-strong);
}
.num { font-variant-numeric: tabular-nums; font-weight: 600; text-align: center; }

.minibar { display: flex; align-items: center; gap: 8px; min-width: 128px; }
.minibar .tr { flex: 1; height: 5px; border-radius: 99px; background: var(--surface-3); overflow: hidden; }
.minibar .fl {
  display: block; height: 100%; width: 0; border-radius: 99px;
  background-image: var(--sheen);
  transition: width .8s var(--ease);
}
.minibar .pc { font-size: var(--fs-xs); font-weight: 700; min-width: 46px; text-align: end;
               font-variant-numeric: tabular-nums; }

/* ============================================================
   ۹. اجزای کوچک
   ============================================================ */
.card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); box-shadow: var(--shadow-xs);
}

.badge {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: var(--fs-2xs); font-weight: 700;
  padding: 2px 8px; border-radius: 99px;
}
.badge.ok  { color: var(--ok);   background: var(--tint-ok); }
.badge.warn{ color: var(--warn); background: var(--tint-warn); }
.badge.bad { color: var(--bad);  background: var(--tint-bad); }
.badge.info{ color: var(--info); background: var(--tint-info); }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  padding: 8px 15px; border-radius: 10px;
  border: 1px solid var(--border); background: var(--surface-2);
  color: var(--text); font-size: var(--fs-sm); font-weight: 600;
  transition: border-color .16s, color .16s, background .16s, transform .12s;
}
.btn:hover { border-color: var(--brand-500); color: var(--brand-500); text-decoration: none; }
.btn:active { transform: scale(.98); }
.btn-primary { background: var(--brand-600); border-color: var(--brand-600); color: #fff; }
.btn-primary:hover { background: var(--brand-700); border-color: var(--brand-700); color: #fff; }
.btn-sm { padding: 6px 11px; font-size: var(--fs-xs); border-radius: 8px; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }

.chip {
  font-size: var(--fs-xs); padding: 3px 9px; border-radius: 99px;
  background: var(--surface-2); border: 1px solid var(--border); color: var(--text-secondary);
}

/* ---------- تشکل‌ها و انجمن‌ها — کارت معرفیِ چشم‌گیر ---------- */
.group {
  position: relative; overflow: hidden;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: var(--s-4);
  box-shadow: var(--shadow-xs);
  transition: transform .16s, box-shadow .16s, border-color .16s;
}
.group::before {
  content: ''; position: absolute; top: 0; inset-inline: 0; height: 3px;
  background: linear-gradient(90deg, var(--brand-400), var(--brand-600));
}
.group:hover { transform: translateY(-2px); box-shadow: var(--shadow); border-color: var(--brand-400); }
.group-head {
  display: flex; align-items: center; gap: var(--s-3);
  margin-bottom: var(--s-3); padding-bottom: var(--s-3);
  border-bottom: 1px solid var(--border);
}
.group-head .ico {
  width: 46px; height: 46px; flex: 0 0 46px;
  border-radius: 13px; display: grid; place-items: center;
  font-size: 19px; color: var(--brand-500); background: var(--tint-brand);
}
html[data-theme='dark'] .group-head .ico { color: var(--azure); }
.group-titles { flex: 1; min-width: 0; }
.group-head h4 { font-size: var(--fs-md); font-weight: 700; }
.group-sub { font-size: var(--fs-2xs); color: var(--text-muted); margin-top: 1px; }
.group-head .n {
  margin-inline-start: auto; font-size: var(--fs-2xl); font-weight: 800;
  color: var(--brand-500); line-height: 1; letter-spacing: -1px;
  font-variant-numeric: tabular-nums;
}
html[data-theme='dark'] .group-head .n { color: var(--azure); }
.group-caption {
  font-size: var(--fs-2xs); color: var(--text-muted); font-weight: 600;
  margin-bottom: 7px;
}
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.group .chip { background: var(--surface-2); font-weight: 600; }

/* ---------- رشته‌های تحصیلی — کارت معرفیِ هر مقطع ---------- */
.fcard {
  position: relative; overflow: hidden;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); box-shadow: var(--shadow-xs);
  display: flex; flex-direction: column;
  transition: transform .16s, box-shadow .16s, border-color .16s;
}
.fcard::before {
  content: ''; position: absolute; top: 0; inset-inline: 0; height: 3px;
  background: var(--accent, var(--brand-500));
}
.fcard:hover { transform: translateY(-2px); box-shadow: var(--shadow); border-color: var(--accent, var(--brand-400)); }
.fcard-head {
  display: flex; align-items: center; gap: var(--s-3);
  padding: var(--s-4); border-bottom: 1px solid var(--border);
  background: var(--accent-tint, var(--tint-brand));
}
.fcard-ico {
  width: 44px; height: 44px; flex: 0 0 44px;
  border-radius: 13px; display: grid; place-items: center;
  font-size: 19px; color: var(--accent, var(--brand-500));
  background: var(--surface); box-shadow: var(--shadow-xs);
}
.fcard-meta { flex: 1; min-width: 0; }
.fcard-label { font-size: var(--fs-md); font-weight: 800; color: var(--text); }
.fcard-sub { font-size: var(--fs-2xs); color: var(--text-muted); }
.fcard-count {
  font-size: var(--fs-2xl); font-weight: 800; line-height: 1; letter-spacing: -1px;
  color: var(--accent, var(--brand-500)); font-variant-numeric: tabular-nums;
  display: flex; align-items: baseline; gap: 3px;
}
.fcard-count small { font-size: var(--fs-2xs); font-weight: 600; color: var(--text-muted); letter-spacing: 0; }
.fcard-list { padding: var(--s-3) var(--s-4) var(--s-4); display: flex; flex-direction: column; gap: 6px; }
.fcard-empty {
  padding: var(--s-6) var(--s-4); text-align: center;
  font-size: var(--fs-xs); color: var(--text-muted);
}
.fitem {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 11px;
  background: var(--surface-2); border: 1px solid var(--border);
  border-radius: 9px; font-size: var(--fs-sm);
  transition: border-color .14s, background .14s;
}
.fitem:hover { border-color: var(--accent, var(--border-strong)); background: var(--surface-3); }
.fitem i { color: var(--accent, var(--ok)); font-size: 11px; }

/* Toast */
.toasts {
  position: fixed; inset-block-end: 20px; inset-inline-start: 20px;
  z-index: 999; display: flex; flex-direction: column; gap: 8px; max-width: 400px;
}
.toast {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 11px 14px; background: var(--surface);
  border: 1px solid var(--border);
  border-inline-start: 3px solid var(--tc, var(--info));
  border-radius: 11px; box-shadow: var(--shadow-lg);
  font-size: var(--fs-sm); cursor: pointer;
  animation: t-in .26s var(--ease-out);
}
.toast.out { animation: t-out .22s forwards; }
.toast i { color: var(--tc, var(--info)); margin-top: 2px; }
.toast.success { --tc: var(--ok); }
.toast.error   { --tc: var(--bad); }
.toast.warning { --tc: var(--warn); }
.toast.info    { --tc: var(--info); }
@keyframes t-in  { from { opacity: 0; transform: translateX(-22px); } }
@keyframes t-out { to   { opacity: 0; transform: translateX(-22px); } }

/* Modal */
.backdrop {
  position: fixed; inset: 0; z-index: 200; padding: var(--s-5);
  background: var(--overlay); backdrop-filter: blur(3px);
  display: none; align-items: center; justify-content: center;
}
.backdrop.open { display: flex; animation: fade-in .16s; }
@keyframes fade-in { from { opacity: 0; } }
.modal {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); box-shadow: var(--shadow-lg);
  width: 100%; max-width: 660px; max-height: 88vh;
  display: flex; flex-direction: column;
  animation: m-in .24s var(--ease-out);
}
@keyframes m-in { from { opacity: 0; transform: translateY(14px) scale(.985); } }
.modal.wide { max-width: 900px; }
.modal-head { display: flex; align-items: center; gap: var(--s-3); padding: var(--s-4) var(--s-5); border-bottom: 1px solid var(--border); }
.modal-head h3 { font-size: var(--fs-md); display: flex; align-items: center; gap: 8px; }
.modal-head h3 i { color: var(--brand-500); }
.modal-x {
  margin-inline-start: auto; width: 30px; height: 30px; border-radius: 8px;
  border: 1px solid var(--border); background: var(--surface-2);
  color: var(--text-muted); display: grid; place-items: center;
}
.modal-x:hover { color: var(--bad); border-color: var(--bad); }
.modal-body { padding: var(--s-4) var(--s-5); overflow-y: auto; }
.modal-foot { padding: var(--s-3) var(--s-5); border-top: 1px solid var(--border); display: flex; gap: 8px; justify-content: flex-end; }

/* پالت فرمان */
.cmdk { align-items: flex-start; padding-top: 12vh; }
.cmd-box {
  width: 100%; max-width: 560px; background: var(--surface);
  border: 1px solid var(--border-strong); border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg); overflow: hidden;
  animation: m-in .2s var(--ease-out);
}
.cmd-input-wrap { display: flex; align-items: center; gap: 10px; padding: var(--s-4); border-bottom: 1px solid var(--border); }
.cmd-input-wrap i { color: var(--text-muted); }
.cmd-input-wrap input {
  flex: 1; border: none; background: none; outline: none;
  font-family: inherit; font-size: var(--fs-md); color: var(--text);
}
.cmd-list { max-height: 380px; overflow-y: auto; padding: 6px; }
.cmd-item {
  width: 100%; display: flex; align-items: center; gap: 11px;
  padding: 9px 11px; border: none; background: none; border-radius: 9px;
  color: var(--text); font-size: var(--fs-sm); text-align: start;
}
.cmd-item:hover, .cmd-item.sel { background: var(--surface-3); }
.cmd-item > i { width: 16px; text-align: center; color: var(--brand-500); }
.cmd-item .meta { font-size: var(--fs-2xs); color: var(--text-muted); }
.cmd-item .right { margin-inline-start: auto; font-weight: 700; font-variant-numeric: tabular-nums; }
.cmd-group { font-size: var(--fs-2xs); color: var(--text-muted); padding: 8px 11px 4px; font-weight: 600; }
.cmd-empty { padding: 26px; text-align: center; color: var(--text-muted); font-size: var(--fs-sm); }

/* آپلود */
.drop {
  border: 2px dashed var(--border-strong); border-radius: var(--radius);
  padding: var(--s-8) var(--s-5); text-align: center;
  background: var(--surface-2); cursor: pointer;
  transition: border-color .18s, background .18s;
}
.drop:hover, .drop.over { border-color: var(--brand-500); background: var(--tint-brand); }
.drop i { font-size: 30px; color: var(--brand-500); margin-bottom: 9px; }
.drop .m { font-size: var(--fs-sm); font-weight: 600; }
.drop .s { font-size: var(--fs-xs); color: var(--text-muted); margin-top: 4px; }

.prog { height: 5px; border-radius: 99px; background: var(--surface-3); overflow: hidden; margin-top: var(--s-3); }
.prog > span {
  display: block; height: 100%; width: 0; border-radius: 99px;
  background-color: var(--brand-500); background-image: var(--sheen);
  transition: width .2s;
}

/* مسائل کیفیت داده */
.issue {
  display: flex; gap: var(--s-3); align-items: flex-start;
  padding: 12px 14px; border-radius: 11px;
  border: 1px solid var(--border); background: var(--surface-2); margin-bottom: 8px;
}
.issue.error   { border-color: rgba(209, 68, 63, .35);  background: var(--tint-bad); }
.issue.warning { border-color: rgba(209, 139, 31, .35); background: var(--tint-warn); }
.issue.ok      { border-color: rgba(24, 158, 138, .3);  background: var(--tint-ok); }
.issue > i { margin-top: 3px; }
.issue.error > i { color: var(--bad); }
.issue.warning > i { color: var(--warn); }
.issue.ok > i { color: var(--ok); }
.issue .m { font-size: var(--fs-sm); font-weight: 600; }
.issue .h { font-size: var(--fs-xs); color: var(--text-muted); margin-top: 3px; line-height: 1.6; }

/* حالت خالی و اسکلت */
.empty {
  padding: var(--s-8) var(--s-5); text-align: center; color: var(--text-muted);
  border: 1px dashed var(--border-strong); border-radius: var(--radius);
  background: var(--surface-2);
}
.empty i { font-size: 26px; margin-bottom: 9px; opacity: .5; display: block; }
.empty .t { font-size: var(--fs-sm); font-weight: 600; color: var(--text-secondary); }
.empty .s { font-size: var(--fs-xs); margin-top: 5px; line-height: 1.65; }

.skel {
  background: linear-gradient(90deg, var(--surface-2) 25%, var(--surface-3) 50%, var(--surface-2) 75%);
  background-size: 200% 100%; animation: shim 1.3s infinite;
  border-radius: var(--radius);
}
@keyframes shim { to { background-position: -200% 0; } }

/* پاورقی */
.footer {
  border-top: 1px solid var(--border); background: var(--surface);
  padding: var(--s-3) 0; font-size: var(--fs-xs); color: var(--text-muted);
}
.footer-inner { display: flex; align-items: center; gap: var(--s-3); flex-wrap: wrap; }
.footer .sp { opacity: .35; }

/* ============================================================
   ۱۰. حرکت و کورئوگرافی
   ============================================================ */
/* ورود پله‌ای کارت‌ها: هر کارت --i دارد و تأخیرش از آن می‌آید */
/*
 * تأخیر پلکانی سقف دارد. بدون min()، فهرستِ ۳۳تایی «همه‌ی شاخص‌ها»
 * ۱.۳ ثانیه طول می‌کشد تا کامل شود و صفحه انگار دارد خودش را
 * سرِ هم می‌کند. ده قدم برای حسِ ترتیب کافی است.
 */
.reveal { opacity: 0; animation: rise .5s var(--ease-out) forwards; animation-delay: calc(min(var(--i, 0), 10) * 38ms); }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

.reveal-fast { opacity: 0; animation: rise .38s var(--ease-out) forwards; animation-delay: calc(min(var(--i, 0), 12) * 22ms); }

/* تغییر تب: محتوا با یک لغزش کوتاه می‌آید */
.panel.active > * { animation: slide-in .3s var(--ease-out); }
@keyframes slide-in { from { opacity: 0; transform: translateY(8px); } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-delay: 0ms !important;
    transition-duration: .001ms !important;
  }
}

/* ============================================================
   ۱۱. واکنش‌گرایی
   ============================================================ */
@media (max-width: 1500px) {
  .bento.tiered > .tier-hero    { grid-column: span 6; }
  .bento.tiered > .tier-medium  { grid-column: span 4; }
  .bento.tiered > .tier-compact { grid-column: span 3; }
}

@media (max-width: 1180px) {
  .hero { grid-template-columns: 1fr; }
  .grid-2 { grid-template-columns: 1fr; }
  .header-status .hstat:nth-child(n+4) { display: none; }
}

@media (max-width: 900px) {
  .bento.tiered { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  .bento.tiered > .tier-hero    { grid-column: span 6; grid-row: span 2; }
  .bento.tiered > .tier-medium  { grid-column: span 3; }
  .bento.tiered > .tier-compact { grid-column: span 3; }
  .header-status { display: none; }
  .hbtn .label { display: none; }
  .user-pill .nm { display: none; }
  .cwrap { height: 250px; }
  .bullet, .slope-row, .wf-row { grid-template-columns: 104px 1fr auto; }
}

@media (max-width: 620px) {
  .container { padding: 0 var(--s-3); }
  .bento { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
  .bento > .kpi { min-height: 128px; }
  .bento.tiered { grid-template-columns: repeat(4, minmax(0, 1fr)); grid-auto-rows: 88px; }
  .bento.tiered > .tier-hero    { grid-column: span 4; }
  .bento.tiered > .tier-medium  { grid-column: span 2; }
  .bento.tiered > .tier-compact { grid-column: span 2; }
  .tier-hero .kpi-num { font-size: var(--fs-2xl); }
  .tier-medium .kpi-num { font-size: var(--fs-xl); }
  .tab { padding: 7px 11px; font-size: var(--fs-xs); }
  .tab .n { display: none; }
  .toasts { inset-inline: 12px; max-width: none; }
  .bullet .lbl, .slope-row .lbl { font-size: var(--fs-xs); }
}

/* ============================================================
   حالت نمایش (تمام‌صفحه برای مانیتور دفتر ریاست)
   ============================================================ */
body.tv { --header-h: 46px; }
body.tv .tabs, body.tv .footer, body.tv .chart-foot { display: none; }
body.tv .bento.tiered { grid-auto-rows: 116px; }
body.tv .bento > .kpi { min-height: 176px; }
body.tv .tier-hero .kpi-num { font-size: var(--fs-4xl); }
body.tv .tier-medium .kpi-num { font-size: var(--fs-3xl); }
body.tv .cwrap { height: 340px; }
body.tv .sec-head h3 { font-size: var(--fs-md); }
body.tv .panel { display: none; }
body.tv .panel.tv-show { display: block; }
