/* وزیرمتن لوکال (فونت متغیر — همهٔ وزن‌های ۱۰۰ تا ۱۰۰۰ در یک فایل)؛ جایگزین Google Fonts */
@font-face {
  font-family: "Vazirmatn";
  src: url("/assets/fonts/Vazirmatn-Variable.woff2") format("woff2-variations");
  font-weight: 100 1000;
  font-style: normal;
  font-display: swap;
}
/* فقط ده رقم: 0-9 (و ٠-٩ عربی) با شکلِ ۰-۹ وزیرمتن. روی فیلدهای ورودی جلوی
   وزیرمتن می‌نشیند — قاعده‌اش آخرِ همین فایل است. */
@font-face {
  font-family: "MK Fa Digits";
  src: url("/assets/fonts/MK-FaDigits.woff2") format("woff2-variations");
  font-weight: 100 1000;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0030-0039, U+0660-0669, U+06F0-06F9;
}

/* ═══════════ «MK Question» — خانوادهٔ ترکیبیِ متنِ سؤال ═══════════════════════
   یک نامِ خانوادگی که مرورگر برای هر کاراکتر از فایلِ درستش می‌خواند. همان
   قراردادی که دفترچه‌های کنکور دارند:

     حرف و متنِ فارسی      → ب نازنین
     صفرِ فارسی «۰»        → وزیرمتن  (صفرِ ب نازنین یک نقطه است — اندازه‌گیری:
                              ارتفاعِ «۰» در ب نازنین ۱۷ و در «۵» همان فونت ۵۸)
     حرف و عددِ لاتین، یونانی → XITS (خانوادهٔ Times؛ همان فونتی که دفترچهٔ کنکور با
                              XeLaTeX با آن حروف‌چینی می‌شود؛ g تک‌طبقه فقط با .mkg1)

   چرا XITS و نه خودِ Times New Roman: آن فونت مالِ Monotype است و هاست‌کردنش
   روی وب‌سرور مجاز نیست. جزئیات در assets/fonts/xits/README.txt

   ترتیب اعلام مهم است: وقتی چند @font-face از یک خانواده یک کاراکتر را پوشش
   می‌دهند، آخرین اعلام برنده است. پس فارسیِ ب نازنین اول می‌آید و صفرِ وزیرمتن
   آخر، تا فقط «۰» از آن خوانده شود.

   همه‌جا بدون local() و با font-display: swap: منبع فونت همیشه فایلِ خود سایت
   است، اما اگر فعال‌شدن یک face از لحظهٔ چاپ عقب افتاد، مرورگر به‌جای سفیدکردن
   متن آن را موقتاً با فونتِ بعدیِ زنجیره نشان می‌دهد. preloadهای index این حالت
   را در نمایش عادی تقریباً حذف می‌کنند؛ مهم‌تر اینکه PDF هیچ‌وقت متنِ نامرئی ندارد.
   منبع ب نازنین: assets/fonts/BNazanin-Credits.txt
   ═════════════════════════════════════════════════════════════════════════ */

/* ۱) فارسی/عربی → ب نازنین */
@font-face {
  font-family: "MK Question";
  src: url("/assets/fonts/BNazanin-Regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0600-06FF, U+0750-077F, U+200C-200D, U+FB50-FDFF, U+FE70-FEFF;
}
@font-face {
  font-family: "MK Question";
  src: url("/assets/fonts/BNazanin-Bold.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0600-06FF, U+0750-077F, U+200C-200D, U+FB50-FDFF, U+FE70-FEFF;
}

/* ۲) لاتین و یونانی → XITS. برشِ latin عمداً U+200C-200D را ندارد: نیم‌فاصله و
   اتصال‌دهنده باید دستِ فونتِ فارسی بماند وگرنه شکل‌گیریِ حروف به‌هم می‌ریزد. */
@font-face {
  font-family: "MK Question";
  src: url("/assets/fonts/xits/XITS-400-normal-latin.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC,
    U+0304, U+0308, U+0329, U+2000-200B, U+200E-206F, U+20AC, U+2122,
    U+2191, U+2193, U+2212, U+2215, U+FFFD;
}
@font-face {
  font-family: "MK Question";
  src: url("/assets/fonts/xits/XITS-400-normal-greek.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0370-0377, U+037A-037F, U+0384-038A, U+038C, U+038E-03A1, U+03A3-03FF;
}
@font-face {
  font-family: "MK Question";
  src: url("/assets/fonts/xits/XITS-400-italic-latin.woff2") format("woff2");
  font-weight: 400;
  font-style: italic;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC,
    U+0304, U+0308, U+0329, U+2000-200B, U+200E-206F, U+20AC, U+2122,
    U+2191, U+2193, U+2212, U+2215, U+FFFD;
}
@font-face {
  font-family: "MK Question";
  src: url("/assets/fonts/xits/XITS-400-italic-greek.woff2") format("woff2");
  font-weight: 400;
  font-style: italic;
  font-display: swap;
  unicode-range: U+0370-0377, U+037A-037F, U+0384-038A, U+038C, U+038E-03A1, U+03A3-03FF;
}
@font-face {
  font-family: "MK Question";
  src: url("/assets/fonts/xits/XITS-700-normal-latin.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC,
    U+0304, U+0308, U+0329, U+2000-200B, U+200E-206F, U+20AC, U+2122,
    U+2191, U+2193, U+2212, U+2215, U+FFFD;
}
@font-face {
  font-family: "MK Question";
  src: url("/assets/fonts/xits/XITS-700-normal-greek.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0370-0377, U+037A-037F, U+0384-038A, U+038C, U+038E-03A1, U+03A3-03FF;
}
@font-face {
  font-family: "MK Question";
  src: url("/assets/fonts/xits/XITS-700-italic-latin.woff2") format("woff2");
  font-weight: 700;
  font-style: italic;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC,
    U+0304, U+0308, U+0329, U+2000-200B, U+200E-206F, U+20AC, U+2122,
    U+2191, U+2193, U+2212, U+2215, U+FFFD;
}
@font-face {
  font-family: "MK Question";
  src: url("/assets/fonts/xits/XITS-700-italic-greek.woff2") format("woff2");
  font-weight: 700;
  font-style: italic;
  font-display: swap;
  unicode-range: U+0370-0377, U+037A-037F, U+0384-038A, U+038C, U+038E-03A1, U+03A3-03FF;
}

/* g پیش‌فرض همان گلیفِ دوطبقهٔ XITS است که با بقیهٔ لاتین می‌آید (U+0067 هیچ
   فیسِ جداگانه‌ای در «MK Question» ندارد). فرمِ تک‌طبقه یک انتخابِ «کلِ سؤال»
   است (q.gForm = "single")، نه حرف‌به‌حرف: renderStoredTextHtml روی تکه‌های
   سطحِ اولِ چنین سؤالی کلاسِ .mkg1 می‌گذارد و ویرایشگر همان کلاس را روی
   کادرهای تایپ. این خانوادهٔ جدا فقط U+0067 را دارد — گلیفِ upright U+0261 از
   طرحِ STIX که به U+0067 نگاشت شده — پس جلوی «MK Question» که بنشیند فقط g
   عوض می‌شود. همان گلیفِ ایستاده برای style مورب هم ثبت می‌شود، و نسخهٔ بولدِ
   واقعی جلوی ضخامتِ مصنوعیِ مرورگر را در صورتِ سؤال می‌گیرد. */
@font-face {
  font-family: "MK Question Single G";
  src: url("/assets/fonts/question-g/MKQuestionUprightG-Regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0067;
}
@font-face {
  font-family: "MK Question Single G";
  src: url("/assets/fonts/question-g/MKQuestionUprightG-Regular.woff2") format("woff2");
  font-weight: 400;
  font-style: italic;
  font-display: swap;
  unicode-range: U+0067;
}
@font-face {
  font-family: "MK Question Single G";
  src: url("/assets/fonts/question-g/MKQuestionUprightG-Bold.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0067;
}
@font-face {
  font-family: "MK Question Single G";
  src: url("/assets/fonts/question-g/MKQuestionUprightG-Bold.woff2") format("woff2");
  font-weight: 700;
  font-style: italic;
  font-display: swap;
  unicode-range: U+0067;
}

/* ۲٫۵) نقطه هرگز درشت نمی‌شود.
   صورتِ سؤال با وزنِ ۷۰۰ حروف‌چینی می‌شود و در XITS-Bold قطرِ جوهرِ «.» از
   ۱۱٫۱ به ۱۶٫۹ (در ۱۰۰px) می‌رسد — یک لکهٔ گرد که در «... است.» و در نقطه‌چینِ
   جای خالی، درشت‌تر از خودِ حروف دیده می‌شود. عرضِ پیش‌رَوی هر دو ۲۵ است، پس
   جانشینی چیدمان را ذره‌ای تکان نمی‌دهد.

   کلکِ کار در همان قاعدهٔ «آخرین اعلامِ هم‌وزن برنده است» است: این فیس خودش را
   وزنِ ۷۰۰ معرفی می‌کند (پس مرورگر بولدِ مصنوعی هم نمی‌سازد) ولی فایلش نسخهٔ
   Regular است. نتیجه: نقطه در متنِ بولد هم نازک می‌ماند، بدون یک بایت تغییر در
   HTMLِ ذخیره‌شده و بدون دست‌بردن در کِرسرِ ویرایشگر.
   دامنه عمداً فقط «.» و «…» است؛ گلولهٔ فهرست (•) و دونقطه دست‌نخورده می‌مانند. */
@font-face {
  font-family: "MK Question";
  src: url("/assets/fonts/xits/XITS-400-normal-latin.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
  unicode-range: U+002E, U+2026;
}
@font-face {
  font-family: "MK Question";
  src: url("/assets/fonts/xits/XITS-400-italic-latin.woff2") format("woff2");
  font-weight: 700;
  font-style: italic;
  font-display: swap;
  unicode-range: U+002E, U+2026;
}

/* ۳) و در آخر: صفرِ فارسی از وزیرمتن. وزیرمتن همین حالا برای پوستهٔ سایت لود
   شده، پس این جایگزینی یک بایت هم به صفحه اضافه نمی‌کند.

   نکتهٔ ظریفی که یک بار خوردیمش: این فیس حتماً باید وزنِ **ثابت** بگیرد. با
   `font-weight: 100 1000` (شکلِ طبیعیِ یک فونت متغیر) کروم آن را برندهٔ مرحلهٔ
   تطبیقِ وزن می‌کند و بعد unicode-range بقیهٔ فیس‌ها را نادیده می‌گیرد — نتیجه
   اینکه کلِ لاتین و همهٔ ارقام هم وزیرمتن می‌شدند و XITS هیچ‌وقت دیده نمی‌شد.
   با وزنِ ثابت، تفکیکِ کاراکتری دقیقاً همان می‌شود که انتظار داریم (سنجیده شد). */
@font-face {
  font-family: "MK Question";
  src: url("/assets/fonts/Vazirmatn-Variable.woff2") format("woff2-variations");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
  unicode-range: U+06F0, U+0660;
}
@font-face {
  font-family: "MK Question";
  src: url("/assets/fonts/Vazirmatn-Variable.woff2") format("woff2-variations");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
  unicode-range: U+06F0, U+0660;
}

/* نامِ «B Nazanin» هم مستقل می‌ماند: شمارهٔ سؤالِ دفترچهٔ کنکوری از قبل به آن
   ارجاع می‌داد و آنجا ترکیبِ چندفونتی لازم نیست. */
@font-face {
  font-family: "B Nazanin";
  src: url("/assets/fonts/BNazanin-Regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "B Nazanin";
  src: url("/assets/fonts/BNazanin-Bold.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #f7f6f2;
  --panel: #fff;
  --panel-soft: #fbfaf7;
  --ink: #25231f;
  --muted: #827e75;
  --line: #ebe8e0;
  --orange: #ff6b18;
  --orange-soft: #fff0e7;
  --teal: #1aa392;
  --teal-soft: #e9f8f5;
  --blue: #4676e8;
  --blue-soft: #edf3ff;
  --purple: #8664d8;
  --purple-soft: #f2edff;
  --red: #de5a5a;
  --red-soft: #fff0f0;
  --yellow: #d9a52b;
  --yellow-soft: #fff8df;
  --shadow: 0 12px 32px rgba(41, 36, 29, 0.065);
  --radius: 18px;
  --rb-navy: #26384a;
  --rb-navy-soft: #edf1f4;
  --rb-paper: #fbfaf7;
  --rb-border: #e7e1d7;

  /* فونتِ متنِ سؤال. جدا از فونتِ پوسته نگه داشته می‌شود تا دکمه‌ها، منوها و
     جدول‌های مدیریتی وزیرمتن بمانند و فقط خودِ سؤال ب نازنین شود. */
  --q-font: "MK Question", "B Nazanin", "Vazirmatn", Tahoma, sans-serif;
  /* همان زنجیره برای سؤالی که g تک‌طبقه خواسته (.mkg1)؛ فقط U+0067 عوض می‌شود. */
  --q-font-g1: "MK Question Single G", "MK Question", "B Nazanin", "Vazirmatn", Tahoma, sans-serif;
  /* ب نازنین «بدنهٔ» بسیار کوچکی نسبت به em دارد. اندازه‌گیریِ ارتفاعِ گلیف در
     همین پروژه: بدنهٔ «ب» ۱٫۲۵ برابر، «س» ۱٫۲۰ برابر، رقم ۱٫۱۳ برابر و الف
     ۱٫۱۰ برابر باید بزرگ‌تر شود تا هم‌اندازهٔ وزیرمتن دیده شود. ۱٫۲۲ وسطِ
     بازهٔ بدنهٔ حروف است — همان چیزی که چشم موقع خواندن می‌سنجد. */
  --q-scale: 1.22;
  /* اندازهٔ متنِ سؤالِ تایپی روی صفحه، هم‌ارزِ ۱۴ در Word (۱۸٫۶۷px). ۲۲px دو
     پله درشت‌تر بود. اندازهٔ دلخواهِ نویسنده (data-mk-size) نسبت به همین است. */
  --q-text-size: 14pt;
  --q-ink: #000;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  /* پس‌زمینه تخت است: واشِ نارنجیِ رادیالِ گوشهٔ بالا برداشته شد (خواستهٔ کاربر:
     «رنگ نارنجی را در پس‌زمینهٔ پنل هیچ‌جا نبینم»). */
  background: var(--bg);
  color: var(--ink);
  font-family: "Vazirmatn", Tahoma, sans-serif;
  font-size: 14px;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  color: inherit;
}

[hidden] {
  display: none !important;
}

.app-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 244px minmax(0, 1fr);
}

.sidebar-backdrop { display: none; }
.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  z-index: 20;
  background: rgba(252, 251, 248, 0.92);
  backdrop-filter: blur(18px);
  border-left: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  padding: 22px 14px 14px;
  overflow-y: auto;            /* وقتی آیتم‌ها از ارتفاع صفحه بیشتر شوند، اسکرول شود */
  overscroll-behavior: contain;
}
.sidebar::-webkit-scrollbar { width: 7px; }
.sidebar::-webkit-scrollbar-thumb { background: rgba(120,110,95,.28); border-radius: 6px; }

/* منوی مدیر مستقل از ارتفاع و اسکرول محتوای صفحه به پنجره متصل می‌ماند. */
@media (min-width: 821px) {
  .app-shell > #sidebar {
    position: fixed;
    inset-block: 0;
    inset-inline-start: 0;
    width: 244px;
    height: 100vh;
    height: 100dvh;
    max-height: 100dvh;
    min-height: 0;
    overflow-x: hidden;
    overflow-y: auto;
  }
  .app-shell > #sidebar > * { flex-shrink: 0; }
  .app-shell:not(.question-focus) > #sidebar + .main { grid-column: 2; }
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 9px 24px;
}

/* لاکاپ نوار کناری، هم‌قاعده با کارت ورود (نگاه کن به .auth-brand):
   لوگوتایپ باید در پشتهٔ خودش عنصرِ غالب باشد. قبلاً لوگوتایپ ۵۵px بود و
   زیرنویسِ «پنل مدیریت محتوا» ۷۹px — یعنی پهن‌ترین چیزِ بلوک، همان کم‌اهمیت‌ترین
   عنصرش بود و نامِ برند مثل برچسبی روی آن دیده می‌شد. با ۳۰px، لوگوتایپ ۶۶٫۵
   می‌شود و پشته را رهبری می‌کند. نشان هم بزرگ‌تر شد تا از لوگوتایپ بلندتر بماند
   (تودهٔ تُوپُرِ سبز در ارتفاعِ برابر، خطوطِ نازکِ طلایی را می‌بلعد). */
.brand-copy {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* گزینشگر باید از `.brand span` (0,1,1) قوی‌تر باشد وگرنه خط‌کش
   font-size/color/margin-topِ زیرنویس را می‌گیرد. */
.brand .brand-rule {
  display: block;
  width: 1px;
  height: 40px;
  flex: 0 0 1px;
  margin: 0;
  background: #ddd6c8;
}

/* نشان برند: خودِ لوگو می‌نشیند، بدون کاشیِ رنگی پشتش */
.brand-mark {
  width: 50px;
  height: 37.5px;
  flex: 0 0 50px;
  display: grid;
  place-items: center;
}

.brand-mark > img,
.brand-mark > svg {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

/* لوگوتایپ «آقای کنکور»: چون <img> است، فقط ارتفاع تعیین‌کننده است.
   رنگش داخل خود فایل currentColor است و در <img> به مشکیِ پیش‌فرض می‌نشیند —
   یعنی از بیرون رنگ‌پذیر نیست؛ برای رنگِ دیگر باید SVG را درون‌خطی کرد. */
.brand-type {
  display: block;
  width: auto;
  height: 30px;
  object-fit: contain;
}

.brand strong,
.brand span {
  display: block;
}

.brand strong {
  font-size: 16px;
}

.brand span {
  font-size: 11px;
  color: var(--muted);
  margin-top: 2px;
}

.nav-section {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.nav-label {
  color: #aaa59a;
  font-size: 10px;
  font-weight: 700;
  padding: 18px 13px 7px;
}

.nav-item {
  border: 0;
  background: transparent;
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  height: 42px;
  padding: 0 12px;
  border-radius: 12px;
  color: #68645c;
  cursor: pointer;
  text-align: right;
  transition: 0.18s ease;
}

.nav-item:hover {
  background: #f2f0ea;
  color: var(--ink);
}

.nav-item.active {
  background: var(--orange-soft);
  color: #df580d;
  font-weight: 700;
}

.nav-icon {
  width: 19px;
  height: 19px;
  flex: 0 0 auto;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.ui-icon {
  width: 17px;
  height: 17px;
  display: inline-block;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  vertical-align: middle;
  pointer-events: none;
}

button > .ui-icon { flex: 0 0 auto; }

/* Icon-only controls use explicit flex alignment and no native button padding.
   Safari's button defaults and SVG grid alignment must not shift the artwork
   inside the fixed-size hit target, including in RTL layouts. */
:where(.icon-button, .topbar-icon, .sq-card-pen, .exam-iconbtn, .er-iconbtn,
       .er-eye, .er-phone-btn, .sqf-btn, .modal-close, .row-action) {
  -webkit-appearance: none;
  appearance: none;
  padding: 0;
}
:where(.icon-button, .topbar-icon, .sq-card-pen, .exam-iconbtn, .er-iconbtn,
       .er-eye, .er-phone-btn, .sqf-btn, .modal-close, .row-action, .er-info-row i) > :is(svg, img) {
  display: block;
  flex: none;
}

.primary-button,
.secondary-button,
.ghost-button,
.danger-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.nav-count {
  margin-right: auto;
  background: #f0eee8;
  color: #817d73;
  border-radius: 20px;
  font-size: 10px;
  padding: 2px 7px;
}

.nav-count.warning {
  color: #b16f00;
  background: var(--yellow-soft);
}

.progress {
  background: #ece9e2;
  height: 5px;
  border-radius: 10px;
  margin: 8px 0 5px;
  overflow: hidden;
}

.progress span {
  display: block;
  height: 100%;
  background: var(--orange);
  border-radius: inherit;
}

.profile-card {
  width: 100%;
  background: white;
  border: 1px solid var(--line);
  border-radius: 14px;
  margin-top: 16px;
  padding: 9px;
  display: flex;
  align-items: center;
  gap: 9px;
  cursor: pointer;
}

.avatar {
  width: 34px;
  height: 34px;
  border-radius: 11px;
  background: #26241f;
  color: white;
  display: grid;
  place-items: center;
  font-size: 11px;
  overflow: hidden;
  flex: none;
}

.avatar-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: inherit;
}

.avatar-empty {
  width: 100%;
  height: 100%;
  display: block;
}

/* برش آواتار با نسبت ۱:۱ (سبک اینستاگرام: جابه‌جایی + بزرگ‌نمایی) */
.avatar-crop-backdrop {
  position: fixed;
  inset: 0;
  /* This editor is portalled to <body>, while the admin/profile form lives
     inside .modal-root (z-index: 100000). Keep the cropper above that root,
     but below system toasts (100060), so it remains usable from a modal. */
  z-index: 100040;
  display: grid;
  place-items: center;
  background: rgba(20, 18, 15, 0.55);
  padding: 20px;
}

.avatar-cropper {
  position: relative;
  margin: 0 auto 14px;
  border-radius: 22px;
  overflow: hidden;
  background: #111;
  cursor: grab;
  touch-action: none;
  user-select: none;
}

.avatar-cropper:active {
  cursor: grabbing;
}

.avatar-cropper img {
  position: absolute;
  top: 0;
  left: 0;
  transform-origin: 0 0;
  max-width: none;
  -webkit-user-drag: none;
  user-select: none;
  pointer-events: none;
}

.avatar-cropper-ring {
  position: absolute;
  inset: 0;
  pointer-events: none;
  border-radius: 22px;
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.65);
}

.av-zoom {
  display: flex;
  align-items: center;
  gap: 12px;
  max-width: 300px;
  margin: 0 auto 8px;
  color: var(--muted);
}

.av-zoom input[type="range"] {
  flex: 1;
}

.avatar.avatar-lg {
  width: 72px;
  height: 72px;
  border-radius: 20px;
  font-size: 22px;
}

/* ویرایشگر آواتار در فرم پروفایل/مدیر */
.avatar-edit {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 6px;
}

.avatar-edit .avatar-actions {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.avatar-edit .avatar-actions button {
  font-size: 11px;
  padding: 6px 12px;
}

.receipt-thumb {
  height: 32px;
  border-radius: 6px;
  border: 1px solid var(--line);
  cursor: pointer;
}

.profile-card strong,
.profile-card small {
  display: block;
  text-align: right;
}

.profile-card strong {
  font-size: 11px;
}

.profile-card small {
  font-size: 9px;
  color: var(--muted);
}

.profile-card .chevron {
  margin-right: auto;
}

.main {
  min-width: 0;
}

.topbar {
  height: 72px;
  display: flex;
  align-items: center;
  padding: 0 30px;
  gap: 18px;
  border-bottom: 1px solid rgba(229, 226, 218, 0.8);
  background: rgba(247, 246, 242, 0.72);
  backdrop-filter: blur(18px);
  position: sticky;
  top: 0;
  z-index: 45;
}

/* آیکون ذره‌بینِ باکس‌های جست‌وجو — از همان اسپرایتِ SVG (#icon-search).
   نسخهٔ قبلی با border/::after کشیده می‌شد و در RTL دستهٔ ذره‌بین جدا می‌افتاد. */
.search-glyph {
  width: 15px;
  height: 15px;
  flex: 0 0 auto;
  color: #9a938a;
  stroke-width: 2;
  transition: color .15s ease;
}
.question-code-search:focus-within .search-glyph,
.audit-search-box:focus-within .search-glyph {
  color: var(--orange);
}

.icon-button,
.primary-button,
.secondary-button,
.ghost-button,
.danger-button {
  border: 0;
  cursor: pointer;
  transition: 0.18s ease;
}

.icon-button {
  width: 39px;
  height: 39px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: white;
  display: inline-flex;
  align-items: center; justify-content: center;
}

.icon-button:hover,
.secondary-button:hover {
  border-color: #d8d3c7;
  transform: translateY(-1px);
}

.primary-button,
.secondary-button,
.ghost-button,
.danger-button {
  height: 40px;
  padding: 0 15px;
  border-radius: 11px;
  font-weight: 700;
}

.primary-button {
  color: white;
  background: var(--orange);
  box-shadow: 0 8px 18px rgba(255, 107, 24, 0.18);
}

.primary-button:hover {
  background: #ed5d0d;
  transform: translateY(-1px);
}

.secondary-button {
  background: white;
  border: 1px solid var(--line);
}

.ghost-button {
  background: transparent;
  color: var(--muted);
}

.ghost-button:hover {
  background: #f3f1eb;
  color: var(--ink);
}

.danger-button {
  color: var(--red);
  background: var(--red-soft);
}

.content {
  padding: 28px 30px 60px;
  max-width: 1500px;
  margin: 0 auto;
}

.page-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 24px;
}

.eyebrow {
  color: var(--orange);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.03em;
}

.page-head h1 {
  margin: 4px 0 5px;
  font-size: 27px;
  letter-spacing: -0.04em;
}

.page-head p {
  margin: 0;
  color: var(--muted);
}

.head-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.folder-navigation {
  min-height: 38px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 20px;
}

.breadcrumbs {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 0;
  color: var(--muted);
  font-size: 12px;
  min-width: 0;
  flex-wrap: wrap;
}

.breadcrumbs button {
  border: 0;
  background: transparent;
  cursor: pointer;
  color: inherit;
  padding: 0;
}

.breadcrumbs button:hover {
  color: var(--orange);
}

.breadcrumbs strong {
  color: var(--ink);
  font-weight: 800;
}

.breadcrumb-arrow {
  width: 14px;
  height: 14px;
  fill: none;
  stroke: #aaa49a;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex: 0 0 auto;
}

.folder-back-button {
  border: 1px solid var(--line);
  border-radius: 10px;
  min-height: 34px;
  padding: 0 10px;
  background: #fff;
  color: var(--muted);
  display: inline-flex;
  align-items: center;
  gap: 5px;
  cursor: pointer;
  white-space: nowrap;
}

.folder-back-button:hover {
  color: var(--orange);
  border-color: #efb088;
}

.folder-back-button .ui-icon {
  transform: rotate(180deg);
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 13px;
  margin-bottom: 26px;
}

.stat-card {
  background: rgba(255, 255, 255, 0.84);
  border: 1px solid rgba(232, 228, 218, 0.85);
  border-radius: var(--radius);
  padding: 17px;
  display: flex;
  gap: 13px;
  align-items: center;
  box-shadow: 0 5px 18px rgba(45, 38, 28, 0.03);
}

.stat-card.clickable {
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}
.stat-card.clickable:hover {
  transform: translateY(-2px);
  border-color: var(--orange);
  box-shadow: 0 10px 26px rgba(45, 38, 28, 0.1);
}
.stat-card.clickable:active { transform: translateY(0); }

.stat-icon {
  width: 43px;
  height: 43px;
  border-radius: 14px;
  display: grid;
  place-items: center;
}

.stat-icon .ui-icon {
  width: 21px;
  height: 21px;
}

.stat-icon svg {
  width: 22px;
  height: 22px;
  max-width: 22px;
  max-height: 22px;
  stroke-width: 1.8;
}

.tone-orange .stat-icon { background: var(--orange-soft); color: var(--orange); }
.tone-teal .stat-icon { background: var(--teal-soft); color: var(--teal); }
.tone-yellow .stat-icon { background: var(--yellow-soft); color: var(--yellow); }
.tone-purple .stat-icon { background: var(--purple-soft); color: var(--purple); }

.stat-copy small,
.stat-copy strong {
  display: block;
}

.stat-copy small {
  color: var(--muted);
  font-size: 10px;
}

.stat-copy strong {
  font-size: 22px;
  margin-top: 2px;
}

.stat-delta {
  margin-right: auto;
  font-size: 9px;
  color: var(--teal);
  align-self: flex-end;
}

.panel {
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.panel + .panel {
  margin-top: 18px;
}

.panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 64px;
  padding: 12px 19px;
  border-bottom: 1px solid var(--line);
  gap: 16px;
}

.panel-title {
  display: flex;
  align-items: center;
  gap: 9px;
}

.panel-title h2,
.panel-title h3 {
  font-size: 15px;
  margin: 0;
}

.panel-title .count {
  color: var(--muted);
  background: #f2f0eb;
  border-radius: 20px;
  padding: 2px 8px;
  font-size: 10px;
}

.panel-tools {
  display: flex;
  align-items: center;
  gap: 7px;
}

.mini-search {
  width: 220px;
  height: 36px;
  border-radius: 10px;
  border: 1px solid var(--line);
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 0 10px;
  background: white;
}

.mini-search input {
  border: 0;
  outline: 0;
  min-width: 0;
  width: 100%;
}

.mini-search:focus-within {
  border-color: #f2a562;
  box-shadow: 0 0 0 3px rgba(255, 101, 25, .1);
}

.questions-panel-head {
  align-items: center;
}

/* نوار انتخاب گروهی سؤال (مخزن و صف بازبینی) */
.selection-bar {
  gap: 12px;
  flex-wrap: wrap;
}

.selection-summary {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.selection-bar .link-button {
  background: none;
  border: 0;
  padding: 0;
  font: inherit;
  font-size: 11px;
  font-weight: 700;
  color: var(--orange);
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.selection-bar .link-button:hover {
  color: #c04f0d;
}

/* «پاک‌کردن انتخاب» عملِ اصلی نیست؛ هم‌رنگِ پیشنهادِ انتخاب نباشد تا دو لینک
   کنار هم به‌چشم یک عبارت نیایند. */
.selection-summary .link-button + .link-button::before {
  content: "-";
  margin-inline: 8px;
  color: var(--line, #ece7dd);
  text-decoration: none;
  display: inline-block;
}

.selection-bar .link-button[data-clear-selection] {
  color: var(--muted, #8d8579);
}

.selection-bar .link-button[data-clear-selection]:hover {
  color: #3c372f;
}

/* مودال انتقال گروهی به پوشهٔ دیگر */
/* بلوکِ این مودال پیش از `.question-code-search` می‌آید، پس عرضِ ۳۹۰ پیکسلیِ
   آن با هم‌وزنیِ گزینشگرها برنده می‌شد؛ دو کلاس با هم، عرضِ کامل را قطعی می‌کند. */
.question-code-search.bmove-search {
  width: 100%;
}

.bmove-list {
  display: grid;
  gap: 6px;
  max-height: 42vh;
  overflow-y: auto;
  padding: 2px;
}

.bmove-row {
  display: grid;
  grid-template-columns: 18px 12px minmax(0, 1fr) auto;
  align-items: center;
  gap: 9px;
  padding: 8px 11px;
  border: 1px solid var(--line, #ece7dd);
  border-radius: 10px;
  background: #fff;
  cursor: pointer;
  transition: 0.15s ease;
}

.bmove-row:hover {
  border-color: #efc39f;
  background: #fffaf4;
}

.bmove-row:has(input:checked) {
  border-color: var(--orange, #ff6718);
  background: #fff6ef;
}

.bmove-row input {
  width: 15px;
  height: 15px;
  accent-color: var(--orange, #ff6718);
  cursor: pointer;
}

.bmove-dot {
  width: 11px;
  height: 11px;
  border-radius: 4px;
  background: var(--folder-color, #f4a261);
}

.bmove-copy {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.bmove-copy b {
  font-size: 12px;
  font-weight: 750;
  color: #3c372f;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.bmove-copy small {
  font-size: 9.5px;
  font-weight: 700;
  color: var(--muted, #8d8579);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.bmove-count {
  font-size: 9.5px;
  font-weight: 700;
  color: var(--muted, #8d8579);
  white-space: nowrap;
}

.bmove-row.is-origin .bmove-count {
  color: #c06a25;
}

/* مودال ادغام سؤال تکراری — همان ردیفِ انتخاب، بدون نقطهٔ رنگیِ پوشه */
.bmove-row.qmerge-pick {
  grid-template-columns: 18px minmax(0, 1fr) auto;
}

/* دو کارتِ مقایسه کنار هم؛ روی مودالِ باریک زیر هم می‌روند. */
.qmerge-preview {
  display: grid;
  gap: 12px;
  margin-top: 14px;
}

.qmerge-preview:empty {
  margin-top: 0;
}

@media (min-width: 900px) {
  .qmerge-preview:has(.qmerge-preview-col + .qmerge-preview-col) {
    grid-template-columns: 1fr 1fr;
  }
}

.qmerge-preview-col {
  min-width: 0;
}

.qmerge-preview-title {
  margin: 0 0 8px;
  font-size: 11px;
  font-weight: 800;
  color: var(--muted, #8d8579);
}

.qmerge-preview-title small {
  font-weight: 700;
  color: #c06a25;
}

.qmerge-preview-col.is-dup .qmerge-preview-title {
  color: #c06a25;
}

/* پوشه‌های حضور در جزئیات سؤال: خانه پررنگ، میهمان‌ها کم‌رنگ‌تر */
.qmerge-folder + .qmerge-folder::before {
  content: "،";
  margin-inline-end: 3px;
  color: var(--muted, #8d8579);
}

.qmerge-folder.is-guest {
  font-weight: 650;
  color: #c06a25;
}

.qmerge-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 7px 0;
  border-bottom: 1px dashed var(--line, #ece7dd);
}

.qmerge-row:last-child {
  border-bottom: 0;
}

.qmerge-row-copy {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.qmerge-row-copy b {
  font-size: 11.5px;
  font-weight: 750;
  direction: ltr;
  text-align: right;
}

.qmerge-row-copy small {
  font-size: 9.5px;
  font-weight: 700;
  color: var(--muted, #8d8579);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* نشانِ «این سؤال در چند پوشهٔ دیگر هم هست» کنارِ نامِ پوشه در جدول مخزن */
.q-guest-folders {
  margin-inline-start: 4px;
  padding: 0 4px;
  border-radius: 5px;
  background: #fff1e4;
  color: #c06a25;
  font-size: 9px;
  font-weight: 800;
}

.question-code-search {
  width: min(390px, 100%);
  height: 38px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: #fff;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 11px;
}

.question-code-search:focus-within {
  border-color: #f0a77e;
  box-shadow: 0 0 0 3px var(--orange-soft);
}

.question-code-search input {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  font-size: 10px;
}

.question-filter-panel {
  padding: 11px 16px 13px;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, #fbfaf7, #fff);
}

.question-filter-title,
.question-filter-title > span {
  display: flex;
  align-items: center;
}

.question-filter-title {
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 9px;
}

.question-filter-title > span {
  gap: 7px;
}

.question-filter-title .ui-icon {
  width: 18px;
  height: 18px;
  color: var(--orange);
}

.question-filter-title strong {
  font-size: 13px;
}

.question-filter-title b {
  padding: 4px 9px;
  border-radius: 20px;
  background: var(--orange-soft);
  color: #c9510c;
  font-size: 10px;
}

/* نشانِ کارِ عقب‌مانده: «N سؤال بدون برچسب» — یک کلیک، همان فیلتر را می‌گیرد */
.untagged-flag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 12px;
  border: 1px solid #f0d3a4;
  border-radius: 20px;
  background: #fff8ec;
  color: #a8641a;
  font: inherit;
  font-size: 11px;
  font-weight: 750;
  cursor: pointer;
  transition: background .14s ease, border-color .14s ease, color .14s ease;
}
.untagged-flag:hover { border-color: #e2ac5e; background: #fdefd8; }
.untagged-flag.on { border-color: #d98f28; background: #f7dfb5; color: #7d4708; }
.untagged-flag .ui-icon { width: 15px; height: 15px; color: #d38b23; }
.untagged-flag b { padding: 0; border-radius: 0; background: none; color: inherit; font-size: 12px; }
/* نقطهٔ کنارِ کدِ سؤال، برای دیده‌شدنِ سؤال بی‌برچسب حین مرور فهرست */
.q-untagged-dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  margin-inline-start: 5px;
  border-radius: 50%;
  background: #e8a33d;
  vertical-align: middle;
}

/* دوازده فیلتر، همیشه دقیقاً دو ردیفِ شش‌تایی */
.question-filter-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(132px, 1fr));
  gap: 10px 9px;
}

.question-filter-grid label {
  min-width: 0;
}

.question-filter-grid label > span {
  display: block;
  margin: 0 3px 5px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
}

.question-filter-grid .select-control {
  width: 100%;
  height: 36px;
  min-width: 0;
  font-size: 11px;
}

/* قوارهٔ فشردهٔ کنترل‌ها فقط در همین نوار (نه در نوارهای فیلترِ دیگر) */
.question-filter-grid .ms-label {
  margin: 0 3px 5px;
}

.question-filter-grid .ms-trigger {
  min-height: 36px;
  padding: 5px 10px;
  border-radius: 9px;
}

/* ── فیلتر چندانتخابی ─────────────────────────────── */
.ms-filter {
  position: relative;
  min-width: 0;
}

.ms-label {
  display: flex;
  align-items: center;
  gap: 5px;
  margin: 0 3px 5px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
}

.ms-label b {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 17px;
  height: 17px;
  padding: 0 5px;
  border-radius: 20px;
  background: var(--orange-soft);
  color: #c9510c;
  font-size: 10px;
}

.ms-trigger {
  display: flex;
  align-items: center;
  gap: 6px;
  width: 100%;
  min-height: 34px;
  min-width: 0;
  padding: 5px 9px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #fff;
  cursor: pointer;
  text-align: right;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.ms-trigger:hover {
  border-color: #d8d2c6;
}

.ms-filter.open .ms-trigger {
  border-color: var(--orange);
  box-shadow: 0 0 0 3px rgba(242, 162, 93, 0.18);
}

.ms-ph {
  flex: 1;
  color: #a8a298;
  font-size: 11px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ms-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  flex: 1;
  min-width: 0;
}

.ms-chip {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 2px 4px 2px 7px;
  border-radius: 7px;
  background: #f1f5f3;
  color: #2d766d;
  font-size: 9px;
  font-weight: 700;
}

.ms-chip-x {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(45, 118, 109, 0.14);
  color: inherit;
  cursor: pointer;
}

.ms-chip-x svg {
  width: 9px;
  height: 9px;
}

.ms-chip-x:hover {
  background: rgba(200, 78, 8, 0.18);
  color: #c84e08;
}

.ms-caret {
  display: inline-flex;
  margin-inline-start: auto;
  color: var(--muted);
  transition: transform 0.18s ease;
}

.ms-caret svg {
  width: 15px;
  height: 15px;
}

.ms-filter.open .ms-caret {
  transform: rotate(180deg);
}

/* پاپ‌اوور پهن‌تر از ستونِ خودش می‌شود تا نامِ بلند (ایجادکننده، برچسب) در یک
   سطر بخواند و نشکند؛ لنگرش لبهٔ راستِ فیلتر است و به چپ باز می‌شود. */
.ms-pop {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  left: auto;
  min-width: 100%;
  width: max-content;
  max-width: 300px;
  z-index: 50;
  display: none;
  padding: 7px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: #fff;
  box-shadow: 0 14px 34px rgba(40, 33, 22, 0.16);
}

.ms-filter.open .ms-pop {
  display: block;
}

.ms-search {
  padding: 2px 2px 6px;
}

.ms-search input {
  width: 100%;
  height: 33px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fbfaf7;
  font-size: 11px;
  font-family: inherit;
}

.ms-search input:focus {
  outline: none;
  border-color: var(--orange);
}

.ms-options {
  max-height: 240px;
  overflow-y: auto;
}

.ms-opt {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 9px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 12px;
  color: #4d4840;
}

.ms-opt:hover {
  background: #faf7f1;
}

.ms-opt.on {
  background: #f1f8f6;
  color: #2d766d;
  font-weight: 700;
}

.ms-opt input {
  width: 15px;
  height: 15px;
  margin: 0;
  accent-color: var(--orange);
  cursor: pointer;
}

.ms-opt span {
  flex: 1;
  min-width: 0;
}

/* دو ستونِ سمتِ چپِ هر ردیف برعکس باز می‌شوند، وگرنه از لبهٔ صفحه بیرون می‌زنند */
.question-filter-grid > :nth-child(6n) .ms-pop,
.question-filter-grid > :nth-child(6n - 1) .ms-pop {
  right: auto;
  left: 0;
}

.ms-opt small {
  min-width: 26px;
  padding: 2px 7px;
  border-radius: 20px;
  background: #f3efe7;
  color: #938b7f;
  font-size: 10px;
  font-weight: 750;
  text-align: center;
}

.ms-opt.on small { background: #dfeeea; color: #2d766d; }
.ms-opt[data-depth="0"] {
  margin-top: 3px;
  background: #faf8f3;
  color: #39342d;
  font-weight: 800;
}
.ms-opt[data-depth="1"] { padding-inline-start: 26px; }
.ms-opt[data-depth="2"] { padding-inline-start: 40px; }
.ms-opt[data-depth="3"] { padding-inline-start: 54px; }

.ms-empty {
  margin: 0;
  padding: 14px;
  text-align: center;
  color: var(--muted);
  font-size: 11px;
}

/* ── باکس فیلترهای انتخاب‌شده ─────────────────────── */
.filter-summary {
  margin-top: 12px;
  padding: 10px 12px;
  border: 1px solid #ece6da;
  border-radius: 12px;
  background: #fbf8f2;
}

.filter-summary-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 9px;
}

.filter-summary-head > span {
  display: flex;
  align-items: center;
  gap: 6px;
  color: #6a6359;
  font-size: 12px;
  font-weight: 700;
}

.filter-summary-head .ui-icon {
  width: 16px;
  height: 16px;
  color: var(--orange);
}

.filter-summary-head > span b {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 19px;
  height: 19px;
  padding: 0 6px;
  border-radius: 20px;
  background: var(--orange-soft);
  color: #c9510c;
  font-size: 11px;
}

.filter-summary-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.fs-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 6px 5px 10px;
  border: 1px solid #e7e1d5;
  border-radius: 10px;
  background: #fff;
  font-size: 12px;
  font-weight: 700;
  color: #4d4840;
}

.fs-chip > i {
  font-style: normal;
  font-size: 10px;
  font-weight: 700;
  color: #a59a88;
}

.fs-chip > span {
  color: #2d766d;
}

.fs-chip-x {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: #f0eee8;
  color: #8a8377;
  cursor: pointer;
}

.fs-chip-x svg {
  width: 12px;
  height: 12px;
}

.fs-chip-x:hover {
  background: var(--orange-soft);
  color: #c84e08;
}

.folder-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  padding: 17px;
}

.folder-grid.list-view {
  grid-template-columns: 1fr;
  gap: 6px;
  padding: 14px 17px 17px;
}

/* ---- ردیف فهرستی پوشه ---- */
.folder-row {
  display: grid;
  grid-template-columns: 30px minmax(120px, 1fr) auto 116px auto;
  align-items: center;
  gap: 14px;
  min-height: 52px;
  padding: 8px 12px 8px 10px;
  border-radius: 12px;
}

.folder-row.is-orderable {
  cursor: pointer;
}

.folder-row:hover {
  transform: none;
  box-shadow: 0 5px 16px rgba(79, 58, 38, 0.07);
}

.folder-row.dragging {
  cursor: grabbing;
}

.folder-row .folder-icon {
  width: 30px;
  height: 25px;
  border-radius: 6px 6px 8px 8px;
  box-shadow: inset 0 -4px 9px rgba(0, 0, 0, 0.06);
}

.folder-row .folder-icon::before {
  width: 14px;
  height: 5px;
  top: -4px;
  right: 2px;
}

.frow-title {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  min-width: 0;
}

.frow-name {
  display: flex;
  align-items: center;
  gap: 7px;
  max-width: 100%;
}

.folder-row h3 {
  margin: 0;
  padding: 0;
  min-width: 0;
  font-size: 12.5px;
  font-weight: 750;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.folder-row .folder-archive-badge {
  margin: 0;
  flex: none;
}

.frow-stats {
  display: grid;
  grid-template-columns: repeat(3, 76px);
  align-items: center;
}

.frow-stats.no-files {
  grid-template-columns: repeat(2, 76px);
}

.frow-stat {
  display: inline-flex;
  align-items: baseline;
  gap: 4px;
  min-width: 0;
  font-size: 9.5px;
  color: #918a7d;
  white-space: nowrap;
}

.frow-stat b {
  font-size: 11.5px;
  font-weight: 800;
  color: #4b453c;
  font-feature-settings: "ss01";
}

.frow-stat.is-zero b {
  color: #bdb6a9;
  font-weight: 700;
}

.frow-stat i {
  font-style: normal;
}

.frow-time {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-width: 0;
  font-size: 9.5px;
  color: #9a958b;
  white-space: nowrap;
}

.frow-time > span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.frow-time .ui-icon {
  flex: none;
  width: 12px;
  height: 12px;
  opacity: 0.55;
}

.frow-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 4px;
}

.frow-bank-slot {
  display: flex;
  justify-content: flex-end;
  width: 162px;
}

.frow-bank-slot:empty {
  height: 30px;
}

.folder-bank-control.frow-bank {
  width: 100%;
  margin: 0;
  padding: 6px 9px;
  font-size: 9.5px;
  justify-content: flex-start;
  border-radius: 8px;
}

.folder-bank-control.frow-bank .ui-icon {
  width: 13px;
  height: 13px;
}

.more-button-slot {
  width: 30px;
  height: 30px;
}

/* ---- همگام‌سازی پوشه‌ها بین درس‌ها ---- */
.folder-sync-button {
  position: relative;
}

.folder-sync-button.is-auto {
  border-color: #bfe3d8;
  color: #1c7a68;
  background: #f0faf7;
}

.folder-sync-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--teal, #2d766d);
  box-shadow: 0 0 0 3px rgba(45, 118, 109, 0.16);
}

.fsync-targets {
  display: grid;
  gap: 6px;
  margin-bottom: 14px;
}

.fsync-target {
  display: grid;
  grid-template-columns: 18px 12px minmax(0, 1fr) auto;
  align-items: center;
  gap: 9px;
  padding: 9px 11px;
  border: 1px solid var(--line, #ece7dd);
  border-radius: 10px;
  background: #fff;
  cursor: pointer;
  transition: 0.15s ease;
}

.fsync-target:hover {
  border-color: #efc39f;
  background: #fffaf4;
}

.fsync-target input {
  width: 15px;
  height: 15px;
  accent-color: var(--orange, #ff6718);
  cursor: pointer;
}

.fsync-target-dot {
  width: 11px;
  height: 11px;
  border-radius: 4px;
  background: var(--folder-color, #f4a261);
}

.fsync-target-name {
  min-width: 0;
  font-size: 12px;
  font-weight: 750;
  color: #3c372f;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.fsync-target-summary {
  font-size: 9.5px;
  font-weight: 700;
  color: #c06a25;
  white-space: nowrap;
}

.fsync-target.is-clean .fsync-target-summary {
  color: #2d766d;
}

.fsync-options {
  display: grid;
  gap: 11px;
  padding: 12px;
  border: 1px solid var(--line, #ece7dd);
  border-radius: 11px;
  background: #fbfaf7;
}

.fsync-options .switch-row small {
  display: block;
  margin-top: 3px;
  color: var(--muted, #8c8578);
  font-size: 9.5px;
  line-height: 1.7;
}

.fsync-section-title {
  margin: 0 0 6px;
  font-size: 13px;
  font-weight: 800;
  color: #3c372f;
}

.fsync-section-title.is-second {
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px dashed var(--line, #ece7dd);
}

.fcopy-search {
  width: 100%;
  box-sizing: border-box;
  padding: 9px 11px;
  border: 1px solid var(--line, #ece7dd);
  border-radius: 10px;
  background: #fff;
  font: inherit;
  font-size: 12px;
}

.fcopy-search:focus {
  outline: none;
  border-color: #efc39f;
  box-shadow: 0 0 0 3px rgba(255, 122, 47, 0.12);
}

.fcopy-hint {
  display: block;
  min-height: 14px;
  margin: 6px 2px 8px;
  color: var(--muted, #8c8578);
  font-size: 9.5px;
}

.fcopy-targets {
  max-height: 300px;
  overflow-y: auto;
  margin-bottom: 0;
}

.fcopy-target .fsync-target-name {
  white-space: normal;
  line-height: 1.6;
}

.fcopy-target .fsync-target-name small {
  color: var(--muted, #8c8578);
  font-size: 10px;
  font-weight: 600;
}

.fcopy-empty {
  margin: 0;
  padding: 12px;
  color: var(--muted, #8c8578);
  font-size: 11px;
  text-align: center;
}

.icon-button.active {
  color: var(--orange);
  border-color: #efb088;
  background: var(--orange-soft);
}

.folder-sort-button .ui-icon {
  width: 14px;
  height: 14px;
}

.folder-card {
  border: 1px solid var(--line);
  background: linear-gradient(145deg, white, #fcfbf8);
  border-radius: 15px;
  padding: 14px;
  cursor: pointer;
  transition: 0.2s ease;
  position: relative;
  overflow: visible;
}

.folder-card:hover {
  transform: translateY(-3px);
  border-color: #f2b994;
  box-shadow: 0 10px 24px rgba(79, 58, 38, 0.08);
  /* کارت هاور‌شده باید بالای کارت‌های ردیف بعد قرار بگیرد تا پاپ‌آپ زیر متن آن‌ها نرود */
  z-index: 30;
}

.folder-card.dragging {
  opacity: 0.45;
  transform: scale(0.985);
}

.folder-card.drag-over {
  outline: 2px dashed var(--orange);
  outline-offset: 3px;
  border-color: rgba(255, 103, 24, 0.55);
}

.folder-card.drop-after {
  box-shadow: inset -5px 0 0 rgba(255, 103, 24, 0.55), 0 10px 24px rgba(79, 58, 38, 0.08);
}

.folder-grid.list-view .folder-card.drop-after {
  box-shadow: inset 0 -5px 0 rgba(255, 103, 24, 0.55), 0 10px 24px rgba(79, 58, 38, 0.08);
}

.folder-row.drag-over {
  outline-offset: 1px;
}

.folder-card.is-archived {
  background: linear-gradient(145deg, #fff, #f7f3ed);
  border-style: dashed;
  opacity: 0.82;
}

.folder-card.is-archived .folder-icon {
  filter: grayscale(0.35);
}

.folder-archive-badge {
  margin-inline-start: 8px;
  vertical-align: middle;
}

.folder-card > .folder-tooltip { display: none; }

.folder-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
}

.folder-icon {
  width: 45px;
  height: 37px;
  border-radius: 8px 8px 11px 11px;
  background: var(--folder-color, #f4a261);
  position: relative;
  box-shadow: inset 0 -6px 12px rgba(0, 0, 0, 0.06);
}

.folder-icon::before {
  content: "";
  position: absolute;
  width: 21px;
  height: 7px;
  top: -5px;
  right: 3px;
  border-radius: 5px 5px 0 0;
  background: inherit;
}

.folder-icon-wrap {
  position: relative;
  display: inline-flex;
  flex: none;
  width: 45px;
  height: 37px;
}

.folder-notification-count {
  position: absolute;
  top: -10px;
  left: -9px;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 24px;
  height: 24px;
  padding: 0 5px;
  border: 2px solid #fff;
  border-radius: 999px;
  background: #c8372d;
  color: #fff;
  box-shadow: 0 2px 6px rgba(142, 44, 30, 0.22);
  font: inherit;
  font-size: 10px;
  font-weight: 850;
  line-height: 1;
  cursor: pointer;
}

.folder-notification-count:hover {
  background: #ab2922;
}

.folder-review-statuses {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 5px;
  margin-top: 9px;
}

.folder-review-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  max-width: 100%;
  padding: 4px 7px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: #fff3d5;
  color: #805715;
  font: inherit;
  font-size: 9px;
  line-height: 1.5;
  white-space: nowrap;
  cursor: pointer;
}

.folder-review-chip b {
  font-size: 10px;
  font-weight: 850;
}

.folder-review-chip.is-corrected {
  background: #e3f4f0;
  color: #196d60;
}

.folder-review-chip.is-returned {
  background: #efebf8;
  color: #674498;
}

.folder-review-chip.is-rejected {
  background: #fbe9e7;
  color: #a13830;
}

.folder-review-chip:hover {
  border-color: currentColor;
}

.folder-row .folder-icon-wrap {
  width: 30px;
  height: 25px;
}

.folder-row .folder-notification-count {
  top: -8px;
  left: -7px;
  min-width: 20px;
  height: 20px;
  font-size: 9px;
}

.folder-row .folder-review-statuses {
  gap: 4px;
  margin-top: 0;
}

.folder-row .folder-review-chip {
  padding: 2px 5px;
  font-size: 8.5px;
}

.folder-review-scope {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 10px 17px;
  border-top: 1px solid #efe5ce;
  border-bottom: 1px solid #efe5ce;
  background: #fffbef;
  color: #795b25;
  font-size: 11px;
}

.folder-review-scope > span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.folder-review-scope .ui-icon {
  flex: none;
  width: 16px;
  height: 16px;
}

.more-button {
  position: static;
  width: 30px;
  height: 30px;
  border: 0;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  border-radius: 7px;
  display: grid;
  place-items: center;
}

.more-button:hover {
  background: #f1efe8;
}

.folder-drag-handle {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  color: var(--muted);
  opacity: 0.42;
  cursor: grab;
  user-select: none;
  line-height: 1;
  transition: background 0.16s ease, color 0.16s ease, opacity 0.16s ease;
}

.folder-drag-handle:hover,
.folder-card:hover .folder-drag-handle {
  opacity: 0.8;
}

.folder-drag-handle:hover {
  background: #fff5ec;
  color: var(--orange);
}

.folder-drag-handle:active {
  cursor: grabbing;
}

.folder-card h3 {
  margin: 13px 0 3px;
  padding-left: 0;
  font-size: 13px;
}

.folder-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid #f0ede6;
  color: var(--muted);
  font-size: 9px;
}

.folder-meta-time {
  margin-right: auto;
  color: #9a958b;
  white-space: nowrap;
  text-align: left;
}

.folder-meta-item {
  white-space: nowrap;
}

.folder-bank-control {
  width: 100%;
  margin-top: 9px;
  padding: 7px 9px;
  border: 1px solid #e8ddcc;
  border-radius: 9px;
  background: #fffaf3;
  color: #8a6f4a;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  cursor: pointer;
  font: inherit;
  font-size: 10px;
  font-weight: 750;
}
.folder-bank-control:hover { border-color: #efaa7b; color: #c65e1e; background: #fff5eb; }
.folder-bank-control.is-published { border-color: #cce9df; color: #197b68; background: #edf9f5; }
.folder-bank-control .ui-icon { width: 14px; height: 14px; }
.folder-bank-control small { margin-inline-start: auto; color: inherit; opacity: .72; font-size: 9px; }

.folder-tooltip {
  position: absolute;
  z-index: 40;
  width: min(304px, calc(100vw - 24px));
  right: 8px;
  top: calc(100% - 2px);
  background: #282621;
  color: white;
  border-radius: 11px;
  padding: 10px;
  opacity: 0;
  transform: translateY(-5px);
  pointer-events: none;
  transition: 0.16s ease;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.2);
}

/* اطلاعات پوشه بیرون از پنل قرار می‌گیرد تا ردیف کوتاه یا والدِ برش‌خورده آن را نپوشاند. */
.folder-tooltip-portal {
  position: fixed;
  z-index: 10000;
  inset: auto;
  display: none;
  margin: 0;
  max-height: calc(100dvh - 24px);
  overflow: auto;
  overscroll-behavior: contain;
  overflow-wrap: anywhere;
  transform: none;
  transition: opacity .16s ease;
}

.folder-tooltip-portal.show {
  display: block;
  opacity: 1;
  pointer-events: auto;
}

.tooltip-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px 10px;
}

.tooltip-stats span {
  display: flex;
  justify-content: space-between;
  gap: 7px;
  color: #d1cec7;
  font-size: 9px;
  line-height: 1.55;
}

.tooltip-stats b {
  color: white;
}

.tooltip-users {
  margin-top: 10px;
  padding-top: 9px;
  border-top: 1px solid rgba(255,255,255,.12);
  font-size: 9px;
  color: #c7c3ba;
}

.tooltip-access,
.tooltip-rates {
  margin-top: 7px;
  padding-top: 7px;
  border-top: 1px solid rgba(255,255,255,.12);
}

.tooltip-access > strong,
.tooltip-rates > strong {
  display: block;
  color: #fff;
  font-size: 10px;
  margin-bottom: 5px;
}

.tooltip-access-counts {
  display: flex;
  gap: 5px;
  flex-wrap: wrap;
  margin-bottom: 4px;
}

.tooltip-access-counts span {
  background: rgba(255,255,255,.11);
  border-radius: 6px;
  padding: 2px 6px;
  color: #fff;
  font-size: 9px;
  font-weight: 800;
}

.tooltip-role-list {
  display: grid;
  gap: 3px;
}

.tooltip-role-line {
  display: grid;
  grid-template-columns: 68px minmax(0, 1fr);
  gap: 6px;
  align-items: start;
  color: #d1cec7;
  font-size: 9px;
}

.tooltip-role-line b {
  color: #fff;
  font-weight: 800;
  white-space: nowrap;
}

.tooltip-role-line span {
  min-width: 0;
  line-height: 1.55;
}

.tooltip-rates > div {
  display: grid;
  gap: 4px;
}

.tooltip-rates span {
  display: grid;
  grid-template-columns: 68px minmax(0, 1fr);
  gap: 5px 8px;
  align-items: center;
  color: #d1cec7;
  font-size: 9px;
}

.tooltip-rates i {
  font-style: normal;
  color: #fff;
  font-weight: 800;
}

.tooltip-rates b {
  color: #fff;
}

.tooltip-rates small {
  grid-column: 2;
  color: #aaa59a;
  font-size: 8px;
}

.toolbar {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.select-control,
.input-control {
  height: 36px;
  border: 1px solid var(--line);
  background: white;
  border-radius: 10px;
  padding: 0 10px;
  outline: none;
  color: #5c5851;
}

.select-control:focus,
.input-control:focus,
.field textarea:focus,
.field input:focus,
.field select:focus {
  border-color: #f0a77e;
  box-shadow: 0 0 0 3px var(--orange-soft);
}

.table-wrap {
  overflow: auto;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 850px;
}

.data-table th {
  color: #9a958b;
  font-size: 10px;
  font-weight: 600;
  text-align: right;
  padding: 11px 14px;
  background: #fbfaf7;
  border-bottom: 1px solid var(--line);
}

.data-table td {
  padding: 13px 14px;
  border-bottom: 1px solid #f1eee8;
  vertical-align: middle;
}

.data-table tbody tr {
  transition: 0.15s ease;
}

.data-table tbody tr:hover {
  background: #fffcf9;
}

.data-table tbody tr:last-child td {
  border-bottom: 0;
}

/* جدول‌های مدیریت حساب: تمام عرض پنل، بدون اسکرول افقی و با ستون‌های کاملاً هم‌راستا */
.management-table-wrap {
  width: 100%;
  overflow: visible;
}
.management-table {
  width: 100%;
  min-width: 0;
  table-layout: fixed;
  direction: rtl;
}
.management-table th,
.management-table td {
  box-sizing: border-box;
  padding-inline: 10px;
  text-align: center;
  overflow-wrap: anywhere;
}
.management-table th:first-child,
.management-table td:first-child {
  text-align: right;
}
.management-table th:last-child,
.management-table td:last-child {
  padding-inline: 5px;
}
.management-table .question-cell {
  min-width: 0;
  max-width: 100%;
}
.management-table .question-cell strong {
  min-width: 0;
  overflow-wrap: anywhere;
}
/* ── نرخ پایهٔ هر درس (صفحهٔ مدیریت پرداخت‌ها) ── */
/* `.panel-header` هم flex است هم space-between؛ دکمهٔ کنارِ عنوان زیر فشار له
   می‌شود و متنش دوخطه درمی‌آید. مثل `.head-actions` باید از فشرده‌شدن معاف شود. */
.lrate-save { flex: none; white-space: nowrap; }
.lrate-hint {
  display: flex; align-items: flex-start; gap: 8px;
  margin: 0 19px 14px; padding: 10px 12px;
  border: 1px solid var(--line); border-radius: 12px;
  background: var(--panel-soft); color: var(--muted);
  font-size: 11.5px; line-height: 1.9;
}
.lrate-hint svg { width: 14px; height: 14px; flex: none; margin-top: 3px; }
.lrate-table td { vertical-align: middle; }
/* کادر با پهنای ثابتِ ۸۸px در ستونِ ۲۳٪ روی نمایشگرِ باریک از خانه بیرون می‌زد و
   روی «تومان» می‌افتاد. حالا کادر خودش را با ستون جمع می‌کند و متن جای خودش را
   دارد؛ سقفِ پهنا نمی‌گذارد روی نمایشگر پهن هم کشیده شود. */
.lrate-field {
  display: flex; align-items: center; gap: 6px;
  width: 100%; max-width: 170px;
  padding: 3px 9px; border: 1px solid var(--line); border-radius: 10px;
  background: var(--panel);
}
.lrate-field input {
  flex: 1 1 auto; width: 100%; min-width: 0; min-height: 0; padding: 5px 0;
  border: 0; background: transparent; color: var(--ink);
  font: inherit; font-size: 12.5px; font-weight: 800; text-align: center;
}
.lrate-field span { flex: none; }
.lrate-field input:focus { outline: none; }
.lrate-field:focus-within { border-color: var(--orange); }
.lrate-field span { color: var(--muted); font-size: 10.5px; font-weight: 800; }
.lrate-scope { display: grid; gap: 2px; color: var(--muted); font-size: 11.5px; font-weight: 800; }
.lrate-scope small { color: #a85b1b; font-size: 10px; }

/* «اعطا توسط» دو سطر است: نام، و زیرش مهرِ زمانِ واقعیِ اعطا. */
.access-grant-when {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 10.5px;
  font-weight: 800;
  direction: ltr;
  unicode-bidi: isolate;
}

.management-ltr {
  display: inline-block;
  direction: ltr;
  unicode-bidi: isolate;
  white-space: nowrap;
  text-align: center;
}
.management-table .row-action {
  margin: 2px;
}

@media (max-width: 900px) {
  .management-table th,
  .management-table td {
    padding-inline: 5px;
    font-size: 9px;
  }
  .management-table .avatar { width: 28px; height: 28px; }
  .management-table .badge { padding-inline: 6px; white-space: normal; }
}

.question-metadata-table {
  min-width: 1380px;
}

.question-metadata-table th,
.question-metadata-table td {
  padding-right: 10px;
  padding-left: 10px;
}

.question-code {
  border: 0;
  background: transparent;
  padding: 5px 7px;
  border-radius: 7px;
  color: #315eaa;
  direction: ltr;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 11px;
  font-weight: 800;
  cursor: pointer;
  white-space: nowrap;
}

.question-code:hover {
  color: #c84e08;
  background: var(--orange-soft);
}

.question-value-list,
.question-source-list {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  min-width: 80px;
}

.question-value-list > span {
  padding: 4px 10px;
  border-radius: 8px;
  background: #f2f0eb;
  color: #575249;
  font-size: 10px;
  font-weight: 700;
  white-space: nowrap;
}

.question-value-list.lesson-values > span {
  color: #2d766d;
  background: #edf8f6;
}

.question-value-list.book-values > span {
  color: #8a5a1f;
  background: #fdf2e3;
}

.folder-path-cell {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  max-width: 150px;
  padding: 4px 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfaf7;
  color: #5b5650;
  font-size: 9px;
  font-weight: 700;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease;
}

.folder-path-cell svg {
  width: 12px;
  height: 12px;
  flex-shrink: 0;
  color: var(--orange);
}

.folder-path-cell span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.folder-path-cell:hover {
  border-color: var(--orange);
  background: var(--orange-soft);
  color: #c84e08;
}

.folder-path-cell:hover svg {
  color: #c84e08;
}

.question-source-list {
  min-width: 130px;
  max-width: 210px;
}

.question-source-list > span {
  display: flex;
  align-items: center;
  gap: 5px;
  max-width: 100%;
  padding: 4px 7px;
  border: 1px solid #e8e3d9;
  border-radius: 8px;
  background: #fffdf9;
}

.question-source-list b {
  max-width: 135px;
  overflow: hidden;
  color: #4d4840;
  font-size: 10px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.question-source-list small {
  color: var(--muted);
  font-size: 8px;
  white-space: nowrap;
}

.difficulty-cell {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
}

.empty-value {
  color: #c5beb4;
}

.check {
  accent-color: var(--orange);
  cursor: pointer;
}

.question-cell {
  display: flex;
  align-items: center;
  gap: 11px;
  min-width: 290px;
}

.question-thumb {
  width: 42px;
  height: 42px;
  flex: 0 0 auto;
  border-radius: 11px;
  display: grid;
  place-items: center;
  background: #f2f0ea;
  color: #817c72;
  font-weight: 700;
}

.question-cell strong,
.question-cell small {
  display: block;
}

.question-cell strong {
  font-size: 11px;
  max-width: 330px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.question-cell small {
  color: var(--muted);
  font-size: 9px;
  direction: ltr;
  text-align: right;
  margin-top: 3px;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  border-radius: 20px;
  padding: 5px 11px;
  font-size: 10px;
  font-weight: 700;
  white-space: nowrap;
}

.badge::before {
  content: "";
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: currentColor;
}

.badge.approved { color: #168878; background: var(--teal-soft); }
.badge.created { color: #3f6fcf; background: var(--blue-soft); }
.badge.pending_review { color: #b27b00; background: var(--yellow-soft); }
.badge.returned_for_correction { color: #c75e15; background: var(--orange-soft); }
.badge.draft { color: #716c64; background: #f0eee8; }
.badge.rejected { color: var(--red); background: var(--red-soft); }
.badge.corrected { color: var(--blue); background: var(--blue-soft); }
.badge.hidden { color: var(--purple); background: var(--purple-soft); }
.badge.archived { color: #7b6a55; background: #f1ece4; }

.difficulty-gauge {
  --gauge-color: var(--teal);
  --gauge-progress: 25;
  --needle-angle: -58deg;
  width: 38px;
  height: 31px;
  display: inline-grid;
  place-items: center;
  border-radius: 10px;
  color: var(--gauge-color);
  background: color-mix(in srgb, var(--gauge-color) 9%, white);
  direction: ltr;
}

.difficulty-gauge svg {
  width: 30px;
  height: 27px;
  overflow: visible;
}

.gauge-track,
.gauge-value {
  fill: none;
  stroke-linecap: round;
  stroke-width: 2.7;
}

.gauge-track { stroke: #dedbd4; }
.gauge-value {
  stroke: currentColor;
  stroke-dasharray: var(--gauge-progress) 100;
}

.gauge-needle {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  transform: rotate(var(--needle-angle));
  transform-origin: 12px 17px;
  transition: transform .2s ease;
}

.gauge-center {
  fill: #fff;
  stroke: currentColor;
  stroke-width: 1.5;
}

.difficulty-gauge.level-1 {
  --gauge-color: #1aa58e;
  --gauge-progress: 25;
  --needle-angle: -58deg;
}

.difficulty-gauge.level-2 {
  --gauge-color: #d59a18;
  --gauge-progress: 50;
  --needle-angle: -20deg;
}

.difficulty-gauge.level-3 {
  --gauge-color: #f2772e;
  --gauge-progress: 75;
  --needle-angle: 22deg;
}

.difficulty-gauge.level-4 {
  --gauge-color: #e5525b;
  --gauge-progress: 100;
  --needle-angle: 58deg;
}

.row-actions {
  display: flex;
  gap: 4px;
}

.row-action {
  border: 0;
  background: transparent;
  width: 30px;
  height: 30px;
  border-radius: 8px;
  color: var(--muted);
  cursor: pointer;
  display: inline-flex;
  align-items: center; justify-content: center;
}

.row-action .ui-icon { width: 16px; height: 16px; }

.modal-close .ui-icon {
  width: 15px;
  height: 15px;
}

.chip button .ui-icon,
.tp-chip-rm .ui-icon,
.tp-close .ui-icon {
  width: 14px;
  height: 14px;
}

.row-action:hover {
  color: var(--orange);
  background: var(--orange-soft);
}

.pagination {
  padding: 13px 17px;
  border-top: 1px solid var(--line);
  display: flex;
  align-items: center;
  gap: 14px;
  color: var(--muted);
  font-size: 11px;
}

.pagination > span {
  white-space: nowrap;
}

.page-buttons {
  margin-right: auto;
  display: flex;
  align-items: center;
  gap: 4px;
}

.page-buttons button {
  border: 1px solid var(--line);
  background: white;
  min-width: 30px;
  height: 30px;
  padding: 0 6px;
  border-radius: 8px;
  font: inherit;
  font-size: 11.5px;
  color: var(--ink);
  cursor: pointer;
}

.page-buttons button:disabled {
  opacity: 0.4;
  cursor: default;
}

.page-buttons button.active {
  color: white;
  border-color: var(--orange);
  background: var(--orange);
}

.empty-state {
  padding: 60px 20px;
  text-align: center;
  color: var(--muted);
}

.empty-icon {
  width: 62px;
  height: 62px;
  border-radius: 20px;
  background: var(--orange-soft);
  color: var(--orange);
  display: grid;
  place-items: center;
  margin: 0 auto 12px;
  font-size: 24px;
}
.empty-icon > .ui-icon {
  width: 32px;
  height: 32px;
  stroke-width: 1.9;
}

.empty-state h3 {
  color: var(--ink);
  margin: 0 0 5px;
}

.boot-loading-state p {
  max-width: 520px;
  margin: 0 auto 16px;
  line-height: 1.9;
}

.two-column {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(280px, 0.6fr);
  gap: 18px;
}

/* `.panel + .panel` برای پنل‌های روی‌هم است؛ داخل چیدمان دوستونی، ستون دوم را
   ۱۸px پایین می‌انداخت و چون ارتفاعش ۱۰۰٪ ردیف است، از پایین بیرون می‌زد. */
.two-column > .panel + .panel { margin-top: 0; }

.tree {
  padding: 14px;
}

.tree-node {
  margin: 4px 0;
}

.tree-row {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  padding: 5px 9px;
  border-radius: 10px;
  cursor: pointer;
}

.tree-row:hover {
  background: #f7f5ef;
}

.tree-row.selected {
  background: var(--orange-soft);
  color: #cf530d;
}

.tree-toggle {
  width: 22px;
  color: var(--muted);
  text-align: center;
}

.tree-children {
  margin-right: 24px;
  border-right: 1px dashed #ddd8ce;
  padding-right: 9px;
}

.info-list {
  padding: 8px 18px 18px;
}

.info-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  min-width: 0;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}

.info-row:last-child {
  border-bottom: 0;
}

.info-row span {
  color: var(--muted);
}

.info-row > span:last-child {
  min-width: 0;
  max-width: 72%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.detail-tag-list {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-start;
  gap: 5px;
  max-width: 68%;
  color: var(--muted);
}

.detail-tag-pill {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 3px 9px;
  border-radius: 999px;
  background: #fff4ec;
  border: 1px solid #f1d7c3;
  color: #9f5b1f;
  font-size: 11px;
  line-height: 1.4;
  font-weight: 800;
  white-space: nowrap;
}

.modal-root:empty {
  display: none;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(30, 28, 24, 0.46);
  backdrop-filter: blur(6px);
  display: grid;
  place-items: center;
  padding: 20px;
}

.modal {
  width: min(680px, 96vw);
  max-height: 92vh;
  /* روی موبایل/تبلت، vh ارتفاعِ «بدون نوار آدرس» است و مودالِ بلند از بالا و پایینِ
     صفحه بیرون می‌زد؛ dvh ارتفاعِ واقعیِ همان لحظه است. روی دسکتاپ چیزی عوض نمی‌شود. */
  max-height: min(92vh, calc(100dvh - 40px));
  overflow: auto;
  overscroll-behavior: contain;   /* اسکرول به پس‌زمینه سرریز نشود */
  background: #fff;
  border-radius: 22px;
  box-shadow: 0 30px 80px rgba(0,0,0,.22);
  animation: modal-in .2s ease;
}

/* وقتی مودال باز است، صفحهٔ پشت اسکرول نمی‌شود (فقط داخلِ پاپ‌آپ) */
body.modal-open { overflow: hidden; }

.modal,
.login-log-list {
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.modal::-webkit-scrollbar,
.login-log-list::-webkit-scrollbar {
  display: none;
}

/* استثنای کارگاه رسم: اینجا محتوا بلند است و کاربر باید *ببیند* که پایین‌تر
   چیزی هست — نوارِ پنهان روی صفحهٔ مک یعنی «فرم همین‌قدر است». */
.modal:has(.fst-body) { scrollbar-width: thin; scrollbar-color: #cfc8ba transparent; scroll-behavior: smooth; }
.modal:has(.fst-body)::-webkit-scrollbar { display: block; width: 11px; }
.modal:has(.fst-body)::-webkit-scrollbar-thumb { border: 3px solid transparent; border-radius: 11px; background: #cfc8ba; background-clip: content-box; }
.modal:has(.fst-body)::-webkit-scrollbar-thumb:hover { background: #ada494; background-clip: content-box; }
.modal:has(.fst-body)::-webkit-scrollbar-track { background: transparent; }

.modal.large {
  width: min(1120px, 97vw);
}

.modal.xlarge {
  width: min(1280px, calc(100vw - 40px));
}

.modal.receipt-modal {
  width: fit-content;
  min-width: min(320px, 92vw);
  max-width: 94vw;
  max-height: 92vh;
  overflow: hidden;
  display: grid;
  grid-template-rows: auto auto;
}

.modal.receipt-modal::-webkit-scrollbar,
.receipt-viewer-body::-webkit-scrollbar {
  width: 0;
  height: 0;
  display: none;
}

.receipt-viewer-body {
  min-height: 0;
  padding: 14px;
  display: grid;
  place-items: center;
  overflow: hidden;
  background: #fbfaf7;
  scrollbar-width: none;
}

/* فیش به‌صورت کامل و با حفظ تناسب نمایش داده می‌شود؛ تا حداکثرِ ممکنِ پنجره بزرگ می‌شود ولی کادر را پر نمی‌کند */
.receipt-viewer-img {
  display: block;
  width: auto;
  height: auto;
  max-width: 88vw;
  max-height: calc(92vh - 88px);
  object-fit: contain;
  object-position: center;
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: 0 16px 38px rgba(40, 34, 24, .12);
  background: #fff;
}

@keyframes modal-in {
  from { opacity: 0; transform: translateY(12px) scale(.98); }
}

.modal-head {
  position: sticky;
  top: 0;
  z-index: 5;
  background: rgba(255,255,255,.94);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
  padding: 16px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-head h2 {
  margin: 0;
  font-size: 17px;
}

.modal-close {
  border: 0;
  background: #f2f0ea;
  width: 32px;
  height: 32px;
  border-radius: 9px;
  cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
}

.modal-body {
  padding: 20px;
}

/* ── قراردادِ فاصله (AGENTS.md › «قراردادِ فاصله») ─────────────────────
   فاصلهٔ بینِ بلوک‌ها مالِ ظرف است، نه خودِ بلوک؛ و فقط از این مقیاس می‌آید:
   ۴ / ۸ / ۱۲ / ۱۶ / ۲۰ / ۲۴ / ۳۲.
   ۱) ظرفِ تازه‌ای که بلوک‌ها را زیرِ هم می‌چیند: `.mk-stack` (یا grid/flex با gap).
   ۲) بدنهٔ سادهٔ مودال (دقیقاً class="modal-body") خودش جریان دارد: هر بلوکِ بعدی
      دست‌کم --flow-gap فاصلهٔ بالا می‌گیرد. حاشیه‌ها در جریانِ بلوکی روی هم
      می‌افتند (collapse)، پس فاصلهٔ بزرگ‌ترِ موجود دوبرابر نمی‌شود؛ فقط «صفر»
      از بین می‌رود — مثلِ فهرستِ پوشه‌ها و راهنمای زیرش در مودالِ انتشار.
   ۳) روی localhost نگهبانِ `mkSpacingAudit` (app.js) جعبه‌های چسبیده را قرمز
      می‌کند و در کنسول `[mk-spacing]` می‌نویسد. */
:root {
  --space-1: 4px; --space-2: 8px; --space-3: 12px; --space-4: 16px;
  --space-5: 20px; --space-6: 24px; --space-8: 32px;
  --flow-gap: var(--space-3);
}
.mk-stack { display: flex; flex-direction: column; gap: var(--stack-gap, var(--space-3)); min-width: 0; }
.mk-stack > * { margin-block: 0; }
.modal-body[class="modal-body"] > :not(:first-child, [hidden], script, style, template) {
  margin-block-start: var(--flow-gap);
}

/* فرم‌های ساده، مثل افزودن کتاب و تعدیل اعتبار، فیلدها را مستقیم در بدنه دارند.
   فاصله فقط بین بلوک‌های فرم است؛ gridهای داخلی و بدنه‌های اختصاصی تغییر نمی‌کنند. */
.modal-body[class="modal-body"] > :is(.field, .form-grid, .info-row, .pcredit-two):not([hidden])
  + :is(.field, .form-grid, .modal-hint, .tmx-hint):not([hidden]) {
  margin-block-start: 14px;
}

.modal-footer {
  position: sticky;
  bottom: 0;
  z-index: 5;
  background: rgba(255,255,255,.94);
  backdrop-filter: blur(12px);
  border-top: 1px solid var(--line);
  padding: 13px 20px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.modal-footer .left {
  margin-right: auto;
}

/* پای مودال (نسخهٔ کوتاه‌نامِ .modal-foot که در بیشتر پاپ‌آپ‌ها به‌کار می‌رود):
   بدون این قانون دکمه‌ها به لبهٔ کادر می‌چسبیدند. */
.modal-foot {
  position: sticky;
  bottom: 0;
  z-index: 5;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 9px;
  padding: 13px 20px;
  border-top: 1px solid var(--line);
  background: rgba(255,255,255,.94);
  backdrop-filter: blur(12px);
}
.modal-foot > button { min-height: 42px; }
.modal-foot .left { margin-inline-end: auto; }
@media (max-width: 560px) {
  .modal-foot { padding: 11px 14px; }
  .modal-foot > button { flex: 1 1 140px; justify-content: center; }
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.field.full {
  grid-column: 1 / -1;
}

.field label {
  font-size: 11px;
  font-weight: 700;
}

.required {
  color: var(--red);
}

.field input,
.field select,
.field textarea {
  width: 100%;
  border: 1px solid var(--line);
  outline: 0;
  background: #fff;
  border-radius: 10px;
  min-height: 42px;
  padding: 9px 11px;
}

.field textarea {
  min-height: 90px;
  resize: vertical;
}

/* کادرِ جست‌وجوی حبابی داخلِ یک `.field`: خودِ حباب قاب و قدِ ۳۸ پیکسلی دارد،
   ولی `.field input` بالا هم‌وزن است و چون بعد از `.question-code-search input`
   می‌آید برنده می‌شود — نتیجه یک کادرِ ۴۲پیکسلیِ قاب‌دار *داخل* حباب که از آن
   بیرون می‌زد. (هم مودال پروژه، هم «انتقال به پوشهٔ دیگر».)

   گزینشگرِ دوم زائد نیست: `.form-grid .field input` هم `min-height: 46px`
   می‌دهد و هم‌وزنِ گزینشگرِ اول است ولی پایین‌تر می‌آید، پس بدون آن، قدِ ۴۶
   پیکسلی داخلِ حبابِ ۳۸ پیکسلی می‌ماند. */
.field .question-code-search input,
.form-grid .field .question-code-search input {
  border: 0;
  min-height: 0;
  height: 100%;
  padding: 0;
  border-radius: 0;
  background: transparent;
  font-size: 12px;
}

.folder-bulk-card {
  border: 1px solid #f1d8c2;
  background: #fffaf5;
  border-radius: 14px;
  padding: 12px;
  display: grid;
  gap: 10px;
  box-shadow: 0 8px 24px rgba(121, 80, 45, .05);
}

.folder-bulk-card:empty {
  display: none;
}

.folder-bulk-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.folder-bulk-head strong {
  font-size: 13px;
  color: #4a3525;
}

.folder-bulk-head small {
  color: var(--muted);
  font-size: 10px;
  line-height: 1.8;
}

.folder-bulk-options {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.folder-bulk-chip {
  position: relative;
  cursor: pointer;
}

.folder-bulk-chip input {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
}

.folder-bulk-chip span {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #eadfce;
  background: #fff;
  color: #6f6255;
  border-radius: 12px;
  padding: 8px 14px;
  font-size: 12px;
  font-weight: 800;
  transition: .16s ease;
}

.folder-bulk-chip:hover span {
  border-color: #f0b487;
  color: #a45d1f;
  transform: translateY(-1px);
}

.folder-bulk-chip input:checked + span {
  background: #fff0e5;
  border-color: #ffb282;
  color: #c45f18;
  box-shadow: inset 0 0 0 1px rgba(255, 107, 24, .08);
}

.folder-bulk-range {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr)) auto;
  align-items: end;
  gap: 10px;
}

.folder-bulk-range label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
}

.folder-bulk-preview {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  background: #f4f1ec;
  color: #7b7064;
  padding: 0 12px;
  font-size: 11px;
  font-weight: 800;
  white-space: nowrap;
}

.password-field {
  position: relative;
  display: block;
  width: 100%;
  isolation: isolate;
}

.auth-form .password-field {
  margin-top: 6px;
}

.field .password-field input,
.auth-form .password-field input,
input[data-password-input] {
  direction: ltr;
  text-align: left;
  padding-left: 46px;
  padding-right: 13px;
  font-family: inherit;
  margin-top: 0;
}

.password-toggle {
  position: absolute;
  left: 8px;
  top: 50%;
  transform: translateY(-50%);
  width: 34px;
  height: 34px;
  border: 1px solid transparent;
  border-radius: 10px;
  background: transparent;
  color: var(--muted);
  display: inline-grid;
  place-items: center;
  cursor: pointer;
  transition: background 0.16s ease, color 0.16s ease, border-color 0.16s ease;
  z-index: 2;
  padding: 0;
  line-height: 1;
  flex: 0 0 auto;
  transform-origin: center;
}

.password-toggle .ui-icon {
  width: 18px;
  height: 18px;
  display: block;
  pointer-events: none;
}

.password-toggle:hover,
.password-toggle.is-visible {
  background: #fff5ec;
  border-color: rgba(255, 103, 24, 0.22);
  color: var(--orange);
}

.password-toggle,
.password-toggle:hover,
.password-toggle:active,
.password-toggle:focus {
  transform: translateY(-50%) !important;
  box-shadow: none;
}

.field small {
  color: var(--muted);
  font-size: 9px;
}

.switch-row {
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px 12px;
}

.switch {
  width: 38px;
  height: 22px;
  border-radius: 20px;
  background: #d8d5ce;
  padding: 3px;
  cursor: pointer;
  transition: .2s;
}

.switch::after {
  content: "";
  display: block;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: white;
  transition: .2s;
  box-shadow: 0 2px 5px rgba(0,0,0,.18);
}

.switch.on {
  background: var(--orange);
}

.switch.on::after {
  transform: translateX(-16px);
}

.wizard-layout {
  display: grid;
  grid-template-columns: 230px minmax(0, 1fr);
  min-height: 650px;
}

.wizard-side {
  padding: 22px 16px;
  background: #faf9f5;
  border-left: 1px solid var(--line);
}

.wizard-side h3 {
  margin: 0 8px 18px;
  font-size: 13px;
}

.wizard-step {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 9px;
  border-radius: 11px;
  color: var(--muted);
  margin-bottom: 3px;
}

.wizard-step .step-num {
  width: 25px;
  height: 25px;
  flex: 0 0 auto;
  border-radius: 8px;
  background: #ece9e2;
  display: grid;
  place-items: center;
  font-size: 10px;
  font-weight: 800;
}

.wizard-step strong,
.wizard-step small {
  display: block;
}

.wizard-step strong {
  color: inherit;
  font-size: 10px;
}

.wizard-step small {
  font-size: 8px;
  margin-top: 2px;
}

.wizard-step.active {
  background: var(--orange-soft);
  color: #d9570e;
}

.wizard-step.active .step-num {
  color: white;
  background: var(--orange);
}

.wizard-step.done .step-num {
  color: white;
  background: var(--teal);
}

.wizard-main {
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.wizard-content {
  padding: 24px;
  flex: 1;
}

.wizard-content h2 {
  margin: 0 0 5px;
  font-size: 20px;
}

.wizard-content > p {
  margin: 0 0 22px;
  color: var(--muted);
  font-size: 11px;
}

.type-cards {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 6px;
  width: min(330px, calc(100% - 90px));
  margin: 0;
}

.type-card {
  border: 1px solid var(--line);
  border-radius: 13px;
  min-height: 54px;
  padding: 7px 10px;
  cursor: pointer;
  text-align: right;
  transition: .18s ease;
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr);
  grid-template-rows: auto auto;
  align-items: center;
  column-gap: 8px;
  background: #fff;
  box-shadow: 0 5px 16px rgba(52, 43, 32, .06);
}

.type-card:hover {
  border-color: #f2ad84;
  background: #fffaf6;
}

.type-card.selected {
  border-color: var(--orange);
  background: var(--orange-soft);
  box-shadow: 0 7px 20px rgba(255,107,24,.14), 0 0 0 3px rgba(255,107,24,.08);
}

.type-card span {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  margin: 0;
  border-radius: 9px;
  background: #f1efe9;
  font-size: 13px;
  grid-row: 1 / 3;
}

.type-card.selected span {
  background: white;
  color: var(--orange);
}

.type-card strong,
.type-card small {
  display: block;
}

.type-card strong { font-size: 11px; align-self: end; }
.type-card small { font-size: 8px; color: var(--muted); margin-top: 0; align-self: start; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.segmented {
  display: flex;
  background: #f2f0ea;
  padding: 3px;
  border-radius: 10px;
  gap: 2px;
}

.segmented button {
  flex: 1;
  min-height: 36px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  font-size: 11px;
  cursor: pointer;
}

.segmented button.active {
  color: #d9570e;
  background: white;
  font-weight: 800;
  box-shadow: 0 2px 7px rgba(35, 30, 24, 0.08);
}

.option-row {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) 32px;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.question-options-block {
  margin-top: 18px;
  border: 1px solid var(--line);
  border-radius: 15px;
  padding: 14px;
  background: #fbfaf7;
}
.options-block-head h3 { margin: 0; font-size: 13px; }
.options-block-head p { color: var(--muted); font-size: 9px; margin: 3px 0 12px; }
.options-entry-layout { display: grid; grid-template-columns: 118px minmax(0,1fr); gap: 12px; align-items: start; }
.options-entry-layout.image-only { grid-template-columns: 132px; }
.correct-option-picker { display: grid; grid-template-columns: 1fr; gap: 5px; width: 100%; }
.correct-option-picker button {
  border: 1px solid var(--line); background: white; border-radius: 8px; min-height: 32px; padding: 3px 6px; cursor: pointer; font-size: 9px; display: flex; align-items: center; transition: .12s;
}
.correct-option-picker button span {
  width: 21px; height: 21px; display: inline-grid; place-items: center; border-radius: 6px; background: #f0eee8; margin-left: 5px; font-size: 9px; font-weight: 900; flex-shrink: 0;
}
.correct-option-picker button:hover { border-color: #b0d8d2; background: #f5fffe; }
.correct-option-picker button.selected { border-color: #65bdae; background: var(--teal-soft); color: #137f70; font-weight: 800; }
.correct-option-picker button.selected span { background: var(--teal); color: white; }
.locked-field {
  min-height: 48px; border: 1px solid #d9eee9; background: var(--teal-soft); border-radius: 11px; padding: 9px 11px; color: #147e70; font-weight: 800;
}
.locked-field small { display: block; color: #5d938b; font-size: 8px; font-weight: 400; margin-top: 2px; }

.option-key {
  width: 31px;
  height: 31px;
  border-radius: 9px;
  background: #f1efe9;
  display: grid;
  place-items: center;
  font-weight: 800;
}

.option-row input[type="text"] {
  width: 100%;
  height: 40px;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0 10px;
  outline: none;
}

.correct-radio {
  accent-color: var(--teal);
  width: 17px;
  height: 17px;
}

.upload-zone {
  border: 1px dashed #d7d1c6;
  background: #fcfbf8;
  border-radius: 13px;
  padding: 22px;
  text-align: center;
  color: var(--muted);
  cursor: pointer;
}

.upload-zone:hover {
  border-color: var(--orange);
  background: var(--orange-soft);
}

.media-editor {
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
  margin: 12px 0 16px;
  background: #fff;
}

.media-editor-head {
  min-height: 49px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 9px 12px;
  border-bottom: 1px solid var(--line);
  background: #fbfaf7;
}

.media-editor-head strong,
.media-editor-head small {
  display: block;
}

.media-editor-head small {
  color: var(--muted);
  font-size: 8px;
}

.media-drop {
  margin: 12px;
  min-height: 120px;
  border: 1px dashed #d5cfc3;
  background: #fcfbf8;
  border-radius: 12px;
  display: grid;
  place-items: center;
  padding: 20px;
  color: var(--muted);
  text-align: center;
  cursor: pointer;
}

.media-drop:hover,
.media-drop.dragging {
  border-color: var(--orange);
  background: var(--orange-soft);
}

.media-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  padding: 0 12px 12px;
}

.media-editor .media-list {
  grid-template-columns: 1fr;
}

.explanation-layout-picker {
  display: grid;
  grid-template-columns: minmax(170px, .65fr) minmax(320px, 1.35fr);
  align-items: center;
  gap: 12px 18px;
  margin: 14px 0 18px;
  padding: 14px;
  border: 1px solid #eadfce;
  border-radius: 16px;
  background: linear-gradient(145deg, #fffdfa 0%, #fbf8f2 100%);
}
.explanation-layout-copy strong,
.explanation-layout-copy small {
  display: block;
}
.explanation-layout-copy strong {
  color: #4d3b2a;
  font-size: 12px;
}
.explanation-layout-copy small {
  margin-top: 4px;
  color: var(--muted);
  font-size: 8.5px;
  line-height: 1.8;
}
.explanation-layout-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}
.explanation-layout-option {
  min-width: 0;
  min-height: 68px;
  display: grid;
  grid-template-columns: 70px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  padding: 8px;
  border: 1px solid #ded5c8;
  border-radius: 13px;
  background: #fff;
  color: #6f6354;
  text-align: right;
  font: inherit;
  cursor: pointer;
  transition: border-color .16s ease, box-shadow .16s ease, transform .16s ease, background .16s ease;
}
.explanation-layout-option:hover {
  border-color: #e7a36f;
  transform: translateY(-1px);
}
.explanation-layout-option.selected {
  border-color: var(--orange);
  background: #fff8f1;
  box-shadow: 0 0 0 3px rgba(255, 105, 24, .09);
}
.explanation-layout-option b,
.explanation-layout-option small {
  display: block;
}
.explanation-layout-option b {
  color: #3e352b;
  font-size: 10.5px;
}
.explanation-layout-option.selected b { color: #d9570e; }
.explanation-layout-option small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 7.5px;
  line-height: 1.6;
}
.layout-option-preview {
  position: relative;
  height: 48px;
  display: grid;
  gap: 3px;
  padding: 5px;
  border: 1px solid #e2d8ca;
  border-radius: 7px;
  background: #fffdfa;
  overflow: hidden;
}
.layout-option-preview i {
  display: block;
  border-radius: 2px;
  background: #d9cfc1;
}
.layout-option-preview.is-horizontal { grid-template-rows: 1fr .7fr .55fr; }
.layout-option-preview.is-vertical {
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 1fr 1fr;
  direction: rtl;
}
.layout-option-preview.is-vertical::after {
  content: "";
  position: absolute;
  inset-block: 4px;
  inset-inline-start: 50%;
  width: 1px;
  background: #bbad9b;
}
.layout-option-preview.is-vertical i:nth-child(1) { grid-column: 1; grid-row: 1; }
.layout-option-preview.is-vertical i:nth-child(2) { grid-column: 1; grid-row: 2; }
.layout-option-preview.is-vertical i:nth-child(3) { grid-column: 2; grid-row: 1 / 3; }
.explanation-layout-option.selected .layout-option-preview i { background: #ffb07e; }
.vertical-layout-note {
  grid-column: 1 / -1;
  padding: 8px 11px;
  border-radius: 10px;
  background: #fff1e6;
  color: #9a5a1f;
  font-size: 8.5px;
  line-height: 1.8;
}

.media-card {
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  background: white;
  transition: transform .16s ease, border-color .16s ease, box-shadow .16s ease, opacity .16s ease;
}

.media-card.dragging {
  opacity: .55;
  transform: scale(.99);
}

.media-card.drag-over {
  border-color: var(--orange);
  box-shadow: 0 0 0 3px rgba(255, 105, 24, .12);
}

.media-card-order {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 8px;
  background: #f6f4ee;
  border-bottom: 1px solid var(--line);
}

.media-drag-handle {
  width: 26px;
  height: 26px;
  border-radius: 7px;
  display: grid;
  place-items: center;
  color: var(--muted);
  background: #fff;
  border: 1px solid var(--line);
  cursor: grab;
  user-select: none;
}

.order-badge {
  font-size: 10px;
  font-weight: 700;
  color: var(--muted);
  margin-inline-end: auto;
  margin-inline-start: 7px;
}

.order-btns {
  display: flex;
  gap: 3px;
}

.order-btn {
  width: 26px;
  height: 26px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: white;
  cursor: pointer;
  font-size: 13px;
  display: grid;
  place-items: center;
  transition: .1s;
}

.order-btn:hover:not(:disabled) {
  border-color: var(--orange);
  color: var(--orange);
  background: var(--orange-soft);
}

.order-btn:disabled {
  opacity: 0.35;
  cursor: default;
}

.media-card img {
  width: 100%;
  height: auto;
  max-height: none;
  display: block;
  object-fit: contain;
  background: #fff;
}

.media-card-body {
  padding: 8px;
}

.media-card-body input {
  width: 100%;
  height: 32px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 7px;
  font-size: 10px;
}

.media-card-actions {
  display: flex;
  gap: 3px;
  margin-top: 7px;
}

.image-dimensions {
  padding: 5px 8px;
  border-radius: 8px;
  background: #f6f3ed;
  color: var(--muted);
  font-size: 9px;
  margin: 5px 0;
}

.image-dimensions b {
  color: var(--ink);
}

.media-card-actions button {
  flex: 1;
  height: 30px;
  border: 0;
  border-radius: 7px;
  background: #f2f0ea;
  cursor: pointer;
  font-size: 10px;
}

.media-card-actions button:hover {
  color: var(--orange);
  background: var(--orange-soft);
}

.crop-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 260px;
  gap: 16px;
}

.crop-workspace {
  min-width: 0;
}

.crop-stage {
  min-height: 560px;
  height: min(68vh, 720px);
  border-radius: 14px;
  background:
    linear-gradient(45deg, #e0ddd8 25%, transparent 25%),
    linear-gradient(-45deg, #e0ddd8 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, #e0ddd8 75%),
    linear-gradient(-45deg, transparent 75%, #e0ddd8 75%), #f2f0ea;
  background-size: 16px 16px;
  background-position: 0 0, 0 8px, 8px -8px, -8px 0;
  display: grid;
  place-items: center;
  overflow: auto;
  padding: 18px;
}

.crop-stage canvas {
  display: block;
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  box-shadow: 0 8px 32px rgba(0,0,0,.18);
  cursor: crosshair;
  touch-action: none;
}

.crop-help {
  margin-top: 8px;
  color: var(--muted);
  font-size: 10px;
  text-align: center;
}

.crop-controls {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 14px;
  align-self: start;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.crop-controls h3 {
  margin: 0;
  font-size: 13px;
}

.crop-section-title {
  font-size: 10px;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .04em;
  margin-bottom: 6px;
}

.pixel-info {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
}

.pixel-info-card {
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #fff;
}

.pixel-info-card .pcard-label {
  display: block;
  color: var(--muted);
  font-size: 9px;
  margin-bottom: 2px;
}

.pixel-info-card .pcard-value {
  display: block;
  font-size: 12px;
  font-weight: 700;
  color: var(--ink);
}

.pixel-inputs-grid {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: end;
  gap: 6px;
}

.pixel-input-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.pixel-input-field label {
  font-size: 10px;
  color: var(--muted);
  font-weight: 600;
}

.pixel-input-field input {
  height: 36px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 8px;
  font-size: 13px;
  font-weight: 600;
  text-align: center;
  width: 100%;
}

.pixel-input-field input:focus { border-color: var(--orange); outline: none; }

.aspect-lock-btn {
  width: 30px;
  height: 36px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  cursor: pointer;
  display: grid;
  place-items: center;
  font-size: 14px;
  color: var(--muted);
  transition: .12s;
  align-self: flex-end;
}

.aspect-lock-btn.locked {
  border-color: var(--orange);
  background: var(--orange-soft);
  color: var(--orange);
}

.range-field {
  margin: 0;
}

.range-field label {
  display: flex;
  justify-content: space-between;
  font-size: 10px;
  color: var(--muted);
  margin-bottom: 4px;
}

.range-field input {
  width: 100%;
  accent-color: var(--orange);
}

.crop-toolbar {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
}

.crop-toolbar button {
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: white;
  cursor: pointer;
  font-size: 11px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  transition: .12s;
}

.crop-toolbar button:hover {
  border-color: #f2ad84;
  color: var(--orange);
  background: var(--orange-soft);
}

.crop-shortcuts {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
}

.topic-browser {
  border: 1px solid var(--line);
  border-radius: 16px;
  overflow: hidden;
  background: #fff;
}
.book-tags { margin-top: 18px; border: 1px solid var(--line); border-radius: 14px; padding: 13px; background: #fbfaf7; }
.book-tags-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.book-tags-head strong,.book-tags-head small { display: block; }
.book-tags-head small { color: var(--muted); font-size: 8px; }
.tag-selector { display: flex; flex-wrap: wrap; gap: 7px; }
.tag-choice { border: 1px solid var(--line); background: white; border-radius: 20px; padding: 6px 10px; cursor: pointer; font: inherit; font-size: 9px; color: inherit; }
.tag-choice input { display: none; }
.tag-choice.selected { color: #d9570e; background: var(--orange-soft); border-color: #f1ad83; font-weight: 800; }

.topic-browser-top {
  padding: 12px;
  display: flex;
  align-items: center;
  gap: 9px;
  border-bottom: 1px solid var(--line);
  background: #fbfaf7;
}

.topic-browser-top .mini-search {
  flex: 1;
  width: auto;
}

.topic-columns {
  display: grid;
  grid-template-columns: 1.05fr 1fr 1fr 1.25fr;
  min-height: 360px;
}

.topic-column {
  min-width: 0;
  border-left: 1px solid var(--line);
  padding: 9px;
  overflow: auto;
  max-height: 430px;
}

.topic-column:last-child {
  border-left: 0;
}

.topic-column-title {
  display: flex;
  justify-content: space-between;
  color: var(--muted);
  font-size: 9px;
  font-weight: 800;
  padding: 4px 7px 9px;
  position: sticky;
  top: 0;
  background: white;
  z-index: 1;
}

.topic-choice {
  width: 100%;
  min-height: 39px;
  border: 0;
  background: transparent;
  border-radius: 9px;
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 7px 8px;
  text-align: right;
  cursor: pointer;
  font-size: 10px;
}

.topic-choice:hover {
  background: #f7f5ef;
}

.topic-choice.active {
  color: #d9570e;
  background: var(--orange-soft);
  font-weight: 800;
}

.topic-choice span:last-child {
  margin-right: auto;
  color: #aaa59b;
}

.topic-leaf {
  min-height: 38px;
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 7px;
  border-radius: 9px;
  cursor: pointer;
  font-size: 10px;
  line-height: 1.7;
}

.topic-leaf:hover {
  background: #f7f5ef;
}

.topic-leaf input {
  margin-top: 4px;
  accent-color: var(--orange);
}

.topic-selected {
  padding: 11px 12px;
  border-top: 1px solid var(--line);
  background: #fbfaf7;
}

.topic-selected > strong {
  display: block;
  font-size: 10px;
  margin-bottom: 7px;
}

.chip-box {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px;
  min-height: 47px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #f0eee8;
  border-radius: 20px;
  padding: 5px 9px;
  font-size: 9px;
}

.chip.primary {
  color: #d9560c;
  background: var(--orange-soft);
}

.chip.topic-chip { align-items: flex-start; padding: 6px 10px; }
.tc-body { display: flex; flex-direction: column; gap: 2px; }
.tc-leaf { font-size: 10px; font-weight: 600; color: #2a2520; line-height: 1.3; }
.tc-ctx { font-size: 8px; color: var(--muted); line-height: 1.3; }

.chip button {
  border: 0;
  background: transparent;
  color: inherit;
  cursor: pointer;
  padding: 0;
}

.select-tree {
  max-height: 310px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 13px;
  padding: 9px;
}

.select-tree label {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px;
  border-radius: 8px;
  cursor: pointer;
}

.select-tree label:hover {
  background: #f7f5ef;
}

.select-tree .depth-1 { padding-right: 27px; }
.select-tree .depth-2 { padding-right: 48px; }
.select-tree .depth-3 { padding-right: 69px; }

.source-entry {
  display: grid;
  grid-template-columns: 78px minmax(240px, 1.65fr) minmax(155px, .8fr) minmax(130px, .7fr) 42px;
  gap: 10px;
  margin-bottom: 10px;
  align-items: center;
}

.source-primary-pick {
  height: 46px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  cursor: pointer;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  transition: border-color .16s ease, background .16s ease, color .16s ease, transform .16s ease;
}

.source-primary-pick input {
  accent-color: var(--orange);
  width: 15px;
  height: 15px;
}

.source-primary-pick:hover,
.source-primary-pick.on {
  border-color: rgba(255, 105, 24, .55);
  background: var(--orange-soft);
  color: var(--orange-dark);
}

.source-entry input:not([type="radio"]),
.source-entry select {
  min-width: 0;
  width: 100%;
  height: 46px;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0 12px;
  outline: 0;
  background: #fff;
  font-size: 13px;
  font-weight: 700;
}

.source-entry .row-action {
  width: 42px;
  height: 42px;
}

.form-grid .field select,
.form-grid .field input,
.form-grid .field textarea {
  min-height: 46px;
  border-radius: 10px;
  font-size: 13px;
}

.preview-sheet {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 24px;
}

.preview-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 13px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 18px;
}

.preview-question {
  font-family: "Vazirmatn", "B Nazanin", Tahoma, sans-serif;
  font-size: 18px;
  font-weight: 500;
  line-height: 2.3;
  margin-bottom: 18px;
}

.preview-image-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  padding: 12px 0;
}

.preview-image-figure {
  margin: 0;
}

.preview-upload-image,
.question-detail-image {
  display: block;
  width: 100%;
  height: auto;
  max-height: none;
  object-fit: contain;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
}

.question-detail-image {
  margin-top: 10px;
}

.preview-image-figure figcaption {
  font-size: 9px;
  color: var(--muted);
  text-align: center;
  margin-top: 5px;
}

.preview-section {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px dashed #dcd7cc;
  font-family: "Vazirmatn", "B Nazanin", Tahoma, sans-serif;
  font-size: 17px;
  font-weight: 500;
  line-height: 2.2;
}

.preview-section h4 {
  margin: 0 0 7px;
  color: var(--orange);
}

.wizard-footer {
  position: sticky;
  bottom: 0;
  background: rgba(255,255,255,.94);
  backdrop-filter: blur(10px);
  border-top: 1px solid var(--line);
  padding: 13px 20px;
  display: flex;
  gap: 8px;
}

.wizard-footer .left {
  margin-right: auto;
}

.question-page {
  padding-bottom: 90px;
}

.question-page-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 20px;
  margin-bottom: 20px;
}

.question-page-head h1 {
  margin: 5px 0;
  font-size: 27px;
}

.question-page-head p {
  margin: 0;
  color: var(--muted);
}

.question-head-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.autosave-state {
  color: var(--teal);
  font-size: 10px;
}

.question-page-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 210px;
  gap: 18px;
  align-items: start;
}

.question-form-main {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.question-form-section {
  position: relative;
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 13px;
  padding: 22px;
  background: rgba(255,255,255,.9);
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: 0 8px 24px rgba(46,39,29,.035);
  scroll-margin-top: 92px;
}

.question-structure-section {
  margin-top: 0;
  padding-top: 22px;
}

.question-structure-section .type-cards {
  position: static;
  margin: 0 0 18px;
}

.section-number {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 11px;
  color: #d9570e;
  background: var(--orange-soft);
  font-weight: 900;
}

.section-content {
  min-width: 0;
}

.section-content > h2 {
  margin: 0 0 4px;
  font-size: 18px;
}

.section-content > p {
  color: var(--muted);
  margin: 0 0 18px;
  font-size: 10px;
}

.question-form-nav {
  position: sticky;
  top: 92px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255,255,255,.92);
  padding: 12px;
  box-shadow: var(--shadow);
}

.question-form-nav > strong {
  display: block;
  padding: 4px 7px 10px;
  font-size: 11px;
}

.question-form-nav > button {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #625e56;
  text-decoration: none;
  padding: 8px;
  border-radius: 9px;
  font-size: 10px;
  border: 0;
  background: transparent;
  width: 100%;
  cursor: pointer;
}

.question-form-nav > button:hover {
  color: #d9570e;
  background: var(--orange-soft);
}

.question-form-nav > button span {
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  border-radius: 7px;
  background: #f0eee8;
  font-weight: 800;
}

.question-form-nav > button.done {
  color: #168878;
}

.question-form-nav > button.done span {
  background: var(--teal-soft);
  color: #168878;
}

.question-form-nav > button.done::after {
  content: "✓";
  margin-inline-start: auto;
  font-size: 12px;
  font-weight: 900;
  color: #1aa088;
}

.qa-summary {
  margin: 10px 2px 4px;
  padding: 7px 9px;
  border-radius: 9px;
  background: #f0eee8;
  color: var(--muted);
  font-size: 9px;
  font-weight: 700;
  text-align: center;
}

.qa-summary.all-done {
  background: var(--teal-soft);
  color: #168878;
}

/* ── پیش‌فرض ارثیِ پوشه (منبع/سال/پایه/رشته) ─────────── */
.folder-default-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 9px;
}

.folder-default-cell {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin: 0;
}

.folder-default-cell > span {
  font-size: 10.5px;
  font-weight: 700;
  color: var(--muted);
}

.folder-default-cell select { width: 100%; }

/* کادری که مقدارش از والد می‌آید: خودش چیزی «ندارد» ولی بی‌اثر هم نیست */
.folder-default-cell.inherited select {
  border-style: dashed;
  color: #9a7a2a;
}

.folder-default-inherit {
  display: block;
  margin-top: 7px;
  padding: 6px 9px;
  border-radius: 8px;
  background: var(--teal-soft);
  color: #168878;
  font-weight: 700;
  line-height: 1.7;
}

.folder-default-inherit:empty { display: none; }

/* نوارِ «پیش‌فرض پوشه» در ستون طبقه‌بندی میز کار */
.qw-folder-default {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 0 0 8px;
  padding: 6px 8px;
  border-radius: 8px;
  background: var(--teal-soft);
  color: #168878;
  font-size: 10.5px;
  font-weight: 700;
  line-height: 1.6;
}

.qw-folder-default svg {
  width: 13px;
  height: 13px;
  flex: none;
}

.qw-folder-default b { font-weight: 800; }

/* نوارِ دامنه بالای درختِ پیکر موضوع */
.tp-scope-strip {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin: 0 0 8px;
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--panel-soft, #faf8f4);
  font-size: 10.5px;
}

.tp-scope-strip svg {
  width: 14px;
  height: 14px;
  flex: none;
  color: var(--muted);
}

.tp-scope-strip > span {
  display: flex;
  align-items: baseline;
  gap: 5px;
}

.tp-scope-strip small { color: var(--muted); }
.tp-scope-strip b { font-weight: 800; }

.tp-scope-strip em {
  flex: 1 1 auto;
  font-style: normal;
  color: var(--muted);
  font-size: 10px;
}

.tp-default-strip {
  border-color: var(--teal);
  background: var(--teal-soft);
}

.tp-default-strip svg, .tp-default-strip b { color: #168878; }

/* ── درس‌های مجاز پوشه ─────────────────────────────── */
.lesson-allow-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.lesson-allow-choice {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 11px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #fff;
  font-size: 11px;
  font-weight: 700;
  color: #5b5650;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease;
}

.lesson-allow-choice:hover {
  border-color: #d8d2c6;
}

.lesson-allow-choice.on {
  border-color: var(--teal);
  background: var(--teal-soft);
  color: #168878;
}

.lesson-allow-choice input {
  width: 15px;
  height: 15px;
  min-height: 0;
  flex: none;
  margin: 0;
  padding: 0;
  border-radius: 4px;
  accent-color: var(--teal);
  cursor: pointer;
}

.lesson-scope-note {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 14px;
  padding: 9px 12px;
  border: 1px solid #e7eef0;
  border-radius: 10px;
  background: #f1f8f6;
  color: #2d766d;
  font-size: 11px;
}

.lesson-scope-note .ui-icon {
  width: 15px;
  height: 15px;
  flex-shrink: 0;
}

.lesson-scope-note b {
  color: #168878;
}

/* ── دسترسی پوشه‌محور ─────────────────────────────── */
.modal-hint {
  margin: 0 0 12px;
  padding: 9px 12px;
  border-radius: 10px;
  background: #f1f8f6;
  color: #2d766d;
  font-size: 11px;
  line-height: 1.7;
}

.modal-hint b { color: #168878; }

.access-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 16px;
}

.access-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 9px 11px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: #fff;
}

.access-row-main {
  display: flex;
  align-items: center;
  gap: 9px;
}

.access-row-main strong { font-size: 12px; }
.access-row-main small { display: block; margin-top: 3px; }

.access-row-scope {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 10px;
}

.access-direct { color: #2d766d; font-weight: 700; }

.access-inherit {
  padding: 4px 9px;
  border-radius: 7px;
  background: #fbf3e2;
  color: #9a7a2a;
  font-weight: 700;
}

.access-empty {
  padding: 18px;
  text-align: center;
  color: var(--muted);
  font-size: 11px;
  border: 1px dashed var(--line);
  border-radius: 11px;
  margin-bottom: 16px;
}

.access-add {
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.access-add > strong { display: block; margin-bottom: 6px; color:var(--ink); font-size: 13px; }
.access-add-hint { margin:0 0 14px; color:var(--muted); font-size:11px; line-height:1.8; }

.access-add-row {
  display: grid;
  grid-template-columns: 1fr 1fr auto;
  gap: 8px;
}

.access-add-row .select-control { height: 38px; }

.row-action.danger:hover { color: var(--red); }

.tooltip-access {
  margin-top: 7px;
  padding-top: 7px;
  border-top: 1px solid rgba(255, 255, 255, 0.14);
}

.tooltip-access > strong {
  display: block;
  font-size: 10px;
  margin-bottom: 5px;
  opacity: 0.85;
}

.tooltip-access-counts {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 5px;
}

.tooltip-access-counts span {
  padding: 2px 7px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.14);
  font-size: 9px;
  font-weight: 700;
}

.tooltip-access > small { opacity: 0.75; font-size: 9px; }

.tag-admin-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 16px; }
.sortable-tags { margin-top: 12px; }
.sortable-tag { display: flex; justify-content: space-between; align-items: center; border-bottom: 1px solid var(--line); padding: 8px 3px; font-size: 10px; }
.sortable-tag button { border: 0; background: #f1efe9; border-radius: 6px; cursor: pointer; margin-right: 3px; }
.curriculum-admin { display: flex; flex-direction: column; gap: 16px; }
.curriculum-card .curriculum-tree { padding: 12px 14px; }

.tree-node { position: relative; }

.tree-row {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 7px 10px;
  border-radius: 9px;
  cursor: default;
  transition: background .1s;
  min-height: 38px;
}

.tree-chapter-row {
  background: var(--orange-soft);
  color: #c8510d;
  border-radius: 10px;
  margin-bottom: 2px;
  font-size: 13px;
}

.tree-section-row {
  background: #f5f3ee;
  border-radius: 9px;
  margin-bottom: 1px;
  font-size: 12px;
}

.tree-item-row {
  font-size: 11px;
  color: var(--ink);
}

.tree-item-row:hover, .tree-section-row:hover { background: #eeeae2; }
.tree-chapter-row:hover { background: #fde8d6; }

.drag-handle {
  cursor: grab;
  color: #bbb;
  font-size: 14px;
  flex-shrink: 0;
  padding: 0 2px;
  user-select: none;
  letter-spacing: -1px;
}

.drag-handle:hover { color: var(--orange); }

.tree-toggle {
  width: 20px;
  height: 20px;
  border: 0;
  background: transparent;
  cursor: pointer;
  font-size: 11px;
  display: grid;
  place-items: center;
  color: var(--muted);
  flex-shrink: 0;
  border-radius: 4px;
  transition: .1s;
}

.tree-toggle:hover { background: rgba(0,0,0,.08); color: var(--ink); }
.tree-toggle.open { color: var(--orange); }

.tree-label { flex: 1; min-width: 0; }

.tree-bullet { color: var(--muted); font-size: 10px; flex-shrink: 0; }

.badge-sm {
  font-size: 9px;
  padding: 2px 7px;
  border-radius: 20px;
  background: rgba(0,0,0,.06);
  color: var(--muted);
  white-space: nowrap;
  flex-shrink: 0;
}

.tree-chapter-row .badge-sm { background: rgba(255,107,24,.15); color: #c8510d; }

.tree-acts {
  display: flex;
  gap: 3px;
  opacity: 0;
  transition: opacity .1s;
  flex-shrink: 0;
}

.tree-row:hover .tree-acts { opacity: 1; }

.tree-acts button {
  height: 26px;
  padding: 0 8px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: white;
  cursor: pointer;
  font-size: 10px;
  transition: .1s;
  white-space: nowrap;
}

.tree-acts button:hover { border-color: var(--orange); color: var(--orange); }
.btn-danger { color: #e05252 !important; }
.btn-danger:hover { border-color: #e05252 !important; background: #fff5f5 !important; }

.tree-children {
  margin-right: 28px;
  padding-right: 10px;
  border-right: 2px solid #e8e3d9;
  margin-top: 2px;
  margin-bottom: 4px;
}

.tree-children.closed { display: none; }

.tree-sections-wrap {
  margin-right: 28px;
  padding-right: 10px;
  border-right: 2px solid #f0c090;
}

.tree-empty-hint {
  padding: 8px 10px;
  color: var(--muted);
  font-size: 10px;
}

.tree-row.dragging { opacity: .4; }
.tree-row.drag-over { outline: 2px dashed var(--orange); outline-offset: -2px; background: var(--orange-soft) !important; }

/* ── Wizard topic tree browser ─────────────────────────────── */
/* ── Step-4 topic trigger card ── */
.topic-trigger-card {
  border: 1.5px solid var(--line);
  border-radius: 14px;
  padding: 14px 16px;
  margin-top: 14px;
  background: #faf8f4;
  transition: border-color .15s, box-shadow .15s;
}
.topic-trigger-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.topic-trigger-head strong { font-size: 13px; font-weight: 700; display: block; }
.topic-trigger-head p { font-size: 11px; color: var(--muted); margin: 2px 0 0; }

.topic-path-list {
  margin-top: 16px;
  padding: 14px;
  border: 1px solid #ebe5da;
  border-radius: 16px;
  background: rgba(255,255,255,.82);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.topic-path-item {
  position: relative;
  padding-top: 18px;
}

.topic-path-track {
  direction: rtl;
  display: flex;
  align-items: center;
  min-width: 0;
  overflow: hidden;
  scrollbar-width: none;
  border: 1px solid #dcd6cb;
  border-radius: 999px;
  background: #fbfaf7;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.7);
}

.topic-path-track::-webkit-scrollbar {
  display: none;
}

.topic-path-segment {
  flex: 1 1 0;
  min-width: 0;
  max-width: none;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 14px;
  border: 0;
  border-left: 0;
  border-inline-start: 1px solid #ded8cd;
  background: transparent;
  color: #635e56;
  white-space: nowrap;
  position: relative;
}

.topic-path-segment b {
  display: block;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 10.5px;
  font-weight: 800;
  line-height: 1.2;
}

.topic-path-segment:first-child {
  border-radius: 0 999px 999px 0;
}

.topic-path-segment:nth-child(even) { background: rgba(246, 244, 238, .82); }

.topic-path-segment.segment-1 {
  flex-basis: 26%;
}

.topic-path-segment.segment-2 {
  flex-basis: 28%;
}

.topic-path-segment:last-of-type {
  border-radius: 999px 0 0 999px;
  flex-basis: 46%;
  background: #deddd9;
  color: #292621;
}

.topic-path-segment:last-of-type b {
  font-weight: 900;
}

.topic-path-remove {
  width: 28px;
  height: 28px;
  margin-inline: 7px;
  border: 0;
  border-radius: 10px;
  background: #f3f0ea;
  color: #8c857a;
  display: grid;
  place-items: center;
  cursor: pointer;
  flex: 0 0 auto;
}

.topic-path-remove:hover {
  color: #d9570e;
  background: var(--orange-soft);
}

.topic-path-remove .ui-icon {
  width: 14px;
  height: 14px;
}

.topic-path-tooltip {
  position: absolute;
  z-index: 8;
  bottom: calc(100% + 7px);
  right: 42px;
  max-width: min(760px, calc(100vw - 140px));
  overflow: visible;
  white-space: nowrap;
  padding: 8px 12px;
  border: 1px solid rgba(235, 191, 74, .62);
  border-radius: 8px;
  background: #ffe16a;
  color: #45351f;
  box-shadow: 0 10px 22px rgba(98, 73, 30, .16);
  font-size: 10px;
  font-weight: 700;
  line-height: 1.7;
  word-spacing: 0;
  opacity: 0;
  transform: translateY(7px) scale(.98);
  pointer-events: none;
  transition: opacity .18s ease, transform .22s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.topic-path-tooltip::after {
  content: "";
  position: absolute;
  top: 100%;
  right: 26px;
  border: 7px solid transparent;
  border-top-color: #ffe16a;
  filter: drop-shadow(0 4px 3px rgba(98,73,30,.08));
}

.topic-path-item:hover .topic-path-tooltip,
.topic-path-item:focus-within .topic-path-tooltip {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: none;
}

/* ── Topic picker popup ── */
.modal-root:not(:empty) {
  position: relative;
  z-index: 100000;
}
.tp-overlay {
  position: fixed;
  inset: 0;
  background: rgba(20,18,14,0.48);
  backdrop-filter: blur(0);
  -webkit-backdrop-filter: blur(0);
  z-index: 100000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  pointer-events: none;
  transition:
    opacity .24s cubic-bezier(.2,.8,.2,1),
    backdrop-filter .32s cubic-bezier(.16,1,.3,1),
    -webkit-backdrop-filter .32s cubic-bezier(.16,1,.3,1);
}
.tp-overlay.tp-visible {
  opacity: 1;
  pointer-events: all;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.tp-overlay.tp-visible .tp-modal { transform: translateY(0) scale(1); opacity: 1; }

.tp-modal {
  background: #fff;
  border-radius: 22px;
  width: 100%;
  max-width: 980px;
  max-height: 88vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 32px 90px rgba(0,0,0,.24), 0 8px 28px rgba(0,0,0,.1), inset 0 1px 0 rgba(255,255,255,.9);
  transform: translateY(18px) scale(.982);
  transform-origin: center 44%;
  opacity: 0;
  will-change: transform, opacity;
  transition:
    transform .34s cubic-bezier(.16,1,.3,1),
    opacity .2s cubic-bezier(.2,.8,.2,1);
}
.tp-overlay:not(.tp-visible) .tp-modal {
  transition-duration: .24s, .17s;
  transition-timing-function: cubic-bezier(.4,0,1,1), linear;
}
.tp-tree-error {
  min-height: 220px;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 10px;
  padding: 28px;
  color: #756b5d;
  text-align: center;
}
.tp-tree-error b { font-size: 12px; }
.tp-tree-error span { color: var(--muted); font-size: 10px; }

/* Header */
.tp-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 18px;
  border-bottom: 1px solid #ede8de;
  background: #faf8f4;
  flex-shrink: 0;
}
.tp-title { font-size: 14px; font-weight: 700; color: #1a1814; flex-shrink: 0; }
.tp-search-wrap {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 7px;
  background: #fff;
  border: 1.5px solid #e0dbd0;
  border-radius: 10px;
  padding: 7px 12px;
  transition: border-color .15s, box-shadow .15s;
}
.tp-search-wrap:focus-within { border-color: var(--orange); box-shadow: 0 0 0 3px rgba(255,107,24,.1); }
.tp-search-wrap input { border: none; outline: none; background: transparent; font-family: inherit; font-size: 12px; width: 100%; color: #1a1814; }
.tp-search-icon { width: 16px; height: 16px; color: #8f8779; flex: 0 0 16px; }
.tp-close {
  width: 34px; height: 34px; border: none; background: none;
  font-size: 20px; cursor: pointer; border-radius: 9px; color: #a09080;
  display: flex; align-items: center; justify-content: center;
  transition: background .12s, color .12s; flex-shrink: 0;
}
.tp-close:hover { background: #f0ece2; color: #1a1814; }

/* Body: tree + sidebar */
.tp-body { display: flex; flex: 1; overflow: hidden; }

.tp-tree {
  flex: 1;
  overflow-y: auto;
  padding: 10px 8px;
  min-width: 0;
}
.tp-tree::-webkit-scrollbar { width: 5px; }
.tp-tree::-webkit-scrollbar-thumb { background: #e0dbd0; border-radius: 10px; }

.tp-sidebar-panel {
  width: 240px;
  min-width: 200px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  border-right: 1px solid #ede8de;
  background: #faf8f4;
  overflow: hidden;
}
.tp-sidebar-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  border-bottom: 1px solid #ede8de;
  font-size: 12px;
  font-weight: 700;
  flex-shrink: 0;
}
.tp-chips-list { flex: 1; overflow-y: auto; padding: 10px 10px 14px; }
.tp-chip {
  display: flex;
  align-items: flex-start;
  gap: 5px;
  background: #fff;
  border: 1px solid #e0dbd0;
  border-radius: 9px;
  padding: 7px 9px;
  margin-bottom: 6px;
  font-size: 10.5px;
  line-height: 1.4;
  transition: border-color .12s, box-shadow .12s;
}
.tp-chip:hover { border-color: var(--orange); box-shadow: 0 1px 6px rgba(255,107,24,.1); }
.tp-chip-lbl { flex: 1; color: #3a3530; display: flex; flex-direction: column; gap: 3px; }
.tp-chip-lbl { min-width: 0; }
.tp-chip-leaf,
.tp-chip-ctx {
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.tp-chip-leaf { font-weight: 600; color: #2a2520; font-size: 11px; line-height: 1.4; }
/* سطحی که مسیر در آن تمام شده (فصل/بخش/زیربخش) — چون انتخاب لازم نیست تا برگ برود */
.tp-chip-lvl {
  font-style: normal;
  font-size: 8.5px;
  font-weight: 700;
  color: var(--muted);
  background: #f1ece2;
  border-radius: 5px;
  padding: 1px 4px;
  margin-inline-start: 5px;
  vertical-align: middle;
}
.tp-level-hint {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  margin: 0;
  padding: 9px 12px;
  border-bottom: 1px solid #ede8de;
  font-size: 9.5px;
  line-height: 1.6;
  color: var(--muted);
  background: #fffaf3;
}
.tp-level-hint .ui-icon { width: 13px; height: 13px; flex-shrink: 0; margin-top: 1px; color: var(--orange); }
.tp-chip-ctx { font-size: 9px; color: var(--muted); line-height: 1.3; }
.tp-chip-rm { border: none; background: none; color: #c0b8a8; cursor: pointer; font-size: 16px; line-height: 1; padding: 0; flex-shrink: 0; transition: color .1s; margin-top: 2px; }
.tp-chip-rm:hover { color: #e04000; }
.tp-empty-sel { text-align: center; padding: 28px 10px; color: var(--muted); }
.tp-empty-sel p { font-size: 11.5px; font-weight: 600; margin: 0 0 4px; }
.tp-empty-sel small { font-size: 10px; }

/* Footer */
.tp-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 14px;
  padding: 12px 18px;
  border-top: 1px solid #ede8de;
  background: #faf8f4;
  flex-shrink: 0;
}
.tp-count-label { font-size: 11px; color: var(--muted); }

/* ── wt-* tree component (used inside .tp-tree) ── */
.tp-tree .wt-node { position: relative; }
.tp-tree .wt-ch {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.24s cubic-bezier(0.4,0,0.2,1), opacity 0.2s ease;
  opacity: 0;
  margin-right: 14px;
  padding-right: 8px;
  border-right: 2px solid #ede8de;
}
.tp-tree .wt-ch.open { grid-template-rows: 1fr; opacity: 1; }
.tp-tree .wt-ch-inner { overflow: hidden; min-height: 0; }
.tp-tree .wt-ch.tp-branch-motion { will-change: height, opacity; }
.tp-tree .wt-row {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 6px 8px;
  border-radius: 9px;
  cursor: pointer;
  transition: background .1s;
  user-select: none;
  min-height: 34px;
}
.tp-tree .wt-row:hover { background: #f5f1eb; }
.tp-tree .wt-row.has-sel > .wt-lbl { color: var(--orange); }
.tp-tree .wt-row.has-sel > .wt-arr { color: var(--orange); }
.tp-tree .wt-leaf { cursor: default; }
.tp-tree .wt-leaf:hover { background: #f6f2ec; }
.tp-tree .wt-leaf.wt-sel { background: var(--orange-soft); }
.tp-tree .wt-leaf.wt-sel .wt-lbl { color: #c85000; font-weight: 600; }
.tp-tree .wt-arr {
  width: 16px;
  height: 16px;
  display: grid;
  place-items: center;
  font-size: 10px;
  color: #c0b8a8;
  text-align: center;
  flex-shrink: 0;
  line-height: 1;
  transform: rotate(0);
  transform-origin: center;
  transition: color .18s ease, transform .22s cubic-bezier(.2,.8,.2,1);
}
.tp-tree .wt-arr.open { color: var(--orange); transform: rotate(90deg); }
.tp-tree .wt-arr-placeholder { width: 16px; flex-shrink: 0; }
.tp-tree .wt-lbl {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 12px;
  line-height: 1.45;
  color: #1a1814;
}
.tp-tree .wt-badge { background: var(--orange); color: #fff; font-size: 9px; font-weight: 700; padding: 1px 8px; border-radius: 20px; flex-shrink: 0; }
.tp-tree .wt-cnt { font-size: 10px; color: #c0bab0; flex-shrink: 0; white-space: nowrap; }
.tp-tree .wt-cb { display: flex; align-items: center; flex-shrink: 0; padding: 3px 2px; cursor: pointer; }
.tp-tree .wt-cb input { width: 14px; height: 14px; accent-color: var(--orange); cursor: pointer; }
.tp-tree .wt-empty { font-size: 10.5px; color: var(--muted); padding: 4px 10px; margin: 0; }
/* Level font weights (type names as stored in topicNodes) */
.tp-tree .wt-row-education > .wt-lbl { font-weight: 700; font-size: 13.5px; }
.tp-tree .wt-row-grade > .wt-lbl { font-weight: 700; font-size: 13px; }
.tp-tree .wt-row-field > .wt-lbl { font-weight: 600; font-size: 12.5px; }
.tp-tree .wt-row-lesson > .wt-lbl { font-size: 12px; }
.tp-tree .wt-row-book > .wt-lbl { color: #b84500; font-weight: 600; }
.tp-tree .wt-row-chapter > .wt-lbl { font-size: 12px; }
.tp-tree .wt-row-section > .wt-lbl { font-size: 11.5px; }
.tp-tree .wt-row-item > .wt-lbl,
.tp-tree .wt-leaf > .wt-lbl { font-size: 11px; color: #555; }

@media (prefers-reduced-motion: reduce) {
  .tp-overlay,
  .tp-modal,
  .tp-tree .wt-ch,
  .tp-tree .wt-arr { transition: none !important; }
}

/* ── کاوشگر ساختار: نقشه مباحث / منابع / برچسب‌ها ──
   هم‌زبان با پاپ‌آپ «انتخاب موضوع» (.tp-tree .wt-*): ردیف‌های سبک، بازوبستهٔ نرم
   و عملیاتی که فقط روی ردیفِ زیرِ نشانگر دیده می‌شوند. */
.stx-page { max-width: 1180px; margin: 0 auto; }
.stx-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}
.stx-eyebrow { font-size: 10px; font-weight: 800; color: var(--orange); letter-spacing: .04em; }
.stx-head h1 { margin: 5px 0 5px; font-size: 26px; letter-spacing: -.04em; }
.stx-head p { margin: 0; color: var(--muted); font-size: 11.5px; }
.stx-tabs {
  display: flex;
  gap: 3px;
  flex: 0 0 auto;
  padding: 4px;
  border: 1px solid #e7e1d7;
  border-radius: 13px;
  background: #f5f1eb;
}
.stx-tab {
  border: none;
  background: none;
  font: inherit;
  font-size: 11.5px;
  font-weight: 750;
  color: #6d645a;
  padding: 7px 15px;
  border-radius: 10px;
  cursor: pointer;
  transition: background .15s ease, color .15s ease, box-shadow .15s ease;
}
.stx-tab:hover { color: #2a2520; }
.stx-tab.on { background: #fff; color: var(--orange); box-shadow: 0 2px 6px rgba(55, 42, 27, .08); }

.stx-panel {
  border: 1px solid #e2dbd1;
  border-radius: 18px;
  background: #fff;
  overflow: hidden;
  box-shadow: 0 14px 38px rgba(53, 43, 30, .06);
}
.stx-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  padding: 11px 12px;
  border-bottom: 1px solid #ece6dd;
  background: #fbfaf8;
}
.stx-search {
  flex: 1 1 240px;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  padding: 0 11px;
  border: 1.5px solid #e0dbd0;
  border-radius: 11px;
  background: #fff;
  color: #978b7d;
  transition: border-color .16s ease, box-shadow .16s ease;
}
.stx-search:focus-within { border-color: var(--orange); box-shadow: 0 0 0 3px rgba(255, 107, 24, .1); }
.stx-search .ui-icon { width: 16px; height: 16px; flex: 0 0 16px; }
.stx-search input {
  min-width: 0;
  width: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  color: #28231e;
  font: inherit;
  font-size: 11.5px;
}
.stx-search > button {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  flex: 0 0 24px;
  padding: 0;
  border: 0;
  border-radius: 7px;
  background: #f4efe9;
  color: #887b6e;
  cursor: pointer;
}
.stx-search > button:hover { background: #ece5dc; color: #3f3832; }
.stx-search > button .ui-icon { width: 13px; height: 13px; }
.stx-count { font-size: 10px; font-weight: 750; color: #8a7f72; white-space: nowrap; }
.stx-bar-acts { display: flex; align-items: center; gap: 6px; margin-inline-start: auto; }
.stx-tool {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  min-height: 34px;
  padding: 0 11px;
  border: 1px solid #e1d9ce;
  border-radius: 9px;
  background: #fff;
  color: #61584f;
  font: inherit;
  font-size: 10px;
  font-weight: 750;
  cursor: pointer;
  transition: .16s ease;
}
.stx-tool:hover { border-color: #efb48d; color: #ba5418; background: #fff9f5; }
.stx-tool .ui-icon { width: 14px; height: 14px; }
.stx-add { min-height: 34px; font-size: 11px; }

.stx-tree { padding: 10px 10px 18px; }
.stx-node { position: relative; }
.stx-ch {
  display: grid;
  grid-template-rows: 0fr;
  opacity: 0;
  transition: grid-template-rows .24s cubic-bezier(.4, 0, .2, 1), opacity .2s ease;
  margin-inline-start: 15px;
  padding-inline-start: 9px;
  border-inline-start: 2px solid #f0ebe2;
}
.stx-ch.open { grid-template-rows: 1fr; opacity: 1; }
.stx-ch-inner { overflow: hidden; min-height: 0; }
.stx-row {
  position: relative;
  display: flex;
  align-items: center;
  gap: 7px;
  min-height: 36px;
  padding: 5px 9px;
  border-radius: 10px;
  cursor: grab;
  user-select: none;
  transition: background .12s ease, box-shadow .12s ease, opacity .12s ease;
}
.stx-row:active { cursor: grabbing; }
.stx-row:hover { background: #f7f3ed; }
.stx-row.dragging { opacity: .4; }
.stx-row.drag-over-before { box-shadow: inset 0 2px 0 var(--orange); }
.stx-row.drag-over-after { box-shadow: inset 0 -2px 0 var(--orange); }

/* ── کشیدن‌ورهاکردن نقشه مباحث ────────────────────────────────────────────────
   سه حالتِ رهاکردن باید در یک نگاه فرق داشته باشند: خطِ نازک یعنی «بین این دو»
   و کادرِ نارنجی یعنی «داخلِ این شاخه». ردیفِ در حال کشیدن روشن و کم‌رنگ می‌ماند
   (نه تیره) تا نگاه دنبالِ مقصد برود نه مبدأ. */
.stx-tree.tm-dnd .stx-row { cursor: grabbing; }
.stx-tree.tm-dnd .stx-row:hover { background: transparent; }
/* دستگیرهٔ مبدأ باید تا dragend در چیدمان بماند؛ حذفِ آن با display:none
   همان لحظهٔ dragstart می‌تواند کشیدنِ بومی مرورگر را قطع کند. */
.stx-tree.tm-dnd .stx-row:not(.tm-dragging) .stx-acts {
  opacity: 0;
  pointer-events: none;
}
.stx-row.tm-dragging {
  opacity: .5;
  background: #fdf7f1;
  box-shadow: inset 0 0 0 1.5px #eccdb0;
}
.stx-row.tm-before::before,
.stx-row.tm-after::after {
  content: "";
  position: absolute;
  inset-inline: 2px;
  height: 2.5px;
  border-radius: 3px;
  background: var(--orange);
  box-shadow: 0 0 0 3px rgba(224, 122, 42, .14);
}
.stx-row.tm-before::before { top: -2px; }
.stx-row.tm-after::after { bottom: -2px; }
.stx-row.tm-into {
  background: #fff5ec;
  box-shadow: inset 0 0 0 2px var(--orange);
}
.stx-row.tm-into > .stx-lbl { color: #a94410; }
.stx-row.tm-into::after {
  content: "داخل این شاخه";
  margin-inline-start: auto;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--orange);
  color: #fff;
  font-size: 9.5px;
  font-weight: 800;
  white-space: nowrap;
}
/* تصویرِ کشیدن: یک چیپِ مات و خوانا به‌جای اسنپ‌شاتِ نیمه‌شفافِ پیش‌فرضِ مرورگر */
.tm-ghost {
  position: fixed;
  top: -1000px;
  left: -1000px;
  z-index: 9999;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  max-width: 320px;
  padding: 7px 12px;
  border: 1px solid #edcbaa;
  border-radius: 11px;
  background: #fff;
  box-shadow: 0 12px 26px rgba(53, 43, 30, .18);
  font-size: 12px;
  font-weight: 750;
  color: #2b2620;
  white-space: nowrap;
}
.tm-ghost-kind {
  padding: 2px 7px;
  border-radius: 999px;
  background: #fff1e2;
  color: #b45309;
  font-size: 9.5px;
  font-weight: 800;
}

/* ── پاپ‌آپ انتقال و حذفِ شاخهٔ نقشه ─────────────────────────────────────────── */
.tmx-lead { margin: 0 0 8px; font-size: 12px; color: #4a4239; }
.tmx-hint { margin: 0 0 10px; font-size: 11px; line-height: 1.9; color: var(--muted); }
.tmx-notes { margin: 0 0 10px; padding-inline-start: 18px; font-size: 11.5px; line-height: 2; color: #7a4a17; }
.tmx-notes li { margin-bottom: 2px; }
.tmx-search {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 8px;
  padding: 0 10px;
  min-height: 36px;
  border: 1px solid #e3dbd0;
  border-radius: 10px;
  background: #fff;
}
.tmx-search .ui-icon { width: 14px; height: 14px; color: #a89e92; }
.tmx-search input { flex: 1; min-width: 0; border: 0; outline: none; background: none; font: inherit; font-size: 11.5px; }
.tmx-tree {
  max-height: min(46vh, 420px);
  overflow: auto;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fdfcfa;
}
.tmx-row.is-self > .tmx-pick { opacity: .45; }
.tmx-pick {
  display: flex;
  align-items: center;
  gap: 7px;
  width: 100%;
  min-height: 30px;
  /* تورفتگی با padding نه margin؛ وگرنه عرضِ ۱۰۰٪ به‌علاوهٔ حاشیه، کادر را افقی می‌کشد */
  padding: 4px 8px;
  padding-inline-start: calc(8px + var(--tmx-depth, 0) * 14px);
  border: 1px solid transparent;
  border-radius: 8px;
  background: none;
  color: #241f1a;
  font: inherit;
  font-size: 11.5px;
  text-align: start;
  cursor: pointer;
}
.tmx-pick:hover:not(:disabled) { background: #fff5ec; border-color: #f0cbb1; }
.tmx-pick.on { background: #fff1e2; border-color: var(--orange); font-weight: 750; }
.tmx-pick:disabled { cursor: default; color: #a79e93; }
.tmx-kind {
  flex: 0 0 auto;
  padding: 1px 6px;
  border-radius: 999px;
  background: #f2ede5;
  color: #8a7f72;
  font-size: 9px;
  font-weight: 800;
}
.tmx-title { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.tmdel-line { display: flex; align-items: center; gap: 7px; margin: 0 0 10px; font-size: 11.5px; color: #4a4239; }
.tmdel-line .ui-icon { width: 15px; height: 15px; color: #a89e92; }
.tmdel-impact {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid #e3dbd0;
  border-radius: 12px;
  background: #fbfaf7;
}
.tmdel-impact.is-hot { border-color: #e9b7b1; background: #fff5f3; }
.tmdel-impact .tmdel-num {
  flex: 0 0 auto;
  min-width: 46px;
  text-align: center;
  font-size: 22px;
  font-weight: 850;
  color: #8a7f72;
}
.tmdel-impact.is-hot .tmdel-num { color: #c0392b; }
.tmdel-impact strong { display: block; font-size: 12.5px; margin-bottom: 3px; }
.tmdel-impact small { display: block; font-size: 11px; line-height: 1.95; color: var(--muted); }
.tmdel-alt {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 10px;
  padding: 11px 14px;
  border: 1px dashed #d9cfc2;
  border-radius: 12px;
  background: #fff;
}
.tmdel-alt strong { display: block; font-size: 12px; margin-bottom: 3px; }
.tmdel-alt small { display: block; font-size: 11px; line-height: 1.9; color: var(--muted); }
.tmdel-alt button { flex: 0 0 auto; margin-inline-start: auto; }
.tmdel-check {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-top: 12px;
  font-size: 11.5px;
  line-height: 1.9;
  color: #3b342d;
  cursor: pointer;
}
.tmdel-check input { margin-top: 4px; flex: 0 0 auto; }
.tmdel-word { margin-top: 10px; }
.stx-arr {
  width: 16px;
  flex: 0 0 16px;
  text-align: center;
  font-size: 10px;
  line-height: 1;
  color: #c0b8a8;
  transition: color .15s ease;
}
.stx-row:hover .stx-arr { color: var(--orange); }
.stx-arr-ph { width: 16px; flex: 0 0 16px; }
.stx-lbl {
  flex: 0 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 12px;
  line-height: 1.45;
  color: #1a1814;
}
.stx-lbl mark { background: #ffe2c9; color: #a94410; border-radius: 3px; padding: 0 1px; }
.stx-cnt {
  font-size: 9.5px;
  font-weight: 750;
  color: #a89f93;
  background: #f3efe8;
  border-radius: 999px;
  padding: 2px 7px;
  flex-shrink: 0;
  white-space: nowrap;
}
.stx-meta { display: inline-flex; align-items: center; gap: 4px; flex-shrink: 0; max-width: 45%; overflow: hidden; }
.stx-logo { width: 20px; height: 20px; flex: 0 0 20px; display: inline-flex; align-items: center; justify-content: center; }
.stx-logo svg, .stx-logo img { width: 100%; height: 100%; object-fit: contain; }
.stx-acts {
  display: flex;
  align-items: center;
  gap: 3px;
  flex-shrink: 0;
  margin-inline-start: auto;
  opacity: 0;
  transition: opacity .14s ease;
}
.stx-row:hover .stx-acts,
.stx-row:focus-within .stx-acts { opacity: 1; }
.stx-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  min-height: 27px;
  padding: 0 8px;
  border: 1px solid #e5ded4;
  border-radius: 8px;
  background: #fff;
  color: #665d54;
  font: inherit;
  font-size: 10px;
  font-weight: 750;
  white-space: nowrap;
  cursor: pointer;
  transition: border-color .14s ease, background .14s ease, color .14s ease;
}
.stx-btn .ui-icon { width: 14px; height: 14px; }
.stx-btn:hover { border-color: #cfc3b6; background: #f4efe9; color: #2f2a25; }
.stx-btn:disabled { opacity: .35; cursor: default; }
.stx-btn:disabled:hover { border-color: #e5ded4; background: #fff; color: #665d54; }
.stx-btn-add { border-color: #f0cbb1; background: #fff6ef; color: #bf571d; }
.stx-btn-add:hover { border-color: #e8aa7e; background: #ffe8d8; color: #a94410; }
.stx-btn-del:hover { border-color: #e6b9b6; background: #fff1f0; color: #b33c3c; }
/* دستگیرهٔ کشیدن: هم‌قدِ بقیهٔ دکمه‌ها، ولی با نشانگرِ «بگیر» نه «کلیک» */
.stx-grip { cursor: grab; color: #a39888; }
.stx-grip:active { cursor: grabbing; }
.stx-grip:hover { border-color: #f0cbb1; background: #fff6ef; color: #bf571d; }

/* سطح‌های درخت — همان سلسله‌مراتبِ تایپوگرافیکِ پاپ‌آپ انتخاب موضوع */
.stx-row-education > .stx-lbl { font-weight: 800; font-size: 13.5px; }
.stx-row-grade > .stx-lbl { font-weight: 750; font-size: 13px; }
.stx-row-field > .stx-lbl { font-weight: 700; font-size: 12.5px; }
.stx-row-lesson > .stx-lbl { font-weight: 650; font-size: 12px; }
.stx-row-book > .stx-lbl { color: #b84500; font-weight: 700; }
.stx-row-chapter > .stx-lbl { font-size: 12px; }
.stx-row-section > .stx-lbl { font-size: 11.5px; }
.stx-row-item > .stx-lbl { font-size: 11px; color: #5b544c; }
.stx-row-sub > .stx-lbl { font-size: 10.5px; color: #7a736a; }
.stx-row-source-type > .stx-lbl { font-weight: 800; font-size: 13px; }
.stx-row-source > .stx-lbl { font-size: 12px; }
.stx-row-lesson-def > .stx-lbl { font-weight: 750; font-size: 13px; }
.stx-row-tag > .stx-lbl { font-size: 11.5px; color: #5b544c; }
/* برچسبِ بایگانی‌شده: از فهرست انتخاب بیرون است ولی هنوز روی سؤال‌ها نشسته */
.stx-row-archived > .stx-lbl { color: #a79e93; }
.stx-tag-archived {
  font-style: normal;
  font-size: 9px;
  font-weight: 750;
  color: #8a8177;
  background: #f3efe8;
  border: 1px solid #e7e0d6;
  border-radius: 999px;
  padding: 1px 6px;
}

.stx-empty { margin: 0; padding: 5px 11px; font-size: 10.5px; color: #c0b8ae; font-style: italic; }
.stx-blank {
  margin: 8px 0;
  padding: 40px 24px;
  text-align: center;
  color: var(--muted);
  font-size: 12px;
  background: #faf9f6;
  border: 1.5px dashed #e0d9cf;
  border-radius: 14px;
}
/* ── صفحهٔ پیوند مباحث ─────────────────────────────────────────────────────
   دو بلوک زیر هم: پیشنهادهای همگام‌سازی و پیوندهای ثبت‌شده. هر دو از همان
   ردیف/شاخهٔ stx استفاده می‌کنند و فقط سرِ بلوک و چیپ‌های مسیر تازه‌اند. */
.tl-page { display: flex; flex-direction: column; gap: 18px; }

.tl-block {
  padding: 4px 0 8px;
  border-top: 1px solid #efe9e0;
}
.tl-block:first-child { border-top: 0; }

.tl-block-head {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  flex-wrap: wrap;
  padding: 10px 4px 14px;
}
.tl-block-head > div { flex: 1 1 320px; min-width: 0; }
.tl-block-head h3 { margin: 4px 0 4px; font-size: 13.5px; font-weight: 800; color: #1a1814; }
.tl-block-head p { margin: 0; font-size: 11px; line-height: 1.95; color: var(--muted); }
.tl-block-head > button { flex: 0 0 auto; margin-inline-start: auto; }

.tl-kicker {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 9.5px;
  font-weight: 800;
  letter-spacing: .02em;
  color: #bf571d;
  text-transform: none;
}
.tl-kicker .ui-icon { width: 13px; height: 13px; }

.stx-row-linkbucket > .stx-lbl,
.stx-row-lesson > .stx-lbl { font-weight: 700; }
.stx-row-linkbucket > .stx-lbl { display: inline-flex; align-items: center; gap: 6px; }
.stx-row-linkgroup > .stx-lbl { font-size: 11.5px; }
.stx-row-linkpair > .stx-lbl,
.stx-row-linkpath > .stx-lbl { font-size: 11px; color: #5b544c; display: inline-flex; align-items: center; gap: 8px; }

.tl-scope {
  flex: 0 0 auto;
  padding: 1px 7px;
  border-radius: 999px;
  background: #fff4ea;
  border: 1px solid #f2d9c2;
  color: #a85f18;
  font-size: 9.5px;
  font-weight: 750;
}
.tl-arrow { color: #c0b8a8; font-size: 11px; }
.tl-books { font-size: 10px; color: #a89f93; }
.tl-path { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #8a8177; font-size: 10.5px; }

.tl-warn {
  display: flex;
  align-items: center;
  gap: 7px;
  margin: 0 0 10px;
  padding: 9px 11px;
  border: 1px solid #f0d6b4;
  border-radius: 10px;
  background: #fff8ef;
  color: #98601c;
  font-size: 11px;
  line-height: 1.8;
}
.tl-warn .ui-icon { width: 15px; height: 15px; flex: 0 0 15px; }

.tl-confirm-list { display: flex; flex-direction: column; gap: 7px; }
.tl-confirm-row {
  display: flex;
  align-items: baseline;
  gap: 9px;
  padding: 8px 11px;
  border: 1px solid #e6ded3;
  border-radius: 10px;
  background: #fff;
}
.tl-confirm-row.is-old { background: #faf8f4; border-style: dashed; }
.tl-confirm-row b { flex: 0 0 auto; font-size: 11.5px; color: #1a1814; }
.tl-confirm-row span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 10.5px; color: var(--muted); }
.tl-confirm-row i { margin-inline-start: auto; font-style: normal; font-size: 9.5px; color: #a89f93; }

.stx-extra:empty { display: none; }
.stx-side-card {
  margin-top: 16px;
  padding: 14px 16px;
  border: 1px solid #e2dbd1;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 10px 26px rgba(53, 43, 30, .04);
}
.stx-side-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.stx-side-head strong { display: block; font-size: 13px; }
.stx-side-head small { display: block; color: var(--muted); font-size: 10px; margin-top: 2px; }

@media (hover: none) {
  .stx-acts { opacity: 1; }
  /* لمس کشیدنِ HTML5 ندارد؛ آنجا دکمهٔ «جابه‌جایی» همین کار را می‌کند */
  .stx-grip { display: none; }
}
@media (max-width: 720px) {
  .stx-head { align-items: flex-start; }
  .stx-tabs { width: 100%; }
  .stx-tab { flex: 1; padding: 7px 6px; }
  .stx-bar-acts { margin-inline-start: 0; width: 100%; }
  .stx-add { margin-inline-start: auto; }
  .stx-meta { display: none; }
  /* در عرض کم، عنوانِ ردیف اولویت دارد: تورفتگی کمتر، دکمه‌های جمع‌وجورِ همیشه‌پیدا */
  .stx-tree { padding: 8px 6px 14px; }
  .stx-ch { margin-inline-start: 7px; padding-inline-start: 5px; }
  .stx-row { padding: 5px 6px; gap: 5px; }
  .stx-acts { opacity: 1; gap: 2px; }
  .stx-btn { padding: 0 6px; min-height: 26px; }
  .stx-cnt { padding: 2px 5px; }
}
@media (prefers-reduced-motion: reduce) {
  .stx-ch { transition: none; }
}

.folder-context {
  border-top: 1px solid var(--line);
  margin-top: 10px;
  padding: 12px 7px 4px;
}

.folder-context small,
.folder-context strong,
.folder-context span {
  display: block;
}

.folder-context small,
.folder-context span {
  color: var(--muted);
  font-size: 8px;
}

.folder-context strong {
  font-size: 10px;
  margin: 3px 0 7px;
}

.question-save-bar {
  position: fixed;
  z-index: 30;
  bottom: 16px;
  left: 30px;
  right: 274px;
  max-width: 1210px;
  margin: auto;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 12px 14px;
  border: 1px solid rgba(224,219,209,.9);
  border-radius: 16px;
  background: rgba(255,255,255,.94);
  backdrop-filter: blur(18px);
  box-shadow: 0 16px 45px rgba(38,32,25,.15);
}

.question-save-bar > div {
  margin-left: auto;
}

.question-save-bar strong,
.question-save-bar span {
  display: block;
}

.question-save-bar strong {
  font-size: 11px;
}

.question-save-bar span {
  color: var(--muted);
  font-size: 8px;
  margin-top: 2px;
}

.question-detail-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 18px;
}

.detail-main,
.detail-side {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.detail-card {
  border: 1px solid var(--line);
  border-radius: 15px;
  padding: 16px;
}

.detail-card h3 {
  font-size: 12px;
  margin: 0 0 12px;
}

.timeline {
  position: relative;
  padding-right: 20px;
}

.timeline::before {
  content: "";
  position: absolute;
  right: 5px;
  top: 7px;
  bottom: 7px;
  width: 1px;
  background: #dedad1;
}

.timeline-item {
  position: relative;
  padding: 0 0 16px;
}

.timeline-item::before {
  content: "";
  position: absolute;
  right: -20px;
  top: 5px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--orange);
  border: 3px solid #fff0e7;
}

.timeline-item strong,
.timeline-item small {
  display: block;
}

.timeline-item strong { font-size: 10px; }
.timeline-item small { font-size: 9px; color: var(--muted); margin-top: 2px; }

/* رنگ نقطهٔ تایم‌لاین بر اساس نوع رویداد بازبینی */
.timeline-item.tl-approved::before { background: #168878; border-color: var(--teal-soft); }
.timeline-item.tl-returned_for_correction::before { background: #c75e15; border-color: var(--orange-soft); }
.timeline-item.tl-rejected::before { background: var(--red); border-color: var(--red-soft); }
.timeline-item.tl-pending_review::before { background: #b27b00; border-color: var(--yellow-soft); }
.timeline-item.tl-corrected::before { background: var(--blue); border-color: var(--blue-soft); }
.timeline-item.tl-draft::before,
.timeline-item.tl-hidden::before,
.timeline-item.tl-neutral::before { background: #b6afa2; border-color: #f0eee8; }

.tl-reason {
  display: block;
  margin-top: 3px;
  padding: 5px 8px;
  border-radius: 7px;
  background: #faf7f1;
  border-right: 2px solid #e6ddcc;
  color: #6a6359;
  font-size: 9px;
  line-height: 1.7;
}

.timeline-empty {
  margin: 0;
  padding: 14px;
  text-align: center;
  color: var(--muted);
  font-size: 10px;
}

/* ── هاورِ ردپای بازبینی: چه چیزی در این نسخه عوض شد ───────────────────────
   موتور تولتیپ همان پورتالِ چیپ‌هاست؛ عنصرِ میزبان فقط باید `has-meta-tip` و یک
   `.meta-tooltip` درونیِ پنهان داشته باشد. */
.has-meta-tip { position: relative; }
.has-meta-tip > .meta-tooltip { display: none; }

.timeline-item.has-meta-tip { cursor: help; border-radius: 8px; transition: background .16s ease; }
.timeline-item.has-meta-tip:hover,
.timeline-item.has-meta-tip:focus-visible { background: #fdf7f0; outline: none; }

.tl-change-count {
  display: inline-block;
  margin-inline-start: 6px;
  padding: 1px 6px;
  border-radius: 999px;
  background: #fff1e4;
  border: 1px solid #f3d6bb;
  color: #a85f18;
  font-size: 8px;
  font-weight: 700;
  vertical-align: middle;
}

.tl-change-tooltip {
  flex-direction: column;
  align-items: stretch;
  gap: 6px;
  width: max-content;
  max-width: min(560px, 84vw);
  white-space: normal;
}

.tl-change-tooltip .meta-tip-row {
  display: flex;
  gap: 8px;
  align-items: baseline;
  white-space: normal;
  overflow: visible;
  text-overflow: clip;
}

.tl-change-tooltip .meta-tip-row i {
  flex: 0 0 auto;
  font-style: normal;
  font-weight: 700;
  color: #9a5a1f;
}

.tl-change-tooltip .meta-tip-row em {
  font-style: normal;
  color: #4d3b2a;
  overflow-wrap: anywhere;
}

.tl-change-tooltip .tl-tip-note { color: #857b6d; }

/* ── صفحهٔ ورود مدیران ─────────────────────────────── */
.auth-gate[hidden] { display: none !important; }

.auth-gate {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: linear-gradient(160deg, #f7f6f2, #efeae0);
}

.auth-card {
  width: 100%;
  max-width: 380px;
  padding: 28px 26px 22px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 24px 60px rgba(40, 33, 22, 0.16);
}

/* لاکاپ برند در کارت ورود: نشان کنارِ لوگوتایپ، با یک خط‌کشِ مویی میانشان.
   سه چیز که تجربه شد و مهم است:
   ۱) لوگوتایپ باید از نشان پهن‌تر باشد. هر دو ارتفاع‌محورند ولی نسبت‌هایشان
      خیلی فرق دارد (۱٫۳۳ در برابر ۲٫۲۲)؛ قبلاً هر دو هم‌ارتفاع بودند و
      لوگوتایپ ۴۶٫۵px درمی‌آمد — باریک‌تر از خودِ نشان. الان ۵۳٫۳ در برابر ۶۶٫۷.
   ۲) نشان باید بلندتر باشد (۴۰ در برابر ۳۰). نشان یک تودهٔ تُوپُرِ سبز است و
      لوگوتایپ خطوطِ نازکِ طلایی؛ در ارتفاعِ برابر، نشان دیداری غالب می‌شود.
   ۳) خط‌کش با `var(--line)` (#ebe8e0) در ۱px عملاً دیده نمی‌شود؛ یک پله
      تیره‌تر لازم است. ارتفاعش به عنصرِ کوتاه‌تر (لوگوتایپ) گره می‌خورد. */
.auth-brand {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  margin: 2px 0 20px;
}

.auth-brand .brand-mark {
  width: 53.3px;
  height: 40px;
  flex: 0 0 auto;
  border-radius: 0;
  background: none;
  display: grid;
  place-items: center;
}

.auth-brand .brand-type { height: 30px; }

.auth-brand-rule {
  width: 1px;
  height: 30px;
  flex: 0 0 1px;
  background: #ddd6c8;
}

.auth-card h1 { font-size: 17px; margin: 0 0 6px; text-align: center; }
.auth-sub { margin: 0 0 18px; font-size: 11px; color: var(--muted); line-height: 1.8; text-align: center; }

.auth-form label {
  display: block;
  margin-bottom: 13px;
  font-size: 11px;
  font-weight: 700;
  color: #5b5650;
}

.auth-form input {
  width: 100%;
  height: 44px;
  margin-top: 6px;
  padding: 0 13px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: #fbfaf7;
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
}

.auth-form input:focus { outline: none; border-color: var(--orange); box-shadow: 0 0 0 3px rgba(242, 162, 93, 0.18); background: #fff; }

.auth-submit {
  width: 100%;
  height: 46px;
  margin-top: 4px;
  border: 0;
  border-radius: 12px;
  background: var(--orange);
  color: #fff;
  font-family: inherit;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
  transition: filter 0.15s ease;
}

.auth-submit:hover { filter: brightness(1.05); }

/* حین درخواست، دکمه قفل است تا کلیکِ پشت‌سرهم چند کد پیامکی نسازد. */
.auth-submit:disabled,
.auth-inline-action:disabled {
  cursor: default;
  opacity: 0.62;
  filter: none;
}

.auth-otp-demo {
  margin-bottom: 16px;
  padding: 11px 13px;
  border: 1px dashed #d8c9a8;
  border-radius: 11px;
  background: #fdf8ee;
  color: #9a7a2a;
  font-size: 11px;
  text-align: center;
}

.auth-otp-demo b { font-size: 16px; letter-spacing: 4px; color: #7a5e1a; }

.auth-otp-notice {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: 10px 0 10px;
  padding: 10px 11px;
  border: 1px solid rgba(242, 162, 93, 0.34);
  border-radius: 13px;
  background: #fff8f1;
}

.auth-otp-copy {
  min-width: 0;
  display: block;
  flex: 1;
  color: #5f4a35;
  font-size: 11px;
  line-height: 1.7;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.auth-otp-copy b {
  color: #9a5a1f;
  font-size: 11.5px;
}

.auth-otp-tools {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: 0 0 14px;
}

.auth-otp-timer {
  color: var(--muted);
  font-size: 10.5px;
  font-weight: 700;
}

.auth-otp-timer[data-expired="1"] {
  color: #c45528;
}

.auth-inline-action {
  border: 0;
  background: transparent;
  color: #a65c1f;
  font-family: inherit;
  font-size: 10.5px;
  font-weight: 800;
  cursor: pointer;
  padding: 4px 0;
  white-space: nowrap;
}

.auth-inline-action:hover {
  color: var(--orange);
}

.auth-inline-action:disabled {
  cursor: default;
  color: #b7aca0;
}

.auth-note {
  margin-top: 18px;
  padding-top: 15px;
  border-top: 1px solid var(--line);
  font-size: 10px;
  color: var(--muted);
  line-height: 1.8;
  text-align: center;
}

.auth-back {
  width: 100%;
  margin-top: 12px;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-family: inherit;
  font-size: 11px;
  cursor: pointer;
}

.auth-back:hover { color: var(--orange); }

.auth-remember {
  display: flex !important;
  flex-direction: row !important;
  align-items: center;
  gap: 8px;
  font-weight: 600 !important;
  font-size: 11px !important;
  color: #5b5650;
  cursor: pointer;
}
.auth-remember input { width: 16px; height: 16px; margin: 0; accent-color: var(--orange); cursor: pointer; }
.auth-remember span { margin: 0; }

.auth-device {
  margin-top: 14px;
  padding: 9px 11px;
  border-radius: 9px;
  background: #faf7f1;
  border: 1px solid var(--line);
  font-size: 10px;
  color: #6a6359;
  text-align: center;
}
.auth-device b { color: #4d4840; }

.login-log-list { display: flex; flex-direction: column; gap: 7px; max-height: 230px; overflow-y: auto; }
.login-log-row {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #fff;
}
.login-log-dev { display: flex; align-items: center; gap: 6px; font-size: 11px; font-weight: 700; color: #4d4840; }
.login-log-dev svg { width: 13px; height: 13px; color: var(--orange); }
.login-log-meta { font-size: 9px; color: var(--muted); }

/* ── درآمد و تسویه ─────────────────────────────────── */
.settlement-policy-panel {
  margin-bottom: 18px;
}
.settlement-policy-panel form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px 18px;
  padding: 18px 20px;
}
.settlement-policy-copy,
.settlement-policy-control,
.settlement-policy-control label {
  display: flex;
  align-items: center;
  gap: 12px;
}
.settlement-policy-copy > span:last-child {
  display: grid;
  gap: 4px;
}
.settlement-policy-copy small {
  color: var(--muted);
}
/* باکس مبلغ: کادر یکپارچه با حلقهٔ فوکوس؛ عدد سه‌رقمی‌شده و واحد ثابت کنارش */
.settlement-amount-field {
  min-width: 260px;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 0 14px;
  background: var(--card);
  transition: border-color .16s ease, box-shadow .16s ease, background .16s ease;
}
.settlement-amount-field:hover {
  border-color: #f0b487;
}
.settlement-amount-field:focus-within {
  border-color: #f0a77e;
  background: #fff;
  box-shadow: 0 0 0 3px var(--orange-soft);
}
.settlement-policy-control input {
  width: 170px;
  border: 0;
  background: transparent;
  padding: 12px 0;
  font: inherit;
  font-size: 15px;
  font-weight: 800;
  letter-spacing: .3px;
  color: var(--ink);
  outline: 0;
}
/* پُرکردن خودکارِ مرورگر، متن و پس‌زمینهٔ باکس را رنگی می‌کرد */
.settlement-policy-control input:-webkit-autofill,
.settlement-policy-control input:-webkit-autofill:hover,
.settlement-policy-control input:-webkit-autofill:focus {
  -webkit-text-fill-color: var(--ink);
  -webkit-box-shadow: 0 0 0 40px var(--card) inset;
  caret-color: var(--ink);
  transition: background-color 9999s ease-out;
}
.settlement-policy-control input::selection {
  background: var(--orange-soft);
  color: var(--ink);
}
.settlement-amount-unit {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
  padding-inline-start: 10px;
  border-inline-start: 1px solid var(--line);
}
.settlement-policy-words {
  grid-column: 1 / -1;
  margin: 0;
  padding: 9px 13px;
  border-radius: 11px;
  background: var(--orange-soft);
  color: #a8541a;
  font-size: 12.5px;
  font-weight: 800;
  line-height: 1.9;
}
.settlement-policy-words.is-hint {
  background: var(--soft);
  color: var(--muted);
  font-weight: 700;
}

.academic-year-manager {
  margin-top: 18px;
}
.academic-year-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: 18px 20px;
}
.academic-year-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  padding: 8px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--card);
  color: var(--text);
  font-weight: 800;
}
.academic-year-chip.latest {
  border-color: rgba(34, 139, 112, .35);
  background: rgba(34, 139, 112, .08);
}
.academic-year-chip small {
  color: var(--teal);
  font-size: 10px;
}
.academic-year-preview {
  margin-top: 12px;
  padding: 12px 14px;
  border-radius: 12px;
  background: var(--soft);
  color: var(--muted);
}
.academic-year-preview strong {
  color: var(--text);
}
@media (max-width: 760px) {
  .settlement-policy-panel form {
    grid-template-columns: minmax(0, 1fr);
  }
  .settlement-policy-control {
    align-items: stretch;
    flex-direction: column;
  }
  .settlement-amount-field {
    min-width: 0;
  }
  .settlement-policy-control input {
    width: 100%;
  }
}

.settle-progress { margin-top: 14px; }
.settle-bar {
  height: 10px;
  border-radius: 20px;
  background: #efeae0;
  overflow: hidden;
}
.settle-bar span {
  display: block;
  height: 100%;
  border-radius: 20px;
  background: linear-gradient(90deg, var(--teal), #1aa088);
}
.settle-progress small { display: block; margin-top: 6px; font-size: 10px; color: var(--muted); }

/* کیف پول ستون اصلی است و اطلاعات بانکی (دو ورودی + یک دکمه) ستون باریک. */
.earnings-settlement-grid {
  grid-template-columns: minmax(0, 1.75fr) minmax(290px, 1fr);
  align-items: stretch;
}

.earnings-settlement-grid > .panel {
  min-width: 0;
  height: 100%;
}

.earnings-bank-body {
  display: grid;
  gap: 14px;
  padding: 16px 18px 20px;
  /* ارتفاع پنل با ستون کناری یکی است؛ فیلدها از بالا شروع می‌شوند نه کشیده. */
  align-content: start;
}

.earnings-bank-body .field {
  margin: 0;
}

.earnings-bank-body input {
  width: 100%;
  min-height: 46px;
  text-align: left;
}

.earnings-bank-save {
  display: flex;
  justify-content: center;
  width: min(100%, 290px);
  min-height: 42px;
  margin: 2px auto 0;
  text-align: center;
}

.finance-chart-panel .panel-header {
  align-items: center;
  gap: 12px;
}

/* همان حبابِ نمودارِ قبلی، برای لمس و صفحه‌کلید هم قابل نمایش است. */
svg[data-finance-monthly-chart] .finance-bar { cursor: pointer; outline: none; }
svg[data-finance-monthly-chart] .finance-bar.is-active .chart-tooltip,
svg[data-finance-monthly-chart] .finance-bar:focus-visible .chart-tooltip { opacity: 1; }

.chart-controls,
.chart-subcontrols {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px;
  border: 1px solid #ebe4d9;
  border-radius: 12px;
  background: #fffaf4;
}

.chart-subcontrols {
  /* بدون حاشیهٔ بالا، این نوار دقیقاً به خطِ زیرِ هدر پنل می‌چسبید */
  margin: 12px 18px 4px;
  background: #f8fbfa;
  border-color: #dbece7;
}

.chart-controls button,
.chart-subcontrols button {
  border: 0;
  border-radius: 9px;
  padding: 7px 10px;
  background: transparent;
  color: #81796d;
  font-size: 10px;
  font-weight: 850;
  cursor: pointer;
  white-space: nowrap;
}

.chart-controls button.active,
.chart-subcontrols button.active {
  background: #fff;
  color: #c25710;
  box-shadow: 0 8px 18px rgba(79,58,38,.08);
}

.chart-subcontrols button.active {
  color: #168878;
}

.finance-chart-body {
  display: block;
  padding: 12px 18px 18px;
}

.finance-chart-wrap {
  min-width: 0;
  padding: 12px;
  border: 1px solid #eee7dd;
  border-radius: 14px;
  background: #fffdf9;
  --chart-income-color: #ef8b43;
  --chart-income-text: #b35f24;
  --chart-activity-color: #168878;
}

.finance-chart-svg {
  display: block;
  width: 100%;
  height: auto;
  overflow: visible;
}

.chart-axis {
  stroke: #e4dccf;
  stroke-width: 1;
}

.finance-bar .payment-bar-segment {
  fill: var(--chart-income-color, #ef8b43);
  opacity: .95;
  filter: drop-shadow(0 9px 12px rgba(194,87,16,.14));
  transition: opacity .18s ease, filter .18s ease;
}

.finance-bar .payment-bar-reward {
  fill: var(--teal);
  filter: drop-shadow(0 8px 11px rgba(22,136,120,.14));
}

.finance-bar .payment-bar-penalty {
  fill: url(#paymentPenaltyHatch);
  stroke: #d96c64;
  stroke-width: 1.4;
  filter: none;
}

.payment-penalty-hatch-line {
  stroke: rgba(217,108,100,.62);
  stroke-width: 2;
}

.finance-bar:hover .payment-bar-segment {
  opacity: 1;
  filter: brightness(1.025) drop-shadow(0 10px 14px rgba(101,72,43,.16));
}

.chart-tooltip {
  opacity: 0;
  pointer-events: none;
  transform-box: fill-box;
  transition: opacity .16s ease, transform .18s var(--ease-soft);
}

.chart-tooltip .cht-wrap {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  width: 100%;
  height: 100%;
}

.chart-tooltip .cht-box {
  display: inline-block;
  width: auto;
  max-width: 100%;
  direction: rtl;
  text-align: right;
  padding: 7px 10px;
  border-radius: 11px;
  background: rgba(255, 255, 255, .98);
  border: 1px solid rgba(240, 180, 135, .78);
  box-shadow: 0 12px 18px rgba(65, 47, 29, .16);
  font-family: inherit;
}

.chart-tooltip .cht-line {
  font-size: 8px;
  font-weight: 800;
  line-height: 1.55;
  color: #8a5b2e;
  white-space: nowrap;
}

.chart-tooltip .cht-head {
  color: var(--chart-income-text, #b35f24);
  font-weight: 850;
}

.finance-bar:hover .chart-tooltip,
.chart-point:hover .chart-tooltip {
  opacity: 1;
}

.chart-value {
  fill: var(--chart-income-text, #b35f24);
  font-size: 10px;
  font-weight: 850;
}

.chart-label {
  fill: #9a958b;
  font-size: 8.6px;
  font-weight: 750;
}

.chart-empty-label {
  fill: #a69b8d;
  font-size: 12px;
  font-weight: 750;
}

.chart-area {
  fill: rgba(22, 136, 120, .12);
}

.chart-line {
  fill: none;
  stroke: var(--chart-activity-color);
  stroke-width: 4;
  stroke-linecap: round;
  stroke-linejoin: round;
  filter: drop-shadow(0 8px 10px rgba(22,163,148,.18));
}

.chart-point circle {
  fill: #fff;
  stroke: var(--chart-activity-color);
  stroke-width: 2;
  transition: r .18s ease, fill .18s ease;
}

.chart-point:hover circle {
  r: 4.5;
  fill: #e8f8f5;
}

.chart-point.is-clickable {
  cursor: pointer;
}

button[disabled] { opacity: 0.55; cursor: not-allowed; }

.dash-wallet-row {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
  font-size: 11px;
  color: var(--muted);
}
.dash-wallet-row b { color: #4d4840; }

.review-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.review-actions button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  flex: 1 1 auto;
  min-width: 130px;
  min-height: 42px;
  padding: 0 12px;
  border: 1px solid transparent;
  border-radius: 11px;
  font-family: inherit;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: filter 0.15s ease, background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.review-actions button svg { width: 15px; height: 15px; }

.review-actions .primary-button {
  background: var(--teal);
  color: #fff;
  box-shadow: none;
}
.review-actions .primary-button:hover { filter: brightness(1.06); }

.review-actions [data-status-action="returned_for_correction"] {
  background: var(--orange-soft);
  color: #c25710;
  border-color: #f0d3b4;
}
.review-actions [data-status-action="returned_for_correction"]:hover { background: #fbe6cf; }

.review-actions [data-status-action="rejected"] {
  background: var(--red-soft);
  color: var(--red);
  border-color: #f0c6c1;
}
.review-actions [data-status-action="rejected"]:hover { background: #f9d8d3; }

.review-actions #detailEdit {
  background: #fff;
  color: #5b5650;
  border-color: var(--line);
}
.review-actions #detailEdit:hover { border-color: var(--orange); color: #c84e08; }
/* برگرداندنِ تصمیمِ بازبینی دو کلیکی است؛ کلیکِ اول دکمه را قرمز و «مطمئنید؟» می‌کند. */
.review-actions [data-status-action="pending_review"].is-armed { background: var(--red); color: #fff; border-color: var(--red); }

/* چیپ‌های متادیتای جزئیات سؤال (موضوعات و …) */
.meta-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  justify-content: flex-end;
  max-width: 78%;
  min-width: 0;
}

.info-row > .meta-chips {
  max-width: 78%;
  overflow: visible;
  white-space: normal;
}

.meta-chip {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  max-width: 100%;
  min-width: 0;
  overflow: hidden;
  padding: 5px 9px;
  border: 1px solid #e5ebe7;
  border-radius: 10px;
  background: linear-gradient(180deg, #ffffff, #f7fbf9);
  font-size: 10px;
  font-weight: 700;
  cursor: default;
  box-shadow: 0 5px 14px rgba(38, 32, 25, 0.045);
}

.meta-chip .mc-key {
  flex: 0 0 auto;
  color: #9a5a1f;
  white-space: nowrap;
}

.meta-chip .mc-mid {
  flex: 0 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #9a958b;
  font-weight: 600;
}

.meta-chip .mc-leaf {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  color: #168878;
  white-space: nowrap;
}

.meta-chip.has-tooltip {
  overflow: visible;
}

.meta-chip.has-tooltip:hover {
  border-color: #f0b487;
  background: #fffaf5;
  box-shadow: 0 12px 28px rgba(65,47,29,.11);
  transform: translateY(-1px);
}

.topic-meta-chip {
  width: fit-content;
  min-width: 0;
  max-width: 100%;
  padding-inline: 12px;
}

.source-meta-chips {
  align-items: flex-start;
  max-width: 82%;
  justify-content: flex-end;
}

.info-row > .source-meta-chips {
  max-width: 82%;
  overflow: visible;
  white-space: nowrap;
}

.source-meta-chip {
  align-items: center;
  gap: 7px;
  padding: 6px 8px;
  border-color: #e8e1d7;
  background: #fffaf5;
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) max-content;
  max-width: 100%;
  width: min(100%, 340px);
  min-height: 46px;
  overflow: visible;
}

.detail-source-icon {
  width: 28px;
  height: 28px;
  flex: none;
  display: inline-grid;
  place-items: center;
  border-radius: 9px;
  background: #fff0e7;
  color: var(--orange);
  overflow: hidden;
  box-shadow: inset 0 0 0 1px rgba(173, 90, 22, .08);
}

.detail-source-icon svg {
  width: 18px !important;
  height: 18px !important;
  max-width: 18px;
  max-height: 18px;
}

/* لوگوهای تصویری (PNG/JPG/WebP) باید درون کادر آیکون جا بگیرند؛ بدون این قانون با اندازهٔ طبیعی بریده می‌شدند و خالی به نظر می‌رسیدند */
.detail-source-icon img,
.src-icon img {
  width: 20px !important;
  height: 20px !important;
  max-width: 20px;
  max-height: 20px;
  object-fit: contain;
  display: block;
}

.source-chip-copy {
  display: flex;
  align-items: center;
  gap: 4px;
  min-width: 0;
  color: inherit;
  overflow: hidden;
  white-space: nowrap;
}

.source-chip-copy .mc-key,
.source-chip-copy .mc-mid,
.source-chip-copy .mc-leaf {
  flex: 0 1 auto;
  line-height: 1.45;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.source-chip-copy .mc-leaf {
  flex: 0 0 auto;
}

.source-chip-copy .mc-mid {
  max-width: 150px;
  opacity: .8;
}

.source-chip-badges {
  display: grid;
  gap: 5px;
  justify-items: end;
  align-items: center;
  min-width: max-content;
}

.source-year-badge,
.source-number-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 20px;
  padding: 2px 8px;
  border-radius: 8px;
  font-size: 9px;
  font-weight: 850;
  line-height: 1;
  white-space: nowrap;
}

.source-year-badge {
  background: #edf8f6;
  color: #168878 !important;
}

.source-number-badge {
  background: #fff0e6;
  color: #ad5a16 !important;
}

.meta-tooltip {
  position: absolute;
  z-index: 520;
  right: 0;
  bottom: calc(100% + 9px);
  width: max-content;
  max-width: min(520px, 78vw);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  overflow-wrap: normal;
  white-space: nowrap;
  padding: 10px 12px;
  border: 1px solid rgba(240, 180, 135, 0.72);
  border-radius: 13px;
  background: linear-gradient(180deg, rgba(255,255,255,.99), rgba(255,250,246,.99));
  box-shadow: 0 18px 42px rgba(65,47,29,.17);
  color: #4d3b2a !important;
  font-size: 10px;
  line-height: 1.75;
  opacity: 0;
  transform: translateY(7px) scale(.98);
  pointer-events: none;
  transition: opacity .18s ease, transform .22s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.meta-tooltip::after {
  content: "";
  position: absolute;
  top: 100%;
  right: auto;
  left: var(--mt-arrow, calc(100% - 24px));
  transform: translateX(-50%);
  border: 7px solid transparent;
  border-top-color: rgba(255,250,246,.99);
  filter: drop-shadow(0 4px 3px rgba(65,47,29,.08));
}

/* وقتی تول‌تیپ زیر چیپ قرار می‌گیرد (با موتور موقعیت‌دهی)، فلش به سمت بالا برمی‌گردد */
.meta-tooltip.mt-below::after {
  top: auto;
  bottom: 100%;
  border-top-color: transparent;
  border-bottom-color: rgba(255,250,246,.99);
  filter: drop-shadow(0 -4px 3px rgba(65,47,29,.08));
}

.meta-tooltip b {
  color: #b76620;
  font-size: 9px;
}

.meta-tooltip span {
  color: #4d3b2a !important;
  white-space: nowrap;
  overflow-wrap: normal;
}

.meta-tooltip-path {
  direction: rtl;
  text-align: right;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* عرضِ تولتیپ دقیقاً به‌اندازهٔ بلندترین مسیر است؛ min-width فضای خالی می‌ساخت */
.student-topic-tooltip,
.kn-similar-tooltip {
  flex-direction: column;
  align-items: stretch;
  gap: 6px;
  width: max-content;
  max-width: min(760px, 86vw);
  white-space: normal;
}

.student-topic-tooltip-list,
.meta-tip-rows {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.student-topic-tooltip-row,
.meta-tip-row {
  display: block;
  max-width: 100%;
  padding: 5px 8px;
  border: 1px solid #f2e7da;
  border-radius: 9px;
  background: #fff;
  color: #4d3b2a !important;
  direction: rtl;
  text-align: right;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.student-topic-tooltip-row.main {
  border-color: rgba(240, 180, 135, 0.82);
  background: #fff7ef;
  color: #9a5a1f !important;
}

.meta-chip:hover .meta-tooltip,
.meta-chip:focus-within .meta-tooltip {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

.meta-chip .meta-tooltip {
  display: none;
}

.meta-tooltip-portal {
  position: fixed !important;
  z-index: 100000 !important;
  right: auto !important;
  bottom: auto !important;
  display: inline-flex !important;
  opacity: 0;
  pointer-events: none !important;
  transform: translateY(4px) scale(.98);
}

.meta-tooltip-portal.show {
  opacity: 1 !important;
  transform: translateY(0) scale(1) !important;
}

/* توست‌ها باید از هر لایهٔ دیگری بالاتر بنشینند: پاپ‌آپ‌ها (modal-root و
   tp-overlay روی ۱۰۰۰۰۰)، رانرِ آزمون و صفحه‌های تمام‌صفحه. با z-index قدیمیِ
   ۲۰۰ هر پیام سیستمی زیرِ backdropِ مودال گم و تارِ blur می‌شد. pointer-events
   هم برداشته شده تا توستِ روی مودال جلوی کلیک روی دکمه‌های زیرش را نگیرد. */
.toast-stack {
  position: fixed;
  left: 22px;
  bottom: 22px;
  z-index: 100060;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}

/* رنگِ توست از یک متغیر می‌آید تا نوارِ کناری، نوارِ شمارشِ پایین و هالهٔ
   دورش همیشه هم‌رنگ باشند: سبز برای موفقیت، قرمز برای خطا، زرد برای هشدار. */
.toast {
  --toast-accent: var(--teal);
  --toast-accent-soft: rgba(26, 163, 146, .28);
  min-width: 280px;
  max-width: 390px;
  background: #292721;
  color: white;
  border-radius: 12px;
  padding: 12px 14px;
  box-shadow: 0 14px 35px rgba(0,0,0,.2);
  animation: toast-in .22s ease;
  font-size: 11px;
}

.toast.error {
  --toast-accent: var(--red);
  --toast-accent-soft: rgba(222, 90, 90, .3);
}

.toast.warn {
  --toast-accent: var(--yellow);
  --toast-accent-soft: rgba(217, 165, 43, .3);
}

.toast.success, .toast.error, .toast.warn { border-right: 4px solid var(--toast-accent); }
/* روی پس‌زمینهٔ تارِ مودال، توست باید «جدا» دیده شود؛ یک هالهٔ نازک کافی است. */
body:has(#modalRoot:not(:empty)) .toast {
  box-shadow: 0 16px 40px rgba(0,0,0,.42), 0 0 0 1px rgba(255,255,255,.16);
}

@keyframes toast-in {
  from { opacity: 0; transform: translateY(8px); }
}

/* کارتِ پیشرفتِ ساخت PDF: در ستونِ توست‌ها (همان جا و همان z-index، و روی موبایل
   بالای نوار پایین) ولی همیشه ته ستون تا توست‌های تازه بالایش بنشینند. تیره مثل
   خودِ توست، پس در هر دو تم یکسان خوانده می‌شود. */
.pdf-job {
  order: 99;
  pointer-events: auto;
  width: 340px;
  max-width: calc(100vw - 24px);
  color: #fff;
  font-size: 12px;
  animation: toast-in .22s ease;
}
.pdf-job .ui-icon { width: 16px; height: 16px; }
.pdf-job-card {
  background: #292721;
  border-radius: 14px;
  padding: 14px;
  border-right: 4px solid var(--orange);
  box-shadow: 0 18px 44px rgba(0,0,0,.28), 0 0 0 1px rgba(255,255,255,.06);
}
.pdf-job.is-done .pdf-job-card { border-right-color: var(--teal); }
.pdf-job.is-error .pdf-job-card { border-right-color: var(--red); }
.pdf-job-head { display: flex; align-items: center; gap: 10px; }
.pdf-job-icon {
  flex: none; display: grid; place-items: center; width: 34px; height: 34px;
  border-radius: 10px; background: rgba(255,107,24,.18); color: #ffae7a;
}
.pdf-job.is-done .pdf-job-icon { background: rgba(26,163,146,.2); color: #6fd8c9; }
.pdf-job.is-error .pdf-job-icon { background: rgba(222,90,90,.2); color: #f39a9a; }
.pdf-job-title { flex: 1; min-width: 0; display: grid; gap: 2px; }
.pdf-job-title b { font-size: 13px; }
.pdf-job-title small { color: rgba(255,255,255,.62); font-size: 11px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pdf-job-min {
  flex: none; display: grid; place-items: center; width: 30px; height: 30px; border: 0;
  border-radius: 8px; background: rgba(255,255,255,.08); color: #fff; cursor: pointer;
}
.pdf-job-min:hover { background: rgba(255,255,255,.16); }
.pdf-job.is-done .pdf-job-min, .pdf-job.is-error .pdf-job-min { display: none; }
.pdf-job-steps {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px;
  margin: 12px 0 10px; padding: 0; list-style: none;
}
.pdf-job-steps li {
  position: relative; padding-top: 8px; text-align: center;
  color: rgba(255,255,255,.45); font-size: 10.5px;
}
.pdf-job-steps li::before {
  content: ""; position: absolute; inset: 0 0 auto; height: 3px; border-radius: 3px;
  background: rgba(255,255,255,.14);
}
.pdf-job-steps li.on { color: #fff; font-weight: 700; }
.pdf-job-steps li.on::before { background: var(--orange); }
.pdf-job-steps li.done { color: rgba(255,255,255,.75); }
.pdf-job-steps li.done::before { background: var(--teal); }
.pdf-job.is-error .pdf-job-steps { display: none; }
.pdf-job-line { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.pdf-job-line span { min-width: 0; line-height: 1.7; }
.pdf-job-line b { flex: none; font-size: 15px; font-variant-numeric: tabular-nums; }
.pdf-job.is-error .pdf-job-line b { display: none; }
.pdf-job-bar { height: 8px; margin: 8px 0 6px; border-radius: 8px; background: rgba(255,255,255,.12); overflow: hidden; }
.pdf-job-bar i {
  display: block; width: 0; height: 100%; border-radius: inherit;
  background: linear-gradient(90deg, #ff9a52, var(--orange));
  transition: width .5s ease;
}
.pdf-job.is-done .pdf-job-bar i { background: var(--teal); }
.pdf-job.is-error .pdf-job-bar { display: none; }
.pdf-job-meta { display: flex; justify-content: space-between; gap: 10px; color: rgba(255,255,255,.6); font-size: 11px; min-height: 16px; }
.pdf-job-meta span:last-child { flex: none; font-variant-numeric: tabular-nums; }
.pdf-job-note {
  margin: 10px 0 0; padding: 9px 10px; border-radius: 9px;
  background: rgba(255,255,255,.07); color: rgba(255,255,255,.82); font-size: 11.5px; line-height: 1.8;
}
.pdf-job-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 10px; }
.pdf-job-actions button {
  display: inline-flex; align-items: center; gap: 6px; min-height: 32px; padding: 0 12px;
  border: 0; border-radius: 9px; font: inherit; font-size: 12px; cursor: pointer;
  background: rgba(255,255,255,.1); color: #fff;
}
.pdf-job-actions button:hover { background: rgba(255,255,255,.18); }
/* اندازه و سایهٔ سراسریِ .primary-button (ارتفاع ۴۰، سایهٔ نارنجیِ hover و پرشِ
   translateY) اینجا نمی‌نشیند: هر دو دکمه هم‌قد و متنشان وسطِ دکمه است. */
.pdf-job-actions .primary-button,
.pdf-job-actions .ghost-button { height: 36px; min-height: 36px; padding: 0 14px; justify-content: center; line-height: 1; }
.pdf-job-actions .primary-button { background: var(--teal); color: #fff; box-shadow: none; }
.pdf-job-actions .primary-button:hover,
.pdf-job-actions .primary-button:focus-visible { background: #17907f; box-shadow: none; transform: none; }
.pdf-job-actions .ghost-button:hover { transform: none; }
.pdf-job-actions .ui-icon { width: 16px; height: 16px; flex: none; }
/* کوچک‌شده: فقط یک قرصِ درصددار که با کلیک باز می‌شود */
.pdf-job-pill {
  display: none; align-items: center; gap: 8px; margin-inline-start: auto; padding: 8px 12px;
  border: 0; border-radius: 999px; background: #292721; color: #fff; font: inherit; font-size: 12px;
  cursor: pointer; box-shadow: 0 12px 30px rgba(0,0,0,.25); border-right: 3px solid var(--orange);
}
.pdf-job-pill b { font-variant-numeric: tabular-nums; }
.pdf-job.is-min { width: auto; display: flex; }
.pdf-job.is-min .pdf-job-card { display: none; }
.pdf-job.is-min .pdf-job-pill { display: inline-flex; }
@media (prefers-reduced-motion: reduce) {
  .pdf-job, .pdf-job-bar i { animation: none; transition: none; }
}

.mobile-only {
  display: none;
}

@media (max-width: 1100px) {
  .folder-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  /* در عرض کم، ردیف چهار طبقه می‌شود: نام، آمار، زمان، دکمهٔ بانک آزمون.
     .frow-actions به contents تبدیل می‌شود تا دکمهٔ «⋯» کنار نام بماند و
     دکمهٔ عریضِ بانک آزمون ستون نام را تنگ نکند. */
  .folder-row {
    grid-template-columns: 30px minmax(0, 1fr) 30px;
    row-gap: 8px;
  }
  .folder-row .frow-actions {
    display: contents;
  }
  .folder-row .more-button,
  .folder-row .more-button-slot {
    grid-column: 3;
    grid-row: 1;
  }
  .folder-row .frow-stats {
    grid-column: 1 / 4;
    grid-row: 2;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .folder-row .frow-stats.no-files {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .folder-row .frow-time {
    grid-column: 1 / 4;
    grid-row: 3;
  }
  .folder-row .frow-bank-slot {
    grid-column: 1 / 4;
    grid-row: 4;
    width: 100%;
  }
  .folder-row .frow-bank-slot:empty {
    display: none;
  }
  .stats-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .wizard-layout { grid-template-columns: 190px minmax(0, 1fr); }
  .question-filter-grid { grid-template-columns: repeat(4, minmax(132px, 1fr)); }
  .question-filter-grid > :nth-child(6n) .ms-pop,
  .question-filter-grid > :nth-child(6n - 1) .ms-pop { right: 0; left: auto; }
  .question-filter-grid > :nth-child(4n) .ms-pop,
  .question-filter-grid > :nth-child(4n - 1) .ms-pop { right: auto; left: 0; }
}

@media (max-width: 820px) {
  html,
  body {
    max-width: 100%;
    overflow-x: hidden;
    overflow-x: clip;
  }
  .app-shell { display: block; }
  .sidebar {
    position: fixed;
    top: 72px;                                   /* زیرِ هدر باز شود، نه زیرِ آن */
    right: 0;
    height: calc(100dvh - 72px);
    width: 250px;
    z-index: 60;                                 /* بالای محتوا؛ هدر (۴۵) هم‌چنان دیده می‌شود */
    transform: translateX(105%);
    transition: transform .3s cubic-bezier(.22, .61, .36, 1);
    box-shadow: -16px 0 44px rgba(30, 24, 18, .16);
    border-left: 1px solid var(--line);
    will-change: transform;
  }
  .sidebar.open { transform: translateX(0); }
  .sidebar-backdrop {
    display: block;
    position: fixed;
    inset: 72px 0 0 0;
    z-index: 55;
    background: rgba(28, 22, 16, .34);
    opacity: 0;
    visibility: hidden;
    transition: opacity .3s ease, visibility .3s ease;
  }
  .sidebar-backdrop.open { opacity: 1; visibility: visible; }
  .mobile-only { display: inline-grid; place-items: center; }
  .topbar { padding: 0 16px; }
  .content { padding: 22px 16px 50px; }
  .questions-panel-head { align-items: flex-start; flex-direction: column; }
  .question-code-search { width: 100%; }
  .question-filter-grid { grid-template-columns: repeat(3, minmax(120px, 1fr)); }
  .question-filter-grid > :nth-child(4n) .ms-pop,
  .question-filter-grid > :nth-child(4n - 1) .ms-pop { right: 0; left: auto; }
  .question-filter-grid > :nth-child(3n) .ms-pop,
  .question-filter-grid > :nth-child(3n - 1) .ms-pop { right: auto; left: 0; }
  .folder-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .folder-navigation { align-items: flex-start; flex-direction: column; }
  .two-column, .question-detail-grid { grid-template-columns: 1fr; }
  .wizard-layout { grid-template-columns: 1fr; }
  .wizard-side {
    border-left: 0;
    border-bottom: 1px solid var(--line);
    display: flex;
    overflow: auto;
  }
  .wizard-side h3 { display: none; }
  .wizard-step { min-width: 130px; }
  .topic-columns { grid-template-columns: 1fr 1fr; }
  .topic-column { min-height: 220px; }
  .crop-layout { grid-template-columns: 1fr; }
  .question-page-layout { grid-template-columns: 1fr; }
  .question-form-nav { display: none; }
  .question-save-bar { right: 16px; left: 16px; }
  .tag-admin-grid { grid-template-columns: 1fr; }
  .question-structure-section .type-cards { width: min(330px, calc(100% - 76px)); }
}

.drag-handle { cursor: grab; opacity: 0.35; font-size: 15px; flex-shrink: 0; line-height: 1; }
.drag-handle:active { cursor: grabbing; }

@media (max-width: 560px) {
  .page-head { align-items: flex-start; flex-direction: column; }
  .question-filter-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .question-filter-grid .ms-pop { right: 0; left: 0; width: auto; min-width: 0; max-width: none; }
  .question-filter-title { align-items: flex-start; }
  .stats-grid, .folder-grid, .form-grid { grid-template-columns: 1fr; }
  .panel-header { align-items: flex-start; flex-direction: column; }
  .panel-tools, .mini-search { width: 100%; }
  .source-entry { grid-template-columns: 1fr 1fr; }
  .media-list, .topic-columns { grid-template-columns: 1fr; }
  .question-page-head { align-items: flex-start; flex-direction: column; }
  .question-form-section { grid-template-columns: 1fr; padding: 16px; }
  .question-save-bar { flex-wrap: wrap; }
  .question-save-bar > div { width: 100%; margin-left: 0; }
  .options-entry-layout { grid-template-columns: 1fr; }
  .correct-option-picker { grid-template-columns: 1fr 1fr; }
  .question-structure-section { margin-top: 0; padding-top: 16px; }
  .question-structure-section .type-cards { width: 100%; }
  .type-card small { display: none; }
  .topic-path-item { padding-top: 26px; }
  .topic-path-track { overflow: visible; padding-bottom: 0; flex-wrap: wrap; border-radius: 14px; }
  .topic-path-segment { flex: 1 1 100% !important; max-width: none !important; border-inline-start: 0; border-top: 1px solid #ded8cd; border-radius: 0 !important; }
  .topic-path-segment:first-child { border-top: 0; border-radius: 14px 14px 0 0 !important; }
  .topic-path-segment:last-of-type { border-radius: 0 0 14px 14px !important; }
  .topic-path-tooltip { right: 8px; max-width: calc(100vw - 60px); white-space: nowrap; }
  .modal-backdrop { padding: 0; }
  .modal, .modal.large, .modal.xlarge { width: 100vw; max-height: 100vh; height: 100vh; border-radius: 0; }
  .modal.receipt-modal { width: 100vw; min-width: 0; max-width: 100vw; height: 100vh; max-height: 100vh; border-radius: 0; grid-template-rows: auto minmax(0, 1fr); }
  .receipt-viewer-body { min-height: 0; padding: 10px; }
  .receipt-viewer-img { max-width: 94vw; max-height: calc(100vh - 86px); }
  .finance-chart-panel .panel-header { align-items: flex-start; flex-direction: column; }
  .chart-controls, .chart-subcontrols { width: 100%; overflow-x: auto; justify-content: flex-start; }
  .finance-chart-body { padding: 10px 12px 14px; }
  .source-meta-chip { grid-template-columns: 28px minmax(0, 1fr) max-content; width: min(100%, 280px); }
  .source-chip-badges { justify-items: end; }
}

/* ───────────── صفحهٔ ورود: تب نقش، لینک‌ها، گرید دوتایی ───────────── */
.auth-tabs {
  display: flex;
  gap: 6px;
  background: #efece4;
  padding: 5px;
  border-radius: 13px;
  margin: 4px 0 16px;
}
.auth-tabs button {
  flex: 1;
  border: 0;
  background: transparent;
  padding: 9px 10px;
  border-radius: 9px;
  font: inherit;
  font-weight: 700;
  font-size: 12px;
  color: var(--muted);
  cursor: pointer;
  transition: 0.16s ease;
}
.auth-tabs button.active {
  background: white;
  color: var(--ink);
  box-shadow: 0 4px 12px rgba(79, 58, 38, 0.08);
}
.auth-two {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.auth-links {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 14px;
  margin-top: 14px;
  justify-content: center;
}
.auth-links button {
  border: 0;
  background: transparent;
  color: var(--orange);
  font: inherit;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}
.auth-links button:hover { text-decoration: underline; }

/* ───────────── پنل دانش‌آموز ───────────── */
#studentRoot { display: block; }

.student-bank-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 14px;
  padding: 16px 18px 20px;
}
.sq-card {
  border: 1px solid var(--line);
  background: linear-gradient(150deg, #fff, #fcfbf8);
  border-radius: 15px;
  padding: 14px;
  cursor: pointer;
  transition: 0.18s ease;
  display: flex;
  flex-direction: column;
  gap: 9px;
}
.sq-card:hover {
  transform: none;
  border-color: var(--line);
  box-shadow: none;
}
.sq-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.sq-code {
  font-size: 11px;
  font-weight: 700;
  color: var(--orange);
  letter-spacing: 0.3px;
}
.sq-title {
  font-size: 12.5px;
  line-height: 1.7;
  color: var(--ink);
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.sq-topic {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  color: #2d766d;
  font-weight: 600;
}
.sq-topic svg { width: 14px; height: 14px; flex: none; }
.sq-topic span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sq-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 2px;
}
.sq-tag {
  font-size: 10px;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 7px;
  background: #f1f5f3;
  color: #5b766f;
}
.sq-tag.alt { background: #fbf0e6; color: #9a5a1f; }
.sq-tag.diff { display: inline-flex; align-items: center; gap: 5px; }
.sq-tag.diff .difficulty-gauge { width: 20px; height: 18px; }

/* جزئیات سؤال دانش‌آموز */
.sq-detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 12px;
  margin-bottom: 14px;
  border-bottom: 1px solid var(--line);
}
.sq-detail-tags { display: flex; flex-wrap: wrap; gap: 7px; align-items: center; }
.sq-body { font-size: 14px; line-height: 2.1; color: var(--ink); }
.sq-options {
  display: flex;
  flex-direction: column;
  gap: 9px;
  margin-top: 16px;
}
.sq-option {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 13px;
  border: 1px solid var(--line);
  border-radius: 12px;
  font-size: 13px;
  background: #fff;
}
.sq-option.correct {
  border-color: #b3ddd0;
  background: #f1fbf7;
}
.sq-opt-no {
  width: 24px;
  height: 24px;
  flex: none;
  border-radius: 8px;
  background: #f1efe8;
  display: grid;
  place-items: center;
  font-size: 11px;
  font-weight: 700;
  color: var(--muted);
}
.sq-option.correct .sq-opt-no { background: #2f9e83; color: #fff; }
.sq-opt-flag {
  margin-inline-start: auto;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  font-weight: 700;
  color: #2f9e83;
}
.sq-opt-flag svg { width: 15px; height: 15px; }
.sq-explain {
  margin-top: 18px;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px 14px;
  background: #fbfaf6;
}
.sq-explain summary {
  cursor: pointer;
  font-weight: 700;
  font-size: 12.5px;
  color: var(--ink);
}
.sq-explain > div {
  margin-top: 10px;
  font-size: 13px;
  line-height: 2;
  color: #4a463f;
}

/* داشبورد دانش‌آموز: پراکندگی سطح دشواری */

/* ───────── صفحهٔ ورود/ثبت‌نام: انیمیشن نرم و کارت‌های نقش ───────── */
.auth-stage {
  animation: authStageIn 0.42s cubic-bezier(0.22, 0.61, 0.36, 1);
}
@keyframes authStageIn {
  from { opacity: 0; transform: translateY(10px) scale(0.985); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}
.auth-card { transition: box-shadow 0.3s ease; }
.auth-form label, .auth-form .auth-submit { transition: 0.18s ease; }
.auth-submit { transition: transform 0.15s ease, box-shadow 0.2s ease, background 0.2s ease; }
.auth-submit:active { transform: translateY(1px) scale(0.99); }

/* لینک‌های ثانویه و بازگشت مرحله */
.auth-step-back {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  border: 0;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  margin-bottom: 6px;
}
.auth-step-back svg { width: 15px; height: 15px; }
.auth-step-back:hover { color: var(--orange); }

/* گرید انتخاب نقش */
.role-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 11px;
  margin-top: 6px;
}
.role-grid .role-card:nth-child(5) { grid-column: 1 / -1; }
.role-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 7px;
  text-align: center;
  min-height: 124px;
  padding: 14px 12px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: linear-gradient(160deg, #fff, #fcfbf8);
  cursor: pointer;
  transition: transform 0.18s cubic-bezier(0.22,0.61,0.36,1), border-color 0.18s ease, box-shadow 0.18s ease;
  animation: roleIn 0.4s backwards cubic-bezier(0.22,0.61,0.36,1);
}
.role-grid .role-card:nth-child(1) { animation-delay: 0.02s; }
.role-grid .role-card:nth-child(2) { animation-delay: 0.06s; }
.role-grid .role-card:nth-child(3) { animation-delay: 0.10s; }
.role-grid .role-card:nth-child(4) { animation-delay: 0.14s; }
.role-grid .role-card:nth-child(5) { animation-delay: 0.18s; }
@keyframes roleIn { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: translateY(0); } }
.role-card:hover {
  transform: translateY(-3px);
  border-color: #f0b487;
  box-shadow: 0 14px 30px rgba(79, 58, 38, 0.12);
}
.role-card strong { font-size: 12.5px; color: var(--ink); line-height: 1.5; }
.role-card small { font-size: 10px; color: var(--muted); line-height: 1.5; max-width: 130px; }
.role-ic {
  width: 46px;
  height: 46px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: linear-gradient(150deg, #fbecd9, #f7e0c4);
  color: #b9762a;
  transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease;
}
.role-card:hover .role-ic { transform: scale(1.06) rotate(-3deg); background: linear-gradient(150deg, #f6c98a, #ef9f4f); color: #fff; }
.role-ic svg { width: 23px; height: 23px; }
.role-ic.sm { width: 30px; height: 30px; border-radius: 9px; }
.role-ic.sm svg { width: 17px; height: 17px; }

/* تراشهٔ نقش انتخاب‌شده در مرحلهٔ اطلاعات */
.role-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  padding: 5px 12px 5px 6px;
  border-radius: 999px;
  background: #fbf0e3;
  color: #9a5a1f;
  font-size: 12px;
  font-weight: 700;
  margin-bottom: 4px;
}

@media (max-width: 430px) {
  .role-grid {
    gap: 9px;
  }
  .role-card {
    min-height: 112px;
    padding: 12px 9px;
  }
  .role-card strong {
    font-size: 12px;
  }
  .role-card small {
    display: none;
  }
  .role-ic {
    width: 42px;
    height: 42px;
  }
  .role-ic svg {
    width: 21px;
    height: 21px;
  }
  .auth-otp-notice,
  .auth-otp-tools {
    align-items: center;
  }
  .auth-otp-copy { white-space: normal; }
}

/* ───────────── بانک سؤال کاربر ───────────── */
.sbank {
  display: flex;
  flex-direction: row-reverse; /* در RTL: نوار فیلتر سمت راست، سؤال‌ها سمت چپ */
  gap: 18px;
  align-items: flex-start;     /* لازم برای کارکرد sticky نوار فیلتر */
}
.sbank,
.sbank-main,
.sbank-side,
#studentContent {
  scrollbar-width: none;
}
.sbank::-webkit-scrollbar,
.sbank-main::-webkit-scrollbar,
.sbank-side::-webkit-scrollbar,
#studentContent::-webkit-scrollbar {
  width: 0;
  height: 0;
  display: none;
}
.sbank-side { flex: 0 0 236px; align-self: flex-start; }  /* نوار فیلتر باریک‌تر تا فضای سؤال بیشتر شود */
.sbank-main { flex: 1 1 auto; min-width: 0; }              /* سؤال‌ها سمت چپ */
.sbank-topbar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  padding: 12px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  margin-bottom: 14px;
}
.seg-group { display: inline-flex; background: #efece4; border-radius: 10px; padding: 3px; }
.seg {
  border: 0; background: transparent; font: inherit; font-size: 12px; font-weight: 700;
  color: var(--muted); padding: 6px 13px; border-radius: 8px; cursor: pointer; transition: 0.15s ease;
}
.seg.on { background: #fff; color: var(--ink); box-shadow: 0 3px 8px rgba(79,58,38,.08); }
/* گزینهٔ «به زودی»: جای خودش را نگه می‌دارد تا کاربر بداند چه چیزی در راه است،
   ولی انتخاب نمی‌شود. کم‌رنگ + قفلِ کوچک، بدون disabled — چون کلیک باید پیام بدهد. */
.seg.is-soon { color: #b3a89b; cursor: default; display: inline-flex; align-items: center; gap: 5px; }
.seg.is-soon:hover { color: #9c9084; }
.seg-soon-mark { display: inline-flex; }
.seg-soon-mark .ui-icon { width: 11px; height: 11px; opacity: .75; }
.ctx-picker {
  display: grid;
  gap: 18px;
}
.ctx-pick-section > label {
  display: block;
  margin-bottom: 8px;
  font-size: 12px;
  font-weight: 850;
  color: var(--ink);
}
.ctx-choice-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(112px, 1fr));
  gap: 9px;
}
.ctx-choice {
  position: relative;
  min-height: 48px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: #fff;
  color: #5f5a51;
  font-size: 13px;
  font-weight: 850;
  cursor: pointer;
  transition: transform .16s var(--ease-soft), border-color .16s ease, background .16s ease, box-shadow .16s ease, color .16s ease;
}
.ctx-choice input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.ctx-choice:hover {
  transform: translateY(-1px);
  border-color: #f0b487;
  background: #fffaf5;
}
.ctx-choice.on,
.ctx-choice:has(input:checked) {
  border-color: var(--orange);
  background: var(--orange-soft);
  color: #c25710;
  box-shadow: 0 10px 22px rgba(255,107,24,.1);
}
/* گزینهٔ خارج از اشتراک: حذف نمی‌شود، قفل می‌شود — کاربر باید ببیند چه چیزی را
   ندارد و با یک کلیک به همان محصول برسد. */
.ctx-choice.locked {
  border-style: dashed;
  border-color: #e2d9cc;
  background: #f8f6f2;
  color: #a49a8d;
}
.ctx-choice.locked:hover {
  transform: none;
  border-color: #d8bda2;
  background: #fbf6f0;
}
.ctx-choice.locked.on,
.ctx-choice.locked:has(input:checked) { box-shadow: none; }
.ctx-lock {
  position: absolute;
  inset-block-start: 6px;
  inset-inline-end: 8px;
  display: grid;
  place-items: center;
  color: #b9a893;
}
.ctx-lock svg { width: 13px; height: 13px; }
.ctx-offer-box {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 11px 13px;
  border: 1px solid #ecd8c2;
  border-radius: 13px;
  background: #fff7ee;
}
.ctx-offer-box > span {
  width: 34px;
  height: 34px;
  flex: none;
  display: grid;
  place-items: center;
  border-radius: 10px;
  color: #b4611f;
  background: #f8e6d3;
}
.ctx-offer-box svg { width: 16px; height: 16px; }
.ctx-offer-box > div { min-width: 0; flex: 1; }
.ctx-offer-box b { display: block; color: #7c4415; font-size: 12.5px; font-weight: 900; }
.ctx-offer-box small { display: block; margin-top: 3px; color: #97826c; font-size: 11px; line-height: 1.7; }
.ctx-offer-box .primary-button { flex: none; }
.sbank-chip {
  display: inline-flex; align-items: center; gap: 6px;
  border: 1px solid var(--line); background: #fff; border-radius: 10px;
  padding: 7px 12px; font: inherit; font-size: 12px; font-weight: 600; color: var(--ink);
  cursor: pointer; transition: 0.15s ease;
}
.sbank-chip:hover { border-color: #f0b487; }
.sbank-chip.on { background: #fbf0e3; color: #9a5a1f; border-color: #f0d3b4; }
.sbank-chip svg { width: 15px; height: 15px; }
.sbank-chip .ms-caret { width: 13px; height: 13px; opacity: .6; }
.sbank-year { display: inline-flex; align-items: center; gap: 6px; font-size: 11px; color: var(--muted); }
.sbank-year select { border: 1px solid var(--line); border-radius: 8px; padding: 6px 8px; font: inherit; font-size: 11px; background: #fff; }
.sbank-search { position: relative; flex: 1; min-width: 180px; }
.sbank-search input { width: 100%; border: 1px solid var(--line); border-radius: 10px; padding: 8px 32px 8px 12px; font: inherit; font-size: 12px; background: #fff; }
.sbank-search .search-glyph { position: absolute; right: 11px; top: 50%; transform: translateY(-50%); }

/* ── «مرور من»: سربرگ صفحه، بازهٔ فعالیت و تختهٔ نمودار ─────────────────── */
.sbank-modes {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  padding: 12px 14px; margin-bottom: 12px;
  background: var(--card); border: 1px solid var(--line); border-radius: 14px;
}
.sbank-mode-icon {
  display: inline-flex; align-items: center; justify-content: center; flex: none;
  width: 34px; height: 34px; border-radius: 11px;
  background: var(--orange-soft); color: var(--orange);
}
.sbank-mode-icon svg { width: 18px; height: 18px; }
.sbank-mode-title { flex: 1; min-width: 170px; display: flex; flex-direction: column; gap: 2px; }
.sbank-mode-title b { font-size: 14px; color: var(--ink); }
.sbank-mode-title small { font-size: 11px; color: var(--muted); line-height: 1.8; }
.sbank-mode-count {
  flex: none; font-size: 11.5px; color: var(--muted);
  padding: 7px 11px; border-radius: 10px; background: #fbf0e3; border: 1px solid #f0d3b4;
}
.sbank-mode-count b { color: #9a5a1f; font-size: 13px; }
.sbank-mode-go {
  display: inline-flex; align-items: center; gap: 6px; flex: none;
  border: 1px solid var(--line); background: #fff; border-radius: 10px;
  padding: 8px 13px; font: inherit; font-size: 12px; font-weight: 600; color: var(--ink);
  cursor: pointer; transition: 0.16s cubic-bezier(0.22,0.61,0.36,1);
}
.sbank-mode-go:hover { border-color: #f0b487; background: #fdf6ef; }
.sbank-mode-go svg { width: 15px; height: 15px; }

.arc-range-wrap { position: relative; }
.arc-range-pop {
  position: absolute; inset-inline-end: 0; top: calc(100% + 8px); z-index: 55;
  width: 268px; max-width: calc(100vw - 28px); padding: 12px;
  background: #fff; border: 1px solid var(--line); border-radius: 14px;
  box-shadow: 0 22px 50px rgba(40, 34, 24, .22);
}
.arc-range-presets { display: grid; gap: 7px; }
.arc-preset-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 7px; }
.arc-preset {
  border: 1px solid var(--line); background: #fff; border-radius: 9px;
  padding: 9px 6px; font: inherit; font-size: 11.5px; color: var(--ink);
  cursor: pointer; transition: 0.15s ease;
}
.arc-preset:hover { border-color: #f0b487; background: #fdf6ef; }
.arc-preset.on { background: var(--orange); border-color: var(--orange); color: #fff; }
.arc-range-bounds { display: flex; align-items: center; gap: 7px; margin-top: 10px; }
/* هر سرِ بازه = چیپِ تاریخ + ضربدرِ خودش، به‌جای یک دکمهٔ «پاک‌کردن این سر» */
.arc-bound-wrap { position: relative; flex: 1; min-width: 0; display: flex; }
.arc-bound {
  flex: 1; min-width: 0;
  border: 1px solid var(--line); background: #fbfaf7; border-radius: 9px;
  padding: 8px 9px; font: inherit; font-size: 11.5px; color: var(--muted);
  cursor: pointer; text-align: start; transition: 0.15s ease;
}
.arc-bound b { color: var(--ink); font-weight: 700; }
.arc-bound.on { border-color: #f0d3b4; background: #fbf0e3; }
.arc-bound-x {
  position: absolute; inset-inline-end: 5px; top: 50%; transform: translateY(-50%);
  display: inline-flex; align-items: center; justify-content: center;
  width: 19px; height: 19px; padding: 0; border: 0; border-radius: 6px;
  background: transparent; color: var(--muted); cursor: pointer; transition: 0.15s ease;
}
.arc-bound-x:hover { background: var(--red-soft); color: var(--red); }
.arc-bound-x svg { width: 12px; height: 12px; }
.arc-bound-wrap:has(.arc-bound-x) .arc-bound { padding-inline-end: 26px; }
.arc-range-pop .arc-calendar {
  /* `.audit-calendar` پایین‌ترِ همین فایل تعریف شده و برنده است؛ margin منفی و
     `width: calc(100% - 36px)`ِ آن (که برای صفحهٔ گزارش فعالیت درست است) اینجا
     تقویم را باریک می‌کرد و روی چیپ‌های تاریخ می‌انداخت. */
  width: 100%;
  margin: 12px 0 0;
  box-shadow: none;
}
.arc-range-hint { margin: 10px 0 0; font-size: 11px; line-height: 1.9; color: var(--muted); }

.arc-charts-host { position: relative; }
.arc-charts { margin-bottom: 14px; }
.arc-charts-head { display: flex; }
.arc-charts-toggle {
  display: flex; align-items: center; gap: 9px; width: 100%;
  padding: 11px 13px; background: var(--card);
  border: 1px solid var(--line); border-radius: 14px;
  font: inherit; font-size: 12.5px; font-weight: 600; color: var(--ink);
  cursor: pointer; transition: 0.16s ease;
}
.arc-charts-toggle:hover { border-color: #f0b487; }
.arc-charts-toggle > svg:first-child { width: 17px; height: 17px; color: var(--orange); }
.arc-charts-toggle small { flex: 1; text-align: start; font-size: 11px; font-weight: 400; color: var(--muted); }
.arc-caret { width: 15px; height: 15px; color: var(--muted); transition: transform .2s ease; }
.arc-caret.open { transform: rotate(180deg); }
/* بدون این، قاعدهٔ grid زیر بر [hidden] پیش‌فرضِ مرورگر می‌چربد و بستنِ تخته کار نمی‌کند */
.arc-charts-grid[hidden] { display: none; }
/* ── سه کارتِ سطح، هرکدام با سه کمانِ تودرتو ─────────────────────────────
   بیرونی «درست» (سبز)، میانی «نزده» (نارنجی)، درونی «غلط» (قرمز). هر کمان
   کسری از کلِ سؤال‌های همان سطح است، پس سه‌تا با هم مقایسه‌پذیرند. زیر ۹۰۰px
   تک‌ستونی می‌شود، چون ستونِ اصلی با نوار فیلترِ ۲۳۶ پیکسلی شریک است. */
.arc-charts-grid { display: grid; gap: 10px; margin-top: 12px; grid-template-columns: repeat(3, minmax(0, 1fr)); }
/* قابِ هر کارت هم‌رنگِ سطحِ خودش، دقیقاً با همان فرمولِ `.rr-diff-gauge`ِ
   کارنامهٔ آزمون: آسان سبز، متوسط نارنجی، سخت قرمز. */
.arl-card {
  display: flex; flex-direction: column; gap: 10px;
  padding: 14px 14px 12px;
  border: 1px solid color-mix(in srgb, var(--arl-color) 22%, #e8ded1);
  border-radius: 15px;
  background: linear-gradient(180deg, color-mix(in srgb, var(--arl-color) 5%, #fff), #fff);
  box-shadow: 0 7px 18px rgba(62, 48, 34, .04);
}
.arl-card.is-empty { opacity: .58; }
.arl-card header { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.arl-card header b { font-size: 13.5px; }
.arl-card header strong { font-size: 19px; font-weight: 950; color: var(--arl-color); font-variant-numeric: tabular-nums; }
.arl-card.is-empty header strong { color: var(--muted); }
.arl-rings { position: relative; }
.arl-rings svg { display: block; width: 100%; height: auto; overflow: visible; }
.arl-track { fill: none; stroke: #ebe7de; stroke-width: 12; stroke-linecap: round; }
.arl-arc { fill: none; stroke-width: 12; stroke-linecap: round; cursor: pointer; transition: opacity .15s ease; }
.arl-arc:hover { opacity: .74; }
.arl-total {
  position: absolute; inset-inline: 0; bottom: 1px;
  display: flex; align-items: baseline; justify-content: center; gap: 4px;
  font-size: 10.5px; color: var(--muted); pointer-events: none;
}
.arl-total b { font-size: 17px; color: var(--ink); }
.arl-legend {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 4px;
  margin: 0; padding: 9px 0 0; list-style: none; border-top: 1px solid #eee6dc;
}
.arl-legend li {
  display: flex; align-items: center; justify-content: center; gap: 5px; min-width: 0;
  font-size: 10.5px; font-weight: 750; color: #746a5c;
  border-radius: 7px; padding: 3px 4px; cursor: pointer;
}
.arl-legend li:hover,
.arl-legend li:focus-visible { background: #fff8f1; color: var(--ink); }
.arl-legend i { flex: none; width: 7px; height: 7px; border-radius: 50%; }
.arl-legend b { color: var(--ink); font-size: 12px; }

@media (max-width: 900px) {
  .arc-charts-grid { grid-template-columns: 1fr; }
  .arl-rings svg { max-width: 340px; margin: 0 auto; }
}
@media (max-width: 720px) {
  .arc-range-pop { width: min(268px, calc(100vw - 40px)); }
  .sbank-mode-title small { display: none; }
}

.sbank-listhead {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  font-size: 12px; color: var(--muted); margin-bottom: 12px; flex-wrap: wrap;
  scroll-margin-top: 96px; /* هم‌اندازهٔ .sq-item: زیرِ سرتیترِ چسبان نرود */
}
/* صفحه‌بندیِ دوم زیرِ آخرین سؤال */
.sbank-bottom-pager { display: flex; justify-content: center; margin-top: 18px; }
.sbank-bottom-pager:empty { display: none; }
.sbank-bottom-pager .sb-pagination { flex-wrap: wrap; justify-content: center; }
.sbank-found-row { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.sb-found b { color: var(--ink); font-size: 15px; }
.sb-pagination { display: inline-flex; align-items: center; gap: 4px; }
.sb-page {
  min-width: 30px; height: 30px; padding: 0 7px;
  border: 1px solid var(--line); background: #fff; border-radius: 9px;
  font: inherit; font-size: 12px; font-weight: 600; color: var(--ink);
  cursor: pointer; display: inline-flex; align-items: center; justify-content: center;
  transition: 0.15s cubic-bezier(0.22,0.61,0.36,1);
}
.sb-page:hover:not(:disabled) { border-color: #f0b487; transform: translateY(-1px); }
.sb-page.on { background: var(--orange); color: #fff; border-color: var(--orange); }
.sb-page:disabled { opacity: .38; cursor: default; }
.sb-page svg { width: 15px; height: 15px; }
.sb-ellipsis { color: var(--muted); padding: 0 2px; }
.sbank-side-toggle {
  display: inline-flex; align-items: center; gap: 6px;
  border: 1px solid var(--line); background: #fff; border-radius: 10px;
  padding: 7px 13px; font: inherit; font-size: 12px; font-weight: 600; color: var(--ink);
  cursor: pointer; transition: 0.16s ease;
}
.sbank-side-toggle:hover { border-color: #f0b487; background: #fbf0e3; }
.sbank-side-toggle svg { width: 15px; height: 15px; }

.sbank-list { display: flex; flex-direction: column; gap: 14px; }
.sq-item {
  border: 1px solid var(--line); background: var(--card); border-radius: 15px;
  position: relative; transition: box-shadow .18s ease, transform .18s var(--ease-soft), border-color .18s ease;
  display: flex; align-items: stretch; gap: 0; overflow: hidden;
  scroll-margin-top: 96px;
}
.sq-item:hover {
  transform: none;
  box-shadow: none;
}
.sq-main { position: relative; flex: 1; min-width: 0; padding: 16px 18px; }
.sq-item.ans-correct { border-inline-start: 3px solid #2f9e83; }
.sq-item.ans-wrong { border-inline-start: 3px solid var(--red, #d3603f); }
.sq-item.ans-dunno { border-inline-start: 3px solid #c9a23a; }
.sq-item.ans-pending { border-inline-start: 3px dashed #8a8f98; }
/* ریل سمت چپِ سؤال: منبع، ضریب تمیز، سطح سؤال */
.sq-rail {
  flex: none; width: 136px; display: flex; flex-direction: column;
  border-inline-start: 1px solid #f1efe9; background: #fbfaf7;
}
.sq-rail-cell {
  position: relative;
  flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px;
  min-height: 122px;
  padding: 14px 10px; text-align: center;
}
.sq-rail-cell + .sq-rail-cell { border-top: 1px solid #f1efe9; }
.sq-rail-cell > svg { width: 28px; height: 28px; color: var(--muted); }
.sq-rail-cell b { font-size: 13px; color: var(--ink); line-height: 1.45; }
.sq-rail-src b { font-size: 12px; max-width: 100%; overflow-wrap: anywhere; }
.sq-rail-cell small { font-size: 10px; color: var(--muted); }
.sq-rail-disc b { color: #9a5a1f; }
.sq-rail-diff .difficulty-gauge {
  width: 44px;
  height: 38px;
  background: color-mix(in srgb, var(--gauge-color) 12%, white);
}
.sq-rail-diff .difficulty-gauge svg {
  width: 34px;
  height: 30px;
  color: inherit;
}
.sq-rail-diff .gauge-track {
  stroke: #d5d1c9;
}
.sq-rail-diff .gauge-value,
.sq-rail-diff .gauge-needle {
  stroke-width: 3;
}
.sq-rail-diff .gauge-center {
  stroke-width: 1.8;
}
.sq-rail-cell[data-rail-tip]::after {
  content: attr(data-rail-tip);
  position: absolute;
  left: calc(100% + 10px);
  top: 50%;
  transform: translateY(-50%) translateX(6px);
  width: max-content;
  min-width: 190px;
  max-width: none;
  padding: 10px 12px;
  border: 1px solid rgba(240, 180, 135, .74);
  border-radius: 12px;
  background: linear-gradient(180deg, rgba(255,255,255,.99), rgba(255,250,246,.99));
  box-shadow: 0 16px 32px rgba(65,47,29,.14);
  color: #4d3b2a;
  font-size: 10.5px;
  font-weight: 800;
  line-height: 1.8;
  white-space: nowrap;
  text-align: right;
  opacity: 0;
  pointer-events: none;
  transition: opacity .16s ease, transform .18s var(--ease-soft);
  z-index: 35;
}

.sq-source-tooltip {
  position: absolute;
  left: calc(100% + 12px);
  top: 50%;
  transform: translateY(-50%) translateX(6px);
  /* اندازه دقیقاً به‌قدرِ متن؛ قبلاً min-width ثابت باعث فضای خالیِ زیاد می‌شد */
  width: max-content;
  max-width: min(340px, calc(100vw - 230px));
  padding: 4px;
  border: 1px solid rgba(240, 180, 135, .74);
  border-radius: 12px;
  background: rgba(255, 253, 250, .98);
  box-shadow: 0 14px 30px rgba(65, 47, 29, .13);
  opacity: 0;
  pointer-events: none;
  transition: opacity .16s ease, transform .18s var(--ease-soft);
  z-index: 45;
  backdrop-filter: blur(12px);
}

/* نوک راهنمای منبع/آزمون: همیشه از لبهٔ چپ به خانهٔ ریل اشاره می‌کند. */
.sq-source-tooltip::before {
  content: "";
  position: absolute;
  left: -7px;
  top: 50%;
  width: 12px;
  height: 12px;
  border-left: 1px solid rgba(240, 180, 135, .74);
  border-bottom: 1px solid rgba(240, 180, 135, .74);
  background: rgba(255,253,250,.99);
  transform: translateY(-50%) rotate(45deg);
  pointer-events: none;
}

.sq-rail-src:hover .sq-source-tooltip,
.sq-rail-src:focus-within .sq-source-tooltip {
  opacity: 1;
  transform: translateY(-50%) translateX(0);
}

.sq-source-tip-row {
  display: block;
  position: relative;
  padding: 4px 7px;
  border-radius: 7px;
  color: #4d3b2a;
  text-align: right;
  line-height: 1.6;
}

.sq-source-tip-row + .sq-source-tip-row {
  margin-top: 4px;
  padding-top: 8px;
}

.sq-source-tip-row + .sq-source-tip-row::before {
  content: "";
  position: absolute;
  top: 1px;
  left: 50%;
  width: calc(100% - 10px);
  height: 1px;
  background: rgba(228, 218, 204, .9);
  transform: translateX(-50%);
}

.sq-source-tip-row b {
  font-size: 11px;
  font-weight: 850;
  color: #4d3b2a;
  overflow-wrap: anywhere;
}
.sq-rail-cell[data-rail-tip]::before {
  content: "";
  position: absolute;
  left: calc(100% + 4px);
  top: 50%;
  width: 12px;
  height: 12px;
  border-left: 1px solid rgba(240, 180, 135, .74);
  border-bottom: 1px solid rgba(240, 180, 135, .74);
  background: rgba(255,253,250,.99);
  transform: translateY(-50%) translateX(6px) rotate(45deg);
  opacity: 0;
  pointer-events: none;
  transition: opacity .16s ease, transform .18s var(--ease-soft);
  z-index: 36;
}
.sq-rail-cell[data-rail-tip]:hover::after,
.sq-rail-cell[data-rail-tip]:focus-within::after,
.sq-rail-cell[data-rail-tip]:hover::before,
.sq-rail-cell[data-rail-tip]:focus-within::before {
  opacity: 1;
  transform: translateY(-50%) translateX(0) rotate(var(--rail-tip-rotate, 0deg));
}
.sq-rail-cell[data-rail-tip]:hover::before,
.sq-rail-cell[data-rail-tip]:focus-within::before {
  --rail-tip-rotate: 45deg;
}
.sq-item-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; }
.sq-num {
  width: 26px; height: 26px; flex: none; border-radius: 8px; background: #f1efe8;
  display: grid; place-items: center; font-size: 12px; font-weight: 700; color: var(--muted);
}
.sq-num-btn {
  border: 0;
  padding: 0;
  font-family: inherit;
  cursor: pointer;
  transition: background .15s ease, color .15s ease, transform .15s var(--ease-soft);
}
.sq-num-btn:hover,
.sq-num-btn:focus-visible {
  background: var(--orange-soft);
  color: var(--orange);
  transform: translateY(-1px);
}
.sq-item-topic { display: inline-flex; align-items: center; gap: 5px; font-size: 11px; font-weight: 700; color: #2d766d; }
.sq-item-topic svg { width: 14px; height: 14px; }
.sq-item-code { margin-inline-start: auto; font-size: 11px; font-weight: 700; color: var(--orange); }
.sq-bank-time {
  position: relative;
  margin-inline-start: 0;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  max-width: 100%;
  padding: 2px 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #7d766c;
  font-size: 10.5px;
  font-weight: 800;
  line-height: 1.6;
  white-space: nowrap;
  box-shadow: none;
  transition: color .16s ease;
  z-index: 30;
}
.sq-bank-time:hover,
.sq-bank-time:focus-visible {
  color: #4d3b2a;
}
.sq-bank-time b {
  color: #9a5a1f;
}
.sq-bank-time i {
  position: absolute;
  inset-block-start: calc(100% + 6px);
  inset-inline-start: 0;
  width: max-content;
  max-width: min(260px, 58vw);
  padding: 6px 9px;
  border: 1px solid #eadfce;
  border-radius: 8px;
  background: #fffdfa;
  box-shadow: 0 10px 22px rgba(65, 47, 29, .1);
  color: #4d3b2a;
  font-style: normal;
  font-size: 10px;
  font-weight: 800;
  line-height: 1.65;
  white-space: normal;
  opacity: 0;
  pointer-events: none;
  transform: translateY(4px);
  transition: opacity .16s ease, transform .18s var(--ease-soft);
  z-index: 95;
}
.sq-bank-time:hover i,
.sq-bank-time:focus-visible i {
  opacity: 1;
  transform: translateY(0);
}
/* ورقهٔ سفیدِ سؤال: صورت سؤال، شکل و گزینه‌ها روی «یک» سطح می‌نشینند تا مثل
   صفحهٔ کتاب یکپارچه دیده شوند، نه چند جزیرهٔ سفیدِ جدا روی زمینهٔ کارت. */
.sq-item .sq-sheet {
  background: #fff; border: 1px solid #f1efe9; border-radius: 12px; padding: 14px 16px;
}
.sq-item .sq-body {
  font-size: 14px; line-height: 2; color: var(--ink);
  background: transparent; border: 0; border-radius: 0; padding: 0;
}
/* ── اسکلتِ سؤالی که هنوز از سرور نرسیده ──────────────────────────────────────
   شکلِ خودِ سؤال کشیده می‌شود، نه یک نوارِ خالی: چند سطرِ متن با طول‌های نامساوی
   و چهار خانهٔ گزینه. کاربر باید ببیند «سؤال دارد می‌آید»، نه یک ورقهٔ سفید. */
.sq-content-loading { display: block; padding: 2px 0; }
.sq-sk-line, .sq-opt-sk i {
  display: block; height: 13px; border-radius: 7px;
  background: linear-gradient(90deg, #f3f1ec 25%, #e7e4dc 37%, #f3f1ec 63%);
  background-size: 400% 100%;
  animation: sqContentLoading 1.4s ease infinite;
}
.sq-sk-line + .sq-sk-line { margin-top: 11px; }
/* ── وقتی محتوا نیامد ────────────────────────────────────────────────────────
   جای همان اسکلت می‌نشیند. درخششِ اسکلت یعنی «در راه است»؛ اگر چیزی در راه
   نباشد باید دلیلش و راهِ ادامه‌اش دیده شود، نه یک انیمیشنِ ابدی. */
.sq-content-failed {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  padding: 10px 12px; border-radius: 12px;
  border: 1px solid #f2dcdc; background: var(--red-soft);
}
.sq-content-failed-text { font-size: 13px; color: var(--red); }
.sq-content-retry {
  border: 1px solid #f2dcdc; background: #fff;
  color: var(--red); border-radius: 9px;
  padding: 5px 12px; font: inherit; font-size: 12px; font-weight: 700; cursor: pointer;
}
.sq-content-retry:hover { background: var(--red); color: #fff; }
/* خانهٔ گزینه همان قواره و همان شمارهٔ گزینهٔ واقعی را دارد تا با رسیدنِ محتوا
   چیدمانِ کارت نپرد. */
.sq-options-loading { pointer-events: none; }
.sq-opt-sk {
  display: flex; align-items: center; gap: 10px;
  min-height: 44px; padding: 10px 12px;
  border: 1px solid #f1efe9; border-radius: 12px; background: #fff;
}
.sq-opt-sk > b {
  flex: 0 0 auto; width: 22px; height: 22px; border-radius: 50%;
  display: grid; place-items: center;
  font-size: 12px; font-weight: 700; color: #b9b2a4; background: #f6f4ef;
}
.sq-opt-sk > i { flex: 1 1 auto; }
/* اسکلتِ سؤال داخل اجراکنندهٔ آزمون */
.er-question-loading { display: grid; gap: 16px; }
.er-question-loading .sq-sk-line { height: 15px; }
.er-loading-note { margin: 12px 2px 0; font-size: 12.5px; color: var(--muted, #8b8477); }
@keyframes sqContentLoading { 0% { background-position: 100% 0; } 100% { background-position: 0 0; } }
@media (prefers-reduced-motion: reduce) { .sq-sk-line, .sq-opt-sk i { animation: none; } }

.sq-rich-text + .sq-content-image { margin-top: 10px; }
/* تصویرِ سؤال گوشهٔ گرد ندارد: عکسِ سؤال حاشیهٔ سفیدِ اضافه ندارد و شعاعِ گوشه،
   خودِ محتوا (عدد، پرانتز، لبهٔ شکل) را در چهار گوشه می‌بُرد. تصویر باید همان
   چیزی باشد که مدیر آپلود کرده — در بانک، پاپ‌آپ‌ها و صفحهٔ چاپ یکسان. */
.sq-content-image {
  display: block;
  width: 100%;
  height: auto;
  max-height: none;
  object-fit: contain;
  margin: 0 auto;
  border-radius: 0;
}
/* تکه‌های پاسخ تشریحی و درسنامه: یک حلِ طولانی است که به چند عکس بریده شده،
   پس باید مثل یک برگهٔ پیوسته به هم بچسبد. گوشهٔ گرد و هر فاصله‌ای بین تکه‌ها
   درزِ مصنوعی می‌سازد، پس هر دو برداشته می‌شوند — در پنل کاربر، پاپ‌آپ‌های
   مدیر و صفحهٔ چاپ/PDF یکسان. سلکتورهای پایین همان‌هایی‌اند که جای دیگری
   شعاع می‌دهند و باید کنار زده شوند. */
/* `img.` عمدی است: هر دامنه‌ای که به `.sq-content-image` شعاع می‌دهد یک وزنِ
   بیشتر می‌خواهد، وگرنه قاعدهٔ پایین‌ترِ فایل (مثلاً صفحهٔ چاپ) دوباره برنده
   می‌شود و گوشه‌ها گرد برمی‌گردند. */
img.sq-img-part,
.pq-body img.sq-img-part,
.sq-explanation-image img.sq-img-part {
  border-radius: 0;
}
/* فاصلهٔ متن→تصویر سرِ جایش می‌ماند؛ فقط درزِ تکه‌به‌تکه بسته می‌شود. */
.sq-img-part + .sq-img-part { margin-top: 0; }

/* پاسخ تشریحی عمودی: ستون اول در RTL سمت راست است و ستون دوم با خط میانی جدا می‌شود. */
.sq-explanation-columns {
  direction: rtl;
  width: 100%;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: start;
  gap: 0;
  margin-top: 10px;
  border: 1px solid #e7dfd3;
  border-radius: 12px;
  background: #fff;
  overflow: hidden;
}
.sq-explanation-column {
  min-width: 0;
  min-height: 100%;
  display: flex;
  flex-direction: column;
  gap: 0;
  padding: 10px;
}
.sq-explanation-column + .sq-explanation-column {
  border-inline-start: 1px solid #9d958b;
}
.sq-explanation-image {
  display: block;
  width: 100%;
  margin: 0;
  break-inside: avoid;
  page-break-inside: avoid;
}
.sq-explanation-image .sq-content-image {
  width: 100%;
  margin: 0;
  border-radius: 0;
}
.sq-rich-text + .sq-explanation-columns { margin-top: 12px; }

.sq-src-more {
  color: var(--orange);
  background: var(--orange-soft);
  border-radius: 999px;
  padding: 2px 7px;
}

/* آخرین بلوکِ ورقه فاصلهٔ اضافه نمی‌گیرد و ورقه دور همه‌شان یکی می‌ماند */
.sq-item .sq-sheet > *:first-child { margin-top: 0; }
.sq-answer-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: stretch;
  align-content: start;
  /* چهار کادرِ یک سؤال هم‌قدند: `1fr` در گریدی که ارتفاعش auto است یعنی همهٔ
     سطرها به اندازهٔ بلندترین سطر. بدون این، گزینهٔ کسردار از گزینهٔ تک‌خطیِ
     کنارش بلندتر می‌شد و ردیف گزینه‌ها پله‌پله دیده می‌شد. */
  grid-auto-rows: 1fr;
  gap: 9px;
  margin-top: 14px;
}
/* کوتاه‌ها چهار ستون مساوی و سراسری‌اند؛ متوسط‌ها دوتایی و بلندها تمام‌عرض‌اند. */
.sq-answer-options.is-row { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.sq-answer-options.is-row .sq-ans-opt { width: 100%; min-width: 0; }
.sq-answer-options.is-two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
/* گزینهٔ تمام‌عرض کنارِ گزینهٔ دیگری نیست، پس هم‌قدسازی فقط ارتفاعِ بلندترین
   گزینه را چهار بار تکرار می‌کند؛ در این حالت هر کادر به‌اندازهٔ متنِ خودش است. */
.sq-answer-options.is-stack { grid-template-columns: minmax(0, 1fr); grid-auto-rows: max-content; }
/* سؤال تصویری گزینهٔ واقعی ندارد و این چهار کادر فقط جای کلیک‌اند؛ کمی بلندتر
   از کادرِ متنی، تا دکمه‌ها زیر تصویرِ سؤال بی‌جان و باریک دیده نشوند. */
.sq-answer-options.is-image-question .sq-ans-opt { min-height: 40px; }
/* چیدمانِ عمودی (کنارِ شکل): هر گزینه یک سطر، به‌اندازهٔ متنِ خودش و نه بیشتر.
   کادرِ تمام‌عرض برای «۱۰/۵» یعنی یک مستطیلِ خالیِ ۶۰۰پیکسلی؛ `fit-content` عرض
   را به محتوا می‌چسباند و `min-width` کفِ یک‌چهارمِ ستون را نگه می‌دارد تا کادر
   از دکمه هم کوچک‌تر نشود. سقفِ ۱۰۰٪ داخل fit-content است، پس گزینهٔ بلند به
   تمامِ عرضِ ستون می‌رسد و بعد می‌شکند — همان «دو ردیفی/تک ردیفی» شدنِ خودکار.
   کشیده‌شدنِ کادرها تا قدِ شکل عمداً انجام نمی‌شود (کادرهای بلندِ ناخواسته). */
.sq-answer-options.is-side,
.qv-opts.is-side,
.er-options.is-side {
  grid-template-columns: fit-content(100%);
  grid-auto-rows: max-content;
  align-items: start;
  gap: 7px;
  /* واحدِ cqw لازم است: `min-width: 25%` روی گرید‌آیتمی که عرضِ ترکش از خودِ
     آیتم می‌آید، حلقهٔ محاسباتی می‌سازد و مرورگر آن را auto می‌گیرد (سنجیده شد:
     کادر ۷۵px می‌ماند). با container-type، درصد از عرضِ خودِ ظرف حساب می‌شود. */
  container-type: inline-size;
}
.sq-answer-options.is-side .sq-ans-opt,
.qv-opts.is-side > span,
.er-options.is-side .er-opt { min-width: 25cqw; width: auto; }
.sq-ans-opt {
  display: flex; align-items: center; align-self: stretch; justify-content: flex-start; gap: 8px; text-align: start;
  width: 100%; height: auto;
  border: 1px solid var(--line); background: #fff; border-radius: 11px; padding: 2px 9px;
  min-height: 36px;
  font: inherit; font-size: 13px; cursor: pointer; transition: 0.14s ease; color: var(--ink);
}
.sq-ans-opt > span:last-child { min-width: 0; flex: 1 1 auto; align-self: center; overflow-wrap: anywhere; }
/* HTMLِ گزینهٔ متنی معمولاً یک <p> دارد. margin پیش‌فرض مرورگر همان متن تک‌خطی
   را بی‌دلیل بلندتر از گزینهٔ سؤال تصویری می‌کرد؛ فقط خود محتوا ارتفاع را زیاد می‌کند. */
.sq-ans-opt > span:last-child > :first-child { margin-top: 0; }
.sq-ans-opt > span:last-child > :last-child { margin-bottom: 0; }
.sq-ans-opt > span:last-child > p { margin-block: 0; }
.sq-ans-opt:hover { border-color: #f0b487; }
.sq-ans-opt.picked { border-color: #c9b8a4; background: #faf6ef; }
.sq-ans-opt.is-correct { border-color: #b3ddd0; background: #f1fbf7; }
.sq-ans-opt.picked:not(.is-correct) { border-color: #eec3b6; background: #fdf3f0; }
.sq-ans-opt:disabled {
  cursor: default;
}
.sq-ans-opt:disabled:not(.picked):not(.is-correct) {
  opacity: 1;
}
.sq-ans-no { width: 20px; height: 20px; flex: none; border-radius: 6px; background: #f1efe8; display: grid; place-items: center; font-size: 10.5px; font-weight: 700; color: var(--muted); }
.sq-ans-opt.is-correct .sq-ans-no { background: #2f9e83; color: #fff; }
/* ── چیدمانِ کتابی: شکل در یک ستون، گزینه‌ها روبه‌رویش ───────────────────────
   عرضِ ستونِ شکل همان درصدی است که مدیر در ویرایشگر داده (--sq-side-fig)، پس
   اندازهٔ دیداریِ شکل دقیقاً همان قبل می‌ماند و فقط جای گزینه‌ها عوض می‌شود.
   شکل پیش‌فرض سمتِ پایانِ خط (چپ در RTL) می‌نشیند — همان جایی که در دفترچه
   می‌نشیند — مگر مدیر صریحاً راست‌چینش کرده باشد. */
.sq-side-layout {
  display: grid;
  /* ستونِ شکل یا درصد است (تصویرِ قدیمی) یا پیکسلِ واقعیِ شکلِ کارگاه؛ سقفِ ۵۵٪
     نمی‌گذارد قابِ پیکسلی در کارتِ باریک ستونِ گزینه‌ها را خفه کند. */
  grid-template-columns: minmax(0, 1fr) min(var(--sq-side-fig, 30%), 55%);
  align-items: start;
  gap: 10px 16px;
  margin-top: 12px;
}
.sq-side-layout.is-figure-start { grid-template-columns: min(var(--sq-side-fig, 30%), 55%) minmax(0, 1fr); }
.sq-side-layout.is-figure-start .sq-side-figure { grid-column: 1; grid-row: 1; }
.sq-side-layout.is-figure-start .sq-side-options { grid-column: 2; grid-row: 1; }
.sq-side-layout .sq-answer-options,
.sq-side-layout .qv-opts,
.sq-side-layout .er-options { margin-top: 0; }
/* عرضِ درصدیِ خودِ شکل حالا مالِ ستون است، وگرنه درصد دوباره روی ستون اعمال
   می‌شود و شکل چندبرابر کوچک‌تر از انتخابِ مدیر درمی‌آید. */
.sq-side-figure .mkfig { width: 100% !important; margin: 0; }
/* ── جدول به‌جای شکل ────────────────────────────────────────────────────────
   عرضِ شکل تصمیمِ مدیر است، ولی عرضِ جدول را محتوایش تعیین می‌کند: با درصدِ ثابت،
   همان جدول در کارتِ باریک‌تر (پاپ‌آپ، رانرِ آزمون، برگهٔ A4) سرستون‌هایش
   می‌شکند و ردیف‌ها بلند می‌شوند. `fit-content` یعنی «تا عرضِ طبیعیِ خودت باز
   شو، ولی نه بیشتر از ۷۰٪» و ستونِ گزینه‌ها دست‌کم ۲۶٪ را نگه می‌دارد. */
.sq-side-layout.is-table { grid-template-columns: minmax(26%, 1fr) minmax(var(--sq-side-fig, 30%), max-content); }
.sq-side-layout.is-table.is-figure-start { grid-template-columns: minmax(var(--sq-side-fig, 30%), max-content) minmax(26%, 1fr); }
.sq-side-figure > .pq-body,
.sq-side-figure > .sq-rich-text { margin: 0; }
.sq-side-figure > .mktable,
.sq-side-figure .mktable { width: 100% !important; margin: 0; }
@media (max-width: 760px) {
  /* روی موبایل ستونِ کناری معنا ندارد: شکل سرِ جای همیشگی‌اش بالای گزینه‌ها
     برمی‌گردد و اندازه‌اش هم همان درصدِ قبلی می‌ماند. قاعدهٔ جدول تک‌کلاسه نیست،
     پس باید صریح باطل شود وگرنه جدول و گزینه‌ها روی گوشی کنار هم می‌مانند. */
  .sq-side-layout,
  .sq-side-layout.is-table,
  .sq-side-layout.is-table.is-figure-start { grid-template-columns: minmax(0, 1fr); }
  /* جدول روی گوشی همان تمام‌عرضِ همیشگی است */
  .sq-side-figure .mktable { width: 100% !important; }
  .sq-side-layout .sq-side-figure,
  .sq-side-layout.is-figure-start .sq-side-figure { grid-column: 1; grid-row: 1; }
  .sq-side-layout .sq-side-options,
  .sq-side-layout.is-figure-start .sq-side-options { grid-column: 1; grid-row: 2; }
  /* عرض و ترازِ شکل دقیقاً همان چیزی می‌شود که بدون این چیدمان بود */
  .sq-side-figure .mkfig { width: min(100%, var(--sq-side-fig, 30%)) !important; }
  /* گزینهٔ خیلی کوتاه روی موبایل هم دوتایی می‌ماند؛ چهار سطرِ تک‌گزینه‌ای فقط
     صفحه را بلند می‌کند. بلندترها همان تک‌ستونی می‌مانند. */
  .sq-answer-options.is-side[data-narrow-layout="is-row"],
  .qv-opts.is-side[data-narrow-layout="is-row"],
  .er-options.is-side[data-narrow-layout="is-row"] {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-auto-rows: 1fr;
  }
  .sq-answer-options.is-side .sq-ans-opt,
  .qv-opts.is-side > span,
  .er-options.is-side .er-opt { min-width: 0; width: 100%; }
}
.sq-quick-row { display: flex; align-items: center; gap: 10px; margin-top: 10px; flex-wrap: wrap; }
.sq-dunno { border: 1px dashed var(--line); background: transparent; border-radius: 9px; padding: 6px 12px; font: inherit; font-size: 12px; cursor: pointer; color: var(--muted); }
.sq-dunno:hover { color: var(--ink); border-color: #c9a23a; }
.sq-dunno:disabled { opacity: .55; cursor: default; }
.sq-show-answer {
  border: 1px solid #f0d3b4;
  background: #fffaf5;
  color: #9a5a1f;
  border-radius: 9px;
  padding: 6px 12px;
  font: inherit;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
  transition: transform .15s var(--ease-soft), background .15s ease, border-color .15s ease;
}
.sq-show-answer:hover {
  transform: translateY(-1px);
  background: var(--orange-soft);
  border-color: #f0b487;
}
.sq-result { font-size: 12px; font-weight: 700; padding: 4px 10px; border-radius: 8px; }
.sq-result.correct { background: #e9f8f2; color: #2f9e83; }
.sq-result.wrong { background: #fdeee9; color: #d3603f; }
.sq-result.dunno { background: #fbf3df; color: #b5891f; }
.sq-result.pending { background: #eef0f3; color: #5b6270; }
.sq-result.muted { background: #f1efe8; color: var(--muted); }
.sq-attempts { font-size: 11px; color: var(--muted); }
.student-history-summary {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  gap: 18px;
  align-items: center;
}
.student-history-chart {
  width: 132px;
  aspect-ratio: 1;
  border-radius: 50%;
  display: grid;
  place-items: center;
  align-content: center;
  justify-self: center;
  background: conic-gradient(#2f9e83 0 calc(var(--correct) * 1%), #d3603f calc(var(--correct) * 1%) calc(var(--wrong) * 1%), #d7a72e calc(var(--wrong) * 1%) 100%);
  box-shadow: inset 0 0 0 18px #fff, 0 14px 32px rgba(65, 47, 29, .1);
}
.student-history-chart b {
  font-size: 24px;
  line-height: 1;
  color: var(--ink);
}
.student-history-chart span {
  font-size: 10px;
  color: var(--muted);
  font-weight: 800;
}
.student-history-stats {
  display: grid;
  gap: 4px;
}
.student-history-legend {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin: 14px 0;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}
.student-history-legend span::before {
  content: "";
  display: inline-block;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  margin-inline-end: 5px;
}
.student-history-legend .correct::before { background: #2f9e83; }
.student-history-legend .wrong::before { background: #d3603f; }
.student-history-legend .dunno::before { background: #d7a72e; }
.student-history-table {
  border: 1px solid #efe7dc;
  border-radius: 14px;
  overflow: hidden;
  background: #fffdfa;
}
.student-history-head,
.student-history-row {
  display: grid;
  grid-template-columns: 42px minmax(98px, .85fr) minmax(126px, 1.1fr) minmax(112px, .95fr) minmax(104px, .85fr);
  align-items: center;
  column-gap: 12px;
}
.student-history-head {
  padding: 12px 14px;
  background: #f8f3eb;
  color: #4a4036;
  font-size: 12px;
  font-weight: 900;
}
.student-history-body {
  display: grid;
}
.student-history-row {
  min-height: 58px;
  padding: 10px 14px;
  border-top: 1px solid #efe7dc;
  color: var(--ink);
  font-size: 12px;
  font-weight: 800;
}
.student-history-row > span,
.student-history-head > span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-align: center;
}
.student-history-row .history-index {
  width: 28px;
  height: 28px;
  border-radius: 9px;
  display: grid;
  place-items: center;
  justify-self: center;
  background: #f1efe8;
  color: var(--muted);
}
.student-history-row .sq-result {
  display: inline-flex;
  justify-content: center;
  margin-inline: auto;
  min-width: 82px;
}
.student-history-row .history-set-link {
  display: inline-block; max-width: 100%; vertical-align: middle;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  background: none; border: 0; padding: 0; margin: 0; cursor: pointer;
  color: var(--orange); font: inherit; font-weight: 800;
}
.student-history-row .history-set-link:hover { text-decoration: underline; }
@media (max-width: 640px) {
  .student-history-summary {
    grid-template-columns: 1fr;
  }
  .student-history-head,
  .student-history-row {
    grid-template-columns: 32px minmax(68px, .85fr) minmax(70px, .9fr) minmax(70px, .85fr) minmax(70px, .85fr);
    column-gap: 6px;
  }
  .student-history-head,
  .student-history-row {
    padding-inline: 8px;
    font-size: 10px;
  }
  .student-history-row .sq-result {
    min-width: 0;
    padding-inline: 6px;
    font-size: 10px;
  }
}
.sq-item .sq-explain { margin-top: 14px; }
.sq-reveal-panel {
  display: grid;
  gap: 10px;
  margin-top: 14px;
  animation: sdBodyIn .24s ease;
}
.sq-reveal-tabs {
  display: inline-flex;
  width: fit-content;
  max-width: 100%;
  gap: 4px;
  padding: 4px;
  border: 1px solid #eee3d7;
  border-radius: 12px;
  background: #f8f6f1;
}
.sq-reveal-tabs button {
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: var(--muted);
  padding: 7px 12px;
  font: inherit;
  font-size: 12px;
  font-weight: 850;
  cursor: pointer;
  transition: background .15s ease, color .15s ease, box-shadow .15s ease;
}
.sq-reveal-tabs button.on {
  background: #fff;
  color: #9a5a1f;
  box-shadow: 0 6px 14px rgba(65,47,29,.08);
}
.sq-reveal-block {
  border: 1px solid #eee3d7;
  border-radius: 13px;
  background: #fffdf9;
  padding: 12px 14px;
}
.sq-reveal-block h4 {
  margin: 0 0 8px;
  font-size: 12.5px;
  color: #9a5a1f;
}
.sq-reveal-block > div {
  font-size: 13px;
  line-height: 2;
  color: #4a463f;
}
.sq-answer-loading {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-weight: 750;
}
.sq-answer-loading::before {
  content: "";
  width: 14px;
  height: 14px;
  flex: none;
  border: 2px solid #eadfd3;
  border-top-color: var(--orange);
  border-radius: 50%;
  animation: spin .75s linear infinite;
}

.sq-info-bar {
  display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px 14px;
  margin-top: 14px; margin-bottom: 12px; padding-top: 12px; border-top: 1px solid #f0ede6;
}
.sq-info-actions { display: inline-flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.sq-info { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; color: var(--muted); }
.sq-info svg { width: 17px; height: 17px; }
.sq-info.diff .difficulty-gauge { width: 30px; height: 26px; }
.sq-info-act {
  display: inline-flex; align-items: center; gap: 4px; margin-inline-start: 2px;
  border: 1px solid var(--line); background: #fff; border-radius: 8px; padding: 5px 10px;
  font: inherit; font-size: 11px; font-weight: 600; color: var(--muted); cursor: pointer; transition: 0.14s ease;
}
.sq-info-act:hover { border-color: #f0b487; color: var(--ink); }
.sq-info-act.on { background: #fbf0e3; color: #9a5a1f; border-color: #f0d3b4; }
.sq-info-act svg { width: 13px; height: 13px; }
.sq-info-bar .sq-bank-time i {
  inset-block-start: auto;
  inset-block-end: calc(100% + 6px);
  inset-inline-start: auto;
  inset-inline-end: 0;
}
.sq-card-pen {
  position: absolute;
  top: 12px;
  left: 14px;
  z-index: 22;
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center; justify-content: center;
  border: 1px solid #e8dfd1;
  border-radius: 10px;
  background: rgba(255,253,250,.96);
  color: #7d766c;
  box-shadow: 0 8px 18px rgba(65,47,29,.08);
  cursor: pointer;
  transition: border-color .16s ease, background .16s ease, color .16s ease, transform .16s var(--ease-soft);
}
.sq-card-pen:hover,
.sq-card-pen.on {
  border-color: #f0b487;
  background: #fff3e8;
  color: #9a5a1f;
  transform: translateY(-1px);
}
.sq-card-pen svg,
.sq-card-pen img {
  width: 23px;
  height: 23px;
}
.sq-card-set {
  top: 12px;
  left: 60px;
}
.sq-card-set svg {
  width: 20px;
  height: 20px;
}
.draw-pen-img {
  display: block;
  width: 23px;
  height: 23px;
  object-fit: contain;
}
.draw-tool .draw-pen-img {
  width: 20px;
  height: 20px;
}

.qset-layout {
  display: grid;
  grid-template-columns: minmax(260px, 340px) minmax(0, 1fr);
  gap: 16px;
  align-items: start;
  width: min(100%, 1120px);
  margin-inline: auto;
}
.qset-layout.solo {
  grid-template-columns: minmax(0, 1fr);
  width: 100%;
}
.qset-layout.detail {
  grid-template-columns: minmax(0, 1fr);
  width: 100%;
}
.qset-detail-layout {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 16px;
  align-items: start;
  direction: rtl;
}
.qset-index-panel,
.qset-main-cards {
  direction: rtl;
  min-width: 0;
}
.qset-index-panel {
  position: sticky;
  top: 86px;
  max-height: calc(100vh - 120px);
  overflow-y: auto;
  overflow-x: hidden;
  /* overscroll-behavior: contain اینجا نباشد — وقتی محتوای نوار فقط چند ده پیکسل
     بلندتر از پنل است، چرخِ موس همان چند پیکسل را می‌رود و بعد به صفحه منتقل
     نمی‌شود، یعنی اسکرول روی نوار عملاً قطع می‌شود. */
  /* نوار اسکرول پهن و قابل‌گرفتن با موس (به‌جای نوار نازکِ overlay سیستمی) */
  scrollbar-width: auto;
  scrollbar-color: #e8c3a1 transparent;
  padding-left: 6px;
  background:
    radial-gradient(circle at 100% 0, rgba(255,101,25,.07), transparent 180px),
    #fffdfa;
}
/* مرورگرهای تازه از همان scrollbar-width/scrollbar-color بالا استفاده می‌کنند و
   وقتی آن‌ها ست شده باشند، ::-webkit-scrollbar را کلاً نادیده می‌گیرند؛ پس این
   بلوک فقط فالبکِ مرورگرهای قدیمی است. */
@supports not (scrollbar-color: auto) {
  .qset-index-panel::-webkit-scrollbar {
    width: 12px;
  }
  .qset-index-panel::-webkit-scrollbar-track {
    background: #f7f1e9;
    border-radius: 99px;
    margin: 8px 0;
  }
  .qset-index-panel::-webkit-scrollbar-thumb {
    background: #e8c3a1;
    border: 3px solid #fffdfa;
    border-radius: 99px;
  }
  .qset-index-panel::-webkit-scrollbar-thumb:hover {
    background: var(--orange);
  }
  .qset-index-panel::-webkit-scrollbar-thumb:active {
    background: #e05c14;
  }
}
.qset-main-cards {
  display: grid;
  gap: 14px;
  align-content: start;
}
.qset-panel {
  border: 1px solid #eee5da;
  border-radius: 16px;
  background: #fffdfa;
  box-shadow: 0 14px 32px rgba(65,47,29,.06);
  padding: 14px;
  min-width: 0;
}
.qset-create {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  margin-bottom: 12px;
}
.qset-create input,
.qset-modal-search input,
.qset-auto-card input {
  width: 100%;
  min-width: 0;
  border: 1px solid #eadfd1;
  border-radius: 10px;
  background: #fff;
  color: var(--ink);
  font: inherit;
  font-size: 12px;
  font-weight: 800;
  padding: 10px 12px;
  outline: none;
}
.qset-create input:focus,
.qset-modal-search input:focus,
.qset-auto-card input:focus {
  border-color: #f2a562;
  box-shadow: 0 0 0 3px rgba(255,101,25,.1);
}
.qset-search {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 12px;
  padding: 0 12px;
  border: 1px solid #eadfd1;
  border-radius: 10px;
  background: #fff;
  color: var(--muted);
  cursor: text;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.qset-search:focus-within {
  border-color: #f2a562;
  box-shadow: 0 0 0 3px rgba(255,101,25,.1);
}
.qset-search > svg {
  width: 16px;
  height: 16px;
  flex: none;
}
.qset-search input {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: none;
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-size: 12px;
  font-weight: 800;
  padding: 10px 0;
}
.qset-filter-panel {
  display: grid;
  gap: 10px;
  margin: 0 0 12px;
  padding: 12px;
  border: 1px solid #eee5da;
  border-radius: 14px;
  background: #fffaf5;
}
.qset-filter-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.qset-filter-head strong {
  font-size: 13px;
  font-weight: 900;
}
.qset-filter-head small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}
.qset-filter-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}
.qset-filter-field {
  display: grid;
  gap: 5px;
  min-width: 0;
}
.qset-filter-field span {
  color: #8c8272;
  font-size: 10.5px;
  font-weight: 900;
}
.qset-filter-field select {
  width: 100%;
  min-width: 0;
  height: 38px;
  border: 1px solid #eadfd1;
  border-radius: 10px;
  background: #fff;
  color: var(--ink);
  font: inherit;
  font-size: 12px;
  font-weight: 850;
  padding: 0 10px;
  outline: none;
}
.qset-filter-field select:focus {
  border-color: #f2a562;
  box-shadow: 0 0 0 3px rgba(255,101,25,.1);
}
.qset-filter-clear {
  justify-self: start;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  border: 0;
  background: transparent;
  color: #8c8272;
  font: inherit;
  font-size: 11px;
  font-weight: 900;
  cursor: pointer;
}
.qset-filter-clear:hover { color: var(--orange); }
.qset-filter-clear svg { width: 14px; height: 14px; }
.qset-list {
  display: grid;
  gap: 8px;
}
.qset-card {
  display: grid;
  /* ستون چهارم = لینک همگام‌سازی با عرض ثابت تا آیکون همهٔ کارت‌ها دقیقاً زیر هم بیفتد */
  grid-template-columns: 42px minmax(0, 1fr) auto 32px auto;
  gap: 12px;
  align-items: center;
  border: 1px solid #eee5da;
  border-radius: 12px;
  background: #fff;
  padding: 8px 12px;
  color: var(--ink);
  font: inherit;
  text-align: right;
  cursor: pointer;
  transition: border-color .15s ease, background .15s ease, transform .15s var(--ease-soft);
}
.qset-card.pinned {
  border-color: #f0b487;
  background: linear-gradient(180deg, #fffaf5, #fff);
}
.qset-card:focus-visible {
  outline: 3px solid rgba(255, 95, 31, .16);
  outline-offset: 2px;
}
.qset-card-icon {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: var(--orange-soft);
  color: var(--orange);
}
.qset-card-icon svg {
  width: 22px;
  height: 22px;
}
.qset-card:hover,
.qset-card.active {
  border-color: #f0b487;
  background: #fff5eb;
  transform: translateY(-1px);
}
.qset-card-main,
.qset-row-main {
  display: grid;
  gap: 4px;
  min-width: 0;
}
.qset-card-main {
  display: flex;
  align-items: center;
  gap: 10px;
}
.qset-count-cluster {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 7px;
}
.qset-card-main small {
  flex: none;
  padding: 3px 8px;
  border-radius: 999px;
  background: #f7f1e8;
  white-space: nowrap;
}
.qset-card-title {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}
.qset-card-title b { flex: 0 1 auto; }
.qset-card-title em {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 3px 7px;
  border-radius: 999px;
  background: #fff2e8;
  color: var(--orange);
  font-style: normal;
  font-size: 10px;
  font-weight: 900;
}
.qset-card-title em svg {
  width: 12px;
  height: 12px;
}
.qset-card-main b,
.qset-row-main b {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.qset-card-main small,
.qset-card-meta,
.qset-row-main small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}
.qset-card-meta {
  direction: ltr;
  unicode-bidi: isolate;
  white-space: nowrap;
}
/* لینک همگام‌سازی: ستون مستقل کنار تاریخ؛ عرض ثابت و همیشه رزروشده تا در همهٔ کارت‌ها هم‌راستا باشد */
.qset-card-sync {
  display: grid;
  place-items: center;
  width: 32px;
}
/* جای دکمهٔ اشتراک‌گذاری در مجموعه‌های دریافتی رزرو می‌ماند تا عرض ستون عملیات ثابت بماند */
.qset-card-action-slot {
  display: block;
  width: 32px;
  flex: none;
}
.qset-card-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: nowrap;
}
.qset-card-action {
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  border: 1px solid #eadfd1;
  border-radius: 9px;
  background: #fff;
  color: #6b5f4e;
  font: inherit;
  font-size: 11px;
  font-weight: 900;
  padding: 0 10px;
  cursor: pointer;
  transition: background .14s ease, border-color .14s ease, color .14s ease, transform .14s var(--ease-soft);
}
.qset-card-action svg {
  width: 16px;
  height: 16px;
}
.qset-card-action:hover {
  border-color: #f0b487;
  background: #fff7ef;
  color: var(--orange);
  transform: translateY(-1px);
}
.qset-card-action.primary {
  background: var(--orange);
  border-color: var(--orange);
  color: #fff;
  box-shadow: 0 8px 18px rgba(255,95,31,.14);
}
.qset-card-action.primary:hover {
  background: #f05a18;
  color: #fff;
}
.qset-card-action.icon-only {
  width: 32px;
  padding: 0;
}
.qset-card-action.icon-only.on {
  background: #fff2e8;
  border-color: #f0b487;
  color: var(--orange);
}
.qset-card-action.danger:hover {
  background: #fdeceb;
  border-color: #f0ccc6;
  color: #c24a3a;
}
.qset-detail-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
}
.qset-detail-head strong {
  font-size: 14px;
}
.qset-question-list,
.qset-practice-list,
.qset-manual-list {
  display: grid;
  gap: 10px;
}
.qset-question-row,
.qset-manual-row {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr) minmax(112px, auto) auto;
  gap: 10px;
  align-items: center;
  min-height: 58px;
  border: 1px solid #eee5da;
  border-radius: 12px;
  background: #fff;
  padding: 10px;
}
.qset-question-row {
  cursor: grab;
}
.qset-index-panel .qset-question-row {
  grid-template-columns: 32px minmax(0, 1fr) auto;
  gap: 8px;
  min-height: 54px;
  cursor: grab;
}
.qset-index-panel .qset-row-diff {
  display: none;
}
.qset-index-panel .qset-row-main b {
  font-size: 11px;
  line-height: 1.65;
  white-space: nowrap;
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
}
.qset-index-panel .qset-row-main small {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.qset-question-row.dragging {
  opacity: .55;
  cursor: grabbing;
}
.qset-question-row.drag-over {
  border-color: #f0b487;
  background: #fff5eb;
  box-shadow: inset 0 0 0 2px rgba(255,101,25,.08);
}
.qset-manual-row {
  grid-template-columns: 24px minmax(0, 1fr) minmax(112px, auto);
  cursor: pointer;
}
.qset-manual-row.on {
  border-color: #8fd8c7;
  background: #f0fbf8;
}
.qset-row-no {
  width: 30px;
  height: 30px;
  border-radius: 9px;
  display: grid;
  place-items: center;
  background: #f2eee8;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}
.qset-row-diff {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  white-space: nowrap;
}
.qset-row-diff .difficulty-gauge {
  width: 28px;
  height: 24px;
}
.qset-row-actions {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.qset-jump-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 40px;
  gap: 0;
  margin-bottom: 12px;
  overflow: hidden;
  border: 1px solid #eadfd1;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 5px 14px rgba(65,47,29,.04);
}
.qset-jump-form input {
  width: 100%;
  min-width: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-size: 11px;
  font-weight: 850;
  padding: 10px 12px;
  outline: none;
}
.qset-jump-form input:focus {
  box-shadow: none;
}
.qset-jump-form button {
  border: 0;
  border-inline-start: 1px solid #f0e4d8;
  border-radius: 0;
  background: #fff7ef;
  color: var(--orange);
  display: grid;
  place-items: center;
  cursor: pointer;
}
.qset-jump-form button svg {
  width: 17px;
  height: 17px;
}
.qset-jump-form:focus-within {
  border-color: #f2a562;
  box-shadow: 0 0 0 3px rgba(255,101,25,.09);
}
.qset-status-block,
.qset-sort-block {
  display: grid;
  gap: 8px;
  margin-bottom: 12px;
  padding: 10px;
  border: 1px solid #eee5da;
  border-radius: 13px;
  background: rgba(255,255,255,.8);
}
.qset-mini-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.qset-mini-head > span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #4e473e;
  font-size: 11px;
  font-weight: 950;
}
.qset-mini-head svg {
  width: 14px;
  height: 14px;
  color: var(--orange);
}
.qset-mini-head small {
  color: #a19689;
  font-size: 9px;
  font-weight: 850;
}
.qset-status-filter {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
}
.qset-status-chip,
.qset-status-clear {
  min-width: 0;
  min-height: 38px;
  border: 1px solid #eadfd1;
  border-radius: 10px;
  background: #fffdfa;
  color: #68645c;
  font: inherit;
  font-size: 10px;
  font-weight: 850;
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  padding: 7px 9px;
  cursor: pointer;
  transition: border-color .15s ease, background .15s ease, color .15s ease, transform .15s var(--ease-soft);
}
.qset-status-chip span {
  min-width: 0;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.qset-status-chip span svg {
  flex: none;
  width: 13px;
  height: 13px;
}
.qset-status-chip b {
  flex: none;
  color: var(--muted);
}
.qset-status-chip:hover,
.qset-status-clear:hover {
  border-color: #f0b487;
  background: #fffaf4;
  transform: translateY(-1px);
  box-shadow: 0 6px 14px rgba(160,105,52,.10);
}
.qset-status-chip:active,
.qset-status-clear:active {
  transform: translateY(0) scale(.975);
  box-shadow: none;
}
.qset-status-chip:focus-visible,
.qset-status-clear:focus-visible,
.qset-sort-options button:focus-visible {
  outline: 2px solid rgba(255,101,25,.55);
  outline-offset: 2px;
}
.qset-status-chip.on {
  border-color: #f0d3b4;
  background: #fbf0e3;
  color: #9a5a1f;
}
.qset-status-chip.status-correct { color: #258f78; }
.qset-status-chip.status-correct.on { border-color: #a8dfd2; background: #effaf7; color: #167966; }
.qset-status-chip.status-wrong { color: #c65c4a; }
.qset-status-chip.status-wrong.on { border-color: #efc2ba; background: #fff1ef; color: #ad4636; }
.qset-status-chip.status-dunno { color: #b18224; }
.qset-status-chip.status-dunno.on { border-color: #ead39f; background: #fff8e8; color: #8c6516; }
.qset-status-chip.status-unused { color: #7b746b; }
.qset-status-chip.status-unused.on { border-color: #d9d1c6; background: #f5f2ed; color: #5f584f; }
.qset-status-clear {
  grid-column: 1 / -1;
  justify-content: center;
  color: #c75c47;
  background: #fff7f5;
}
.qset-sort-options {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 5px;
}
.qset-sort-options button {
  min-width: 0;
  min-height: 34px;
  border: 1px solid #eadfd1;
  border-radius: 9px;
  background: #fff;
  color: #71685d;
  font: inherit;
  font-size: 9px;
  font-weight: 900;
  line-height: 1.5;
  padding: 5px 4px;
  cursor: pointer;
  transition: border-color .15s ease, background .15s ease, color .15s ease, transform .15s var(--ease-soft), box-shadow .15s ease;
}
.qset-sort-options button:hover {
  border-color: #f0b487;
  background: #fffaf4;
  color: var(--orange);
  transform: translateY(-1px);
}
.qset-sort-options button:active {
  transform: translateY(0) scale(.97);
}
.qset-sort-options button.on {
  border-color: #f0b487;
  background: #fff2e8;
  color: #c95e1c;
  box-shadow: inset 0 0 0 1px rgba(255,101,25,.06);
}
.qset-sort-options button:disabled {
  opacity: .55;
  cursor: wait;
  transform: none;
}
.qset-sort-options button.is-busy {
  opacity: 1;
  border-color: #f0b487;
  background: #fff2e8;
  color: #c95e1c;
  animation: qsetSortBusy 1s ease-in-out infinite;
}
@keyframes qsetSortBusy {
  0%, 100% { opacity: 1; }
  50% { opacity: .6; }
}
.qset-sort-block p {
  margin: 0;
  color: #9a9084;
  font-size: 8.7px;
  font-weight: 750;
  line-height: 1.75;
}
.qset-flash {
  animation: qsetFlash 1.1s ease;
}
@keyframes qsetFlash {
  0%, 100% { box-shadow: 0 0 0 rgba(255,101,25,0); }
  28% { box-shadow: 0 0 0 4px rgba(255,101,25,.16); }
}
.qset-drag-handle {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border: 1px solid #eee5da;
  border-radius: 9px;
  background: #fffdfa;
  color: var(--muted);
  font-weight: 900;
  cursor: grab;
}
.qset-bank-mode {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
  padding: 12px 14px;
  border: 1px solid #f0d7c2;
  border-radius: 14px;
  background: #fff5eb;
  color: var(--ink);
}
.qset-bank-title {
  display: grid;
  gap: 3px;
  min-width: 0;
}
.qset-bank-mode strong {
  font-size: 13px;
}
.qset-bank-mode span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}
.qset-add-tabs {
  flex: 0 0 auto;
  background: rgba(255,255,255,.72);
}
.qset-auto-bank {
  display: grid;
  gap: 14px;
  border: 1px solid #eee5da;
  border-radius: 16px;
  background: #fffdfa;
  padding: 16px;
}
.qset-auto-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.qset-auto-head strong {
  font-size: 14px;
}
.qset-auto-head span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}
.qset-auto-actions {
  display: flex;
  justify-content: flex-end;
}
.qset-add-card {
  border-color: #8fd8c7;
  background: #effbf8;
  color: #178f79;
}
.qset-add-card.remove {
  border-color: #f0c4bb;
  background: #fff1ef;
  color: #c75c47;
}
.icon-button.sm {
  width: 32px;
  height: 32px;
  border-radius: 9px;
}
.icon-button.danger {
  color: #c75c47;
}
.qset-picker-modal,
.qset-add-modal {
  display: grid;
  gap: 12px;
}
.modal.qset-modal-size {
  width: min(94vw, 680px);
  overflow: hidden;
  border-color: #eadfd1;
  box-shadow: 0 28px 70px rgba(55,39,24,.2);
}
.qset-picker-head {
  min-height: 86px;
  background:
    radial-gradient(circle at 85% 0, rgba(255,101,25,.12), transparent 190px),
    #fffdfa;
}
.qset-picker-title {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}
.qset-picker-title h2 {
  margin: 0 0 3px;
}
.qset-picker-title p {
  margin: 0;
  color: var(--muted);
  font-size: 11px;
  font-weight: 750;
}
.qset-picker-title p b {
  color: var(--orange);
}
.qset-picker-emblem {
  flex: none;
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: linear-gradient(145deg, #ff7b32, #ff5f1f);
  color: #fff;
  box-shadow: 0 10px 22px rgba(255,95,31,.2);
}
.qset-picker-emblem svg {
  width: 24px;
  height: 24px;
}
.qset-modal-emblem {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  margin: -6px auto 0;
  background: #ffb11a;
  color: #fff;
  box-shadow: 0 14px 26px rgba(255,177,26,.24);
}
.qset-modal-emblem svg {
  width: 30px;
  height: 30px;
}
.qset-create-modal {
  width: 100%;
  grid-template-columns: 38px minmax(0, 1fr) auto;
  gap: 10px;
  margin: 0;
  padding: 10px;
  border: 1px solid #f0ddca;
  border-radius: 14px;
  background: #fff7ef;
}
.qset-create-modal .qset-create-icon {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 11px;
  background: #fff;
  color: var(--orange);
}
.qset-create-modal .qset-create-icon svg {
  width: 18px;
  height: 18px;
}
.qset-create-modal label {
  display: grid;
  gap: 2px;
  min-width: 0;
  min-height: 52px;
  padding: 6px 11px;
  border: 1px solid #e8d8c7;
  border-radius: 11px;
  background: #fff;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.qset-create-modal label:focus-within {
  border-color: #f2a562;
  box-shadow: 0 0 0 3px rgba(255,101,25,.08);
}
.qset-create-modal label small {
  color: #9b8771;
  font-size: 9px;
  font-weight: 900;
}
.qset-create-modal input {
  border: 0;
  border-radius: 0;
  background: transparent;
  padding: 1px 0 0;
}
.qset-create-modal input:focus,
.qset-create-modal input:focus-visible {
  border: 0;
  outline: 0;
  box-shadow: none;
}
.qset-create-modal .primary-button {
  align-self: center;
  min-height: 38px;
}
.qset-picker-search {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 42px;
  padding: 0 12px;
  border: 1px solid #eadfd1;
  border-radius: 12px;
  background: #fff;
}
.qset-picker-search:focus-within {
  border-color: #f2a562;
  box-shadow: 0 0 0 3px rgba(255,101,25,.09);
}
.qset-picker-search > svg {
  flex: none;
  width: 16px;
  height: 16px;
  fill: none;
  stroke: #a19689;
  stroke-width: 2;
  stroke-linecap: round;
}
.qset-picker-search input {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-size: 12px;
  font-weight: 800;
}
.qset-picker-search input:focus,
.qset-picker-search input:focus-visible {
  border: 0;
  outline: 0;
  box-shadow: none;
}
.qset-picker-list-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 0 2px;
}
.qset-picker-list-head strong {
  font-size: 12px;
}
.qset-picker-list-head span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
}
.qset-picker-list {
  display: grid;
  gap: 8px;
  max-height: min(42vh, 360px);
  overflow: auto;
  padding: 5px 2px 10px;
  scroll-padding-top: 5px;
}
.qset-picker-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  min-height: 58px;
  border: 1px solid #eee5da;
  border-radius: 12px;
  background: #fffdfa;
  color: var(--ink);
  font: inherit;
  font-weight: 900;
  padding: 7px 9px;
  text-align: right;
  transition: border-color .15s ease, background .15s ease, transform .15s var(--ease-soft);
}
/* پوشه و نامِ مجموعه یک دکمه‌اند که واردِ مجموعه می‌شود؛ «افزودن/حذف» دکمهٔ جداست */
.qset-picker-open {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  min-width: 0;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  padding: 0;
  text-align: right;
  cursor: pointer;
}
.qset-picker-go {
  display: grid;
  place-items: center;
  color: var(--muted);
  opacity: .55;
  transition: opacity .15s ease, transform .15s var(--ease-soft);
}
.qset-picker-go svg { width: 16px; height: 16px; }
.qset-picker-open:hover .qset-picker-go,
.qset-picker-open:focus-visible .qset-picker-go { opacity: 1; transform: translateX(-2px); color: var(--orange); }
.qset-picker-open:hover .qset-picker-row-main b { color: var(--orange); }
.qset-picker-row:hover {
  border-color: #f0b487;
  background: #fff8f1;
  transform: translateY(-1px);
}
.qset-picker-folder {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 11px;
  background: #fff1e5;
  color: var(--orange);
}
.qset-picker-folder svg {
  width: 21px;
  height: 21px;
}
.qset-picker-row-main {
  display: grid;
  gap: 3px;
  min-width: 0;
}
.qset-picker-row-main b {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.qset-picker-row-main small {
  color: var(--muted);
  font-size: 10px;
}
.qset-picker-row.added {
  border-color: #afe0d4;
  background: #f1fbf8;
}
.qset-picker-row.added .qset-picker-add {
  border-color: #efc3bb;
  background: #fff;
  color: #b64c3b;
}
.qset-picker-add {
  min-width: 74px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  border: 1px solid #f0d0b5;
  border-radius: 9px;
  background: #fff5eb;
  color: #c85c1b;
  font: inherit;
  font-size: 10px;
  font-weight: 950;
  padding: 0 10px;
  cursor: pointer;
}
.qset-picker-add svg {
  width: 13px;
  height: 13px;
}
.qset-picker-empty {
  min-height: 128px;
  border: 1px dashed #e6d9c9;
  border-radius: 12px;
  background: #fffdfa;
}
.qset-picker-footer {
  justify-content: space-between;
}
.qset-picker-footer > span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 750;
}
.qset-tabs {
  justify-self: center;
}
.qset-auto-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.qset-auto-card {
  display: grid;
  gap: 8px;
  border: 1px solid #eee5da;
  border-radius: 14px;
  background: #fff;
  padding: 12px;
}
.qset-auto-card span {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 900;
}
.qset-auto-card small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}
.qset-auto-card input::placeholder {
  color: #aaa199;
  opacity: .75;
}
.qset-auto-card .difficulty-gauge {
  width: 30px;
  height: 25px;
}
@media (max-width: 900px) {
  .qset-layout {
    grid-template-columns: 1fr;
  }
  .qset-detail-layout {
    grid-template-columns: 1fr;
    direction: rtl;
  }
  .qset-index-panel {
    position: static;
    max-height: none;
  }
  .qset-question-row {
    grid-template-columns: 32px minmax(0, 1fr);
  }
  .qset-card {
    grid-template-columns: 42px minmax(0, 1fr) auto 32px;
  }
  .qset-card-actions {
    grid-column: 1 / -1;
    flex-wrap: wrap;
    padding-top: 4px;
  }
  .qset-row-diff,
  .qset-row-actions {
    grid-column: 2;
    justify-content: flex-start;
  }
  .qset-bank-mode {
    align-items: stretch;
    flex-direction: column;
  }
  .qset-add-tabs {
    width: 100%;
  }
  .qset-add-tabs .seg {
    flex: 1;
  }
  .qset-auto-head {
    align-items: flex-start;
    flex-direction: column;
  }
  .qset-filter-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 560px) {
  .qset-create,
  .qset-create-modal,
  .qset-auto-grid {
    grid-template-columns: 1fr;
  }
  .qset-card {
    grid-template-columns: 38px minmax(0, 1fr) 32px;
  }
  .qset-card-meta {
    grid-column: 2;
  }
  .qset-card-action span {
    display: none;
  }
  .qset-card-action {
    width: 32px;
    padding: 0;
  }
  .qset-filter-head {
    align-items: flex-start;
    flex-direction: column;
  }
  .qset-filter-grid {
    grid-template-columns: 1fr;
  }

}
.sq-visual-badge {
  position: absolute;
  top: -7px;
  right: -7px;
  min-width: 18px;
  height: 18px;
  display: inline-grid;
  place-items: center;
  padding: 0 5px;
  border-radius: 999px;
  background: #2a8a7a;
  color: #fff;
  font-size: 10px;
  font-weight: 900;
}

/* یادداشت تصویری و قلم سؤال */
.draw-modal-head {
  gap: 14px;
  flex-wrap: wrap;
}
.draw-modal-head h2 {
  display: flex;
  align-items: center;
  gap: 8px;
}
.draw-modal-head small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}
.draw-head-actions {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  max-width: 100%;
}
.draw-head-actions > button { flex-shrink: 0; }
#drawSaveState {
  min-width: 84px;
  padding: 6px 10px;
  border-radius: 999px;
  background: #f7f4ee;
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
  text-align: center;
}
#drawSaveState[data-tone="ok"] {
  background: #eaf8f4;
  color: #168878;
}
#drawSaveState[data-tone="error"] {
  background: #fdeceb;
  color: #c24a3a;
}
#drawSaveState[data-tone="warn"] {
  background: #fff6df;
  color: #9a6a13;
}
.draw-modal-body {
  padding: 0;
  background: #fbfaf7;
}
.draw-toolbar {
  position: sticky;
  top: 0;
  z-index: 8;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-bottom: 1px solid var(--line);
  background: rgba(255,253,250,.92);
  backdrop-filter: blur(14px);
}
.draw-tool,
.draw-icon-btn,
.draw-control {
  width: 34px;
  min-width: 34px;
  height: 34px;
  min-height: 34px;
  border: 1px solid #e8dfd1;
  border-radius: 10px;
  background: #fff;
  color: #6f675c;
  font: inherit;
  font-size: 11px;
  font-weight: 800;
}
.draw-tool,
.draw-icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  padding: 0;
  cursor: pointer;
  transition: border-color .16s ease, background .16s ease, color .16s ease, transform .16s var(--ease-soft);
}
.draw-tool:hover,
.draw-icon-btn:hover {
  border-color: #f0b487;
  color: var(--ink);
  transform: translateY(-1px);
}
.draw-tool.on {
  border-color: #f0b487;
  background: #fff3e8;
  color: #9a5a1f;
}
.draw-tool svg,
.draw-icon-btn svg {
  width: 15px;
  height: 15px;
}
.draw-icon-btn#drawUndo svg,
.draw-icon-btn#drawRedo svg {
  width: 18px;
  height: 18px;
  stroke-width: 2.35;
}
.draw-control {
  display: grid;
  place-items: center;
  padding: 0;
}
.draw-control input[type="color"] {
  width: 24px;
  height: 24px;
  padding: 0;
  border: 0;
  background: transparent;
}
.draw-control input[type="range"] {
  width: 100%;
  height: 16px;
  accent-color: #f26a1b;
}
.draw-control:not(.draw-color) {
  width: 144px;
  min-width: 144px;
}
.draw-range-control {
  grid-template-columns: 1fr;
  grid-template-rows: auto 1fr;
  justify-content: stretch;
  align-content: center;
  gap: 3px;
  height: 42px;
  min-height: 42px;
  padding: 5px 10px 4px;
}
.draw-range-control span {
  justify-self: start;
  color: #7d766c;
  font-size: 10px;
  font-weight: 850;
  line-height: 1;
  white-space: nowrap;
}
.draw-shape-group {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px;
  border: 1px solid #eee6da;
  border-radius: 12px;
  background: #fffdfa;
}
.draw-shape {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border: 1px solid transparent;
  border-radius: 9px;
  background: transparent;
  color: #6f675c;
  cursor: pointer;
  transition: background .16s ease, border-color .16s ease, color .16s ease, transform .16s var(--ease-soft);
}
.draw-shape:hover,
.draw-shape.on {
  border-color: #f0b487;
  background: #fff3e8;
  color: #9a5a1f;
  transform: translateY(-1px);
}
.draw-shape svg {
  width: 17px;
  height: 17px;
}
.draw-layout {
  display: grid;
  grid-template-columns: 226px minmax(0, 1fr);
  min-height: min(70vh, 740px);
}
.draw-side {
  border-inline-end: 1px solid var(--line);
  background: rgba(255,255,255,.72);
  padding: 12px;
  overflow: auto;
  scrollbar-width: none;
}
.draw-side::-webkit-scrollbar,
.draw-stage-scroll::-webkit-scrollbar,
.draw-simple-toolbar::-webkit-scrollbar,
.modal.xlarge::-webkit-scrollbar {
  display: none;
}
.draw-side-block + .draw-side-block {
  margin-top: 14px;
}
.draw-side-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
}
.draw-side-title strong {
  font-size: 12px;
}
.draw-side-title button,
.draw-list-item,
.draw-layer button {
  border: 1px solid #e8dfd1;
  background: #fff;
  color: #6f675c;
  border-radius: 9px;
  font: inherit;
  font-size: 10.5px;
  font-weight: 800;
  cursor: pointer;
}
.draw-side-title button {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 6px 8px;
}
.draw-side-title svg { width: 13px; height: 13px; }
.draw-list {
  display: grid;
  gap: 7px;
}
.draw-list-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 34px;
  gap: 6px;
  align-items: stretch;
}
.draw-list-row.on .draw-list-item {
  border-color: #f0b487;
  background: #fff6ed;
  color: #9a5a1f;
}
.draw-list-item {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 3px;
  padding: 9px 10px;
  text-align: right;
}
.draw-list-item span {
  color: var(--muted);
  font-size: 10px;
}
.draw-list-delete {
  display: grid;
  place-items: center;
  border: 1px solid #eadfce;
  border-radius: 9px;
  background: #fff;
  color: #b45b3d;
  cursor: pointer;
}
.draw-list-delete svg {
  width: 14px;
  height: 14px;
}
.draw-layers {
  display: grid;
  gap: 8px;
}
.draw-layer {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 4px;
  align-items: stretch;
  padding: 6px;
  border: 1px solid #eee6da;
  border-radius: 12px;
  background: #fffdfa;
}
.draw-layer.on {
  border-color: #f0b487;
  box-shadow: 0 8px 18px rgba(65,47,29,.06);
}
.draw-layer.locked {
  opacity: .74;
}
.draw-layer-main {
  grid-column: 1 / -1;
  text-align: right;
  padding: 7px 8px;
}
.draw-layer-main b,
.draw-layer-main small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.draw-layer-main small {
  margin-top: 2px;
  color: var(--muted);
}
.draw-layer button:not(.draw-layer-main) {
  display: grid;
  place-items: center;
  padding: 0;
}
.draw-layer button:disabled {
  opacity: .4;
  cursor: not-allowed;
}
.draw-layer svg {
  width: 13px;
  height: 13px;
}
.draw-board {
  min-width: 0;
  padding: 12px;
}
.draw-version-warning {
  margin-bottom: 10px;
  padding: 10px 12px;
  border: 1px solid #f0d3b4;
  border-radius: 12px;
  background: #fff6ed;
  color: #9a5a1f;
  font-size: 11px;
  font-weight: 850;
}
.draw-stage-scroll {
  height: min(76vh, 860px);
  overflow: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #f7f4ee;
}
.draw-stage {
  position: relative;
  width: min(980px, 100%);
  min-height: 590px;
  margin: 0 auto;
  transform-origin: top center;
  transition: transform .16s var(--ease-soft);
}
/* بزرگ‌نمایی با دو انگشت باید زیر انگشت بچسبد؛ با انیمیشن، حرکت عقب می‌افتاد. */
.draw-stage-shell,
.draw-stage-shell * {
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  user-select: none;
}
.draw-stage-shell img {
  -webkit-user-drag: none;
  user-drag: none;
  pointer-events: none;
}
.draw-question-card {
  position: relative;
  z-index: 1;
  min-height: 760px;
  /* فضای خالیِ فراوان زیر صورت سؤال برای حل‌کردن و نوشتن (بیشترین سطحِ کار) */
  padding: 18px 22px 560px 86px;
  background: #fff;
  color: var(--ink);
}
.draw-question-content {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  transform-origin: top right;
  transition: transform .14s var(--ease-soft);
  will-change: transform;
}
.draw-question-body {
  font-size: 16px;
  line-height: 2.05;
}
.draw-question-card.has-body-visual .draw-question-body .mkfig {
  max-width: 72%;
}
.draw-question-card.has-body-visual .draw-question-body .mkfig img {
  width: 100%;
  height: auto;
  max-height: 340px;
  object-fit: contain;
}
.draw-question-card.has-body-visual .draw-question-body > .sq-content-image {
  width: min(78%, 720px);
  max-height: 430px;
  object-fit: contain;
}
/* سؤالِ تمام‌تصویری فقط در «عرض» بوم فیت می‌شود. ارتفاع طبیعیِ حاصل از نسبت
   تصویر حفظ می‌شود تا جمع‌کردنِ قاب، فضای حل و نوشتنِ پایین سؤال را از بین نبرد. */
.draw-question-card.is-image-question .draw-question-body > .sq-content-image {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
  max-height: none;
  margin-inline-start: 0;
  margin-inline-end: auto;
  object-fit: contain;
}
/* روی نمایشگرهای بزرگ، صورت سؤال به سمت راست (ابتدای RTL) می‌چسبد تا سمت چپ برای نوشتن/حل باز بماند */
@media (min-width: 720px) {
  .draw-question-body {
    max-width: 100%;
    margin-inline-start: 0;
    margin-inline-end: auto;
  }
  /* تصویرِ سؤالِ تمام‌تصویری هم باید از لبهٔ راست (ابتدای RTL) شروع شود؛ حاشیهٔ خودکار
     باید سمتِ چپ بیفتد نه سمتِ راست، وگرنه عکس به سمت چپ و زیرِ نوار ابزار می‌رود. */
  .draw-question-body .sq-content-image { max-width: 100%; height: auto; margin-inline-start: 0; margin-inline-end: auto; }
}
.draw-question-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: stretch;
  grid-auto-rows: 1fr;   /* هر چهار کادر هم‌ارتفاع، مثل بقیهٔ نمایش‌های سؤال */
  gap: 12px;
  margin-top: 24px;
}
.draw-question-options.is-row { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.draw-question-options.is-row > div { width: 100%; min-width: 0; }
.draw-question-options.is-stack { grid-template-columns: minmax(0, 1fr); grid-auto-rows: max-content; }
/* شکلِ کارگاه اندازهٔ ذخیره‌شدهٔ خودش را دارد (`data-mk-figw`) و هیچ ستونی حق
   ندارد کشیده یا جمعش کند؛ فقط `max-width` جلوی سرریز را می‌گیرد. */
.draw-question-options .mkfig:not([data-mk-figw]) { width: 100% !important; }
.draw-question-options .mkfig { max-width: 100%; margin: 4px auto; }
.draw-question-options img { display: block; width: auto; max-width: 100%; height: auto; max-height: 240px; margin: 0 auto; object-fit: contain; }
.draw-question-options > div {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  padding: 9px 12px;
  border: 1px solid #eee6da;
  border-radius: 10px;
  background: #fffdfa;
}
.draw-question-options b {
  width: 25px;
  height: 25px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: #f1efe8;
  color: var(--muted);
}
/* سؤال متنیِ صفحهٔ نوشتن از همان pq-* چاپ استفاده می‌کند. این سه قاعده دقیقاً
   تنظیمات قالب سادهٔ چاپ‌اند، بدون ابعاد و قابِ کامل A4 که برای بوم لازم نیست. */
.draw-print-question {
  color: #24211d;
  font-family: "Vazirmatn", "B Nazanin", Tahoma, sans-serif;
  text-rendering: optimizeLegibility;
}
.draw-print-question .pq-body { font-size: 15px; font-weight: 480; line-height: 2.12; }
.draw-print-question .pq-option { color: #35302a; font-size: 14.3px; line-height: 1.9; }
.draw-print-question .pq-option b { color: inherit; }
/* چاپ برای حفظ قوارهٔ دفترچه ستون شکل را حداقل ۲۷٪ می‌کند؛ بومِ نوشتن باید
   مثل بانک سؤال دقیقاً درصد ذخیره‌شدهٔ خودِ شکل را نگه دارد، حتی اگر کوچک‌تر باشد. */
.draw-print-question .pq-side-layout {
  grid-template-columns: minmax(0, 1fr) var(--pq-side-fig, 30%);
}
.draw-print-question .pq-side-layout.is-figure-start {
  grid-template-columns: var(--pq-side-fig, 30%) minmax(0, 1fr);
}
/* جدول استثناست: عرضش را محتوایش تعیین می‌کند، نه درصدِ ثبت‌شده (همان قاعدهٔ
   برگهٔ چاپ). بدون این، بومِ نوشتن جدول را باریک‌تر از سایت نشان می‌داد. */
.draw-print-question .pq-side-layout.is-table {
  grid-template-columns: minmax(26%, 1fr) minmax(var(--pq-side-fig, 30%), max-content);
}
.draw-print-question .pq-side-layout.is-table.is-figure-start {
  grid-template-columns: minmax(var(--pq-side-fig, 30%), max-content) minmax(26%, 1fr);
}
.draw-svg {
  position: absolute;
  inset: 0;
  z-index: 3;
  width: 100%;
  height: 100%;
  touch-action: none;
  -webkit-tap-highlight-color: transparent;
  cursor: crosshair;
}
.draw-svg[data-tool="eraser"] { cursor: cell; }
.draw-svg[data-tool="select"] { cursor: default; }
.draw-svg[data-tool="pan"] { cursor: grab; }
.draw-svg[data-tool="pan"].is-panning { cursor: grabbing; }
.draw-svg[data-tool="move-question"] { cursor: grab; }
.draw-svg-item {
  vector-effect: non-scaling-stroke;
  pointer-events: stroke;
  stroke-linecap: round;
  stroke-linejoin: round;
  shape-rendering: geometricPrecision;
  transition: filter .12s ease, opacity .12s ease;
}
/* گره‌های خطِ درحال‌نوشتن: شفافیت روی گروه می‌نشیند تا درزِ تکه‌ها پررنگ نشود. */
.draw-live-layer {
  pointer-events: none;
}
.draw-live-part {
  vector-effect: non-scaling-stroke;
  shape-rendering: geometricPrecision;
}
text.draw-svg-item {
  pointer-events: bounding-box;
}
.draw-svg-item.selected {
  filter: drop-shadow(0 0 4px rgba(242,106,27,.55));
}
.draw-selection {
  pointer-events: none;
}
.draw-selection rect {
  fill: none;
  stroke: rgba(242,106,27,.78);
  stroke-width: 1.5;
  stroke-dasharray: 8 7;
  vector-effect: non-scaling-stroke;
}
.draw-marquee {
  fill: rgba(242,106,27,.08);
  stroke: rgba(242,106,27,.82);
  stroke-width: 1.5;
  stroke-dasharray: 8 6;
  vector-effect: non-scaling-stroke;
  pointer-events: none;
}
.draw-handle {
  fill: #fff;
  stroke: #f26a1b;
  stroke-width: 2;
  vector-effect: non-scaling-stroke;
  pointer-events: all;
  cursor: nwse-resize;
  filter: drop-shadow(0 3px 6px rgba(65,47,29,.2));
}
.draw-footer {
  gap: 9px;
}

/* چیدمانِ چرک‌نویس/نوشتن روی سؤال ستونی است تا سر و پای مودال همیشه سرِ جایشان بمانند
   و فقط صفحهٔ کار اسکرول شود؛ ارتفاع با dvh بسته می‌شود چون روی تبلت/موبایل، vh
   ارتفاعِ «بدون نوار آدرس» است و مودال از بالا و پایین بیرون می‌زد. */
.modal.draw-simple-modal {
  width: min(1120px, 96vw);
  max-height: 92vh;
  max-height: min(92vh, calc(100dvh - 40px));
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.draw-simple-modal .draw-modal-head {
  min-height: 62px;
  padding-block: 14px;
  flex: 0 0 auto;
}

.draw-simple-modal .draw-footer {
  flex: 0 0 auto;
}

.draw-simple-modal .draw-modal-body {
  background: #f8f6f1;
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  overflow: hidden;
}

.draw-simple-layout {
  display: flex;
  flex: 1 1 auto;
  min-width: 0;
  min-height: 0;
}

.draw-simple-layout .draw-board {
  padding: 10px;
  flex: 1 1 auto;
  min-width: 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.draw-stage-shell {
  position: relative;
  min-height: 0;
}

.draw-simple-modal .draw-stage-shell {
  flex: 1 1 auto;
  display: flex;
  min-height: 0;
}

.draw-simple-modal .draw-stage-scroll {
  flex: 1 1 auto;
  height: auto;
  min-height: 0;
  border-radius: 14px;
  background: #fff;
}

.draw-simple-modal .draw-stage {
  /* صفحهٔ کار تمام عرض می‌شود تا دور صورت سؤال (به‌خصوص سمت راست) فضای خالی خاکستری نماند */
  width: 100%;
  /* دستِ‌کم به‌اندازهٔ کادرِ دیده‌شده، و روی صفحه‌های بلند به‌اندازهٔ فضای موردنیازِ حل */
  min-height: max(100%, 720px);
}

.draw-simple-modal .draw-question-card {
  min-height: max(100%, 720px);
  /* فضای خالیِ زیرِ صورت سؤال برای حل؛ روی تبلت‌های کوتاه‌تر کمتر می‌شود تا اسکرولِ بی‌مورد نخورد */
  padding: 18px 22px clamp(260px, 52vh, 560px) 86px;
}

.draw-simple-toolbar {
  position: absolute;
  left: 16px;
  top: 18px;
  z-index: 12;
  display: grid;
  gap: 5px;
  /* روی تبلت‌های کوتاه، نوار ابزار از کادر بیرون می‌زد؛ حالا خودش اسکرول می‌شود */
  max-height: calc(100% - 32px);
  overflow-y: auto;
  scrollbar-width: none;
  padding: 8px 7px;
  border: 1px solid #eadfce;
  border-radius: 20px;
  background: rgba(255,253,250,.94);
  backdrop-filter: blur(16px);
  box-shadow: 0 14px 30px rgba(65,47,29,.12);
}

.draw-simple-toolbar .draw-tool,
.draw-simple-toolbar .draw-icon-btn {
  position: relative;
  width: 42px;
  min-width: 42px;
  height: 42px;
  min-height: 42px;
  border: 1px solid transparent;
  border-radius: 14px;
  background: transparent;
  color: #746b5f;
  display: grid;
  place-items: center;
  padding: 0;
  cursor: pointer;
  transition: background .16s ease, border-color .16s ease, color .16s ease, transform .16s var(--ease-soft);
}

/* جداکنندهٔ ظریف بین ابزارهای نوشتن و دکمه‌های تاریخچه/نمایش */
.draw-simple-toolbar #drawUndo {
  margin-top: 9px;
}
.draw-simple-toolbar #drawUndo::before {
  content: "";
  position: absolute;
  top: -7px;
  left: 8px;
  right: 8px;
  height: 1px;
  background: #eee3d2;
}

.draw-simple-toolbar #drawQuestionSmaller {
  margin-top: 9px;
}

.draw-simple-toolbar #drawQuestionSmaller,
.draw-simple-toolbar #drawQuestionLarger {
  font-size: 24px;
  font-weight: 850;
  line-height: 1;
}

.draw-simple-toolbar #drawQuestionSmaller::before {
  content: "";
  position: absolute;
  top: -7px;
  left: 8px;
  right: 8px;
  height: 1px;
  background: #eee3d2;
}

.draw-simple-toolbar .draw-tool:hover,
.draw-simple-toolbar .draw-icon-btn:hover {
  border-color: #f2c5a2;
  background: var(--orange-soft);
  color: var(--orange);
  transform: translateY(-1px);
}

.draw-simple-toolbar .draw-tool.on,
.draw-simple-toolbar .draw-icon-btn.on {
  border-color: #f2c5a2;
  background: #fff4ec;
  color: var(--orange);
  box-shadow: 0 8px 16px rgba(255,107,24,.12);
}

.draw-simple-toolbar .draw-tool svg,
.draw-simple-toolbar .draw-icon-btn svg {
  width: 21px;
  height: 21px;
  stroke-width: 2;
}

.draw-simple-toolbar .draw-icon-btn:disabled {
  opacity: .42;
  cursor: not-allowed;
  transform: none;
}

.draw-simple-toolbar .draw-tool-svg {
  opacity: .86;
  transition: opacity .16s ease, transform .16s var(--ease-soft);
}

.draw-simple-toolbar .draw-tool:hover .draw-tool-svg,
.draw-simple-toolbar .draw-tool.on .draw-tool-svg {
  opacity: 1;
}

.draw-simple-toolbar .draw-tool[data-draw-tool="pen"]::after,
.draw-simple-toolbar .draw-tool[data-draw-tool="highlight"]::after {
  content: "";
  position: absolute;
  left: 13px;
  right: 13px;
  bottom: 5px;
  height: 2.5px;
  border-radius: 999px;
  background: var(--draw-pen-color, #2563eb);
  box-shadow: 0 1px 4px color-mix(in srgb, var(--draw-pen-color, #2563eb) 30%, transparent);
}

.draw-simple-toolbar .draw-tool[data-draw-tool="highlight"]::after {
  background: var(--draw-highlight-color, #facc15);
  box-shadow: 0 1px 5px color-mix(in srgb, var(--draw-highlight-color, #facc15) 34%, transparent);
}

.draw-simple-toolbar .draw-icon-btn.off {
  color: #b7afa4;
  background: #f3f0e9;
}

.draw-simple-popover {
  position: absolute;
  left: 76px;
  top: 20px;
  z-index: 11;
  display: grid;
  gap: 14px;
  width: min(390px, calc(100% - 110px));
  padding: 17px 20px;
  border-radius: 24px;
  border: 1px solid #eadfce;
  background: rgba(255,253,250,.96);
  color: var(--ink);
  backdrop-filter: blur(16px);
  box-shadow: 0 18px 38px rgba(65,47,29,.14);
  opacity: 1;
  transform: translateX(0) scale(1);
  transform-origin: top left;
  transition: opacity .16s ease, transform .16s var(--ease-soft), visibility .16s ease;
}

.draw-simple-popover.is-hidden {
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
  transform: translateX(-8px) scale(.98);
}

.draw-size-picker {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) 22px;
  align-items: center;
  gap: 12px;
}

.draw-size-picker span {
  width: 22px;
  height: 2px;
  border-radius: 999px;
  background: #7a7166;
  box-shadow: 0 6px 0 #7a7166, 0 -6px 0 #7a7166;
  opacity: .82;
}

.draw-size-picker input {
  width: 100%;
  accent-color: var(--orange);
}

.draw-size-picker b {
  color: var(--ink);
  font-size: 14px;
  text-align: center;
}

/* سرِ پنجره نامِ ابزارِ فعال و نمونهٔ واقعیِ ضخامت و رنگش را نشان می‌دهد تا معلوم
   باشد اندازه‌ی کدام ابزار عوض می‌شود. */
.draw-popover-head {
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 40px;
}
.draw-popover-head b {
  flex: none;
  color: var(--ink);
  font-size: 14px;
  font-weight: 800;
}
.draw-size-preview {
  flex: 1;
  height: var(--size, 4px);
  max-height: 40px;
  border-radius: 999px;
  background: var(--ink, #2563eb);
  opacity: var(--ink-opacity, .9);
}

.draw-color-palette {
  display: flex;
  align-items: center;
  gap: 16px;
}

.draw-color-palette button,
.draw-custom-color {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 999px;
  background: var(--swatch, #fff);
  color: #7a7166;
  cursor: pointer;
  box-shadow: 0 0 0 0 rgba(255,255,255,0);
}

.draw-color-palette button.on {
  box-shadow: 0 0 0 10px color-mix(in srgb, var(--swatch, #fff) 22%, transparent);
}

.draw-custom-color {
  border: 2px solid #ded4c5;
  background: #fff;
  position: relative;
}

.draw-custom-color svg {
  width: 20px;
  height: 20px;
}

.draw-custom-color input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.draw-simple-modal .draw-footer {
  padding-block: 12px;
  flex-wrap: wrap;
}

/* زمانِ دفترچهٔ فعال، داخل خودِ چرک‌نویس: دانش‌آموز برای دیدن زمان مجبور نیست چرک‌نویس را ببندد */
.draw-exam-clock {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 11px;
  border-radius: 999px;
  border: 1px solid #e6ded0;
  background: #fbf7ef;
  color: var(--ink);
  font-size: 12px;
  font-weight: 800;
}
.draw-exam-clock i {
  font-style: normal;
  color: var(--muted);
  font-weight: 700;
}
.draw-exam-clock b {
  font-size: 14px;
  font-variant-numeric: tabular-nums;
}
.draw-exam-clock.time-hidden b { filter: blur(7px); user-select: none; }
.draw-exam-clock.danger {
  border-color: #f3c2bb;
  background: #fdecea;
  color: #b93a2a;
}
.draw-exam-clock.danger i { color: #c4655a; }

/* ثبت پاسخ بدون بستنِ چرک‌نویس */
.draw-answer-bar {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 12px;
  font-weight: 800;
  color: var(--muted);
}
.draw-answer-opt {
  width: 42px;
  height: 42px;
  border-radius: 13px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  font: inherit;
  font-size: 15px;
  font-weight: 800;
  cursor: pointer;
  transition: background .14s ease, border-color .14s ease, color .14s ease;
}
.draw-answer-opt:hover { border-color: var(--orange); }
.draw-answer-opt.on {
  background: var(--orange);
  border-color: var(--orange);
  color: #fff;
}

@media (max-width: 840px) {
  .draw-layout {
    grid-template-columns: 1fr;
  }
  .draw-side {
    border-inline-end: 0;
    border-bottom: 1px solid var(--line);
    max-height: 220px;
  }
  .draw-stage-scroll {
    height: calc(100vh - 360px);
  }
  .draw-stage,
  .draw-question-card {
    min-height: 540px;
  }
  .draw-question-card {
    padding: 18px;
  }
  .draw-question-options {
    grid-template-columns: 1fr;
  }
  .draw-question-options.is-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .draw-tool b {
    display: none;
  }
  .draw-simple-modal .draw-stage-scroll {
    height: auto; /* ارتفاع از چیدمانِ ستونیِ مودال می‌آید، نه از vh */
  }
  .draw-simple-modal .draw-stage,
  .draw-simple-modal .draw-question-card {
    min-height: max(100%, 520px);
  }
  .draw-simple-modal .draw-question-card {
    padding: 14px 14px clamp(200px, 46vh, 420px) 68px;
  }
  .draw-simple-toolbar {
    left: 10px;
    top: 12px;
    gap: 6px;
    padding: 8px 6px;
    border-radius: 18px;
  }
  .draw-simple-toolbar .draw-tool,
  .draw-simple-toolbar .draw-icon-btn {
    width: 38px;
    min-width: 38px;
    height: 38px;
    min-height: 38px;
    border-radius: 14px;
  }
  .draw-simple-popover {
    left: 60px;
    top: 12px;
    width: min(310px, calc(100% - 78px));
    padding: 13px 14px;
    gap: 10px;
    border-radius: 18px;
  }
  .draw-color-palette {
    gap: 10px;
  }
}

/* موبایل: مودالِ نوشتن تمام‌صفحه است ولی با ارتفاعِ واقعیِ همان لحظه (dvh)، نه 100vh
   که با باز بودن نوار آدرس از پایین بیرون می‌زد. بعد از قانون‌های بالا می‌آید تا برنده شود. */
@media (max-width: 640px) {
  .modal.draw-simple-modal {
    width: 100vw;
    height: 100dvh;
    max-height: 100dvh;
    border-radius: 0;
  }
}

/* تبلت و صفحه‌های کم‌ارتفاع: نوار ابزار و پای مودال جا را از صفحهٔ کار نگیرند */
@media (max-height: 700px) {
  .draw-simple-modal .draw-modal-head {
    min-height: 0;
    padding-block: 9px;
  }
  .draw-simple-modal .draw-footer {
    padding-block: 8px;
  }
  .draw-simple-layout .draw-board {
    padding: 7px;
  }
  .draw-simple-modal .draw-stage,
  .draw-simple-modal .draw-question-card {
    min-height: max(100%, 460px);
  }
  .draw-simple-toolbar {
    top: 10px;
    left: 10px;
    gap: 3px;
    padding: 6px 5px;
  }
  .draw-simple-toolbar .draw-tool,
  .draw-simple-toolbar .draw-icon-btn {
    width: 36px;
    min-width: 36px;
    height: 36px;
    min-height: 36px;
    border-radius: 12px;
  }
  .draw-simple-toolbar #drawUndo {
    margin-top: 6px;
  }
  .draw-answer-opt {
    width: 38px;
    height: 38px;
  }
}

/* نوار کناری فیلترها */
.sbank-side {
  position: sticky; top: 16px;
  background: var(--card); border: 1px solid var(--line); border-radius: 16px;
  padding: 6px; max-height: calc(100vh - 32px); overflow-y: auto;
}
.sd-summary-head { display: flex; align-items: center; gap: 7px; padding: 12px 12px 8px; font-size: 13px; }
.sd-summary-head svg { width: 16px; height: 16px; color: var(--orange); }
.sd-summary { padding: 0 12px 10px; border-bottom: 1px solid var(--line); margin-bottom: 4px; }
.sd-sel-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.sd-empty-sel { font-size: 11px; color: var(--muted); padding: 4px 0; }
.sd-clear { font-size: 11px; margin-top: 8px; padding: 5px 10px; }

/* هر گروهِ فیلتر یک کارتِ مستقل است، پس بینشان فاصلهٔ واقعی می‌خواهد؛ با
   چسبیدنِ کارت‌ها به هم، خطِ جداکننده تنها نشانهٔ مرزِ گروه بود و نوار یکپارچه
   دیده می‌شد. `.exam-filter-side` حاشیه‌اش را صفر می‌کند و فاصله را از `gap`ِ
   خودش می‌گیرد، پس این قاعده فقط نوارِ بانک سؤال را جابه‌جا می‌کند. */
.sd-section {
  border-bottom: 1px solid #f1efe9;
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 7px;
}
.sd-section:last-child { margin-bottom: 0; }
.sd-section[open] { background: #fffdf9; }
.sd-section > summary {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px; font-size: 12.5px; font-weight: 700; cursor: pointer; color: var(--ink); list-style: none;
}
.sd-section > summary::-webkit-details-marker { display: none; }
.sd-section > summary svg { width: 15px; height: 15px; color: var(--muted); transition: transform .2s ease; }
.sd-section[open] > summary svg { transform: rotate(180deg); }
.sd-body { padding: 0 12px 12px; }
.sd-select, .sd-num { width: 100%; border: 1px solid var(--line); border-radius: 9px; padding: 7px 9px; font: inherit; font-size: 12px; background: #fff; }
.sd-num { width: 90px; }
.sd-inline { display: flex; align-items: center; gap: 7px; font-size: 12px; color: var(--muted); }
.sd-mini-label { display: block; font-size: 11px; color: var(--muted); margin-bottom: 6px; }
.sd-hint { display: block; font-size: 10px; color: var(--muted); margin-top: 7px; }
.sd-limit-box {
  display: grid;
  gap: 9px;
}
.sd-limit-box .sd-select {
  height: 38px;
  font-weight: 800;
}
.sd-limit-box .sd-inline {
  justify-content: space-between;
}
.sd-limit-box .sd-num {
  width: 118px;
  height: 42px;
  text-align: center;
  font-weight: 800;
}
.sd-recent-row {
  display: grid;
  grid-template-columns: minmax(82px, 1fr) auto auto;
  align-items: center;
  gap: 8px;
}
.sd-recent-row .sd-num {
  width: 100%;
  height: 40px;
  text-align: center;
  font-weight: 900;
}
.sd-recent-row > span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  white-space: nowrap;
}
.sd-apply-btn {
  height: 40px;
  border: 1px solid #f0d3b4;
  border-radius: 10px;
  background: var(--orange-soft);
  color: #9a5a1f;
  padding: 0 12px;
  font: inherit;
  font-size: 11px;
  font-weight: 900;
  cursor: pointer;
  transition: background .16s ease, border-color .16s ease, transform .16s ease;
}
.sd-apply-btn:hover {
  border-color: #f0b487;
  background: #ffe9d5;
  transform: translateY(-1px);
}
.sd-check-group { display: flex; flex-direction: column; gap: 2px; }
.sd-check, .sd-radio {
  display: flex; align-items: center; gap: 8px; padding: 7px 8px; border-radius: 9px;
  font-size: 12px; cursor: pointer; transition: background .12s ease;
}
.sd-check:hover, .sd-radio:hover { background: #fff7ef; transform: translateX(-1px); }
.sd-check.on, .sd-radio.on { color: #9a5a1f; font-weight: 800; background: #fff3e8; }
.sd-check input, .sd-radio input { width: 15px; height: 15px; flex: none; accent-color: var(--orange); }
.sd-check b { margin-inline-start: auto; font-size: 11px; color: var(--muted); }
/* گزینه‌ای که با فیلترهای فعلی هیچ سؤالی ندارد: می‌ماند (جای گزینه‌ها نپرد) ولی
   کم‌رنگ می‌شود. کلیک‌پذیر می‌ماند چون خودش می‌تواند فیلترِ دیگری را بردارد. */
.sd-check.is-zero { opacity: .42; }
.sd-check.is-zero:hover { opacity: .75; }
.sd-radio-group { display: flex; flex-direction: column; gap: 2px; }
.composition-filter {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

/* درخت منبع */
.src-tree { display: flex; flex-direction: column; }
.src-row { display: flex; align-items: center; gap: 4px; padding: 5px 0; }
.src-caret { border: 0; background: transparent; cursor: pointer; color: var(--muted); display: grid; place-items: center; width: 20px; height: 20px; flex: none; }
.src-caret svg { width: 14px; height: 14px; transition: transform .18s ease; transform: rotate(-90deg); }
.src-caret.open svg { transform: rotate(0deg); }
.src-caret.hidden { visibility: hidden; }
.src-check { display: flex; align-items: center; gap: 7px; font-size: 12px; cursor: pointer; flex: 1; min-width: 0; }
.src-check span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.src-check input { width: 14px; height: 14px; flex: none; accent-color: var(--orange); }
.src-check.on { font-weight: 700; color: var(--ink); }
.src-count { font-size: 11px; color: var(--muted); flex: none; }
.src-year { display: flex; align-items: center; gap: 7px; padding: 5px 0; font-size: 11px; color: var(--muted); cursor: pointer; }
.src-year input { width: 13px; height: 13px; flex: none; accent-color: var(--orange); }
.src-year span { flex: none; min-width: 0; white-space: nowrap; }
.src-year b { margin-inline-start: auto; font-size: 10px; }
.src-year.on { color: var(--ink); font-weight: 600; }

@media (max-width: 980px) {
  .sbank { flex-direction: column; }
  .sbank-side { position: static; max-height: none; flex-basis: auto; width: 100%; }
  /* در حالت ستونی، align-items:flex-start باعث می‌شد main به عرض max-content (چیپ بلند مبحث) باز شود و صفحه اسکرول افقی بگیرد */
  .sbank-main { width: 100%; max-width: 100%; }
}

.sd-collapse-btn {
  margin-inline-start: auto; border: 0; background: transparent; color: var(--muted);
  cursor: pointer; display: grid; place-items: center; width: 26px; height: 26px; border-radius: 7px;
  transition: 0.15s ease;
}
.sd-collapse-btn:hover { background: #f1efe8; color: var(--ink); }
.sd-collapse-btn svg { width: 16px; height: 16px; }

.sd-sec-title { display: inline-flex; align-items: center; gap: 8px; }
.sd-sec-title svg { width: 16px; height: 16px; color: var(--orange); opacity: .85; }

.sd-section > summary, .sd-check, .sd-radio, .src-row, .fs-chip, .seg, .sb-page, .sbank-chip { transition: 0.16s cubic-bezier(0.22,0.61,0.36,1); }
.src-row:hover { background: #f7f5f0; border-radius: 8px; }

/* باز/بستهٔ نرمِ بخش‌های نوار فیلتر و زیرشاخه‌های درخت منبع: ارتفاع با Web Animations
   در JS انیمیت می‌شود (بخش «باز/بسته‌شدنِ نرم» در app.js)، چون transition روی
   ::details-content در همهٔ مرورگرها ارتفاع را درون‌یابی نمی‌کند و پرش می‌دهد. */
.sd-body, .src-children { will-change: height; }
/* حسِ تعاملیِ انتخاب در درخت منبع، هم‌سنگِ چک‌باکس‌های بالاتر */
.src-year { border-radius: 8px; padding-block: 5px; transition: 0.16s cubic-bezier(0.22,0.61,0.36,1); }
.src-year:hover { background: #f7f5f0; }
.sd-check:active, .sd-radio:active { filter: brightness(.98); }
@media (prefers-reduced-motion: reduce) {
  .sd-body { animation: none; }
  .sd-section::details-content { transition: none; }
}
.meta-chip .mc-more { flex: none; font-size: 9px; font-weight: 800; color: #b9762a; background: #fbecd9; border-radius: 6px; padding: 1px 5px; }

/* مودال گزارش خطا — کارت‌های دلیل */
.report-reasons { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.report-reason {
  border: 1px solid var(--line); background: #fff; border-radius: 12px;
  padding: 13px 14px; font: inherit; font-size: 13px; font-weight: 600; color: var(--ink);
  cursor: pointer; text-align: center; transition: 0.16s cubic-bezier(0.22,0.61,0.36,1);
}
.report-reason:hover { border-color: #f0b487; transform: translateY(-2px); box-shadow: 0 8px 18px rgba(79,58,38,.08); }
.report-reason.on { background: #fdecec; border-color: #f0b3b3; color: #d3473f; }

/* ───────── نوار ناوبری جمع‌شونده دانش‌آموز در همه بخش‌ها به‌جز داشبورد ───────── */
.app-shell.nav-mini {
  grid-template-columns: 74px minmax(0, 1fr);
  transition: grid-template-columns .25s cubic-bezier(0.22,0.61,0.36,1);
}

@media (min-width: 821px) {
  .app-shell.nav-mini .sidebar {
    width: 74px;
    padding: 18px 10px 12px;
    align-items: stretch;
    overflow-x: hidden;
    z-index: 50;                 /* بالای هدر (۴۵) تا هنگام باز شدن زیرِ آن نرود */
    transition:
      width .28s cubic-bezier(0.22,0.61,0.36,1),
      padding .28s cubic-bezier(0.22,0.61,0.36,1),
      box-shadow .2s ease,
      background .2s ease;
    will-change: width;
  }

  .app-shell.nav-mini .sidebar.is-open,
  .app-shell.nav-mini .sidebar:focus-within {
    width: 244px;
    padding: 22px 14px 14px;
    background: rgba(252, 251, 248, 0.98);
    box-shadow: -18px 0 38px rgba(41, 36, 29, 0.1);
  }

  .app-shell.nav-mini .brand {
    justify-content: center;
    gap: 0;
    padding-inline: 0;
    transition:
      gap .24s cubic-bezier(0.22,0.61,0.36,1),
      padding .24s cubic-bezier(0.22,0.61,0.36,1);
  }

  .app-shell.nav-mini .sidebar.is-open .brand,
  .app-shell.nav-mini .sidebar:focus-within .brand {
    justify-content: flex-start;
    gap: 12px;
    padding: 0 9px 24px;
  }

  .app-shell.nav-mini .brand > div:last-child {
    max-width: 0;
    opacity: 0;
    overflow: hidden;
    white-space: nowrap;
    transform: translateX(8px);
    transition:
      max-width .26s cubic-bezier(0.22,0.61,0.36,1),
      opacity .18s ease,
      transform .26s cubic-bezier(0.22,0.61,0.36,1);
  }

  .app-shell.nav-mini .sidebar.is-open .brand > div:last-child,
  .app-shell.nav-mini .sidebar:focus-within .brand > div:last-child {
    max-width: 150px;
    opacity: 1;
    transform: translateX(0);
  }

  .app-shell.nav-mini .nav-label {
    max-height: 0;
    opacity: 0;
    padding-block: 0;
    overflow: hidden;
    transition:
      max-height .24s cubic-bezier(0.22,0.61,0.36,1),
      opacity .18s ease,
      padding .24s cubic-bezier(0.22,0.61,0.36,1);
  }

  .app-shell.nav-mini .sidebar.is-open .nav-label,
  .app-shell.nav-mini .sidebar:focus-within .nav-label {
    max-height: 36px;
    opacity: 1;
    padding: 18px 13px 7px;
  }

  .app-shell.nav-mini .nav-item {
    justify-content: center;
    padding-inline: 0;
    gap: 0;
    transition:
      background .16s ease,
      color .16s ease,
      transform .16s cubic-bezier(0.22,0.61,0.36,1),
      padding .24s cubic-bezier(0.22,0.61,0.36,1),
      gap .24s cubic-bezier(0.22,0.61,0.36,1);
  }

  .app-shell.nav-mini .sidebar.is-open .nav-item,
  .app-shell.nav-mini .sidebar:focus-within .nav-item {
    justify-content: flex-start;
    padding-inline: 12px;
    gap: 10px;
  }

  .app-shell.nav-mini .nav-item > span:not(.nav-count) {
    max-width: 0;
    opacity: 0;
    overflow: hidden;
    white-space: nowrap;
    transform: translateX(8px);
    transition:
      max-width .26s cubic-bezier(0.22,0.61,0.36,1),
      opacity .18s ease,
      transform .26s cubic-bezier(0.22,0.61,0.36,1);
  }

  .app-shell.nav-mini .sidebar.is-open .nav-item > span:not(.nav-count),
  .app-shell.nav-mini .sidebar:focus-within .nav-item > span:not(.nav-count) {
    max-width: 150px;
    opacity: 1;
    transform: translateX(0);
  }

  .app-shell.nav-mini .nav-item .nav-count { display: none; }
}

/* ───────── آیکون سطح در فیلتر، آیکون منبع، تولتیپ، پاپ‌اوور سال ───────── */
.sd-check .difficulty-gauge { width: 26px; height: 22px; flex: none; }
.sd-sec-title { gap: 0; } /* بدون آیکون */

.src-node-icon { width: 18px; height: 18px; display: inline-flex; flex: none; }
.src-node-icon svg,
.src-node-icon img { width: 100%; height: 100%; object-fit: contain; }
.sq-src-icon {
  display: grid;
  place-items: center;
  width: 56px !important;
  height: 56px !important;
  min-width: 56px;
  min-height: 56px;
  max-width: 56px;
  max-height: 56px;
  margin: 0 auto 6px;
  border-radius: 16px;
  background: #fff;
  border: 1px solid #eee3d7;
  overflow: hidden;
}
.sq-src-icon svg,
.sq-src-icon img { width: 82%; height: 82%; object-fit: contain; }
.sq-src-icon.src-icon-fallback svg {
  width: 30px;
  height: 30px;
}
.src-icon-fallback svg { width: 16px; height: 16px; color: var(--muted); }

/* تولتیپ تعاملی نام منبع */
[data-src-tip] { position: relative; }
[data-src-tip]:hover::after {
  content: attr(data-src-tip);
  position: absolute; bottom: calc(100% + 6px); right: 0;
  background: #282621; color: #fff; font-size: 10px; font-weight: 700;
  padding: 5px 9px; border-radius: 8px; white-space: nowrap; z-index: 60;
  box-shadow: 0 8px 20px rgba(0,0,0,.18); pointer-events: none;
  animation: tipIn .16s ease;
}
@keyframes tipIn { from { opacity: 0; transform: translateY(3px); } to { opacity: 1; transform: translateY(0); } }

/* پاپ‌اوور بازهٔ سال (الهام از نمونه) */
.sbank-year-wrap { position: relative; }
.year-pop {
  position: absolute; top: calc(100% + 8px); right: 0; z-index: 55;
  width: 330px; background: #fff; border: 1px solid var(--line); border-radius: 16px;
  box-shadow: 0 22px 50px rgba(40,34,24,.22); padding: 12px;
  animation: authStageIn .2s cubic-bezier(0.22,0.61,0.36,1);
}
.year-tabs { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; }
.year-tab {
  flex: 1; border: 1px solid var(--line); background: #fff; border-radius: 10px;
  padding: 8px; font: inherit; font-size: 11px; font-weight: 600; color: var(--muted); cursor: pointer;
  transition: 0.15s ease;
}
.year-tab b { color: var(--ink); font-weight: 800; }
.year-tab.on { background: #fbf0e3; border-color: #f0d3b4; color: #9a5a1f; }
.year-tabs-mid { font-size: 11px; font-weight: 700; color: var(--muted); flex: none; }
.year-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.year-cell {
  border: 1px solid var(--line); background: #fff; border-radius: 11px;
  padding: 11px 4px; font: inherit; font-size: 12px; font-weight: 700; color: var(--ink);
  cursor: pointer; transition: 0.15s cubic-bezier(0.22,0.61,0.36,1); direction: ltr;
}
.year-cell:hover { border-color: #f0b487; transform: translateY(-1px); }
.year-cell.on { background: var(--orange); color: #fff; border-color: var(--orange); }
.year-cell.special { direction: rtl; color: #9a5a1f; background: #fdf6ec; }
.year-cell.special.on { background: var(--orange); color: #fff; }

@media (max-width: 760px) {
  .sq-item {
    flex-direction: column;
  }
  .sq-rail {
    width: 100%;
    flex-direction: row;
    border-inline-start: 0;
    border-top: 1px solid #f1efe9;
  }
  .sq-rail-cell {
    min-height: 96px;
  }
  .sq-rail-cell + .sq-rail-cell {
    border-top: 0;
    border-inline-start: 1px solid #f1efe9;
  }
  .sq-rail-cell[data-rail-tip]::after {
    left: 50%;
    top: auto;
    bottom: calc(100% + 10px);
    max-width: min(320px, calc(100vw - 32px));
    white-space: normal;
    transform: translateX(-50%) translateY(6px);
  }
  .sq-rail-cell[data-rail-tip]::before {
    left: 50%;
    top: auto;
    bottom: calc(100% + 4px);
    transform: translateX(-50%) translateY(6px) rotate(-45deg);
  }
  .sq-rail-cell[data-rail-tip]:hover::after,
  .sq-rail-cell[data-rail-tip]:focus-within::after {
    transform: translateX(-50%) translateY(0);
  }
  .sq-rail-cell[data-rail-tip]:hover::before,
  .sq-rail-cell[data-rail-tip]:focus-within::before {
    transform: translateX(-50%) translateY(0) rotate(-45deg);
  }
  .sq-source-tooltip {
    left: 50%;
    top: auto;
    bottom: calc(100% + 10px);
    width: max-content;
    max-width: calc(100vw - 28px);
    transform: translateX(-50%) translateY(8px);
  }
  .sq-source-tooltip::before {
    left: 50%;
    top: auto;
    bottom: -7px;
    border-left: 0;
    border-bottom: 1px solid rgba(240, 180, 135, .74);
    border-right: 1px solid rgba(240, 180, 135, .74);
    transform: translateX(-50%) rotate(45deg);
  }
  .sq-rail-src:hover .sq-source-tooltip,
  .sq-rail-src:focus-within .sq-source-tooltip {
    transform: translateX(-50%) translateY(0);
  }
  /* روی موبایل، گزینهٔ متوسط و بلند تک‌ستونی می‌شود؛ آنجا هم‌قدسازی فقط ارتفاعِ
     بلندترین گزینه را چهار بار تکرار می‌کند و صفحه را بی‌دلیل بلند می‌کند. */
  .sq-answer-options {
    grid-template-columns: 1fr;
    grid-auto-rows: max-content;
  }
  .sq-answer-options.is-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-auto-rows: 1fr;
  }
  /* شکلِ سؤال روی گوشی: درصدی که مدیر برای صفحهٔ دسکتاپ انتخاب کرده (مثلاً ۲۱٪)
     روی عرض ۳۴۰ پیکسلی یعنی یک تصویرِ ۷۰ پیکسلیِ ناخوانا. کف می‌گذاریم تا هر
     شکلی دست‌کم دوسومِ عرضِ صفحه را بگیرد؛ سقفِ ۱۰۰٪ سرِ جایش است، پس شکلِ
     عریض تغییری نمی‌کند و تراز (چپ/راست/وسط) هم حفظ می‌شود. */
  .sq-rich-text .mkfig:not([data-mk-figw]),
  .sq-side-figure .mkfig:not([data-mk-figw]) { min-width: min(100%, 66%); }
  .sq-item .sq-sheet { padding: 12px; }
  .year-pop {
    width: min(330px, calc(100vw - 42px));
    right: auto;
    left: 0;
  }
}

/* چیپ سطح سؤال در سربرگ سؤال (سمت راست، با رنگ متناسب با سطح) */
/* سلول سطح سؤال در ریل (زیر ضریب تمیز)، با رنگ متناسب با سطح */
.sq-rail-diff small { font-weight: 800; }
.sq-rail-diff.level-1 small { color: #1aa58e; }
.sq-rail-diff.level-2 small { color: #b07d12; }
.sq-rail-diff.level-3 small { color: #d4631f; }
.sq-rail-diff.level-4 small { color: #d2434c; }

/* ───────── گزارش فعالیت: چیپ‌های نوع فعالیت ───────── */
.audit-actions { display: flex; flex-wrap: wrap; gap: 8px; padding: 12px 18px 16px; }
.audit-chip {
  display: inline-flex; align-items: center; gap: 7px;
  border: 1px solid var(--line); background: #fff; border-radius: 999px;
  padding: 7px 13px; font: inherit; font-size: 12px; font-weight: 600; color: var(--ink);
  cursor: pointer; transition: 0.16s cubic-bezier(0.22,0.61,0.36,1);
}
.audit-chip:hover { border-color: #f0b487; transform: translateY(-1px); }
.audit-chip.on { background: var(--orange); color: #fff; border-color: var(--orange); }
.audit-chip b { font-size: 10px; background: rgba(0,0,0,.06); border-radius: 6px; padding: 1px 6px; }
.audit-chip.on b { background: rgba(255,255,255,.25); }
.audit-actor { display: inline-flex; align-items: center; gap: 5px; }
.audit-actor .avatar { width: 20px; height: 20px; border-radius: 6px; }

.audit-date-range {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding: 14px 18px;
}
.audit-date-range button {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 12px;
  min-height: 38px;
  padding: 0 11px;
  font: inherit;
  font-size: 11px;
  font-weight: 800;
  color: var(--muted);
  cursor: pointer;
  transition: transform .16s var(--ease-soft), border-color .16s ease, background .16s ease, color .16s ease;
}
.audit-date-range button:hover,
.audit-date-range button.on {
  transform: translateY(-1px);
  border-color: #f0b487;
  background: var(--orange-soft);
  color: #c25710;
}
.audit-date-range button svg { width: 15px; height: 15px; }
.audit-date-range button b { color: var(--ink); font-size: 12px; }
.audit-date-range .audit-date-clear {
  background: #f8f6f1;
  color: #8f8170;
}
.audit-date-range small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.audit-calendar {
  width: min(320px, calc(100% - 36px));
  margin: -4px 18px 14px auto;
  border: 1px solid #f0d3b4;
  border-radius: 15px;
  background: #fffdf9;
  box-shadow: 0 18px 35px rgba(65, 47, 29, .12);
  padding: 10px;
}
.audit-cal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
}
.audit-cal-head button {
  width: 32px;
  height: 32px;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 10px;
  display: grid;
  place-items: center;
  cursor: pointer;
  color: #9a5a1f;
  transition: transform .16s var(--ease-soft), background .16s ease;
}
.audit-cal-head button:hover { transform: translateY(-1px); background: var(--orange-soft); }
.audit-cal-head button svg { width: 15px; height: 15px; }
.audit-cal-head strong { font-size: 13px; color: var(--ink); }
.audit-cal-weekdays,
.audit-cal-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 5px;
}
.audit-cal-weekdays span {
  text-align: center;
  font-size: 10px;
  font-weight: 850;
  color: var(--muted);
  padding: 3px 0;
}
.audit-cal-cell {
  min-height: 34px;
  border: 1px solid transparent;
  border-radius: 10px;
  background: #fff;
  color: var(--ink);
  font: inherit;
  font-size: 12px;
  font-weight: 850;
  cursor: pointer;
  transition: transform .14s var(--ease-soft), border-color .14s ease, background .14s ease, color .14s ease;
}
.audit-cal-cell.empty {
  background: transparent;
  pointer-events: none;
}
.audit-cal-cell:hover {
  transform: translateY(-1px);
  border-color: #f0b487;
  color: #c25710;
}
.audit-cal-cell.today { background: #f8f6f1; border-color: #eee7dd; }
.audit-cal-cell.selected {
  background: var(--orange);
  color: #fff;
  border-color: var(--orange);
  box-shadow: 0 8px 18px rgba(255, 107, 24, .18);
}

.audit-event-list {
  padding-top: 6px;
}
.audit-event-row {
  align-items: center;
  gap: 16px;
  margin: 0 -6px;
  padding: 12px 10px;
  border-radius: 13px;
  transition: background .16s ease, transform .16s var(--ease-soft), box-shadow .16s ease, border-color .16s ease;
}
.audit-event-row:hover {
  background: #fffaf5;
  transform: translateY(-1px);
  box-shadow: 0 10px 22px rgba(65, 47, 29, .07);
}
.audit-event-main {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}
.audit-event-main strong {
  color: #6b655b;
  font-size: 13px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.audit-event-meta {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  min-width: 280px;
  white-space: nowrap;
  color: var(--muted);
  font-size: 11px;
  font-weight: 750;
}
.audit-actor-line {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #4d4840;
}
.audit-actor-line .avatar { width: 24px; height: 24px; border-radius: 8px; }
.audit-actor-line b { font-size: 12px; color: var(--ink); }
.audit-actor-line i {
  font-style: normal;
  font-size: 10px;
  color: #9a5a1f;
  background: #fbf0e3;
  border-radius: 7px;
  padding: 2px 7px;
}
.audit-event-meta time {
  color: #827e75;
  direction: ltr;
}
@media (max-width: 760px) {
  .audit-event-row {
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
  }
  .audit-event-main,
  .audit-event-meta {
    width: 100%;
  }
  .audit-event-meta {
    justify-content: flex-start;
    min-width: 0;
    overflow-x: auto;
  }
  .audit-calendar {
    width: calc(100% - 36px);
  }
}

/* ───────── گزارش فعالیت: جستجوی کاربر ───────── */
.audit-user-search { padding: 4px 18px 14px; position: relative; max-width: 480px; }
.audit-search-box { position: relative; }
.audit-search-box input {
  width: 100%; border: 1px solid var(--line); border-radius: 11px;
  padding: 10px 36px 10px 12px; font: inherit; font-size: 13px; background: #fff;
}
.audit-search-box .search-glyph { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); }
.audit-user-results {
  margin-top: 8px; border: 1px solid var(--line); border-radius: 12px; background: #fff;
  box-shadow: 0 14px 34px rgba(40,34,24,.12); overflow: hidden;
}
.audit-user-result {
  display: flex; align-items: center; gap: 10px; width: 100%; text-align: right;
  border: 0; border-bottom: 1px solid #f1efe9; background: #fff; cursor: pointer;
  padding: 9px 12px; font: inherit; transition: background .12s ease;
}
.audit-user-result:last-child { border-bottom: 0; }
.audit-user-result:hover { background: #f7f5f0; }
.aur-main { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.aur-main b { font-size: 12.5px; color: var(--ink); }
.aur-main small { font-size: 10px; color: var(--muted); }
.aur-kind { font-size: 10px; font-weight: 700; color: #9a5a1f; background: #fbf0e3; border-radius: 7px; padding: 3px 9px; flex: none; }
.audit-user-empty { padding: 12px; font-size: 12px; color: var(--muted); }
.audit-actor-pill {
  display: inline-flex; align-items: center; gap: 8px;
  background: #fbf0e3; border: 1px solid #f0d3b4; border-radius: 999px; padding: 5px 6px 5px 12px;
}
.audit-actor-pill b { font-size: 12.5px; color: #9a5a1f; }
.audit-actor-uid { font-size: 10px; color: var(--muted); }
.audit-actor-pill .avatar { width: 24px; height: 24px; border-radius: 8px; }
.audit-actor-x { border: 0; background: rgba(0,0,0,.06); width: 22px; height: 22px; border-radius: 7px; cursor: pointer; display: grid; place-items: center; color: #9a5a1f; }
.audit-actor-x svg { width: 13px; height: 13px; }

/* ───────── فایل‌های پیوست پوشه ───────── */
.folder-files { display: flex; flex-direction: column; gap: 10px; padding: 14px 18px 18px; }
.folder-file {
  display: flex; align-items: center; gap: 12px;
  border: 1px solid var(--line); background: #fff; border-radius: 13px; padding: 12px 14px;
  transition: 0.16s ease;
}
.folder-file:hover { border-color: #f0b487; box-shadow: 0 8px 18px rgba(79,58,38,.06); }
.file-type {
  flex: none; width: 46px; height: 40px; border-radius: 9px; color: #fff;
  display: grid; place-items: center; font-size: 11px; font-weight: 800; letter-spacing: .3px;
}
.ff-info { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.ff-info strong { font-size: 13px; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ff-info small { font-size: 10px; color: var(--muted); }
.ff-download {
  display: inline-flex; align-items: center; gap: 5px; flex: none;
  border: 1px solid #b3ddd0; background: #f1fbf7; color: #2f9e83; border-radius: 10px;
  padding: 8px 14px; font-size: 12px; font-weight: 700; text-decoration: none; transition: 0.15s ease;
}
.ff-download:hover { background: #2f9e83; color: #fff; border-color: #2f9e83; }
.ff-download svg { width: 15px; height: 15px; }

/* ───────── پروفایل در هدر (بالا سمت چپ) ───────── */
.topbar-profile {
  width: auto;
  margin: 0;
  margin-inline-start: auto;   /* در RTL به سمت چپِ هدر می‌رود */
  padding: 6px 12px 6px 7px;
  border-radius: 12px;
  max-width: 280px;
  transition: 0.16s ease;
}
.topbar-profile:hover { background: #fbfaf7; border-color: #f0b487; box-shadow: 0 6px 16px rgba(79,58,38,.07); }
.topbar-profile .avatar { width: 32px; height: 32px; border-radius: 10px; }
.topbar-profile strong, .topbar-profile small { display: block; text-align: right; line-height: 1.4; }
.topbar-profile strong { font-size: 12px; }
.topbar-profile small { font-size: 10px; color: var(--muted); }
.topbar-profile .chevron { width: 14px; height: 14px; color: var(--muted); flex: none; }
@media (max-width: 640px) {
  .topbar-profile small { display: none; }
  .topbar-profile { max-width: 180px; }
}

/* ───────── Micro interactions layer ───────── */
:root {
  --motion-fast: 140ms;
  --motion-med: 260ms;
  --motion-slow: 440ms;
  --ease-pop: cubic-bezier(0.2, 0.8, 0.2, 1);
  --ease-soft: cubic-bezier(0.22, 0.61, 0.36, 1);
  --lift-shadow: 0 14px 34px rgba(48, 39, 27, 0.1);
}

::selection {
  background: rgba(255, 107, 24, 0.18);
}

button,
a,
input,
select,
textarea,
.folder-card,
.stat-card,
.panel,
.type-card,
.media-card,
.folder-file,
.role-card,
.ms-opt,
.sd-check,
.sd-radio,
.src-row,
.question-form-nav > button,
.data-table tbody tr {
  -webkit-tap-highlight-color: transparent;
}

button,
a,
.folder-card,
.stat-card.clickable,
.type-card,
.media-card,
.folder-file,
.role-card,
.ms-opt,
.sd-check,
.sd-radio,
.src-row {
  transition-duration: var(--motion-med);
  transition-timing-function: var(--ease-soft);
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
[contenteditable="true"]:focus-visible {
  outline: 0;
  box-shadow: 0 0 0 3px rgba(255, 107, 24, 0.18), 0 0 0 1px rgba(255, 107, 24, 0.38);
}

/* داخل باکس‌های سرچ، هایلایت فوکوس باید روی کل کادر (focus-within کانتینر) بیفتد نه input داخلی.
   بدون این استثنا دو کادرِ رنگی هم‌زمان دیده می‌شود: حلقهٔ سراسریِ input و
   حاشیه/هالهٔ خودِ کادر. یک تغییرِ رنگ کافی است.

   قاعده: هر کادری که خودش حاشیه دارد و input داخلش `border: 0` است، باید اینجا
   باشد؛ وگرنه با هر فوکوس دو مستطیلِ نارنجیِ تودرتو دیده می‌شود. */
.mini-search input:focus-visible,
.qset-search input:focus-visible,
.emf-search input:focus-visible,
.question-code-search input:focus-visible,
.tp-search-wrap input:focus-visible,
.settlement-amount-field input:focus-visible,
.ms-search input:focus-visible,
.audit-search-box input:focus-visible,
.ax-tp-search input:focus-visible,
.brw-search input:focus-visible,
.stx-search input:focus-visible,
.tmx-search input:focus-visible,
.shop-filter-search input:focus-visible,
.shop-side-search input:focus-visible,
.pcredit-amount input:focus-visible {
  box-shadow: none;
}

/* این کادر بعد از خاموش‌شدنِ حلقهٔ سراسری هیچ نشانهٔ فوکوسی نداشت */
.tmx-search:focus-within {
  border-color: var(--orange);
  box-shadow: 0 0 0 3px rgba(255, 107, 24, .1);
}

/* این دو کادر بعد از خاموش‌شدنِ حلقهٔ سراسری نشانهٔ فوکوس نداشتند */
.audit-search-box:focus-within input,
.brw-search:focus-within {
  border-color: #f0a77e;
  box-shadow: 0 0 0 3px var(--orange-soft);
}

.mini-search input:focus,
.qset-search input:focus,
.emf-search input:focus,
.question-code-search input:focus,
.tp-search-wrap input:focus,
.audit-search-box input:focus,
.sbank-search input:focus,
.ms-search input:focus,
.qset-modal-search input:focus {
  transform: none;
}

.content {
  transform-origin: 50% 18px;
  transition: opacity var(--motion-fast) var(--ease-soft), transform var(--motion-fast) var(--ease-soft);
}

.content.motion-leave {
  opacity: 0.24;
  transform: translateY(7px) scale(0.994);
  pointer-events: none;
}

.content.motion-enter > * {
  opacity: 0;
  transform: translateY(14px) scale(0.992);
}

.content.motion-enter.motion-ready > * {
  animation: viewItemIn var(--motion-slow) var(--ease-pop) both;
}

.content.motion-enter.motion-ready > *:nth-child(2) { animation-delay: 35ms; }
.content.motion-enter.motion-ready > *:nth-child(3) { animation-delay: 70ms; }
.content.motion-enter.motion-ready > *:nth-child(4) { animation-delay: 105ms; }
.content.motion-enter.motion-ready > *:nth-child(n + 5) { animation-delay: 135ms; }

@keyframes viewItemIn {
  0% { opacity: 0; transform: translateY(14px) scale(0.992); filter: blur(2px); }
  100% { opacity: 1; transform: translateY(0) scale(1); filter: blur(0); }
}

.micro-pressing {
  transform: translateY(1px) scale(0.985) !important;
}

.nav-item {
  position: relative;
  overflow: hidden;
  transform-origin: right center;
}

.nav-item::before {
  content: "";
  position: absolute;
  inset: 8px auto 8px 7px;
  width: 3px;
  border-radius: 10px;
  background: currentColor;
  opacity: 0;
  transform: scaleY(0.35);
  transition: opacity var(--motion-med) var(--ease-soft), transform var(--motion-med) var(--ease-pop);
}

.nav-item:hover {
  transform: translateX(-2px);
}

.nav-item.active::before {
  opacity: 0.65;
  transform: scaleY(1);
}

.nav-item .nav-icon,
.icon-button .ui-icon,
.row-action .ui-icon,
.more-button .ui-icon,
.tree-toggle,
.src-caret svg,
.sd-section > summary svg {
  transition: transform var(--motion-med) var(--ease-pop), color var(--motion-med) ease;
}

.nav-item:hover .nav-icon,
.icon-button:hover .ui-icon,
.row-action:hover .ui-icon,
.more-button:hover .ui-icon {
  transform: translateY(-1px) scale(1.08);
}

.primary-button,
.secondary-button,
.ghost-button,
.danger-button,
.auth-submit,
.ff-download,
.page-buttons button,
.segmented button,
.correct-option-picker button,
.question-form-nav > button {
  transform-origin: center;
  transition: transform var(--motion-fast) var(--ease-pop), box-shadow var(--motion-med) ease, background var(--motion-med) ease, border-color var(--motion-med) ease, color var(--motion-med) ease, filter var(--motion-med) ease;
}

.primary-button:hover,
.auth-submit:hover {
  box-shadow: 0 12px 26px rgba(255, 107, 24, 0.24);
}

.secondary-button:hover,
.ghost-button:hover,
.danger-button:hover,
.ff-download:hover,
.page-buttons button:hover,
.segmented button:hover,
.correct-option-picker button:hover,
.question-form-nav > button:hover {
  transform: translateY(-1px);
}

.panel,
.folder-card,
.stat-card,
.media-card,
.detail-card,
.topic-trigger-card,
.folder-file,
.role-card,
.pixel-info-card {
  transition: transform var(--motion-med) var(--ease-pop), box-shadow var(--motion-med) ease, border-color var(--motion-med) ease, background var(--motion-med) ease;
}

.folder-card:hover,
.stat-card.clickable:hover,
.media-card:hover,
.topic-trigger-card:hover,
.folder-file:hover,
.role-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--lift-shadow);
}

.panel:hover {
  box-shadow: 0 16px 38px rgba(48, 39, 27, 0.075);
}

.folder-card::after,
.stat-card::after,
.type-card::after,
.role-card::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  background: linear-gradient(110deg, transparent 0%, rgba(255,255,255,0.42) 45%, transparent 64%);
  opacity: 0;
  transform: translateX(32%);
  transition: opacity var(--motion-med) ease, transform var(--motion-slow) var(--ease-soft);
}

.folder-card,
.stat-card,
.type-card,
.role-card {
  position: relative;
  overflow: hidden;
}

.folder-card:hover::after,
.stat-card:hover::after,
.type-card:hover::after,
.role-card:hover::after {
  opacity: 1;
  transform: translateX(-34%);
}

.folder-card {
  overflow: visible;
}

.folder-card::after {
  content: none;
  display: none;
}

.data-table tbody tr {
  transition: background var(--motion-fast) ease, transform var(--motion-fast) var(--ease-soft), box-shadow var(--motion-fast) ease;
}

.data-table tbody tr:hover {
  background: #fffaf4;
  transform: translateX(-2px);
}

.ms-trigger,
.ms-opt,
.fs-chip,
.badge,
.sbank-chip,
.meta-chip,
.seg,
.sd-check,
.sd-radio,
.src-row,
.tag-pill,
.chip,
.filter-chip {
  transition: transform var(--motion-fast) var(--ease-pop), background var(--motion-med) ease, border-color var(--motion-med) ease, color var(--motion-med) ease, box-shadow var(--motion-med) ease;
}

.ms-trigger:hover,
.ms-opt:hover,
.sd-check:hover,
.sd-radio:hover,
.src-row:hover {
  transform: translateY(-1px);
}

.fs-chip,
.sbank-chip,
.chip,
.badge {
  animation: microPop 220ms var(--ease-pop) both;
}

@keyframes microPop {
  from { opacity: 0; transform: scale(0.94); }
  to { opacity: 1; transform: scale(1); }
}

input,
select,
textarea,
[contenteditable="true"] {
  transition: border-color var(--motion-med) ease, box-shadow var(--motion-med) ease, background var(--motion-med) ease, transform var(--motion-fast) var(--ease-soft);
}

input:focus,
select:focus,
textarea:focus,
[contenteditable="true"]:focus {
  transform: translateY(-1px);
}

.modal-backdrop {
  animation: backdropIn var(--motion-med) ease both;
}

.modal {
  animation: modal-in 280ms var(--ease-pop);
}

.modal-backdrop.modal-closing {
  animation: backdropOut 170ms ease both;
}

.modal-backdrop.modal-closing .modal {
  animation: modalOut 170ms ease both;
}

@keyframes backdropIn {
  from { opacity: 0; backdrop-filter: blur(0); }
  to { opacity: 1; }
}

@keyframes backdropOut {
  to { opacity: 0; backdrop-filter: blur(0); }
}

@keyframes modalOut {
  to { opacity: 0; transform: translateY(10px) scale(0.985); }
}

.toast {
  position: relative;
  overflow: hidden;
}

/* نوارِ شمارشِ معکوسِ پایینِ توست. پیش‌تر نارنجیِ کم‌رنگ بود و روی پس‌زمینهٔ
   تیره تقریباً دیده نمی‌شد؛ حالا هم‌رنگِ خودِ توست است و کدر، با یک ریلِ کم‌رنگ
   زیرش تا مسیرِ باقی‌مانده هم پیدا باشد. */
.toast::after {
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  height: 3px;
  background: var(--toast-accent);
  box-shadow: 0 0 8px var(--toast-accent-soft);
  transform-origin: right center;
  animation: toastTimer 3.6s linear forwards;
}

.toast::before {
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  height: 3px;
  background: var(--toast-accent-soft);
}

@keyframes toastTimer {
  from { transform: scaleX(1); }
  to { transform: scaleX(0); }
}

.question-form-nav > button.done span,
.correct-option-picker button.selected span,
.type-card.selected span,
.segmented button.active,
.auth-tabs button.active,
.page-buttons button.active {
  animation: selectedPulse 360ms var(--ease-pop) both;
}

@keyframes selectedPulse {
  0% { transform: scale(0.96); }
  55% { transform: scale(1.04); }
  100% { transform: scale(1); }
}

.progress span {
  animation: progressGrow 720ms var(--ease-pop) both;
  transform-origin: right center;
}

@keyframes progressGrow {
  from { transform: scaleX(0.18); }
  to { transform: scaleX(1); }
}

.brand-mark,
.avatar {
  transition: transform var(--motion-med) var(--ease-pop), box-shadow var(--motion-med) ease;
}

.brand:hover .brand-mark,
.profile-card:hover .avatar {
  transform: rotate(-2deg) scale(1.04);
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 0.001ms !important;
  }
  .micro-pressing,
  .content.motion-leave,
  .content.motion-enter > *,
  .data-table tbody tr:hover,
  .folder-card:hover,
  .stat-card.clickable:hover,
    .media-card:hover,
  .topic-trigger-card:hover,
  .folder-file:hover,
  .role-card:hover {
    transform: none !important;
    filter: none !important;
  }
}

/* ───────────── پروفایل گیم‌محور کاربر ───────────── */
.student-profile-page {
  --sp-night: #151817;
  --sp-night-soft: #222522;
  --sp-orange: #ff7426;
  --sp-lime: #c8ed75;
  display: grid;
  gap: 18px;
  width: min(100%, 1320px);
  margin-inline: auto;
}

.sp-command-card {
  position: relative;
  isolation: isolate;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(340px, 440px);
  grid-template-areas: "identity level";
  align-items: center;
  gap: 18px 26px;
  overflow: hidden;
  padding: 20px 22px;
  border: 1px solid rgba(255,255,255,.09);
  border-radius: 22px;
  color: #fff;
  background:
    radial-gradient(circle at 11% 12%, rgba(255,116,38,.24), transparent 22rem),
    linear-gradient(118deg, #101312 0%, #22251f 64%, #171a18 100%);
  box-shadow: 0 22px 52px rgba(29,30,25,.18);
}

.sp-command-card::before,
.sp-command-card::after {
  content: "";
  position: absolute;
  z-index: -1;
  pointer-events: none;
}

.sp-command-card::before {
  inset-inline-end: -68px;
  inset-block-start: -115px;
  width: 360px;
  height: 360px;
  border: 1px solid rgba(200,237,117,.15);
  border-radius: 50%;
  box-shadow: 0 0 0 48px rgba(255,255,255,.018), 0 0 0 96px rgba(255,255,255,.012);
}

.sp-command-card::after {
  inset: 0;
  opacity: .18;
  background: linear-gradient(105deg, transparent 0 48%, rgba(255,255,255,.055) 48.1% 48.4%, transparent 48.5%);
}

.sp-grid-lines {
  position: absolute;
  inset: 0;
  z-index: -1;
  opacity: .07;
  background-image:
    linear-gradient(rgba(255,255,255,.5) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.5) 1px, transparent 1px);
  background-size: 34px 34px;
  mask-image: linear-gradient(90deg, #000, transparent 72%);
}

.sp-identity {
  grid-area: identity;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 16px;
}

.sp-avatar-wrap {
  position: relative;
  width: 88px;
  height: 88px;
  flex: 0 0 88px;
  padding: 4px;
  border: 1px solid rgba(255,255,255,.22);
  border-radius: 24px 9px 24px 24px;
  background: linear-gradient(145deg, rgba(255,255,255,.14), rgba(255,255,255,.02));
  box-shadow: 0 14px 34px rgba(0,0,0,.32);
}

.avatar.sp-avatar {
  width: 100%;
  height: 100%;
  border-radius: 20px 6px 20px 20px;
  background: #2f332e;
}

.sp-avatar-corner {
  position: absolute;
  inset-inline-end: -7px;
  inset-block-end: -7px;
  min-width: 31px;
  height: 25px;
  display: grid;
  place-items: center;
  padding-inline: 6px;
  border: 3px solid #181b18;
  border-radius: 8px;
  color: #1d211c;
  background: var(--sp-lime);
  font: 900 9px/1 Arial, sans-serif;
  letter-spacing: .08em;
}

.sp-identity-copy { min-width: 0; }
.sp-kicker {
  display: block;
  color: #b87039;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: .03em;
}
.sp-identity-copy h1 {
  max-width: 100%;
  margin: 0 0 8px;
  overflow: hidden;
  color: #fff;
  font-size: clamp(21px, 2.4vw, 30px);
  font-weight: 950;
  letter-spacing: -.04em;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.sp-id-row { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; }
.sp-id-row > * {
  min-height: 24px;
  display: inline-flex;
  align-items: center;
  padding: 3px 9px;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 7px;
  color: rgba(255,255,255,.72);
  background: rgba(255,255,255,.055);
  font-size: 9px;
  font-weight: 750;
}
.sp-id-row bdi { color: #fff; font-family: Arial, sans-serif; letter-spacing: .04em; }

/* حساب غیر دانش‌آموز لول ندارد؛ ستون لول از گرید حذف می‌شود تا کارت خالی نماند */
.sp-command-card.no-level {
  grid-template-columns: minmax(0, 1fr);
  grid-template-areas: "identity";
}

.sp-level-card {
  grid-area: level;
  position: relative;
  isolation: isolate;
  width: 100%;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
  /* بدون clip: پاپ‌آپِ «جزئیات» باید بتواند از لبهٔ پایینِ کارت بیرون بزند. */
  overflow: visible;
  padding: 14px 16px;
  border: 1px solid rgba(200,237,117,.18);
  border-radius: 18px;
  color: inherit;
  background: rgba(5,8,6,.36);
  box-shadow: inset 0 1px rgba(255,255,255,.05);
  cursor: default;
  text-align: start;
  font-family: inherit;
}
.sp-level-main { min-width: 0; display: block; }
.sp-level-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px; white-space: nowrap; }
.sp-level-head strong { min-width: 0; overflow: hidden; color: var(--sp-lime); font-size: 15px; font-weight: 950; text-overflow: ellipsis; }
/* «جزئیات» پاپ‌آپِ شناور است نه بخشِ بازشونده: با هاور/فوکوس روی کارت می‌نشیند و
   چیزی را جابه‌جا نمی‌کند. `tabindex` برای صفحه‌کلید و لمس (فوکوس با ضربه) است.
   پاپ‌آپ به خودِ کارت لنگر می‌شود نه به برچسبِ کوچکِ «جزئیات»، وگرنه در موبایل از
   لبهٔ صفحه بیرون می‌زد؛ `position` عمداً static است. */
.sp-level-help {
  position: static;
  z-index: 4;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-inline-start: auto;
  color: rgba(255,255,255,.6);
  font-size: 9px;
  font-weight: 850;
  white-space: nowrap;
  cursor: help;
}
.sp-level-help > svg { width: 14px; height: 14px; }
.sp-level-help:focus-visible { outline: 2px solid var(--sp-lime); outline-offset: 3px; border-radius: 4px; }
.sp-level-tip {
  position: absolute;
  inset-inline-end: 14px;
  inset-block-start: 50px;
  z-index: 20;
  width: min(360px, calc(100% - 28px));
  display: grid;
  gap: 2px;
  padding: 8px 10px;
  border: 1px solid rgba(52,124,99,.18);
  border-radius: 10px;
  color: #39483e;
  background: #eef5ef;
  box-shadow: 0 12px 26px rgba(41,36,29,.16);
  line-height: 1.55;
  white-space: normal;
  overflow-wrap: anywhere;
  text-align: start;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(-4px);
  transition: opacity .14s ease, transform .14s ease, visibility .14s;
}
.sp-level-help:hover .sp-level-tip,
.sp-level-help:focus-visible .sp-level-tip,
.sp-level-help:focus-within .sp-level-tip { opacity: 1; visibility: visible; transform: translateY(0); }
.sp-level-tip b { color: #39483e; font-size: 12px; font-weight: 950; }
.sp-level-tip > span { color: #47614f; font-size: 11px; font-weight: 850; }
.sp-level-tip small { color: #576a5d; font-size: 11px; font-weight: 700; }
.sp-level-summary { display: grid; grid-template-columns: 1fr 1fr 1.15fr; margin-top: 9px; padding: 9px 0; border-block: 1px solid rgba(255,255,255,.08); }
.sp-level-summary > span { min-width: 0; display: block; }
.sp-level-summary > span + span { padding-inline-start: 11px; border-inline-start: 1px solid rgba(255,255,255,.09); }
.sp-level-summary small { display: block; color: rgba(255,255,255,.43); font-size: 9px; font-weight: 750; }
.sp-level-summary b { display: block; margin-top: 2px; color: rgba(255,255,255,.92); font-size: 15px; font-weight: 950; line-height: 1.35; }
.sp-level-summary b em { color: rgba(255,255,255,.45); font-size: 9px; font-style: normal; font-weight: 750; }
.sp-level-summary > span.is-live b { color: var(--sp-lime); }
/* حلقهٔ لول: مسیرِ پیشرفت به‌صورت conic دور یک هستهٔ گرد با جام و شمارهٔ لول.
   زاویه به‌صورت `<angle>` ثبت می‌شود تا مرورگر بتواند بینِ دو مقدار حرکت کند؛
   بدون این ثبت، متغیرِ سفارشی پرش می‌کند و انیمیشن دیده نمی‌شود. */
@property --sp-ring { syntax: "<angle>"; inherits: true; initial-value: 0deg; }
.sp-level-ring {
  width: 96px;
  height: 96px;
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  padding: 5px;
  border-radius: 50%;
  background: conic-gradient(var(--sp-lime) 0 var(--sp-ring, 0deg), rgba(255,255,255,.12) var(--sp-ring, 0deg) 360deg);
  /* مقصدِ انیمیشن همان مقدارِ inline کارت است؛ فقط نقطهٔ شروع صفر می‌شود. */
  animation: spRingFill 1.05s cubic-bezier(.22,.85,.3,1) both;
}
@keyframes spRingFill { from { --sp-ring: 0deg; } }
/* هستهٔ حلقه با همان موج بالا می‌آید. عمداً از opacity صفر شروع نمی‌شود تا اگر
   انیمیشن اجرا نشد (تبِ پنهان، ترجیح کم‌حرکت) جام و عدد ناپیدا نمانند. */
.sp-level-ring-core { animation: spRingCorePop .6s cubic-bezier(.2,.9,.3,1.2) both; }
@keyframes spRingCorePop { from { opacity: .45; transform: scale(.9); } }
@media (prefers-reduced-motion: reduce) {
  .sp-level-ring, .sp-level-ring-core { animation: none; }
}
.sp-level-ring-core {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0;
  border-radius: 50%;
  background: #191c18;
}
.sp-level-ring-core svg { width: 27px; height: 27px; color: var(--sp-lime); }
.sp-level-ring-core b { margin-top: 2px; color: #fff; font-size: 20px; font-weight: 950; line-height: 1; }
.sp-level-ring-core em { margin-top: 1px; color: rgba(255,255,255,.5); font-size: 8px; font-style: normal; font-weight: 800; line-height: 1; }


.sp-command-actions { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; margin-top: 11px; }
.sp-dark-button {
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 0 14px;
  border: 1px solid rgba(255,255,255,.15);
  border-radius: 10px;
  color: #151814;
  background: var(--sp-lime);
  font: inherit;
  font-size: 10px;
  font-weight: 900;
  cursor: pointer;
  transition: transform .16s ease, background .16s ease, border-color .16s ease;
}
.sp-dark-button.subtle { color: rgba(255,255,255,.82); background: rgba(255,255,255,.055); }
.sp-dark-button:hover { transform: translateY(-1px); background: #d8fa8f; }
.sp-dark-button.subtle:hover { background: rgba(255,255,255,.11); }
.sp-dark-button svg { width: 15px; height: 15px; }

.sp-tabbar {
  position: sticky;
  top: 84px;
  z-index: 16;
  min-height: 52px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 6px;
  border: 1px solid rgba(229,225,216,.92);
  border-radius: 15px;
  background: rgba(251,250,247,.9);
  box-shadow: 0 8px 26px rgba(56,49,39,.055);
  backdrop-filter: blur(18px);
}
.sp-tabbar > div { display: flex; gap: 4px; }
.sp-tabbar [role="tab"],
.sp-refresh {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 0 15px;
  border: 0;
  border-radius: 10px;
  color: #777168;
  background: transparent;
  font: inherit;
  font-size: 10px;
  font-weight: 850;
  cursor: pointer;
}
.sp-tabbar [role="tab"]:hover,
.sp-refresh:hover { color: #26231e; background: #f1eee7; }
.sp-tabbar [role="tab"].active { color: #fff; background: #22241f; box-shadow: 0 6px 14px rgba(35,34,29,.16); }
.sp-refresh { border: 1px solid var(--line); background: #fff; }
.sp-refresh svg { width: 14px; height: 14px; }
.sp-refresh:disabled { opacity: .48; cursor: wait; }

.sp-tab-content { display: grid; gap: 18px; }
.sp-surface {
  border: 1px solid var(--line);
  border-radius: 20px;
  background: rgba(255,255,255,.9);
  box-shadow: 0 10px 30px rgba(54,46,36,.055);
}
.sp-inline-error {
  padding: 9px 13px;
  border: 1px solid #f1caca;
  border-radius: 11px;
  color: #a64040;
  background: #fff2f2;
  font-size: 10px;
}

/* ردیف شاخص‌های کلیدی: چهار کارت هم‌قواره، عنوان بالا و عدد درشت زیر آن */
.sp-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}
.sp-metric {
  min-width: 0;
  min-height: 84px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 15px 17px;
  border: 1px solid #e9e0d5;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 8px 24px rgba(54,46,36,.045);
}
.sp-metric-icon {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  flex: 0 0 42px;
  border-radius: 14px;
}
.sp-metric-icon svg { width: 20px; height: 20px; }
.sp-metric.orange .sp-metric-icon { color: #d95b15; background: #fff0e6; }
.sp-metric.blue .sp-metric-icon { color: #3d6fc5; background: #edf3ff; }
.sp-metric.purple .sp-metric-icon { color: #7756c8; background: #f2edff; }
.sp-metric.teal .sp-metric-icon { color: #168878; background: #e9f8f5; }
.sp-metric.green .sp-metric-icon { color: #2c8163; background: #e7f5ee; }
.sp-metric > div { min-width: 0; }
.sp-metric small,
.sp-metric strong { max-width: 100%; display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sp-metric small { color: #7b7469; font-size: 12px; font-weight: 800; }
.sp-metric strong { margin-top: 3px; color: #24211d; font-size: clamp(19px, 1.75vw, 25px); font-weight: 950; line-height: 1.2; }

/* ردیف آمار تکمیلی: همان اعدادِ قبلی، فقط در یک نوار کم‌ارتفاع */
.sp-facts {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}
.sp-facts.sp-facts-all { grid-template-columns: repeat(8, minmax(0, 1fr)); gap: 7px; }
.sp-facts-all .sp-fact { gap: 6px; padding-inline: 9px; }
.sp-facts-all .sp-fact-icon { width: 25px; height: 25px; flex-basis: 25px; }
.sp-facts-all .sp-fact-icon svg { width: 14px; height: 14px; }
.sp-facts-all .sp-fact small { font-size: 9.5px; }
.sp-facts-all .sp-fact b { font-size: 12px; }
.sp-fact {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 9px 13px;
  border: 1px solid #ece4d8;
  border-radius: 13px;
  background: #fdfbf7;
}
.sp-fact-icon { width: 27px; height: 27px; display: grid; flex: 0 0 27px; place-items: center; border-radius: 9px; color: #8a6a45; background: #f5ede1; }
.sp-fact-icon svg { width: 15px; height: 15px; }
.sp-fact small { min-width: 0; overflow: hidden; color: #7f7669; font-size: 11px; font-weight: 750; text-overflow: ellipsis; white-space: nowrap; }
.sp-fact b { margin-inline-start: auto; flex: 0 0 auto; color: #3a332c; font-size: 14px; font-weight: 950; }

.sp-overview-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(270px, .65fr);
  gap: 14px;
  align-items: stretch;
}
.sp-answer-card { padding: 21px; }
.sp-answer-card > header,
.sp-section-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}
.sp-answer-card h2,
.sp-section-head h2 { margin: 3px 0 0; color: #24211d; font-size: 18px; font-weight: 950; }
.sp-answer-total,
.sp-history-count {
  flex: none;
  padding: 5px 9px;
  border-radius: 8px;
  color: #8c8174;
  background: #f5f2ec;
  font-size: 8px;
  font-weight: 800;
}
.sp-answer-bar {
  height: 8px;
  display: flex;
  overflow: hidden;
  margin: 22px 0 18px;
  border-radius: 99px;
  background: #f0eee9;
  direction: ltr;
}
.sp-answer-bar span { display: block; height: 100%; }
.sp-answer-bar .correct { background: #26937f; }
.sp-answer-bar .wrong { background: #db684d; }
.sp-answer-bar .blank { background: #d9ac35; }
.sp-answer-bar .pending { background: #788694; }
.sp-answer-bar .empty { background: #ece7df; }
.sp-answer-breakdown {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(108px, 1fr));
  gap: 8px;
}
.sp-answer-breakdown > div {
  display: grid;
  grid-template-columns: 7px minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  padding: 10px;
  border: 1px solid #efede7;
  border-radius: 12px;
  background: #fcfbf8;
}
.sp-answer-breakdown i { width: 7px; height: 28px; border-radius: 8px; }
.sp-answer-breakdown .correct i { background: #26937f; }
.sp-answer-breakdown .wrong i { background: #db684d; }
.sp-answer-breakdown .blank i { background: #d9ac35; }
.sp-answer-breakdown .pending i { background: #788694; }
.sp-answer-breakdown span small,
.sp-answer-breakdown span b { display: block; }
.sp-answer-breakdown span small { color: #878177; font-size: 8px; }
.sp-answer-breakdown span b { margin-top: 1px; font-size: 15px; }
.sp-answer-breakdown > div > strong { color: #6f695f; font-size: 10px; }
.sp-pending-note {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 12px 0 0;
  padding: 8px 10px;
  border-radius: 9px;
  color: #66717b;
  background: #f1f4f6;
  font-size: 8.5px;
  line-height: 1.7;
}
.sp-pending-note svg { width: 13px; height: 13px; flex: none; }

.sp-section-head.standalone {
  align-items: flex-end;
  padding: 6px 2px 0;
}
.sp-section-head p { max-width: 720px; margin: 5px 0 0; color: #858077; font-size: 9px; line-height: 1.8; }

/* تختهٔ نمای کلی: ستون باریکِ تحلیل/تاریخچه در سمت راست، نمودارهای پهن در سمت چپ */
.sp-board {
  display: grid;
  grid-template-columns: minmax(300px, 350px) minmax(0, 1fr);
  align-items: start;
  gap: 14px;
}
.sp-board-side,
.sp-board-main { min-width: 0; display: grid; grid-template-columns: minmax(0, 1fr); align-content: start; gap: 14px; }
/* ستون پهن جا دارد؛ خانه‌های تقویم را درشت‌تر می‌کنیم تا خواناتر شوند. */
.sp-board-main .sp-heatmap-card { --heat-cell: 13px; }

/* ── پروفایلِ حسابِ آموزشی ───────────────────────────────────────────────────
   همان قابِ پروفایل، ولی بدون نمودارهای پاسخ‌محور. دو کارتِ ساده: توضیحِ نقش
   با دو میان‌بر، و نوارِ «مخاطب در برابر شرکت‌کننده». */
.sp-edu-note,
.sp-edu-reach,
.sp-edu-empty { padding: 16px 18px; }
.sp-edu-note h2,
.sp-edu-reach h2 {
  display: flex; align-items: center; gap: 8px;
  margin: 0 0 9px; color: #24211d; font-size: 15px; font-weight: 950;
}
.sp-edu-note h2 svg,
.sp-edu-reach h2 svg { width: 17px; height: 17px; color: var(--brand, #df6b2b); }
.sp-edu-note p { margin: 0 0 9px; color: #6b6255; font-size: 11px; line-height: 1.95; }
.sp-edu-note p:last-of-type { margin-bottom: 13px; }
.sp-edu-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.sp-edu-bars { display: grid; gap: 11px; margin-bottom: 11px; }
.sp-edu-bar { display: grid; grid-template-columns: 82px minmax(0, 1fr) auto; align-items: center; gap: 10px; }
.sp-edu-bar > span { color: #6b6255; font-size: 11px; font-weight: 800; }
.sp-edu-bar > i { display: block; height: 10px; border-radius: 99px; background: rgba(120,110,96,.12); overflow: hidden; }
.sp-edu-bar > i > b { display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg, #df6b2b, #f0a463); }
.sp-edu-bar > small { color: #24211d; font-size: 12px; font-weight: 950; }
.sp-edu-hint { margin: 0; color: #857a6b; font-size: 10.5px; }
.sp-edu-empty { display: grid; justify-items: center; gap: 8px; text-align: center; }
.sp-edu-empty > span { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 14px; background: rgba(223,107,43,.1); }
.sp-edu-empty > span svg { width: 20px; height: 20px; color: var(--brand, #df6b2b); }
.sp-edu-empty h3 { margin: 0; color: #24211d; font-size: 14px; font-weight: 950; }
.sp-edu-empty p { margin: 0; max-width: 420px; color: #6b6255; font-size: 11px; line-height: 1.95; }

.sp-card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.sp-card-head h2 { margin: 2px 0 0; color: #24211d; font-size: 17px; font-weight: 950; }

/* کارت تحلیل دقت */
.sp-accuracy-card { padding: 16px 17px 14px; }
.spa-donuts { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 14px; }
.spa-donut { min-width: 0; display: grid; justify-items: center; padding: 12px 8px 10px; border: 1px solid #efe8dd; border-radius: 15px; background: #fdfbf7; }
.spa-ring { position: relative; width: 100%; max-width: 108px; }
.spa-ring svg { width: 100%; height: auto; display: block; transform: rotate(-90deg); }
.spa-ring circle { fill: none; stroke-width: 13; }
.spa-track { stroke: #ece5db; }
.spa-seg.correct { stroke: #2f9e7f; }
.spa-seg.wrong { stroke: #db684d; }
.spa-seg.blank { stroke: #dfae37; }
.spa-seg.pending { stroke: #7f8c99; }
.spa-ring-core { position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; }
.spa-ring-core b { color: #2c2620; font-size: 19px; font-weight: 950; line-height: 1.1; }
.spa-ring-core small { color: #988f83; font-size: 10px; font-weight: 750; }
.spa-donut h3 { margin: 10px 0 0; color: #3a332c; font-size: 12.5px; font-weight: 950; }
.spa-response { margin-top: 2px; color: #948a7d; font-size: 10px; font-weight: 750; }
.spa-response b { color: #5c5349; font-weight: 950; }
.spa-legend { width: 100%; margin: 9px 0 0; padding: 0; list-style: none; display: grid; gap: 3px; }
.spa-legend li { display: grid; grid-template-columns: 7px minmax(0, 1fr) auto; align-items: center; gap: 6px; color: #776f64; font-size: 10.5px; font-weight: 750; }
.spa-legend i { width: 7px; height: 7px; border-radius: 50%; }
.spa-legend .correct i { background: #2f9e7f; }
.spa-legend .wrong i { background: #db684d; }
.spa-legend .blank i { background: #dfae37; }
.spa-legend .pending i { background: #7f8c99; }
.spa-legend b { color: #3a332c; font-size: 11.5px; font-weight: 950; }
.spa-total { margin-top: 13px; padding-top: 12px; border-top: 1px solid #efe9e0; }
.spa-total-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin-bottom: 8px; }
.spa-total-head span { color: #7f7669; font-size: 11px; font-weight: 800; }
.spa-total-head b { color: #2c2620; font-size: 17px; font-weight: 950; }
.spa-total-rates { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 11px; }
.spa-total-rates span { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 8px 11px; border-radius: 11px; color: #7f7669; background: #f7f4ee; font-size: 11px; font-weight: 750; }
.spa-total-rates b { color: #2f7a62; font-size: 13px; font-weight: 950; }

/* کارت فعالیت‌های اخیر */
.sp-recent { padding: 16px 17px 12px; }
.sp-recent-all { display: inline-flex; align-items: center; gap: 3px; padding: 5px 9px; border: 1px solid #e6ded2; border-radius: 8px; color: #7d7264; background: #fbf9f5; font: inherit; font-size: 11px; font-weight: 800; cursor: pointer; }
.sp-recent-all:hover { border-color: #d8cdbd; color: #37302a; }
.sp-recent-all svg { width: 13px; height: 13px; }
.sp-recent-list { margin: 12px 0 0; padding: 0; list-style: none; display: grid; }
.sp-recent-list li { display: grid; grid-template-columns: 34px minmax(0, 1fr) auto; align-items: center; gap: 10px; padding: 9px 0; border-top: 1px solid #f2eee7; }
.sp-recent-list li:first-child { border-top: 0; padding-top: 2px; }
.sp-recent-icon { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 11px; color: #7154c4; background: #eee9ff; }
.sp-recent-list li.print .sp-recent-icon { color: #c35e20; background: #fff0e5; }
.sp-recent-list li.set .sp-recent-icon { color: #148071; background: #e8f8f4; }
.sp-recent-list li.login .sp-recent-icon { color: #3e70c7; background: #edf3ff; }
.sp-recent-list li.account .sp-recent-icon { color: #9d781d; background: #fff8df; }
.sp-recent-list li.activity .sp-recent-icon { color: #63707b; background: #eef1f3; }
.sp-recent-icon svg { width: 16px; height: 16px; }
.sp-recent-list li > div { min-width: 0; }
.sp-recent-list small { display: block; color: #a29a8e; font-size: 9.5px; font-weight: 800; }
.sp-recent-list h3 { max-width: 100%; margin: 1px 0 0; overflow: hidden; color: #2f2924; font-size: 12px; font-weight: 900; text-overflow: ellipsis; white-space: nowrap; }
.sp-recent-list time { display: block; margin-top: 2px; color: #a9a196; font-size: 10px; }
.sp-recent-badge { flex: 0 0 auto; padding: 3px 7px; border-radius: 7px; color: #766e63; background: #f3f0ea; font-size: 9.5px; font-weight: 750; }
.sp-recent-empty { display: flex; align-items: center; gap: 11px; margin-top: 14px; padding: 13px; border-radius: 13px; background: #faf8f4; }
.sp-recent-empty > span { width: 36px; height: 36px; display: grid; flex: 0 0 36px; place-items: center; border-radius: 12px; color: #7f756a; background: #f0ece5; }
.sp-recent-empty svg { width: 18px; height: 18px; }
.sp-recent-empty p { margin: 0; color: #857c71; font-size: 10.5px; line-height: 1.8; }

.sp-history { padding: 22px; }
.sp-history-filters {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  margin: 18px 0;
  padding-bottom: 3px;
  scrollbar-width: none;
}
.sp-history-filters::-webkit-scrollbar { display: none; }
.sp-history-filters button {
  min-height: 32px;
  flex: none;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 9px;
  color: #777168;
  background: #fff;
  font: inherit;
  font-size: 9px;
  font-weight: 800;
  cursor: pointer;
}
.sp-history-filters button[aria-pressed="true"] { color: #fff; border-color: #252720; background: #252720; }
.sp-timeline {
  position: relative;
  display: grid;
  gap: 0;
  margin: 0;
  padding: 0;
  list-style: none;
}
.sp-timeline::before {
  content: "";
  position: absolute;
  inset-block: 28px;
  inset-inline-start: 20px;
  width: 1px;
  background: #e8e4dc;
}
.sp-timeline li {
  position: relative;
  min-height: 90px;
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  align-items: start;
  gap: 13px;
  padding: 12px 0;
  border-bottom: 1px solid #f0ede7;
}
.sp-timeline li:last-child { border-bottom: 0; }
.sp-timeline-icon {
  position: relative;
  z-index: 1;
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border: 5px solid #fff;
  border-radius: 14px;
  color: #7154c4;
  background: #eee9ff;
  box-shadow: 0 0 0 1px #e7e2da;
}
.sp-timeline li.print .sp-timeline-icon { color: #c35e20; background: #fff0e5; }
.sp-timeline li.set .sp-timeline-icon { color: #148071; background: #e8f8f4; }
.sp-timeline li.login .sp-timeline-icon { color: #3e70c7; background: #edf3ff; }
.sp-timeline li.account .sp-timeline-icon { color: #9d781d; background: #fff8df; }
.sp-timeline li.activity .sp-timeline-icon { color: #63707b; background: #eef1f3; }
.sp-timeline-icon svg { width: 17px; height: 17px; }
.sp-timeline-copy { min-width: 0; }
.sp-timeline-type { display: block; color: #9a9389; font-size: 7.5px; font-weight: 850; }
.sp-timeline-copy h3 { margin: 2px 0 0; color: #2b2823; font-size: 12px; font-weight: 900; }
.sp-timeline-copy p { margin: 4px 0 0; color: #7e786e; font-size: 9px; line-height: 1.7; overflow-wrap: anywhere; }
.sp-timeline-copy time { display: inline-flex; align-items: center; gap: 5px; margin-top: 6px; color: #aaa398; font-size: 8px; }
.sp-timeline-copy time svg { width: 12px; height: 12px; }
.sp-timeline-badge { align-self: center; padding: 4px 7px; border-radius: 7px; color: #766e63; background: #f3f0ea; font-size: 7.5px; }
.sp-history-more { display: flex; margin: 16px auto 0; }
.sp-empty,
.sp-error {
  min-height: 260px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 7px;
  padding: 30px;
  text-align: center;
}
.sp-empty > span,
.sp-error > span { width: 46px; height: 46px; display: grid; place-items: center; border-radius: 15px; color: #7f756a; background: #f2efe9; }
.sp-empty > span svg,
.sp-error > span svg { width: 22px; height: 22px; }
.sp-empty h3,
.sp-error h2 { margin: 4px 0 0; font-size: 15px; }
.sp-empty p,
.sp-error p { max-width: 470px; margin: 0; color: #898379; font-size: 9px; line-height: 1.8; }
.sp-error { min-height: 420px; }
.sp-error .primary-button { margin-top: 7px; }

.sp-loading { display: grid; gap: 16px; }
.sp-loading-hero {
  min-height: 152px;
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 22px;
  border-radius: 22px;
  background: #20231f;
}
.sp-loading-hero > span { width: 88px; height: 88px; flex: none; border-radius: 24px; background: rgba(255,255,255,.08); animation: sqImgShimmer 1.6s infinite linear; }
.sp-loading-hero > div { width: min(520px, 60%); }
.sp-loading-hero .sk-bar { background: rgba(255,255,255,.1); }
.sp-loading-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.sp-loading-grid > div { min-height: 84px; padding: 16px; border: 1px solid var(--line); border-radius: 18px; background: #fff; }

.student-profile-page button:focus-visible {
  outline: 3px solid rgba(255,116,38,.3);
  outline-offset: 2px;
}

@media (max-width: 1240px) {
  .sp-board { grid-template-columns: 1fr; }
  .sp-board-side { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* زیر این عرض، ستون لول آن‌قدر باریک می‌شود که سرتیترش می‌شکند؛ پس سربرگ عمودی می‌شود. */
@media (max-width: 1080px) {
  .sp-command-card {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas: "identity" "level";
    gap: 16px;
    padding: 18px;
  }
  .sp-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sp-facts.sp-facts-all { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

@media (max-width: 980px) {
  .sp-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 900px) {
  .sp-board-side { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 760px) {
  .student-profile-page { gap: 14px; }
  .sp-command-card {
    grid-template-columns: 1fr;
    grid-template-areas: "identity" "level";
    gap: 16px;
    padding: 18px;
    border-radius: 20px;
  }
  .sp-command-card.no-level { grid-template-areas: "identity"; }
  .sp-tabbar { top: 78px; }
  .sp-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sp-facts.sp-facts-all { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sp-history { padding: 17px; }
  .sp-loading-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 520px) {
  .sp-command-card { padding: 18px; border-radius: 19px; }
  .sp-identity { align-items: flex-start; gap: 14px; }
  .sp-avatar-wrap { width: 78px; height: 78px; flex-basis: 78px; border-radius: 21px 8px 21px 21px; }
  .avatar.sp-avatar { border-radius: 17px 5px 17px 17px; }
  .sp-avatar-corner { min-width: 27px; height: 22px; font-size: 8px; }
  .sp-identity-copy h1 { margin-top: 3px; font-size: 21px; white-space: normal; }
  .sp-id-row { gap: 5px; }
  .sp-id-row > * { min-height: 21px; padding-inline: 7px; font-size: 7.5px; }
  .sp-level-card { padding: 14px; gap: 12px; }
  .sp-level-ring { width: 84px; height: 84px; }
  .sp-level-ring-core svg { width: 24px; height: 24px; }
  .sp-level-ring-core b { font-size: 18px; }
  .sp-command-actions { display: grid; grid-template-columns: 1fr 1fr; }
  .sp-dark-button { min-width: 0; padding-inline: 8px; font-size: 8px; }
  .sp-tabbar { gap: 5px; overflow: hidden; }
  .sp-tabbar > div { min-width: 0; flex: 1; }
  .sp-tabbar [role="tab"] { min-width: 0; flex: 1; padding-inline: 7px; font-size: 8px; }
  .sp-refresh { width: 38px; flex: none; padding: 0; }
  .sp-refresh span { display: none; }
  .sp-metrics { grid-template-columns: 1fr; }
  .sp-metric { min-height: 76px; }
  .sp-facts { grid-template-columns: 1fr; }
  .sp-facts.sp-facts-all { grid-template-columns: 1fr; }
  .sp-accuracy-card,
  .sp-recent { padding: 14px; }
  .spa-donuts { grid-template-columns: 1fr; }
  .spa-ring { max-width: 122px; }
  .spa-total-rates { grid-template-columns: 1fr; }
  .sp-section-head { flex-direction: column; gap: 9px; }
  .sp-history-count { align-self: flex-start; }
  .sp-timeline li { grid-template-columns: 38px minmax(0, 1fr); gap: 10px; }
  .sp-timeline::before { inset-inline-start: 18px; }
  .sp-timeline-icon { width: 38px; height: 38px; }
  .sp-timeline-badge { grid-column: 2; justify-self: start; align-self: start; }
  .sp-loading-hero { min-height: 210px; padding: 22px; }
  .sp-loading-hero > span { width: 78px; height: 78px; }
  .sp-loading-grid { grid-template-columns: 1fr; }
}

/* پالایش خوانایی و هماهنگی بصری پروفایل با قالب روشن سایت */
.student-profile-page {
  --sp-night: #554639;
  --sp-night-soft: #fff8ed;
  --sp-orange: #df6b2b;
  --sp-lime: #6fa88d;
}

.sp-command-card {
  border-color: #eadbc6;
  color: #393129;
  background:
    radial-gradient(circle at 9% 12%, rgba(230, 127, 62, .15), transparent 20rem),
    radial-gradient(circle at 88% 82%, rgba(100, 158, 128, .12), transparent 19rem),
    linear-gradient(132deg, #fffdf9 0%, #fff8ed 100%);
  box-shadow: 0 16px 38px rgba(91, 67, 38, .1);
}
.sp-command-card::before {
  border-color: rgba(197, 126, 68, .18);
  box-shadow: 0 0 0 48px rgba(220, 157, 95, .035), 0 0 0 96px rgba(100, 158, 128, .025);
}
.sp-command-card::after { opacity: .5; background: linear-gradient(105deg, transparent 0 48%, rgba(182, 127, 76, .055) 48.1% 48.4%, transparent 48.5%); }
.sp-grid-lines { opacity: .22; background-image: linear-gradient(rgba(183, 136, 93, .28) 1px, transparent 1px), linear-gradient(90deg, rgba(183, 136, 93, .28) 1px, transparent 1px); }
.sp-avatar-wrap {
  border-color: #ebd6bc;
  background: linear-gradient(145deg, #fff, #f6eadb);
  box-shadow: 0 12px 27px rgba(115, 77, 40, .14);
}
.avatar.sp-avatar { background: #f1e4d3; }
.sp-avatar-corner { border-color: #fff8ed; color: #fff; background: #df6b2b; font-size: 11px; }
.sp-kicker { color: #ae652e; font-size: 12px; }
.sp-identity-copy h1 { color: #302922; }
.sp-id-row > * { border-color: #e6d4bd; color: #716154; background: rgba(255,255,255,.72); font-size: 11px; }
.sp-id-row bdi { color: #4a3c31; }
.sp-level-card {
  border-color: #e2d4c2;
  background:
    radial-gradient(circle at 92% 8%, rgba(91, 155, 124, .12), transparent 9rem),
    linear-gradient(145deg, rgba(255,255,255,.96), rgba(251,247,240,.88));
  box-shadow: inset 0 1px rgba(255,255,255,.95), 0 10px 24px rgba(88, 63, 38, .07);
}
.sp-level-head strong { color: #347c63; font-size: 16px; }
.sp-level-help { color: #7f6f62; font-size: 10px; }
.sp-level-summary { border-color: #ebe1d5; }
.sp-level-summary > span + span { border-color: #e8ddd0; }
.sp-level-summary small { color: #8d7f72; font-size: 10px; }
.sp-level-summary b { color: #433a32; font-size: 17px; }
.sp-level-summary b em { color: #948577; font-size: 10px; }
.sp-level-summary > span.is-live b { color: #347c63; }
.sp-level-ring { background: conic-gradient(#4f9275 0 var(--sp-ring, 0deg), #e7ded2 var(--sp-ring, 0deg) 360deg); box-shadow: 0 8px 18px rgba(70, 103, 81, .12); }
.sp-level-ring-core { border: 1px solid #e8f0ea; background: linear-gradient(150deg, #fff, #f4faf6); }
.sp-level-ring-core svg { color: #4f9275; }
.sp-level-ring-core b { color: #2f6d58; font-size: 21px; }
.sp-level-ring-core em { color: #93a89c; }
.sp-dark-button { border-color: #d96225; color: #fff; background: #df6b2b; font-size: 12px; }
.sp-dark-button.subtle { border-color: #e2d2be; color: #624f3d; background: rgba(255,255,255,.8); }
.sp-dark-button:hover { background: #c9571d; }
.sp-dark-button.subtle:hover { background: #fff7ea; }

.sp-tabbar [role="tab"],
.sp-refresh { font-size: 12px; }
.sp-tabbar [role="tab"].active { background: #df6b2b; box-shadow: 0 6px 14px rgba(173, 82, 30, .18); }

.sp-section-head h2 { font-size: 22px; }
.sp-answer-total,
.sp-history-count { padding: 6px 10px; font-size: 11px; }
.sp-answer-bar { height: 9px; margin: 0; }

/* ───────────── تب «تحلیل درس‌ها»: یک انتخابگر درس + چهار پنل ───────────── */
.spx-page { display: grid; gap: 14px; }
.spx-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  padding: 12px 16px;
}
.spx-lesson { display: flex; align-items: center; gap: 10px; }
.spx-lesson > label { color: #948a7d; font-size: 11px; font-weight: 800; }
.spx-lesson > em { color: #9d9488; font-size: 11px; font-style: normal; font-weight: 750; }
/* انتخابگر درس. دکمه + منوی خودمان به‌جای `<select>`: فلشِ مطلقِ قبلی با
   `inset-inline-start` سمت شروع (راست) می‌نشست ولی جای خالی در سمت چپ رزرو شده
   بود، پس روی نام درس می‌افتاد. حالا فلش یک آیتمِ فلکسِ انتهای دکمه است. */
.spx-select { position: relative; display: inline-flex; align-items: center; }
.spx-select-btn {
  min-width: 190px;
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding-inline: 14px 12px;
  border: 1px solid #e3d9cb;
  border-radius: 12px;
  color: #332d27;
  background: #fdfbf7;
  font: inherit;
  font-size: 14px;
  font-weight: 900;
  cursor: pointer;
  transition: border-color .15s ease, background .15s ease, box-shadow .15s ease;
}
.spx-select-btn > b { min-width: 0; overflow: hidden; font-weight: 900; text-overflow: ellipsis; white-space: nowrap; }
.spx-select-btn > svg { width: 15px; height: 15px; flex: none; color: #97897a; transition: transform .18s ease; }
.spx-select-btn:hover { border-color: #cfc0ac; background: #fff; }
.spx-select-btn:focus-visible { outline: 2px solid rgba(223,107,43,.35); outline-offset: 1px; }
.spx-select.is-open .spx-select-btn { border-color: #e0a670; background: #fff; box-shadow: 0 7px 20px rgba(120,80,40,.11); }
.spx-select.is-open .spx-select-btn > svg { color: #cf7c36; transform: rotate(180deg); }
.spx-select-menu {
  position: absolute;
  z-index: 14;
  inset-block-start: calc(100% + 7px);
  inset-inline-start: 0;
  min-width: 100%;
  width: max-content;
  max-width: min(320px, 86vw);
  max-height: min(340px, 58vh);
  overflow: auto;
  display: grid;
  gap: 3px;
  padding: 7px;
  border: 1px solid #e7dccb;
  border-radius: 13px;
  background: #fff;
  box-shadow: 0 14px 34px rgba(61, 45, 24, .16);
  scrollbar-width: thin;
  scrollbar-color: #ded6c9 transparent;
}
.spx-option {
  display: grid;
  grid-template-columns: 15px minmax(0, 1fr) auto;
  align-items: center;
  gap: 9px;
  min-height: 36px;
  padding: 5px 9px;
  border: 0;
  border-radius: 9px;
  color: #4a4239;
  background: transparent;
  font: inherit;
  text-align: start;
  cursor: pointer;
  transition: background .12s ease, color .12s ease;
}
.spx-option b { min-width: 0; overflow: hidden; font-size: 12.5px; font-weight: 850; text-overflow: ellipsis; white-space: nowrap; }
.spx-option small { color: #a0968a; font-size: 10px; font-weight: 800; white-space: nowrap; }
.spx-option-tick { display: grid; place-items: center; color: #d97a34; opacity: 0; }
.spx-option-tick svg { width: 14px; height: 14px; }
.spx-option:hover,
.spx-option:focus-visible { outline: none; background: #f7f2ea; }
.spx-option.is-active { color: #8c4b1d; background: #fdf1e5; }
.spx-option.is-active small { color: #bb8a5f; }
.spx-option.is-active .spx-option-tick { opacity: 1; }
.spx-meta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.spx-meta > span {
  display: inline-flex;
  align-items: baseline;
  gap: 7px;
  padding: 7px 12px;
  border: 1px solid #ece4d8;
  border-radius: 11px;
  background: #fbf9f5;
}
.spx-meta small { color: #8a8175; font-size: 11px; font-weight: 750; }
.spx-meta b { color: #2f8163; font-size: 13px; font-weight: 950; }

/* دو ردیف صریح: روند و جایگاه بالا؛ نقشه و مقایسه پایین. هر ردیف هم‌قد می‌شود،
   اما محتوای ردیف بعدی مستقل می‌ماند و از کارت‌های بالایی کش نمی‌آید. */
.spx-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: stretch; gap: 14px; }
.spx-card { min-width: 0; padding: 16px 17px 14px; overflow: visible; }
.spx-card.trend,
.spx-card.bell { min-height: 440px; }
/* کارت جایگاه ستونی است تا وقتی ردیف به‌خاطر کارتِ روند بلندتر می‌شود،
   فضای اضافه به قابِ نمودار برسد نه به فاصلهٔ خالیِ ته کارت. */
.spx-card.bell { display: flex; flex-direction: column; }
.spx-card.bell .sp-bell-wrap { flex: 1 1 auto; display: flex; flex-direction: column; }
.spx-card.bell .sp-bell-axis-title { margin-top: auto; padding-top: 6px; }
.spx-card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.spx-card-head h3 { margin: 2px 0 0; color: #24211d; font-size: 17px; font-weight: 950; }
.spx-card-badge {
  flex: 0 0 auto;
  padding: 5px 10px;
  border-radius: 9px;
  color: #7d7365;
  background: #f5f2ec;
  font-size: 11px;
  font-weight: 800;
}
.spx-panel-empty {
  min-height: 148px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 8px;
  padding: 18px;
  border: 1px dashed #e7dfd3;
  border-radius: 14px;
  background: #fdfbf7;
  text-align: center;
}
.spx-panel-empty > svg { width: 24px; height: 24px; color: #a99d8e; }
.spx-panel-empty p { max-width: 320px; margin: 0; color: #8a8175; font-size: 11.5px; line-height: 1.8; }
/* کنترل مشترک دو نمودار زمانی؛ هر لحظه فقط یکی داخل همان کارت رندر می‌شود. */
.spx-trend-card { position: relative; display: flex; flex-direction: column; }
.spx-trend-head { align-items: center; flex-wrap: wrap; padding-bottom: 12px; border-bottom: 1px solid #eee7de; }
.spx-trend-tools { display: flex; align-items: center; justify-content: flex-end; gap: 8px; flex-wrap: wrap; }
.spx-trend-switch {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 3px;
  border: 1px solid #e6ddd1;
  border-radius: 11px;
  background: #f7f4ef;
}
.spx-trend-switch button {
  min-height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 0 10px;
  border: 0;
  border-radius: 8px;
  color: #7b7268;
  background: transparent;
  font: inherit;
  font-size: 11px;
  font-weight: 850;
  cursor: pointer;
  transition: color .15s ease, background .15s ease, box-shadow .15s ease;
}
.spx-trend-switch button:hover { color: #356f5d; background: #fff; }
.spx-trend-switch button[aria-pressed="true"] { color: #246c56; background: #fff; box-shadow: 0 3px 10px rgba(57,78,68,.12); }
.spx-trend-switch button:focus-visible { outline: 2px solid rgba(47,141,117,.35); outline-offset: 2px; }
.spx-trend-panel { position: relative; min-width: 0; flex: 1; display: flex; flex-direction: column; }
.spx-trend-embedded {
  min-width: 0;
  flex: 1;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}
.spx-trend-embedded.empty { display: grid; place-items: center; }
.spx-trend-embedded > footer { margin-top: auto; }
/* نوارهای نقشه عرض‌خوارند و در ستونِ نصفه له می‌شوند، پس نقشه تمام‌عرض می‌ماند.
   رادار و لانهٔ زنبوری ردیفِ آخر را نصف می‌کنند: هر دو SVGِ viewBox‌دارند و با پهنای
   ستون کوچک می‌شوند، و زیر ۱۲۴۰px شبکه خودش تک‌ستونی می‌شود. */
.spx-card.map { grid-column: 1 / -1; }
.spx-card .tm-map-browser { margin: 0; }
.spx-card .sp-subject-standing-head { margin-bottom: 12px; }
.spx-card .tm-radar-stage { grid-template-columns: minmax(0, 1fr); }
/* اینجا قبلاً `justify-self:center` بود. کروم جدید هم‌ترازیِ باکس را برای بلاک‌ها هم پیاده
   کرده، پس این خط ظرفِ نمودار را fit-content می‌کرد و SVG به عرضِ پیش‌فرضِ ۳۰۰px
   می‌افتاد — علتِ «نمودار خیلی ریز است». وسط‌چینی از `margin:auto` خودِ SVG می‌آید. */
.spx-card .tm-radar-visual { width: 100%; }

@media (max-width: 1240px) {
  .spx-grid { grid-template-columns: minmax(0, 1fr); }
  .spx-card.trend,
  .spx-card.bell { min-height: 0; }
}

@media (max-width: 700px) {
  .spx-bar { align-items: stretch; flex-direction: column; }
  .spx-lesson { flex-wrap: wrap; }
  .spx-select { flex: 1 1 100%; }
  .spx-select-btn { width: 100%; }
  .spx-meta > span { flex: 1 1 auto; justify-content: space-between; }
  .spx-trend-head { align-items: stretch; flex-direction: column; }
  .spx-trend-tools { justify-content: space-between; }
  .spx-trend-switch { flex: 1; }
  .spx-trend-switch button { flex: 1; }
}

/* اصلاح‌های صفحهٔ باریک؛ بعد از بلوک پالایش می‌آید تا اندازه‌های آن را بازنویسی کند. */
@media (max-width: 700px) {
  /* تب‌ها به‌جای شکستن در دو خط، افقی اسکرول می‌شوند. */
  .sp-tabbar { gap: 6px; }
  .sp-tabbar > div { min-width: 0; flex: 1; overflow-x: auto; scrollbar-width: none; }
  .sp-tabbar > div::-webkit-scrollbar { display: none; }
  .sp-tabbar [role="tab"] { flex: 0 0 auto; padding-inline: 11px; font-size: 11px; white-space: nowrap; }
  /* دکمه‌ها اندازهٔ متن خودشان می‌شوند و در صورت کمبود جا به سطر بعد می‌روند. */
  .sp-command-actions { display: flex; flex-wrap: wrap; gap: 6px; }
  .sp-dark-button { flex: 0 1 auto; padding-inline: 9px; font-size: 10.5px; }
  .sp-id-row > * { font-size: 10px; }
  .sp-metric small { font-size: 11px; }
  .sp-fact small { font-size: 10.5px; }
  .sp-card-head h2,
  .sp-section-head h2 { font-size: 18px; }
}

/* هیت‌مپ فشردهٔ فعالیت پاسخ‌گویی؛ تقویم از شنبه تا جمعه و از قدیم به جدید است. */
.sp-heatmap-card {
  --heat-cell: 11px;
  position: relative;
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
  overflow: visible;
  padding: 15px 18px 12px;
}
.sp-heatmap-card > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}
.sp-heatmap-card > header > div:first-child { display: flex; align-items: baseline; gap: 7px; }
.sp-heatmap-card > header strong { color: #3d352d; font-size: 13px; font-weight: 950; }
.sp-heatmap-card > header small { color: #999085; font-size: 8.5px; font-weight: 750; }
.sp-heatmap-toggle { display: inline-flex; gap: 2px; padding: 2px; border-radius: 9px; background: #f2eee8; }
.sp-heatmap-toggle button {
  min-height: 27px;
  padding: 0 10px;
  border: 0;
  border-radius: 7px;
  color: #8a8176;
  background: transparent;
  font: inherit;
  font-size: 9px;
  font-weight: 850;
  cursor: pointer;
}
.sp-heatmap-toggle button[aria-pressed="true"] { color: #fff; background: #4d806d; box-shadow: 0 4px 10px rgba(48, 104, 82, .18); }
.sp-heatmap-scroll { max-width: 100%; overflow-x: auto; overflow-y: hidden; padding: 1px 1px 5px; direction: ltr; scrollbar-width: thin; scrollbar-color: #d9d0c5 transparent; }
.sp-heatmap-calendar { min-width: 790px; width: 100%; }
.sp-heatmap-months,
.sp-heatmap-weeks {
  display: grid;
  grid-template-columns: repeat(var(--heat-week-count), var(--heat-cell));
  justify-content: space-between;
  direction: ltr;
}
.sp-heatmap-months { min-height: 17px; align-items: start; margin-bottom: 2px; }
.sp-heatmap-months span {
  width: max-content;
  min-width: 0;
  overflow: visible;
  color: #91887d;
  font-size: 8px;
  font-weight: 750;
  line-height: 1.2;
  text-align: left;
  white-space: nowrap;
  direction: rtl;
}
/* ماه جاری ممکن است فقط یک ستون از شبکه را بگیرد؛ نام کامل آن به‌سمت داخل تقویم باز می‌شود. */
.sp-heatmap-months span:last-child { justify-self: end; text-align: right; }
.sp-heat-week,
.sp-heat-week-button {
  width: var(--heat-cell);
  display: grid;
  grid-template-rows: repeat(7, var(--heat-cell));
  gap: 3px;
}
.sp-heat-cell,
.sp-heat-week-pixel,
.sp-heatmap-card > footer i {
  width: var(--heat-cell);
  height: var(--heat-cell);
  display: block;
  border: 0;
  border-radius: 3px;
  background: #eeeae4;
}
button.sp-heat-cell,
.sp-heat-week-button { padding: 0; font: inherit; cursor: help; }
.sp-heat-week-button { border: 0; background: transparent; }
.sp-heat-cell.outside,
.sp-heat-week-pixel.outside { visibility: hidden; }
.sp-heat-cell[data-level="1"],
.sp-heat-week-pixel[data-level="1"],
.sp-heatmap-card > footer i[data-level="1"] { background: #e1eee8; }
.sp-heat-cell[data-level="2"],
.sp-heat-week-pixel[data-level="2"],
.sp-heatmap-card > footer i[data-level="2"] { background: #c3ddcf; }
.sp-heat-cell[data-level="3"],
.sp-heat-week-pixel[data-level="3"],
.sp-heatmap-card > footer i[data-level="3"] { background: #96c5af; }
.sp-heat-cell[data-level="4"],
.sp-heat-week-pixel[data-level="4"],
.sp-heatmap-card > footer i[data-level="4"] { background: #66a88c; }
.sp-heat-cell[data-level="5"],
.sp-heat-week-pixel[data-level="5"],
.sp-heatmap-card > footer i[data-level="5"] { background: #3b896f; }
.sp-heat-cell[data-level="6"],
.sp-heat-week-pixel[data-level="6"],
.sp-heatmap-card > footer i[data-level="6"] { background: #176850; }
.sp-heat-cell:hover,
.sp-heat-cell.active { box-shadow: 0 0 0 2px #fff, 0 0 0 3px #4d806d; transform: scale(1.08); }
.sp-heat-week-button:hover .sp-heat-week-pixel:not(.outside),
.sp-heat-week-button.active .sp-heat-week-pixel:not(.outside) { box-shadow: 0 0 0 1px #3f745f; }
.sp-heatmap-card > footer { display: flex; align-items: center; justify-content: flex-end; gap: 4px; margin-top: 4px; color: #9b9287; font-size: 7.5px; font-weight: 750; direction: ltr; }
.sp-heatmap-card > footer i { --heat-cell: 9px; }
.sp-heatmap-tip {
  position: absolute;
  z-index: 30;
  min-width: 178px;
  max-width: min(250px, calc(100% - 14px));
  display: grid;
  gap: 4px;
  padding: 8px 9px;
  border: 1px solid #d9cec1;
  border-radius: 10px;
  color: #50463d;
  background: rgba(255, 253, 249, .98);
  box-shadow: 0 10px 24px rgba(67, 49, 31, .16);
  pointer-events: none;
  direction: rtl;
}
.sp-heatmap-tip:not(.on) { opacity: 0; }
.sp-heatmap-tip > b { overflow: hidden; font-size: 9.5px; font-weight: 900; text-overflow: ellipsis; white-space: nowrap; }
.sp-heatmap-tip > strong { color: #3f745f; font-size: 11px; font-weight: 950; }
.sp-heatmap-tip > div { display: flex; flex-wrap: wrap; gap: 3px 8px; padding-top: 3px; border-top: 1px solid #eee6dd; }
.sp-heatmap-tip > div > span { display: inline-flex; align-items: center; gap: 3px; color: #7b7268; font-size: 7.8px; font-weight: 750; white-space: nowrap; }
.sp-heatmap-tip span > i { width: 6px; height: 6px; border-radius: 50%; }
.sp-heatmap-tip .correct i { background: #2f9e83; }
.sp-heatmap-tip .wrong i { background: #d3603f; }
.sp-heatmap-tip .blank i { background: #d0a027; }
.sp-heatmap-tip .pending i { background: #788694; }
.sp-heatmap-tip [hidden] { display: none; }

/* نمودار روند فعالیت درسی؛ سری‌ها بر اساس درس و بازه‌ها با تقویم شمسی هستند. */
.sp-trend-card {
  position: relative;
  overflow: visible;
  padding: 18px;
}
.sp-trend-card > header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 12px;
}
.sp-trend-card > header > div:first-child { display: grid; gap: 3px; }
.sp-trend-card > header strong { color: #3d352d; font-size: 15px; font-weight: 950; }
.sp-trend-card > header small { color: #91887d; font-size: 9px; font-weight: 750; line-height: 1.6; }
.sp-trend-period {
  display: inline-flex;
  gap: 2px;
  padding: 3px;
  border-radius: 10px;
  background: #f2eee8;
}
.sp-trend-period button {
  min-height: 29px;
  padding: 0 11px;
  border: 0;
  border-radius: 8px;
  color: #887f74;
  background: transparent;
  font: inherit;
  font-size: 9px;
  font-weight: 850;
  white-space: nowrap;
  cursor: pointer;
}
.sp-trend-period button[aria-pressed="true"] {
  color: #fff;
  background: #4d806d;
  box-shadow: 0 4px 10px rgba(48, 104, 82, .16);
}
.sp-trend-controls { display: grid; gap: 10px; margin-bottom: 8px; }
.sp-trend-subjects {
  display: flex;
  gap: 6px;
  max-width: 100%;
  padding: 1px 1px 5px;
  overflow-x: auto;
  scrollbar-width: thin;
  scrollbar-color: #d9d0c5 transparent;
}
.sp-trend-subjects button {
  min-height: 30px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  flex: none;
  padding: 0 9px;
  border: 1px solid #e5ddd2;
  border-radius: 9px;
  color: #81786e;
  background: #fffdfa;
  font: inherit;
  font-size: 9px;
  font-weight: 850;
  cursor: pointer;
}
.sp-trend-subjects button[aria-pressed="true"] { border-color: color-mix(in srgb, var(--trend-color), #fff 55%); color: #443a32; background: #fff; box-shadow: 0 4px 10px rgba(75, 57, 40, .07); }
.sp-trend-subjects button[aria-pressed="true"]::after { content: "✓"; color: var(--trend-color); font-size: 9px; font-weight: 950; }
.sp-trend-subjects button > i { width: 7px; height: 7px; border-radius: 50%; background: var(--trend-color); }
.sp-trend-subjects button > small { color: #aaa197; font-size: 7.5px; font-weight: 800; }
.sp-trend-scroll { width: 100%; min-width: 0; max-width: 100%; overflow-x: auto; overflow-y: hidden; padding-bottom: 2px; direction: ltr; scrollbar-width: thin; scrollbar-color: #d9d0c5 transparent; }
.sp-trend-chart { width: 100%; min-width: 0; max-width: 100%; display: block; overflow: hidden; font-family: inherit; }
.sp-trend-grid line { stroke: #eee8df; stroke-width: 1; }
.sp-trend-grid text { fill: #a49b90; font-size: 8px; font-weight: 750; text-anchor: end; }
.sp-trend-x-label { fill: #91887d; font-size: 8px; font-weight: 750; text-anchor: middle; direction: rtl; }
.sp-trend-line { fill: none; stroke: var(--trend-color); stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; opacity: .92; vector-effect: non-scaling-stroke; }
.sp-trend-column { outline: none; cursor: crosshair; }
.sp-trend-column.drillable { cursor: pointer; }
.sp-trend-hit { fill: transparent; pointer-events: all; }
.sp-trend-guide { stroke: #83786b; stroke-width: 1; stroke-dasharray: 4 4; opacity: 0; pointer-events: none; vector-effect: non-scaling-stroke; }
.sp-trend-column.active .sp-trend-guide,
.sp-trend-column:focus-visible .sp-trend-guide { opacity: .8; }
.sp-trend-column.active .sp-trend-hit,
.sp-trend-column:focus-visible .sp-trend-hit { fill: rgba(100, 90, 75, .045); }
.sp-trend-bar { pointer-events: none; }
.sp-trend-drill {
  min-height: 46px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 2px 0 8px;
  padding: 7px 10px;
  border: 1px solid #d9e8e1;
  border-radius: 11px;
  color: #3d6f5d;
  background: #f3faf6;
}
.sp-trend-drill > div { min-width: 0; display: flex; align-items: baseline; gap: 7px; }
.sp-trend-drill span { color: #7b8d84; font-size: 8px; font-weight: 800; white-space: nowrap; }
.sp-trend-drill strong { overflow: hidden; font-size: 10px; font-weight: 950; text-overflow: ellipsis; white-space: nowrap; }
.sp-trend-drill button {
  min-height: 30px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  flex: none;
  padding: 0 9px;
  border: 1px solid #cfe2d9;
  border-radius: 8px;
  color: #3f745f;
  background: #fff;
  font: inherit;
  font-size: 8px;
  font-weight: 850;
  cursor: pointer;
}
.sp-trend-drill button .ui-icon { width: 13px; height: 13px; }
.sp-trend-card > footer { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding-top: 9px; border-top: 1px solid #f0e9df; }
.sp-trend-card > footer > small { color: #9b9287; font-size: 8px; font-weight: 750; }
.sp-trend-legend { display: flex; flex-wrap: wrap; gap: 6px 12px; }
.sp-trend-legend span { display: inline-flex; align-items: center; gap: 5px; color: #70675e; font-size: 8.5px; font-weight: 850; }
.sp-trend-legend i,
.sp-trend-tip-row i { width: 8px; height: 8px; flex: none; border-radius: 50%; background: var(--trend-color); }
.sp-trend-tip {
  position: absolute;
  z-index: 35;
  min-width: 185px;
  max-width: min(255px, calc(100% - 16px));
  display: grid;
  gap: 4px;
  padding: 9px 10px;
  border: 1px solid #d9cec1;
  border-radius: 11px;
  color: #50463d;
  background: rgba(255, 253, 249, .98);
  box-shadow: 0 12px 26px rgba(67, 49, 31, .17);
  pointer-events: none;
  direction: rtl;
}
.sp-trend-tip:not(.on) { opacity: 0; }
.sp-trend-tip > b { overflow: hidden; font-size: 12px; font-weight: 900; text-overflow: ellipsis; white-space: nowrap; }
.sp-trend-tip-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 3px 12px; padding-block: 6px; }
.sp-trend-tip-row + .sp-trend-tip-row { border-top: 1px solid #eee6dd; }
.sp-trend-tip-row > span { display: flex; align-items: center; gap: 6px; font-size: 12px; }
.sp-trend-tip-row > strong { font-size: 12px; }
.sp-trend-tip-row > small { grid-column: 1 / -1; color: #81766a; font-size: 10px; line-height: 1.6; }
.sp-trend-tip-main { display: flex; align-items: baseline; gap: 5px; padding-top: 7px; border-top: 1px solid #e5dccf; color: #3f745f; }
.sp-trend-tip-main b { font-size: 16px; font-weight: 950; }
.sp-trend-tip-main small { font-size: 10px; font-weight: 850; }
.sp-trend-tip [hidden] { display: none; }
.sp-trend-empty { min-height: 125px; display: grid; place-items: center; align-content: center; gap: 5px; text-align: center; }
.sp-trend-empty > .ui-icon { width: 24px; height: 24px; color: #4d806d; }
.sp-trend-empty h3 { margin: 0; color: #40372f; font-size: 13px; }
.sp-trend-empty p { margin: 0; color: #958c81; font-size: 9px; }

.sp-section-head p { font-size: 12px; line-height: 1.75; }

.sp-history { padding: 26px; }
.sp-history-filters button { min-height: 36px; padding-inline: 14px; font-size: 12px; }
.sp-timeline li { min-height: 96px; gap: 14px; padding: 14px 0; }
.sp-timeline-type { font-size: 11px; }
.sp-timeline-copy h3 { font-size: 15px; }
.sp-timeline-copy p { font-size: 12px; line-height: 1.75; }
.sp-timeline-copy time { font-size: 11px; }
.sp-timeline-badge { padding: 5px 8px; font-size: 11px; }
.sp-empty p,
.sp-error p { font-size: 12px; }
.sp-loading-hero { border: 1px solid #eadbc6; background: #fff8ed; }
.sp-loading-hero > span { background: #f1e2d0; }
.sp-loading-hero .sk-bar { background: #eadcca; }

@media (max-width: 980px) {
  .sp-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 1100px) and (min-width: 981px) {
  .sp-metric { gap: 10px; padding-inline: 13px; }
  .sp-metric-icon { width: 38px; flex-basis: 38px; }
}

@media (max-width: 760px) {
  .sp-history { padding: 20px; }
  .sp-heatmap-card { padding-inline: 14px; }
  .sp-trend-card { padding: 15px 13px; }
  .sp-trend-chart { width: 680px; min-width: 680px; max-width: none; }
  .sp-trend-card > footer { align-items: flex-start; flex-direction: column; }
  .sp-trend-drill { align-items: flex-start; flex-direction: column; }
  .sp-trend-drill button { align-self: stretch; justify-content: center; }
}

@media (max-width: 520px) {
  .sp-command-card { padding: 18px; }
  .sp-avatar-corner { font-size: 10px; }
  .sp-id-row > * { font-size: 10px; }
  .sp-dark-button { font-size: 11px; }
  .sp-tabbar [role="tab"] { font-size: 10px; }
  .sp-metrics { grid-template-columns: 1fr; }
  .sp-metric { min-height: 82px; }
  .sp-heatmap-card { padding: 12px 11px 9px; }
  .sp-heatmap-card > header { align-items: flex-start; }
  .sp-heatmap-card > header > div:first-child { display: grid; gap: 1px; }
  .sp-heatmap-card > header strong { font-size: 11px; }
  .sp-heatmap-toggle button { min-height: 25px; padding-inline: 8px; font-size: 8px; }
  .sp-heatmap-calendar { min-width: 735px; }
  .sp-trend-card > header { align-items: flex-start; }
  .sp-trend-card > header > div:first-child { max-width: 58%; }
  .sp-trend-period button { min-height: 27px; padding-inline: 8px; font-size: 8px; }
  .sp-trend-subjects button { min-height: 28px; font-size: 8px; }
  .sp-card-head h2,
  .sp-section-head h2 { font-size: 18px; }
  .sp-timeline-copy h3 { font-size: 14px; }
  .sp-timeline-copy p,
  .sp-timeline-copy time { font-size: 11px; }
}

@media (prefers-reduced-motion: reduce) {
  .sp-dark-button:hover { transform: none; }
  .sp-loading-hero > span { animation: none; }
}

/* ── جابه‌جاگر حسابِ مخصوص محیط لوکال ── */
#devSwitcher {
  position: fixed;
  inset-inline-start: 16px;
  inset-block-end: 16px;
  z-index: 9999;
  font-family: inherit;
  direction: rtl;
}
.dev-switch-toggle {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 13px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 999px;
  background: #1f2937;
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.28);
}
.dev-switch-toggle svg { width: 15px; height: 15px; }
.dev-switch-toggle:hover { background: #111827; }
.dev-switch-panel {
  display: none;
  flex-direction: column;
  gap: 4px;
  width: 270px;
  max-height: 60vh;
  overflow-y: auto;
  margin-block-end: 8px;
  padding: 8px;
  border: 1px solid var(--line, #e8e8e8);
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 18px 46px rgba(0, 0, 0, 0.2);
}
.dev-switch-panel.open { display: flex; }
.dev-switch-sec {
  font-size: 10px;
  font-weight: 800;
  color: var(--muted, #8a8a8a);
  padding: 7px 6px 3px;
}
.dev-acc {
  display: flex;
  align-items: center;
  gap: 9px;
  width: 100%;
  padding: 8px 9px;
  border: 1px solid transparent;
  border-radius: 11px;
  background: #f7f7f5;
  cursor: pointer;
  text-align: start;
}
.dev-acc:hover { background: #eef2f7; }
.dev-acc.on { border-color: var(--orange, #f0a35e); background: #fff6ed; }
/* حسابی که هنوز ساخته نشده: همان ردیف، ولی با ظاهرِ «اضافه کن» تا کلیک روی آن
   یک ساختِ ناخواسته به‌نظر نرسد. */
.dev-acc-new { background: #fff; border-style: dashed; border-color: #d8d4cc; }
.dev-acc-new .dev-acc-av { background: #b9b4aa; }
.dev-acc-new b { color: #6b6660; font-weight: 700; }
.dev-switch-panel.busy { pointer-events: none; opacity: .6; }
.dev-acc-av {
  flex: none;
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: 9px;
  background: #2a8a7a;
  color: #fff;
  font-weight: 800;
  font-size: 13px;
}
.dev-acc-info { display: flex; flex-direction: column; line-height: 1.35; min-width: 0; }
.dev-acc-info b { font-size: 12px; color: #222; }
.dev-acc-info small { font-size: 10px; color: var(--muted, #8a8a8a); }
.dev-acc.dev-logout { background: #fdecec; margin-top: 4px; justify-content: center; gap: 5px; font-size: 12px; font-weight: 700; color: #c0392b; }
.dev-acc.dev-logout svg { width: 14px; height: 14px; }

/* placeholderِ درخشانِ تصویرِ سؤال تا وقتی تک‌تک لود می‌شوند (حسِ لود شدنِ حرفه‌ای) */
.sq-img-lazy {
  display: block;
  width: 100%;
  min-height: 120px;
  border-radius: 0;
  background: linear-gradient(100deg, #f1ede8 20%, #faf8f4 45%, #f1ede8 70%);
  background-size: 220% 100%;
  animation: sqImgShimmer 1.25s ease-in-out infinite;
}
/* metadata ابعاد اجازه می‌دهد پیش از رسیدن تصویر، ارتفاع نهایی صفحه دقیق بماند. */
.sq-img-lazy.sq-img-sized { min-height: 0; }
.sq-img-loaded {
  animation: none;
  background: none;
  min-height: 0;
}
@keyframes sqImgShimmer {
  0% { background-position: 220% 0; }
  100% { background-position: -220% 0; }
}

/* ── اسکلتِ لود صفحه (قالب سایت با درخشش، حسِ اپ‌های حرفه‌ای) ── */
.skeleton-page { padding: 6px 2px 40px; animation: skFade .3s ease; }
.sk-head { margin-bottom: 22px; }
.sk-toolbar { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 20px; }
.sk-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; }
.sk-card { border: 1px solid var(--line, #eee3d6); border-radius: 16px; background: #fff; overflow: hidden; }
.sk-card-media { height: 130px; }
.sk-card-body { padding: 14px 16px 16px; }
.sk-chips { display: flex; gap: 8px; margin-top: 14px; }
.sk-bar, .sk-card-media {
  display: inline-block;
  border-radius: 7px;
  background: linear-gradient(100deg, #efeae3 20%, #f9f6f1 46%, #efeae3 72%);
  background-size: 220% 100%;
  animation: sqImgShimmer 1.25s ease-in-out infinite;
}
@keyframes skFade { from { opacity: 0; } to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) {
  .sk-bar, .sk-card-media, .sq-img-lazy { animation: none; }
}

/* ── پردهٔ بارگذاریِ index.html (`#bootSplash`) — پیش از اجرای app.js ──
   پس‌زمینه‌اش همان رنگِ بدنه است، پس تا نشان و نوار پیدا نشده‌اند فرقی با
   صفحهٔ خالیِ قبلی ندارد؛ نشان و نوار بعد از ۳۵۰ms می‌آیند تا در بارگذاریِ
   سریع یک پرشِ بی‌معنی نسازند. z-index بالای modal-root است؛ پرده پیش از
   ساخته‌شدنِ هر پاپ‌آپ یا نوارِ «نسخهٔ جدید» برداشته می‌شود. */
.boot-splash {
  position: fixed;
  inset: 0;
  z-index: 100001;
  display: grid;
  place-items: center;
  background: var(--bg);
  transition: opacity .22s ease;
}
.boot-splash.is-done { opacity: 0; pointer-events: none; }
.boot-splash-inner {
  display: grid;
  justify-items: center;
  gap: 22px;
  opacity: 0;
  animation: bootSplashIn .4s ease .35s forwards;
}
.boot-splash-mark { width: 72px; height: 54px; object-fit: contain; }
.boot-splash-bar {
  position: relative;
  width: 132px;
  height: 3px;
  border-radius: 999px;
  background: var(--line);
  overflow: hidden;
}
/* نوارِ بی‌پایان، راست به چپ (جهتِ خواندن). */
.boot-splash-bar i {
  position: absolute;
  inset-block: 0;
  right: 0;
  width: 40%;
  border-radius: inherit;
  /* سبزِ خودِ نشان: پرده پیش از هر دو پوسته (پنلِ نارنجی و ورودِ کاغذی) می‌آید. */
  background: #127c44;
  animation: bootSplashBar 1.15s ease-in-out infinite;
}
@keyframes bootSplashIn { to { opacity: 1; } }
@keyframes bootSplashBar {
  from { transform: translateX(100%); }
  to { transform: translateX(-250%); }
}
@media (prefers-reduced-motion: reduce) {
  .boot-splash-bar i { animation: none; right: 30%; }
}

/* ==== استودیوی چاپ مجموعه سوال ==== */
.print-studio {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: flex;
  flex-direction: column;
  background: #efece5;
}
body.pstudio-open { overflow: hidden; }
.pstudio-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 12px 20px;
  background: #fffdfa;
  border-bottom: 1px solid var(--line);
}
.pstudio-title {
  display: flex;
  align-items: baseline;
  gap: 10px;
}
.pstudio-title b { font-size: 16px; }
.pstudio-title span { color: var(--muted); font-weight: 700; }
.pstudio-title small { color: var(--muted); font-size: 11px; }
.pstudio-actions { display: flex; align-items: center; gap: 10px; }
/* انتخاب قالبِ چاپ آزمونِ برگزارشده (دفترچه/پاسخ/کلید/همه) در نوار بالای استودیو */
.pstudio-exam-tpls { display: flex; flex-wrap: wrap; gap: 6px; margin-inline-start: auto; }
.pstudio-exam-tpls .pset-template { padding: 8px 12px; }
.pstudio-layout {
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-columns: 330px minmax(0, 1fr);
}
.pstudio-side {
  grid-column: 1;
  grid-row: 1;
  overflow: auto;
  padding: 16px;
  background: #fffdfa;
  border-inline-end: 1px solid var(--line);
}
.pstudio-preview {
  /* جایگاه صریح است تا لایهٔ لودینگ (که روی همین خانه می‌نشیند) آن را به ردیف بعد هل ندهد */
  grid-column: 2;
  grid-row: 1;
  overflow: auto;
  padding: 26px 20px 60px;
  display: grid;
  justify-items: center;
  align-content: start;
  gap: 22px;
}
.pstudio-layout.no-side .pstudio-preview { grid-column: 1; }

/* ── حالت «در حال آماده‌سازی/صفحه‌بندی» ──
   روی همان خانهٔ گرید پیش‌نمایش می‌نشیند (نه روی تنظیمات) و pointer-events ندارد،
   پس نوار تنظیمات و اسکرول صفحه‌ها همچنان در دسترس‌اند. */
.pstudio-busy {
  grid-column: 2;
  grid-row: 1;
  z-index: 6;
  min-width: 0;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding: 12vh 16px 16px;
  pointer-events: none;
  background: rgba(239, 236, 229, .72);
}
.pstudio-layout.no-side .pstudio-busy { grid-column: 1; }
/* بعد از آماده‌شدن batch اول، صفحه‌ها زیر یک لایهٔ روشن و نوار کوچک زنده می‌مانند؛
   کاربر می‌تواند نتیجه را بخواند و اسکرول کند، در حالی که ادامه تکمیل می‌شود. */
.pstudio-busy.has-preview {
  padding-top: 16px;
  background: rgba(239, 236, 229, .18);
}
.pstudio-busy.has-preview .pstudio-busy-card {
  position: sticky;
  top: 12px;
  box-shadow: 0 9px 24px rgba(60, 47, 32, .16);
}
.pstudio-busy-card {
  display: inline-flex;
  align-items: center;
  gap: 13px;
  min-width: 260px;
  max-width: 100%;
  padding: 14px 20px;
  border-radius: 18px;
  background: #fffdfa;
  border: 1px solid var(--line);
  box-shadow: 0 14px 34px rgba(60, 47, 32, .2);
  animation: skFade .2s ease;
}
.pstudio-busy-body { display: flex; flex-direction: column; gap: 3px; min-width: 0; flex: 1; }
.pstudio-busy-card b { font-size: 13.5px; }
.pstudio-busy-card small { color: var(--muted); font-size: 11px; }
.pstudio-busy-card small:empty { display: none; }
/* نوار پیشرفتِ دریافت سؤال‌ها؛ فقط وقتی درصد واقعی داریم دیده می‌شود */
.pstudio-busy-bar {
  display: block;
  height: 5px;
  margin-top: 5px;
  border-radius: 99px;
  background: #f1e9df;
  overflow: hidden;
}
.pstudio-busy-bar[hidden] { display: none; }
.pstudio-busy-bar i {
  display: block;
  height: 100%;
  width: 0;
  border-radius: inherit;
  background: var(--orange);
  transition: width .25s ease;
}
/* پیش از رسیدن اولین تکه، نوار نامعین می‌لغزد (transform است، پس روی compositor می‌ماند) */
.pstudio-busy-bar.is-indeterminate i {
  width: 38%;
  transition: none;
  animation: pstudioBarSlide 1.15s ease-in-out infinite;
}
@keyframes pstudioBarSlide {
  from { transform: translateX(-110%); }
  to { transform: translateX(275%); }
}
.pstudio-busy-spin {
  width: 18px;
  height: 18px;
  flex: none;
  border: 2px solid #eadfd3;
  border-top-color: var(--orange);
  border-radius: 50%;
  animation: pstudioSpin .75s linear infinite;
}
@keyframes pstudioSpin { to { transform: rotate(360deg); } }
.pstudio-preview.is-busy { cursor: progress; }
.pstudio-busy.is-error { pointer-events: auto; }
.pstudio-busy.is-error .pstudio-busy-card { border-color: #efc9c4; box-shadow: 0 14px 34px rgba(111, 43, 37, .18); }
.pstudio-busy.is-error .pstudio-busy-spin {
  border: 0;
  border-radius: 50%;
  background: #fff0ee;
  animation: none;
}
.pstudio-busy.is-error .pstudio-busy-spin::before {
  content: "!";
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  color: #b5473e;
  font-size: 12px;
  font-weight: 900;
}
.pstudio-busy-actions { display: flex; margin-top: 7px; }
.pstudio-busy-actions button {
  padding: 7px 13px;
  border: 1px solid #e8b9b4;
  border-radius: 9px;
  background: #fff;
  color: #a23f37;
  font: inherit;
  font-size: 11.5px;
  font-weight: 850;
  cursor: pointer;
}
.pstudio-busy-actions button:disabled { opacity: .6; cursor: wait; }

/* اسکلت A4 تا اولین صفحه‌بندی؛ ناحیهٔ پیش‌نمایش هرگز خالی دیده نمی‌شود.
   بدون انیمیشن: درخششِ گرادیان روی سطحی به این بزرگی هر فریم repaint می‌خواهد و
   دقیقاً حین صفحه‌بندی رشتهٔ اصلی را کند می‌کند؛ حرکت را همان اسپینر کوچک می‌رساند. */
.pstudio-skeleton { display: grid; justify-items: center; gap: 22px; }
.pstudio-skeleton-page {
  width: 794px;
  max-width: 100%;
  height: 1123px;
  border-radius: 12px;
  border: 1px solid #e5dacb;
  box-shadow: 0 10px 34px rgba(60, 47, 32, .14);
  background: #fbf9f5;
}
@media (prefers-reduced-motion: reduce) {
  .pstudio-busy-spin, .pstudio-busy-bar.is-indeterminate i { animation: none; }
}

/* تنظیمات */
.pset-group { margin-bottom: 20px; }
.pset-group h4 { margin: 0 0 10px; font-size: 13px; }
.pset-templates { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.pset-template {
  padding: 10px 8px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  font-size: 12px;
  font-weight: 800;
  color: var(--muted);
  cursor: pointer;
  transition: all .15s ease;
}
.pset-template.on { border-color: var(--orange); color: var(--orange); background: var(--orange-soft); }
.pset-select {
  width: 100%;
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  font: inherit;
  font-size: 12px;
}
.pset-subselect { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 8px; margin-top: 8px; font-size: 12px; font-weight: 700; color: var(--muted); }
.pset-subselect .pset-select { width: 100%; }
.pset-check { display: flex; align-items: center; gap: 8px; padding: 6px 0; font-size: 12.5px; font-weight: 700; cursor: pointer; }
.pset-check input { accent-color: var(--orange); width: 15px; height: 15px; }
.pset-check.head { padding: 0; font-size: 13px; }
.pset-topic-parts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
  margin-top: 8px;
  padding: 8px;
  border: 1px solid #eee3d7;
  border-radius: 12px;
  background: #fffdfa;
}
.pset-topic-part {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 7px;
  border: 1px solid #f0e7dc;
  border-radius: 10px;
  background: #fff;
  color: #6c6355;
  font-size: 11.5px;
  font-weight: 800;
  cursor: pointer;
}
.pset-topic-part input {
  width: 14px;
  height: 14px;
  margin: 0;
  accent-color: var(--orange);
  flex: none;
}
.pset-topic-part span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.pset-slider { display: grid; gap: 6px; padding-top: 8px; font-size: 12.5px; font-weight: 700; }
.pset-slider input { width: 100%; accent-color: var(--orange); }
.pset-slider b { color: var(--orange); font-size: 12px; }
.pset-header-rows { display: grid; gap: 7px; }
.pset-header-rows.is-off { opacity: .45; pointer-events: none; }
.pset-header-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}
.pset-header-head h4 { margin: 0; }
.pset-align-tools {
  display: inline-flex;
  direction: rtl;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #f7f4ee;
}
.pset-align-tools button {
  width: 30px;
  height: 28px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: #817766;
  cursor: pointer;
}
.pset-align-tools button:hover { color: var(--orange); }
.pset-align-tools button.on {
  color: #9a5a1f;
  background: #fff;
  box-shadow: 0 2px 7px rgba(67, 49, 30, .12);
}
.pset-align-tools svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; }
.pset-header-row { display: grid; grid-template-columns: 16px 82px minmax(0, 1fr); align-items: center; gap: 7px; }
.pset-header-row.has-align { grid-template-columns: 16px 70px minmax(0, 1fr) auto; }
.pset-row-align { padding: 2px; border-radius: 9px; }
.pset-row-align button { width: 23px; height: 26px; border-radius: 6px; }
.pset-row-align svg { width: 15px; height: 15px; }
.pset-header-row input[type="checkbox"] { accent-color: var(--orange); }
.pset-header-row input[type="text"] {
  padding: 7px 8px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #fff;
  font: inherit;
  font-size: 11.5px;
  min-width: 0;
}
.pset-badge-tabs { margin-bottom: 8px; }
.pset-two { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.pset-two label { display: grid; gap: 5px; font-size: 11.5px; font-weight: 700; color: var(--muted); }
.pset-two input {
  width: 78px;
  max-width: 100%;
  padding: 7px 8px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #fff;
  font: inherit;
  font-size: 12px;
  text-align: center;
}
.pset-hint { font-size: 11px; color: var(--muted); background: #f7f4ee; border-radius: 10px; padding: 9px 11px; }
.pset-templates.compact { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.pset-total-mark {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 10px;
  padding: 9px 11px;
  border: 1px solid #eadfd1;
  border-radius: 10px;
  background: #fff8ef;
  color: #7d6f5d;
  font-size: 12px;
  font-weight: 800;
}
.pset-total-mark b { color: #9a5a1f; font-size: 13px; }
.pset-qgrid-head,
.pset-qrow {
  display: grid;
  grid-template-columns: 34px 1fr 1fr;
  align-items: center;
  gap: 6px;
}
.pset-qgrid-head.mark-only,
.pset-qgrid.mark-only .pset-qrow {
  grid-template-columns: 34px 1fr;
}
.pset-qgrid-head {
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 10.5px;
  font-weight: 800;
}
.pset-qgrid {
  display: grid;
  gap: 5px;
  max-height: 260px;
  overflow: auto;
  padding-inline-end: 2px;
}
.pset-qrow {
  padding: 5px;
  border: 1px solid #eee6da;
  border-radius: 9px;
  background: #fffdfa;
}
.pset-qrow b {
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: #f4f0ea;
  color: #5e584f;
  font-size: 11px;
}
.pset-qrow input {
  min-width: 0;
  width: 100%;
  padding: 6px 5px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  font: inherit;
  font-size: 11px;
  text-align: center;
}
.pset-empty { margin: 0; color: var(--muted); font-size: 11px; }

/* صفحه A4 */
.pstudio-page {
  position: relative;
  box-sizing: border-box;
  width: 794px;
  min-height: 1123px;
  background: #fff;
  border: 1px solid #e5dacb;
  border-radius: 12px;
  box-shadow: 0 10px 34px rgba(60,47,32,.14);
  padding: 57px;
  overflow: hidden;
}
@media screen {
  /* صفحه‌های پایین viewport تا زمان نزدیک‌شدن paint نمی‌شوند؛ ابعاد ذاتی ثابت
     می‌ماند و این rule در چاپ/PDF فعال نیست. */
  .pstudio-page { content-visibility: auto; contain-intrinsic-size: 794px 1123px; }
}
.pstudio-page::before {
  content: "";
  position: absolute;
  inset: 30px;
  border: 1px solid #e3d7c4;
  border-radius: 14px;
  pointer-events: none;
}
/* قالب‌های غیرِ سؤال (پاسخنامهٔ تشریحی/کلیدی/پاسخبرگ) کادرِ حالت آزمون را ندارند */
.pstudio-page.no-frame::before { display: none; }
.pstudio-page-inner {
  position: relative;
  z-index: 1;
  display: block;
}
.pstudio-page-inner > * + * {
  margin-top: var(--pq-gap, 38px);
}
.pstudio-page-inner > .pq-header + * {
  margin-top: 18px;
}
.pstudio-page.is-final .pstudio-page-inner > * + *,
.pstudio-page.is-final .pstudio-page-inner > .pq-header + * {
  margin-top: 0;
}
.pstudio-page.is-final {
  --pstudio-final-side: 42px;
  --pstudio-final-line: 1px;
}
.pstudio-page-footer {
  position: absolute;
  right: 0;
  left: 0;
  /* کمی بالاتر تا شمارهٔ صفحه از خطِ کادر فاصله بگیرد */
  bottom: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: #8b8272;
  font-size: 10.5px;
  font-weight: 700;
  z-index: 2;
}
.pstudio-page-footer b {
  min-width: 28px;
  height: 24px;
  display: grid;
  place-items: center;
  border: 1px solid #eadfd1;
  border-radius: 8px;
  color: #9a5a1f;
  background: #fff8ef;
}

/* نسخهٔ سادهٔ چاپ مجموعه سؤال: سربرگ ثابت، تایپوگرافی فارسی و فوتر برند */
.pstudio-page.is-simple {
  padding: 118px 57px 72px;
  color: #24211d;
  font-family: "Vazirmatn", "B Nazanin", Tahoma, sans-serif;
  text-rendering: optimizeLegibility;
  -webkit-print-color-adjust: exact;
  print-color-adjust: exact;
}
.pstudio-measure.is-simple-measure {
  color: #24211d;
  font-family: "Vazirmatn", "B Nazanin", Tahoma, sans-serif;
  text-rendering: optimizeLegibility;
}
.pstudio-page.is-simple::before {
  inset: 25px;
  border: 1px solid #e7ded2;
  border-radius: 20px;
  box-shadow: inset 0 0 0 4px #fbf9f6;
}
.psimple-page-head {
  position: absolute;
  z-index: 3;
  top: 33px;
  right: 39px;
  left: 39px;
  min-height: 62px;
  display: grid;
  grid-template-columns: 176px minmax(0, 1fr) 176px;
  align-items: center;
  gap: 14px;
  padding: 0 4px 12px;
  border-bottom: 1px solid #ddd2c4;
  color: #25313a;
}
.psimple-page-head::after {
  content: none;
}
.psimple-brand {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 9px;
}
/* لوگو و لوگوتایپِ چاپ به‌صورت background می‌آیند نه <img>: سرور هنگام ساخت PDF
   فقط نشانی‌های داخل CSS را به file:// ترجمه می‌کند (booklet_pdf_css)، و چون
   اندازه اینجا صریح است، ارتفاعِ بلوک برای صفحه‌بندی به بارگذاری تصویر گره
   نمی‌خورد. `?v=` لازم است چون nginx پوشهٔ assets را ۳۰ روز کش می‌کند و بدون آن
   نسخهٔ تازهٔ لوگو تا یک ماه در مرورگرِ کاربر کهنه می‌ماند؛ سرور موقع ساخت PDF
   خودش کوئری را دور می‌ریزد تا مسیرِ دیسک درست بماند. */
.psimple-logo {
  width: 44px;
  height: 33px;               /* نسبت لوگو ۱٫۳۳ */
  flex: 0 0 44px;
  background: url("/assets/logo.svg?v=2") center / contain no-repeat;
}
/* نام برند در سربرگ عمداً متن است نه لوگوتایپ: در قوارهٔ این سربرگ، لوگوتایپ
   یا ریز و ناخوانا می‌شد یا جای زیرنویس را می‌گرفت. */
.psimple-brand > span:last-child { min-width: 0; display: grid; gap: 1px; justify-items: start; }
.psimple-brand b { font-size: 16px; font-weight: 950; color: #173e58; white-space: nowrap; line-height: 1.25; }
.psimple-brand small { font-size: 8.5px; font-weight: 720; color: #8b8174; white-space: nowrap; }
.psimple-title {
  min-width: 0;
  display: grid;
  justify-items: center;
  gap: 1px;
  padding-inline: 14px;
  border-inline: 1px solid #eee7de;
  text-align: center;
}
.psimple-title small { font-size: 8.5px; font-weight: 800; color: #9b8e7e; }
.psimple-title b {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #24211d;
  font-size: 14.5px;
  font-weight: 900;
}
.psimple-count { width: 100%; display: grid; justify-self: stretch; justify-items: center; gap: 1px; text-align: center; }
.psimple-count small { font-size: 8.5px; font-weight: 800; color: #9b8e7e; }
.psimple-count b { min-width: 34px; color: #173e58; font-size: 14px; font-weight: 950; text-align: center; }
.psimple-page-footer {
  position: absolute;
  z-index: 3;
  right: 42px;
  left: 42px;
  bottom: 34px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 12px;
  padding-top: 8px;
  border-top: 1px solid #e1d8cc;
  color: #81776a;
  font-size: 9.5px;
  font-weight: 750;
}
.psimple-site {
  justify-self: end;
  color: #28536f;
  font-family: "Vazirmatn", Arial, sans-serif;
  font-size: 10.5px;
  font-weight: 850;
  letter-spacing: .2px;
}
.psimple-footer-mark {
  position: relative;
  width: 42px;
  height: 1px;
  background: #d9cfc2;
}
.psimple-footer-mark::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 5px;
  height: 5px;
  border: 2px solid #fff;
  border-radius: 50%;
  background: #ed6a2c;
  box-shadow: 0 0 0 1px #ed6a2c;
  transform: translate(-50%, -50%);
}
.psimple-page-no { justify-self: start; white-space: nowrap; color: #6e6559; font-size: 10.5px; font-weight: 850; }

/* مقدار فاصلهٔ چیدمان، فضای خالی بعد از سؤال قبلی است؛ نه بالای سؤال یا بین عنوان بخش و سؤال آن. */
.pstudio-page.is-simple .pstudio-page-inner > * + * { margin-top: 0; }
.pstudio-page.is-simple .pstudio-page-inner > .pq-header + * { margin-top: 18px; }
.pstudio-page.is-simple .pstudio-page-inner > .pq-block + * { margin-top: var(--pq-gap, 0); }
.pstudio-page.is-simple .pstudio-page-inner > .pq-section-title + .pq-block { margin-top: 8px; }

.pstudio-page.is-simple .psimple-info,
.pstudio-measure.is-simple-measure .psimple-info {
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  overflow: hidden;
  padding: 0;
  border: 1px solid #e3d8ca;
  border-radius: 14px;
  background: #e9e0d5;
  box-shadow: 0 5px 16px rgba(47, 37, 25, .045);
}
.pstudio-page.is-simple .psimple-info .pqh-cell,
.pstudio-measure.is-simple-measure .psimple-info .pqh-cell {
  min-height: 43px;
  padding: 9px 14px;
  background: #fffdfa;
  color: #37312b;
  font-size: 11.5px;
}
.pstudio-page.is-simple .psimple-info .pqh-cell:last-child:nth-child(odd),
.pstudio-measure.is-simple-measure .psimple-info .pqh-cell:last-child:nth-child(odd) { grid-column: 1 / -1; }
.pstudio-page.is-simple .psimple-info .pqh-cell b,
.pstudio-measure.is-simple-measure .psimple-info .pqh-cell b { color: #8a6f55; font-size: 10.5px; font-weight: 850; }
.pstudio-page.is-simple .psimple-info .pqh-cell > span:not(.pqh-blank),
.pstudio-measure.is-simple-measure .psimple-info .pqh-cell > span:not(.pqh-blank) { font-weight: 800; }
.pstudio-page.is-simple .psimple-info .pqh-blank,
.pstudio-measure.is-simple-measure .psimple-info .pqh-blank { border-bottom: 0; }
.pstudio-page.is-simple .pq-question-row,
.pstudio-measure.is-simple-measure .pq-question-row { grid-template-columns: auto minmax(0, 1fr); gap: 6px; }
/* شماره روی خطِ اولِ متن می‌نشیند، نه بالای بلوک. با `align-items: start` هر دو
   ستون از یک y شروع می‌شوند، ولی سطرِ متن (line-height 2.12) از سطرِ شماره
   (1.45) بلندتر است و نیم‌فاصلهٔ بیشترش خطِ پایهٔ متن را ~۴px پایین‌تر می‌برد؛
   نتیجه شماره‌ای که روی خط ننشسته است. هم‌ترازیِ baseline خودِ گرید این را دقیق
   صفر می‌کند.
   سؤالِ تصویری و پاسخنامه بیرون‌اند: خطِ پایهٔ یک تصویر لبهٔ پایینِ آن است، پس
   با baseline شماره تا زیرِ شکل می‌افتد. */
.pstudio-page.is-simple .pq-block:not(.pq-visual-first):not(.pa-block) .pq-question-row,
.pstudio-measure.is-simple-measure .pq-block:not(.pq-visual-first):not(.pa-block) .pq-question-row {
  align-items: baseline;
}
.pstudio-page.is-simple .pq-block:not(.pq-visual-first):not(.pa-block) .pq-no-wrap,
.pstudio-measure.is-simple-measure .pq-block:not(.pq-visual-first):not(.pa-block) .pq-no-wrap {
  align-self: baseline;
}
/* شمارهٔ سؤالِ برگهٔ چاپ: همان قراردادِ دفترچه — عددِ ساده با فونتِ خودِ سؤال و
   یک خط کوتاه بعد از آن («۱-»)، نه چیپِ رنگیِ رابط. خط با border کشیده می‌شود
   نه با کاراکترِ «-»، چون در متنِ راست‌به‌چپ الگوریتم bidi آن را جابه‌جا می‌کند. */
.pstudio-page.is-simple .pq-no,
.pstudio-measure.is-simple-measure .pq-no {
  width: auto;
  height: auto;
  margin: 0;
  padding: 0;
  display: inline-flex;
  direction: rtl;
  align-items: baseline;
  justify-content: flex-end;
  gap: 3px;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  color: #2c2721;
  /* خانوادهٔ ترکیبیِ «MK Question» عمداً «۰» را از وزیرمتن می‌خواند (صفرِ ب نازنین
     یک نقطه است) — ولی آن قرارداد فقط برای متنِ سؤال و گزینه‌هاست. در شمارهٔ
     سؤال همان جانشینی یعنی «۱۰» با «۱»ِ ب نازنین و «۰»ِ وزیرمتن نوشته شود و
     دو رقمِ یک عدد از دو فونت دربیایند. پس شماره خودِ ب نازنین را می‌گیرد —
     همان کاری که .pexam-no در دفترچهٔ کنکور می‌کند. */
  font-family: "B Nazanin", "BNazanin", "Vazirmatn", Tahoma, sans-serif;
  font-size: calc(14px * var(--q-scale));
  font-weight: 700;
  /* هم‌ترازی با «سطرِ» متن (۲٫۱۲) شماره را تا وسطِ خط پایین می‌کشید و کنارِ سؤالِ
     تصویری خیلی افتاده دیده می‌شد؛ شماره باید نزدیکِ بالای بلوکِ سؤال بایستد. */
  line-height: 1.45;
  white-space: nowrap;
}
.pstudio-page.is-simple .pq-no::after,
.pstudio-measure.is-simple-measure .pq-no::after {
  content: "";
  width: 7px;
  flex: 0 0 7px;
  align-self: center;
  border-top: 1.5px solid currentColor;
}
/* جوهرِ رقمِ ب نازنین بالاتر از مرکزِ سطر است؛ فقط رقم پایین می‌آید تا خطِ
   کوتاه کنارِ وسطِ آن بماند. em این فاصله را با اندازهٔ فونت هماهنگ می‌کند. */
.pstudio-page.is-simple .pq-block:not(.pa-block) .pq-no > b,
.pstudio-measure.is-simple-measure .pq-block:not(.pa-block) .pq-no > b,
.pexam-no > b {
  display: block;
  font: inherit;
  transform: translateY(.17em);
}
.pstudio-page.is-simple .pq-body,
.pstudio-measure.is-simple-measure .pq-body { font-size: 14px; font-weight: 480; line-height: 2.12; }
.pstudio-page.is-simple .pq-option,
.pstudio-measure.is-simple-measure .pq-option { color: #35302a; font-size: 13.3px; line-height: 1.9; }
.pstudio-page.is-simple .pq-option b,
.pstudio-measure.is-simple-measure .pq-option b { color: inherit; }

/* پاسخنامهٔ تشریحی بدون کادر است: پاسخ‌ها پشتِ‌هم روی صفحه می‌آیند و مرزشان را
   جداکنندهٔ «آقای کنکور» می‌سازد، نه یک باکسِ دورِ هرکدام. کادرکشی هم صفحه را
   شلوغ می‌کرد و هم جای جداکننده را می‌گرفت. */
.pstudio-page.is-simple.is-answers .pa-block,
.pstudio-measure.is-simple-measure .pa-block {
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}
/* جداکننده باید به پاسخِ بعدی بچسبد، نه اینکه وسطِ یک فضای خالی شناور بماند.
   دو فاصله روی هم جمع می‌شدند: `--pq-gap` (۱۶px در قالب پاسخنامه) که به هر بلوکِ
   بعد از بلوکِ دیگر margin-top می‌داد، به‌علاوهٔ حاشیهٔ خودِ جداکننده. جمعش ۳۴px
   بالای خط می‌شد. حالا فاصلهٔ بین‌بلوکی صفر است و فقط حاشیهٔ کمِ خودِ جداکننده
   می‌ماند — چون خودِ خط، مرزِ دو پاسخ است و فاصلهٔ اضافه لازم ندارد. */
.pstudio-page.is-simple.is-answers .pstudio-page-inner > .pq-block + *,
.pstudio-measure.is-simple-measure .pstudio-page-inner > .pq-block + * { margin-top: 0; }
/* فاصله با padding داده می‌شود، نه margin. اندازه‌گیرِ صفحه‌بندی هر بلوک را داخل
   `.pstudio-mitem` که `overflow: hidden` دارد می‌سنجد، پس آنجا حاشیه جمع نمی‌شود
   ولی در صفحهٔ واقعی حاشیهٔ بالای جداکننده از `.pa-block` بیرون می‌زند و جمع
   می‌شود؛ نتیجه اینکه هر پاسخ ۸px بلندتر از واقعیت اندازه‌گیری می‌شد و صفحه
   زودتر «پر» اعلام می‌شد. padding هرگز جمع نمی‌شود و دو طرف یک عدد می‌دهند. */
.pstudio-page.is-simple.is-answers .pq-answer-divider,
.pstudio-measure.is-simple-measure .pq-answer-divider { margin: 0; padding: 8px 0; }
/* شمارهٔ سؤال در پاسخنامه چیپ می‌ماند، نه عددِ سادهٔ «۲-» دفترچه. قاعدهٔ
   `.pstudio-page.is-simple .pq-no` صفحهٔ پاسخنامه را هم می‌گرفت (چون هم
   is-simple است و هم is-answers) و چیپ را برمی‌داشت؛ اینجا برگردانده می‌شود.
   دفترچهٔ سؤال قراردادِ خشکِ چاپ را دارد، ولی پاسخنامه صفحهٔ خواندن است و
   می‌تواند رنگ و قاب داشته باشد. */
/* شماره و چیپِ «پاسخ صحیح» یک سربرگِ واحدند: هر دو دقیقاً ۲۶px ارتفاع دارند و
   از یک y شروع می‌شوند. عرضِ شماره برای عددهای چندرقمی باز می‌شود، اما از یک
   مربعِ ۲۶px کوچک‌تر نمی‌شود. */
.pstudio-page.is-simple.is-answers .pa-block .pq-question-row,
.pstudio-measure.is-simple-measure .pa-block .pq-question-row {
  grid-template-columns: auto minmax(0, 1fr);
  align-items: start;
}
.pstudio-page.is-simple.is-answers .pa-block .pq-no,
.pstudio-measure.is-simple-measure .pa-block .pq-no {
  width: auto;
  min-width: 26px;
  height: 26px;
  margin: 0;
  padding: 0 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  direction: inherit;
  gap: 0;
  border: 1px solid #f0d3b4;
  border-radius: 9px;
  background: #fff3e8;
  color: #9a5a1f;
  font-family: inherit;
  font-size: 11.5px;
  font-weight: 900;
  line-height: 1;
}
/* flex خطِ متن را وسط می‌گذارد؛ جوهرِ رقمِ وزیرمتن به‌خاطر صعودِ بلندتر هنوز
   حدود یک پیکسل بالاتر دیده می‌شود. فقط خودِ رقم پایین می‌آید، نه کادر. */
.pstudio-page.is-simple.is-answers .pa-block .pq-no > b,
.pstudio-measure.is-simple-measure .pa-block .pq-no > b {
  display: block;
  font: inherit;
  line-height: 1;
  transform: translateY(1px);
}
/* خطِ کوتاهِ بعد از عدد قراردادِ دفترچه است و داخل چیپ معنایی ندارد */
.pstudio-page.is-simple.is-answers .pa-block .pq-no::after,
.pstudio-measure.is-simple-measure .pa-block .pq-no::after { content: none; }
.pstudio-page.is-simple.is-answers .pq-answer-top,
.pstudio-measure.is-simple-measure .pq-answer-top {
  min-height: 26px;
  align-items: flex-start;
  margin-bottom: 9px;
}
.pstudio-page.is-simple.is-answers .pq-answer-chip,
.pstudio-measure.is-simple-measure .pq-answer-chip {
  display: inline-flex;
  align-items: center;
  height: 26px;
  padding: 0 10px;
  border: 1px solid #cfe6dd;
  border-radius: 9px;
  background: #eff8f5;
  color: #176e5c;
  font-size: 10.5px;
}
.pstudio-page.is-simple.is-answers .pa-block .pq-body,
.pstudio-measure.is-simple-measure .pa-block .pq-body {
  color: #302b25;
  font-size: 13.2px;
  font-weight: 450;
  line-height: 2.05;
}
.pstudio-page.is-simple.is-answers .pa-block .pq-meta-row,
.pstudio-measure.is-simple-measure .pa-block .pq-meta-row { margin-top: 4px; }
/* دُمِ بلوکِ پاسخ: آخرین پاراگرافِ متن حاشیهٔ پایین نگه می‌داشت و نیم‌فاصلهٔ
   سطرِ ۲٫۰۵ هم زیرِ آخرین خط جا می‌گذاشت. هرچه اینجا کم شود مستقیم به «چند پاسخ
   در یک صفحه جا می‌شود» تبدیل می‌شود. */
.pstudio-page.is-simple.is-answers .pa-block .pq-body > *:last-child,
.pstudio-measure.is-simple-measure .pa-block .pq-body > *:last-child,
.pstudio-page.is-simple.is-answers .pa-block .pq-body :last-child > p:last-child,
.pstudio-measure.is-simple-measure .pa-block .pq-body :last-child > p:last-child { margin-bottom: 0; }
/* تکهٔ ادامهٔ یک پاسخ (`pstudioAnswerSplitChunks`): وسطِ صفحه هیچ نشانه‌ای لازم
   ندارد چون بدونِ فاصله به تکهٔ قبلی چسبیده و مثل یک بلوکِ واحد دیده می‌شود؛ فقط
   وقتی سرِ صفحهٔ بعد می‌افتد باید معلوم باشد ادامهٔ کدام پاسخ است. `visibility`
   به‌جای `display` عمدی است: ستونِ شماره سرِ جایش می‌ماند، پس عرضِ تصویر در همهٔ
   تکه‌ها یکی است و ارتفاعِ اندازه‌گیری‌شده با ارتفاعِ چاپ‌شده مو نمی‌زند. */
.pstudio-page-inner > .pa-block.is-answer-cont:not(:first-child) .pq-no { visibility: hidden; }
.pstudio-page.is-simple.is-answers .pa-block.is-answer-cont .pq-no,
.pstudio-measure.is-simple-measure .pa-block.is-answer-cont .pq-no {
  border-style: dashed;
  background: #fffaf4;
}
.pstudio-page.is-simple .pq-block.with-line,
.pstudio-measure.is-simple-measure .pq-block.with-line { padding-bottom: 16px; border-bottom: 1px dashed #ddd3c7; }
.pstudio-page.is-simple .pq-section-title,
.pstudio-measure.is-simple-measure .pq-section-title { color: #315b73; }
.pstudio-page.is-simple .pq-section-title::before,
.pstudio-page.is-simple .pq-section-title::after,
.pstudio-measure.is-simple-measure .pq-section-title::before,
.pstudio-measure.is-simple-measure .pq-section-title::after { background: #d8e0e5; }
.pstudio-page.is-simple .pq-section-title span,
.pstudio-measure.is-simple-measure .pq-section-title span { border-color: #d8e0e5; background: #f5f9fb; }
/* شمارهٔ صفحهٔ امتحان نهایی، به‌صورت آخرین ردیف جدول و دقیقاً چسبیده به سؤال آخر */
.pstudio-final-footer {
  position: relative;
  left: auto;
  right: auto;
  bottom: auto;
  width: 100%;
  box-sizing: border-box;
  margin-top: 0;
  padding: 7px 10px;
  border: var(--pstudio-final-line, 1px) solid #2d2923;
  border-top: 0;
  background: #fff;
  text-align: center;
  color: #181512;
  font-size: 12.5px;
  font-weight: 900;
  z-index: 2;
}
/* برچسب‌های روی کادر: اسم مجموعه و برند «آقای کنکور» روی خطِ بالایی کادر می‌نشینند */
.pstudio-corner {
  position: absolute;
  z-index: 3;
  top: 30px;
  transform: translateY(-50%);
  max-width: 44%;
  padding: 2px 12px;
  background: #fff;
  font-size: 11px;
  font-weight: 900;
  line-height: 1.5;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  pointer-events: none;
}
.pstudio-brand {
  inset-inline-end: 52px;
  width: 29px;
  height: 13px;
  padding: 0 12px;
  box-sizing: content-box;
  background: #fff url("/assets/logotype.svg?v=4") center / 29px 13px no-repeat;
}
.pstudio-set-name {
  inset-inline-start: 52px;
  color: #3f3a33;
}
.pstudio-measure {
  position: absolute;
  left: -10000px;
  top: 0;
  visibility: hidden;
  pointer-events: none;
}
.pstudio-measure .pstudio-mitem { overflow: hidden; }
.pstudio-empty { color: var(--muted); padding: 40px; }

/* سربرگ چاپ */
.pq-header {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px 26px;
  border: 1px solid #e3d8c9;
  border-radius: 16px;
  padding: 16px 20px;
  background: linear-gradient(180deg, #fffdfa, #fbf8f2);
}
.pq-header .pqh-cell { display: flex; align-items: center; gap: 8px; font-size: 12.5px; min-height: 28px; }
.pq-header.align-right .pqh-cell { justify-content: flex-start; text-align: right; }
.pq-header.align-center .pqh-cell { justify-content: center; text-align: center; }
.pq-header.align-left .pqh-cell { justify-content: flex-end; text-align: left; }
.pq-header .pqh-cell.align-right { justify-content: flex-start; text-align: right; }
.pq-header .pqh-cell.align-center { justify-content: center; text-align: center; }
.pq-header .pqh-cell.align-left { justify-content: flex-end; text-align: left; }
.pq-header .pqh-cell b { font-weight: 900; white-space: nowrap; }
.pq-header .pqh-blank { flex: 1; border-bottom: 0; min-height: 18px; }
.pq-final-header {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  width: 100%;
  box-sizing: border-box;
  border: var(--pstudio-final-line, 1px) solid #2d2923;
  background: #fff;
}
.pq-final-header .pfh-cell {
  min-height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 8px 10px;
  border-inline-start: var(--pstudio-final-line, 1px) solid #2d2923;
  border-top: var(--pstudio-final-line, 1px) solid #2d2923;
  font-size: 13px;
  font-weight: 800;
  text-align: center;
}
.pq-final-header .pfh-cell:nth-child(-n+3) { border-top: 0; }
.pq-final-header .pfh-cell:nth-child(3n+1) { border-inline-start: 0; }
.pq-final-header .pfh-title {
  grid-column: span 1;
  font-size: 14px;
  font-weight: 950;
}
.pq-final-header .pfh-wide { grid-column: span 3; border-inline-start: 0; color: #9a5a1f; }
.pq-final-header .pfh-custom { color: #181512; }
.pq-final-header b { font-weight: 950; color: #181512; }
.pq-final-header .pfh-cell.align-right { justify-content: flex-start; text-align: right; }
.pq-final-header .pfh-cell.align-center { justify-content: center; text-align: center; }
.pq-final-header .pfh-cell.align-left { justify-content: flex-end; text-align: left; }

/* بلوک سؤال/پاسخ */
.pq-block { position: relative; break-inside: avoid; cursor: grab; }
.pq-block.with-line { border-bottom: 1px solid #d9d2c4; padding-bottom: 14px; }
.pq-block.dragging { opacity: .45; }
.pq-block.pq-drop-hint.before::before,
.pq-block.pq-drop-hint.after::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  height: 3px;
  border-radius: 99px;
  background: var(--orange);
}
.pq-block.pq-drop-hint.before::before { top: -6px; }
.pq-block.pq-drop-hint.after::after { bottom: -6px; }
.pq-question-row {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr);
  align-items: start;
  gap: 10px;
}
.pq-question-content { min-width: 0; }
.pq-section-title {
  break-inside: avoid;
  display: flex;
  align-items: center;
  gap: 10px;
  color: #9a5a1f;
  font-size: 12px;
  font-weight: 950;
}
.pq-section-title::before,
.pq-section-title::after {
  content: "";
  height: 1px;
  flex: 1;
  background: #eadfd1;
}
.pq-section-title span {
  padding: 5px 12px;
  border: 1px solid #eadfd1;
  border-radius: 999px;
  background: #fff8ef;
}
.pstudio-page.is-final .pq-section-title {
  display: grid;
  grid-template-columns: var(--pstudio-final-side, 42px) minmax(0, 1fr) var(--pstudio-final-side, 42px);
  gap: 0;
  color: #181512;
  border-inline: var(--pstudio-final-line, 1px) solid #2d2923;
  border-bottom: var(--pstudio-final-line, 1px) solid #2d2923;
}
.pstudio-page.is-final .pq-section-title::before,
.pstudio-page.is-final .pq-section-title::after { display: none; }
.pstudio-page.is-final .pq-section-title span {
  grid-column: 1 / -1;
  border: 0;
  border-radius: 0;
  background: #f7f4ee;
  padding: 8px 12px;
  text-align: center;
}
.pq-no {
  width: 24px;
  height: 24px;
  margin-inline: auto;
  margin-top: 1px;
  display: grid;
  place-items: center;
  border: 1px solid #f0d3b4;
  border-radius: 8px;
  background: #fff3e8;
  color: #9a5a1f;
  font-weight: 900;
  font-size: 11.5px;
  line-height: 1;
  flex: none;
}
/* شناسنامهٔ سؤال: متنی (عین حالت امتحان نهایی)، بدون چیپ/پیل */
.pq-meta-row {
  display: block;
  direction: rtl;
  text-align: right;
  margin-top: 10px;
  color: #6c6355;
  line-height: 1.9;
  white-space: normal;
  overflow-wrap: anywhere;
}
.pq-meta-row i {
  font-style: normal;
  display: inline;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: inherit;
  font-size: 10.5px;
  font-weight: 800;
}
.pq-meta-row i + i::before { content: " | "; color: #b7aa99; }
.pq-body { font-size: 14px; line-height: 2.1; }
.pq-body .sq-content-image { width: 100%; height: auto; border-radius: 0; }
.pq-block.pq-has-body-visual .pq-body .mkfig { max-width: 70%; }
.pq-block.pq-has-body-visual .pq-body .mkfig img {
  width: 100%;
  height: auto;
  max-height: 52mm;
  object-fit: contain;
}
/* سؤالِ تمام‌تصویری: صورت و گزینه‌ها هر دو داخل همان تصویرند، پس باید تمامِ عرضِ
   ستونِ متن را بگیرد. سقفِ ارتفاع فقط برای تصویرِ غیرعادیِ کشیده است تا یک سؤال
   کلِ صفحه را نبلعد؛ تصویرِ معمولی هرگز به آن نمی‌رسد. */
.pq-block.pq-has-body-visual .pq-body > .sq-content-image {
  width: 100%;
  max-height: 168mm;
  object-fit: contain;
}
/* دو عددِ اینجا مستقیم از عرضِ ستونِ گزینه کم می‌کنند، پس هر کدام سخاوتمند باشد
   یک گزینهٔ یک‌سطری را بی‌دلیل دو سطری می‌کند.

   حساب و کتابِ سنجیده‌شده روی A4: عرضِ صفحه ۷۹۴px، حاشیه ۵۷px → ۶۸۰px محتوا؛
   ستونِ شمارهٔ سؤال (`pq-question-row`) هم ~۲۸px می‌برد → ~۶۵۲px برای خودِ ردیف.
   متنِ گزینه ۱۳٫۳px × `--q-scale` = ۱۶٫۲px است و گزینهٔ ۷۴نویسه‌ایِ نمونه ۴۲۹px
   عرض می‌خواهد. با کفِ ۲۷٪ و ناودانِ ۹mm، ستونِ متن ۴۱۷px می‌شد — ۱۲px کم، و
   دقیقاً همین باعث می‌شد آخرین کلمهٔ گزینه تنها به سطر دوم بیفتد:
   • کفِ ۲۷٪ ستونِ شکل، شکلِ باریک‌تر از آن را باد می‌کرد و همان درصدِ اضافه را از
     ستونِ گزینه‌ها برمی‌داشت (شکلِ ۱۵٪ → ۲۷٪ یعنی ۸۲px کمتر برای گزینه‌ها).
     کفِ ۲۰٪ (≈۳۶mm روی A4) هنوز خوانا است.
   • ۹mm ناودان برای دفترچه زیاد است و همان «فاصلهٔ زیاد تا عکس» است که دیده
     می‌شد؛ ۴mm جداییِ دیداری را نگه می‌دارد و ۱۹px به ستونِ گزینه‌ها برمی‌گرداند. */
.pq-side-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) clamp(20%, var(--pq-side-fig, 32%), 46%);
  align-items: start;
  gap: 5mm 4mm;
  font-size: 14px;
  line-height: 2.1;
  margin-top: 0;
  break-inside: avoid;
  page-break-inside: avoid;
}
.pq-side-layout.is-figure-start { grid-template-columns: clamp(20%, var(--pq-side-fig, 32%), 46%) minmax(0, 1fr); }
.pq-side-layout.is-figure-start .pq-side-figure { grid-column: 1; grid-row: 1; }
.pq-side-layout.is-figure-start .pq-side-options { grid-column: 2; grid-row: 1; }
.pq-side-options { min-width: 0; display: block; align-self: start; }
.pq-side-options .pq-options {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  width: 100%;
  gap: 0;
  margin-top: 0;
}
#pstudioPreview .pq-side-options .pq-options,
.pstudio-measure .pq-side-options .pq-options { margin-top: 0; }
.pq-side-options .pq-option { flex: none; min-height: 0; align-items: baseline; line-height: 2.1; }
.pq-side-figure { min-width: 0; display: grid; place-items: start center; }
.pq-side-figure .mkfig { width: 100% !important; max-width: 100%; margin: 0; }
/* جدولِ کناری: ستونش محتوامحور است (همان قاعدهٔ `.sq-side-layout.is-table`).
   با درصدِ ثابت، جدولی که در کارتِ سایت یک‌خطی بود در ستونِ باریکِ A4 دوخطی
   می‌شد و ارتفاع ردیف‌ها تقریباً دو برابر. */
.pq-side-layout.is-table { grid-template-columns: minmax(26%, 1fr) minmax(var(--pq-side-fig, 30%), max-content); }
.pq-side-layout.is-table.is-figure-start { grid-template-columns: minmax(var(--pq-side-fig, 30%), max-content) minmax(26%, 1fr); }
.pq-side-figure > .pq-body { margin: 0; }
.pq-side-figure > .mktable,
.pq-side-figure .mktable { width: 100% !important; max-width: 100%; margin: 0; }
.pq-side-figure .mkfig img {
  display: block;
  width: 100%;
  height: auto;
  max-height: 58mm;
  object-fit: contain;
}
.pq-extra-space {
  border-bottom: 1px dashed #ded4c6;
  margin-top: 10px;
}
/* ابزار تنظیم فضای پاسخ (فقط حالت آزمون): با بردن موس روی شمارهٔ سؤال آشکار می‌شود */
.pq-no-wrap {
  position: relative;
  align-self: start;
  justify-self: center;
}
/* Derived image baseline: relative positioning preserves the question's measured
   height. The same explicit CSS-pixel offset is cloned into server PDF output. */
.pq-visual-first .pq-no.pq-image-number-aligned {
  position: relative;
  top: var(--pq-image-no-shift, 0px);
}
.pq-space-tools {
  display: grid;
  gap: 5px;
}
.pq-space-tools.is-hover {
  position: absolute;
  top: 100%;
  left: 50%;
  z-index: 6;
  padding-top: 5px;
  transform: translateX(-50%) scale(.94);
  transform-origin: top center;
  opacity: 0;
  pointer-events: none;
  transition: opacity .13s ease, transform .13s ease;
}
.pq-no-wrap:hover .pq-space-tools.is-hover,
.pq-space-tools.is-hover:hover,
.pq-space-tools.is-hover.is-pinned,
.pq-no-wrap:focus-within .pq-space-tools.is-hover {
  opacity: 1;
  pointer-events: auto;
  transform: translateX(-50%) scale(1);
}
.pq-space-tools button {
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  border: 1px solid #cfc4b5;
  border-radius: 8px;
  background: #fff;
  color: #2d2923;
  font: inherit;
  font-size: 17px;
  font-weight: 900;
  line-height: 1;
  box-shadow: 0 4px 10px rgba(50,39,29,.14);
  cursor: pointer;
}
.pq-space-tools button:hover {
  border-color: var(--orange);
  color: var(--orange);
}
.pq-final-block {
  width: 100%;
  box-sizing: border-box;
  border-inline: var(--pstudio-final-line, 1px) solid #2d2923;
  border-bottom: var(--pstudio-final-line, 1px) solid #2d2923;
  padding: 0;
  background: #fff;
}
/* اولین بلوکِ هر صفحه (وقتی جدول به صفحهٔ بعد می‌رود) خطِ بالایی خودش را می‌گیرد تا جدول باز نماند */
.pstudio-page.is-final .pstudio-page-inner > .pq-final-block:first-child,
.pstudio-page.is-final .pstudio-page-inner > .pq-section-title:first-child {
  border-top: var(--pstudio-final-line, 1px) solid #2d2923;
}
.pq-final-table-head {
  display: grid;
  grid-template-columns: var(--pstudio-final-side, 42px) minmax(0, 1fr) var(--pstudio-final-side, 42px);
  width: 100%;
  box-sizing: border-box;
  border: var(--pstudio-final-line, 1px) solid #2d2923;
  background: #f7f4ee;
  color: #181512;
  font-size: 12px;
  font-weight: 950;
  text-align: center;
}
.pq-final-table-head span {
  min-height: 34px;
  display: grid;
  place-items: center;
  padding: 5px;
  border-inline-end: var(--pstudio-final-line, 1px) solid #2d2923;
}
.pq-final-table-head span:last-child { border-inline-end: 0; }
.pq-final-header + .pq-final-table-head { border-top: 0; }
.pq-final-grid {
  display: grid;
  grid-template-columns: var(--pstudio-final-side, 42px) minmax(0, 1fr) var(--pstudio-final-side, 42px);
  align-items: stretch;
  min-height: 96px;
}
.pq-final-no,
.pq-mark {
  display: grid;
  justify-items: center;
  align-items: start;
  /* شماره و بارم به بالای سلول می‌چسبند تا کنارِ شروعِ متنِ سؤال بنشینند (هم‌ترازِ padding محتوا) */
  padding: 14px 4px 6px;
  border-inline-start: var(--pstudio-final-line, 1px) solid #2d2923;
  color: #181512;
  font-size: 12px;
  font-weight: 950;
}
.pq-mark { align-items: center; padding: 6px 4px; }
.pq-final-no { border-inline-start: 0; border-inline-end: var(--pstudio-final-line, 1px) solid #2d2923; }
.pq-final-grid .pq-question-content { padding: 14px 14px 12px; }
.pq-final-block .pq-meta-row {
  display: block;
  direction: rtl;
  text-align: right;
  padding: 0;
  margin-top: 8px;
  color: #6c6355;
  line-height: 1.9;
  white-space: normal;
  overflow-wrap: anywhere;
}
.pq-final-block .pq-meta-row i {
  display: inline;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: inherit;
  font-size: 10.5px;
  font-weight: 800;
}
.pq-final-block .pq-meta-row i + i::before { content: " | "; color: #b7aa99; }
/* چیدمانِ گزینه در دفترچهٔ چاپی همان قاعدهٔ صفحه است: کوتاه‌ها یک ردیفِ چهارتایی،
   متوسط‌ها دو ردیفِ دوتایی، متنِ بلند چهار ردیفِ تمام‌عرض، و چهار نمودار جدولِ ۲×۲. */
/* گزینه‌ها ادامهٔ مستقیم صورت سؤال‌اند و هیچ سطر خالی میان آن‌ها قرار نمی‌گیرد.
   فاصلهٔ ردیف‌های خودِ گزینه با lh تعریف می‌شود تا با تغییر فونت ثابت بماند. */
.pq-options { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; column-gap: 18px; row-gap: .35lh; margin-top: 0; font-size: 14px; line-height: 2.1; }
/* پیش‌نمایش و اندازه‌گیرِ مخفی باید همان فاصلهٔ صفرِ فایل PDF را صریحاً بگیرند؛
   وگرنه پیش‌نمایشِ باز یا یک override صفحه می‌تواند فاصلهٔ قدیمی را نشان دهد و
   ارتفاعی متفاوت از صفحه‌ای که برای PDF clone می‌شود اندازه بگیرد. */
#pstudioPreview .pq-options,
.pstudio-measure .pq-options { margin-top: 0; }
.pq-options.is-row { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.pq-options.is-two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.pq-options.is-stack { grid-template-columns: minmax(0, 1fr); row-gap: 0; }
.pq-option { display: flex; align-items: baseline; gap: 6px; font-size: 13.5px; line-height: 2.1; }
.pq-option > span { min-width: 0; line-height: 2.1; }
.pq-option > span > :first-child { margin-top: 0; }
.pq-option > span > :last-child { margin-bottom: 0; }
.pq-option > span > p { margin-block: 0; line-height: 2.1; }
.pq-option .katex-display { margin: 0; line-height: 2.1; }
.pq-option .mkfig:not([data-mk-figw]) { width: 100% !important; }
.pq-option .mkfig { max-width: 100%; margin: 3px auto; }
.pq-option img { display: block; width: auto; max-width: 100%; height: auto; max-height: 36mm; margin: 0 auto; object-fit: contain; }
/* شمارهٔ گزینه در دفترچه سیاهِ ساده است — نه چیپ، نه رنگ، نه درشت.
   `inherit` یعنی هم‌وزنِ خودِ گزینه؛ در پاسخنامه که گزینهٔ صحیح ۸۰۰ می‌شود،
   شماره‌اش هم با آن هماهنگ می‌ماند. */
.pq-option b { font-weight: inherit; color: inherit; }
/* گزینهٔ درست در دفترچه فقط پررنگ می‌شود، بدون خط زیرِ شماره: در برگهٔ چاپ رنگِ
   شماره به رنگِ متن برمی‌گردد و از آن خط، فقط یک خط‌تیرهٔ سبزِ بی‌معنا زیر «(۳»
   می‌ماند. خودِ پاسخ با ردیفِ «پاسخ صحیح: …» زیر سؤال چاپ می‌شود. */
.pq-option.is-correct { color: #14775f; font-weight: 800; }
.pq-answer-line { margin-top: 10px; font-size: 12.5px; color: #14775f; font-weight: 800; }
.pq-answer-chip {
  font-size: 11.5px;
  font-weight: 800;
  color: #14775f;
  background: #e9f6f1;
  border-radius: 99px;
  padding: 4px 11px;
}
.pq-answer-top {
  min-height: 24px;
  display: flex;
  align-items: center;
  margin-bottom: 8px;
}
.pa-block .pq-no { margin-top: 0; }
/* جداکنندهٔ تزئینی بین پاسخ‌های تشریحی؛ خط نازک اما کامل و بدون محوشدن در کناره‌ها */
/* ⚠️ ضخامتِ خط حتماً عددِ صحیح بماند. با ۱٫۵px بعضی جداکننده‌ها محسوس
   کلفت‌تر از بقیه درمی‌آمدند: نیم‌پیکسل هرگز روی یک ردیفِ پیکسلیِ کامل
   نمی‌نشیند، و چون هر جداکننده در ارتفاعِ متفاوتی از صفحه است، یکی یک ردیفِ
   پررنگ می‌گرفت و دیگری دو ردیفِ کم‌رنگ. با ۱px مقدارِ جوهرِ هر خط یکسان
   می‌شود؛ تیزیِ لبه هنوز به موقعیتِ متنِ بالای آن وابسته است و با CSS مهار
   نمی‌شود (ارتفاعِ فردِ کادر هم امتحان شد و کمکی نکرد). */
.pq-answer-divider {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin: 2px 0 18px;
  color: #9a5a1f;
  break-inside: avoid;
}
.pq-answer-divider .pad-line {
  flex: 1;
  height: 1px;
  max-width: none;
  border-radius: 0;
  background: #9a5a1f;
  box-shadow: none;
}
.pq-answer-divider .pad-orn {
  flex: none;
  width: 6px;
  height: 6px;
  transform: rotate(45deg);
  border: 1px solid #9a5a1f;
  border-radius: 2px;
  background: #fff8ef;
  box-shadow: 0 0 0 3px #fff;
}
/* برچسبِ وسط دیگر چیپِ کادردار نیست: خودِ لوگوتایپ می‌نشیند تا در چاپ خوانا
   باشد. کادر و پس‌زمینه برداشته شد و اندازه بزرگ‌تر شد. */
.pq-answer-divider .pad-label {
  height: 26px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}
.pq-answer-divider .pad-logotype {
  display: block;
  width: 53px;
  height: 24px;
  background: url("/assets/logotype.svg?v=4") center / contain no-repeat;
}
/* روی اولین پاسخِ هر صفحه، جداکننده در بالای صفحه نیاید */
.pstudio-page-inner > .pa-block:first-child .pq-answer-divider { display: none; }
/* جداکنندهٔ چسبیده به عنوانِ بخش هم اگر اول صفحه افتاد، حذف شود */
.pstudio-page-inner > .pq-answer-divider:first-child { display: none; }
.pq-explain { margin-top: 10px; padding: 12px 14px; background: #f8f6f1; border-radius: 12px; font-size: 13px; line-height: 2; }
.pq-explain > b { display: block; margin-bottom: 6px; font-size: 12px; }
.pq-empty { color: #9a9385; }
.pstudio-page .sq-explanation-columns {
  border-color: #8f8980;
  border-radius: 0;
  margin-top: 4px;
  overflow: visible;
}
.pstudio-page .sq-explanation-column {
  gap: 0;
  padding: 7px;
}
/* خطِ وسط مرزِ ۱px ِ ستونِ دوم است و ستون‌ها تا تهِ ردیف کشیده می‌شوند: پاسخِ
   یک‌تکه ستون دوم را خالی می‌گذارد و با align-items:start ارتفاعش صفر و خط
   نامرئی می‌شد. یک نوارِ ۱٫۲۵px ِ مطلق روی ۵۰٪ هم امتحان شد، ولی کروم آن را بسته
   به جای ۵۰٪ گاهی ۱ و گاهی ۲ پیکسل می‌کشید و خطِ وسطِ بعضی پاسخ‌ها دوبرابرِ
   کادرِ دور چاپ می‌شد (مهر ۱۴۰۵)؛ مرز همیشه مثلِ کادرِ دور گرد می‌شود. */
.pstudio-page .sq-explanation-columns { align-items: stretch; }
.pstudio-page .sq-explanation-column + .sq-explanation-column { border-inline-start: 1px solid #69645e; }
.pstudio-page .sq-explanation-image .sq-content-image { border-radius: 0; }
.pa-block.answer-layout-vertical .pq-question-content { min-width: 0; }

@media (max-width: 720px) {
  .explanation-layout-picker { grid-template-columns: 1fr; }
  .explanation-layout-options { grid-template-columns: 1fr; }
}

/* پاسخنامه کلیدی */
.pstudio-card {
  border: 1px solid #e9dfd1;
  border-radius: 14px;
  background: linear-gradient(180deg, #fffdfa, #fff);
  padding: 12px;
  box-shadow: 0 8px 24px rgba(65,47,29,.05);
}
.pstudio-section-title {
  direction: rtl;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 7px;
  margin-bottom: 8px;
  border-bottom: 1px solid #eee6da;
}
.pstudio-section-title b {
  color: #9a5a1f;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: .2px;
}
.pstudio-section-title span {
  color: var(--ink);
  font-size: 13px;
  font-weight: 900;
}
.pkey-title {
  margin-bottom: 9px;
  padding-bottom: 8px;
  border-bottom: 1px solid #dcd4c9;
  color: #25211d;
  font-size: 13px;
  font-weight: 900;
  line-height: 1.7;
  text-align: center;
}
.pkey-card {
  padding: 11px;
  border-color: #e3d8ca;
  border-radius: 14px;
  background: #fffdfa;
  box-shadow: 0 4px 14px rgba(47, 37, 25, .035);
}
.pkey-card .psheet-columns { gap: 5px; }
.pkey-card .psheet-col { gap: 3px; }
.pkey-card .psheet-group { gap: 0; padding: 2px; border-color: #e5dbcf; border-radius: 7px; background: #fff; }
.pkey-card .pbs-row { min-height: 16px; border-radius: 2px; padding: 0; font-size: 9px; }
.pkey-card .pbs-row b { height: 14px; border-radius: 0; background: transparent; }
.pkey-card .pbs-row i {
  height: 14px;
  box-sizing: border-box;
  display: grid;
  place-items: center;
  /* رقمِ داخل حباب یک اندازه کوچک‌تر از شمارهٔ سؤال است و کمی بالاتر دیده می‌شود؛
     این پدینگ آن را پایین می‌آورد تا با شمارهٔ سمت راست هم‌سطح باشد.
     اندازه‌گیری‌شده (کرومیوم، همین قواعد): هر ۱px پدینگ = ۰٫۵px جابه‌جاییِ رقم.
     با ۰ کرسیِ دو رقم دقیقاً یکی است (اختلاف ۰٫۰۶px) و رقمِ حباب کمی بالا حس
     می‌شود؛ ۱px همان جبرانِ نیم‌پیکسلیِ لازم است. ۲px دو برابرِ لازم بود و رقم را
     پایین می‌انداخت. تست: test_print_output_contrast.mjs */
  padding: 1px 0 0;
  border-color: #bd8a61;
  border-radius: 3px;
  line-height: 1;
  text-align: center;
}
.pkey-card .pbs-row i.is-correct { border-color: #ad5b24; background: #ad5b24; }
/* پاسخنامه کلیدی: کارت تمامِ ارتفاع صفحه را می‌گیرد و ردیف‌های ستونِ پر (۵۰تایی) یکنواخت تا پایین کش می‌آیند */
.pstudio-page.is-key { height: 1123px; display: flex; flex-direction: column; }
.pstudio-page.is-key .pstudio-page-inner { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.pstudio-page.is-key .pkey-card { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.pstudio-page.is-key .pkey-card .psheet-columns { flex: 1; min-height: 0; align-items: stretch; }
.pstudio-page.is-key .pkey-card .psheet-col { grid-template-rows: repeat(5, minmax(0, 1fr)); }
.pstudio-page.is-key .pkey-card .psheet-group { grid-template-rows: repeat(10, minmax(0, 1fr)); }
.pstudio-page.is-key .pkey-card .pbs-row { min-height: 0; }
.pset-two.single { grid-template-columns: 1fr; }
.psheet-columns {
  direction: ltr;
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 7px;
  align-items: start;
}
.psheet-col {
  display: grid;
  gap: 5px;
  min-width: 0;
}
.psheet-group {
  display: grid;
  gap: 1px;
  padding: 3px;
  border: 1px solid #e9dfd1;
  border-radius: 10px;
  background: #fffdfa;
  break-inside: avoid;
}
.pkey-grid { direction: ltr; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px 10px; }
.pkey-cell {
  direction: ltr;
  display: grid;
  grid-template-columns: 19px minmax(0, 1fr);
  align-items: center;
  gap: 3px;
  min-height: 15px;
  border-radius: 6px;
  padding: 1px;
  background: #fff;
  font-size: 8.5px;
}
.pkey-cell b {
  height: 13px;
  display: grid;
  place-items: center;
  border-radius: 4px;
  background: #f4f0ea;
  color: #6c6355;
  font-weight: 900;
}
.pkey-cell i {
  height: 13px;
  display: grid;
  place-items: center;
  border-radius: 4px;
  background: #e9f6f1;
  color: #14775f;
  font-style: normal;
  font-weight: 900;
}

/* پاسخبرگ خام */
.pbs-grid { direction: ltr; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 9px 14px; }
.pbs-row {
  direction: ltr;
  display: grid;
  grid-template-columns: 19px minmax(0, 1fr);
  align-items: center;
  gap: 3px;
  min-height: 15px;
  padding: 1px;
  border-radius: 6px;
  background: #fff;
  font-size: 8.5px;
}
.pbs-row b {
  height: 13px;
  display: grid;
  place-items: center;
  border-radius: 4px;
  background: #f4f0ea;
  color: #5e584f;
  text-align: center;
  font-weight: 900;
}
.pbs-row span {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 2px;
}
.pbs-row i {
  min-width: 0;
  height: 13px;
  display: grid;
  place-items: center;
  border: 1px solid #b57949;
  border-radius: 999px;
  background: #fff;
  color: #2d2923;
  font-style: normal;
  font-size: 8px;
  font-weight: 800;
}
.pbs-row i.is-correct {
  border-color: #9a5a1f;
  background: #9a5a1f;
  color: #fff;
}

/* ===== پاسخبرگ هوشمند (آمادهٔ اسکن OMR) ===== */
.psheet-smart {
  position: relative;
  border: 1.5px solid #2d2923;
  border-radius: 6px;
  background: #fff;
  padding: 22px;
}
/* نشانگرهای گوشه: مربع‌های مشکیِ ثابت برای صاف‌کردن تصویر در اسکن */
.psheet-fid {
  position: absolute;
  width: 15px;
  height: 15px;
  background: #111;
}
.psheet-fid.tl { top: 7px; right: 7px; }      /* RTL: راست‌بالا */
.psheet-fid.tr { top: 7px; left: 7px; }
.psheet-fid.bl { bottom: 7px; right: 7px; }
.psheet-fid.br { bottom: 7px; left: 7px; }
.psheet-head {
  display: flex;
  align-items: stretch;
  gap: 16px;
  padding: 4px 14px 12px;
  margin-bottom: 12px;
  border-bottom: 2px solid #2d2923;
}
.psheet-head-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 5px; }
.psheet-title { font-size: 15px; font-weight: 950; color: #181512; }
.psheet-setname { font-size: 12.5px; font-weight: 800; color: #4a443c; }
.psheet-meta { display: flex; gap: 18px; font-size: 11px; color: #6c6355; font-weight: 700; }
.psheet-meta b { color: #181512; font-weight: 900; }
.psheet-userline {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  margin-top: 4px;
  font-size: 11.5px;
  font-weight: 800;
  color: #4a443c;
}
.psheet-userline .psheet-write { flex: 1; border-bottom: 1.5px dotted #8c8272; min-height: 17px; }
.psheet-qr {
  flex: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}
.psheet-qr-box {
  width: 78px;
  height: 78px;
  display: grid;
  place-items: center;
  border: 1.5px solid #2d2923;
  border-radius: 4px;
  background:
    repeating-linear-gradient(45deg, #f0ece5 0 4px, #fff 4px 8px);
  color: #9a938a;
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 1px;
}
.psheet-qr small { font-size: 8.5px; color: #6c6355; font-weight: 700; }
.psheet-bubbles { margin-top: 2px; }

/* ===== پاسخبرگ هوشمند: hub دانلود/آپلود + بازبینی اسکن ===== */
.omr-hub { display: grid; gap: 14px; }
.omr-hub-lead { color: var(--muted); font-size: 13px; line-height: 1.9; margin: 0; }
.omr-hub-note { margin: -4px 0 0; color: var(--muted); font-size: 12px; }
.omr-hub-meta { display: flex; gap: 20px; font-size: 12.5px; color: var(--muted); }
.omr-hub-meta b { color: var(--ink); font-weight: 900; }
/* پاسخبرگ چندبرگه‌ای (مجموعهٔ بیش از ۳۰۰ سؤال تستی): بازهٔ هر برگه */
.omr-hub-parts {
  margin: 0; padding: 9px 12px; border-radius: 12px; background: var(--panel-soft);
  border: 1px solid var(--line); font-size: 12px; line-height: 1.9; color: var(--muted);
}
.omr-hub-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.omr-hub-status {
  padding: 10px 14px; border-radius: 12px; font-size: 12.5px; font-weight: 800;
  background: #f3f0e9; color: #6c6355;
}
.omr-hub-status[data-tone="ok"] { background: #eaf8f4; color: #168878; }
.omr-hub-status[data-tone="error"] { background: #fdeceb; color: #c24a3a; }
.omr-hub-status[data-tone="warn"] { background: #fff6df; color: #9a6a13; }
.omr-hub-status ul { margin: 0; padding-inline-start: 20px; line-height: 1.85; }

/* مسیر چاپ و اسکن برای شرکت‌کننده: هر گام یک عمل اصلی دارد. */
.exam-print-hub { gap: 16px; padding-block: 18px 22px; }
.exam-print-intro {
  padding: 17px 20px; border: 1px solid #eddfc8; border-radius: 18px;
  background: linear-gradient(125deg, #fff8ed, #fffdf9 72%);
}
.exam-print-intro > span { display: block; margin-bottom: 5px; color: #a55c2b; font-size: 11px; font-weight: 900; }
.exam-print-intro p { margin: 0; color: #4c433a; font-size: 13px; line-height: 1.85; }
.exam-print-meta { flex-wrap: wrap; gap: 7px 15px; }
.exam-print-meta span { padding: 5px 9px; border-radius: 8px; background: #f7f4ef; white-space: nowrap; }
.exam-print-steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.exam-print-step {
  display: flex; align-items: flex-start; gap: 10px; min-width: 0; min-height: 175px;
  padding: 14px; border: 1px solid #e9e2d8; border-radius: 16px; background: #fff;
  box-shadow: 0 5px 16px rgba(43, 34, 24, .035);
}
.exam-print-step-no {
  display: grid; place-items: center; flex: none; width: 27px; height: 27px;
  border-radius: 9px; background: #f7e7d5; color: #9a552c; font-size: 13px; font-weight: 900;
}
.exam-print-step > div { display: flex; flex-direction: column; align-items: flex-start; min-width: 0; min-height: 100%; }
.exam-print-step b { color: #292722; font-size: 13px; }
.exam-print-step p { margin: 5px 0 12px; color: #736b63; font-size: 11.5px; line-height: 1.7; }
.exam-print-step button { margin-top: auto; max-width: 100%; font-size: 11.5px; white-space: normal; text-align: center; }
.exam-print-upload { border-style: dashed; border-color: #b9cfc6; background: #f8fcfa; transition: border-color .15s ease, background .15s ease; }
.exam-print-upload.drag-over { border-color: #288a6b; background: #e9f7f1; }
.exam-print-upload.is-busy { opacity: .65; pointer-events: none; }
.exam-print-upload .exam-print-step-no { background: #e4f2eb; color: #23805f; }
.exam-print-file-note { margin: -6px 2px 0; color: #746c61; font-size: 11px; line-height: 1.75; }
.exam-print-manual { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 12px 15px; border: 1px solid #eae7e1; border-radius: 13px; background: #fbfaf7; }
.exam-print-manual b, .exam-print-manual small { display: block; }
.exam-print-manual b { font-size: 12.5px; }
.exam-print-manual small { margin-top: 3px; color: #77716a; font-size: 11px; line-height: 1.6; }
.exam-print-manual button { flex: none; }
.exam-scan-uncertain { background: #fff4de; border-radius: 7px; }
.exam-scan-uncertain .omr-no { color: #9a6a13; }
@media (max-width: 760px) {
  .exam-print-steps { grid-template-columns: 1fr; }
  .exam-print-step { min-height: 0; }
  .exam-print-step > div { min-height: 0; }
  .exam-print-step button { margin-top: 4px; }
  .exam-print-manual { align-items: flex-start; flex-direction: column; }
}

.omr-review { display: grid; gap: 12px; }
.omr-warn {
  padding: 11px 14px; border-radius: 12px; font-size: 12.5px; font-weight: 800;
  background: #fff6df; color: #9a6a13; border: 1px solid #f0d9a6;
}
.omr-review-hint { color: var(--muted); font-size: 12px; line-height: 1.8; }
.omr-result-summary {
  display: flex; flex-wrap: wrap; gap: 10px 16px;
  padding: 12px 14px; border-radius: 14px; background: #faf7f1; border: 1px solid #ece4d7;
  font-size: 13px; font-weight: 900;
}
.omr-result-summary .ok { color: #168878; }
.omr-result-summary .bad { color: #c24a3a; }
.omr-legend { display: flex; flex-wrap: wrap; gap: 7px 16px; font-size: 11.5px; color: var(--muted); font-weight: 700; }
.omr-legend span { display: inline-flex; align-items: center; gap: 6px; }
.omr-legend .dot { width: 10px; height: 10px; border-radius: 50%; }
.omr-legend .dot.ok { background: #3fae87; }
.omr-legend .dot.bad { background: #e0654f; }
.omr-legend .dot.na { background: #cdb9a1; }
.omr-legend .ring { width: 12px; height: 12px; border-radius: 50%; border: 2px solid #168878; box-sizing: border-box; }

/* شبکهٔ برگه‌مانند: باکس‌های ۱۰‌تایی در تا ۶ ستون (مثل خودِ پاسخبرگ) */
.omr-sheet-grid {
  direction: ltr;
  display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: center;
  gap: 12px; max-height: 60vh; overflow: auto; overscroll-behavior: contain; padding: 2px;
}
.omr-col {
  direction: rtl;
  display: flex; flex-direction: column; gap: 12px;
  flex: 0 1 162px; min-width: 150px; max-width: 166px;
}
.omr-block { border: 1px solid #ead9c2; border-radius: 12px; background: #fffdfa; overflow: hidden; }
.omr-block-head {
  padding: 5px 10px; text-align: center; font-size: 11px; font-weight: 900;
  color: var(--orange); background: #fbf3e8; border-bottom: 1px solid #ead9c2;
}
.omr-line {
  direction: ltr;
  display: flex; align-items: center; gap: 6px; padding: 4px 8px;
}
.omr-block .omr-line:not(:last-child) { border-bottom: 1px solid #f4ecdf; }
.omr-no { flex: none; width: 22px; text-align: center; font-size: 11.5px; font-weight: 900; color: #5e584f; }
.omr-picks { direction: ltr; display: flex; gap: 5px; }
.omr-b {
  width: 24px; height: 24px; flex: none; box-sizing: border-box;
  display: grid; place-items: center; padding: 0; line-height: 1;
  border: 1.5px solid #d9cfbf; border-radius: 50%; background: #fff;
  color: #6a6154; font: inherit; font-size: 11.5px; font-weight: 800;
}
button.omr-b { cursor: pointer; transition: background .12s ease, border-color .12s ease, color .12s ease; }
button.omr-b:hover { border-color: var(--orange); }
.omr-b.on { background: #9a5a1f; border-color: #9a5a1f; color: #fff; }         /* انتخاب‌شده در بازبینی */

.omr-line.res {
  width: 100%; border: 0; border-inline-start: 3px solid transparent;
  padding-inline-start: 7px; border-radius: 8px; background: transparent;
  font: inherit; color: var(--ink); cursor: pointer; text-align: start;
}
.omr-line.res:hover { background: #fbf3e8; }
.omr-line.res.omr-correct { border-inline-start-color: #3fae87; }
.omr-line.res.omr-wrong { border-inline-start-color: #e0654f; }
.omr-line.res.omr-blank { border-inline-start-color: #d9cabb; }
.omr-line.res.omr-correct .omr-no { color: #168878; }
.omr-line.res.omr-wrong .omr-no { color: #c24a3a; }
.omr-line.res.omr-blank .omr-no { color: #a2917c; }
.omr-b.picked { background: #9a5a1f; border-color: #9a5a1f; color: #fff; }       /* گزینهٔ کاربر */
.omr-b.key { border-color: #168878; box-shadow: 0 0 0 1.5px #168878 inset; color: #168878; } /* گزینهٔ صحیح */
.omr-b.picked.key { background: #168878; border-color: #168878; color: #fff; box-shadow: none; }

.omr-review-foot { display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.omr-score { font-size: 12.5px; color: var(--muted); font-weight: 700; }
.omr-score b { font-weight: 900; }
.omr-score b.ok { color: #168878; }
.omr-score b.bad { color: #c24a3a; }
.omr-foot-btns { display: inline-flex; gap: 9px; }
@media (max-width: 900px) {
  .omr-sheet-grid { max-height: none; }
  .omr-col { max-width: none; }
}

/* ===== ماژول آزمون — فاز ۱ ===== */
.exam-head { margin-bottom: 4px; }
.exam-hub-tabs {
  display: flex; flex-wrap: wrap; gap: 6px; justify-content: center;
  width: fit-content; max-width: 100%;
  margin: 6px auto 18px; padding: 6px;
  border: 1px solid #eee5da; border-radius: 16px;
  background: #fffdfa;
  box-shadow: 0 12px 28px rgba(65,47,29,.06);
}
.exam-hub-tab {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 10px 20px;
  border: 0; border-radius: 11px; background: transparent;
  font: inherit; font-size: 13px; font-weight: 800; color: #6a6154;
  cursor: pointer;
  transition: background .16s ease, color .16s ease, box-shadow .16s ease, transform .16s var(--ease-soft);
}
.exam-hub-tab svg { width: 16px; height: 16px; opacity: .7; transition: opacity .16s ease; }
.exam-hub-tab:hover { background: #fff5eb; color: var(--orange); }
.exam-hub-tab:hover svg { opacity: 1; }
.exam-hub-tab.on {
  background: var(--orange); color: #fff;
  box-shadow: 0 8px 18px rgba(255,95,31,.22);
}
.exam-hub-tab.on svg { opacity: 1; }
.exam-panel {
  display: grid; gap: 16px; padding: 18px;
  border: 1px solid #ece4d7; border-radius: 18px;
  background: rgba(255,255,255,.82); box-shadow: 0 16px 36px rgba(90,70,40,.06);
}
.exam-panel-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.exam-panel-head h2 { margin: 0; font-size: 18px; }
.exam-panel-head p { margin: 4px 0 0; color: var(--muted); font-size: 12.5px; font-weight: 700; line-height: 1.9; }
.exam-manage-kpis { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.exam-manage-kpis span { display: inline-flex; align-items: center; gap: 5px; padding: 4px 9px; border: 1px solid #ece4d7; border-radius: 999px; background: #fff; color: #766b5e; font-size: 10.5px; font-weight: 800; }
.exam-manage-kpis b { color: var(--orange); font-size: 12px; }
.exam-empty { width: 100%; padding: 34px; }
.exam-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin: 4px 0 16px; }
.exam-tab {
  padding: 8px 16px; border: 1px solid #e5dccb; border-radius: 999px; background: rgba(255,255,255,.72);
  font: inherit; font-size: 12.5px; font-weight: 800; color: #6a6154; cursor: pointer;
  transition: background .14s ease, border-color .14s ease, color .14s ease;
}
.exam-tab:hover { border-color: var(--orange); }
.exam-tab.on { background: var(--orange); border-color: var(--orange); color: #fff; }
.exam-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: 14px; }
.exam-card {
  display: grid; gap: 10px; align-content: start;
  padding: 16px; border: 1px solid #ece4d7; border-radius: 18px;
  background: rgba(255,255,255,.82); backdrop-filter: blur(8px);
  box-shadow: 0 10px 26px rgba(90, 70, 40, .06);
}
.exam-card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.exam-card-head h3 { margin: 0; display: flex; align-items: center; gap: 7px; font-size: 14.5px; line-height: 1.7; }
.exam-code {
  flex: none; padding: 3px 9px; border-radius: 8px; background: #f6f1e7;
  color: #8a7c66; font-size: 11px; font-weight: 900;
}
.exam-meta { display: flex; flex-wrap: wrap; gap: 6px 14px; color: var(--muted); font-size: 11.5px; font-weight: 700; }
.exam-meta span { display: inline-flex; align-items: center; gap: 5px; }
.exam-meta .ui-icon, .exam-meta svg { width: 13px; height: 13px; }
.exam-state-row { display: flex; flex-wrap: wrap; align-items: center; gap: 7px 14px; font-size: 12px; }
.exam-state { padding: 4px 11px; border-radius: 999px; background: #f1efe8; color: #6c6355; font-weight: 900; font-size: 11.5px; }
.exam-state.in_progress { background: #fff3e2; color: #b06010; }
.exam-state.done { background: #eaf8f4; color: #168878; }
.exam-state.closed { background: #fcf1ef; color: #a04e4e; }
.exam-remain, .exam-last-score { color: var(--muted); font-weight: 700; display: inline-flex; align-items: center; gap: 5px; }
.exam-remain svg { width: 13px; height: 13px; }
.exam-last-score b { color: var(--ink); }
.exam-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 2px; }
.exam-manage-list { display: grid; gap: 10px; }
.exam-manage-row {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 14px; align-items: center;
  padding: 14px; border: 1px solid #eee5d8; border-radius: 14px; background: #fff;
}
.exam-manage-main { display: grid; gap: 8px; min-width: 0; }
.exam-manage-title { display: flex; align-items: center; gap: 9px; min-width: 0; }
.exam-manage-title b { font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.exam-manage-meta {
  display: flex; flex-wrap: wrap; gap: 6px 16px;
  color: var(--muted); font-size: 11.5px; font-weight: 700; line-height: 1.8;
}
.exam-manage-meta b { color: var(--ink); }
.exam-manage-stats { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 12px; color: var(--muted); font-size: 12px; font-weight: 800; }
.exam-manage-actions { display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: 8px; }

/* آزمون‌ساز */
.exam-builder { display: grid; gap: 14px; }
.exam-builder-step {
  display: inline-flex; align-items: center; gap: 8px; width: max-content;
  padding: 6px 12px; border-radius: 999px; background: #fff3e8; color: #a65518;
  font-size: 12px; font-weight: 900;
}
.exam-builder-step span {
  display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%;
  background: var(--orange); color: #fff; font-size: 11px;
}
.exam-src-tabs { display: flex; flex-wrap: wrap; gap: 8px; }
.exam-src {
  display: inline-flex; align-items: center; gap: 7px; padding: 9px 14px;
  border: 1px solid #e5dccb; border-radius: 12px; background: #fff;
  font-size: 12.5px; font-weight: 800; color: #6a6154; cursor: pointer;
}
.exam-src.on { border-color: var(--orange); color: var(--ink); box-shadow: 0 0 0 1px var(--orange) inset; }
.exam-src input { accent-color: var(--orange); }
.exam-status-checks { display: flex; flex-wrap: wrap; gap: 8px 18px; }
.exam-status-checks label, .exam-switches label {
  display: inline-flex; align-items: center; gap: 7px; font-size: 12.5px; font-weight: 700; color: var(--ink); cursor: pointer;
}
.exam-status-checks input, .exam-switches input { accent-color: var(--orange); width: 15px; height: 15px; }
.exam-switches { display: flex; flex-wrap: wrap; gap: 10px 22px; padding: 12px 14px; border: 1px solid #ece4d7; border-radius: 12px; background: #fbf8f2; }
.exam-avail { font-size: 12px; color: var(--muted); font-weight: 700; }
.exam-avail b { color: var(--orange); }
.exam-checkline {
  display: flex; align-items: center; gap: 8px; padding: 12px 14px;
  border: 1px dashed #e0d6c6; border-radius: 12px; background: #fffaf3;
  font-size: 12.5px; font-weight: 800; color: var(--ink);
}
.exam-checkline input { width: 16px; height: 16px; accent-color: var(--orange); }
.exam-difficulty-preview { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.exam-difficulty-preview span {
  display: grid; place-items: center; gap: 3px; padding: 10px 8px;
  border: 1px solid #ece4d7; border-radius: 12px; background: #fff; color: var(--muted);
  font-size: 11.5px; font-weight: 800; text-align: center;
}
.exam-difficulty-preview b { color: var(--ink); font-size: 16px; }
.exam-start-guide { display: grid; gap: 14px; }
.exam-start-card {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 14px 16px; border: 1px solid #ece4d7; border-radius: 14px; background: #fff8ef;
}
.exam-start-card b { font-size: 15px; }
.exam-start-card span { color: #8a7c66; font-size: 12px; font-weight: 900; }
.exam-guide-meta { display: flex; flex-wrap: wrap; gap: 8px 14px; color: var(--muted); font-size: 12px; font-weight: 800; }
.exam-guide-meta span { display: inline-flex; align-items: center; gap: 5px; }
.exam-start-guide p { margin: 0; line-height: 2.2; color: #5f574e; font-size: 13px; font-weight: 700; }
@media (max-width: 760px) {
  .exam-hub-tabs { width: 100%; }
  .exam-hub-tab { min-width: 0; flex: 1 1 45%; padding-inline: 10px; font-size: 12px; }
  .exam-panel-head, .exam-manage-row { grid-template-columns: 1fr; display: grid; }
  .exam-manage-actions { justify-content: flex-start; }
  .exam-difficulty-preview { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* مدیریت آزمون‌ها: فیلتر کناری + ردیف‌های تک‌خطی + ترکیب */
.exam-manage-layout { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 14px; align-items: start; }
/* نوار فیلتر مدیریت آزمون/مجموعه‌ها: همان تمِ نوار فیلتر بانک سؤال (sd-section) */
.exam-filter-side {
  display: grid; gap: 8px; align-content: start;
  position: sticky; top: 86px; max-height: calc(100vh - 120px); overflow: auto;
}
.exam-filter-side .qset-search { margin: 0; }
.emf-search {
  display: flex; align-items: center; gap: 7px; padding: 0 10px;
  border: 1px solid #eadfd1; border-radius: 10px; background: #fff; color: var(--muted);
}
.emf-search svg { width: 15px; height: 15px; flex: none; }
.emf-search input { flex: 1; min-width: 0; border: 0; outline: none; background: transparent; font: inherit; font-size: 12px; font-weight: 800; padding: 9px 0; color: var(--ink); }
.emf-search:focus-within { border-color: #f2a562; box-shadow: 0 0 0 3px rgba(255,101,25,.1); }
/* شمارندهٔ فیلترهای فعالِ هر بخش (داخل عنوان sd-section) */
.emf-sel { display: inline-grid; place-items: center; min-width: 17px; height: 17px; padding: 0 5px; margin-inline-start: 5px; border-radius: 999px; background: var(--orange); color: #fff; font-style: normal; font-size: 10px; font-weight: 900; vertical-align: middle; }
/* جدولِ آزمون‌ها: هر داده دقیقاً زیر ستون خودش، وسط‌چین، تک‌ردیف بدون شکستن؛ در عرض کم اسکرول افقی */
.exam-rows { min-width: 0; overflow-x: auto; border: 1px solid #eee5da; border-radius: 14px; background: #fff; }
.exam-table {
  --exam-cols: minmax(88px, 1fr) 28px 44px 34px minmax(50px, 62px) 58px 60px 66px 166px;
  min-width: 0;
}
.exam-thead, .exam-tr {
  display: grid; grid-template-columns: var(--exam-cols); gap: 8px; align-items: center;
  padding: 0 12px;
}
.exam-thead {
  padding-block: 10px; background: #faf6ef; border-bottom: 1px solid #eee5da;
  font-size: 11px; font-weight: 900; color: #8a7c66; text-align: center;
}
.exam-thead .exam-th-name { text-align: start; }
.exam-tr { padding-block: 8px; border-bottom: 1px solid #f3ede3; background: #fff; transition: background .14s ease; }
.exam-tr:last-child { border-bottom: 0; }
.exam-tr:hover { background: #fffaf4; }
.exam-tr.pinned { background: linear-gradient(180deg, #fffaf5, #fff); box-shadow: inset 3px 0 0 var(--orange); }
.exam-td { min-width: 0; font-size: 11.5px; font-weight: 700; color: #4d463c; }
.exam-td.tc { text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.exam-ai-count { display: inline-flex !important; align-items: center; justify-content: center; gap: 6px; overflow: visible; }
.exam-td-name { display: grid; gap: 2px; justify-items: start; overflow: hidden; }
.exam-name-line { display: flex; align-items: center; gap: 5px; min-width: 0; max-width: 100%; }
.exam-name-line > b { flex: 0 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12.5px; color: var(--ink); }
.exam-name-sub { display: flex; align-items: center; gap: 5px; min-width: 0; max-width: 100%; overflow: hidden; }
.exam-name-sub > small { flex: none; color: var(--muted); font-size: 9.5px; font-weight: 800; }
.exam-chip {
  flex: none; display: inline-flex; align-items: center; gap: 3px; padding: 1px 6px;
  border-radius: 999px; font-style: normal; font-size: 9px; font-weight: 900;
}
.exam-chip svg { width: 10px; height: 10px; }
.exam-chip.merged { background: #eef4fd; color: #3568b8; }
.exam-chip.pin { background: #fff2e8; color: var(--orange); padding: 2px 4px; }
.exam-td-org { color: var(--muted); font-size: 11px; }
.exam-cwb { display: inline-flex; align-items: center; gap: 1px; font-variant-numeric: tabular-nums; font-size: 10.5px; }
.exam-cwb i { font-style: normal; color: #d8cfc0; }
.exam-cwb .c { color: #168878; } .exam-cwb .w { color: #c24a3a; } .exam-cwb .b { color: var(--muted); }
.exam-none-cell { color: #c2b7a4; font-weight: 900; }
.exam-td .exam-state { font-size: 10px; padding: 3px 9px; white-space: nowrap; }
.exam-td-actions { display: flex; align-items: center; justify-content: center; gap: 2px; row-gap: 3px; white-space: nowrap; flex-wrap: wrap; }
.exam-td-actions .primary-button { min-height: 0; height: 28px; padding: 0 10px; font-size: 10.5px; white-space: nowrap; box-shadow: none; }
.exam-report-btn {
  flex: none; padding: 4px 8px;
  border: 1px solid #f0dcc4; border-radius: 9px; background: #fff7ec; color: #b06010;
  font: inherit; font-size: 10.5px; font-weight: 800; cursor: pointer; white-space: nowrap;
  transition: background .14s ease, border-color .14s ease;
}
.exam-report-btn:hover { background: #ffefdc; border-color: #e8b877; }
.exam-iconbtn {
  flex: none; width: 24px; height: 24px; display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid #eadfd1; border-radius: 8px; background: #fff; color: #8a7c66; cursor: pointer;
  transition: border-color .14s ease, color .14s ease, background .14s ease;
}
.exam-iconbtn svg { width: 12px; height: 12px; }
.exam-iconbtn:hover { border-color: var(--orange); color: var(--orange); }
.exam-iconbtn.on { background: #fff2e8; border-color: #f0b487; color: var(--orange); }
.exam-iconbtn.danger:hover { background: #fdeceb; border-color: #f0ccc6; color: #c24a3a; }
.em-results { display: flex; flex-wrap: wrap; gap: 6px; }
.exam-merge { display: grid; gap: 12px; }
/* زیر ۱۲۰۰px سایدبار فیلتر بالای جدول می‌رود تا جدول بدون اسکرول افقی در یک صفحه جا شود */
@media (max-width: 900px) {
  .exam-manage-layout { grid-template-columns: 1fr; }
  .exam-filter-side { position: static; max-height: none; }
}

/* اجراکنندهٔ آزمون */
body.exam-open { overflow: hidden; }
.exam-runner {
  position: fixed; inset: 0; z-index: 90; display: flex; flex-direction: column;
  background: #f6f1e8;
}
.er-top {
  flex: none; display: flex; align-items: center; gap: 16px; padding: 12px 18px;
  background: rgba(255,255,255,.85); backdrop-filter: blur(10px);
  border-bottom: 1px solid #ece4d7;
}
.er-title { display: grid; min-width: 0; }
.er-title strong { font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 260px; }
.er-title small { color: var(--muted); font-size: 10.5px; font-weight: 800; }
.er-stats { color: var(--muted); font-size: 12px; font-weight: 700; }
.er-stats b { color: var(--ink); }
.er-timer-mini {
  display: none; margin-inline-start: auto; padding: 6px 14px; border-radius: 12px;
  background: #2b2721; color: #fff; font-size: 14px; font-weight: 900; letter-spacing: 1px;
  font-variant-numeric: tabular-nums; direction: ltr;
}
.er-timer-mini.danger { background: #c24a3a; }
.er-top-actions { display: flex; gap: 9px; margin-inline-start: auto; }
.er-body { flex: 1; display: flex; gap: 16px; padding: 16px 18px; min-height: 0; }
.er-side { flex: none; width: 280px; display: flex; flex-direction: column; gap: 12px; min-height: 0; }
/* کارت اطلاعات آزمون: حلقهٔ زمان + مشخصات + دکمهٔ اتمام */
.er-info-card {
  display: grid; gap: 12px; padding: 14px;
  background: #fff; border: 1px solid #ece4d7; border-radius: 18px;
  box-shadow: 0 12px 26px rgba(90,70,40,.05);
}
.er-info-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 13.5px; font-weight: 900; }
.er-eye {
  width: 30px; height: 30px; display: flex; align-items: center; justify-content: center;
  border: 1px solid #eee5da; border-radius: 9px; background: #fffaf5; color: #8a7c66; cursor: pointer;
  transition: border-color .14s ease, color .14s ease;
}
.er-eye:hover { border-color: var(--orange); color: var(--orange); }
.er-eye.off { background: #f4efe7; color: #b0a48e; }
.er-eye svg { width: 15px; height: 15px; }
/* مخفی‌کردن زمان: عدد و حلقه محو/بلور می‌شوند ولی ساختار می‌ماند */
.er-ring.time-hidden svg { filter: blur(5px); opacity: .55; }
.er-ring.time-hidden .er-ring-text b,
.er-ring.time-hidden .er-ring-text em { filter: blur(7px); user-select: none; }
.er-timer-mini.time-hidden { filter: blur(5px); }
.er-info-body { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.er-info-rows { display: grid; gap: 12px; min-width: 0; }
.er-info-row { display: flex; align-items: center; gap: 8px; font-size: 11.5px; font-weight: 800; color: #4d463c; min-width: 0; }
.er-info-row > span { min-width: 0; overflow-wrap: anywhere; line-height: 1.55; }
.er-info-row i {
  flex: none; width: 26px; height: 26px; display: flex; align-items: center; justify-content: center;
  border-radius: 9px; background: #fff; border: 1.5px solid #f6c69b; color: var(--orange);
}
.er-info-row i svg { width: 14px; height: 14px; }
.er-ring { position: relative; flex: none; width: 108px; height: 108px; }
.er-ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.er-ring-bg { fill: none; stroke: #f0ebe2; stroke-width: 7; }
.er-ring-fg {
  fill: none; stroke: var(--orange); stroke-width: 7.5; stroke-linecap: round;
}
.er-ring-fg.danger { stroke: #c24a3a; }
.er-ring-tick { stroke: #fff; stroke-width: 3.5; stroke-linecap: round; }
.er-ring-text {
  position: absolute; inset: 0; display: grid; place-content: center; gap: 2px; text-align: center;
}
.er-ring-text b { font-size: 15px; font-weight: 900; font-variant-numeric: tabular-nums; direction: ltr; color: var(--orange); }
.er-ring-text b.danger { color: #c24a3a; }
.er-ring-text span { color: var(--muted); font-size: 9.5px; font-weight: 800; }
.er-ring-text em { color: var(--orange); font-size: 9px; font-weight: 900; font-style: normal; max-width: 76px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; margin-inline: auto; }
.er-finish {
  width: 100%; padding: 13px; border: 0; border-radius: 999px;
  background: var(--orange); color: #fff; font: inherit; font-size: 15px; font-weight: 900;
  cursor: pointer; box-shadow: 0 10px 22px rgba(255,95,31,.22);
  transition: background .14s ease, transform .14s var(--ease-soft);
}
.er-finish:hover { background: #f05a18; transform: translateY(-1px); }
/* کارت ناوبری سؤال‌ها: شمارنده‌ها + باکسِ درس‌های هر دفترچه */
.er-nav-card {
  flex: 1; min-height: 0; display: flex; flex-direction: column; gap: 10px; padding: 12px;
  background: #fff; border: 1px solid #ece4d7; border-radius: 18px;
  box-shadow: 0 12px 26px rgba(90,70,40,.05);
}
.er-nav-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: 12px; font-weight: 800; color: #4d463c; padding: 0 2px; }
.er-nav-head > span { display: inline-flex; align-items: center; gap: 6px; }
.er-nh-blank .d { width: 12px; height: 12px; border-radius: 50%; border: 1.5px solid #ddd3c1; background: #f4efe7; }
.er-nh-flag i { display: inline-grid; place-items: center; color: var(--orange); }
.er-nh-flag svg { width: 14px; height: 14px; }
.er-grid { display: flex; flex-direction: column; gap: 10px; overflow-y: auto; overscroll-behavior: contain; min-height: 0; }
/* Hidden overflow on lesson cards otherwise lets flex shrink them to the
   viewport, clipping question buttons instead of creating a scroll range. */
.er-grid > * { flex: none; }
.er-side > .er-info-card, .er-nav-head { flex-shrink: 0; }
.er-grid, .er-side, .er-main { -webkit-overflow-scrolling: touch; }
.er-bk-box { border: 1px solid #ece4d7; border-radius: 14px; padding: 8px; display: grid; gap: 8px; }
.er-bk-box.locked { opacity: .68; }
.er-bk-box-h { font-size: 12px; font-weight: 900; color: #6a6154; padding: 2px 4px; }
.er-les-box { border: 1px solid #eee7db; border-radius: 14px; background: #fff; overflow: hidden; }
.er-les-head {
  width: 100%; display: flex; align-items: center; gap: 8px; padding: 11px 12px;
  border: 0; background: transparent; font: inherit; font-size: 13px; font-weight: 900; color: var(--ink);
  cursor: pointer;
}
.er-les-head small { color: var(--muted); font-size: 11.5px; font-weight: 800; margin-inline-start: auto; }
.er-les-head i { display: inline-grid; place-items: center; color: #b0a48e; transition: transform .18s ease; }
.er-les-head i svg { width: 15px; height: 15px; }
.er-les-box.open .er-les-head i { transform: rotate(180deg); }
.er-grid-row {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(40px, 1fr)); gap: 8px;
  padding: 4px 10px 12px;
}
.er-cell {
  position: relative; height: 38px; border: 0; border-radius: 11px; background: #f4f1ec;
  font: inherit; font-size: 12.5px; font-weight: 800; color: #6a6154; cursor: pointer;
  transition: background .12s ease, box-shadow .12s ease, color .12s ease;
}
.er-cell:hover { box-shadow: 0 0 0 1.5px var(--orange) inset; }
.er-cell.answered { background: #eaf8f4; color: #168878; }
.er-cell.current { background: #fff6ec; box-shadow: 0 0 0 2px var(--orange) inset; color: var(--ink); }
.er-cell.locked { opacity: .5; cursor: not-allowed; }
/* بج نشان‌دار: از لبهٔ بالای سلول شروع می‌شود؛ نرم و طبیعی مثل روبان کتاب */
.er-cell-bm {
  position: absolute; top: -1px; inset-inline-end: 5px; color: var(--orange);
  display: inline-grid; place-items: start center; pointer-events: none;
}
.er-cell-bm svg { width: 11px; height: 14px; }
.er-main { flex: 1; min-width: 0; overflow-y: auto; overscroll-behavior: contain; display: grid; gap: 14px; align-content: start; padding-bottom: 30px; }
.er-qhead { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.er-qno { font-size: 13px; font-weight: 900; color: var(--ink); }
.er-qhead-actions { display: inline-flex; gap: 8px; }
.er-flag {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 13px; border: 1px solid #e5dccb; border-radius: 999px; background: #fff;
  font: inherit; font-size: 11.5px; font-weight: 800; color: #6a6154; cursor: pointer;
}
.er-flag svg { width: 13px; height: 13px; }
.er-flag.on { background: #fff3e2; border-color: #e8a33d; color: #b06010; }
/* دکمه‌های آیکونیِ سربرگ سؤال (نشان‌دار / چرک‌نویس) */
.er-iconbtn {
  width: 36px; height: 36px; display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid #e5dccb; border-radius: 11px; background: #fff;
  color: #8a7c66; cursor: pointer;
  transition: border-color .14s ease, background .14s ease, color .14s ease, transform .14s var(--ease-soft);
}
/* بدون بالاآمدنِ ترنسفورم: دکمه در بالای ناحیهٔ اسکرولِ سؤال است و لیفت باعث برش خوردنِ کادر می‌شد */
.er-iconbtn:hover { border-color: var(--orange); color: var(--orange); background: #fff8ef; }
.er-iconbtn svg { width: 17px; height: 17px; }
.er-iconbtn img.draw-pen-img { width: 18px; height: 18px; }
.er-iconbtn.on { background: #fff3e2; border-color: #e8a33d; color: #d07f14; }
.er-qno-num {
  display: inline-grid; place-items: center; min-width: 34px; height: 34px; padding: 0 8px;
  border-radius: 11px; background: var(--orange); color: #fff; font-size: 15px; font-weight: 900;
}
/* پاسخبرگ آنلاینِ آزمون چاپی */
.er-sheet-hint { margin: 0; color: var(--muted); font-size: 12px; font-weight: 700; line-height: 2; }
.er-sheet-grid { background: #fff; border: 1px solid #d9d1c5; border-radius: 8px; padding: 12px; }
.er-sheet-grid.omr-sheet-grid { gap: 8px; }
.er-sheet-grid .omr-col { gap: 8px; flex-basis: 152px; min-width: 144px; max-width: 158px; }
.er-sheet-grid .omr-block { border-color: #d8d0c4; border-radius: 5px; background: #fff; }
.er-sheet-grid .omr-line { min-height: 30px; gap: 5px; padding: 3px 6px; }
.er-sheet-grid .omr-picks { flex: 1; justify-content: space-between; gap: 4px; }
.er-sheet-grid .omr-b {
  width: 23px;
  height: 23px;
  border-width: 1px;
  border-radius: 4px;
  background: #fff;
}
.er-sheet-grid .omr-b.on { box-shadow: inset 0 0 0 1px rgba(255,255,255,.3); }
/* گزینه‌ها داخلِ همان کارتِ سؤال‌اند تا صورت سؤال، شکل و گزینه‌ها یک ورقهٔ
   یکپارچه باشند — مثل کارت سؤال در پنل کاربر. */
.er-question.detail-card { margin: 0; }
.er-question > .er-options,
.er-question > .sq-side-layout { margin-top: 14px; }
/* ظرفِ ردیفِ «گزینهٔ شک»: فقط برای به‌روزرسانیِ درجا؛ در چیدمان هیچ نقشی ندارد. */
.er-doubt-slot { display: contents; }
/* تصویرِ سؤال تا رسیدنِ بایت‌هایش قابِ درخشان می‌گیرد، نه کادرِ سفید. ابعاد از
   پیش روی تگ است (sq-img-sized)، پس با رسیدنِ تصویر چیزی جابه‌جا نمی‌شود. */
.er-question img.er-img-wait {
  min-height: 90px;
  border-radius: 10px;
  background: linear-gradient(100deg, #f1ede8 20%, #faf8f4 45%, #f1ede8 70%);
  background-size: 220% 100%;
  animation: sqImgShimmer 1.25s ease-in-out infinite;
}
.er-question img.er-img-wait.sq-img-sized { min-height: 0; }
/* «اتصال قطع است» در نوار بالای آزمون */
.er-net-chip {
  display: inline-flex; align-items: center; gap: 6px; flex: none;
  padding: 5px 10px; border-radius: 10px;
  background: #fff3e0; border: 1px solid #f6c69b; color: #9a4b12;
  font-size: 11px; font-weight: 800; line-height: 1.6;
}
.er-net-chip[hidden] { display: none; }
.er-net-chip .ui-icon { width: 15px; height: 15px; flex: none; }
.er-net-chip .er-net-short { display: none; }
@media (max-width: 860px), (max-height: 520px) {
  .er-net-chip { padding: 5px 8px; }
  .er-net-chip .er-net-long { display: none; }
  .er-net-chip .er-net-short { display: inline; }
}
/* پیشرفتِ آماده‌سازیِ سؤال‌ها داخل کارتِ اطلاعات آزمون */
.er-prep { display: grid; gap: 6px; }
.er-prep[hidden] { display: none; }
.er-prep-bar { display: block; height: 5px; border-radius: 999px; background: #f1ebe2; overflow: hidden; }
.er-prep-bar > i { display: block; height: 100%; width: 0; border-radius: inherit; background: var(--orange); transition: width .3s ease; }
.er-prep small { color: var(--muted); font-size: 10.5px; font-weight: 800; }
.er-prep.done .er-prep-bar > i { background: var(--teal); }
.er-prep.done small { color: var(--teal); }
.exam-guide-prep { margin-top: 12px; }
/* نوارِ «نسخهٔ جدید» هرگز روی آزمون نمی‌آید؛ به‌روزرسانی تا پایانِ آزمون صبر می‌کند. */
body.exam-open .app-update-bar { display: none !important; }
@media (prefers-reduced-motion: reduce) { .er-question img.er-img-wait { animation: none; } }
/* گزینه‌ها افقی کنار هم؛ متن بلند خودش به سطر بعد می‌شکند.
   گرید (نه flex) تا هر چهار کادر هم‌عرض و — با grid-auto-rows: 1fr — هم‌ارتفاع بمانند. */
.er-options { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: stretch; grid-auto-rows: 1fr; gap: 10px; }
/* گزینه‌های کوتاه: چهار ستون مساوی که تمام عرض سؤال را می‌گیرند. */
.er-options.is-row { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.er-options.is-row .er-opt { width: 100%; min-width: 0; justify-content: flex-start; padding: 8px 10px; }
.er-options.is-two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.er-options.is-two .er-opt { width: 100%; min-width: 0; }
.er-options.is-stack { display: grid; grid-template-columns: minmax(0, 1fr); grid-auto-rows: max-content; }
.er-options.is-stack .er-opt { width: 100%; min-width: 0; }
.er-opt {
  width: 100%; min-width: 0;
  display: flex; align-items: center; gap: 10px; padding: 12px 14px; text-align: start;
  border: 1.5px solid #e5dccb; border-radius: 14px; background: #fff;
  font: inherit; font-size: 13px; line-height: 1.9; color: var(--ink); cursor: pointer;
  transition: border-color .12s ease, background .12s ease;
}
.er-opt:hover { border-color: var(--orange); }
.er-opt b {
  flex: none; width: 26px; height: 26px; display: grid; place-items: center;
  border: 1.5px solid #d9cfbf; border-radius: 50%; font-size: 12px; color: #6a6154;
}
.er-opt.on { border-color: var(--orange); background: #fff6ec; box-shadow: 0 0 0 1.5px var(--orange) inset; }
.er-opt.on b { background: var(--orange); border-color: var(--orange); color: #fff; }
.er-opt span { min-width: 0; }
.er-nav-btns { display: flex; justify-content: space-between; gap: 10px; }
@media (max-width: 860px) {
  .er-body { flex-direction: column; padding: 12px; }
  .er-side { width: 100%; order: 2; }
  .er-grid { max-height: 260px; }
  .er-main { order: 1; }
  .er-top { flex-wrap: wrap; gap: 8px 12px; padding: 10px 12px; }
  .er-timer-mini { display: block; }
  .er-stats { display: none; }
  .er-opt { min-width: 0; }
  .er-options.is-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .er-options.is-row .er-opt { min-width: 0; }
}

/* کارنامهٔ آزمون */
.exam-report-meta { display: flex; flex-wrap: wrap; gap: 6px 20px; font-size: 12px; color: var(--muted); font-weight: 700; }
.exam-report-meta b { color: var(--ink); }
.exam-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(108px, 1fr)); gap: 9px; }
.exam-tile {
  display: grid; gap: 3px; place-items: center; padding: 13px 8px;
  border: 1px solid #ece4d7; border-radius: 14px; background: #fdfaf5; text-align: center;
}
.exam-tile b { font-size: 17px; font-weight: 900; color: var(--ink); font-variant-numeric: tabular-nums; }
.exam-tile span { font-size: 11px; color: var(--muted); font-weight: 700; }
.exam-tile.ok b { color: #168878; }
.exam-tile.bad b { color: #c24a3a; }
.exam-report-h { margin: 6px 0 0; font-size: 13.5px; }
.exam-lesson-table { border: 1px solid #ece4d7; border-radius: 14px; overflow: hidden; background: #fff; }
.exam-lesson-row {
  display: grid; grid-template-columns: minmax(120px, 1.6fr) repeat(5, minmax(46px, .55fr)) minmax(64px, .7fr);
  align-items: center; gap: 8px; padding: 9px 14px; font-size: 12px; font-weight: 800; text-align: center;
}
.exam-lesson-row:not(.head) { border-top: 1px solid #f2ebdf; }
.exam-lesson-row.head { background: #f8f3eb; color: #4a4036; font-size: 11.5px; font-weight: 900; }
.exam-lesson-name { text-align: start; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.exam-lesson-row .ok { color: #168878; }
.exam-lesson-row .bad { color: #c24a3a; }
.omr-line.res.omr-answered { border-inline-start-color: #9a5a1f; }
@media (max-width: 640px) {
  .exam-lesson-row { grid-template-columns: minmax(90px, 1.4fr) repeat(5, minmax(34px, .55fr)) minmax(52px, .7fr); padding: 8px 9px; gap: 4px; font-size: 11px; }
}

/* ===== ویزارد ساخت آزمون شخصی ===== */
.exam-panel.exam-wizard { max-width: 860px; margin-inline: auto; }
@keyframes ew-in { from { opacity: 0; transform: translateY(7px); } to { opacity: 1; transform: none; } }
.exam-wizard-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.exam-wizard-head h2 { margin: 0 0 4px; font-size: 16px; }
.exam-wizard-head p { margin: 0; color: var(--muted); font-size: 12.5px; line-height: 1.8; }
.exam-wizard-progress { flex: none; padding: 6px 12px; border-radius: 999px; background: #f6f1e7; color: #8a7c66; font-size: 12px; font-weight: 900; }
.exam-stepper { display: flex; align-items: center; gap: 4px; margin-bottom: 20px; flex-wrap: wrap; }
.exam-step { display: inline-flex; align-items: center; gap: 8px; }
.exam-step-num { width: 28px; height: 28px; flex: none; display: grid; place-items: center; border-radius: 50%; background: #efe7db; color: #8a7c66; font-size: 12.5px; font-weight: 900; border: 2px solid transparent; transition: background .25s ease, color .25s ease, transform .25s ease; }
.exam-step.on .exam-step-num { transform: scale(1.12); }
.exam-step.on .exam-step-num { background: var(--orange); color: #fff; }
.exam-step.done .exam-step-num { background: #eaf8f4; color: #168878; }
.exam-step-label { font-size: 12.5px; font-weight: 800; color: #8a7c66; }
.exam-step.on .exam-step-label { color: var(--ink); }
.exam-step-line { flex: 1; min-width: 18px; height: 2px; background: #e5dccb; margin: 0 4px; border-radius: 2px; }
.exam-step-line.done { background: #9ed4c1; }
.exam-wizard-body { background: rgba(255,255,255,.72); border: 1px solid #ece4d7; border-radius: 18px; padding: 20px; }
.ew-step { display: grid; gap: 16px; animation: ew-in .3s ease; }
.ew-type-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.ew-type { display: grid; gap: 5px; padding: 14px; border: 1.5px solid #e5dccb; border-radius: 14px; background: #fff; cursor: pointer; }
.ew-type.on { border-color: var(--orange); box-shadow: 0 0 0 1.5px var(--orange) inset; }
.ew-type input {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: 0;
  opacity: 0;
  pointer-events: none;
}
.ew-type b { display: inline-flex; align-items: center; gap: 7px; font-size: 13.5px; }
.ew-type b svg { width: 17px; height: 17px; }
.ew-type span { color: var(--muted); font-size: 12px; line-height: 1.7; }
.ew-nav { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 6px; }
.ew-nav .primary-button svg, .ew-nav .secondary-button svg { width: 16px; height: 16px; }
.ew-booklets { display: grid; gap: 14px; }
.ew-booklet { border: 1px solid #ead9c2; border-radius: 16px; background: #fffdf9; padding: 14px; display: grid; gap: 10px; }
.ew-bk-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.ew-bk-name { flex: 1; min-width: 120px; border: 1px solid #e5dccb; border-radius: 10px; padding: 8px 12px; font: inherit; font-weight: 800; background: #fff; }
.ew-bk-time { color: var(--muted); font-size: 12px; font-weight: 700; display: inline-flex; align-items: center; gap: 5px; }
.ew-bk-time svg, .ew-bk-time b { color: var(--ink); }
.ew-bk-time svg { width: 14px; height: 14px; color: var(--muted); }
.ew-lesson-list { display: grid; gap: 8px; }
.ew-lesson-row { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border: 1px solid #efe7db; border-radius: 12px; background: #fff; flex-wrap: wrap; }
.ew-ls-ord { flex: none; width: 24px; height: 24px; display: grid; place-items: center; border-radius: 8px; background: #f1efe8; color: #6a6154; font-size: 12px; font-weight: 900; }
.ew-ls-name { flex: 1; min-width: 130px; border: 1px solid #e5dccb; border-radius: 10px; padding: 7px 10px; font: inherit; background: #fff; }
.ew-ls-time { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); }
.ew-ls-time input { width: 64px; border: 1px solid #e5dccb; border-radius: 9px; padding: 6px 8px; font: inherit; text-align: center; }
.ew-ls-actions { display: inline-flex; gap: 5px; }
.ew-mini { width: 30px; height: 30px; display: grid; place-items: center; border: 1px solid #e5dccb; border-radius: 9px; background: #fff; color: #6a6154; cursor: pointer; }
.ew-mini svg { width: 15px; height: 15px; }
.ew-mini:hover { border-color: var(--orange); }
.ew-mini.danger:hover { border-color: #c24a3a; color: #c24a3a; }
.ew-mini:disabled { opacity: .4; cursor: default; }
.ew-mini.danger { display: inline-flex; align-items: center; gap: 5px; width: auto; padding: 0 10px; font-size: 12px; font-weight: 700; }
.ew-add-lesson { display: inline-flex; align-items: center; gap: 6px; align-self: start; border: 1px dashed #d9cfbf; background: #fff; border-radius: 10px; padding: 8px 14px; font: inherit; font-size: 12.5px; font-weight: 700; color: var(--orange); cursor: pointer; }
.ew-add-lesson svg { width: 15px; height: 15px; }
.ew-add-booklet { align-self: start; }
.ew-empty { color: var(--muted); font-size: 12px; margin: 4px 0; }
.ew-lock { display: flex; gap: 10px; padding: 12px 14px; border: 1px solid #f0d9a6; border-radius: 12px; background: #fff9ec; cursor: pointer; }
.ew-lock input { accent-color: var(--orange); margin-top: 3px; }
.ew-lock span { display: grid; gap: 3px; }
.ew-lock b { font-size: 12.5px; } .ew-lock small { color: var(--muted); font-size: 11.5px; line-height: 1.7; }
.ew-total { padding: 12px 14px; border-radius: 12px; background: #faf7f1; border: 1px solid #ece4d7; font-size: 13px; font-weight: 800; }
.ew-total b { color: var(--orange); }
.ew-q-booklet { border: 1px solid #ece4d7; border-radius: 14px; padding: 12px 14px; display: grid; gap: 8px; margin-bottom: 12px; }
.ew-q-bk-title { font-weight: 900; font-size: 13px; }
.ew-q-lesson { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 9px 11px; border: 1px solid #efe7db; border-radius: 11px; background: #fff; flex-wrap: wrap; }
.ew-q-ls-main { display: grid; gap: 2px; } .ew-q-ls-main b { font-size: 13px; } .ew-q-ls-main span { color: var(--muted); font-size: 11.5px; }
.ew-q-ls-actions { display: inline-flex; gap: 6px; }
.ew-review-card { border: 1px solid #ead9c2; border-radius: 16px; background: #fffdf9; padding: 16px; }
.ew-review-title { font-size: 16px; font-weight: 900; margin-bottom: 10px; }
.ew-review-meta { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 8px 18px; font-size: 12.5px; color: var(--muted); }
.ew-review-meta b { color: var(--ink); }
.ew-review-table { border: 1px solid #ece4d7; border-radius: 14px; overflow: hidden; background: #fff; }
.ew-review-row { display: grid; grid-template-columns: 1.2fr 1.4fr .6fr .8fr; gap: 8px; padding: 10px 14px; font-size: 12.5px; font-weight: 700; }
.ew-review-row:not(.head) { border-top: 1px solid #f2ebdf; }
.ew-review-row.head { background: #f8f3eb; font-weight: 900; color: #4a4036; }
.ew-review-note { color: var(--muted); font-size: 12px; }

/* پاپ‌آپ انتخاب سؤالِ درس */
.exam-picker { display: grid; gap: 12px; }
.exam-pick-sec { border: 1px solid #ece4d7; border-radius: 14px; padding: 12px 14px; display: grid; gap: 10px; }
.ep-composition-options { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 24px; }
.ep-composition-options .ep-check { min-height: 32px; white-space: nowrap; }
.ep-composition-options input:focus { transform: none; }
.ep-composition-empty[hidden] { display: none; }
.exam-pick-h { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: 13px; }
.exam-pick-h > span { color: var(--muted); font-size: 12px; font-weight: 700; display: inline-flex; align-items: center; gap: 6px; }
.exam-pick-h > span > small { color: #b0a38f; font-size: 10px; font-weight: 700; }
.exam-pick-h b { font-weight: 900; display: inline-flex; align-items: center; gap: 7px; }
.exam-pick-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.ep-chip {
  display: inline-flex; align-items: center; gap: 5px;
  border: 1px solid #e5dccb; border-radius: 999px; background: #fff; padding: 6px 12px;
  font: inherit; font-size: 12px; font-weight: 700; color: #6a6154; cursor: pointer;
  transition: border-color .14s ease, background .14s ease, color .14s ease, transform .14s ease;
}
.ep-chip:hover { border-color: var(--orange); transform: translateY(-1px); }
.ep-chip svg { width: 12px; height: 12px; }
.ep-chip.on { background: var(--orange); border-color: var(--orange); color: #fff; }
.ep-chip.on i { display: inline-grid; place-items: center; opacity: .85; }
.ep-chip.on i svg { width: 11px; height: 11px; }
.ep-tag-mode { width: max-content; max-width: 100%; }
.ep-tag-choices { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 7px; }
.ep-tag-choice {
  min-width: 0; min-height: 36px; display: flex; align-items: center; justify-content: space-between; gap: 9px;
  padding: 6px 9px; border: 1px solid #e7dece; border-radius: 10px; background: #fff;
  color: #665c4d; font: inherit; cursor: pointer; transition: border-color .14s ease, background .14s ease, transform .14s ease;
}
.ep-tag-choice:hover { border-color: #efad7d; background: #fff8f1; transform: translateY(-1px); }
.ep-tag-choice > span { min-width: 0; display: inline-flex; align-items: center; gap: 6px; font-size: 11.5px; font-weight: 800; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ep-tag-choice > span .ui-icon { width: 12px; height: 12px; color: var(--orange); flex: 0 0 auto; }
.ep-tag-choice > b { flex: 0 0 auto; min-width: 27px; padding: 3px 7px; border-radius: 7px; background: #f4efe7; color: #8b7658; font-size: 10.5px; font-weight: 900; text-align: center; }
.ep-tag-section .ew-prio-list { max-height: 230px; overflow: auto; overscroll-behavior: contain; }
.ep-topic-btn { align-self: start; }
.ep-src-tree { max-height: 240px; overflow: auto; overscroll-behavior: contain; border: 1px solid #efe7db; border-radius: 12px; padding: 6px 10px; background: #fff; }
.ep-basis { border: 1px solid #e5dccb; border-radius: 8px; padding: 4px 8px; font: inherit; font-size: 12px; background: #fff; }
.exam-pick-note { color: var(--muted); font-size: 11.5px; margin: 0; }
.ep-mode { margin-bottom: 4px; flex-wrap: wrap; }
.ep-order-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.ep-order-row > span { font-size: 12px; font-weight: 800; color: #6a6154; }
.ep-auto { display: flex; flex-wrap: wrap; gap: 14px 24px; align-items: flex-end; }
.ep-auto .ep-level-row { flex-basis: 100%; }
.ep-auto .ep-check { width: 100%; }
.ep-count { display: inline-flex; align-items: center; gap: 8px; font-size: 12.5px; font-weight: 700; }
.ep-count input { width: 90px; border: 1px solid #e5dccb; border-radius: 9px; padding: 7px 10px; font: inherit; text-align: center; }
.exam-picker-count { font-size: 12.5px; color: var(--muted); font-weight: 700; }
.exam-picker-count b { color: var(--ink); }
.ep-check { display: flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 700; color: #6a6154; cursor: pointer; }
.ep-check input { accent-color: var(--orange); width: 15px; height: 15px; cursor: pointer; }
.ew-prio-note { flex: none; color: var(--muted); font-size: 11px; font-weight: 700; white-space: nowrap; }
.ew-prio-list.shuffled .ew-prio-rank { opacity: .3; }
/* باکس‌های هر موضوع: ۴ سطحِ افقی زیر نام موضوع (حالت دستی) */
.ep-topic-boxes { display: grid; gap: 10px; }
.ep-topic-box { border: 1px solid #efe7db; border-radius: 12px; background: #fff; padding: 10px 12px; display: grid; gap: 8px; }
.ep-topic-box-h { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.ep-topic-box-h b { font-size: 12.5px; font-weight: 900; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ep-topic-box-h span { flex: none; color: var(--muted); font-size: 11px; font-weight: 700; }
.ep-mini-diff { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
.ep-mini-cell {
  display: grid; gap: 6px; justify-items: center; padding: 8px 6px;
  border: 1px solid #efe7db; border-radius: 10px; background: #fffdfa;
  transition: border-color .14s ease, box-shadow .14s ease;
}
.ep-mini-cell:focus-within { border-color: #f2a562; box-shadow: 0 0 0 3px rgba(255,101,25,.08); }
.ep-mini-cell span { font-size: 10.5px; font-weight: 800; }
.ep-mini-cell.level-1 span { color: #1aa58e; }
.ep-mini-cell.level-2 span { color: #b07d12; }
.ep-mini-cell.level-3 span { color: #d4631f; }
.ep-mini-cell.level-4 span { color: #d2434c; }
/* فیلد تعداد باید مثل یک باکسِ ورودی واضح دیده شود */
.ep-mini-cell input {
  width: 100%; border: 1px solid #e0d6c5; border-radius: 8px; background: #fff;
  outline: none; font: inherit; font-size: 12.5px; font-weight: 800; text-align: center; color: var(--ink);
  padding: 5px 4px;
  transition: border-color .14s ease, box-shadow .14s ease;
}
.ep-mini-cell input::placeholder { color: #c2b7a4; font-size: 10px; font-weight: 700; }
.ep-mini-cell input:focus { border-color: #f2a562; box-shadow: 0 0 0 3px rgba(255,101,25,.1); }
/* سهم هر موضوع در توزیع نسبتی (پیش‌نمایش) و ورودی تعداد هر موضوع */
.ep-alloc, .ep-topic-counts { display: grid; gap: 6px; width: 100%; }
.ep-alloc-row, .ep-topic-count {
  display: flex; align-items: center; gap: 10px; padding: 7px 12px;
  border: 1px solid #efe7db; border-radius: 11px; background: #fff;
}
.ep-alloc-row span, .ep-topic-count span { flex: 1; min-width: 0; font-size: 12.5px; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ep-alloc-row small, .ep-topic-count small { flex: none; color: var(--muted); font-size: 11px; font-weight: 700; }
.ep-alloc-row b { flex: none; min-width: 30px; text-align: center; padding: 3px 8px; border-radius: 8px; background: #fbf3e8; color: var(--orange); font-size: 12.5px; font-weight: 900; font-variant-numeric: tabular-nums; }
.ep-topic-count input { flex: none; width: 64px; border: 1px solid #e5dccb; border-radius: 8px; padding: 5px 8px; font: inherit; font-size: 12.5px; font-weight: 800; text-align: center; }
.ep-topic-count input:focus { outline: none; border-color: #f2a562; box-shadow: 0 0 0 3px rgba(255,101,25,.08); }

/* فهرست‌های اولویت با درگ‌اند‌دراپ */
.ew-prio-title { font-size: 11.5px; font-weight: 800; color: #8a7c66; }
.ew-prio-list { display: grid; gap: 6px; }
.ew-prio-row {
  display: flex; align-items: center; gap: 8px; padding: 7px 10px;
  border: 1px solid #efe7db; border-radius: 11px; background: #fff;
  transition: box-shadow .15s ease, border-color .15s ease, opacity .15s ease;
}
.ew-prio-row.dragging { opacity: .45; border-style: dashed; border-color: var(--orange); }
.ew-prio-rank { flex: none; width: 22px; height: 22px; display: grid; place-items: center; border-radius: 7px; background: #fbf3e8; color: var(--orange); font-size: 11px; font-weight: 900; }
.ew-prio-label { flex: 1; min-width: 0; font-size: 12.5px; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ew-prio-x { flex: none; width: 24px; height: 24px; display: grid; place-items: center; border: 0; border-radius: 8px; background: transparent; color: #b09a82; cursor: pointer; }
.ew-prio-x:hover { background: #fdeceb; color: #c24a3a; }
.ew-prio-x svg { width: 12px; height: 12px; }
.ew-drag-handle { flex: none; width: 22px; display: grid; place-items: center; color: #cdbfa8; cursor: grab; touch-action: none; }
.ew-drag-handle:active { cursor: grabbing; color: var(--orange); }
.ew-grip { width: 15px; height: 15px; }

/* سطح دشواری ۵بخشی (سبز → قرمز) */
.ep-level-segs { display: flex; flex-wrap: wrap; gap: 6px; }
.ep-level-seg {
  flex: 1 1 auto; min-width: 86px; padding: 9px 10px;
  border: 1.5px solid #e5dccb; border-radius: 11px; background: #fff;
  font: inherit; font-size: 12px; font-weight: 800; color: #6a6154; cursor: pointer;
  transition: border-color .14s ease, background .14s ease, color .14s ease, transform .14s var(--ease-soft);
}
.ep-level-seg:hover { transform: translateY(-1px); }
.ep-level-seg.lv-1 { --lv: #1aa58e; }
.ep-level-seg.lv-2 { --lv: #7fae2c; }
.ep-level-seg.lv-3 { --lv: #d99a17; }
.ep-level-seg.lv-4 { --lv: #d4631f; }
.ep-level-seg.lv-5 { --lv: #d2434c; }
.ep-level-seg:hover { border-color: var(--lv); color: var(--lv); }
.ep-level-seg.on { background: var(--lv); border-color: var(--lv); color: #fff; box-shadow: 0 6px 14px rgba(0,0,0,.12); }
/* نوارِ درجهٔ دشواری ۱..۱۰۰ (سبز → نارنجی → قرمز) */
.ep-level-row { display: grid; gap: 7px; flex: 1; min-width: 250px; }
.ep-level-head { display: flex; align-items: center; justify-content: space-between; font-size: 12.5px; font-weight: 800; }
.ep-level-head b { font-size: 15px; font-variant-numeric: tabular-nums; }
.ep-level-tag { font-style: normal; font-size: 11px; font-weight: 800; margin-inline-start: 7px; }
.ep-level-row input[type=range] {
  -webkit-appearance: none; appearance: none; width: 100%; height: 9px; border-radius: 99px;
  background: #eee3d3; outline: none; cursor: pointer;
}
.ep-level-row input[type=range]::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none; width: 21px; height: 21px; border-radius: 50%;
  background: #fff; border: 3.5px solid var(--ep-c, var(--orange));
  box-shadow: 0 2px 7px rgba(60, 40, 20, .25); transition: transform .12s ease;
}
.ep-level-row input[type=range]::-webkit-slider-thumb:hover { transform: scale(1.12); }
.ep-level-row input[type=range]::-moz-range-thumb {
  width: 18px; height: 18px; border-radius: 50%; background: #fff;
  border: 3.5px solid var(--ep-c, var(--orange)); box-shadow: 0 2px 7px rgba(60, 40, 20, .25);
}
.ep-level-scale { display: flex; justify-content: space-between; font-size: 10.5px; font-weight: 700; color: var(--muted); direction: ltr; }
.ep-level-scale span:first-child { color: #2e9e6b; }
.ep-level-scale span:nth-child(2) { color: #d98324; }
.ep-level-scale span:last-child { color: #c2372a; }

/* حالت «آماری (درصد پاسخگویی)»: مبنای تکی + نوار بازهٔ دوسر */
.ep-stat { display: grid; gap: 12px; }
.ep-stat-seg.m-correct { --lv: #2f9e83; }
.ep-stat-seg.m-wrong { --lv: #d3603f; }
.ep-stat-seg.m-blank { --lv: #d7a72e; }
.ep-stat-rangebox { display: grid; gap: 4px; }
.ep-stat-vals { font-size: 12.5px; font-weight: 800; color: #6a6154; }
.ep-stat-vals b { color: var(--orange); font-variant-numeric: tabular-nums; }
.ep-stat-slider { position: relative; height: 36px; }
.ep-stat-track {
  position: absolute; top: 50%; left: 2px; right: 2px; height: 8px;
  transform: translateY(-50%); border-radius: 99px; background: #eee3d3;
}
.ep-stat-track i { position: absolute; top: 0; bottom: 0; border-radius: 99px; background: var(--orange); }
.ep-stat-slider input[type=range] {
  -webkit-appearance: none; appearance: none;
  position: absolute; top: 50%; left: 0; right: 0; width: 100%; margin: 0;
  transform: translateY(-50%); height: 8px; background: none; outline: none;
  pointer-events: none; /* فقط دستگیره‌ها کشیدنی‌اند تا دو نوارِ روی‌هم تداخل نکنند */
}
.ep-stat-slider input[type=range]::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none; pointer-events: auto;
  width: 21px; height: 21px; border-radius: 50%; background: #fff;
  border: 3.5px solid var(--orange); box-shadow: 0 2px 7px rgba(60,40,20,.25);
  cursor: grab; transition: transform .12s ease;
}
.ep-stat-slider input[type=range]::-webkit-slider-thumb:hover { transform: scale(1.12); }
.ep-stat-slider input[type=range]::-webkit-slider-thumb:active { cursor: grabbing; }
.ep-stat-slider input[type=range]::-moz-range-thumb {
  pointer-events: auto; width: 18px; height: 18px; border-radius: 50%; background: #fff;
  border: 3.5px solid var(--orange); box-shadow: 0 2px 7px rgba(60,40,20,.25); cursor: grab;
}

/* اجراکنندهٔ دفترچه‌ای */
.er-booklet-path { display: inline-flex; align-items: center; gap: 4px; flex-wrap: wrap; margin-inline-start: 6px; }
.er-bk-step { padding: 4px 10px; border-radius: 999px; background: #f1efe8; color: #8a7c66; font-size: 11.5px; font-weight: 800; }
.er-bk-step.current { background: var(--orange); color: #fff; }
.er-bk-step.locked { opacity: .6; }
.er-bk-sep { color: var(--muted); }
.er-qlesson { margin-inline-start: 8px; padding: 2px 9px; border-radius: 999px; background: #fbf3e8; color: var(--orange); font-size: 11px; font-weight: 800; }
@media (max-width: 860px) {
  .ew-type-cards { grid-template-columns: 1fr; }
}

/* دانلود مستقیم دفترچهٔ آزمون: استودیو فقط برای چاپ ساخته می‌شود و روی صفحه دیده نمی‌شود */
@media screen {
  body.pstudio-direct .print-studio { opacity: 0; pointer-events: none; }
}

/* چاپ واقعی: فقط صفحه‌های A4 */
@media print {
  @page { size: A4; margin: 0; }
  body.pstudio-printing > *:not(.print-studio) { display: none !important; }
  body.pstudio-printing { overflow: visible !important; background: #fff !important; }
  body.pstudio-printing .print-studio { position: static; background: #fff; display: block; }
  body.pstudio-printing .pstudio-topbar,
  body.pstudio-printing .pstudio-busy,
  body.pstudio-printing .pstudio-skeleton,
  body.pstudio-printing .pstudio-side { display: none !important; }
  body.pstudio-printing .pq-space-tools { display: none !important; }
  body.pstudio-printing .pstudio-layout { display: block; }
  body.pstudio-printing .pstudio-preview { overflow: visible; padding: 0; gap: 0; display: block; }
  body.pstudio-printing .pstudio-page {
    width: 210mm;
    min-height: 296mm;
    margin: 0;
    border-radius: 0;
    box-shadow: none;
    page-break-after: always;
    padding: 15mm;
  }
  body.pstudio-printing .pstudio-page:last-child { page-break-after: auto; }
  body.pstudio-printing .pstudio-page.is-key { height: 296mm; }
  body.pstudio-printing .pstudio-final-footer { left: auto; right: auto; }
}

@media (max-width: 980px) {
  .pstudio-layout { grid-template-columns: 1fr; grid-template-rows: auto 1fr; }
  .pstudio-side { max-height: 42vh; border-inline-end: 0; border-bottom: 1px solid var(--line); }
  .pstudio-preview { padding: 16px 8px 50px; }
  .pstudio-page { transform-origin: top center; transform: scale(.62); margin-bottom: -400px; }
  /* سایدبار به ردیف بالا می‌رود؛ پیش‌نمایش و نشانهٔ لودینگ روی ردیف دوم می‌مانند */
  .pstudio-preview { grid-column: 1; grid-row: 2; }
  .pstudio-layout.no-side .pstudio-preview { grid-row: 1; }
  .pstudio-busy { grid-column: 1; grid-row: 2; padding: 16px 10px; }
  .pstudio-layout.no-side .pstudio-busy { grid-row: 1; }
  .pstudio-skeleton-page { transform-origin: top center; transform: scale(.62); margin-bottom: -400px; }
}

/* ===== پرداخت نهایی مدیریت آزمون، مجموعه سؤال و مراحل ۲/۳ سازنده ===== */
.exam-manage-layout {
  grid-template-columns: 236px minmax(0, 1fr);
  gap: 18px;
  direction: rtl;
}
.exam-filter-side {
  gap: 0;
  padding: 6px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: 0 10px 28px rgba(65,47,29,.045);
  scrollbar-width: none;
}
.exam-filter-side::-webkit-scrollbar { display: none; }
.exam-filter-title {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 10px 9px;
  border-bottom: 1px solid #f1efe9;
  margin-bottom: 5px;
  color: var(--ink);
  font-size: 12.5px;
}
.exam-filter-title > svg { width: 17px; height: 17px; color: var(--orange); }
.exam-filter-title strong { font-weight: 900; }
.exam-filter-side .emf-search,
.exam-filter-side .qset-search { margin: 4px 4px 6px; }
.exam-filter-side .qset-filter-clear { margin: 2px 8px 5px; }
.exam-filter-side > .sd-section:last-child { border-bottom: 0; }

/* هر گروه فیلتر یک کارت مستقل و واضح؛ مشترک بین مجموعه سؤال و مدیریت آزمون */
.exam-filter-side .sd-section,
.exam-filter-side > .sd-section:last-child {
  margin: 6px 4px;
  border: 1px solid #ece2d5;
  border-radius: 13px;
  background: #fff;
  box-shadow: 0 3px 12px rgba(67,49,30,.035);
  overflow: hidden;
  transition: border-color .18s ease, background .18s ease, box-shadow .18s ease, transform .18s var(--ease-soft);
}
.exam-filter-side .sd-section:hover {
  border-color: #e5d3bf;
  box-shadow: 0 6px 16px rgba(67,49,30,.055);
}
.exam-filter-side .sd-section[open] {
  border-color: #efc49e;
  background: #fffaf5;
  box-shadow: 0 8px 20px rgba(210,112,32,.075);
}
.exam-filter-side .sd-section > summary {
  min-height: 43px;
  padding: 10px 11px;
  border-inline-start: 3px solid transparent;
  background: linear-gradient(180deg, #fff, #fefcf9);
  font-size: 12px;
  font-weight: 900;
}
.exam-filter-side .sd-section[open] > summary {
  border-inline-start-color: transparent;
  background: linear-gradient(135deg, #fff7ee, #fffdf9);
  color: #7d491e;
}
.exam-filter-side .sd-section > summary svg {
  width: 14px;
  height: 14px;
  padding: 2px;
  border-radius: 6px;
  background: #f5efe7;
  color: #9a8b76;
}
.exam-filter-side .sd-section[open] > summary svg {
  background: #ffe9d5;
  color: var(--orange);
}
.exam-filter-side .sd-section .sd-body {
  padding: 8px 9px 10px;
  border-top: 1px solid #f2e9de;
  background: rgba(255,255,255,.72);
}
.exam-filter-side .sd-check-group { gap: 4px; }
.exam-filter-side .sd-check {
  min-height: 35px;
  padding: 7px 8px;
  border: 1px solid transparent;
  border-radius: 9px;
  background: #fff;
  color: #62594d;
}
.exam-filter-side .sd-check:hover {
  border-color: #f0dcc7;
  background: #fff8f1;
  transform: translateX(-1px);
}
.exam-filter-side .sd-check.on {
  border-color: #f0c49d;
  background: #fff1e4;
  color: #98501a;
  box-shadow: inset 0 0 0 1px rgba(255,107,24,.035);
}
.exam-filter-side .sd-check b {
  min-width: 22px;
  height: 20px;
  display: inline-grid;
  place-items: center;
  padding: 0 6px;
  border-radius: 7px;
  background: #f5efe7;
  color: #8f816e;
  font-size: 10px;
}
.exam-filter-side .sd-check.on b { background: #ffdcbf; color: #a65318; }
.exam-filter-side .emf-sel {
  min-width: 18px;
  height: 18px;
  background: linear-gradient(135deg, #ff8138, var(--orange));
  box-shadow: 0 3px 8px rgba(255,107,24,.2);
}
.exam-filter-side .qset-filter-clear {
  margin: 7px 8px 5px;
  padding: 7px 9px;
  border-radius: 9px;
  background: #f8f3ec;
}
.exam-filter-side .qset-filter-clear:hover { background: #fff0e3; }

/* فاصلهٔ واقعی بین کارت‌ها؛ جلوگیری از یکپارچه دیده‌شدن فیلترها */
.exam-filter-side {
  gap: 7px;
  padding: 8px;
  background: #faf6ef;
  border-color: #e9dfd2;
}
.exam-filter-side .exam-filter-title {
  margin: 0;
  padding: 10px 11px;
  border: 1px solid #ece2d5;
  border-radius: 12px;
  background: #fff;
}
.exam-filter-side .emf-search,
.exam-filter-side .qset-search {
  margin: 0;
  border-color: #e8dccd;
  box-shadow: 0 2px 8px rgba(67,49,30,.025);
}
.exam-filter-side .sd-section,
.exam-filter-side > .sd-section:last-child {
  margin: 0;
  border-color: #e5d7c7;
  box-shadow: 0 4px 13px rgba(67,49,30,.045);
}
.exam-filter-side .sd-section[open] {
  border-color: #edba8b;
  box-shadow: 0 7px 18px rgba(210,112,32,.09);
}
.exam-filter-side .qset-filter-clear {
  width: 100%;
  justify-content: center;
  margin: 0;
  border: 1px solid #eadfd2;
  background: #fff;
}

.exam-table {
  --exam-cols: minmax(88px, 1fr) 28px 44px 34px minmax(50px, 62px) 58px 60px 66px 166px;
  min-width: 0;
}
.exam-thead,
.exam-tr { gap: 5px; padding-inline: 9px; }
.exam-thead { min-height: 45px; padding-block: 8px; font-size: 10px; }
.exam-tr { min-height: 54px; padding-block: 7px; }
.exam-tr:nth-child(odd) { background: #fffefa; }
.exam-tr:hover { background: #fff8f0; }
.exam-td-name { gap: 7px; }
.exam-td-name > b { font-size: 12.75px; }
.exam-td-actions { gap: 5px; direction: rtl; }
.exam-td-actions .primary-button { height: 30px; border-radius: 9px; padding-inline: 11px; }
.exam-iconbtn { width: 30px; height: 30px; border-radius: 9px; }
.exam-iconbtn svg { width: 14px; height: 14px; }
.exam-retake-icon { color: #168878; border-color: #cfe6df; background: #f4fbf8; }
.exam-retake-icon:hover { color: #087766; border-color: #91ccba; background: #eaf8f4; }
.exam-combine-icon { color: #456eaa; border-color: #d9e3f1; background: #f7faff; }
.exam-combine-icon:hover { color: #285d9f; border-color: #a9c3e4; background: #eef5ff; }
.exam-run-icon { color: #a96517; background: #fffaf1; }
.exam-report-btn {
  order: 99;
  height: 24px;
  display: inline-flex;
  align-items: center;
  padding: 0 8px;
  border-radius: 8px;
  font-size: 10px;
}

.exam-panel.exam-wizard { max-width: 980px; }
.exam-wizard-body {
  padding: 22px;
  background: linear-gradient(180deg, rgba(255,255,255,.88), rgba(255,253,249,.78));
  box-shadow: inset 0 1px 0 rgba(255,255,255,.7);
}
.ew-step-intro {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px 14px;
  border: 1px solid #eee3d7;
  border-radius: 15px;
  background: linear-gradient(135deg, #fffaf4, #fff);
}
.ew-step-intro-icon {
  flex: none;
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  color: var(--orange);
  background: var(--orange-soft);
}
.ew-step-intro-icon svg { width: 20px; height: 20px; }
.ew-step-intro > div { display: grid; gap: 3px; min-width: 0; }
.ew-step-intro > div > b { font-size: 13.5px; font-weight: 900; }
.ew-step-intro > div > span { color: var(--muted); font-size: 11.5px; font-weight: 700; line-height: 1.7; }
.ew-step-intro > small {
  margin-inline-start: auto;
  flex: none;
  padding: 5px 9px;
  border-radius: 999px;
  background: #f7f1e8;
  color: #7e725f;
  font-size: 10.5px;
  font-weight: 900;
}
.ew-booklets { gap: 16px; }
.ew-booklet {
  gap: 13px;
  padding: 0;
  overflow: hidden;
  border-color: #e8dece;
  border-radius: 17px;
  background: #fff;
  box-shadow: 0 8px 24px rgba(71,52,33,.045);
}
.ew-bk-head {
  display: grid;
  grid-template-columns: 34px minmax(160px, 1fr) auto auto auto;
  gap: 10px;
  padding: 12px 14px;
  background: #fbf8f3;
  border-bottom: 1px solid #eee7dc;
}
.ew-bk-index {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: var(--orange);
  color: #fff;
  font-size: 12px;
  font-weight: 900;
}
.ew-bk-name-wrap,
.ew-ls-field { display: grid; gap: 4px; min-width: 0; }
.ew-bk-name-wrap > span,
.ew-ls-field > span,
.ew-ls-time > span:first-child {
  color: #8d806e;
  font-size: 9.5px;
  font-weight: 900;
}
.ew-bk-name {
  width: 100%;
  min-width: 0;
  padding: 6px 9px;
  border-color: transparent;
  background: rgba(255,255,255,.72);
}
.ew-bk-name:focus { outline: 0; border-color: #f2a562; background: #fff; box-shadow: 0 0 0 3px rgba(255,101,25,.08); }
.ew-bk-stat {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 9px;
  border: 1px solid #e9e0d4;
  border-radius: 10px;
  background: #fff;
  color: var(--muted);
  font-size: 10.5px;
  font-weight: 800;
  white-space: nowrap;
}
.ew-bk-stat svg { width: 13px; height: 13px; color: #9b8a72; }
.ew-bk-stat b { color: var(--ink); }
.ew-lesson-list { gap: 8px; padding: 0 14px; }
.ew-lesson-row {
  display: grid;
  grid-template-columns: 22px 28px minmax(160px, 1fr) 184px 34px;
  gap: 9px;
  min-height: 62px;
  padding: 8px 10px;
  border-color: #eee7dc;
  border-radius: 13px;
  background: #fffdfa;
}
.ew-ls-name { width: 100%; min-width: 0; height: 34px; padding-block: 5px; }
.ew-ls-time { display: grid; align-items: center; gap: 4px; color: inherit; }
.ew-time-input {
  height: 34px;
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 0 8px;
  border: 1px solid #e5dccb;
  border-radius: 10px;
  background: #fff;
}
.ew-time-input:focus-within { border-color: #f2a562; box-shadow: 0 0 0 3px rgba(255,101,25,.08); }
.ew-time-input svg { width: 13px; height: 13px; color: #9b8a72; }
.ew-ls-time .ew-time-input input {
  width: 46px;
  padding: 0;
  border: 0;
  outline: 0;
  background: transparent;
  box-shadow: none;
}
.ew-time-input small { margin-inline-start: auto; color: var(--muted); font-size: 10px; font-weight: 800; }
.ew-mini.icon-only { width: 32px; padding: 0; }
.ew-add-lesson { margin: 0 14px 14px; padding: 8px 13px; background: #fffaf5; }
.ew-add-booklet {
  width: 100%;
  min-height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border: 1.5px dashed #ddcbb6;
  border-radius: 15px;
  background: rgba(255,250,245,.62);
  color: var(--orange);
  font: inherit;
  cursor: pointer;
  transition: border-color .15s ease, background .15s ease, transform .15s var(--ease-soft);
}
.ew-add-booklet:hover { border-color: var(--orange); background: #fff5ea; transform: translateY(-1px); }
.ew-add-booklet > svg { width: 19px; height: 19px; }
.ew-add-booklet > span { display: grid; gap: 1px; text-align: start; }
.ew-add-booklet b { font-size: 12.5px; font-weight: 900; }
.ew-add-booklet small { color: #9a8b77; font-size: 10px; font-weight: 700; }
.ew-total-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  padding: 8px;
  background: #f8f5ef;
}
.ew-total-grid > span {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 40px;
  border: 1px solid #ece4d7;
  border-radius: 11px;
  background: #fff;
  color: #746956;
  font-size: 11.5px;
  font-weight: 800;
}
.ew-total-grid svg { width: 14px; height: 14px; color: #9b8a72; }

.ew-q-booklet {
  padding: 0;
  overflow: hidden;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 8px 24px rgba(71,52,33,.04);
}
.ew-q-bk-title {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 13px;
  background: #fbf8f3;
  border-bottom: 1px solid #eee7dc;
}
.ew-q-bk-title > div { display: grid; gap: 2px; min-width: 0; }
.ew-q-bk-title > div b { font-size: 12.75px; font-weight: 900; }
.ew-q-bk-title > div small { color: var(--muted); font-size: 10.5px; font-weight: 700; }
.ew-q-bk-title > em {
  margin-inline-start: auto;
  min-width: 34px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 9px;
  background: #fff2e8;
  color: var(--orange);
  font-style: normal;
  font-size: 11px;
  font-weight: 900;
}
.ew-q-lesson {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto;
  gap: 10px;
  min-height: 62px;
  margin: 9px 12px;
  padding: 9px 10px;
  border-color: #eee7dc;
  background: #fffdfa;
}
.ew-q-lesson.ready { border-color: #cfe7df; background: #fbfffd; }
.ew-q-state {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: #f4efe7;
  color: #a1937f;
}
.ew-q-lesson.ready .ew-q-state { background: #eaf8f4; color: #168878; }
.ew-q-state svg { width: 16px; height: 16px; }
.ew-q-ls-main span { display: flex; align-items: center; gap: 7px; }
.ew-q-ls-main span em { color: #9a5a1f; font-style: normal; font-weight: 900; }
.ew-q-ls-main span i { width: 3px; height: 3px; border-radius: 50%; background: #c6b9a6; }
.ew-pick-button { min-height: 34px; padding-block: 6px; font-size: 11px; }
.ew-question-total {
  display: grid;
  gap: 9px;
  padding: 13px 14px;
  border: 1px solid #eadfce;
  border-radius: 14px;
  background: #fbf8f3;
}
.ew-question-total > div { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.ew-question-total > div > span { color: #6d6252; font-size: 12px; font-weight: 900; }
.ew-question-total > div > b { color: var(--orange); font-size: 15px; font-weight: 900; }
.ew-question-total > div > b small { color: var(--muted); font-size: 10.5px; }
.ew-question-progress { height: 7px; overflow: hidden; border-radius: 999px; background: #eae3d8; }
.ew-question-progress i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #ff8a43, var(--orange)); transition: width .25s ease; }

/* زیر ۱۲۰۰px سایدبار فیلتر بالای جدول می‌رود تا جدول بدون اسکرول افقی جا شود */
@media (max-width: 900px) {
  .exam-manage-layout { grid-template-columns: 1fr; }
  .exam-filter-side { position: static; max-height: none; }
}
@media (max-width: 900px) {
  .ew-bk-head { grid-template-columns: 34px minmax(140px, 1fr) auto auto; }
  .ew-bk-head > .ew-mini { grid-column: -2 / -1; }
  .ew-lesson-row { grid-template-columns: 22px 28px minmax(130px, 1fr) 160px 34px; }
}
@media (max-width: 680px) {
  .exam-wizard-body { padding: 14px; }
  .ew-step-intro { align-items: flex-start; }
  .ew-step-intro > small { display: none; }
  .ew-bk-head { grid-template-columns: 32px minmax(0, 1fr) auto; }
  .ew-bk-stat { grid-row: 2; }
  .ew-lesson-row { grid-template-columns: 20px 26px minmax(0, 1fr) 32px; }
  .ew-ls-time { grid-column: 3 / -1; width: 100%; }
  .ew-total-grid { grid-template-columns: 1fr; }
  .ew-q-lesson { grid-template-columns: 32px minmax(0, 1fr); }
  .ew-q-ls-actions { grid-column: 2; justify-content: flex-start; }
}

/* ===== تعامل جستجو و آیکون ترکیب ===== */
.qset-search,
.sbank-search input {
  transition: border-color .18s ease, box-shadow .2s ease, background .18s ease, transform .18s var(--ease-soft);
}
.qset-search:focus-within {
  border-color: #ee9a55;
  background: #fffdf9;
  box-shadow: 0 0 0 4px rgba(255,107,24,.11), 0 8px 20px rgba(80,55,28,.07);
  transform: translateY(-1px);
}
.qset-search > svg,
.qset-search .qset-search-icon { transition: color .18s ease, transform .2s var(--ease-pop); }
.qset-search:focus-within > svg,
.qset-search:focus-within .qset-search-icon { color: var(--orange); transform: scale(1.12) rotate(-7deg); }
.sbank-search-icon {
  position: absolute; inset-inline-start: 11px; top: 50%; z-index: 2;
  width: 17px; height: 17px; transform: translateY(-50%);
  fill: none; stroke: #8c8273; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round;
  pointer-events: none; transition: color .18s ease, stroke .18s ease, transform .2s var(--ease-pop);
}
.sbank-search input { padding-inline-start: 36px; padding-inline-end: 12px; outline: 0; }
.sbank-search:focus-within input {
  border-color: #ee9a55; background: #fffdf9;
  box-shadow: 0 0 0 4px rgba(255,107,24,.11), 0 8px 20px rgba(80,55,28,.07);
  transform: translateY(-1px);
}
.sbank-search:focus-within .sbank-search-icon { stroke: var(--orange); transform: translateY(-50%) scale(1.12) rotate(-7deg); }
@keyframes examMergeNudge { 0%,100% { transform: scale(1); } 45% { transform: translateY(-1px) scale(1.16); } 70% { transform: translateY(0) scale(1.08); } }
#examMergeBtn svg,
.exam-combine-icon svg { transition: transform .2s var(--ease-pop), color .18s ease; transform-origin: center; }
#examMergeBtn:hover svg,
.exam-combine-icon:hover svg { animation: examMergeNudge .55s var(--ease-pop); color: var(--orange); }
.exam-run-date { display: inline-flex; align-items: baseline; justify-content: center; direction: ltr; unicode-bidi: isolate; gap: 5px; font-size: 9.5px; font-weight: 800; color: #7d7263; white-space: nowrap; letter-spacing: .2px; line-height: 1.4; }
.exam-run-date small { font-size: 8.5px; font-weight: 700; color: #a99e8c; }
/* شرکت مجدد: چرخش کامل فلش هنگام هاور */
.exam-retake-icon svg, .exam-run-icon svg { transition: transform .55s cubic-bezier(.34,1.2,.64,1); transform-origin: center; }
.exam-retake-icon:hover svg, .exam-run-icon:hover svg:has(use[href="#icon-refresh"]) { transform: rotate(360deg); }
/* سنجاق: هاور روی حالت آزاد → ژست سنجاق‌شدن؛ روی حالت سنجاق‌شده → تکان کوچک آزادشدن */
.exam-iconbtn[data-exam-pin] svg { transition: transform .3s var(--ease-pop); transform-origin: 62% 38%; }
.exam-iconbtn[data-exam-pin]:not(.on):hover svg { transform: rotate(-38deg) scale(1.12); }
.exam-iconbtn[data-exam-pin].on:hover svg { transform: rotate(14deg) scale(1.08); }
.exam-chip.attempts { background: #eaf8f4; color: #147b6b; direction: ltr; font-size: 10px; }

/* ===== انتخاب شرکت مجدد و تاریخچهٔ کارنامه‌ها ===== */
.exam-retake-modal, .exam-attempt-picker { display: grid; gap: 14px; }
.exam-retake-note, .exam-attempt-picker-head {
  padding: 12px 14px; border: 1px solid #eee3d7; border-radius: 13px;
  background: #fbf8f3; color: #706654; font-size: 12.5px; font-weight: 750;
}
.exam-retake-choices, .exam-attempt-list { display: grid; gap: 9px; }
.exam-retake-choice {
  width: 100%; display: grid; grid-template-columns: 42px minmax(0,1fr) 18px; align-items: center; gap: 11px;
  padding: 13px; border: 1px solid #e8dfd2; border-radius: 15px; background: #fff; color: var(--ink);
  font: inherit; text-align: start; cursor: pointer; transition: transform .18s var(--ease-soft), border-color .18s ease, box-shadow .18s ease, background .18s ease;
}
.exam-retake-choice:hover { transform: translateY(-2px); border-color: #efb27e; box-shadow: 0 10px 24px rgba(91,61,28,.08); background: #fffaf5; }
.exam-retake-choice.featured { border-color: #efc49e; background: #fffaf4; }
.exam-retake-choice > i { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 12px; background: #f4efe7; color: #8a7c66; }
.exam-retake-choice.featured > i { background: #ffe9d5; color: var(--orange); }
.exam-retake-choice > i svg { width: 19px; height: 19px; }
.exam-retake-choice > span { display: grid; gap: 4px; }
.exam-retake-choice b { font-size: 13px; font-weight: 900; }
.exam-retake-choice small { color: var(--muted); font-size: 11px; line-height: 1.7; }
.exam-retake-choice > svg { width: 16px; height: 16px; color: #b1a591; }
.exam-attempt-picker-head { display: flex; align-items: center; justify-content: space-between; }
.exam-attempt-picker-head em { padding: 4px 10px; border-radius: 999px; background: #eaf8f4; color: #147b6b; font-style: normal; font-weight: 900; direction: ltr; }
.exam-attempt-row {
  display: grid; grid-template-columns: 34px minmax(0,1fr) auto 18px; align-items: center; gap: 10px;
  padding: 11px 12px; border: 1px solid #e9e0d4; border-radius: 13px; background: #fff; color: var(--ink); font: inherit; text-align: start; cursor: pointer;
  transition: border-color .16s ease, background .16s ease, transform .16s var(--ease-soft);
}
.exam-attempt-row:hover { border-color: #efb27e; background: #fffaf4; transform: translateY(-1px); }
.exam-attempt-index { width: 32px; height: 32px; display: grid; place-items: center; border-radius: 10px; background: var(--orange); color: #fff; font-size: 12px; font-weight: 900; }
.exam-attempt-main, .exam-attempt-score { display: grid; gap: 3px; }
.exam-attempt-main b { font-size: 12.5px; }.exam-attempt-main small,.exam-attempt-score small { color: var(--muted); font-size: 10.5px; }
.exam-attempt-score { text-align: center; }.exam-attempt-score b { color: var(--orange); font-size: 15px; }
.exam-attempt-row > svg { width: 15px; height: 15px; color: #b1a591; }

/* ===== کارنامهٔ جامع ===== */
.rr-modal-head { align-items: center; }
.rr-modal-head > div:first-child { display: grid; gap: 3px; }
.rr-modal-head > div:first-child > span { color: var(--muted); font-size:12.5px; font-weight: 750; }
.rr-head-actions { display: flex; align-items: center; gap: 8px; }
.rr-attempt-select { display: flex; align-items: center; gap: 6px; padding: 3px 5px 3px 8px; border: 1px solid #e7ddd0; border-radius: 10px; background: #fffaf5; cursor: pointer; transition: border-color .16s ease, box-shadow .16s ease, background .16s ease; }
/* حالت تعاملی روی کلِ کادر (نه فقط قسمت select) */
.rr-attempt-select:hover, .rr-attempt-select:focus-within { border-color: var(--orange); box-shadow: 0 0 0 2px #f8d6ac; background: #fffdf9; }
.rr-attempt-select > span { padding: 3px 7px; border-radius: 7px; background: #eaf8f4; color: #147b6b; font-size:12px; font-weight: 900; direction: ltr; }
.rr-attempt-select select {
  flex: 1;
  min-width: 0;
  border: 0 !important;
  outline: 0 !important;
  box-shadow: none !important;
  appearance: none;
  -webkit-appearance: none;
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-size:13px;
  font-weight: 800;
  cursor: pointer;
}
.rr-attempt-select::after {
  content: "";
  width: 7px;
  height: 7px;
  flex: none;
  border-inline-end: 1.7px solid currentColor;
  border-block-end: 1.7px solid currentColor;
  color: #6f675c;
  transform: rotate(45deg) translateY(-2px);
  pointer-events: none;
}
.rr-report-shell { display: grid; grid-template-columns: 150px minmax(0,1fr); gap: 14px; padding: 14px; background: #f8f5ef; min-height: 590px; }
.rr-tabs { position: sticky; top: 0; align-self: start; display: grid; gap: 6px; padding: 7px; border: 1px solid #e9dfd2; border-radius: 16px; background: #fff; box-shadow: 0 8px 22px rgba(70,51,31,.05); }
.rr-tabs button {
  display: flex; align-items: center; gap: 8px; min-height: 42px; padding: 9px 10px; border: 0; border-radius: 11px; background: transparent; color: #776c5b;
  font: inherit; font-size:13px; font-weight: 850; text-align: start; cursor: pointer; transition: background .16s ease, color .16s ease, transform .16s var(--ease-soft);
}
.rr-tabs button:hover { background: #fff7ef; color: #9a5a1f; transform: translateX(-1px); }
.rr-tabs button.on { background: var(--orange); color: #fff; box-shadow: 0 8px 16px rgba(255,107,24,.18); }
.rr-tabs svg { width: 16px; height: 16px; }
.rr-report-content { min-width: 0; animation: ew-in .24s ease; }
.rr-overview,.rr-analysis,.rr-questions,.rr-answers,.rr-sheet,.rr-charts { display: grid; gap: 13px; }
.rr-info-grid { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 8px; }
.rr-info-grid article { display: flex; align-items: center; gap: 9px; min-width: 0; padding: 11px; border: 1px solid #e9dfd2; border-radius: 13px; background: #fff; }
.rr-info-grid article > i { flex: none; width: 34px; height: 34px; display: grid; place-items: center; border-radius: 10px; background: #fff0e3; color: var(--orange); }
.rr-info-grid article > i svg { width: 16px; height: 16px; }
.rr-info-grid article > span { min-width: 0; display: grid; gap: 3px; font-size:13px; font-weight: 900; }
.rr-info-grid article small { color: var(--muted); font-size:11.5px; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rr-note { display:flex; align-items:center; gap:8px; padding:11px 13px; border:1px solid #efd9ae; border-radius:12px; background:#fff9ec; color:#846326; font-size:13px; font-weight:800; }.rr-note svg{width:16px;height:16px}
.rr-section-head { display:flex; align-items:center; justify-content:space-between; gap:12px; padding:13px 15px; border:1px solid #e9dfd2; border-radius:14px; background:#fff; }.rr-section-head h3{margin:0 0 3px;font-size:15px}.rr-section-head p{margin:0;color:var(--muted);font-size:12.5px;line-height:1.7}.rr-legend{display:flex;gap:6px}.rr-legend span{padding:4px 8px;border-radius:999px;font-size:11.5px;font-weight:900}.rr-legend .ok{background:#eaf8f4;color:#168878}.rr-legend .bad{background:#fdeceb;color:#c24a3a}.rr-legend .blank{background:#f1eee8;color:#847968}
.rr-tree { display:grid; gap:8px; }.rr-tree-node{border:1px solid #e6dccf;border-radius:13px;background:#fff;overflow:hidden}.rr-tree-node>summary{display:flex;align-items:center;gap:10px;padding:10px 12px;cursor:pointer;list-style:none}.rr-tree-node>summary::-webkit-details-marker{display:none}.rr-tree-node[open]>summary{background:#fff8f0;border-bottom:1px solid #eee1d3}.rr-tree-node>summary>svg{width:14px;height:14px;color:#9c8b73;transition:transform .18s ease}.rr-tree-node[open]>summary>svg{transform:rotate(180deg)}.rr-tree-name{display:flex;align-items:center;gap:8px;min-width:120px}.rr-tree-name>i{width:26px;height:26px;display:grid;place-items:center;border-radius:8px;background:#f4efe7;color:#8c7f6d;font-style:normal;font-size:12px;font-weight:900}.rr-tree-name>span{display:grid;gap:1px}.rr-tree-name small{color:var(--muted);font-size:10.5px;font-weight:800}.rr-tree-name b{font-size:13px}.rr-tree-metrics{margin-inline-start:auto;display:flex;align-items:center;justify-content:flex-end;gap:4px;flex-wrap:wrap}.rr-metric{padding:3px 6px;border-radius:7px;background:#f4f1eb;color:#776d5e;font-size:10.5px;font-weight:750;white-space:nowrap}.rr-metric b{font-size:12px}.rr-metric.ok{background:#eaf8f4;color:#168878}.rr-metric.bad{background:#fdeceb;color:#c24a3a}.rr-metric.percent{background:#fff0e3;color:#a85b1b}.rr-metric.rank{background:#eef3fc;color:#4268a5}.rr-tree-children{display:grid;gap:7px;padding:8px 10px 10px;background:#fdfbf8}.rr-tree-node.depth-1{margin-inline-start:9px}.rr-tree-node.depth-2{margin-inline-start:18px}.rr-tree-node.depth-3,.rr-tree-node.depth-4,.rr-tree-node.depth-5{margin-inline-start:26px}
.rr-questions{display:grid!important;grid-template-columns:272px minmax(0,1fr);gap:10px;align-items:start}.rr-qmain{display:grid;gap:9px;min-width:0}.rr-qside{position:sticky;top:0;border:1px solid #e6dccf;border-radius:14px;background:#fff;overflow:hidden}.rrft-head{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:9px 12px;background:#f7f3ed;border-bottom:1px solid #eee1d3;color:#756a5a;font-size:10.5px;font-weight:900}.rrft-head button{border:1px solid #eadfd2;border-radius:8px;background:#fff;color:#786d5e;font:inherit;font-size:9px;font-weight:850;padding:4px 8px;cursor:pointer}.rr-filter-tree{max-height:58vh;overflow:auto;padding:7px}.rrft-row{display:flex;align-items:center;padding-inline-start:calc(var(--rrft-depth,0)*13px)}.rrft-caret{width:20px;height:26px;flex:none;display:grid;place-items:center;border:0;background:transparent;color:#9c8b73;cursor:pointer}.rrft-caret svg{width:11px;height:11px;transform:rotate(90deg);transition:transform .15s ease}.rrft-caret.open svg{transform:rotate(0deg)}.rrft-caret.hidden{visibility:hidden}.rrft-pick{flex:1;min-width:0;display:flex;align-items:center;gap:7px;padding:4px 7px;border:0;border-radius:9px;background:transparent;color:var(--ink);font:inherit;cursor:pointer;text-align:start}.rrft-pick:hover{background:#faf5ee}.rrft-check{width:15px;height:15px;flex:none;display:grid;place-items:center;border:1.5px solid #d6cab8;border-radius:5px;background:#fff}.rrft-row.on .rrft-check{background:var(--orange);border-color:var(--orange)}.rrft-row.on .rrft-check::after{content:"";width:7px;height:4px;border:1.6px solid #fff;border-width:0 0 1.6px 1.6px;transform:rotate(-45deg) translateY(-1px)}.rrft-row.implied .rrft-check{background:#fde8d5;border-color:#f3cba4}.rrft-row.on>.rrft-pick{background:#fff3e6}.rrft-info{display:grid;min-width:0}.rrft-info small{color:var(--muted);font-size:8px;font-weight:800}.rrft-info b{font-size:10.5px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.rrft-cnt{margin-inline-start:auto;flex:none;padding:2px 6px;border-radius:7px;background:#f4f1eb;color:#776d5e;font-size:8.5px;font-weight:850}.rrft-row.on .rrft-cnt{background:#fff;color:#a85b1b}.rrft-chips{display:flex;flex-wrap:wrap;gap:6px}.rrft-chips button{display:inline-flex;align-items:center;gap:5px;padding:4px 9px;border:1px solid #f3cba4;border-radius:999px;background:#fff3e6;color:#a85b1b;font:inherit;font-size:9.5px;font-weight:850;cursor:pointer}.rrft-chips button small{color:#c98d54;font-size:8px}.rrft-chips button svg{width:10px;height:10px}.rr-analysis-tree{border:1px solid #e6dccf;border-radius:14px;background:#fff;padding:9px 8px;overflow-x:auto}.rra-row{display:flex;align-items:center;gap:7px;padding:6px 8px;border-radius:10px}.rra-row[data-rra-open]{cursor:pointer}.rra-row[data-rra-open]:hover{background:#faf5ee}.rra-row.open>.rrft-caret svg{transform:rotate(0deg)}.rra-name{flex:1;min-width:0}.rra-name b{font-size:11px}.rra-row .rr-tree-metrics{flex:none;margin-inline-start:auto;display:grid;grid-auto-flow:column;grid-auto-columns:var(--rra-col,66px);align-items:center;gap:4px}.rra-row .rr-metric{text-align:center;padding-inline:3px;font-size:10px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.rra-row .rr-metric b{font-size:11.5px}.rra-children{display:grid;grid-template-rows:0fr;transition:grid-template-rows .32s cubic-bezier(.33,1,.68,1)}.rra-children.open{grid-template-rows:1fr}.rra-kids{overflow:hidden;min-height:0;margin-inline-start:17px;padding-inline-start:6px;border-inline-start:1px dashed #e9decd;opacity:0;transform:translateY(-5px);transition:opacity .26s ease,transform .32s cubic-bezier(.33,1,.68,1)}.rra-children.open>.rra-kids{opacity:1;transform:none}.rrft-children{display:grid;grid-template-rows:0fr;transition:grid-template-rows .32s cubic-bezier(.33,1,.68,1)}.rrft-children.open{grid-template-rows:1fr}.rrft-kids{overflow:hidden;min-height:0;opacity:0;transform:translateY(-5px);transition:opacity .26s ease,transform .32s cubic-bezier(.33,1,.68,1)}.rrft-children.open>.rrft-kids{opacity:1;transform:none}.rr-question-count{color:var(--muted);font-size:12.5px;font-weight:800}.rr-question-table{border:1px solid #e5dccf;border-radius:14px;overflow:auto;background:#fff}.rr-qrow{min-width:790px;display:grid;grid-template-columns:52px 128px 56px minmax(230px,1.7fr) 80px;align-items:center;gap:7px;padding:9px 10px;border:0;border-top:1px solid #f0e8dd;background:#fff;color:var(--ink);font:inherit;font-size:12.5px;text-align:center;width:100%}.rr-question-table:has(.rr-qrow>span:nth-child(7)) .rr-qrow{grid-template-columns:48px 118px 52px minmax(200px,1.5fr) 72px 100px 80px}.rr-qrow.head{position:sticky;top:0;z-index:2;border-top:0;background:#f7f3ed;color:#756a5a;font-weight:900}.rr-qrow:not(.head){cursor:pointer;transition:background .14s ease}.rr-qrow:not(.head):hover{background:#fffaf4}.rr-qrow.correct{box-shadow:inset -3px 0 #1aa58e}.rr-qrow.wrong{box-shadow:inset -3px 0 #ef5f4e}.rr-qrow.blank{box-shadow:inset -3px 0 #c9c0b2}.rr-qrow>span{min-width:0;display:flex;align-items:center;justify-content:center;gap:4px}.rr-qrow>span:first-child{display:grid}.rr-qrow>span:first-child b{font-size:14.5px}.rr-qrow small{color:var(--muted);font-size:10.5px}.rr-qopts i{width:24px;height:24px;display:grid;place-items:center;border:1px solid #ddd3c5;border-radius:8px;font-style:normal}.rr-qopts i.key{border-color:#6bc7aa;color:#168878}.rr-qopts i.picked{background:#f2eee7;box-shadow:inset 0 0 0 2px #8d806f}.rr-qopts i.key.picked{background:#1aa58e;color:#fff;box-shadow:none}.rr-path{display:grid!important;justify-content:start!important;justify-items:start;text-align:start;gap:2px}.rr-path b,.rr-path small{max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.rr-path small{font-size:11px}.rr-qrow.head .rr-path{font-weight:900}.rr-cohort{position:relative;padding:4px 7px;border-radius:8px;background:#eef4fd;color:#4268a5;font-weight:900}.rr-cohort em{position:absolute;inset-block-end:calc(100% + 7px);inset-inline-start:50%;width:210px;padding:9px;border:1px solid #d8e2f0;border-radius:10px;background:#fff;box-shadow:0 12px 26px rgba(40,56,79,.16);color:#514a40;font-style:normal;font-size:11px;line-height:1.8;text-align:start;opacity:0;pointer-events:none;transform:translateX(50%) translateY(4px);transition:.15s;z-index:6}.rr-cohort:hover em,.rr-cohort:focus em{opacity:1;transform:translateX(50%) translateY(0)}.rr-empty{padding:40px;text-align:center;color:var(--muted);font-size:13.5px}
.rr-answers{gap:12px}.rr-answer-wrap{display:grid;gap:7px}.rr-answer-ctx{display:flex;align-items:center;gap:8px}.rr-answer-ctx b{font-size:13.5px}.rr-answer-ctx small{color:var(--muted);font-size:12px;font-weight:800}.rr-answers .sq-item{margin:0}.rr-answer-card{border:1px solid #e5dccf;border-radius:15px;background:#fff;overflow:hidden}.rr-answer-card header{display:flex;align-items:center;gap:8px;padding:10px 12px;background:#faf7f2;border-bottom:1px solid #ede4d8}.rr-answer-card header>b{font-size:13.5px}.rr-answer-card header>small{color:var(--muted);font-size:11.5px}.rr-answer-card header>button{margin-inline-start:auto;display:inline-flex;align-items:center;gap:5px;border:0;background:transparent;color:var(--orange);font:inherit;font-size:12px;font-weight:900;cursor:pointer}.rr-answer-card header>button svg{width:12px;height:12px}.rr-status{padding:4px 8px;border-radius:999px;font-size:11px;font-weight:900}.rr-status.correct{background:#eaf8f4;color:#168878}.rr-status.wrong{background:#fdeceb;color:#c24a3a}.rr-status.blank{background:#f1eee8;color:#847968}.rr-answer-body{display:grid;grid-template-columns:minmax(0,1.3fr) minmax(230px,.7fr);gap:12px;padding:13px}.rr-explanation{padding:11px;border:1px solid #eee3d7;border-radius:12px;background:#fffaf5;font-size:13px;line-height:1.9}.rr-explanation>b{display:block;margin-bottom:7px;color:#168878}
.rr-sheet-legend{display:flex;gap:7px;flex-wrap:wrap}.rr-sheet-legend span{padding:4px 8px;border-radius:999px;font-size:11px;font-weight:900}.rr-sheet-legend .correct{background:#eaf8f4;color:#168878}.rr-sheet-legend .wrong{background:#fdeceb;color:#c24a3a}.rr-sheet-legend .blank{background:#f1eee8;color:#847968}.rr-sheet-legend .key{background:#fff0e3;color:#a85b1b}.rr-answer-sheet{display:grid;grid-template-columns:repeat(4,minmax(170px,1fr));gap:7px}.rr-sheet-cell{display:grid;grid-template-columns:30px minmax(0,1fr);align-items:center;gap:6px;padding:6px 8px;border:1px solid #e5dccf;border-radius:10px;background:#fff;color:var(--ink);font:inherit;cursor:pointer}.rr-sheet-cell.correct{border-color:#bfe3d8;background:#fbfffd}.rr-sheet-cell.wrong{border-color:#f1ccc7;background:#fffdfd}.rr-sheet-cell.blank{background:#faf8f4}.rr-sheet-cell>b{font-size:13px}.rr-sheet-cell>span{display:flex;gap:4px;justify-content:flex-end}.rr-sheet-cell i{width:23px;height:23px;display:grid;place-items:center;border:1px solid #ded4c6;border-radius:50%;font-style:normal;font-size:11px}.rr-sheet-cell i.key{border-color:#1aa58e;color:#168878}.rr-sheet-cell i.picked{background:#8c8172;color:#fff}.rr-sheet-cell i.key.picked{background:#1aa58e;color:#fff}
.rr-charts{gap:12px}.rr-chart-card{padding:14px;border:1px solid #e5dccf;border-radius:16px;background:#fff;box-shadow:0 8px 22px rgba(70,51,31,.04)}.rr-chart-head{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;margin-bottom:12px}.rr-chart-head>div:first-child{display:grid;gap:3px}.rr-chart-head b{font-size:14px}.rr-chart-head span{color:var(--muted);font-size:11.5px}.rr-time-legend{display:flex;align-items:center;gap:9px}.rr-time-legend span{display:inline-flex;align-items:center;gap:4px}.rr-time-legend i{width:8px;height:8px;border-radius:3px}.rr-time-legend .correct i{background:#1aa58e}.rr-time-legend .wrong i{background:#ef5f4e}.rr-time-legend .blank i{background:#e3a53d}.rr-time-lessons{display:grid;gap:12px}.rr-time-lesson{min-width:0;padding:11px 12px 0;border:1px solid #eee4d7;border-radius:13px;background:#fdfbf8;overflow:hidden}.rr-time-lesson>header{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:0 2px 9px}.rr-time-lesson>header>div{display:flex;align-items:center;gap:7px}.rr-time-lesson>header b{font-size:13px}.rr-time-lesson>header span{padding:3px 7px;border-radius:999px;background:#fff0e3;color:#a85b1b;font-size:10.5px;font-weight:900}.rr-time-lesson>header small{color:var(--muted);font-size:11px;font-weight:750}.rr-time-chart{direction:ltr;height:190px;display:flex;align-items:flex-end;gap:4px;padding:18px 8px 0;border-bottom:1px solid #dfd5c7;background:linear-gradient(180deg,#fff,#fdfaf6);overflow-x:auto}.rr-time-bar{flex:1;min-width:12px;height:100%;display:flex;flex-direction:column;align-items:center;justify-content:flex-end;gap:4px;padding:0;border:0;background:transparent;cursor:pointer}.rr-time-bar i{display:block;width:100%;max-width:22px;min-height:5px;border-radius:5px 5px 2px 2px;background:#c9c0b2;transition:transform .15s ease,filter .15s ease}.rr-time-bar.correct i{background:#1aa58e}.rr-time-bar.wrong i{background:#ef5f4e}.rr-time-bar.blank i{background:#e3a53d}.rr-time-bar:hover i{filter:brightness(.94);transform:scaleX(1.12)}.rr-time-bar b{font-size:10px;color:#7e7465}.rr-chart-switches{display:flex!important;flex-direction:row!important;gap:10px!important}.rr-chart-switches label{display:flex;align-items:center;gap:5px;color:#675e50;font-size:11px;font-weight:800}.rr-chart-switches input{accent-color:var(--orange)}.rr-chart-switches i{width:8px;height:8px;border-radius:50%}.rr-chart-switches i.answered{background:#ef8b3b}.rr-chart-switches i.correct{background:#1aa58e}.rr-line-chart{direction:ltr;width:100%;height:230px;overflow:visible}.rr-line-chart .grid{fill:none;stroke:#eee6dc;stroke-width:1}.rr-line-chart .series{fill:none;stroke-width:4;stroke-linecap:round;stroke-linejoin:round;transition:opacity .18s ease}.rr-line-chart .series.answered{stroke:#ef8b3b}.rr-line-chart .series.correct{stroke:#1aa58e}.rr-line-chart .series.hidden{opacity:0}.rr-line-chart text{font-size:12px;fill:#8d8273;text-anchor:middle}.rr-difficulty-chart{display:grid;grid-template-columns:repeat(auto-fit,minmax(210px,1fr));gap:10px}.rr-diff-gauge{display:grid;gap:9px;padding:13px;border:1px solid color-mix(in srgb,var(--rr-diff-color) 22%,#e8ded1);border-radius:15px;background:linear-gradient(180deg,color-mix(in srgb,var(--rr-diff-color) 5%,#fff),#fff);box-shadow:0 7px 18px rgba(62,48,34,.04)}.rr-diff-gauge>header{display:flex;align-items:center;justify-content:space-between;gap:10px}.rr-diff-gauge>header b{font-size:13.5px}.rr-diff-gauge>header strong{color:var(--rr-diff-color);font-size:19px;font-weight:950}.rr-semi-gauge{position:relative;width:min(190px,90%);height:98px;margin:2px auto 0;overflow:hidden}.rr-semi-gauge::before{content:"";position:absolute;inset:0 auto auto 0;width:100%;aspect-ratio:1;border-radius:50%;background:conic-gradient(from 270deg,var(--rr-diff-color) 0 calc(var(--rr-diff-rate)*1.8deg),#ece8e2 0 180deg,transparent 0)}.rr-semi-gauge::after{content:"";position:absolute;inset:20px 20px auto;width:calc(100% - 40px);aspect-ratio:1;border-radius:50%;background:#fff}.rr-semi-gauge>i{position:absolute;z-index:2;inset:auto auto 3px 50%;width:40%;height:2px;border-radius:2px;background:var(--rr-diff-color);transform-origin:left center;transform:rotate(calc(180deg + var(--rr-diff-rate)*1.8deg));box-shadow:0 1px 2px rgba(0,0,0,.12)}.rr-semi-gauge>span{position:absolute;z-index:3;inset:auto auto 0 calc(50% - 5px);width:10px;height:10px;border:3px solid var(--rr-diff-color);border-radius:50%;background:#fff}.rr-semi-gauge small{position:absolute;z-index:3;bottom:0;color:#877c6e;font-size:10px;font-weight:800}.rr-semi-gauge .start{left:0}.rr-semi-gauge .end{right:0}.rr-diff-gauge>p{margin:0;color:#756a5b;font-size:11.5px;font-weight:800;text-align:center}.rr-diff-gauge>footer{display:grid;grid-template-columns:repeat(3,1fr);gap:5px;padding-top:9px;border-top:1px solid #eee6dc}.rr-diff-gauge>footer span{display:flex;align-items:center;justify-content:center;gap:4px;color:#746a5c;font-size:10.5px;font-weight:750}.rr-diff-gauge>footer span>i{width:6px;height:6px;border-radius:50%}.rr-diff-gauge>footer .ok>i{background:#1aa58e}.rr-diff-gauge>footer .bad>i{background:#ef5f4e}.rr-diff-gauge>footer .blank>i{background:#c9c0b2}.rr-diff-gauge>footer b{font-size:12px}
@media(max-width:900px){.rr-report-shell{grid-template-columns:1fr}.rr-tabs{position:static;display:flex;overflow:auto}.rr-tabs button{flex:none}.rr-info-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.rr-questions{grid-template-columns:1fr}.rr-qside{position:static}.rr-filter-tree{max-height:250px}.rr-answer-sheet{grid-template-columns:repeat(2,minmax(160px,1fr))}.rr-answer-body{grid-template-columns:1fr}}
@media(max-width:560px){.rr-report-shell{padding:9px;min-height:0}.rr-tabs button span{display:none}.rr-tabs button{min-width:40px;justify-content:center}.rr-info-grid{grid-template-columns:1fr}.rr-filter-tree{max-height:210px}.rr-answer-sheet{grid-template-columns:1fr}.rr-tree-node.depth-1,.rr-tree-node.depth-2,.rr-tree-node.depth-3,.rr-tree-node.depth-4,.rr-tree-node.depth-5{margin-inline-start:5px}.rr-tree-node>summary{align-items:flex-start;flex-wrap:wrap}.rr-tree-metrics{width:100%;justify-content:flex-start}.rra-row{flex-wrap:wrap}.rra-kids{margin-inline-start:8px;padding-inline-start:4px}.rr-attempt-select{display:none}.exam-attempt-row{grid-template-columns:32px minmax(0,1fr) 16px}.exam-attempt-score{grid-column:2}.rr-chart-head{flex-direction:column}.rr-time-chart{overflow-x:auto}.rr-time-bar{min-width:12px}}

/* جزئیات تعاملی نمودار زمان و پاسخبرگِ چاپی */
.rr-time-chart { display: grid; grid-template-columns: repeat(var(--rr-time-capacity), minmax(28px,36px)); justify-content: start; align-items: end; gap: 8px; height: 196px; padding: 44px 15px 4px; overflow-x: auto; overflow-y: hidden; }
.rr-time-bar { position: relative; min-width: 0; width: 100%; }
.rr-time-bar i { width: min(22px,100%); }
.rr-time-tooltip { position: absolute; z-index: 7; left: 50%; bottom: 27px; min-width: 148px; display: grid; gap: 5px; padding: 9px 10px; border: 1px solid #ded4c7; border-radius: 10px; background: rgba(255,255,255,.98); box-shadow: 0 10px 22px rgba(54,40,25,.16); color: #574c3e; font-size:11px; text-align: start; direction: rtl; opacity: 0; pointer-events: none; transform: translate(-50%,6px); transition: opacity .14s ease, transform .14s ease; }
.rr-time-tooltip::after { content:""; position:absolute; inset:auto auto -5px 50%; width:8px; height:8px; border-right:1px solid #ded4c7; border-bottom:1px solid #ded4c7; background:#fff; transform:translateX(-50%) rotate(45deg); }
.rr-time-tooltip>strong { color: var(--ink); font-size:12px; }.rr-time-tooltip>span { display:flex; align-items:center; justify-content:space-between; gap:9px; }.rr-time-tooltip small { color:var(--muted); font-size:10.5px; }.rr-time-tooltip b { color:var(--ink); font-size:11.5px; }.rr-time-tooltip>.correct{color:#168878}.rr-time-tooltip>.wrong{color:#c24a3a}.rr-time-tooltip>.blank{color:#867b6c}.rr-time-bar:hover .rr-time-tooltip,.rr-time-bar:focus-visible .rr-time-tooltip { opacity: 1; transform: translate(-50%,0); }.rr-time-bar:focus-visible { outline: 2px solid #ee9a55; outline-offset: 3px; border-radius: 7px; }

.rr-sheet { display: grid; gap: 11px; }.rr-sheet-summary { display:flex; align-items:stretch; gap:7px; direction:rtl; }.rr-sheet-summary>span { flex:1; display:grid; gap:3px; padding:9px 10px; border:1px solid #e8dfd2; border-radius:10px; background:#fff; text-align:center; }.rr-sheet-summary small { color:var(--muted); font-size:10.5px; font-weight:800; }.rr-sheet-summary b { color:#665c4e; font-size:15px; font-weight:950; }.rr-sheet-summary .correct{background:#f5fdfa;border-color:#cfe8df}.rr-sheet-summary .correct b{color:#168878}.rr-sheet-summary .wrong{background:#fff9f8;border-color:#f1d4cf}.rr-sheet-summary .wrong b{color:#c24a3a}.rr-sheet-summary .blank{background:#fbfaf7}.rr-answer-sheet { direction:ltr; display:grid; grid-template-columns:repeat(auto-fill,minmax(158px,186px)); gap:8px; align-items:start; padding:2px; }.rr-sheet-column { overflow:hidden; border:1px solid #d8d0c4; border-radius:5px; background:#fff; box-shadow:none; }.rr-sheet-question { width:100%; display:grid; grid-template-columns:26px repeat(4,1fr); align-items:center; gap:4px; min-height:31px; padding:4px 6px; border:0; border-top:1px dashed #ded7cc; background:#fff; color:var(--ink); font:inherit; cursor:pointer; text-align:center; transition:background .14s ease,transform .14s ease; }.rr-sheet-question:first-of-type { border-top:0; }.rr-sheet-question:hover { background:#fff9f2; }.rr-sheet-question:focus-visible { position:relative; z-index:2; outline:2px solid #ee9a55; outline-offset:-2px; }.rr-sheet-question>b { font-size:12px; font-weight:950; }.rr-sheet-question>i { width:20px; height:20px; justify-self:center; display:grid; place-items:center; border:1px solid #cfc6ba; border-radius:4px; background:#fff; color:#776c5d; font-size:10px; font-style:normal; font-weight:850; }.rr-sheet-question .key { border-color:#d99a31; color:#9b6818; box-shadow:inset 0 0 0 1px #fff7e9; }.rr-sheet-question.correct .picked { border-color:#1aa58e; background:#1aa58e; color:#fff; box-shadow:none; }.rr-sheet-question.wrong .picked { border-color:#ef5f4e; background:#ef5f4e; color:#fff; box-shadow:none; }.rr-sheet-question.blank { background:#fcfbf9; }.rr-sheet-question.blank>i { opacity:.82; }
@media(max-width:760px){.rr-sheet-summary{flex-wrap:wrap}.rr-sheet-summary>span{min-width:calc(50% - 4px)}}@media(max-width:480px){.rr-time-chart{grid-template-columns:repeat(var(--rr-time-capacity),30px)}}

/* ===== نمودار زمانِ هر سؤال (بازطراحی) + تولتیپ شناورِ مرکزی جلوی صفحه ===== */
.rr-time-card { position: relative; }
.rr-time-scroll { overflow-x: auto; overflow-y: visible; border-bottom: 1px solid #e6dcce; border-radius: 0 0 4px 4px; background: linear-gradient(180deg,#fffdfa,#fbf7f1); }
.rr-time-chart { display: grid; grid-template-columns: repeat(var(--rr-time-capacity), minmax(14px,1fr)); grid-auto-rows: 150px; justify-content: stretch; align-items: end; column-gap: 4px; row-gap: 12px; width: 100%; min-width: max-content; height: auto; padding: 16px 14px 8px; overflow: visible; background: none; border: 0; }
.rr-time-bar { position: relative; height: 150px; min-width: 0; width: 100%; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 4px; padding: 0; border: 0; background: transparent; cursor: pointer; }
.rr-time-bar i { display: block; width: 100%; max-width: 20px; min-height: 6px; border-radius: 6px 6px 3px 3px; background: linear-gradient(180deg,#d3cabb,#c2b8a7); transition: transform .16s ease, filter .16s ease, box-shadow .16s ease; }
.rr-time-bar.correct i { background: linear-gradient(180deg,#33c0a6,#159683); }
.rr-time-bar.wrong i { background: linear-gradient(180deg,#f5745f,#e04b39); }
.rr-time-bar.blank i { background: linear-gradient(180deg,#eab861,#dd9a34); }
.rr-time-bar b { font-size:10px; color: #8b8071; font-weight: 800; }
.rr-time-bar:hover i, .rr-time-bar:focus-visible i { filter: brightness(1.03); transform: translateY(-2px) scaleX(1.06); box-shadow: 0 6px 14px rgba(70,50,29,.16); }
.rr-time-bar:focus-visible { outline: 0; }
.rr-time-float { position: absolute; z-index: 40; top: 0; left: 0; min-width: 118px; display: grid; gap: 4px; padding: 8px 10px; border: 1px solid #e6dcce; border-radius: 11px; background: rgba(255,255,255,.99); box-shadow: 0 12px 28px rgba(54,40,25,.2); color: #574c3e; font-size:11px; text-align: start; direction: rtl; opacity: 0; pointer-events: none; transform: translateY(3px) scale(.9); transform-origin: bottom center; transition: opacity .15s ease, transform .17s cubic-bezier(.34,1.3,.64,1); }
.rr-time-float.on { opacity: 1; transform: translateY(0) scale(1); }
.rr-time-float strong { color: var(--ink); font-size:12.5px; }
.rr-time-float .rr-tf-badge { justify-self: start; padding: 1px 8px; border-radius: 999px; font-size:10.5px; font-weight: 900; }
.rr-tf-badge.correct { background: #e8f7f2; color: #147c6b; } .rr-tf-badge.wrong { background: #fdecea; color: #c8452f; } .rr-tf-badge.blank { background: #f4efe6; color: #8a7c5f; }
.rr-time-float .rr-tf-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.rr-time-float .rr-tf-row small { color: var(--muted); font-size:10.5px; } .rr-time-float .rr-tf-row b { color: var(--ink); font-size:12px; }

/* ===== نمودار زیرمجموعه‌ای «مشاهده شده / پاسخ داده / درست زده» در طول آزمون ===== */
.rr-timeline-wrap { position: relative; }
.rr-area-chart { direction: ltr; width: 100%; height: 240px; overflow: visible; display: block; }
.rr-area-chart .grid { fill: none; stroke: #efe7dc; stroke-width: 1; }
.rr-area-chart .rr-area { stroke: none; transition: opacity .2s ease; }
.rr-area-chart .rr-area.seen { fill: url(#rr-tl-seen-fill); }
.rr-area-chart .rr-area.answered { fill: url(#rr-tl-answered-fill); }
.rr-area-chart .rr-area.correct { fill: url(#rr-tl-correct-fill); }
.rr-area-chart .rr-edge { fill: none; stroke-width: 2.4; stroke-linejoin: round; stroke-linecap: round; transition: opacity .2s ease; }
.rr-area-chart .rr-edge.seen { stroke: #858c92; } .rr-area-chart .rr-edge.answered { stroke: #e0761f; } .rr-area-chart .rr-edge.correct { stroke: #12907b; }
.rr-area-chart .rr-area.hidden, .rr-area-chart .rr-edge.hidden { opacity: 0; }
.rr-area-chart text { font-size:12px; fill: #9a8f7f; text-anchor: middle; }
/* اعداد دقیقهٔ نمودار تجمعی: HTML جدا از SVG تا با کشیده‌شدن SVG (preserveAspectRatio:none) دفرمه نشوند */
.rr-bh-xlabels { position: relative; height: 15px; margin-top: -21px; direction: ltr; pointer-events: none; }
.rr-bh-xlabels span {
  position: absolute; top: 0; transform: translateX(-50%);
  font-size:12px; font-weight: 700; color: #9a8f7f; line-height: 1; white-space: nowrap;
}
.rr-tl-cursor line { stroke: #b7ab98; stroke-width: 1.2; stroke-dasharray: 3 3; }
.rr-tl-cursor circle { stroke: #fff; stroke-width: 2; }
.rr-tl-cursor circle.seen { fill: #858c92; } .rr-tl-cursor circle.answered { fill: #e0761f; } .rr-tl-cursor circle.correct { fill: #12907b; }
.rr-tl-cursor circle.off { display: none; }
.rr-tl-hit { cursor: crosshair; }
.rr-tl-tip { position: absolute; z-index: 40; top: 6px; left: 0; min-width: 150px; display: grid; gap: 4px; padding: 9px 11px; border: 1px solid #e6dcce; border-radius: 12px; background: rgba(255,255,255,.99); box-shadow: 0 12px 28px rgba(54,40,25,.2); color: #574c3e; direction: rtl; text-align: start; opacity: 0; pointer-events: none; transform: translateY(-4px) scale(.94); transform-origin: top center; transition: opacity .15s ease, transform .16s cubic-bezier(.34,1.3,.64,1); }
.rr-tl-tip.on { opacity: 1; transform: translateY(0) scale(1); }
.rr-tl-tip strong { color: var(--ink); font-size:12.5px; margin-bottom: 1px; }
.rr-tl-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; font-size:11px; }
.rr-tl-row small { color: var(--muted); display: inline-flex; align-items: center; gap: 5px; }
.rr-tl-row small::before { content: ""; width: 8px; height: 8px; border-radius: 3px; background: #c9c0b2; }
.rr-tl-row.seen small::before { background: #858c92; } .rr-tl-row.answered small::before { background: #e0761f; } .rr-tl-row.correct small::before { background: #12907b; }
.rr-tl-row b { color: var(--ink); font-size:12.5px; font-weight: 900; }
.rr-tl-row.rate { border-top: 1px dashed #eee3d5; padding-top: 4px; margin-top: 1px; }
.rr-tl-row.rate small::before { display: none; }
.rr-chart-switches i.seen { background: #858c92; }

/* آمار درختی فشرده‌تر: جا برای میانگین زمان هر گره */
.rr-metric.avg { background:#eef3fc; color:#4268a5; }

/* ===== ریزتنظیم لیست آزمون‌ها و مرحله دوم سازنده شخصی ===== */
/* ستون‌ها کشسان و کوچک‌شونده‌اند تا کل جدول بدون اسکرول افقی در عرض موجود جا شود */
.exam-table {
  /* فشرده‌شده تا کل جدول بدون اسکرول افقی جا شود: درست/غلط/نزده و تاریخ (دوخطی) باریک‌تر */
  --exam-cols:
    minmax(90px, 1.2fr)
    minmax(26px, .3fr)
    minmax(40px, .46fr)
    minmax(32px, .38fr)
    minmax(54px, .74fr)
    minmax(56px, .66fr)
    minmax(58px, .68fr)
    minmax(52px, .6fr)
    /* با افزوده‌شدن آیکون «آزمون مشابه»، کف ستون باید جای ۶ آیکون + دکمهٔ کارنامه
       را داشته باشد؛ وگرنه محتوا سرریز می‌کند و کارنامه به لبهٔ ردیف می‌چسبد */
    minmax(226px, .9fr);
  /* ستون آخر نباید max-content باشد: هر ردیف یک گرید مستقل است و عرضِ وابسته به محتوا
     در هر ردیف متفاوت حل می‌شود و سلول‌ها را نسبت به سرستون‌ها جابه‌جا می‌کند */
  width: 100%;
  min-width: 0;
}
.exam-thead,
.exam-tr {
  grid-template-columns: var(--exam-cols);
  column-gap: 7px;
  padding-inline: 12px;
}
.exam-thead {
  min-height: 48px;
  font-size: 10px;
}
/* سرستون‌ها نباید ستون را گشاد کنند؛ در تنگنا سه‌نقطه می‌شوند */
.exam-thead > span { min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.exam-tr {
  min-height: 62px;
  padding-block: 9px;
}
.exam-td-name {
  align-content: center;
  gap: 5px;
}
.exam-name-line > b {
  font-size: 13px;
}
.exam-name-sub > small {
  font-size: 10px;
}
.exam-td-org {
  color: #655b4d;
  font-size: 11.2px;
  font-weight: 850;
  line-height: 1.65;
  white-space: normal !important;
  overflow: visible !important;
  text-overflow: clip !important;
  word-break: normal;
}
.exam-cwb {
  justify-content: center;
}
.exam-td-actions {
  justify-content: center;
  gap: 3px;
  flex-wrap: wrap;
}
.exam-td-actions > .exam-window-state {
  flex: 0 0 100%;
  max-width: none;
  justify-content: center;
  white-space: normal;
  overflow-wrap: anywhere;
}
/* آیکون‌ها فشرده‌تر تا با دکمهٔ کارنامه در ستون فعالیت‌ها (۱۹۰px) جا شوند */
.exam-td-actions .exam-iconbtn { width: 25px; height: 25px; }
.exam-td-actions .exam-iconbtn svg { width: 13px; height: 13px; }
.exam-td-actions .primary-button { height: 26px; padding-inline: 9px; font-size: 10px; }
.exam-td-actions .primary-button,
.exam-report-btn,
.exam-iconbtn {
  box-shadow: 0 3px 10px rgba(73, 52, 30, .035);
}

/* جزئیات جدول برگزارکننده */
.pro-owner-row .exam-td-metric { font-weight: 900; color: var(--ink); }
.pro-organizer-panel .exam-head-btns > button { white-space: nowrap; flex-shrink: 0; }
.pro-owner-row.is-draft .exam-name-line > b { color: #6d665b; }
.exam-hub-count {
  display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding-inline: 6px;
  border-radius: 999px; background: var(--orange-soft); color: var(--orange);
  font-style: normal; font-size: 11px; font-weight: 900;
}
.exam-hub-tab.on .exam-hub-count { background: rgba(255, 255, 255, .24); color: inherit; }

/* ویزارد: مرحله‌های قابل پرش (گذشته، و در ویرایش همه) */
.pro-stepper .exam-step.can-jump { cursor: pointer; border-radius: 12px; transition: background .16s ease; }
.pro-stepper .exam-step.can-jump:hover,
.pro-stepper .exam-step.can-jump:focus-visible { background: var(--orange-soft); outline: none; }
.pro-stepper .exam-step.can-jump:hover .exam-step-label { color: var(--orange); }

/* نوارِ «در حال ویرایش» بالای آزمون‌ساز */
.pro-edit-banner {
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: start; gap: 12px;
  margin: 0 0 14px; padding: 14px 16px; border: 1px solid #ffd7bd; border-radius: 16px;
  background: linear-gradient(180deg, #fff8f2, #fff);
}
.pro-edit-icon {
  display: grid; place-items: center; width: 38px; height: 38px; border-radius: 12px;
  background: var(--orange-soft); color: var(--orange);
}
.pro-edit-icon svg { width: 18px; height: 18px; }
.pro-edit-copy { display: grid; gap: 5px; min-width: 0; }
.pro-edit-copy > b { font-size: 14px; font-weight: 900; line-height: 1.7; }
.pro-edit-copy > b bdi { color: var(--muted); font-size: 12px; font-weight: 800; }
.pro-edit-copy > span { color: #6d665b; font-size: 12px; line-height: 1.9; }
.pro-edit-state {
  display: inline-block; margin-inline-start: 6px; padding: 1px 9px; border-radius: 999px;
  font-style: normal; font-size: 11px; font-weight: 900; background: #f1efe9; color: #6d665b;
}
.pro-edit-state.open { background: var(--teal-soft); color: var(--teal); }
.pro-edit-state.closed { background: #f1efe9; color: #6d665b; }
.pro-edit-state.upcoming { background: var(--blue-soft); color: var(--blue); }
.pro-edit-warn {
  display: flex; align-items: flex-start; gap: 6px; padding: 8px 10px; border-radius: 10px;
  background: var(--yellow-soft); color: #8a6512; font-size: 11.5px; line-height: 1.85;
}
.pro-edit-warn svg { flex: 0 0 auto; width: 14px; height: 14px; margin-top: 3px; }
@media (max-width: 640px) {
  .pro-edit-banner { grid-template-columns: auto minmax(0, 1fr); }
  .pro-edit-banner > button { grid-column: 1 / -1; justify-self: start; }
}

/* آزمون‌های منِ برگزارکننده: همان جدول فشردهٔ مدیریت آزمون دانش‌آموز، با ابزارهای مستقیم. */
/* جدولِ پهن فقط روی دسکتاپ/تبلت؛ روی گوشی (≤۷۶۰) هر آزمون یک کارت است و قاعده‌های کارتِ عمومیِ جدولِ آزمون‌ها اعمال می‌شود. */
@media (min-width: 761px) {
.pro-organizer-panel .exam-rows {
  container-type: normal; min-width: 0; max-width: 100%;
  overflow-x: auto; overflow-y: hidden; overscroll-behavior-inline: contain;
  border: 1px solid #eee5da; border-radius: 14px; background: #fff;
  scrollbar-width: thin; scrollbar-color: #d3c5b4 transparent;
}
.pro-organizer-panel .pro-owner-table {
  /* ستون فعالیت‌ها پهنای ثابت دارد (۵+۳+۳ اسلاتِ ۲۷px + جداکننده‌ها): پهنای وابسته به
     محتوا ردیف‌ها را از هم‌تراز درمی‌آورد. اگر جدول از قاب بزرگ‌تر شد، اسکرول افقی
     می‌گیرد و ستون نام چسبان می‌ماند؛ آیکون‌ها هرگز به سطر بعد نمی‌شکنند. */
  --pro-actions-w: 378px;
  display: block; width: 100%; min-width: 940px;
  --exam-cols: minmax(135px, 1.5fr) minmax(30px, .25fr) minmax(52px, .5fr)
    minmax(35px, .32fr) minmax(55px, .6fr) minmax(45px, .4fr)
    minmax(75px, .7fr) minmax(88px, .7fr) var(--pro-actions-w);
}
.pro-organizer-panel .pro-owner-table .exam-thead,
.pro-organizer-panel .pro-owner-table .pro-owner-row {
  display: grid; grid-template-columns: var(--exam-cols); grid-template-areas: none;
  column-gap: 7px; align-items: center; padding-inline: 11px;
}
.pro-organizer-panel .pro-owner-table .exam-thead {
  min-height: 48px; padding-block: 8px; border-bottom: 1px solid #eee5da;
  border-radius: 0; background: #faf6ef; color: #887b69;
  font-size: 10px; text-align: center;
}
.pro-organizer-panel .pro-owner-table .pro-owner-row,
.pro-organizer-panel .pro-owner-table .pro-owner-row:nth-child(odd) {
  min-height: 70px; padding-block: 4px; gap: 7px;
  border: 0; border-bottom: 1px solid #f0e9df; border-radius: 0;
  background: #fff; box-shadow: none;
}
.pro-organizer-panel .pro-owner-table .pro-owner-row:nth-child(odd) { background: #fffefa; }
.pro-organizer-panel .pro-owner-table .pro-owner-row:last-child { border-bottom: 0; }
.pro-organizer-panel .pro-owner-table .pro-owner-row:hover { background: #fff8f0; }
.pro-organizer-panel .pro-owner-table .pro-owner-row.pinned { background: #fff6ed; box-shadow: inset 3px 0 0 var(--orange); }
.pro-organizer-panel .pro-owner-row > .exam-td { grid-area: auto; }
.pro-organizer-panel .pro-owner-table .exam-th-name,
.pro-organizer-panel .pro-owner-row .exam-td-name {
  position: sticky; inset-inline-start: 0; z-index: 1;
  background: inherit; text-align: start;
}
.pro-organizer-panel .pro-owner-table .exam-th-name { z-index: 2; background: #faf6ef; }
.pro-organizer-panel .pro-owner-row .exam-td-name { gap: 3px; overflow: hidden; }
/* نامِ بلند تا دو خط می‌شکند تا کاملاً دیده شود؛ ردیف همچنان ۷۰px می‌ماند */
.pro-organizer-panel .pro-owner-row .exam-td-name .exam-name-line > b {
  font-size: 12.5px; line-height: 1.55; white-space: normal; text-overflow: clip;
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden;
}
.pro-organizer-panel .pro-owner-row .exam-td.tc {
  display: block; min-width: 0; overflow: hidden; text-align: center;
  white-space: nowrap; text-overflow: ellipsis;
}
.pro-organizer-panel .pro-owner-row .exam-td.tc::before { display: none; }
.pro-organizer-panel .pro-owner-row .exam-td-status { justify-self: stretch; }
.pro-organizer-panel .pro-owner-row .exam-run-date { align-items: center; }
.pro-organizer-panel .pro-owner-row .exam-td-actions {
  display: flex; align-content: center; align-items: center; justify-content: center; flex-wrap: nowrap;
  gap: 0; min-width: 0; width: auto; padding: 0;
  border: 0; direction: rtl; white-space: nowrap;
}
.pro-row-actions-group { display: inline-flex; align-items: center; flex: none; min-width: 0; }
.pro-row-actions-group + .pro-row-actions-group { margin-inline-start: 6px; padding-inline-start: 6px; border-inline-start: 1px solid #e8dccd; }
/* اسلات‌های ثابت: ابزارِ نبودنی جای خالی می‌ماند تا هر ابزار در همهٔ ردیف‌ها زیر همان ابزار بیفتد */
.pro-row-icons { display: inline-grid; grid-auto-flow: column; grid-auto-columns: 27px; align-items: center; gap: 3px; }
.pro-row-icons.s5 { grid-template-columns: repeat(5, 27px); }
.pro-row-icons.s4 { grid-template-columns: repeat(4, 27px); }
.pro-row-icons.s3 { grid-template-columns: repeat(3, 27px); }
.pro-row-slot { display: block; width: 27px; height: 27px; }
.pro-organizer-panel .pro-owner-row .exam-td-actions .exam-iconbtn { width: 27px; height: 27px; border-radius: 8px; }
.pro-organizer-panel .pro-owner-row .exam-td-actions .exam-iconbtn svg { width: 13px; height: 13px; }
.pro-row-action.warn { color: #af6611; background: #fff8ec; border-color: #f0d7ae; }
.pro-row-action.warn:hover { color: #92500a; background: #fff0d9; }
.pro-row-action.danger { color: #b94a47; background: #fff7f6; border-color: #efd5d2; }
.pro-row-action.danger:hover { color: #9e302e; background: #ffe9e7; border-color: #e5aba5; }
.pro-organizer-panel .pro-owner-row .exam-td-actions .exam-iconbtn:focus-visible { outline: 2px solid var(--orange); outline-offset: 2px; }
.pro-organizer-panel .exam-rows:focus-visible { outline: 2px solid var(--orange); outline-offset: 3px; }
}
@media (max-width: 760px) {
  /* اسلات‌های ثابتِ جدول روی کارتِ گوشی لازم نیست؛ آیکون‌ها آزادانه سطر می‌شوند */
  .pro-row-actions-group, .pro-row-icons { display: contents; }
  .pro-row-slot { display: none; }
  .pro-organizer-panel .pro-owner-row .exam-td-name { gap: 4px; }
}

/* نوار فیلترِ جدولِ برگزارکننده: چیپ‌های تیک‌دار به‌جای ستونِ کناری؛ جدول عرضِ کامل می‌گیرد */
.exam-manage-layout.is-toolbar { grid-template-columns: minmax(0, 1fr); gap: 12px; }
.exam-filter-bar {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px;
  padding: 10px 12px; border: 1px solid #eee5da; border-radius: 14px; background: #fffdf9;
}
.exam-filter-bar .qset-search { flex: 1 1 230px; max-width: 320px; margin: 0; }
.efb-group { display: inline-flex; align-items: center; flex-wrap: wrap; gap: 6px; min-width: 0; }
.efb-label { color: #8b7f6e; font-size: 11px; font-weight: 800; }
.efb-chip {
  position: relative; display: inline-flex; align-items: center; gap: 6px; min-height: 30px; padding: 3px 5px 3px 10px;
  border: 1px solid #eadfce; border-radius: 999px; background: #fff; color: #5c5346;
  font-size: 11.5px; font-weight: 800; cursor: pointer; user-select: none;
  transition: background .14s ease, border-color .14s ease, color .14s ease;
}
.efb-chip input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.efb-chip b { min-width: 20px; padding: 1px 6px; border-radius: 999px; background: #f3ede3; color: #7a6d58; font-size: 10px; font-weight: 900; text-align: center; }
.efb-chip:hover { border-color: #f0c9a3; background: #fff9f2; }
.efb-chip.on { border-color: #f3b88a; background: var(--orange-soft); color: #a65318; }
.efb-chip.on b { background: #ffdcbf; color: #a65318; }
.efb-chip:focus-within { outline: 2px solid var(--orange); outline-offset: 2px; }
.efb-more > summary { list-style: none; cursor: pointer; padding: 5px 10px; border-radius: 999px; border: 1px dashed #d8c9b3; color: #8b7f6e; font-size: 11px; font-weight: 800; }
.efb-more > summary::-webkit-details-marker { display: none; }
.efb-more[open] > summary { background: #fff5ea; color: #a65318; border-color: #f3b88a; }
.efb-more > div { display: inline-flex; flex-wrap: wrap; gap: 6px; margin-inline-start: 6px; }
.exam-filter-bar .qset-filter-clear { margin: 0 0 0 auto; }
/* عرضِ متوسط (تبلت/لپ‌تاپ کوچک): دو ستونِ کم‌اهمیت کنار می‌رود تا ستون فعالیت‌ها بریده نشود */
@media (min-width: 761px) and (max-width: 1120px) {
  .pro-organizer-panel .pro-owner-table { min-width: 810px; --exam-cols: minmax(120px, 1.5fr) minmax(28px, .25fr) minmax(50px, .5fr) minmax(42px, .4fr) minmax(72px, .7fr) minmax(84px, .7fr) var(--pro-actions-w); }
  .pro-organizer-panel .pro-owner-table .exam-thead > span:nth-child(4),
  .pro-organizer-panel .pro-owner-table .exam-thead > span:nth-child(5),
  .pro-organizer-panel .pro-owner-table .pro-owner-row > .exam-td.exam-td-booklets,
  .pro-organizer-panel .pro-owner-table .pro-owner-row > .exam-td.exam-td-org { display: none; }
}
.pro-confirm-body p { margin: 0 0 10px; line-height: 2; font-size: 13px; }
.pro-confirm-note { color: var(--muted); font-size: 12px !important; }
.pro-extend-body { display: grid; gap: 12px; }
.pro-extend-body p { margin: 0; font-size: 13px; }
.pro-extend-body > small { color: var(--muted); font-size: 11px; line-height: 1.8; }
.pro-extend-options { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.pro-extend-options button { min-height: 40px; justify-content: center; }
.pro-extend-options button svg { width: 14px; height: 14px; }
@media (max-width: 480px) { .pro-extend-options { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* پاپ‌آپِ «چاپ آزمون» برگزارکننده */
.pro-print-hub { display: grid; gap: 12px; }
.pro-print-lead { margin: 0; color: #5f584d; font-size: 12.5px; line-height: 2; }
.pro-print-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 10px; }
.pro-print-card {
  display: grid; grid-template-columns: 40px minmax(0, 1fr); align-items: start; gap: 10px 12px;
  padding: 14px; border: 1px solid var(--line); border-radius: 16px; background: #fff;
}
.pro-print-card > div:not(.pro-print-btns) { display: grid; gap: 4px; min-width: 0; }
.pro-print-card b { font-size: 13.5px; font-weight: 900; }
.pro-print-card small { color: var(--muted); font-size: 11.5px; line-height: 1.85; }
.pro-print-icon {
  display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px;
  background: var(--orange-soft); color: var(--orange);
}
.pro-print-icon svg { width: 18px; height: 18px; }
.pro-print-btns { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 8px; }
.pro-print-btns > button { min-height: 36px; font-size: 12px; }
.pro-print-all { border-color: #ffd7bd; background: linear-gradient(180deg, #fff8f2, #fff); }
.pro-print-all .pro-print-btns { justify-content: flex-start; }
.pstudio-exam-tpls .pstudio-sheet-btn { display: inline-flex; align-items: center; gap: 5px; }
.pstudio-exam-tpls .pstudio-sheet-btn svg { width: 14px; height: 14px; }

.ew-booklet {
  border-radius: 16px;
}
.ew-bk-head {
  grid-template-columns: 40px minmax(240px, 1fr) max-content max-content max-content;
  align-items: end;
  gap: 12px;
  padding: 16px 18px 14px;
}
.ew-bk-index {
  width: 38px;
  height: 38px;
  border-radius: 13px;
  font-size: 15px;
}
.ew-bk-name-wrap {
  align-self: end;
}
.ew-bk-name-wrap > span,
.ew-ls-field > span,
.ew-ls-time > span:first-child {
  margin-inline-start: 4px;
  font-size: 10.5px;
  font-weight: 700;
  color: #9a8c78;
}
.ew-bk-name {
  height: 44px;
  padding: 0 14px;
  border: 1px solid #e8ddce;
  border-radius: 13px;
  background: #fff;
  font-size: 14px;
  font-weight: 650;
  box-shadow: 0 6px 16px rgba(69, 50, 29, .035);
}
.ew-bk-stat {
  height: 36px;
  padding: 0 13px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 750;
}
.ew-bk-stat b { font-weight: 850; }
.ew-lesson-list {
  gap: 12px;
  padding: 12px 18px 0;
}
.ew-lesson-row {
  display: grid;
  grid-template-columns: 72px minmax(240px, 1fr) minmax(158px, 190px) 42px;
  align-items: end;
  gap: 12px;
  min-height: 82px;
  padding: 13px 14px;
  border-color: #eadfce;
  border-radius: 16px;
  background: linear-gradient(180deg, #fff, #fffdf9);
  box-shadow: 0 8px 20px rgba(70, 50, 29, .035);
}
.ew-ls-order {
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  align-self: end;
  border: 1px solid #e8ddcd;
  border-radius: 13px;
  background: #f7f3ed;
}
.ew-ls-order .ew-drag-handle {
  width: 18px;
}
.ew-ls-order .ew-grip {
  width: 14px;
  height: 14px;
}
.ew-ls-ord {
  width: 28px;
  height: 28px;
  border-radius: 10px;
  background: #fff;
  color: #6d6253;
  box-shadow: inset 0 0 0 1px #ece3d7;
}
.ew-ls-field,
.ew-ls-time {
  gap: 7px;
}
.ew-ls-name,
.ew-time-input {
  height: 44px;
  border-radius: 13px;
  border-color: #e3d7c8;
  background: #fff;
  box-shadow: 0 5px 14px rgba(69, 50, 29, .03);
}
.ew-ls-name {
  padding-inline: 12px;
  font-size: 13.5px;
  font-weight: 650;
}
.ew-time-input {
  padding-inline: 11px;
}
.ew-time-input svg {
  width: 15px;
  height: 15px;
}
.ew-ls-time .ew-time-input input {
  width: 56px;
  font-size: 14px;
  font-weight: 650;
}
.ew-time-input small {
  font-size: 11px;
}
.ew-mini.danger.icon-only {
  width: 44px;
  height: 44px;
  align-self: end;
  display: grid;
  place-items: center;
  padding: 0;
  border: 1px solid #e8ddce;
  border-radius: 13px;
  background: #fff;
  color: #9a8b78;
}
.ew-mini.danger.icon-only svg { width: 16px; height: 16px; }
.ew-mini.danger.icon-only:hover {
  border-color: #eab3a8;
  background: #fff5f3;
  color: #c24a3a;
  transform: translateY(-1px);
}
.ew-add-lesson {
  width: calc(100% - 36px);
  min-height: 46px;
  justify-content: center;
  margin: 2px 18px 16px;
  border-radius: 14px;
  background: #fffaf5;
  border-color: #dfccb5;
  font-size: 13px;
  font-weight: 900;
}
.ew-add-lesson:hover {
  background: #fff4e9;
  border-color: var(--orange);
}

@media (max-width: 900px) {
  .ew-bk-head {
    grid-template-columns: 38px minmax(0, 1fr) max-content max-content;
  }
  .ew-bk-head > .ew-mini {
    grid-column: auto;
  }
  .ew-lesson-row {
    grid-template-columns: 68px minmax(160px, 1fr) minmax(145px, 170px) 42px;
  }
}
@media (max-width: 680px) {
  .ew-bk-head {
    grid-template-columns: 38px minmax(0, 1fr) max-content;
  }
  .ew-bk-stat {
    grid-row: auto;
  }
  .ew-lesson-row {
    grid-template-columns: 62px minmax(0, 1fr) 42px;
    align-items: end;
  }
  .ew-ls-field {
    grid-column: 2;
  }
  .ew-ls-time {
    grid-column: 2 / 4;
    grid-row: 2;
    width: 100%;
  }
  .ew-lesson-row > .ew-mini {
    grid-column: 3;
    grid-row: 1;
  }
}

/* ===== کارنامه v88: جهت صحیح، تیک استاندارد و نتیجهٔ درس‌به‌درس ===== */
.rr-overview,
.rr-info-grid,
.rr-info-grid article,
.rr-info-grid article > span,
.rr-info-grid article small {
  direction: rtl;
  text-align: right;
}
.rr-info-grid article { justify-content: flex-start; }
.rr-info-grid article > span { flex: 1; }
.rr-info-grid article small { display: block; unicode-bidi: plaintext; }
.rrft-row.on .rrft-check::after {
  content: "";
  width: 4px;
  height: 8px;
  border: 0 solid #fff;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg) translate(-1px, -1px);
  transform-origin: center;
}
.rr-lesson-results { display: grid; gap: 10px; }
.rr-booklet-result {
  overflow: hidden;
  border: 1px solid #e6dccf;
  border-radius: 15px;
  background: #fff;
  box-shadow: 0 7px 18px rgba(62, 48, 34, .035);
}
.rr-booklet-result > header {
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 50px;
  padding: 8px 12px;
  border-bottom: 1px solid #eee3d6;
  background: linear-gradient(180deg, #fffaf4, #fbf6ef);
}
.rr-booklet-result > header > i {
  width: 30px;
  height: 30px;
  flex: none;
  display: grid;
  place-items: center;
  border-radius: 9px;
  background: #fff0e3;
  color: var(--orange);
}
.rr-booklet-result > header > i svg { width: 15px; height: 15px; }
.rr-booklet-result > header > div { display: grid; gap: 1px; }
.rr-booklet-result > header small { color: var(--muted); font-size:10.5px; font-weight: 800; }
.rr-booklet-result > header b { font-size:13px; }
.rr-booklet-result > header > span {
  margin-inline-start: auto;
  padding: 4px 8px;
  border-radius: 999px;
  background: #fff;
  color: #8a7259;
  font-size:11px;
  font-weight: 900;
}
@media (max-width: 700px) {
  .rr-lesson-results .rr-section-head { align-items: flex-start; }
  .rr-booklet-result > header { padding-inline: 9px; }
}

/* ===== بودجهٔ زمانی دفترچه‌ها: یک نوار برای هر دفترچه با سهم زمانی هر درس ===== */
.rr-timebudget { position: relative; display: grid; gap: 10px; width: 100%; max-width: 100%; min-width: 0; box-sizing: border-box; }
.rr-timebudget > .rr-section-head > span { flex: none; white-space: nowrap; color: #8a7259; font-size:11.5px; font-weight: 900; }
.rr-tb-card { overflow: hidden; border: 1px solid #e6dccf; border-radius: 15px; background: #fff; box-shadow: 0 7px 18px rgba(62,48,34,.035); }
.rr-tb-card > header { display: flex; align-items: center; gap: 9px; min-height: 50px; padding: 8px 12px; border-bottom: 1px solid #eee3d6; background: linear-gradient(180deg,#fffaf4,#fbf6ef); }
.rr-tb-card > header > i { width: 30px; height: 30px; flex: none; display: grid; place-items: center; border-radius: 9px; background: #fff0e3; color: var(--orange); }
.rr-tb-card > header > i svg { width: 15px; height: 15px; }
.rr-tb-card > header > div:not(.rr-tb-sum) { display: grid; gap: 1px; }
.rr-tb-card > header small { color: var(--muted); font-size:10.5px; font-weight: 800; }
.rr-tb-card > header b { font-size:13px; }
.rr-tb-sum { margin-inline-start: auto; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.rr-tb-sum > span { display: grid; gap: 1px; padding: 4px 9px; border: 1px solid #efe5d8; border-radius: 10px; background: #fff; text-align: center; }
.rr-tb-sum > span b { color: #6d6153; font-size:12.5px; font-weight: 950; direction: ltr; }
.rr-tb-sum > .rest b { color: #8d8375; }
.rr-tb-sum > .over { border-color: #f1d4cf; background: #fff9f8; }
.rr-tb-sum > .over b { color: #c8452f; }
.rr-tb-bar { display: flex; align-items: stretch; gap: 2px; height: 34px; margin: 12px 12px 0; padding: 3px; border-radius: 11px; background: #f6f2ec; direction: rtl; }
.rr-tb-seg { flex: 1 1 0; min-width: 5px; padding: 0; border: 0; background: transparent; cursor: pointer; }
.rr-tb-seg > i { display: block; width: 100%; height: 100%; border-radius: 7px; background: var(--rr-tb-color, #c9c0b2); transition: filter .16s ease, transform .16s ease; }
.rr-tb-seg.unused > i { background: repeating-linear-gradient(135deg,#e2dbd1 0 6px,#d8d0c4 6px 12px); }
.rr-tb-seg:hover > i, .rr-tb-seg:focus-visible > i { filter: brightness(1.06); transform: scaleY(1.1); }
.rr-tb-seg:focus-visible { outline: 0; }
.rr-tb-legend { display: flex; flex-wrap: wrap; gap: 6px 12px; padding: 10px 12px 12px; }
.rr-tb-legend span { display: inline-flex; align-items: center; gap: 5px; color: #6f6558; font-size:11px; font-weight: 800; }
.rr-tb-legend i { width: 9px; height: 9px; flex: none; border-radius: 3px; background: var(--rr-tb-color, #c9c0b2); }
.rr-tb-legend .unused i { background: repeating-linear-gradient(135deg,#e2dbd1 0 4px,#d8d0c4 4px 8px); }
.rr-tb-legend b { color: var(--ink); font-size:11.5px; font-weight: 900; }
.rr-tb-float { position: absolute; z-index: 40; top: 0; left: 0; min-width: 158px; display: grid; gap: 4px; padding: 8px 10px; border: 1px solid #e6dcce; border-radius: 11px; background: rgba(255,255,255,.99); box-shadow: 0 12px 28px rgba(54,40,25,.2); color: #574c3e; font-size:11px; text-align: start; direction: rtl; opacity: 0; pointer-events: none; transform: translateY(3px) scale(.92); transform-origin: bottom center; transition: opacity .15s ease, transform .17s cubic-bezier(.34,1.3,.64,1); }
.rr-tb-float.on { opacity: 1; transform: translateY(0) scale(1); }
.rr-tb-float strong { color: var(--ink); font-size:12.5px; }
.rr-tb-float .rr-tb-swatch { width: 26px; height: 4px; border-radius: 999px; background: var(--rr-tb-color, #c9c0b2); }
.rr-tb-float .rr-tf-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.rr-tb-float .rr-tf-row small { color: var(--muted); font-size:10.5px; }
.rr-tb-float .rr-tf-row b { color: var(--ink); font-size:12px; direction: ltr; unicode-bidi: plaintext; }
/* درست/غلط/نزده: اعداد هم‌ترتیبِ برچسب (راست‌به‌چپ) و رنگی، تا با bidi جابه‌جا نشوند */
.rr-tb-float .rr-tf-score b { direction: rtl; unicode-bidi: isolate; display: inline-flex; align-items: center; gap: 3px; }
.rr-tb-float .rr-tf-score b i { font-style: normal; font-weight: 900; font-size:12.5px; padding: 1px 5px; border-radius: 6px; }
.rr-tb-float .rr-tf-score b i.ok { background: #eaf8f4; color: #168878; }
.rr-tb-float .rr-tf-score b i.bad { background: #fdeceb; color: #c24a3a; }
.rr-tb-float .rr-tf-score b i.blank { background: #f6f2ea; color: #9a8a6d; }
.rr-tb-float .rr-tf-score b em { font-style: normal; color: #c3b8a6; font-size:11px; }
@media (max-width: 700px) {
  .rr-tb-card > header { flex-wrap: wrap; padding-inline: 9px; }
  .rr-tb-sum { margin-inline-start: 0; width: 100%; }
  .rr-tb-sum > span { flex: 1; }
  .rr-tb-bar { margin-inline: 9px; }
}

/* ===== وضعیت کلی کارنامه: کارت‌های اطلاعات یک‌دست، کاشی‌های آماری و جدول درس‌به‌درس ===== */
.rr-overview,
.rr-ov-info,
.rr-ov-stats,
.rr-lesson-results,
.rr-booklet-result {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
}
/* رنگ‌بندی یک‌دست کارت‌ها و کاشی‌ها بر پایهٔ تم سایت */
.rr-ov-info article,
.rr-ov-stats article { --tone: #b3540f; --tone-soft: #fff0e3; }
.rr-overview .tone-teal { --tone: #168878; --tone-soft: #eaf8f4; }
.rr-overview .tone-blue { --tone: #4268a5; --tone-soft: #eef3fc; }
.rr-overview .tone-yellow { --tone: #a97925; --tone-soft: #fbf1df; }
.rr-overview .tone-red { --tone: #c24a3a; --tone-soft: #fdeceb; }
.rr-overview .tone-purple { --tone: #7458b8; --tone-soft: #f2edff; }
.rr-overview .tone-gray { --tone: #847968; --tone-soft: #f1eee8; }
.rr-overview .tone-ink { --tone: #4a443b; --tone-soft: #f4f1eb; }

.rr-ov-info { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 9px; }
.rr-ov-info article {
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  min-height: 72px;
  padding: 12px 14px;
  border: 1px solid #e8dfd3;
  border-radius: 15px;
  background: linear-gradient(145deg, #fff, #fdfbf8);
  box-shadow: 0 7px 20px rgba(58, 43, 27, .035);
  transition: transform .18s var(--ease-soft), border-color .18s ease, box-shadow .18s ease;
}
.rr-ov-info article::after {
  content: "";
  position: absolute;
  inset-block: 20px;
  inset-inline-start: 0;
  width: 3px;
  border-radius: 3px;
  background: var(--tone);
  opacity: .35;
  transition: inset-block .24s var(--ease-soft), width .24s var(--ease-soft), opacity .2s ease, box-shadow .24s ease;
}
.rr-ov-info article:hover { transform: translateY(-2px); border-color: color-mix(in srgb, var(--tone) 32%, #e8dfd3); box-shadow: 0 10px 24px rgba(58, 43, 27, .06); }
.rr-ov-info article:hover::after { inset-block: 8px; width: 4.5px; opacity: 1; box-shadow: 2px 0 12px color-mix(in srgb, var(--tone) 45%, transparent); }
.rr-ov-info article > i {
  flex: none;
  width: 37px;
  height: 37px;
  display: grid;
  place-items: center;
  border-radius: 11px;
  background: var(--tone-soft);
  color: var(--tone);
  transition: transform .18s var(--ease-soft);
}
.rr-ov-info article:hover > i { transform: translateY(-1px) scale(1.05); }
.rr-ov-info article > i svg { width: 16px; height: 16px; }
.rr-ov-info article > div { min-width: 0; display: grid; gap: 2px; }
.rr-ov-info article small { color: var(--muted); font-size:10.5px; font-weight: 800; }
.rr-ov-info article b { overflow: hidden; color: #302b25; font-size:13px; font-weight: 900; text-overflow: ellipsis; white-space: nowrap; }
.rr-ov-info article span { overflow: hidden; color: #8a7f70; font-size:11px; font-weight: 750; text-overflow: ellipsis; white-space: nowrap; unicode-bidi: plaintext; }

.rr-ov-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(100px, 1fr)); gap: 8px; }
.rr-ov-stats article {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  min-height: 62px;
  padding: 10px;
  border: 1px solid #e8dfd3;
  border-radius: 14px;
  background: linear-gradient(180deg, #fff, #fdfbf8);
  box-shadow: 0 6px 16px rgba(61, 45, 28, .025);
  transition: transform .18s var(--ease-soft), border-color .18s ease, box-shadow .18s ease;
}
.rr-ov-stats article:hover { transform: translateY(-2px); border-color: color-mix(in srgb, var(--tone) 32%, #e8dfd3); box-shadow: 0 9px 20px rgba(61, 45, 28, .055); }
.rr-ov-stats article > i {
  flex: none;
  width: 31px;
  height: 31px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: var(--tone-soft);
  color: var(--tone);
}
.rr-ov-stats article > i svg { width: 14px; height: 14px; }
.rr-ov-stats article > div { min-width: 0; display: grid; gap: 1px; }
.rr-ov-stats article small { color: var(--muted); font-size:10.5px; font-weight: 800; line-height: 1.45; }
.rr-ov-stats article b { color: #302b25; font-size:16px; font-weight: 950; unicode-bidi: plaintext; }
.rr-ov-stats article span { color: #988d7d; font-size:9.5px; font-weight: 750; white-space: nowrap; }
.rr-ov-stats article.hero { grid-column: span 2; border-color: #f0cfae; background: linear-gradient(135deg, #fff5ec, #fff); }
.rr-ov-stats article.hero > i.rr-ov-ring {
  position: relative;
  width: 47px;
  height: 47px;
  border-radius: 50%;
  background: conic-gradient(var(--orange) calc(var(--rr-p) * 1%), #f3e2d0 0);
  box-shadow: 0 5px 13px rgba(255, 107, 24, .16);
}
.rr-ov-stats article.hero > i.rr-ov-ring::before {
  content: "";
  position: absolute;
  inset: 8px;
  border-radius: 50%;
  background: #fff;
  box-shadow: inset 0 0 0 1px #f6ece1;
}
.rr-ov-stats article.hero b { color: #b3540f; font-size:22px; }

.rr-lesson-section-head > span { flex: none; padding: 5px 10px; border-radius: 999px; background: #fff0e3; color: #a85b1b; font-size:11px; font-weight: 900; }
.rr-booklet-result { border-radius: 17px; box-shadow: 0 9px 24px rgba(62, 48, 34, .045); }
.rr-booklet-result > header { min-height: 57px; display: grid; grid-template-columns: max-content minmax(0, 1fr); align-items: center; padding: 9px 13px; background: linear-gradient(120deg, #fff8f1, #fdfbf8); }
.rr-booklet-result > header > .rr-booklet-summary { min-width: 0; margin-inline-start: auto; display: flex; align-items: center; justify-content: flex-end; gap: 5px; white-space: nowrap; }
.rr-booklet-result > header .rr-booklet-summary > span { display: inline-flex; align-items: center; gap: 3px; padding: 4px 8px; border: 1px solid #ebe2d7; border-radius: 8px; background: #fff; color: #7a6f61; font-size:10.5px; font-weight: 750; }
.rr-booklet-summary > span b { color: #332e28; font-size:11.5px; }
.rr-booklet-summary > strong { min-width: 48px; padding: 5px 9px; border-radius: 9px; background: #fff0e3; color: #a85b1b; font-size:13px; font-weight: 950; text-align: center; }

/* جدول نتیجهٔ درس‌به‌درس */
.rr-lt-wrap { overflow-x: auto; background: #fff; }
.rr-lt { width: 100%; min-width: 640px; border-collapse: collapse; font-size:12.5px; }
.rr-lt th, .rr-lt td { padding: 8px 9px; text-align: center; white-space: nowrap; vertical-align: middle; }
.rr-lt thead th { border-bottom: 1px solid #eee3d6; background: #f7f4ef; color: #7b7061; font-size:11px; font-weight: 900; }
.rr-lt thead th.ok { color: #168878; }
.rr-lt thead th.bad { color: #c24a3a; }
.rr-lt thead th.blank { color: #a97925; }
.rr-lt thead th.percent { color: #a85b1b; }
.rr-lt thead th.rank { color: #4268a5; }
.rr-lt th.lesson, .rr-lt td.lesson { min-width: 150px; padding-inline-start: 13px; text-align: start; }
.rr-lt tbody tr { transition: background .14s ease; }
.rr-lt tbody tr:nth-child(even) { background: #fdfbf8; }
.rr-lt tbody tr:hover { background: #fffaf5; }
.rr-lt tbody td { border-top: 1px solid #f3ece2; }
.rr-lt tbody tr:first-child td { border-top: 0; }
.rr-lt td.lesson i {
  display: inline-grid;
  place-items: center;
  width: 26px;
  height: 26px;
  margin-inline-end: 8px;
  border-radius: 8px;
  background: #f4efe7;
  color: #8a7d6c;
  vertical-align: middle;
}
.rr-lt td.lesson i svg { width: 13px; height: 13px; }
.rr-lt td.lesson b { font-size:13px; font-weight: 900; vertical-align: middle; }
.rr-lt-num {
  display: inline-grid;
  place-items: center;
  min-width: 36px;
  min-height: 25px;
  padding: 2px 8px;
  border-radius: 8px;
  background: #f4f1eb;
  color: #5c5546;
  font-size:13px;
  font-weight: 900;
}
.rr-lt-num.ok { background: #eaf8f4; color: #168878; }
.rr-lt-num.bad { background: #fdeceb; color: #c24a3a; }
.rr-lt-num.blank { background: #fff6da; color: #a97925; }
.rr-lt-num.rank { background: #eef3fc; color: #4268a5; }
.rr-lt td.rank, .rr-lt td.time { color: #9b917f; }
.rr-lt td.time { font-weight: 850; font-size:12.5px; color: #756a5b; unicode-bidi: plaintext; }
.rr-lt td.percent { min-width: 96px; }
.rr-lt-percent { display: grid; gap: 4px; min-width: 84px; }
.rr-lt-percent b { font-size:13.5px; font-weight: 950; }
.rr-lt-percent.high b { color: #168878; }
.rr-lt-percent.mid b { color: #a85b1b; }
.rr-lt-percent.low b { color: #c24a3a; }
.rr-lt-percent em { display: block; height: 5px; overflow: hidden; border-radius: 999px; background: #eee9e2; }
.rr-lt-percent em > i { display: block; width: calc(var(--rr-p) * 1%); height: 100%; border-radius: inherit; }
.rr-lt-percent.high em > i { background: linear-gradient(90deg, #26ae95, #5bc5b2); }
.rr-lt-percent.mid em > i { background: linear-gradient(90deg, #ed8a2c, #f3ac60); }
.rr-lt-percent.low em > i { background: linear-gradient(90deg, #e05a48, #ef8273); }
.rr-lt tfoot td { border-top: 2px solid #eadfd0; background: #fbf8f3; }
.rr-lt tfoot td.lesson i { background: #fff0e3; color: #a85b1b; }
.rr-lt tfoot td.lesson b { color: #7a5c33; font-size:12.5px; }
/* ردیف «جمع آزمون» زیر همهٔ دفترچه‌ها */
.rr-exam-total { border-color: #ecd3b6; }
.rr-exam-total .rr-lt thead th { background: #f9f2e8; }
.rr-exam-total .rr-lt tfoot td { border-top: 1px solid #f0e2cf; background: #fff6ec; }

@media (max-width: 900px) {
  .rr-ov-info { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 700px) {
  .rr-booklet-result > header { grid-template-columns: max-content minmax(0, 1fr); gap: 6px; padding-inline: 9px; }
  .rr-booklet-summary { gap: 3px; }
  .rr-booklet-result > header .rr-booklet-summary > span { padding-inline: 5px; }
  .rr-booklet-summary > strong { min-width: 42px; padding-inline: 6px; }
}
@media (max-width: 560px) {
  .rr-ov-info { grid-template-columns: 1fr; }
  .rr-ov-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .rr-ov-stats article.hero { grid-column: 1 / -1; }
}

/* ===== صفحهٔ مستقل کارنامه + مودال‌های متناسب با محتوا (v90) ===== */
.modal.compact { width: min(620px, 94vw); }
.modal.compact-wide { width: min(780px, 95vw); }
.modal.compact .modal-body,
.modal.compact-wide .modal-body { padding-inline: 22px; }
.modal.compact-wide .exam-merge { padding-block: 18px; }

.rr-report-page {
  width: min(1440px, 100%);
  margin-inline: auto;
  display: grid;
  gap: 12px;
  padding-bottom: 22px;
}
.rr-report-page-head {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  padding: 15px 17px;
  border: 1px solid #e7ddd0;
  border-radius: 18px;
  background: linear-gradient(135deg, #fffaf4, #fff);
  box-shadow: 0 9px 24px rgba(70, 51, 31, .055);
}
.rr-report-back {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 11px;
  border: 1px solid #e6d9ca;
  border-radius: 12px;
  background: #fff;
  color: #756a5b;
  font: inherit;
  font-size:12.5px;
  font-weight: 850;
  cursor: pointer;
  transition: border-color .16s ease, color .16s ease, transform .16s ease;
}
.rr-report-back:hover { border-color: #efb27e; color: var(--orange); transform: translateX(2px); }
.rr-report-back svg { width: 15px; height: 15px; }
.rr-report-title { min-width: 0; display: grid; gap: 2px; }
.rr-report-title > span { color: var(--orange); font-size:11.5px; font-weight: 900; }
.rr-report-title h1 { margin: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size:21px; }
.rr-report-title small { color: var(--muted); font-size:12px; font-weight: 750; }
.rr-report-page .rr-head-actions { justify-content: flex-end; flex-wrap: wrap; }
.rr-report-page-tabs {
  position: sticky;
  top: 10px;
  z-index: 12;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 7px;
  overflow-x: auto;
  border-color: #e3d7c8;
  border-radius: 15px;
  box-shadow: 0 9px 24px rgba(65, 46, 27, .08);
}
.rr-report-page-tabs button {
  min-width: 128px;
  flex: 1 0 auto;
  justify-content: center;
  min-height: 43px;
  white-space: nowrap;
}
.rr-report-page-tabs button:hover { transform: translateY(-1px); }
.rr-report-page-body {
  min-height: 560px;
  padding: 14px;
  border: 1px solid #e7ddd0;
  border-radius: 18px;
  background: #f8f5ef;
}
.rr-report-page-foot {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  min-height: 42px;
  padding: 8px 14px;
  border: 1px solid #e9dfd2;
  border-radius: 13px;
  background: #fff;
}
.rr-report-missing { min-height: 60vh; place-items: center; }
.rr-report-missing > div {
  max-width: 430px;
  display: grid;
  justify-items: center;
  gap: 10px;
  padding: 30px;
  border: 1px solid #e8ddcf;
  border-radius: 18px;
  background: #fff;
  text-align: center;
}
.rr-report-missing svg { width: 38px; height: 38px; color: var(--orange); }
.rr-report-missing h2, .rr-report-missing p { margin: 0; }
.rr-report-missing p { color: var(--muted); font-size:13px; line-height: 1.9; }
@media (max-width: 900px) {
  .rr-report-page-head { grid-template-columns: auto minmax(0, 1fr); }
  .rr-report-page .rr-head-actions { grid-column: 1 / -1; justify-content: stretch; }
  .rr-report-page .rr-head-actions > * { flex: 1; }
  .rr-report-page-tabs { top: 6px; }
}
@media (max-width: 560px) {
  .rr-report-page { gap: 8px; }
  .rr-report-page-head { padding: 11px; gap: 9px; border-radius: 14px; }
  .rr-report-back span { display: none; }
  .rr-report-back { width: 40px; padding: 0; justify-content: center; }
  .rr-report-title h1 { font-size:17px; }
  .rr-report-page-tabs { border-radius: 12px; }
  .rr-report-page-tabs button { min-width: 112px; }
  .rr-report-page-tabs button span { display: inline; }
  .rr-report-page-body { padding: 8px; border-radius: 14px; }
  .modal.compact, .modal.compact-wide { width: 100vw; max-height: 100vh; height: 100vh; border-radius: 0; }
}

/* ===== اشتراک‌گذاری آزمون (لینک + کد یکتا) ===== */
.exam-head-btns { display: flex; gap: 8px; flex-wrap: wrap; }
.exam-iconbtn.exam-share-icon.on {
  background: #2a9d8f; border-color: #2a9d8f; color: #fff;
  box-shadow: 0 3px 10px rgba(42, 157, 143, .32);
}
.exam-iconbtn.exam-share-icon.on:hover { background: #24897d; }
.exam-iconbtn.exam-share-icon:not(.on):hover svg { transform: scale(1.12) rotate(-8deg); }
.exam-iconbtn.exam-share-icon svg { transition: transform .22s ease; }
/* بایگانی آزمون: دکمهٔ ردیف + ورودیِ «بایگانی» در سرِ فهرست */
.exam-iconbtn.exam-archive-icon svg { transition: transform .22s ease; }
.exam-iconbtn.exam-archive-icon:not(.on):hover svg { transform: translateY(1px) scale(1.1); }
.exam-iconbtn.exam-archive-icon.on { background: #eef3f7; border-color: #c9d6e2; color: #45627c; }
.exam-iconbtn.exam-archive-icon.on:hover { border-color: #45627c; color: #2f4a61; }
.exam-tr.archived .exam-td-name b { color: var(--muted); }
.exam-archive-open b { min-width: 20px; padding: 1px 6px; border-radius: 999px; background: #eef3f7; color: #45627c; font-size: 11px; line-height: 16px; text-align: center; }
.exam-chip.shared { background: #e7f5f2; color: #1f7f73; border-color: #bfe5df; }
.exam-chip.hall-off { background: #f4f1ec; color: #7d7263; border-color: #e3dccf; }
.exam-share-body .omr-hub-lead { margin-top: 0; }
.exam-share-body > .omr-hub-lead + .field { margin-block-start: 14px; }
.exam-share-state {
  display: flex; align-items: flex-start; gap: 9px; padding: 11px 13px; border-radius: 12px;
  font-size: 12.5px; line-height: 1.9; margin-bottom: 13px;
}
.exam-share-state .ui-icon { flex: 0 0 auto; margin-top: 4px; }
.exam-share-state.on { background: #e7f5f2; color: #17695f; border: 1px solid #bfe5df; }
.exam-share-state.off { background: #fdefe7; color: #a04d1c; border: 1px solid #f3d3bb; }
.exam-share-row { display: flex; gap: 8px; align-items: stretch; }
.exam-share-row input { flex: 1 1 auto; min-width: 0; }
.exam-share-row .secondary-button, .exam-share-row .primary-button { flex: 0 0 auto; white-space: nowrap; }
.exam-share-code {
  flex: 1 1 auto; display: grid; place-items: center; padding: 10px 12px;
  background: #fff8ee; border: 1.5px dashed var(--orange, #e8722a); border-radius: 12px;
  font-size: 21px; font-weight: 900; letter-spacing: 2.5px; color: #b25419;
  user-select: all;
}
.exam-share-actions { display: flex; gap: 9px; align-items: center; justify-content: flex-end; flex-wrap: wrap; margin-top: 14px; }
.exam-share-actions .ghost-button.danger { color: #c0392b; border-color: #ecc4bd; }
.exam-share-actions .ghost-button.danger:hover { background: #fdf0ee; }
.exam-share-head { display: grid; gap: 3px; margin-bottom: 12px; }
.exam-share-head > b { font-size: 16px; }
.exam-share-head > small { color: #9a8c78; font-size: 12px; }
.exam-share-grid { margin-bottom: 12px; }
.exam-share-budget {
  display: grid; gap: 5px; padding: 10px 12px; max-height: 240px; overflow-y: auto;
  background: #fbf7f0; border: 1px solid #eee3d2; border-radius: 12px;
}
.exam-share-bk { display: flex; justify-content: space-between; gap: 8px; font-size: 12.5px; padding-top: 7px; }
.exam-share-bk:first-child { padding-top: 0; }
.exam-share-bk > span { color: #9a8c78; font-size: 11.5px; }
.exam-share-ls {
  display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 10px; align-items: center;
  background: #fff; border: 1px solid #efe6d7; border-radius: 9px; padding: 6px 10px; font-size: 12px;
}
.exam-share-ls small { color: #9a8c78; font-size: 11px; white-space: nowrap; }
/* ===== همگام‌سازی مجموعهٔ اشتراکی + تاریخچهٔ تغییرات ===== */
.qset-sync-share-row { align-items: center; }
.qset-sync-share-row .exam-pick-note { flex: 1 1 auto; margin: 0; }
.qset-sync-history { margin-bottom: 4px; }
.qset-sync-list {
  display: grid; gap: 6px; padding: 10px 12px; max-height: 300px; overflow-y: auto;
  background: #fbf7f0; border: 1px solid #eee3d2; border-radius: 12px;
}
.qset-sync-item {
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 9px; align-items: center;
  background: #fff; border: 1px solid #efe6d7; border-radius: 10px; padding: 7px 10px; font-size: 12.5px; line-height: 1.9;
}
.qset-sync-item > i { display: grid; place-items: center; width: 24px; height: 24px; border-radius: 8px; flex: 0 0 auto; }
.qset-sync-item > i .ui-icon { width: 14px; height: 14px; }
.qset-sync-item.add > i { background: #e7f5f2; color: #1f7f73; }
.qset-sync-item.remove > i { background: #fdf0ee; color: #c0392b; }
.qset-sync-item > small { color: #9a8c78; font-size: 10.5px; white-space: nowrap; }
.qset-sync-text b { font-weight: 800; }
.qset-sync-q {
  display: inline-block; padding: 1px 7px; margin: 0 2px; border-radius: 7px; cursor: pointer;
  background: #fff8ee; border: 1px dashed var(--orange, #e8722a); color: #b25419;
  font-size: 11.5px; font-weight: 800; letter-spacing: .4px; font-family: inherit;
}
.qset-sync-q:hover:not(:disabled) { background: #ffefdb; }
.qset-sync-q:disabled { cursor: default; opacity: .55; border-style: solid; border-color: #ddd2c0; color: #9a8c78; background: #f7f2e9; }
.qset-sync-summary { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
/* گزینهٔ «همگام‌سازی با اعضا» هنگام فعال‌سازی اشتراک‌گذاری */
.qset-share-sync-opt {
  display: flex; gap: 10px; align-items: flex-start; cursor: pointer;
  padding: 12px 13px; margin: 4px 0 2px; border-radius: 12px;
  background: #f7faf9; border: 1px solid #d7e8e3;
}
.qset-share-sync-opt input { margin-top: 3px; width: 17px; height: 17px; flex: 0 0 auto; accent-color: #2a9d8f; cursor: pointer; }
.qset-share-sync-opt > span { display: grid; gap: 3px; }
.qset-share-sync-opt b { font-size: 12.8px; color: #1f6f63; }
.qset-share-sync-opt small { font-size: 11.3px; line-height: 1.85; color: #6d7c78; }
@media (max-width: 640px) {
  .qset-sync-item { grid-template-columns: auto minmax(0, 1fr); }
  .qset-sync-item > small { grid-column: 2; justify-self: start; }
  .qset-sync-share-row { flex-direction: column; align-items: stretch; }
}
/* کارت نتایج جمعی در کارنامه */
.rr-shared-card {
  display: grid; gap: 12px; padding: 14px 15px;
  background: linear-gradient(135deg, #f4fbf9, #fdfaf4); border: 1px solid #cfe8e2; border-radius: 14px;
}
.rr-shared-card.solo {
  grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 10px;
  font-size:14px; line-height: 1.9; color: #4c6a63;
}
.rr-shared-card.solo .ui-icon { width: 22px; height: 22px; color: #2a9d8f; }
.rr-shared-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.rr-shared-head .ui-icon { color: #2a9d8f; }
.rr-shared-head b { font-size:15px; }
.rr-shared-head span { color: #8fa39d; font-size:13px; }
.rr-shared-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 9px; }
.rr-shared-tiles article {
  display: grid; gap: 3px; place-items: center; text-align: center;
  background: #fff; border: 1px solid #e4ded2; border-radius: 12px; padding: 10px 8px;
}
.rr-shared-tiles article span { font-size:13px; color: #9a8c78; font-weight: 700; }
.rr-shared-tiles article b { font-size:20px; }
.rr-shared-tiles article small { font-size:12.5px; color: #b3a790; }
.rr-shared-tiles article.hero { background: #2a9d8f; border-color: #2a9d8f; }
.rr-shared-tiles article.hero span, .rr-shared-tiles article.hero small { color: #d8efeb; }
.rr-shared-tiles article.hero b { color: #fff; }
.rr-shared-table { display: grid; border: 1px solid #e4ded2; border-radius: 12px; overflow: hidden; background: #fff; }
.rr-shared-row {
  display: grid; grid-template-columns: 52px minmax(0, 1fr) 90px 76px; gap: 8px; align-items: center;
  padding: 8px 12px; font-size:14px; border-top: 1px solid #f1ebe0;
}
.rr-shared-row.head { background: #faf6ee; color: #9a8c78; font-size:13px; font-weight: 800; border-top: 0; }
.rr-shared-row.me { background: #fff6ec; box-shadow: inset 3px 0 0 var(--orange, #e8722a); font-weight: 700; }
.rr-shared-row > span:first-child, .rr-shared-row > span:nth-child(3), .rr-shared-row > span:last-child { text-align: center; }
.rr-shared-name { display: flex; align-items: center; gap: 6px; min-width: 0; }
.rr-shared-name small { color: #b3a790; }
.rr-shared-name em {
  font-style: normal; font-size:12px; font-weight: 800; color: #fff;
  background: var(--orange, #e8722a); border-radius: 20px; padding: 1px 8px;
}
.rr-shared-more { padding: 7px 12px; font-size:13px; color: #9a8c78; border-top: 1px dashed #eee3d2; text-align: center; }
@media (max-width: 560px) {
  .exam-share-row { flex-direction: column; }
  .rr-shared-row { grid-template-columns: 38px minmax(0, 1fr) 64px 60px; padding-inline: 9px; }
}

/* اشتراک‌گذاری مجموعه‌سوال: حالت فعال آیکون روی کارت + دکمهٔ صفحهٔ جزئیات */
.qset-card-action.qset-share-icon.on {
  background: #2a9d8f; border-color: #2a9d8f; color: #fff;
  box-shadow: 0 3px 9px rgba(42, 157, 143, .3);
}
.qset-card-action.qset-share-icon.on:hover { background: #24897d; }
.qset-card-action.qset-share-icon:not(.on):hover svg { transform: scale(1.12) rotate(-8deg); }
.qset-card-action.qset-share-icon svg { transition: transform .22s ease; }
.secondary-button.qset-share-on {
  background: #e7f5f2; border-color: #bfe5df; color: #1f7f73;
}
.secondary-button.qset-share-on:hover { background: #d7efe9; }
/* لینک همگام‌سازی: وقتی فعال است آبی می‌شود (مثل اشتراک‌گذاری که سبز می‌شود) */
.qset-card-action.qset-sync-icon.on {
  background: #2563eb; border-color: #2563eb; color: #fff;
  box-shadow: 0 3px 9px rgba(37, 99, 235, .3);
}
.qset-card-action.qset-sync-icon.on:hover { background: #1d4fd0; }
.qset-card-action.qset-sync-icon:not(.on):hover svg { transform: scale(1.12) rotate(10deg); }
.qset-card-action.qset-sync-icon svg { transition: transform .22s ease; }
.secondary-button.qset-sync-on {
  background: #eef4ff; border-color: #c4d7f7; color: #2059c4;
}
.secondary-button.qset-sync-on:hover { background: #e0ecff; }

/* ===== نمودار فعالیت مدیران (نمای کلیِ مدیر اصلی) ===== */
.admin-activity-panel .aa-subtitle { display:block; font-size:11.5px; color:var(--muted); font-weight:500; margin-top:3px; }
#adminActivityBody, #questionTrendBody { padding: 4px 16px 16px; }
.aa-controls { display:flex; flex-wrap:wrap; gap:10px; align-items:center; justify-content:space-between; margin:6px 0 12px; }
.aa-seg { display:inline-flex; background:#f4f1ec; border:1px solid #e8e0d3; border-radius:12px; padding:3px; gap:2px; }
.aa-seg button {
  border:0; background:transparent; cursor:pointer; font:inherit; font-size:12.5px; font-weight:600;
  color:#8a7f6d; padding:6px 14px; border-radius:9px; transition:all .16s ease; white-space:nowrap;
}
.aa-seg button:hover { color:#5f5647; }
.aa-seg button.on { background:#fff; color:var(--orange,#e8722a); box-shadow:0 2px 6px rgba(0,0,0,.08); }
.aa-seg.metric button.on { color:#1f7f73; }
.aa-summary { display:flex; flex-wrap:wrap; gap:8px 16px; align-items:center; margin-bottom:8px; font-size:12.5px; }
.aa-sum { display:inline-flex; align-items:center; gap:5px; color:#5f5647; }
.aa-sum b { font-size:15px; color:#2c261d; }
.aa-sum .ui-icon { width:16px; height:16px; }
.aa-sum.c .ui-icon { color:#2a78d6; }
.aa-sum.r .ui-icon { color:#1baf7a; }
.aa-sum.muted { color:var(--muted); margin-inline-start:auto; }
/* نمودار */
.aa-chart-wrap { position:relative; width:100%; }
.aa-chart { width:100%; height:auto; display:block; overflow:visible; }
.aa-chart .aa-grid { stroke:#ece6db; stroke-width:1; }
.aa-chart .aa-ytick, .aa-chart .aa-xtick { fill:#a89c88; font-size:11px; font-family:inherit; }
.aa-chart .aa-ytick { text-anchor:end; }
.aa-chart .aa-xtick { text-anchor:middle; }
.aa-chart .aa-series path { transition:opacity .15s ease; }
.aa-chart .aa-cur-line { stroke:#c9beac; stroke-width:1.2; stroke-dasharray:4 4; }
.aa-tip {
  position:absolute; top:6px; z-index:40; min-width:180px; max-width:280px;
  background:#fff; border:1px solid #ece4d6; border-radius:13px; box-shadow:0 12px 30px rgba(60,45,20,.18);
  padding:10px 12px; pointer-events:none; opacity:0; transform:translateY(-4px); transition:opacity .13s ease, transform .13s ease;
}
.aa-tip.on { opacity:1; transform:translateY(0); }
.aa-tip > strong { display:block; font-size:12.5px; color:#2c261d; margin-bottom:8px; padding-bottom:7px; border-bottom:1px solid #f2ece1; }
.aa-tip-row { display:grid; grid-template-columns:26px 1fr auto; gap:8px; align-items:center; padding:4px 0; }
.aa-tip-av { width:26px; height:26px; border-radius:50%; overflow:hidden; background:#eee; }
.aa-tip-av img, .aa-tip-av svg { width:100%; height:100%; object-fit:cover; }
.aa-tip-name { display:flex; align-items:center; gap:6px; font-size:12px; font-weight:650; color:#3a332a; min-width:0; }
.aa-tip-name { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.aa-tip-name i { width:9px; height:9px; border-radius:3px; flex:0 0 auto; }
.aa-tip-vals { display:inline-flex; align-items:baseline; gap:3px; white-space:nowrap; }
.aa-tip-vals b { font-size:12.5px; color:#b3a68f; font-weight:700; }
.aa-tip-vals b.on { color:#2c261d; font-size:14px; }
.aa-tip-vals small { font-size:9.5px; color:#b3a68f; margin-inline-end:3px; }
.aa-tip-empty { font-size:12px; color:var(--muted); }
.aa-hit { cursor:crosshair; }
.aa-drill-hint { margin:6px 0 2px; padding:8px 10px; border:1px dashed #dfd5c6; border-radius:10px; color:#9b907f; background:#fcfaf6; font-size:9.5px; font-weight:700; text-align:center; }
.aa-drill { margin:8px 0 2px; padding:10px 12px 8px; border:1px solid #e7dfd3; border-radius:13px; background:#fcfaf7; }
.aa-drill > header { display:flex; align-items:center; justify-content:space-between; gap:10px; margin-bottom:8px; }
.aa-drill > header > div { display:flex; align-items:baseline; gap:8px; }
.aa-drill > header b { color:#4a4237; font-size:11px; font-weight:900; }
.aa-drill > header small { color:#9e9485; font-size:8.5px; font-weight:700; }
.aa-drill > header button { display:grid; place-items:center; width:24px; height:24px; padding:0; border:0; border-radius:7px; color:#968b7b; background:#eee9e2; cursor:pointer; }
.aa-drill > header button .ui-icon { width:13px; height:13px; }
.aa-drill-bars { display:grid; grid-auto-flow:column; grid-auto-columns:minmax(17px,1fr); align-items:end; gap:4px; min-height:83px; direction:ltr; }
.aa-drill-day { position:relative; display:grid; grid-template-rows:14px 55px 13px; align-items:end; justify-items:center; min-width:0; }
.aa-drill-day > b { color:#6f6558; font-size:7.5px; font-weight:850; }
.aa-drill-day > i { display:block; width:min(70%,18px); min-width:5px; border-radius:4px 4px 2px 2px; background:linear-gradient(180deg,#58aa8b,#27785f); transition:filter .14s ease; }
.aa-drill-day > small { overflow:hidden; max-width:100%; color:#9d9385; font-size:7px; font-weight:750; text-overflow:ellipsis; white-space:nowrap; }
.aa-drill-day:hover > i { filter:brightness(.88); }
.aa-drill-tip { position:absolute; bottom:75px; left:50%; z-index:30; display:none; width:max-content; min-width:125px; max-width:220px; transform:translateX(-50%); padding:7px 9px; border:1px solid #e5dccf; border-radius:9px; background:#fff; box-shadow:0 9px 24px rgba(60,45,20,.16); direction:rtl; }
.aa-drill-day:hover .aa-drill-tip { display:grid; gap:3px; }
.aa-drill-tip > strong { padding-bottom:4px; border-bottom:1px solid #eee7dc; color:#4d4439; font-size:9px; }
.aa-drill-tip > span { display:flex; align-items:center; justify-content:space-between; gap:14px; color:#357a65; font-size:8px; }
.aa-drill-tip > span b { overflow:hidden; max-width:145px; color:#6d6355; text-overflow:ellipsis; white-space:nowrap; }
.aa-drill-tip > em { color:#aaa092; font-size:8px; font-style:normal; }
/* راهنما = دکمه‌های کم/زیادکردن مدیرها */
.aa-legend-row { display:flex; flex-wrap:wrap; gap:8px; margin-top:14px; }
.aa-legend {
  display:inline-flex; align-items:center; gap:8px; cursor:pointer; font:inherit; text-align:start;
  background:#faf7f1; border:1px solid #ece4d6; border-radius:12px; padding:6px 10px 6px 8px; transition:all .15s ease;
}
.aa-legend:hover { border-color:#d9cdb8; background:#fff; }
.aa-legend.off { opacity:.42; filter:saturate(.5); }
.aa-legend.empty { cursor:default; opacity:.5; }
.aa-legend-sw { width:11px; height:11px; border-radius:4px; flex:0 0 auto; }
.aa-legend.off .aa-legend-sw { background:#c3bbac !important; }
.aa-legend-av { width:28px; height:28px; border-radius:50%; overflow:hidden; background:#eee; flex:0 0 auto; }
.aa-legend-av img, .aa-legend-av svg { width:100%; height:100%; object-fit:cover; }
.aa-legend-main { display:flex; flex-direction:column; line-height:1.35; min-width:0; }
.aa-legend-main b { font-size:12.5px; color:#2c261d; font-weight:650; }
.aa-legend-main small { font-size:10.5px; color:#9a8c78; }
.aa-legend-nums { display:inline-flex; gap:4px; margin-inline-start:4px; }
.aa-legend-nums i { font-style:normal; font-size:11px; font-weight:800; border-radius:7px; padding:2px 7px; }
.aa-legend-nums i.c { background:#e7f0fc; color:#2a78d6; }
.aa-legend-nums i.r { background:#e4f6ef; color:#178a63; }
.aa-legend-empty { font-size:12px; color:var(--muted); }

/* ===== تحلیل چرخهٔ کاری و هیت‌مپ مدیران ===== */
.admin-performance-panel { margin-top:18px; }
.ap-card-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(min(100%,520px),1fr)); gap:14px; padding:2px 16px 18px; }
.ap-card { padding:16px; border:1px solid #e9e0d3; border-radius:18px; background:linear-gradient(155deg,#fff 0%,#fcfaf6 100%); box-shadow:0 8px 24px rgba(79,60,32,.055); min-width:0; }
.admin-performance-panel > .ap-card { margin:2px 16px 18px; }
.ap-card > header { display:flex; align-items:center; justify-content:space-between; gap:10px; padding-bottom:12px; border-bottom:1px solid #eee7dc; }
.ap-person { display:flex; align-items:center; gap:9px; min-width:0; }
.ap-person .avatar { width:38px; height:38px; flex:0 0 38px; }
.ap-person > div { display:grid; gap:2px; min-width:0; }
.ap-person b { overflow:hidden; color:#332c23; font-size:13.5px; font-weight:900; text-overflow:ellipsis; white-space:nowrap; }
.ap-person small { color:#988d7c; font-size:10px; font-weight:700; }
.ap-active,.ap-setup { flex:0 0 auto; padding:4px 8px; border-radius:999px; font-size:9.5px; font-weight:850; }
.ap-active { color:#23735d; background:#e8f5ef; }
.ap-setup { color:#a76b16; background:#fff3d9; }
.ap-card section { margin-top:13px; }
.ap-card section > h4 { display:flex; align-items:center; gap:5px; margin:0 0 7px; color:#6d6254; font-size:10.5px; font-weight:850; }
.ap-card section > h4 .ui-icon { width:14px; height:14px; color:#cc762e; }
.ap-metrics { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:6px; }
.ap-metrics.reviewer-grid { grid-template-columns:repeat(5,minmax(0,1fr)); }
.ap-metric { display:grid; align-content:start; gap:2px; min-height:67px; padding:9px; border:1px solid #eee7dc; border-radius:12px; background:#fff; }
.ap-metric.creator { background:#fff8ee; border-color:#f2dfc3; }
.ap-metric.reviewer { background:#eef9f5; border-color:#d2ebe2; }
.ap-metric small { overflow:hidden; color:#918777; font-size:8.5px; font-weight:750; text-overflow:ellipsis; white-space:nowrap; }
.ap-metric b { color:#322b23; font-size:15px; font-weight:950; white-space:nowrap; }
.ap-metric span { color:#aaa093; font-size:7.8px; font-weight:700; line-height:1.4; }
.ap-heat-section { padding-top:11px; border-top:1px solid #eee7dc; }
.ap-heat-title { display:flex; align-items:baseline; justify-content:space-between; gap:10px; margin-bottom:7px; }
.ap-heat-title b { color:#5d5449; font-size:10px; font-weight:900; }
.ap-heat-title small { color:#aaa094; font-size:8px; font-weight:700; }
.ap-heatmap { display:grid; grid-template-columns:14px minmax(0,1fr); align-items:start; gap:5px; direction:ltr; }
.ap-heat-days { display:grid; grid-template-rows:repeat(7,9px); gap:3px; color:#aaa094; font-size:6.5px; font-weight:800; text-align:center; line-height:9px; }
.ap-heat-scroll { min-width:0; overflow-x:auto; overflow-y:visible; padding:1px 1px 28px; margin-bottom:-27px; scrollbar-width:thin; }
.ap-heat-grid { display:grid; grid-template-rows:repeat(7,9px); grid-auto-flow:column; grid-auto-columns:9px; gap:3px; width:max-content; min-width:100%; justify-content:end; }
.ap-heat-grid > i,.ap-heat-legend i { position:relative; display:block; width:9px; height:9px; border-radius:3px; background:#f0ece5; }
.ap-heat-grid > i.blank { visibility:hidden; }
.ap-heat-grid > i[data-level="1"],.ap-heat-legend i[data-level="1"] { background:#d9eee5; }
.ap-heat-grid > i[data-level="2"],.ap-heat-legend i[data-level="2"] { background:#add8c6; }
.ap-heat-grid > i[data-level="3"],.ap-heat-legend i[data-level="3"] { background:#75b99e; }
.ap-heat-grid > i[data-level="4"],.ap-heat-legend i[data-level="4"] { background:#3b9274; }
.ap-heat-grid > i[data-level="5"],.ap-heat-legend i[data-level="5"] { background:#176650; }
.ap-heat-cell { cursor:default; outline:none; }
.ap-heat-cell:hover,.ap-heat-cell:focus-visible { z-index:5; box-shadow:0 0 0 2px #fff,0 0 0 3px #45866f; }
.ap-heat-cell > span { position:absolute; bottom:16px; left:50%; z-index:20; display:none; width:max-content; max-width:210px; transform:translateX(-50%); padding:7px 9px; border:1px solid #e7ddcf; border-radius:9px; background:#fff; box-shadow:0 9px 23px rgba(60,45,20,.17); direction:rtl; text-align:right; }
.ap-heat-cell:hover > span,.ap-heat-cell:focus-visible > span { display:grid; gap:1px; }
.ap-heat-cell > span b { color:#443c32; font-size:9px; font-style:normal; }
.ap-heat-cell > span strong { color:#27755f; font-size:10px; font-style:normal; }
.ap-heat-cell > span small { color:#958a7b; font-size:7.5px; font-style:normal; white-space:nowrap; }
.ap-heat-legend { display:flex; align-items:center; justify-content:flex-end; gap:3px; margin-top:5px; color:#aaa094; font-size:7px; font-weight:700; direction:ltr; }
.admin-first-login-note > div,.auth-security-note { display:grid; gap:3px; padding:10px 12px; border:1px solid #cfe7dc; border-radius:11px; color:#286f5b; background:#edf8f3; }
.admin-first-login-note b,.auth-security-note { font-size:11px; font-weight:850; }
.admin-awaiting-password { display:block; margin-top:3px; color:#a76b16; font-size:8.5px; font-weight:800; white-space:nowrap; }
.admin-first-login-note b { display:flex; align-items:center; gap:5px; }
.admin-first-login-note small { color:#708b80; font-size:9.5px; font-weight:700; }
.auth-security-note { grid-template-columns:auto 1fr; align-items:center; margin:0 0 12px; line-height:1.8; }
.auth-security-note .ui-icon { width:16px; height:16px; }

/* بخش‌های مدیریت حساب در مودال ویرایش مدیر (تعلیق + دسترسی‌ها) */
.am-block { margin-top:16px; padding:13px 14px; border:1px solid #f0ebe2; border-radius:13px; background:#fdfbf8; }
.am-block h3 { display:flex; align-items:center; gap:6px; margin:0 0 10px; color:#332c24; font-size:11.5px; font-weight:900; }
.am-block h3 .ui-icon { width:15px; height:15px; }
.am-toggle { display:grid; grid-template-columns:auto 1fr; align-items:start; gap:9px; padding:10px 12px; border:1px solid #f0ebe2; border-radius:11px; background:#fff; cursor:pointer; }
.am-toggle input { width:16px; height:16px; margin-top:2px; accent-color:#c2554c; cursor:pointer; }
.am-toggle b { display:block; color:#332c24; font-size:11px; font-weight:850; }
.am-toggle small { display:block; margin-top:3px; color:#8f8577; font-size:9.5px; font-weight:700; line-height:1.7; }
.am-toggle.on { border-color:#f0cdc7; background:#fdf4f2; }
.am-toggle.on b { color:#a8443c; }
/* تعلیق یک هشدار است و قرمز درست است؛ «اعطای دسترسی» خبر خوبی است و با همان
   قرمز خوانده می‌شد انگار داری کار خطرناکی می‌کنی. رنگِ روشنِ اعطا سبزآبیِ سامانه است. */
.am-toggle.is-grant input { accent-color:var(--teal); }
.am-toggle.is-grant.on { border-color:#b9ded8; background:#f1faf8; }
.am-toggle.is-grant.on b { color:#12796d; }
/* مدیر اصلی این دسترسی را ذاتاً دارد: تیک روشن و قفل، بدون توهمِ قابل‌تغییر بودن */
.am-toggle.is-locked { cursor:default; opacity:.72; }
.am-toggle.is-locked input { cursor:default; }
.am-access-empty { margin:0; padding:11px 12px; border:1px dashed #e7e0d4; border-radius:11px; color:#aaa093; font-size:10px; font-weight:700; text-align:center; }
.am-access-list { display:grid; gap:7px; margin:0; padding:0; list-style:none; }
.am-access-list li { display:flex; align-items:center; justify-content:space-between; gap:10px; padding:8px 11px; border:1px solid #f0ebe2; border-radius:11px; background:#fff; }
.am-access-copy { display:flex; flex-wrap:wrap; align-items:center; gap:8px; min-width:0; }
.am-access-copy b { overflow:hidden; color:#332c24; font-size:11px; font-weight:850; text-overflow:ellipsis; white-space:nowrap; }
.am-access-copy small { color:#8f8577; font-size:9px; font-weight:700; line-height:1.8; }
.am-access-add { margin-top:9px; }
.am-access-copy .access-lesson-chips { flex:0 1 auto; }

/* انتخابگر مشترک دسترسی: هویت، محدوده، خلاصه و اقدام هر کدام یک ردیف کامل دارند. */
.access-scope-picker { display:grid; gap:18px; min-width:0; padding:18px; border:1px solid #e9e5dc; border-radius:16px; background:#fff; }
.access-editor-fields { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:14px; }
.access-editor-fields:not(.has-recipient) .access-role-control,
.access-editor-fields .access-mode-control { grid-column:1 / -1; }
.access-scope-picker .access-control-label { display:grid; align-content:start; gap:8px; min-width:0; margin:0; color:#615749; font-size:11.5px; font-weight:750; }
.access-scope-picker .select-control { width:100%; min-width:0; min-height:46px; margin:0; padding:10px 12px; border:1px solid #e4dfd5; border-radius:11px; background-color:#fff; color:#3b342a; font-size:12px; font-weight:700; }
.access-scope-picker .select-control:hover { border-color:#c8c0b2; }
.access-scope-picker .select-control:focus-visible { border-color:var(--teal); outline:3px solid #dff1ed; outline-offset:1px; }
.access-folder-scope { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); align-items:end; gap:14px; min-width:0; padding-top:18px; border-top:1px solid #f0ece4; }
.access-folder-control,.access-scope-summary { grid-column:1 / -1; }
.access-scope-picker .access-descendants { display:flex; gap:10px; align-items:center; min-height:76px; margin:0; padding:12px; border:1px solid #e4dfd5; border-radius:11px; background:#faf9f6; color:#5d5549; font-size:11.5px; font-weight:750; line-height:1.8; cursor:pointer; }
.access-descendants:has(input:checked) { border-color:#bcddd5; background:#f0f9f6; color:#226a59; }
.access-descendants:has(input:focus-visible) { outline:3px solid #dff1ed; outline-offset:2px; }
.access-scope-picker .access-descendants input[type="checkbox"] { flex:0 0 auto; width:18px; min-width:18px; height:18px; min-height:18px; margin:0; padding:0; accent-color:var(--teal); cursor:pointer; }
.access-descendants b { display:block; font-size:11.5px; font-weight:800; }
.access-descendants small { display:block; margin-top:3px; color:#7d897f; font-size:10px; font-weight:500; }
.access-scope-summary { display:flex; align-items:flex-start; gap:11px; margin:2px 0 0; padding:14px; border:1px solid #d7e8e1; border-radius:12px; background:#f5faf7; color:#426152; line-height:1.9; }
.access-summary-icon { display:flex; align-items:center; justify-content:center; flex:0 0 30px; width:30px; height:30px; border-radius:9px; background:#e2f1e9; color:#2c7b5d; }
.access-summary-icon .ui-icon { width:16px; height:16px; }
.access-scope-summary > div { min-width:0; }
.access-scope-summary strong { display:block; color:#315644; font-size:11px; font-weight:850; }
.access-scope-summary p { margin:3px 0 0; font-size:11.5px; font-weight:600; overflow-wrap:anywhere; }
.access-editor-actions { display:flex; justify-content:flex-end; padding-top:2px; }
.access-editor-actions .access-grant-submit { min-height:44px; min-width:158px; justify-content:center; padding-inline:16px; font-size:12px; }
.access-scope-picker [hidden] { display:none!important; }
.access-folder-summary { display:block; color:#5d4988; font-size:10px; font-weight:750; line-height:1.9; }
.access-lesson-hint { margin:0 0 7px; color:#8f8577; font-size:9.5px; font-weight:700; line-height:1.7; }
.access-lesson-grid { display:flex; flex-wrap:wrap; gap:6px; max-height:150px; overflow-y:auto; padding:8px; border:1px solid #f0ebe2; border-radius:11px; background:#fff; }
.access-lesson-opt { display:inline-flex; align-items:center; gap:5px; padding:5px 9px; border:1px solid #f0ebe2; border-radius:999px; background:#fbf9f5; color:#665c4e; cursor:pointer; font-size:10px; font-weight:800; }
/* ورودی چک‌باکس داخل مودال قاعدهٔ ارتفاع ۴۴px فرم را می‌گیرد؛ اینجا صریح بازنویسی می‌شود */
.access-lesson-grid .access-lesson-opt input[type="checkbox"] {
  flex:0 0 auto; width:13px; min-width:13px; height:13px; min-height:13px; margin:0; padding:0; accent-color:var(--primary);
}
.access-lesson-opt:has(input:checked) { border-color:#c9b9f7; background:#f3eeff; color:#4a3a86; }
.access-lesson-chips { display:inline-flex; flex-wrap:wrap; gap:4px; min-width:0; }
.access-lesson-chips b { padding:2px 8px; border-radius:999px; background:#f3eeff; color:#4a3a86; font-size:9.5px; font-weight:850; }
@media (max-width:640px) {
  .access-scope-picker { gap:16px; padding:14px; border-radius:13px; }
  .access-editor-fields,.access-folder-scope { grid-template-columns:minmax(0,1fr); }
  .access-folder-scope { gap:13px; padding-top:16px; }
  .access-scope-picker .access-descendants { min-height:70px; }
  .access-editor-actions .access-grant-submit { width:100%; }
}

/* پوشه‌های استثنا: دامنهٔ درسی باز است و اینجا چند پوشه از آن بیرون گذاشته می‌شود */
.am-access-list li.is-lesson { flex-wrap:wrap; }
.am-access-list li.is-lesson > .am-access-copy { flex:1 1 auto; }
.access-except { flex:1 1 100%; display:grid; gap:6px; margin-top:8px; padding-top:8px; border-top:1px dashed #f0ebe2; }
.access-except > b { color:#8f8577; font-size:9.5px; font-weight:850; }
.access-except > small { color:#aaa093; font-size:9px; font-weight:700; }
.access-except-chips { display:flex; flex-wrap:wrap; gap:5px; }
.access-except-chip { display:inline-flex; align-items:center; gap:4px; padding:3px 5px 3px 9px; border-radius:999px; background:#fdecec; color:#a53c3c; font-size:9.5px; font-weight:850; }
.access-except-chip i { font-style:normal; overflow:hidden; max-width:170px; text-overflow:ellipsis; white-space:nowrap; }
.access-except-chip button { display:inline-flex; align-items:center; justify-content:center; width:15px; height:15px; padding:0; border:0; border-radius:50%; background:rgba(165,60,60,.14); color:inherit; cursor:pointer; }
.access-except-chip button svg { width:9px; height:9px; }
.access-except-add { display:grid; grid-template-columns:minmax(0,1fr) auto; gap:6px; }
.access-except-add select { min-width:0; }
.access-except-count { display:inline-block; margin-top:4px; color:#a53c3c; font-size:9px; font-weight:800; }
@media (max-width:640px) { .access-except-add { grid-template-columns:1fr; } }

/* ===== رتبه‌بندی مدیران (amx) — کارت‌محور، شمارش یکتای هر سؤال ===== */
.amx-panel { overflow:hidden; }
.amx-panel .panel-header { flex-wrap:wrap; }
.amx-loading { display:flex; align-items:center; justify-content:center; gap:9px; padding:38px 18px; color:#a3907a; font-size:12.5px; font-weight:800; }
.amx-loading .ui-icon { width:17px; height:17px; animation:amx-spin 1.5s linear infinite; }
@keyframes amx-spin { to { transform:rotate(360deg); } }

.amx-summary { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:10px; padding:15px 19px 4px; }
.amx-tile { display:flex; align-items:center; gap:11px; min-width:0; padding:13px 14px; border:1px solid var(--line); border-radius:14px; background:linear-gradient(180deg,#fff,#fcfaf6); }
.amx-tile .ui-icon { flex:0 0 auto; width:19px; height:19px; color:#c2a271; }
.amx-tile > span { display:grid; gap:1px; min-width:0; }
.amx-tile b { color:#2c261e; font-size:19px; font-weight:950; line-height:1.2; }
.amx-tile small { color:#8d8375; font-size:11px; font-weight:800; }
.amx-tile i { overflow:hidden; color:#a99e8e; font-size:9.5px; font-style:normal; font-weight:700; text-overflow:ellipsis; white-space:nowrap; }

.amx-sort { display:flex; flex-wrap:wrap; gap:6px; padding:14px 19px 10px; }
.amx-sort button { padding:7px 14px; border:1px solid #e8e0d4; border-radius:999px; color:#7d7466; background:#fff; font-size:12px; font-weight:800; cursor:pointer; transition:.16s; }
.amx-sort button:hover { border-color:#d8c9ae; color:#4f4739; }
.amx-sort button[aria-selected="true"] { border-color:#2c261e; color:#fff; background:#2c261e; }

.amx-list { display:grid; gap:10px; padding:4px 19px 19px; }
.amx-card { overflow:hidden; border:1px solid var(--line); border-radius:16px; background:#fff; transition:box-shadow .18s,border-color .18s; }
.amx-card:hover { border-color:#e0d5c2; box-shadow:0 8px 22px rgba(48,40,28,.06); }
.amx-card.open { border-color:#d9cdb6; box-shadow:0 10px 26px rgba(48,40,28,.075); }
.amx-head { display:grid; grid-template-columns:auto minmax(150px,1.35fr) auto minmax(0,2.1fr) auto; align-items:center; gap:14px; padding:13px 15px; }

.amx-rank { display:grid; place-items:center; gap:0; width:38px; height:44px; border-radius:12px; color:#8d8477; background:#f6f3ed; }
.amx-rank b { font-size:14px; font-weight:950; }
.amx-rank .ui-icon { width:13px; height:13px; margin-bottom:-1px; }
.amx-rank.top-1 { color:#8a5c05; background:linear-gradient(180deg,#ffeaa4,#ffdd7a); }
.amx-rank.top-2 { color:#5f6b76; background:linear-gradient(180deg,#edf1f4,#dde4e9); }
.amx-rank.top-3 { color:#93542c; background:linear-gradient(180deg,#f6dcc7,#eec7a8); }

.amx-identity { display:flex; align-items:center; gap:10px; min-width:0; }
.amx-identity .avatar { flex:0 0 auto; width:44px; height:44px; }
.amx-identity > span { display:grid; gap:2px; min-width:0; }
.amx-identity strong { overflow:hidden; color:#332c24; font-size:14px; font-weight:900; text-overflow:ellipsis; white-space:nowrap; }
.amx-identity > span > small { overflow:hidden; color:#a1978a; font-size:10px; font-weight:700; text-overflow:ellipsis; white-space:nowrap; }
.amx-tags { display:flex; flex-wrap:wrap; align-items:center; gap:5px; margin-top:2px; }
.amx-tags .badge { padding:3px 8px; font-size:9px; }
.amx-tags i { color:#a49a8c; font-size:9.5px; font-style:normal; font-weight:750; white-space:nowrap; }
.amx-tags em { color:#b0761c; font-size:9.5px; font-style:normal; font-weight:850; }

/* جدول مدیران: هر ردیف دقیقاً همان ستون‌های ردیف‌های دیگر را دارد و داخل هر
   ستون هم سه سطر ثابت (عنوان / مقدار / توضیح) زیر هم می‌نشیند، پس عناصر هم‌نام
   در همهٔ ردیف‌ها هم‌تراز می‌مانند. */
.amx-manager-scroll { overflow-x:auto; scrollbar-width:thin; }
/* ۹ ستون با کف باریک، بدون gap و با پدینگ کم، تا کل ردیف در یک صفحه جا شود و
   نوار اسکرول افقی زیر کارت‌ها ظاهر نشود. */
.amx-manager-row { display:grid; grid-template-columns:minmax(160px,1.5fr) minmax(96px,.9fr) minmax(92px,.75fr) minmax(86px,.78fr) minmax(50px,.46fr) repeat(4,minmax(82px,.92fr)) 72px; align-items:stretch; gap:0; min-width:872px; padding:9px 12px; }
.amx-manager-cell { display:grid; grid-template-rows:13px 24px 13px; align-content:center; justify-items:center; gap:2px; min-width:0; min-height:54px; padding-inline:7px; text-align:center; border-inline-start:1px solid #f0ebe2; }
.amx-manager-cell:first-child { border-inline-start:0; }
.amx-manager-cell > small { align-self:center; overflow:hidden; color:#aaa093; font-size:8.5px; font-weight:750; text-overflow:ellipsis; white-space:nowrap; }
.amx-manager-cell > b { display:flex; align-items:center; justify-content:center; max-width:100%; overflow:hidden; color:#332c24; font-size:11.5px; font-weight:900; text-overflow:ellipsis; white-space:nowrap; }
.amx-manager-cell > i { align-self:center; overflow:hidden; color:#aaa093; font-size:8.5px; font-style:normal; font-weight:700; text-overflow:ellipsis; white-space:nowrap; }
/* آواتار هر سه سطر ستون نام را می‌گیرد تا جای خالی کنارش پر و خودش درشت شود */
.amx-manager-person { grid-template-columns:auto minmax(0,1fr); grid-template-areas:"av label" "av value" "av note"; column-gap:10px; justify-items:stretch; text-align:start; }
.amx-manager-avatar { grid-area:av; align-self:center; }
.amx-manager-person > small { grid-area:label; }
.amx-manager-person > b { grid-area:value; display:block; font-size:12.5px; }
.amx-manager-person > i { grid-area:note; }
.amx-manager-person .avatar { width:44px; height:44px; flex:0 0 44px; place-items:center; }
.amx-manager-person .avatar > .avatar-img,.amx-manager-person .avatar > .avatar-empty { width:100%; height:100%; object-fit:cover; display:block; }
.amx-manager-uid { color:#8f8577; }
.amx-manager-uid bdi { font-weight:850; }
.amx-manager-cell .badge { width:max-content; max-width:100%; padding:2px 7px; overflow:hidden; font-size:9px; text-overflow:ellipsis; white-space:nowrap; }
/* «ابزار متنی» زیر نوع مدیر: خطِ سومِ همان سلول، پس ارتفاع ردیف عوض نمی‌شود */
.amx-manager-cell > i.amx-tooltag.on { color:#12796d; font-weight:850; }
.amx-manager-metric > b { font-size:13.5px; }
/* در نمایشگر باریک که ردیف ناچار اسکرول می‌خورد، دکمه‌ها از دید خارج نشوند */
.amx-manager-row .amx-tools { position:sticky; inset-inline-end:0; z-index:2; align-self:stretch; align-items:center; justify-self:end; gap:2px; padding-inline:8px 0; background:linear-gradient(to right,#fff 74%,rgba(255,255,255,0)); }
.amx-manager-card.suspended { opacity:.72; }
.amx-manager-card.suspended .amx-manager-person > b { text-decoration:line-through; text-decoration-color:#d0857f; }

.amx-score { display:grid; justify-items:center; gap:4px; --amx-tone:#c2a271; }
.amx-score[data-tone="high"] { --amx-tone:#1aa392; }
.amx-score[data-tone="mid"] { --amx-tone:#d9a52b; }
.amx-score[data-tone="low"] { --amx-tone:#d78a6a; }
.amx-ring { position:relative; display:grid; place-items:center; width:54px; height:54px; border-radius:50%; background:conic-gradient(var(--amx-tone) var(--amx-ring,0%),#f0ece4 0); }
.amx-ring::after { position:absolute; inset:5px; border-radius:50%; background:#fff; content:""; }
.amx-ring b { position:relative; z-index:1; color:#2f2820; font-size:13px; font-weight:950; letter-spacing:-.2px; }
.amx-score small { color:#a1978a; font-size:9px; font-weight:800; }

.amx-kpis { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:8px; min-width:0; margin:0; padding:0; list-style:none; }
.amx-kpis li { display:grid; gap:1px; min-width:0; padding:8px 9px; border:1px solid #f0ebe2; border-radius:11px; background:#fcfaf7; text-align:center; }
.amx-kpis b { overflow:hidden; color:#2f2820; font-size:15px; font-weight:900; text-overflow:ellipsis; white-space:nowrap; }
.amx-kpis span { color:#8b8173; font-size:10px; font-weight:800; }
.amx-kpis small { overflow:hidden; color:#aaa093; font-size:9px; font-weight:700; text-overflow:ellipsis; white-space:nowrap; }

.amx-tools { display:flex; align-items:center; gap:4px; }
.amx-tools .row-action { width:30px; height:30px; margin:0; }
.amx-expand { display:grid; place-items:center; width:30px; height:30px; border:1px solid #e8e0d4; border-radius:9px; color:#8b8173; background:#fff; cursor:pointer; transition:.16s; }
.amx-expand:hover { border-color:#d3c4a8; color:#40382d; }
.amx-expand .ui-icon { width:15px; height:15px; transition:transform .2s; }
.amx-expand[aria-expanded="true"] { border-color:#2c261e; color:#fff; background:#2c261e; }
.amx-expand[aria-expanded="true"] .ui-icon { transform:rotate(180deg); }

.amx-detail { display:grid; gap:12px; padding:2px 15px 15px; border-top:1px dashed #ebe4d8; margin-top:2px; padding-top:14px; }
.amx-detail-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px; }
.amx-detail-grid.single { grid-template-columns:minmax(0,1fr); }
.amx-detail-grid.single .amx-stats { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); column-gap:22px; }
.amx-side { padding:13px 14px; border:1px solid #f0ebe2; border-radius:14px; background:#fcfaf7; }
.amx-side h4,.amx-breakdown h4 { display:flex; align-items:center; gap:6px; margin:0 0 9px; color:#4b4337; font-size:12px; font-weight:900; }
.amx-side h4 .ui-icon,.amx-breakdown h4 .ui-icon { width:15px; height:15px; color:#c2a271; }
.amx-stats { display:grid; gap:1px; margin:0; padding:0; list-style:none; }
.amx-stats li { display:grid; grid-template-columns:1fr auto; align-items:baseline; gap:4px 10px; padding:7px 0; border-bottom:1px solid #f2ede4; }
.amx-stats li:last-child { border-bottom:0; }
.amx-stats li > span { color:#877d6f; font-size:11.5px; font-weight:750; }
.amx-stats li > b { color:#2f2820; font-size:13.5px; font-weight:900; text-align:left; white-space:nowrap; }
.amx-stats li > small { grid-column:1 / -1; margin-top:-3px; color:#a89e90; font-size:9.5px; font-weight:700; }

.amx-breakdown { padding:13px 14px; border:1px solid #f0ebe2; border-radius:14px; background:#fff; }
.amx-bar { display:grid; grid-template-columns:minmax(120px,auto) 1fr auto; align-items:center; gap:10px; padding:5px 0; }
.amx-bar > span { display:flex; align-items:baseline; gap:5px; color:#7f7568; font-size:11.5px; font-weight:800; }
.amx-bar > span i { color:#b3a998; font-size:9px; font-style:normal; font-weight:700; }
.amx-bar > em { position:relative; display:block; height:8px; border-radius:99px; background:#ece5da; }
.amx-bar > em::after { position:absolute; inset-block:0; inset-inline-start:0; width:var(--amx-bar,0%); border-radius:99px; background:linear-gradient(-90deg,#efa94f,#1aa392); content:""; }
.amx-bar > b { min-width:26px; color:#2f2820; font-size:12.5px; font-weight:900; text-align:left; }
.amx-breakdown p { margin:9px 0 0; color:#a1978a; font-size:10px; font-weight:700; line-height:1.8; }

.amx-self .amx-head { grid-template-columns:auto minmax(150px,1.3fr) auto minmax(0,2fr); }

@media (max-width:1180px) {
  .amx-head { grid-template-columns:auto minmax(140px,1fr) auto auto; grid-template-areas:"rank identity score tools" "kpis kpis kpis kpis"; }
  .amx-head > .amx-rank { grid-area:rank; }
  .amx-head > .amx-identity { grid-area:identity; }
  .amx-head > .amx-score { grid-area:score; }
  .amx-head > .amx-kpis { grid-area:kpis; }
  .amx-head > .amx-tools { grid-area:tools; }
  .amx-self .amx-head { grid-template-columns:auto minmax(140px,1fr) auto; grid-template-areas:"rank identity score" "kpis kpis kpis"; }
}
@media (max-width:820px) {
  .amx-summary { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .amx-detail-grid { grid-template-columns:1fr; }
  .amx-kpis { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .amx-bar { grid-template-columns:1fr auto; grid-template-areas:"label value" "track track"; }
  .amx-bar > span { grid-area:label; }
  .amx-bar > em { grid-area:track; }
  .amx-bar > b { grid-area:value; }
}
@media (max-width:640px) {
  .amx-summary,.amx-sort,.amx-list { padding-inline:11px; }
  .amx-head { grid-template-columns:auto minmax(0,1fr) auto; grid-template-areas:"rank identity score" "kpis kpis kpis" "tools tools tools"; gap:10px; padding:11px; }
  .amx-self .amx-head { grid-template-areas:"rank identity score" "kpis kpis kpis"; }
  .amx-rank { width:32px; height:38px; }
  .amx-identity { gap:8px; }
  .amx-identity .avatar { width:38px; height:38px; }
  .amx-score { justify-items:end; }
  .amx-ring { width:46px; height:46px; }
  .amx-ring b { font-size:12px; }
  .amx-score small { display:none; }
  .amx-tile i { white-space:normal; }
  .amx-tools { justify-content:flex-end; padding-top:2px; border-top:1px solid #f4efe6; }
  .amx-detail { padding-inline:11px; }
  .amx-detail-grid.single .amx-stats { grid-template-columns:minmax(0,1fr); }
  .amx-sort { gap:5px; }
  .amx-sort button { padding:6px 11px; font-size:11px; }
}

/* هیت‌مپ تمام‌عرض مدیران؛ هر پله ۲۰ فعالیت و سطح آخر از ۱۰۰ به بالا */
.ap-full-panel { margin-top:18px; overflow:hidden; }
.ap-heat-empty { padding:34px; }
.ap-admin-heatmap-card.ap-full-panel { overflow:visible; }
.ap-admin-heatmap-card > header { align-items:center; }
.ap-admin-heatmap-card > header > div:first-child { min-width:0; }
.ap-admin-heatmap-card > header > div:first-child small { overflow:hidden; max-width:min(560px,52vw); text-overflow:ellipsis; white-space:nowrap; }
.ap-admin-heat-tools { display:flex; align-items:center; justify-content:flex-end; gap:8px; }
.ap-admin-heat-select { display:flex; align-items:center; gap:6px; color:#8a8176; font-size:8.5px; font-weight:800; }
.ap-admin-heat-select select { min-width:165px; height:31px; padding:3px 8px; border:1px solid #e1d8cc; border-radius:8px; color:#5d5449; background:#fff; font:inherit; font-size:9px; font-weight:750; outline:none; }
.ap-admin-heat-tip .created i { background:#df7a32; }
.ap-admin-heat-tip .reviewed i { background:#2f9e83; }
@media (max-width:640px) {
  .ap-admin-heatmap-card > header { align-items:flex-start; }
  .ap-admin-heatmap-card > header > div:first-child { display:grid; gap:1px; }
  .ap-admin-heatmap-card > header > div:first-child small { max-width:48vw; }
  .ap-admin-heat-tools { align-items:flex-end; flex-direction:column-reverse; }
  .ap-admin-heat-select span { display:none; }
  .ap-admin-heat-select select { min-width:135px; max-width:42vw; }
}
@media (max-width:640px) {
  .aa-controls { gap:8px; }
  .aa-seg button { padding:6px 10px; font-size:12px; }
  .aa-legend { flex:1 1 100%; }
}

/* ===== نمودار روند رشد سؤال‌ها (فیلتر پایه/رشته + سری‌های مخزن/پنل) ===== */
/* سه ناحیهٔ روشن: بازهٔ زمانی راست، فیلتر پایه/رشته وسط، نوع رشد چپ */
.qt-controls {
  display:grid;
  grid-template-columns:minmax(220px,1fr) minmax(300px,auto) minmax(220px,1fr);
  align-items:start;
  gap:14px 20px;
  direction:rtl;
}
.qt-gran-wrap { justify-self:start; }
.qt-mode-wrap { justify-self:end; }
.qt-gran-wrap,.qt-mode-wrap { display:flex; align-items:center; }
.question-trend-panel .qt-filters { display:flex; flex-direction:column; align-items:center; gap:7px; min-width:0; justify-self:center; }
.question-trend-panel .qt-filter-group { justify-content:center; }
.qt-filter-group { display:flex; flex-wrap:wrap; align-items:center; gap:6px; }
.qt-filter-label { font-size:11.5px; font-weight:700; color:#9a8c78; margin-inline-end:2px; min-width:34px; }
.qt-chip {
  border:1px solid #e8e0d3; background:#faf7f1; cursor:pointer; font:inherit; font-size:12px; font-weight:600;
  color:#7a6f5d; padding:5px 12px; border-radius:20px; transition:all .15s ease;
}
.qt-chip:hover { border-color:#d9cdb8; color:#5f5647; }
.qt-chip.on { background:var(--orange,#e8722a); border-color:var(--orange,#e8722a); color:#fff; box-shadow:0 2px 7px rgba(232,114,42,.28); }
.qt-dot { display:inline-block; width:9px; height:9px; border-radius:3px; margin-inline-end:2px; vertical-align:middle; }
.aa-tip-row.qt-tip-row { grid-template-columns:1fr auto; }
.aa-tip-row.qt-tip-row b { font-size:13.5px; color:#2c261d; }
.qt-legend .aa-legend-main small { color:#8a7f6d; }
@media (max-width:640px) {
  .qt-filter-label { min-width:100%; margin-bottom:-2px; }
}
@media (max-width:980px) {
  .qt-controls { grid-template-columns:1fr 1fr; }
  .question-trend-panel .qt-filters { grid-column:1 / -1; grid-row:2; width:100%; }
  .qt-gran-wrap { grid-column:1; grid-row:1; justify-self:start; }
  .qt-mode-wrap { grid-column:2; grid-row:1; justify-self:end; }
}
@media (max-width:640px) {
  .qt-controls { grid-template-columns:1fr; }
  .qt-gran-wrap,.qt-mode-wrap,.question-trend-panel .qt-filters { grid-column:1; width:100%; justify-self:stretch; }
  .qt-gran-wrap { grid-row:1; }
  .question-trend-panel .qt-filters { grid-row:2; }
  .qt-mode-wrap { grid-row:3; }
  .qt-gran-wrap .aa-seg,.qt-mode-wrap .aa-seg { width:100%; }
  .qt-gran-wrap .aa-seg button,.qt-mode-wrap .aa-seg button { flex:1; }
}

/* ===== بانک آزمون: درخت پوشه‌ها + انتخاب + بودجه‌بندی + ساخت ===== */
.exam-bank .exam-panel-head { margin-bottom: 6px; }
.eb-layout { align-items: start; }
.eb-side .eb-topic-btn { width: 100%; justify-content: center; margin-top: 4px; }
.eb-active-toggle { display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 3px 8px; cursor: pointer; background: #faf7f1; border: 1px solid #ece4d6; border-radius: 11px; padding: 9px 11px; margin: 8px 0 2px; }
.eb-active-toggle input { grid-row: span 2; width: 17px; height: 17px; accent-color: #1baf7a; cursor: pointer; }
.eb-active-toggle span { font-size: 12.5px; font-weight: 650; color: #2c261d; }
.eb-active-toggle small { font-size: 10.5px; color: #9a8c78; }
.eb-side-note { font-size: 11.5px; color: var(--muted); line-height: 1.9; margin: 10px 2px 0; }
/* کلیدِ دو حالتِ نمایش: درس‌محور / مرحله‌ای */
.eb-view-switch { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; background: #f4efe7; border: 1px solid #ece4d6; border-radius: 11px; padding: 3px; margin: 10px 0 6px; }
.eb-view-btn { border: 0; background: none; cursor: pointer; font: inherit; font-size: 11.5px; font-weight: 700; color: #8a7f6d; border-radius: 8px; padding: 7px 4px; display: inline-flex; align-items: center; justify-content: center; gap: 5px; transition: background .15s ease, color .15s ease, box-shadow .15s ease; }
.eb-view-btn .ui-icon { width: 14px; height: 14px; }
.eb-view-btn:hover { color: #5f5646; }
.eb-view-btn.on { background: #fff; color: #2c261d; box-shadow: 0 1px 3px rgba(60,45,20,.12); }
.eb-view-note { font-size: 11px; color: var(--muted); line-height: 1.85; margin: 0 2px 4px; }
.eb-topic-chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0 8px; }
.eb-topic-chip { display: inline-flex; align-items: center; gap: 5px; background: #eef3fc; color: #3a5fa0; border: 1px solid #d3e0f5; border-radius: 20px; padding: 4px 6px 4px 11px; font-size: 11.5px; font-weight: 600; }
.eb-topic-chip button { border: 0; background: none; cursor: pointer; color: inherit; display: inline-flex; padding: 0; opacity: .7; }
.eb-topic-chip button:hover { opacity: 1; }
.eb-topic-chip .ui-icon { width: 13px; height: 13px; }
.eb-main { min-width: 0; }
/* درخت */
.eb-tree { display: grid; gap: 3px; border: 0; border-radius: 0; background: transparent; padding: 0 4px; overflow: visible; }
.eb-node { min-width: 0; }
/* همان بازشدن نرمِ درخت تحلیل پاسخ‌گویی: ارتفاع، محوشدن و خط راهنمای نقطه‌چین */
.eb-children-anim { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .32s cubic-bezier(.33,1,.68,1); }
.eb-children-anim.open { grid-template-rows: 1fr; }
.eb-children { min-height: 0; overflow: hidden; margin-inline-start: 18px; padding-inline-start: 7px; border-inline-start: 1px dashed #e9decd; opacity: 0; transform: translateY(-5px); transition: opacity .26s ease, transform .32s cubic-bezier(.33,1,.68,1); }
.eb-children-anim.open > .eb-children { opacity: 1; transform: none; }
.eb-row { display: flex; align-items: center; gap: 8px; padding: 7px 9px; border-radius: 0; min-height: 42px; position: relative; }
.eb-row:hover { background: transparent; }
/* شاخه‌ها (پوشه‌های میانی): پررنگ‌تر تا سلسله‌مراتب پیدا باشد */
.eb-branch > .eb-name > b { font-weight: 800; }
.eb-branch.open,
.eb-branch.open:hover { background: transparent; }
.eb-branch.open > .eb-caret { background: transparent; color: #9a8c78; }
.eb-branch > .eb-badges,
.eb-branch > .eb-check-sp { display: none; }
/* آزمون‌های آماده: کارت‌مانند و برجسته */
.eb-exam { background: #fcfbf7; border: 1px solid #f0e7d6; margin-block: 3px; }
.eb-exam:hover { background: #fdf6ec; border-color: #e6d6bf; }
.eb-pending { opacity: .72; }
.eb-row.picked { background: transparent; border-color: #f0e7d6; box-shadow: none; }
.eb-caret { border: 0; background: transparent; cursor: pointer; width: 20px; height: 24px; border-radius: 0; display: inline-grid; place-items: center; color: #9a8c78; flex: 0 0 auto; }
.eb-caret:hover { background: transparent; color: #7f7465; }
.eb-caret .ui-icon { width: 15px; height: 15px; transform: rotate(90deg); transition: transform .18s ease; }
.eb-caret.open { transform: none; }
.eb-caret.open .ui-icon { transform: rotate(0); }
.eb-caret-sp, .eb-check-sp { width: 24px; flex: 0 0 auto; }
.eb-check { display: inline-grid; place-items: center; width: 24px; flex: 0 0 auto; cursor: pointer; }
.eb-check input { width: 17px; height: 17px; accent-color: #8a7f6d; cursor: pointer; }
.eb-name { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 1px; cursor: default; }
.eb-row [data-eb-toggle].eb-name, .eb-caret[data-eb-toggle] { cursor: pointer; }
.eb-title-line { min-width: 0; display: flex; align-items: baseline; gap: 9px; }
.eb-title-line > b { font-size: 13px; font-weight: 700; color: #2c261d; flex: 0 0 auto; }
.eb-branch-count { margin-inline-start: 5px; color: #a89b87; font-size: 9.5px; font-weight: 650; }
.eb-title-line > small, .eb-title-line > .eb-path { min-width: 0; color: #aa9d88; font-size: 10px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.eb-path, .eb-pick-topics { display: inline-flex; align-items: center; gap: 4px; direction: rtl; }
.eb-path > span, .eb-pick-topics > span { white-space: nowrap; }
.eb-path-sep { direction: ltr; unicode-bidi: isolate; color: #aa9d88; font-style: normal; line-height: 1; }
.eb-path-break { color: #c4b8a5; margin-inline: 2px; }
.eb-branch > .eb-name .eb-title-line > b { font-weight: 800; }
.eb-badges { display: inline-flex; gap: 5px; flex: 0 0 auto; flex-wrap: wrap; justify-content: flex-end; }
.eb-badge { font-size: 10.5px; font-weight: 700; border-radius: 8px; padding: 3px 8px; white-space: nowrap; }
.eb-badge.exams { background: #e7f5f2; color: #1f7f73; }
.eb-badge.qs { background: #f1ece1; color: #8a7048; }
.eb-badge.pending { background: #fdefe7; color: #b26a2a; }
.eb-badge.match { background: #eef3fc; color: #3a5fa0; }
.eb-badge.lessons { background: #eef6ef; color: #3f7a4c; }
/* ردیفِ مرحله (نمای مرحله‌ای) و درس‌های زیرش */
.eb-stage-group > .eb-name > .eb-title-line > b { font-weight: 800; }
.eb-stage-group.open { background: #fdf6ec; border-color: #e6d6bf; }
.eb-stage-lesson { background: #fff; }
.eb-stage-lesson > .eb-name > .eb-title-line > b { font-size: 12.5px; font-weight: 650; color: #50483d; }
.eb-join-soft { background: #f4efe7; color: #7c6f5d; }
.eb-join-soft:hover { background: #ece1cf; color: #5f5646; }
.eb-result-lessons { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 4px 9px; margin-top: 3px; font-size: 10.5px; color: #8f826e; }
.eb-result-lessons i { font-style: normal; }
.eb-result-lessons b { color: #8a7048; font-size: 10px; margin-inline-start: 3px; }
.eb-join { border: 0; background: var(--orange, #e8722a); color: #fff; cursor: pointer; border-radius: 9px; padding: 6px 11px; font-size: 11.5px; font-weight: 700; display: inline-flex; align-items: center; gap: 4px; flex: 0 0 auto; white-space: nowrap; transition: background .15s ease; }
.eb-join:hover { background: #d5641f; }
.eb-join .ui-icon { width: 13px; height: 13px; }
/* نتایج فیلتر موضوعی */
.eb-results { display: grid; gap: 8px; }
.eb-results-head { font-size: 12px; color: var(--muted); margin-bottom: 2px; }
.eb-result { display: flex; align-items: center; gap: 9px; background: #fff; border: 1px solid #ece4d6; border-radius: 12px; padding: 9px 12px; transition: box-shadow .12s ease; }
.eb-result:hover { box-shadow: 0 3px 10px rgba(60,45,20,.08); }
.eb-result.picked { background: #fff5e9; box-shadow: inset 3px 0 0 var(--orange, #e8722a); }
.eb-result-main { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.eb-result-main b { font-size: 13px; color: #2c261d; }
.eb-result-main small { font-size: 10.5px; color: #b3a790; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* خلاصهٔ انتخاب */
.eb-summary { margin-top: 14px; border: 1px solid #e7dfd0; border-radius: 14px; background: linear-gradient(135deg, #fdfaf4, #fbf7ef); padding: 13px 14px; }
.eb-summary-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.eb-summary-head b { font-size: 13.5px; color: #2c261d; }
.eb-clear { border: 0; background: none; cursor: pointer; color: #c0392b; font: inherit; font-size: 12px; font-weight: 600; }
.eb-picks { display: grid; gap: 7px; margin-bottom: 12px; }
.eb-pick-row { display: grid; grid-template-columns: 28px minmax(0, 1fr) auto 28px; align-items: center; gap: 10px; background: #fff; border: 1px solid #ece4d6; border-radius: 11px; padding: 9px; min-width: 0; }
.eb-pick-rank { width: 25px; height: 25px; border-radius: 8px; display: grid; place-items: center; background: #f4efe7; color: #7c6f5d; font-size: 11px; }
.eb-pick-title { min-width: 0; display: flex; align-items: center; gap: 12px; overflow: hidden; }
.eb-pick-name { min-width: 0; max-width: 36%; flex: 0 1 auto; align-self: center; color: #2c261d; font-size: 12px; font-weight: 850; line-height: 1.55; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.eb-pick-title > .eb-path { min-width: 0; flex: 1 1 auto; justify-content: flex-start; color: #b3a790; font-size: 9.8px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.eb-pick-topics { min-width: 0; max-width: 100%; justify-content: flex-start; overflow: hidden; color: #8f826e; font-size: 10.5px; white-space: nowrap; }
.eb-pick-topic-group { min-width: 0; max-width: 100%; display: inline-flex; align-items: center; gap: 5px; overflow: hidden; }
.eb-pick-topic-group > b { max-width: 105px; flex: 0 1 auto; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #80623d; font-size: 10.5px; }
.eb-pick-topic-group > em { flex: 0 0 auto; color: #b09f88; font-style: normal; }
.eb-pick-chapters { min-width: 0; display: inline-flex; align-items: center; gap: 5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.eb-pick-chapters i { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-style: normal; }
.eb-pick-chapters u { color: #c5b8a5; text-decoration: none; }
.eb-pick-count { font-size: 10.5px; color: #8a7048; font-weight: 700; white-space: nowrap; }
/* بلوکِ مرحله در خلاصهٔ انتخاب: ردیف مرحله + چیپِ درس‌ها با حذفِ تکی */
.eb-pick-block { display: grid; gap: 0; }
.eb-pick-block > .eb-pick-group-row { border-end-start-radius: 0; border-end-end-radius: 0; border-bottom-color: transparent; }
.eb-pick-lessons { display: flex; flex-wrap: wrap; gap: 6px; background: #fbf8f2; border: 1px solid #ece4d6; border-top: 0; border-start-start-radius: 0; border-start-end-radius: 0; border-end-start-radius: 11px; border-end-end-radius: 11px; padding: 8px 9px; }
.eb-pick-lesson { display: inline-flex; align-items: center; gap: 5px; background: #fff; border: 1px solid #ece4d6; border-radius: 20px; padding: 3px 5px 3px 10px; font-size: 11px; }
.eb-pick-lesson i { font-style: normal; font-weight: 650; color: #50483d; }
.eb-pick-lesson b { font-size: 10px; font-weight: 700; color: #8a7048; }
.eb-pick-lesson button { border: 0; background: #f4f1ec; cursor: pointer; width: 19px; height: 19px; border-radius: 6px; display: inline-grid; place-items: center; color: #9a8c78; padding: 0; }
.eb-pick-lesson button:hover { background: #ecd9cc; color: #b23; }
.eb-pick-lesson button .ui-icon { width: 11px; height: 11px; }
.eb-pick-row button { border: 0; background: #f4f1ec; cursor: pointer; width: 26px; height: 26px; border-radius: 7px; display: inline-grid; place-items: center; color: #9a8c78; }
.eb-pick-row button:hover { background: #ecd9cc; color: #b23; }
.eb-pick-row button .ui-icon { width: 12px; height: 12px; }
.eb-budget { background: #fff; border: 1px solid #efe6d7; border-radius: 12px; padding: 10px 12px; margin-bottom: 12px; }
.eb-budget-title { display: flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 700; color: #6f6353; margin-bottom: 8px; }
.eb-budget-title small { color: #b3a790; font-weight: 500; }
.eb-budget-title .ui-icon { width: 15px; height: 15px; color: var(--orange, #e8722a); }
.eb-budget-row { display: grid; grid-template-columns: minmax(0, 1fr) 146px 28px; align-items: center; gap: 9px; padding: 6px 0; font-size: 12.5px; border-top: 1px dashed #f2ece1; position: relative; white-space: nowrap; }
.eb-budget-row:first-of-type { border-top: 0; }
.eb-budget-row b { color: #2c261d; }
.eb-budget-main { min-width: 0; width: 100%; display: inline-flex; align-items: center; gap: 12px; overflow: hidden; }
.eb-budget-path { min-width: 0; display: inline-flex; align-items: center; gap: 5px; overflow: hidden; direction: rtl; white-space: nowrap; }
.eb-budget-path i { min-width: 0; max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-style: normal; font-weight: 650; color: #50483d; }
.eb-budget-path em { display: inline-grid; color: #b5a68f; font-style: normal; font-size: 13px; line-height: 1; direction: ltr; }
.eb-budget-source { min-width: 0; max-width: 34%; display: inline-flex; align-items: center; gap: 4px; color: #a0917b; font-size: 9.5px; overflow: hidden; white-space: nowrap; }
.eb-budget-source b { flex: 0 0 auto; color: #a46b43; font-size: 9.5px; }
.eb-budget-source i { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-style: normal; }
.eb-budget-actions { width: 146px; display: grid; grid-template-columns: 90px 48px; align-items: center; gap: 8px; flex: 0 0 146px; white-space: nowrap; }
.eb-budget-detail-wrap { width: 90px; display: inline-flex; align-items: center; position: relative; flex: 0 0 90px; }
.eb-budget-detail-btn { width: 100%; border: 1px solid #eadfce; background: #fbf8f2; color: #806f58; border-radius: 8px; padding: 3px 8px; font: inherit; font-size: 9.5px; font-weight: 700; cursor: pointer; white-space: nowrap; }
.eb-budget-detail-btn:hover, .eb-budget-detail-btn[aria-expanded="true"] { border-color: #efb68e; background: #fff3e9; color: #c86020; }
.eb-budget-popover { position: absolute; z-index: 12; inset-block-start: calc(100% + 7px); inset-inline-start: auto; inset-inline-end: 0; width: min(310px, 78vw); max-height: min(320px, 55vh); overflow: auto; display: grid; gap: 5px; padding: 9px; border: 1px solid #e7dccb; border-radius: 11px; background: #fff; box-shadow: 0 12px 30px rgba(61,45,24,.14); }
.eb-budget-popover::before { content: ""; position: absolute; inset-block-start: -5px; inset-inline-start: auto; inset-inline-end: 18px; width: 9px; height: 9px; background: #fff; border-left: 1px solid #e7dccb; border-top: 1px solid #e7dccb; transform: rotate(45deg); }
.eb-budget-popover-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.eb-budget-popover-head { padding-bottom: 5px; border-bottom: 1px solid #f0e9dd; }
.eb-budget-popover-head strong { font-size: 10.5px; color: #4f463a; }
.eb-budget-popover-head button { border: 0; background: #f5f1ea; color: #8d8170; width: 22px; height: 22px; border-radius: 7px; display: grid; place-items: center; cursor: pointer; }
.eb-budget-popover-head .ui-icon { width: 11px; height: 11px; }
.eb-budget-section { min-width: 0; display: grid; grid-template-columns: minmax(0, 1fr) auto 24px; align-items: center; gap: 7px; padding: 3px 2px; }
.eb-budget-section i { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-style: normal; font-size: 10.5px; color: #675c4e; }
.eb-budget-section b { flex: 0 0 auto; font-size: 9.5px; color: #9a7652; background: #f6f0e7; border-radius: 7px; padding: 2px 6px; }
.eb-budget-remove, .eb-budget-section-remove { border: 0; background: #f7f2eb; color: #a28e75; border-radius: 7px; width: 26px; height: 26px; display: inline-grid; place-items: center; cursor: pointer; }
.eb-budget-section-remove { width: 24px; height: 24px; }
.eb-budget-remove:hover, .eb-budget-section-remove:hover { background: #fde9e5; color: #bf4b3d; }
.eb-budget-remove .ui-icon, .eb-budget-section-remove .ui-icon { width: 12px; height: 12px; }
.eb-budget-count { width: 48px; text-align: center; white-space: nowrap; font-size: 11px; }
.eb-budget-empty { margin: 4px 0 8px; padding: 9px 10px; border-radius: 9px; background: #fff4ea; color: #9a633d; font-size: 11px; }
.eb-budget-excluded { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding-top: 8px; margin-top: 5px; border-top: 1px dashed #eee5d7; }
.eb-budget-excluded-label { color: #9b8e7b; font-size: 10px; font-weight: 700; white-space: nowrap; }
.eb-budget-excluded-list { min-width: 0; display: flex; align-items: center; gap: 5px; flex-wrap: wrap; }
.eb-budget-excluded-list button { max-width: 210px; border: 1px solid #eddcd2; background: #fff8f4; color: #a46247; border-radius: 8px; padding: 3px 7px; display: inline-flex; align-items: center; gap: 4px; font: inherit; font-size: 9.5px; cursor: pointer; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.eb-budget-excluded-list button:hover { border-color: #e5aa88; color: #c15720; }
.eb-budget-excluded-list .ui-icon { width: 11px; height: 11px; flex: 0 0 auto; }
.eb-build { width: 100%; justify-content: center; }
.eb-build:disabled { opacity: .55; cursor: not-allowed; }
/* مودالِ ساخت */
.exam-bank-build { display: grid; gap: 14px; }
.exam-bank-build > .field { margin: 0; }
.eb-build-toolbar { display: flex; align-items: end; justify-content: space-between; gap: 12px; }
.eb-delivery-field { margin: 0; }
.eb-delivery-field .seg-group { width: max-content; padding: 3px; }
.eb-delivery-field .seg { min-width: 72px; padding: 8px 14px; }
.eb-add-booklet { margin-bottom: 1px; }
.eb-booklet-list { display: grid; gap: 8px; }
.eb-booklet-card { display: grid; grid-template-columns: 30px minmax(0, 1fr) 118px 32px; align-items: end; gap: 9px; padding: 9px; border: 1px solid #eadfce; border-radius: 12px; background: #fdfbf7; }
.eb-booklet-card .field { margin: 0; }
.eb-booklet-card .field label { font-size: 10px; margin-bottom: 4px; }
.eb-booklet-card input { height: 38px; padding-block: 7px; }
.eb-booklet-index { width: 28px; height: 38px; border-radius: 9px; display: grid; place-items: center; background: #fff0e4; color: #d36520; }
.eb-booklet-time input { text-align: center; }
.eb-booklet-card .row-action { margin-bottom: 2px; }
.eb-stage-assignments { display: grid; gap: 7px; }
.eb-stage-row { display: grid; grid-template-columns: 20px 28px minmax(118px, auto) minmax(0, 1fr) auto 150px; align-items: center; gap: 10px; padding: 9px 10px; }
.eb-stage-name { align-self: center; margin-block-start: 3px; color: #2c261d; font-size: 12px; font-weight: 850; line-height: 1.55; }
.eb-stage-paths { min-width: 0; display: grid; align-content: center; gap: 5px; }
.eb-stage-paths > small { min-width: 0; color: #aea18c; font-size: 9.6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.eb-stage-paths .eb-path { justify-content: flex-start; }
.eb-stage-booklet { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 6px; }
.eb-stage-booklet > span { color: #9c8e79; font-size: 9.8px; }
.eb-stage-booklet select { min-width: 0; height: 36px; padding: 6px 9px; border: 1px solid #e2d8c8; border-radius: 9px; background: #fff; font: inherit; font-size: 11px; }
@media (max-width: 760px) {
  .eb-row { flex-wrap: wrap; }
  .eb-badges { width: 100%; justify-content: flex-start; padding-inline-start: 56px; }
  .eb-join { margin-inline-start: 56px; }
  .eb-build-toolbar { align-items: stretch; flex-direction: column; }
  .eb-add-booklet { align-self: stretch; justify-content: center; }
  .eb-booklet-card { grid-template-columns: 30px minmax(0, 1fr) 32px; }
  .eb-booklet-time { grid-column: 2; }
  .eb-stage-row { grid-template-columns: 20px 28px minmax(0, 1fr) auto; }
  .eb-stage-name { grid-column: 3; }
  .eb-stage-paths { grid-column: 3 / 5; }
  .eb-stage-booklet { grid-column: 3 / 5; }
  .eb-pick-row { grid-template-columns: 28px minmax(0, 1fr) auto 28px; }
  .eb-pick-title { gap: 7px; }
  .eb-pick-name { max-width: 48%; }
  .eb-budget-row { grid-template-columns: minmax(0, 1fr) 132px 28px; }
  .eb-budget-actions { width: 132px; grid-template-columns: 80px 44px; flex-basis: 132px; }
  .eb-budget-detail-wrap { width: 80px; flex-basis: 80px; }
  .eb-budget-count { width: 44px; }
  .eb-budget-path i { max-width: 120px; }
  .eb-budget-source { display: none; }
  .eb-budget-popover { width: min(238px, calc(100vw - 32px)); }
}

/* ===== سیستم پاداش و جریمهٔ ددلاین (نمای کلی) و صف بازبینی ===== */
.dl-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 14px;
  padding: 14px 16px;
}
.dl-card {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 14px;
  background: var(--panel-soft);
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.dl-card.dl-timec-warn { border-color: #f0d98a; }
.dl-card.dl-timec-danger, .dl-card.dl-timec-over { border-color: #f0b3b3; }
.dl-card.dl-st-blocked { background: var(--red-soft); border-color: #f0b3b3; }
.dl-card.dl-st-completed { background: var(--panel); }
.dl-card-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; }
.dl-card-title { display: flex; gap: 8px; align-items: flex-start; min-width: 0; }
.dl-card-title svg { width: 18px; height: 18px; color: var(--muted); flex-shrink: 0; margin-top: 2px; }
.dl-card-title b { display: block; font-size: 13.5px; }
.dl-card-title small { display: block; color: var(--muted); font-size: 11px; margin-top: 2px; }

/* رنگِ متنیِ باندها و وضعیت‌ها */
.dl-reward { color: var(--teal); }
.dl-penalty { color: var(--red); }
.dl-neutral { color: var(--muted); }
.dl-blocked { color: var(--red); }
.dl-done { color: var(--blue); }
.dl-neg { color: var(--red); }
.dl-timec-ok { color: var(--teal); }
.dl-timec-warn { color: var(--yellow); }
.dl-timec-danger, .dl-timec-over { color: var(--red); }

/* چیپِ وضعیت */
.dl-badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
  background: var(--panel);
  border: 1px solid var(--line);
}
.dl-badge.dl-reward, .dl-badge.dl-timec-ok { background: var(--teal-soft); border-color: transparent; }
.dl-badge.dl-penalty, .dl-badge.dl-blocked, .dl-badge.dl-timec-danger, .dl-badge.dl-timec-over { background: var(--red-soft); border-color: transparent; }
.dl-badge.dl-timec-warn { background: var(--yellow-soft); border-color: transparent; }
.dl-badge.dl-done { background: var(--blue-soft); border-color: transparent; }
.dl-badge.dl-neutral { background: var(--panel-soft); }

/* نوارِ زمانی (RTL — از راست پر می‌شود) */
.dl-track { position: relative; display: flex; height: 12px; border-radius: 999px; overflow: hidden; background: var(--line); }
.dl-zone { height: 100%; width: 25%; }
.dl-zone.reward { background: rgba(26, 163, 146, 0.22); }
.dl-zone.neutral { background: rgba(70, 118, 232, 0.16); }
.dl-zone.pen1 { background: rgba(217, 165, 43, 0.24); }
.dl-zone.pen2 { background: rgba(222, 90, 90, 0.24); }
.dl-fill { position: absolute; inset-block: 0; inset-inline-start: 0; opacity: 0.92; }
.dl-marker { position: absolute; inset-block: -3px; width: 3px; border-radius: 2px; background: var(--ink); box-shadow: 0 0 0 2px var(--panel-soft); }
.dl-scale { display: flex; justify-content: space-between; font-size: 9.5px; color: var(--muted); }

.dl-metrics { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.dl-metric { background: var(--panel); border: 1px solid var(--line); border-radius: 9px; padding: 6px 4px; text-align: center; }
.dl-metric small { display: block; color: var(--muted); font-size: 10px; margin-bottom: 2px; }
.dl-metric b { font-size: 12px; }

.dl-projection { display: flex; justify-content: space-between; align-items: center; gap: 8px; font-size: 12px; padding: 7px 2px 2px; border-top: 1px dashed var(--line); }
.dl-proj-amt { font-weight: 800; font-size: 13px; }
.dl-tiers { display: flex; flex-wrap: wrap; gap: 5px; }
.dl-tier { font-size: 10px; padding: 3px 7px; border-radius: 7px; background: var(--panel); border: 1px solid var(--line); color: var(--muted); }
.dl-tier.reward { background: var(--teal-soft); color: #12796b; border-color: transparent; }
.dl-tier.pen { background: var(--red-soft); color: #b64b4b; border-color: transparent; }

.dl-result { font-size: 12px; border-radius: 10px; padding: 9px 11px; display: flex; flex-direction: column; gap: 3px; }
.dl-result.dl-reward-bg { background: var(--teal-soft); }
.dl-result.dl-penalty-bg { background: var(--red-soft); }
.dl-result.dl-neutral-bg { background: var(--panel); border: 1px solid var(--line); }
.dl-settle-hint { color: var(--muted); font-size: 11px; }

.dl-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 2px; }
.dl-actions .secondary-button, .dl-actions .ghost-button { flex: 1; justify-content: center; font-size: 12px; }
.dl-actions .primary-button { flex: 1; justify-content: center; font-size: 12px; }

/* سهمِ ثبتِ سؤال (حدنصابِ هر پوشه) — مبنای فعال‌شدنِ «تأیید تکمیل» */
.dl-quota { border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; display: flex; flex-direction: column; gap: 6px; background: var(--panel); }
.dl-quota.is-ready { background: var(--teal-soft); border-color: transparent; }
.dl-quota-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; font-size: 11px; color: var(--muted); }
.dl-quota-head b { font-size: 12px; color: var(--ink); white-space: nowrap; }
.dl-quota-bar { height: 6px; border-radius: 999px; background: var(--line); overflow: hidden; }
.dl-quota-bar > span { display: block; block-size: 100%; background: var(--yellow); border-radius: 999px; }
.dl-quota.is-ready .dl-quota-bar { background: rgba(26, 163, 146, 0.22); }
.dl-quota.is-ready .dl-quota-bar > span { background: var(--teal); }
.dl-quota-ok { display: flex; align-items: center; gap: 5px; font-size: 11px; color: #12796b; }
.dl-quota-ok svg { width: 13px; height: 13px; flex: none; }
.dl-quota-rest { display: flex; flex-wrap: wrap; align-items: center; gap: 5px; font-size: 11px; color: var(--muted); }
.dl-q-chip { display: inline-flex; align-items: center; gap: 4px; max-width: 170px; padding: 2px 7px; border-radius: 7px; background: var(--panel-soft); border: 1px solid var(--line); font-size: 10px; white-space: nowrap; }
.dl-q-name { overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.dl-q-chip b { font-variant-numeric: tabular-nums; flex: none; }
.dl-q-chip.dl-q-more { background: transparent; border-style: dashed; }

/* نشانِ «آمادهٔ تأیید» کنارِ شمارندهٔ پنل */
.dl-head-tail { display: inline-flex; align-items: center; gap: 8px; }
.dl-ready-chip { display: inline-flex; align-items: center; gap: 5px; padding: 3px 10px; border-radius: 999px; background: var(--teal-soft); color: #12796b; font-size: 11px; font-weight: 700; white-space: nowrap; }
.dl-ready-chip svg { width: 13px; height: 13px; flex: none; }

/* ===== فهرستِ ددلاین‌ها: بخش‌ها، تفکیکِ درس، ردیف‌ها (dl-tab / dl-lchip / dlr-*) ===== */
.dl-panel-body { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 12px; }
.dl-panel > .panel-header, .mt-panel > .panel-header { flex-wrap: wrap; row-gap: 8px; }
.dl-panel > .panel-header .panel-title, .mt-panel > .panel-header .panel-title { flex-direction: column; align-items: flex-start; gap: 3px; min-width: 0; flex: 1 1 auto; }
.dl-panel > .panel-header .aa-subtitle, .mt-panel > .panel-header .aa-subtitle { color: var(--muted); font-size: 11.5px; font-weight: 500; line-height: 1.7; }
.dl-tabs { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.dl-tab {
  display: flex; align-items: center; gap: 10px; min-width: 0;
  padding: 10px 12px; border: 1px solid var(--line); border-radius: 14px;
  background: var(--panel-soft); color: var(--ink); font: inherit; text-align: start; cursor: pointer;
  transition: border-color var(--motion-fast) ease, background var(--motion-fast) ease, box-shadow var(--motion-fast) ease;
}
.dl-tab:hover { background: var(--panel); border-color: #ddd6c8; }
.dl-tab-ico { width: 34px; height: 34px; flex: none; display: grid; place-items: center; border-radius: 10px; background: var(--tab-soft); color: var(--tab-ink); }
.dl-tab-ico svg { width: 17px; height: 17px; }
.dl-tab-copy { flex: 1; min-width: 0; display: grid; gap: 1px; }
.dl-tab-copy b { font-size: 13px; }
.dl-tab-copy small { font-size: 10.5px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dl-tab-num { font-size: 20px; font-weight: 800; line-height: 1; color: var(--tab-ink); font-variant-numeric: tabular-nums; }
.dl-tab.on { background: var(--panel); border-color: var(--tab-ink); box-shadow: 0 0 0 3px var(--tab-soft); }
.dl-tab.zero { opacity: 0.6; }
.dl-tab.zero .dl-tab-num { color: var(--muted); }
.dl-tab-active { --tab-ink: var(--blue); --tab-soft: var(--blue-soft); }
.dl-tab-submitted { --tab-ink: var(--purple); --tab-soft: var(--purple-soft); }
.dl-tab-completed { --tab-ink: var(--teal); --tab-soft: var(--teal-soft); }
.dl-tab-closed { --tab-ink: var(--red); --tab-soft: var(--red-soft); }

.dl-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.dl-lessons { display: flex; flex-wrap: wrap; gap: 6px; min-width: 0; }
.dl-lchip {
  display: inline-flex; align-items: center; gap: 6px; padding: 5px 11px;
  border: 1px solid var(--line); border-radius: 999px; background: var(--panel);
  color: var(--ink); font: inherit; font-size: 12px; cursor: pointer; white-space: nowrap;
}
.dl-lchip i { width: 8px; height: 8px; border-radius: 50%; background: var(--lc); }
.dl-lchip b { min-width: 18px; padding: 0 6px; border-radius: 999px; background: var(--panel-soft); color: var(--muted); font-size: 11px; text-align: center; font-variant-numeric: tabular-nums; }
.dl-lchip:hover { border-color: #ddd6c8; }
.dl-lchip.on { border-color: var(--lc, var(--ink)); background: var(--lc-soft, #f4f1eb); font-weight: 700; }
.dl-lchip.on b { background: var(--panel); color: var(--lc, var(--ink)); }
.dl-lchip.zero { color: var(--muted); }
.dl-search { display: inline-flex; align-items: center; gap: 6px; height: 34px; min-width: 220px; padding: 0 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--panel); }
.dl-search svg { width: 15px; height: 15px; color: var(--muted); flex: none; }
.dl-search input { flex: 1; min-width: 0; height: 100%; min-height: 0; padding: 0; border: 0; outline: 0; box-shadow: none; background: transparent; font: inherit; font-size: 12.5px; }
.dl-search:focus-within { border-color: var(--orange); box-shadow: 0 0 0 3px var(--orange-soft); }

.dl-ls-1 { --lc: #1aa392; --lc-soft: #e9f8f5; }
.dl-ls-2 { --lc: #8664d8; --lc-soft: #f2edff; }
.dl-ls-3 { --lc: #4676e8; --lc-soft: #edf3ff; }
.dl-ls-4 { --lc: #e8792f; --lc-soft: #fff0e7; }
.dl-ls-5 { --lc: #b07d22; --lc-soft: #fff8df; }
.dl-ls-6 { --lc: #cf4f86; --lc-soft: #fdeef5; }

.dl-list { display: flex; flex-direction: column; gap: 8px; }
.dl-lgroup { display: flex; flex-direction: column; gap: 8px; }
.dl-lgroup + .dl-lgroup { margin-top: 8px; }
.dl-lgroup-head { display: flex; align-items: center; gap: 8px; padding: 2px 4px; font-size: 13px; }
.dl-lgroup-dot { width: 10px; height: 10px; border-radius: 4px; background: var(--lc); flex: none; }
.dl-lgroup-head small { color: var(--muted); font-size: 11px; }
.dl-lgroup-head::after { content: ""; flex: 1; height: 1px; background: var(--line); }

.dlr-head, .dlr-main {
  display: grid; align-items: center; gap: 12px;
  grid-template-columns: minmax(0, 1.9fr) minmax(0, 1.25fr) minmax(0, 0.95fr) minmax(0, 1fr) 108px 176px;
}
.dlr-head.manage, .dlr.manage .dlr-main {
  grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr) minmax(0, 1.2fr) minmax(0, 0.85fr) minmax(0, 0.95fr) 108px 212px;
}
.dlr-head { padding: 0 14px 0 14px; padding-inline-start: 18px; color: var(--muted); font-size: 11px; font-weight: 700; }
.dlr {
  position: relative; overflow: hidden;
  border: 1px solid var(--line); border-radius: 14px; background: var(--panel);
  transition: border-color var(--motion-fast) ease, box-shadow var(--motion-fast) ease;
}
.dlr::before { content: ""; position: absolute; inset-block: 0; inset-inline-start: 0; width: 4px; background: var(--dlr-accent, var(--line)); }
.dlr:hover { border-color: #ddd5c6; box-shadow: 0 6px 18px rgba(41, 36, 29, 0.06); }
.dlr.open { border-color: #d9d0bf; box-shadow: var(--shadow); }
.dlr-st-active.dlr-t-ok { --dlr-accent: var(--teal); }
.dlr-st-active.dlr-t-warn { --dlr-accent: var(--yellow); }
.dlr-st-active.dlr-t-danger, .dlr-st-active.dlr-t-over { --dlr-accent: var(--red); }
.dlr-st-submitted { --dlr-accent: var(--purple); }
.dlr-st-completed { --dlr-accent: var(--blue); }
.dlr-st-blocked, .dlr-st-activation_expired { --dlr-accent: var(--red); background: #fffafa; }
.dlr-st-notstarted, .dlr-st-released { --dlr-accent: #cfc8ba; }
.dlr-main { padding: 11px 12px; padding-inline-start: 18px; cursor: pointer; }
.dlr-cell { min-width: 0; }
.dlr-project { display: flex; align-items: center; gap: 10px; }
.dlr-lesson { width: 34px; height: 34px; flex: none; display: grid; place-items: center; border-radius: 10px; background: var(--lc-soft); color: var(--lc); font-size: 14px; font-weight: 800; }
.dlr-title { display: grid; gap: 1px; min-width: 0; }
.dlr-title b { font-size: 13.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dlr-title small { color: var(--muted); font-size: 11px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dlr-flags { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 3px; }
.dlr-flag { display: inline-flex; align-items: center; gap: 3px; padding: 1px 7px; border-radius: 999px; font-size: 10px; font-weight: 700; }
.dlr-flag svg { width: 11px; height: 11px; }
.dlr-flag.ok { background: var(--teal-soft); color: #12796b; }
.dlr-flag.warn { background: var(--yellow-soft); color: #93700f; }
.dlr-person { display: flex; align-items: center; gap: 8px; font-size: 12.5px; }
.dlr-person .avatar { width: 28px; height: 28px; border-radius: 9px; font-size: 10px; }
.dlr-person span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dlr-time, .dlr-quota { display: grid; gap: 5px; }
.dlr-time-copy, .dlr-q-copy { display: flex; align-items: baseline; justify-content: space-between; gap: 6px; min-width: 0; }
.dlr-time-copy b, .dlr-q-copy b { font-size: 12.5px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.dlr-time-copy b i { color: var(--muted); font-size: 11px; font-style: normal; font-weight: 500; }
.dlr-time-copy small, .dlr-q-copy small { color: var(--muted); font-size: 10.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dlr-time-copy small.dl-neg { color: var(--red); font-weight: 700; }
.dlr-frozen { display: inline-flex; align-items: center; gap: 3px; color: var(--purple) !important; font-weight: 700; }
.dlr-frozen svg { width: 11px; height: 11px; }
.dlr-bar { display: flex; height: 6px; border-radius: 999px; background: var(--line); overflow: hidden; }
.dlr-bar > span { display: block; height: 100%; border-radius: 999px; }
.dlr-bar-quota > span { background: var(--yellow); }
.dlr-bar-quota.ready > span { background: var(--teal); }
.dlr-money { display: grid; gap: 1px; min-width: 0; }
.dlr-money b { font-size: 12.5px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.dlr-money small { color: var(--muted); font-size: 10.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dlr-money.dl-reward b { color: var(--teal); }
.dlr-money.dl-penalty b, .dlr-money.dl-blocked b { color: var(--red); }
.dlr-money.dl-neutral b { color: var(--ink); }
.dlr-status { display: flex; }
.dlr-act { display: flex; align-items: center; justify-content: flex-end; gap: 6px; }
.dlr .small, .dl-actions .small { gap: 5px; min-height: 0; padding: 6px 11px; border-radius: 9px; font-size: 11.5px; white-space: nowrap; }
.dlr .small svg, .dl-actions .small svg { width: 14px; height: 14px; }
.dlr-chev { width: 30px; height: 30px; flex: none; display: grid; place-items: center; padding: 0; border: 1px solid var(--line); border-radius: 9px; background: var(--panel-soft); color: var(--muted); cursor: pointer; }
.dlr-chev svg { width: 15px; height: 15px; transition: transform var(--motion-fast) ease; }
.dlr.open .dlr-chev svg { transform: rotate(180deg); }
.dlr-chev:hover { color: var(--ink); border-color: #ddd5c6; }
.dlr-detail {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: 16px;
  padding: 14px 16px 16px; padding-inline-start: 20px;
  border-top: 1px dashed var(--line); background: var(--panel-soft);
  animation: dlr-open var(--motion-med) var(--ease-soft);
}
.dlr-d-time, .dlr-d-side { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.dlr-dates { display: flex; flex-wrap: wrap; gap: 6px 14px; color: var(--muted); font-size: 11.5px; }
.dlr-dates b { color: var(--ink); font-weight: 700; }
.dlr-detail .dl-actions { justify-content: flex-start; }
.dlr-detail .dl-actions .small { flex: none; }
@keyframes dlr-open { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }

.dl-empty { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 30px 12px; border: 1px dashed var(--line); border-radius: 14px; color: var(--muted); text-align: center; }
.dl-empty svg { width: 26px; height: 26px; }
.dl-empty b { font-size: 13px; font-weight: 600; }

/* تکمیل موقت، پیشرفتِ بازبینی و یادداشتِ بازگرداندن */
.dl-submitted { color: var(--purple); }
.dl-badge.dl-submitted { background: var(--purple-soft); border-color: transparent; }
.dl-result.dl-submitted-bg { background: var(--purple-soft); color: #5b3fb0; }
.dl-result span > svg { width: 14px; height: 14px; margin-inline-end: 4px; vertical-align: -2px; }
.dl-tier.on { box-shadow: inset 0 0 0 1.5px currentColor; font-weight: 800; }
.dl-tier.neutral.on { color: var(--blue); background: var(--blue-soft); border-color: transparent; }
.dl-modal-hint { margin: 10px 2px 0; color: var(--muted); font-size: 12px; line-height: 1.9; }
/* مودالِ «تمدید مهلت» ددلاین: ورودیِ روز + چیپ‌های میان‌بُر در یک ردیفِ شکستنی */
.dl-extend-input { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2, 8px); }
.field .dl-extend-input input { width: 88px; flex: none; text-align: center; }
.dl-extend-chips { display: flex; flex-wrap: wrap; gap: var(--space-1, 4px) var(--space-2, 8px); }
.dl-review { display: flex; flex-direction: column; gap: 6px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--panel); }
.dl-review-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; color: var(--muted); font-size: 11px; }
.dl-review-head b { color: var(--ink); font-size: 12px; white-space: nowrap; }
.dl-review-bar { display: flex; height: 6px; border-radius: 999px; background: var(--line); overflow: hidden; }
.dl-review-bar span { display: block; height: 100%; }
.dl-review-bar .ok, .dl-review-legend i.ok { background: var(--teal); }
.dl-review-bar .wait, .dl-review-legend i.wait { background: #b4a1ea; }
.dl-review-bar .ret, .dl-review-legend i.ret { background: var(--yellow); }
.dl-review-legend { display: flex; flex-wrap: wrap; gap: 4px 12px; color: var(--muted); font-size: 10.5px; }
.dl-review-legend i { display: inline-block; width: 8px; height: 8px; margin-inline-end: 4px; border-radius: 3px; background: var(--line); }

@media (max-width: 1240px) {
  .dl-tabs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dlr-head, .dlr-head.manage { display: none; }
  .dlr-main, .dlr.manage .dlr-main {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1fr) auto;
    grid-template-areas: "project project status act" "time quota reward reward";
    row-gap: 10px;
  }
  .dlr.manage .dlr-main { grid-template-areas: "project person status act" "time quota reward reward"; }
  .dlr-project { grid-area: project; }
  .dlr-person { grid-area: person; }
  .dlr-time { grid-area: time; }
  .dlr-quota { grid-area: quota; }
  .dlr-reward { grid-area: reward; }
  .dlr-status { grid-area: status; justify-content: flex-end; }
  .dlr-act { grid-area: act; }
}
@media (max-width: 720px) {
  .dl-panel-body { padding: 12px; }
  .dl-tabs { gap: 8px; }
  .dl-tab { padding: 9px 10px; gap: 8px; }
  .dl-tab-ico { width: 30px; height: 30px; }
  .dl-tab-copy small { display: none; }
  .dl-tab-num { font-size: 17px; }
  .dl-toolbar { flex-direction: column; align-items: stretch; }
  .dl-lessons { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 2px; scrollbar-width: none; }
  .dl-lessons::-webkit-scrollbar { display: none; }
  .dl-search { min-width: 0; width: 100%; }
  .dlr-main, .dlr.manage .dlr-main {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    grid-template-areas: "project project" "time quota" "reward status" "act act";
    padding-inline-start: 16px;
  }
  .dlr.manage .dlr-main { grid-template-areas: "project project" "person status" "time quota" "reward reward" "act act"; }
  /* بی‌دکمه، چِوران به گوشهٔ کارت می‌رود؛ یک ردیفِ کاملِ خالی برای یک دکمهٔ کوچک هدر است */
  .dlr-main:not(:has(.dlr-act .small)) { grid-template-areas: "project project" "time quota" "reward status"; }
  .dlr.manage .dlr-main:not(:has(.dlr-act .small)) { grid-template-areas: "project project" "person status" "time quota" "reward reward"; }
  .dlr-main:not(:has(.dlr-act .small)) .dlr-act { position: absolute; inset-block-start: 10px; inset-inline-end: 10px; }
  .dlr-main:not(:has(.dlr-act .small)) .dlr-project { padding-inline-end: 38px; }
  .dlr-act .small { flex: 1; justify-content: center; }
  .dlr-detail { grid-template-columns: 1fr; padding: 12px; }
  .dlr-detail .dl-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* ===== برترین‌های ماه — پاداش ۲۰٪ سازنده و بازبینِ برتر (mt-*) ===== */
.mt-head h2 { display: flex; align-items: center; gap: 8px; }
.mt-title-ico { width: 30px; height: 30px; flex: none; display: grid; place-items: center; border-radius: 9px; background: linear-gradient(135deg, #ffd66b, #eea51c); color: #fff; box-shadow: 0 4px 10px rgba(238, 165, 28, 0.32); }
.mt-title-ico svg { width: 17px; height: 17px; }
.mt-clock, .mt-pct { display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px; border-radius: 999px; background: var(--yellow-soft); color: #86650f; font-size: 12px; font-weight: 700; white-space: nowrap; }
.mt-clock svg { width: 14px; height: 14px; }
.mt-body { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 14px; }
.mt-month { display: grid; gap: 7px; }
.mt-month-copy { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 10px; }
.mt-month-copy b { font-size: 15px; }
.mt-month-copy small { color: var(--muted); font-size: 11.5px; }
.mt-month-bar { height: 6px; border-radius: 999px; background: var(--line); overflow: hidden; }
.mt-month-bar span { display: block; height: 100%; border-radius: 999px; background: linear-gradient(270deg, #eea51c, #ffd66b); }
.mt-races { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.mt-race { display: flex; flex-direction: column; gap: 12px; padding: 14px; border: 1px solid var(--line); border-radius: 16px; background: linear-gradient(180deg, var(--race-soft) 0, var(--panel) 96px); }
.mt-race-creator { --race: var(--orange); --race-soft: #fff5ed; }
.mt-race-reviewer { --race: var(--blue); --race-soft: #f2f6ff; }
.mt-race-head { display: flex; align-items: center; gap: 10px; }
.mt-race-ico { width: 38px; height: 38px; flex: none; display: grid; place-items: center; border-radius: 12px; background: var(--panel); color: var(--race); box-shadow: inset 0 0 0 1px var(--line); }
.mt-race-ico svg { width: 19px; height: 19px; }
.mt-race-copy { flex: 1; min-width: 0; display: grid; gap: 2px; }
.mt-race-copy b { font-size: 14.5px; }
.mt-race-copy small { color: var(--muted); font-size: 11px; }
.mt-race-count { padding: 2px 9px; border: 1px solid var(--line); border-radius: 999px; background: var(--panel); color: var(--muted); font-size: 11px; white-space: nowrap; }
.mt-podium { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.mt-pod { display: grid; grid-template-columns: 30px 36px minmax(0, 1fr) auto; align-items: center; gap: 10px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 12px; background: var(--panel); }
.mt-pod-1 { padding-block: 11px; border-color: #f2d27c; background: linear-gradient(90deg, #fff9e3, #fffdf6); box-shadow: 0 6px 16px rgba(217, 165, 43, 0.14); }
.mt-medal { width: 28px; height: 28px; display: grid; place-items: center; border-radius: 50%; background: #c9c2b4; color: #fff; font-size: 13px; font-weight: 800; }
.mt-pod-1 .mt-medal { width: 30px; height: 30px; background: linear-gradient(135deg, #ffd66b, #df9f17); box-shadow: 0 3px 8px rgba(223, 159, 23, 0.35); }
.mt-pod-1 .mt-medal svg { width: 16px; height: 16px; }
.mt-pod-2 .mt-medal { background: linear-gradient(135deg, #e3e7ee, #98a2b2); }
.mt-pod-3 .mt-medal { background: linear-gradient(135deg, #f3cba7, #be7844); }
.mt-pod .avatar { width: 34px; height: 34px; font-size: 11px; }
.mt-pod-1 .avatar { box-shadow: 0 0 0 2px #fff, 0 0 0 4px #f2d27c; }
.mt-pod-main { display: grid; gap: 5px; min-width: 0; }
.mt-pod-main b { font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mt-pod-main b em { margin-inline-start: 4px; padding: 1px 7px; border-radius: 999px; background: var(--race); color: #fff; font-size: 10px; font-style: normal; font-weight: 700; vertical-align: 1px; }
.mt-pod-bar { height: 5px; border-radius: 999px; background: var(--line); overflow: hidden; }
.mt-pod-bar i { display: block; height: 100%; border-radius: 999px; background: var(--race); opacity: 0.7; }
.mt-pod-1 .mt-pod-bar i { background: linear-gradient(270deg, #df9f17, #ffd66b); opacity: 1; }
.mt-pod-num { display: grid; justify-items: end; font-size: 16px; font-weight: 800; line-height: 1.15; font-variant-numeric: tabular-nums; }
.mt-pod-num small { color: var(--muted); font-size: 10px; font-weight: 500; }
.mt-pod.me { box-shadow: inset 0 0 0 2px var(--race); }
.mt-pod-1.me { box-shadow: inset 0 0 0 2px var(--race), 0 6px 16px rgba(217, 165, 43, 0.14); }
.mt-pod.empty { border-style: dashed; background: transparent; box-shadow: none; opacity: 0.55; }
.mt-pod.empty .mt-medal { background: var(--line); color: var(--muted); box-shadow: none; }
.mt-pod.empty .avatar { background: var(--line); box-shadow: none; }
.mt-me { display: grid; grid-template-columns: 78px minmax(0, 1fr); align-items: center; gap: 12px; padding: 12px; border: 1px solid var(--line); border-radius: 14px; background: var(--panel); }
.mt-me.lead { border-color: #f2d27c; background: linear-gradient(135deg, #fffbea, #fff3cc); }
.mt-me.idle { background: var(--panel-soft); }
.mt-me-rank { display: grid; justify-items: center; gap: 1px; padding: 7px 0; border-radius: 12px; background: var(--race-soft); }
.mt-me-rank small { color: var(--muted); font-size: 10px; }
.mt-me-rank b { color: var(--race); font-size: 26px; font-weight: 900; line-height: 1.15; }
.mt-me.lead .mt-me-rank { background: rgba(255, 255, 255, 0.75); }
.mt-me.lead .mt-me-rank b svg { width: 26px; height: 26px; color: #df9f17; }
.mt-me.idle .mt-me-rank b { color: var(--muted); }
.mt-me-copy { display: grid; gap: 5px; min-width: 0; }
.mt-me-copy > b { font-size: 13.5px; }
.mt-me-copy > span { color: var(--muted); font-size: 11.5px; }
.mt-gap { color: var(--race); font-size: 18px; font-weight: 900; font-variant-numeric: tabular-nums; }
.mt-me-bar { display: block; height: 8px; border-radius: 999px; background: var(--line); overflow: hidden; }
.mt-me-bar i { display: block; height: 100%; border-radius: 999px; background: var(--race); }
.mt-bonus, .mt-leader-bonus { display: flex; align-items: flex-start; gap: 6px; padding: 6px 9px; border-radius: 9px; background: var(--teal-soft); color: #12796b !important; font-size: 11.5px; }
.mt-bonus svg, .mt-leader-bonus svg { width: 14px; height: 14px; flex: none; margin-top: 2px; }
.mt-bonus small, .mt-leader-bonus small { color: var(--muted); }
.mt-full { display: grid; justify-items: start; gap: 10px; }
.mt-full .small { gap: 5px; padding: 6px 11px; border-radius: 9px; font-size: 11.5px; }
.mt-full .small svg { width: 14px; height: 14px; }
.mt-full-grid { width: 100%; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.mt-full-col { display: grid; gap: 8px; padding: 10px; border: 1px solid var(--line); border-radius: 12px; }
.mt-full-col ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 3px; max-height: 340px; overflow-y: auto; }
.mt-full-col li { display: grid; grid-template-columns: 24px 24px minmax(0, 1fr) auto 56px; align-items: center; gap: 8px; padding: 4px 6px; border-radius: 8px; font-size: 12px; }
.mt-full-col li:nth-child(odd) { background: var(--panel-soft); }
.mt-full-col .avatar { width: 24px; height: 24px; border-radius: 8px; font-size: 9px; }
.mt-full-rank { color: var(--muted); font-weight: 800; text-align: center; }
.mt-full-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mt-full-col li strong { font-variant-numeric: tabular-nums; }
.mt-full-col li small { color: var(--muted); font-size: 10.5px; text-align: end; }
.mt-history { display: grid; gap: 8px; padding: 12px; border: 1px solid var(--line); border-radius: 14px; background: var(--panel-soft); }
.mt-history.empty { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 12px; }
.mt-history svg { width: 16px; height: 16px; flex: none; }
.mt-history-head { display: flex; align-items: center; gap: 6px; font-size: 13px; }
.mt-history-head svg { color: #df9f17; }
.mt-history-list { display: grid; gap: 6px; }
.mt-h-row { display: grid; grid-template-columns: 100px repeat(2, minmax(0, 1fr)); gap: 8px; }
.mt-h-month { display: grid; place-items: center; padding: 6px; border: 1px solid var(--line); border-radius: 10px; background: var(--panel); font-size: 12.5px; font-weight: 800; }
.mt-h-win { display: grid; gap: 1px; min-width: 0; padding: 7px 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--panel); }
.mt-h-win small { color: var(--muted); font-size: 10px; }
.mt-h-win b { font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mt-h-win i { color: var(--muted); font-size: 11px; font-style: normal; }
.mt-h-win.me { border-color: #f2d27c; background: #fffbea; }
.mt-h-win.none { opacity: 0.6; }
.mt-h-win i.mt-h-other { display: block; margin-top: 2px; font-size: 10.5px; }
.mt-h-win i.mt-h-other.me { color: #8a6a12; }
.mt-soon { display: flex; align-items: center; gap: 8px; padding: 14px; color: var(--muted); }
.mt-soon svg { width: 18px; height: 18px; }
@media (max-width: 980px) {
  .mt-races, .mt-full-grid { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .mt-body { padding: 12px; }
  .mt-race { padding: 12px; }
  .mt-h-row { grid-template-columns: 1fr 1fr; }
  .mt-h-month { grid-column: 1 / -1; }
  .mt-me { grid-template-columns: 64px minmax(0, 1fr); gap: 10px; }
  .mt-clock { font-size: 11px; padding: 4px 10px; }
}

/* Spring dashboard: calm surfaces, explicit counts, no progress tracks. */
.spring-panel {
  --spring-ink: #245346;
  --spring-line: #dce9df;
  --line: var(--spring-line);
  --muted: #63766c;
  border: 1px solid var(--spring-line);
  border-radius: 24px;
  background: #fbfdf9;
  box-shadow: 0 8px 30px #284d3510;
  overflow: hidden;
}
.spring-panel > .panel-header { padding: 22px 24px 18px; background: linear-gradient(115deg, #fff5f6, #f3f9ed 65%, #edf8f1); border-bottom: 0; }
.spring-panel > .panel-header h2 { color: var(--spring-ink); font-size: 20px; }
.spring-panel .panel-title .aa-subtitle { max-width: 760px; line-height: 1.9; }
.spring-panel :is(button,input):focus-visible { outline: 3px solid #7d9f87; outline-offset: 3px; }
.spring-panel .mt-body, .spring-panel .dl-panel-body { padding: 20px 24px 24px; gap: 20px; }
.spring-panel .mt-title-ico { background: #e3efcb; color: #537238; box-shadow: none; border-radius: 12px; width: 36px; height: 36px; }
.spring-panel .mt-clock { color: #456450; background: #ffffffb8; padding: 8px 14px; }
.spring-panel .mt-month { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 10px 16px; background: #edf6ee; border: 1px solid #dbe9db; border-radius: 18px; }
.spring-panel .mt-month-copy { display: flex; align-items: center; gap: 10px; }
.spring-panel .mt-month-copy > b { color: #2b6248; font-size: 23px; font-weight: 850; line-height: 1.5; }
.mt-month-reward { display: flex; gap: 8px; align-items: center; max-width: 360px; }
.mt-month-reward > svg { width: 32px; height: 32px; padding: 7px; color: #9a6277; background: #fae6eb; border-radius: 14px; flex: none; }
.mt-month-reward > span { display: grid; gap: 5px; }
.mt-month-reward b { color: #3e5949; font-size: 16px; }
.mt-month-reward small { color: var(--muted); font-size: 11.5px; line-height: 1.8; }
.spring-panel .mt-races { gap: 18px; }
.spring-panel .mt-race { border-radius: 20px; padding: 18px; gap: 16px; background: var(--race-soft); border-color: color-mix(in srgb, var(--race) 18%, white); }
.spring-panel .mt-race-creator { --race: #39785b; --race-soft: #f0f7ed; }
.spring-panel .mt-race-reviewer { --race: #81629c; --race-soft: #f6f0fa; }
.spring-panel .mt-race-ico { border: 0; box-shadow: none; width: 42px; height: 42px; border-radius: 15px; }
.spring-panel .mt-race-copy > b { color: var(--race); font-size: 16px; }
.spring-panel .mt-race-copy > small { line-height: 1.8; }
.spring-panel .mt-podium { gap: 9px; }
.spring-panel .mt-pod { padding: 13px 12px; border-color: #ffffff; background: #ffffffc9; border-radius: 15px; }
.spring-panel .mt-pod-1 { background: #fffdf3; border-color: #e7dfb8; box-shadow: none; }
.spring-panel .mt-medal { background: #f1f0ed; color: #687167; box-shadow: none; }
.spring-panel .mt-pod-1 .mt-medal { background: #f7ecc0; color: #866b2a; box-shadow: none; }
.spring-panel .mt-pod-2 .mt-medal { background: #ede8f3; color: #7b688f; }
.spring-panel .mt-pod-3 .mt-medal { background: #f8e7e7; color: #9a6c70; }
.spring-panel .mt-pod-1 .avatar { box-shadow: none; }
.mt-pod-main > small { color: var(--muted); font-size: 10.5px; }
.spring-panel .mt-pod-num { color: var(--race); font-size: 20px; gap: 4px; }
.spring-panel .mt-pod.empty { opacity: 1; background: transparent; border-color: var(--line); }
.spring-panel .mt-pod.me { border-color: var(--race); box-shadow: none; }
.spring-panel .mt-me { border-radius: 16px; border-color: transparent; background: #ffffffb8; }
.spring-panel .mt-me.lead { background: #fffbed; border-color: #e8dfb8; }
.spring-panel .mt-history { background: #f5f7f2; border: 0; border-radius: 16px; padding: 16px; line-height: 1.8; }
.spring-panel .dl-tab { background: #f2f6ef; border-color: transparent; border-radius: 16px; padding: 14px; }
.spring-panel .dl-tab.on { background: var(--tab-soft); border-color: color-mix(in srgb, var(--tab-ink) 45%, white); box-shadow: none; }
.spring-panel .dl-tab-active { --tab-ink: #39785b; --tab-soft: #e5f1e5; }
.spring-panel .dl-tab-submitted { --tab-ink: #81629c; --tab-soft: #f0e7f7; }
.spring-panel .dl-tab-completed { --tab-ink: #4c7775; --tab-soft: #e8f4f1; }
.spring-panel .dl-tab-closed { --tab-ink: #a36878; --tab-soft: #faedf0; }
.spring-panel .dl-tab.zero { opacity: 1; }
.spring-panel .dl-tab-ico { background: #ffffffa8; }
.spring-panel .dl-tab-num { font-size: 25px; }
.spring-panel .dl-lchip { padding: 7px 12px; }
.spring-panel .dl-lchip.on { --lc: #39785b; --lc-soft: #eaf4e7; }
.spring-panel .dl-list, .spring-panel .dl-lgroup { gap: 12px; }
.spring-panel .dlr-head { display: none; }
.spring-panel .dlr { border-radius: 18px; border-color: #e0e9dd; box-shadow: none; background: #fff; }
.spring-panel .dlr::before, .spring-panel .dl-lgroup-head::after { content: none; }
.spring-panel .dlr:hover, .spring-panel .dlr.open { border-color: #9ebca3; box-shadow: 0 5px 18px #355b4010; }
.spring-panel .dlr-main, .spring-panel .dlr.manage .dlr-main {
  grid-template-columns: repeat(3, minmax(0, 1fr)) auto;
  grid-template-areas: "project project status act" "time quota reward reward";
  padding: 18px; gap: 16px;
}
.spring-panel .dlr.manage .dlr-main { grid-template-areas: "project person status act" "time quota reward reward"; }
.spring-panel .dlr-project { grid-area: project; }
.spring-panel .dlr-person { grid-area: person; }
.spring-panel .dlr-person .avatar { width: 42px; height: 42px; min-width: 42px; border-radius: 14px; font-size: 15px; }
.spring-panel .dlr-time { grid-area: time; }
.spring-panel .dlr-quota { grid-area: quota; }
.spring-panel .dlr-reward { grid-area: reward; }
.spring-panel .dlr-status { grid-area: status; justify-content: flex-end; }
.spring-panel .dlr-act { grid-area: act; }
.spring-panel .dlr-title b { font-size: 15px; }
.spring-panel .dlr-lesson { width: 42px; height: 42px; border-radius: 14px; }
.spring-panel :is(.dlr-time,.dlr-quota,.dlr-reward) { align-self: stretch; border-radius: 12px; background: #f7f9f4; padding: 12px 14px; }
.spring-panel .dlr-time-copy, .spring-panel .dlr-q-copy { display: grid; gap: 5px; justify-content: start; }
.spring-panel :is(.dlr-time-copy,.dlr-q-copy,.dlr-money) b { font-size: 14px; white-space: normal; }
.spring-panel :is(.dlr-time-copy,.dlr-q-copy,.dlr-money) small { white-space: normal; overflow: visible; }
.spring-panel .dlr-detail { background: #f8faf5; border-top: 1px solid #e4ecdf; padding: 20px; gap: 20px; }
.spring-panel .dlr .primary-button { background: #39785b; border-color: #39785b; box-shadow: none; }
.spring-panel .dlr .primary-button:hover { background: #2b6147; }
.spring-panel .dlr-chev { background: #eef5e9; border-color: transparent; color: #4b7655; width: 36px; height: 36px; border-radius: 12px; }
.spring-panel .dlr-dates { gap: 10px 16px; line-height: 1.8; }
.spring-panel .dl-badge { white-space: normal; text-align: center; }
@media (max-width: 760px) {
  .spring-panel > .panel-header { padding: 18px 16px 14px; }
  .spring-panel .mt-body, .spring-panel .dl-panel-body { padding: 14px; gap: 16px; }
  .spring-panel .mt-races { grid-template-columns: 1fr; }
  .spring-panel .mt-month { align-items: center; flex-direction: row; gap: 10px; padding: 10px 12px; }
  .spring-panel .mt-month-copy { display: grid; gap: 1px; }
  .spring-panel .mt-month-copy > small { font-size: 10px; }
  .spring-panel .mt-month-copy > b { font-size: 21px; }
  .spring-panel .mt-month-reward { gap: 5px; }
  .spring-panel .mt-month-reward b { font-size: 13px; white-space: nowrap; }
  .spring-panel .mt-month-reward > svg { width: 28px; height: 28px; padding: 6px; }
  .spring-panel .mt-race { padding: 12px; }
  .spring-panel .dl-tab { padding: 10px; gap: 7px; }
  .spring-panel .dl-tab-copy b { font-size: 11.5px; overflow-wrap: anywhere; }
  .spring-panel .dl-toolbar, .spring-panel .dl-lessons { width: 100%; min-width: 0; max-width: 100%; }
  .spring-panel .dl-lessons { flex-wrap: nowrap; overflow-x: auto; }
  .spring-panel .dl-tab-num { font-size: 20px; }
  .spring-panel .dlr-main, .spring-panel .dlr.manage .dlr-main,
  .spring-panel .dlr-main:not(:has(.dlr-act .small)), .spring-panel .dlr.manage .dlr-main:not(:has(.dlr-act .small)) {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-areas: "project project" "time quota" "reward status" "act act";
    padding: 14px; gap: 12px;
  }
  .spring-panel .dlr.manage .dlr-main, .spring-panel .dlr.manage .dlr-main:not(:has(.dlr-act .small)) { grid-template-areas: "project project" "person status" "time quota" "reward reward" "act act"; }
  .spring-panel .dlr-main:not(:has(.dlr-act .small)) .dlr-act { position: static; }
  .spring-panel .dlr-main:not(:has(.dlr-act .small)) .dlr-project { padding-inline-end: 0; }
  .spring-panel .dlr-act .small { white-space: normal; }
  .spring-panel .dlr-detail { grid-template-columns: 1fr; padding: 14px; }
  .spring-panel :is(.dlr-time,.dlr-quota,.dlr-reward) { padding: 10px; }
}
/* One action per suspended administrator, independent of expanded cards. */
.dl-bulk-toolbar { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; padding: 14px; border: 1px solid #e8d9d9; border-radius: 14px; background: #fcf4f3; }
.dl-bulk-toolbar label { color: #86545c; font-size: 12px; font-weight: 700; }
.dl-bulk-toolbar select { flex: 1; min-width: 160px; max-width: 320px; min-height: 40px; padding: 8px 12px; border: 1px solid #e8d9d9; border-radius: 10px; background: #fff; color: #57484b; font: inherit; font-size: 12px; }
.dl-bulk-toolbar button { min-height: 40px; }
.dl-bulk-counts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin: 16px 0; }
.dl-bulk-counts > span { display: grid; gap: 4px; padding: 12px; border-radius: 12px; background: #f4f7ef; color: #566950; font-size: 12px; }
.dl-bulk-counts b { font-size: 22px; color: #365b43; }
@media (max-width: 600px) {
  .dl-bulk-toolbar { flex-direction: column; align-items: stretch; }
  .dl-bulk-toolbar select { min-width: 0; max-width: none; width: 100%; flex: none; }
  .dl-bulk-toolbar button { width: 100%; white-space: normal; }
}

/* Deadline details: compact sections and an explicit assignment action. */
.spring-panel .dlr-detail { grid-template-columns: repeat(3, minmax(0, 1fr)); align-items: start; gap: 14px; }
.spring-panel .dlr-detail-card { min-width: 0; padding: 16px; border: 1px solid #e1e9dd; border-radius: 16px; background: #fff; display: flex; flex-direction: column; gap: 14px; }
.spring-panel .dlr-detail-card > h3 { display: flex; align-items: center; gap: 8px; margin: 0; color: #3e6650; font-size: 13px; }
.spring-panel .dlr-detail-card > h3 svg { width: 17px; height: 17px; }
.spring-panel .dlr-detail .dl-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.spring-panel .dlr-detail .dl-metric { background: #f6f9f2; border: 0; padding: 10px; border-radius: 10px; }
.spring-panel .dlr-detail .dl-metric b { white-space: normal; font-size: 12px; line-height: 1.8; }
.spring-panel .dlr-dates { display: grid; gap: 5px; }
.spring-panel .dlr-detail :is(.dl-quota,.dl-review) { border: 0; background: #f6f9f2; padding: 12px; }
.spring-panel :is(.dl-quota-head,.dl-review-head) { flex-direction: column; align-items: flex-start; gap: 6px; line-height: 1.8; }
.spring-panel :is(.dl-quota-ok,.dl-quota-rest,.dl-review-legend) { line-height: 1.9; }
.spring-panel .dl-projection { border: 0; padding: 12px; border-radius: 12px; background: #f8f5fa; display: grid; gap: 10px; font-size: 12px; line-height: 1.8; }
.spring-panel .dl-proj-amt { font-size: 20px; }
.dl-reward-rules { font-size: 11px; color: var(--muted); line-height: 1.8; }
.dl-reward-rules summary { cursor: pointer; padding: 6px 0; }
.dl-reward-rules .dl-tiers { display: grid; gap: 8px; margin-top: 6px; }
.dl-reward-rules .dl-tier { padding: 7px 9px; line-height: 1.9; }
.dl-detail-note { margin: 0; font-size: 12px; color: var(--muted); line-height: 1.9; }
.dlr-management { grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 16px; border-radius: 14px; background: #f3ede9; }
.dlr-management > span { font-size: 11.5px; color: #775c54; line-height: 1.9; }
.spring-panel .dl-revoke-button { color: #a04454; background: #fff; border: 1px solid #e8c4cb; }
.spring-panel .dl-revoke-button:hover { background: #fff0f2; border-color: #bd6f7f; }
.spring-panel .dlr-detail > .dl-return-note { grid-column: 1 / -1; }
@media (max-width: 1000px) {
  .spring-panel .dlr-detail { grid-template-columns: 1fr; }
  .spring-panel .dlr-detail-card { padding: 14px; }
  .dlr-management { align-items: stretch; flex-direction: column; padding: 12px; }
  .spring-panel .dlr-management .dl-actions { flex-direction: column; }
  .spring-panel .dlr-management .dl-actions .small { width: 100%; min-height: 40px; white-space: normal; }
}

@media (prefers-reduced-motion: reduce) { .spring-panel *, .spring-panel *::before { animation: none !important; transition: none !important; } }


/* مدتِ انتظار در صف بازبینی */
.review-wait { display: flex; flex-direction: column; gap: 3px; align-items: flex-start; }
.review-wait-time { font-size: 12px; white-space: nowrap; }
.review-wait .dl-badge { font-size: 10px; padding: 2px 7px; }

@media (max-width: 640px) {
  .dl-grid { grid-template-columns: 1fr; }
}

/* ===== تفکیکِ درآمد، پاداش و جریمه داخل هر میلهٔ پرداخت ===== */
.reward-legend { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; padding: 4px 16px 12px; font-size: 12px; }
.reward-legend .rl-item { display: inline-flex; align-items: center; gap: 6px; }
.reward-legend .rl-item.muted { color: var(--muted); font-size: 11px; }
.reward-legend .rl-swatch { width: 11px; height: 11px; border-radius: 3px; display: inline-block; flex: 0 0 11px; }
.reward-legend .rl-swatch.base { background: var(--chart-income-color, #ef8b43); }
.reward-legend .rl-swatch.pos { background: var(--teal); }
.reward-legend .rl-swatch.neg {
  background: repeating-linear-gradient(45deg, transparent 0 2px, rgba(217,108,100,.6) 2px 4px);
  border: 1px solid #d96c64;
}

/* ===== کنترل‌های مودالِ پاداش/جریمه ===== */
.rj-toggle { display: flex; gap: 8px; }
.rj-opt { flex: 1; display: flex; align-items: center; justify-content: center; gap: 6px; padding: 9px; border: 1px solid var(--line); border-radius: 10px; cursor: pointer; font-weight: 600; background: var(--panel); }
.rj-opt input { display: none; }
.rj-opt.on { border-color: var(--orange); background: var(--orange-soft); color: var(--orange); }
.rj-selall { display: flex; align-items: center; gap: 8px; font-weight: 600; margin-bottom: 8px; cursor: pointer; }
.rj-admin-grid { display: grid; grid-template-columns: 1fr; gap: 6px; max-height: 240px; overflow-y: auto; }
.rj-admin { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 9px; background: var(--panel); }
.rj-admin.on { border-color: var(--teal); background: var(--teal-soft); }
.rj-admin-main { display: flex; align-items: center; gap: 8px; }
.rj-admin b { font-size: 11px; color: var(--muted); white-space: nowrap; }
.rj-total { margin-top: 12px; padding: 9px 11px; border-radius: 10px; background: var(--panel-soft); border: 1px solid var(--line); font-weight: 700; font-size: 12.5px; text-align: center; }

/* ===== صفحه‌بندی گزارش فعالیت ===== */
.pagination .page-gap { padding: 0 4px; color: var(--muted); align-self: center; }
.client-list-pagination { grid-column: 1 / -1; flex-wrap: wrap; gap: 12px; width: 100%; box-sizing: border-box; }
.client-list-pagination .page-buttons { flex-wrap: wrap; }
.client-list-pagination .page-buttons button { min-width: 36px; min-height: 36px; }
.client-list-pagination .page-buttons button:focus-visible { outline: 2px solid var(--orange); outline-offset: 3px; }

/* ===== جدول‌های مدیریت پرداخت‌ها: جا شدن در باکس بدون اسکرول افقی ===== */
.pm-fit { overflow-x: hidden; }
.pm-table { width: 100%; min-width: 0; table-layout: fixed; font-size: 11.5px; }
.pm-table th, .pm-table td { white-space: normal; overflow-wrap: anywhere; word-break: break-word; padding: 8px 6px; vertical-align: middle; }
.pm-table .question-cell { gap: 6px; }
.pm-table .question-cell .avatar, .pm-table .question-cell img { width: 24px; height: 24px; flex: 0 0 24px; }
.pm-table .question-cell strong { font-size: 11.5px; line-height: 1.3; }
.pm-table .badge { white-space: normal; }
.pm-pay-btn { padding: 6px 10px; font-size: 11px; white-space: nowrap; }
.pm-table .row-action { width: 28px; height: 28px; }
/* عرضِ ستون‌ها متناسب با محتوا تا همه‌چیز داخل باکس بماند */
.pm-perf col, .pm-adj col, .pm-paid col, .pm-pending col { }
.pm-pending .pm-col-manager { width: 18%; }
.pm-pending .pm-col-amount { width: 13%; }
.pm-pending .pm-col-count { width: 9%; }
.pm-pending .pm-col-card { width: 17%; }
.pm-pending .pm-col-sheba { width: 20%; }
.pm-pending .pm-col-date { width: 13%; }
.pm-pending .pm-col-action { width: 10%; }
.pm-pending th, .pm-pending td { text-align: center; }
.pm-pending th:first-child, .pm-pending td:first-child { text-align: right; }
.pm-pending td:first-child .question-cell { justify-content: flex-start; }
.pm-bank-value {
  display: inline-block;
  direction: ltr;
  unicode-bidi: isolate;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
  font-size: 10.5px;
  letter-spacing: .02em;
}
.pm-sheba-value { font-size: 9.5px; }
.pm-date-value { display: inline-block; white-space: nowrap; font-size: 10.5px; }
.pm-action-cell { text-align: center !important; }
.pm-perf th:nth-child(1), .pm-perf td:nth-child(1) { width: 18%; }
.pm-perf th:nth-child(2), .pm-perf td:nth-child(2) { width: 9%; }
.pm-perf th:nth-child(3), .pm-perf td:nth-child(3),
.pm-perf th:nth-child(4), .pm-perf td:nth-child(4) { width: 8%; text-align: center; }
.pm-perf th:last-child, .pm-perf td:last-child { width: 6%; }
.pm-adj th:nth-child(1), .pm-adj td:nth-child(1) { width: 18%; }
.pm-adj th:nth-child(4), .pm-adj td:nth-child(4) { width: 26%; }
.pm-adj th:last-child, .pm-adj td:last-child { width: 6%; }
.pm-paid th:nth-child(1), .pm-paid td:nth-child(1) { width: 22%; }
/* «تاریخچهٔ تسویه‌های من» هم باید کامل داخل کادر بنشیند، بدون اسکرول افقی */
.pm-mysettle th, .pm-mysettle td { text-align: center; }
.pm-mysettle th:first-child, .pm-mysettle td:first-child { text-align: right; }
.pm-mysettle th:nth-child(1), .pm-mysettle td:nth-child(1) { width: 20%; }
.pm-mysettle th:nth-child(2), .pm-mysettle td:nth-child(2) { width: 12%; }
.pm-mysettle th:nth-child(3), .pm-mysettle td:nth-child(3) { width: 16%; }
.pm-mysettle th:nth-child(4), .pm-mysettle td:nth-child(4),
.pm-mysettle th:nth-child(5), .pm-mysettle td:nth-child(5) { width: 19%; }
.pm-mysettle th:last-child, .pm-mysettle td:last-child { width: 14%; }
.pm-mysettle .receipt-thumb { display: inline-block; vertical-align: middle; }

/* موبایل: به‌جای فشرده‌کردن، جدول‌ها اسکرول افقی داشته باشند (مثل جدول‌های پیش‌فرض) */
@media (max-width: 720px) {
  .pm-fit { overflow-x: auto; }
  .pm-table { table-layout: auto; min-width: 820px; font-size: 11px; }
  .pm-table th, .pm-table td { width: auto !important; padding: 10px 12px; word-break: normal; overflow-wrap: normal; white-space: normal; }
  .pm-table .question-cell strong { font-size: 12px; }
  .pm-pending .pm-bank-value { font-size: 10.5px; }
}

/* ===== هم‌ترازیِ جدول‌های مالی =====
   `.pm-table` پدینگ افقی سلول را از ۱۴px به ۶px می‌آورد تا ستون‌ها جا شوند؛ نتیجه این بود
   که ستون اول و آخر (مثلاً «مبلغ») عملاً به لبهٔ پنل می‌چسبید در حالی که عنوان پنل ۱۹px
   تورفتگی دارد. فقط دو لبهٔ بیرونی تورفتگی می‌گیرند تا فشردگیِ بین ستون‌ها حفظ شود.
   بعد از مدیاکوئری موبایل می‌آید تا شورتهندِ `padding` آنجا این دو را پاک نکند. */
.pm-table th:first-child, .pm-table td:first-child { padding-inline-start: 16px; }
.pm-table th:last-child, .pm-table td:last-child { padding-inline-end: 16px; }

/* یک قرارداد واحد برای همهٔ جدول‌های «مدیریت پرداخت‌ها»: ستون‌های متنی از ابتدای سطر،
   بقیه (عدد، مبلغ، تاریخ، وضعیت، دکمه) وسط‌چین. پیش‌تر فقط pm-pending وسط‌چین بود و سه
   جدول دیگر راست‌چین، برای همین ستون‌های هم‌نام در جدول‌های پشت‌سرهم زیر هم نمی‌افتادند. */
.pm-perf th, .pm-perf td,
.pm-adj th, .pm-adj td,
.pm-paid th, .pm-paid td { text-align: center; }
.pm-perf th:nth-child(1), .pm-perf td:nth-child(1),
.pm-perf th:nth-child(2), .pm-perf td:nth-child(2),
.pm-adj th:nth-child(1), .pm-adj td:nth-child(1),
.pm-adj th:nth-child(4), .pm-adj td:nth-child(4),
.pm-paid th:nth-child(1), .pm-paid td:nth-child(1) { text-align: start; }
.pm-perf td:first-child .question-cell,
.pm-adj td:first-child .question-cell,
.pm-paid td:first-child .question-cell { justify-content: flex-start; }
/* ستون دکمهٔ عملیات ۶٪ بود و با تورفتگیِ لبه جا نمی‌شد */
.pm-perf th:last-child, .pm-perf td:last-child,
.pm-adj th:last-child, .pm-adj td:last-child { width: 9%; }

/* ===== دفترِ درآمد/پاداش/جریمه (صفحهٔ درآمد و تسویه) ===== */
.ledger-summary { display: flex; flex-wrap: wrap; gap: 10px; padding: 12px 16px 4px; }
.ledger-summary .ls-chip { display: inline-flex; flex-direction: column; gap: 2px; padding: 8px 12px; border-radius: 11px; font-size: 11px; color: var(--muted); border: 1px solid var(--line); background: var(--panel-soft); min-width: 110px; }
.ledger-summary .ls-chip b { font-size: 13px; color: var(--ink); }
.ledger-summary .ls-chip.income b { color: var(--teal); }
.ledger-summary .ls-chip.reward b { color: var(--teal); }
.ledger-summary .ls-chip.penalty b { color: var(--red); }
.ledger-summary .ls-chip.net { background: var(--orange-soft); border-color: transparent; }
.ledger-tabs { display: flex; gap: 8px; flex-wrap: wrap; padding: 8px 16px 12px; }
.ledger-tab { padding: 6px 14px; border-radius: 999px; border: 1px solid var(--line); background: var(--panel); font-size: 12px; font-weight: 600; cursor: pointer; color: var(--muted); }
.ledger-tab.on { background: var(--orange-soft); border-color: transparent; color: var(--orange); }
.ledger-cat { display: inline-block; padding: 2px 9px; border-radius: 7px; font-size: 10.5px; background: var(--panel-soft); border: 1px solid var(--line); color: var(--muted); }
.ledger-cat.income { background: var(--teal-soft); color: #12796b; border-color: transparent; }
.ledger-cat.reward { background: var(--teal-soft); color: #12796b; border-color: transparent; }
.ledger-cat.penalty { background: var(--red-soft); color: #b64b4b; border-color: transparent; }
.pm-ledger th:nth-child(1), .pm-ledger td:nth-child(1) { width: 15%; }
.pm-ledger th:nth-child(2), .pm-ledger td:nth-child(2) { width: 53%; }
.pm-ledger th:nth-child(3), .pm-ledger td:nth-child(3) { width: 16%; }
.pm-ledger th:nth-child(4), .pm-ledger td:nth-child(4) { width: 16%; }
/* همان قرارداد جدول‌های پرداخت: تاریخ و شرح متنی‌اند، دسته و مبلغ وسط ستون خودشان */
.pm-ledger th, .pm-ledger td { text-align: center; }
.pm-ledger th:nth-child(1), .pm-ledger td:nth-child(1),
.pm-ledger th:nth-child(2), .pm-ledger td:nth-child(2) { text-align: start; }

/* ===== ایجاد سؤال: چیدمان فشرده و متمرکز ===== */
.question-page {
  width: min(1450px, 100%);
  margin-inline: auto;
}
.question-page-head {
  align-items: center;
  margin-bottom: 14px;
}
.question-page-head h1 { font-size: 23px; margin: 3px 0; }
.question-page-head p { font-size: 10px; }
.question-head-actions { gap: 7px; }
.question-head-actions .secondary-button { min-height: 36px; padding: 7px 14px; }
.question-page-layout { grid-template-columns: minmax(0, 1fr) 190px; gap: 14px; }
.question-form-main { gap: 12px; }
.question-form-section {
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 10px;
  padding: 16px;
  border-radius: 15px;
  box-shadow: 0 5px 18px rgba(46,39,29,.025);
}
.question-structure-section { padding-top: 16px; }
.section-number { width: 30px; height: 30px; border-radius: 9px; font-size: 12px; }
.section-content > h2 { font-size: 16px; margin-bottom: 2px; }
.section-content > p { margin-bottom: 12px; font-size: 9px; }
.question-form-nav { top: 82px; padding: 9px; border-radius: 14px; box-shadow: 0 8px 24px rgba(46,39,29,.06); }
.question-form-nav > button { padding: 6px; }
.question-form-nav > button span { width: 22px; height: 22px; }
.folder-context { margin-top: 7px; padding-top: 9px; }
.media-editor { margin: 8px 0 12px; border-radius: 12px; }
.media-editor-head { min-height: 44px; padding: 7px 10px; }
.media-editor-head strong { font-size: 12px; }
.media-editor-head small { font-size: 8px; margin-top: 1px; }
.media-editor-head .secondary-button { min-height: 32px; padding: 6px 10px; font-size: 10px; border-radius: 9px; }
.media-drop {
  min-height: 68px;
  margin: 8px;
  padding: 11px 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border-radius: 10px;
  background: #fdfbf7;
}
.media-drop-icon {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  color: var(--orange);
  background: var(--orange-soft);
  flex: 0 0 auto;
}
.media-drop-icon .ui-icon { width: 17px; height: 17px; }
.media-drop > span:last-child { display: flex; flex-direction: column; gap: 2px; text-align: start; }
.media-drop strong { color: #5f5649; font-size: 10.5px; }
.media-drop small { color: var(--muted); font-size: 8px; }
.question-page .media-list { padding: 0 8px 8px; gap: 7px; }
.question-save-bar { padding: 9px 11px; border-radius: 14px; }
.question-save-bar .primary-button,
.question-save-bar .secondary-button { min-height: 36px; padding: 7px 13px; }

/* ===== ویرایشگر حرفه‌ای برش تصویر ===== */
.modal.crop-editor-modal {
  width: min(1460px, calc(100vw - 24px));
  height: min(900px, calc(100dvh - 24px));
  max-height: calc(100dvh - 24px);
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  overflow: hidden;
  border-radius: 20px;
}
.crop-editor-modal .modal-head,
.crop-editor-modal .modal-footer { position: static; }
.crop-modal-head { padding: 12px 16px; }
.crop-modal-head > div { min-width: 0; }
.crop-modal-head h2 { font-size: 15px; }
.crop-modal-head p { margin: 2px 0 0; color: var(--muted); font-size: 8.5px; }
.crop-editor-modal > .modal-body { min-height: 0; overflow: hidden; padding: 10px; }
.crop-editor-modal .crop-layout {
  height: 100%;
  min-height: 0;
  grid-template-columns: minmax(0, 1fr) 238px;
  gap: 10px;
}
.crop-editor-modal .crop-workspace {
  min-height: 0;
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
}
.crop-editor-modal .crop-stage {
  min-height: 0;
  height: auto;
  overflow: hidden;
  padding: 12px;
  border-radius: 12px;
  background-size: 14px 14px;
}
.crop-editor-modal .crop-stage canvas {
  max-width: 100%;
  max-height: 100%;
  box-shadow: 0 12px 36px rgba(20,17,12,.2);
}
.crop-editor-modal .crop-stage canvas.drawing-selection { cursor: crosshair !important; }
.crop-editor-modal .crop-help {
  min-height: 30px;
  margin: 6px 0 0;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 5px 12px;
  font-size: 8px;
}
.crop-editor-modal .crop-help span { white-space: nowrap; }
.crop-editor-modal .crop-controls {
  min-height: 0;
  max-height: 100%;
  overflow: auto;
  scrollbar-width: none;
  gap: 8px;
  padding: 10px;
  border-radius: 12px;
  background: #fcfbf8;
}
.crop-editor-modal .crop-controls::-webkit-scrollbar { display: none; }
.crop-control-block { padding-bottom: 8px; border-bottom: 1px solid #eee7dc; }
.crop-control-block:last-of-type { border-bottom: 0; }
.crop-editor-modal .crop-section-title { margin-bottom: 5px; font-size: 8.5px; letter-spacing: 0; }
.crop-editor-modal .pixel-info-card { padding: 7px 8px; border-radius: 8px; }
.crop-editor-modal .pixel-info-card.accent { background: #fff6ee; border-color: #f3d5bd; }
.crop-editor-modal .pixel-info-card .pcard-label { font-size: 7.5px; }
.crop-editor-modal .pixel-info-card .pcard-value { font-size: 10px; }
.crop-editor-modal .pixel-input-field label { font-size: 8px; }
.crop-editor-modal .pixel-input-field input { height: 32px; font-size: 11px; }
.crop-editor-modal .aspect-lock-btn { height: 32px; width: 28px; }
.crop-hidden-values { display: none; }
.crop-preset-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; }
.crop-preset-grid button,
.crop-editor-modal .crop-toolbar button {
  min-height: 30px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: #716858;
  font: inherit;
  font-size: 8.5px;
  cursor: pointer;
}
.crop-preset-grid button:hover,
.crop-preset-grid button.selected,
.crop-editor-modal .crop-toolbar button:hover,
.crop-editor-modal .crop-toolbar button.active {
  color: #d65d16;
  border-color: #efb184;
  background: #fff3e9;
}
.crop-editor-modal .crop-toolbar { gap: 4px; }
.crop-editor-modal .crop-toolbar-primary button { font-weight: 750; }
/* بزرگ‌نمایی: دو دکمهٔ کوچکِ ±  و یک «تمام‌نما»ی پهن‌تر، با عددِ درصد کنارِ عنوان */
.crop-editor-modal .crop-zoom-toolbar { display: grid; grid-template-columns: 1fr 1fr 2fr; }
.crop-editor-modal .crop-zoom-toolbar button:first-child,
.crop-editor-modal .crop-zoom-toolbar button:nth-child(2) { font-size: 13px; font-weight: 700; }
.crop-zoom-value {
  float: left;
  color: #d65d16;
  font-size: 9.5px;
  font-weight: 800;
  letter-spacing: 0;
}
.crop-editor-modal .crop-alt-field { margin: 0; }
.crop-editor-modal .crop-alt-field label { font-size: 8.5px; }
.crop-editor-modal .crop-alt-field input { height: 32px; font-size: 9px; }
.crop-editor-modal .modal-footer { padding: 9px 14px; }
.crop-editor-modal .modal-footer button { min-height: 36px; }

/* آمار سبک داشبورد هنگام ورود */
/* ارتفاع تقریباً برابر خودِ نمودار است تا هنگام تعویض بازه، پنل جمع نشود و صفحه نپرد */
.dashboard-analytics-loading {
  min-height: 430px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  color: var(--muted);
}
.dashboard-analytics-loading.failed span { animation: none; opacity: .3; }
.dashboard-analytics-loading .link-button {
  background: none;
  border: 0;
  padding: 0;
  font: inherit;
  color: var(--orange);
  cursor: pointer;
  text-decoration: underline;
}
.dashboard-analytics-loading span {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--orange);
  animation: dashboardPulse 1s ease-in-out infinite;
}
.dashboard-analytics-loading span:nth-child(2) { animation-delay: .12s; }
.dashboard-analytics-loading span:nth-child(3) { animation-delay: .24s; }
.dashboard-analytics-loading small { margin-inline-start: 5px; font-size: 12px; }
@keyframes dashboardPulse { 0%, 100% { opacity: .25; transform: translateY(0); } 50% { opacity: 1; transform: translateY(-3px); } }

@media (max-width: 1100px) {
  .crop-editor-modal .crop-layout { grid-template-columns: minmax(0, 1fr) 220px; }
}
@media (max-width: 820px) {
  .modal.crop-editor-modal { width: 100vw; height: 100dvh; max-height: 100dvh; border-radius: 0; }
  .crop-editor-modal > .modal-body { overflow: auto; }
  .crop-editor-modal .crop-layout { height: auto; grid-template-columns: 1fr; }
  .crop-editor-modal .crop-workspace { height: 58dvh; }
  .crop-editor-modal .crop-controls { max-height: none; overflow: visible; }
}

/* ═══════════ آمار تجمیعی سؤال (مودال آمار) ═══════════ */
.qstat-tabs {
  display: flex;
  gap: 6px;
  padding: 0 22px;
  border-bottom: 1px solid var(--line);
  background: #fffdfa;
}
.qstat-tab {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 0;
  background: transparent;
  font: inherit;
  font-size: 12px;
  font-weight: 800;
  color: var(--muted);
  padding: 11px 12px 10px;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  transition: color .15s ease, border-color .15s ease;
}
.qstat-tab .ui-icon { width: 15px; height: 15px; }
.qstat-tab:hover { color: var(--ink); }
.qstat-tab.on { color: var(--orange); border-bottom-color: var(--orange); }
.qstat-modal-body { background: var(--panel-soft); }
.qstat-pane { position: relative; display: grid; gap: 14px; }
.qstat-loading {
  min-height: 220px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  color: var(--muted);
}
.qstat-loading span {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--orange);
  animation: dashboardPulse 1s ease-in-out infinite;
}
.qstat-loading span:nth-child(2) { animation-delay: .12s; }
.qstat-loading span:nth-child(3) { animation-delay: .24s; }
.qstat-loading small { margin-inline-start: 5px; font-size: 10px; }
.qstat-empty {
  min-height: 140px;
  display: grid;
  place-items: center;
  align-content: center;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  text-align: center;
  padding: 18px;
}

/* شناسنامهٔ سؤال: کد + مسیرها (جمع‌وجور، مشابه چیپ موضوع روی کارت) */
.qstat-idcard {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 12px 16px;
  align-items: start;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 12px 14px;
}
.qstat-code {
  display: grid;
  gap: 3px;
  justify-items: center;
  background: #f8f3eb;
  border-radius: 11px;
  padding: 9px 14px;
}
.qstat-code span { font-size: 9.5px; font-weight: 800; color: var(--muted); }
.qstat-code b { font-size: 13px; letter-spacing: .4px; color: var(--ink); }
.qstat-paths { display: grid; gap: 7px; min-width: 0; }
.qstat-path-group { display: grid; gap: 2px; min-width: 0; }
.qstat-path-group > i {
  font-style: normal;
  font-size: 9px;
  font-weight: 900;
  color: #b3894a;
}
.qstat-path-row {
  font-size: 10.5px;
  font-weight: 700;
  color: #6f6a60;
  line-height: 1.9;
  overflow-wrap: anywhere;
}
.qstat-path-row.muted { color: var(--muted); opacity: .75; }
/* برگِ مسیر (زیربخش‌های کنار هم) پررنگ‌تر از تنهٔ مسیر است و جداکنندهٔ «>» کم‌رنگ */
.qstat-path-row > b { font-weight: 800; color: var(--ink); }
.qstat-path-row > span { color: #bfb6a6; padding: 0 1px; }
/* کلیدِ باز کردن مسیرِ پایه/رشته‌های دیگر */
.qstat-path-more {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  justify-self: start;
  margin-top: 2px;
  padding: 3px 9px 3px 6px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fbf8f3;
  color: #6f6a60;
  font: inherit;
  font-size: 9.5px;
  font-weight: 800;
  cursor: pointer;
  transition: background .15s, border-color .15s, color .15s;
}
.qstat-path-more:hover { background: #f5eee3; border-color: #e2d3ba; color: var(--ink); }
.qstat-path-more > i {
  font-style: normal;
  min-width: 15px;
  padding: 0 4px;
  border-radius: 999px;
  background: #efe4d2;
  color: #8a6b38;
  text-align: center;
  line-height: 15px;
}
.qstat-path-caret { width: 12px; height: 12px; transition: transform .18s; }
.qstat-path-more.on .qstat-path-caret { transform: rotate(180deg); }
.qstat-path-extra { display: grid; gap: 2px; }
.qstat-path-extra[hidden] { display: none; }

/* شبکهٔ کارت‌های نمودار */
.qstat-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.qstat-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 14px 16px 16px;
  min-width: 0;
}
.qstat-card.wide { grid-column: 1 / -1; }
.qstat-card h3 { margin: 0; font-size: 12.5px; font-weight: 900; color: var(--ink); }
.qstat-card .qstat-h-mid { margin-top: 18px; }
.qstat-sub { margin: 3px 0 12px; font-size: 10px; color: var(--muted); font-weight: 700; }

/* دونات میزان استفاده */
.qstat-donut-wrap {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 14px;
  align-items: center;
}
.qstat-donut { position: relative; width: 158px; flex: none; }
.qstat-donut svg { width: 100%; display: block; }
.qstat-donut-seg {
  stroke-width: 18;
  cursor: pointer;
  transition: stroke-width .18s var(--ease-soft, ease), filter .18s ease;
}
.qstat-donut-seg:hover { stroke-width: 24; filter: brightness(1.07) saturate(1.1); }
.qstat-donut-center {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 2px;
  pointer-events: none;
}
.qstat-donut-center b { font-size: 21px; color: var(--ink); line-height: 1; }
.qstat-donut-center span { font-size: 9.5px; font-weight: 800; color: var(--muted); }
.qstat-donut-legend { display: grid; gap: 7px; min-width: 0; }
.qstat-legend-row {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 10.5px;
  font-weight: 800;
  color: #5d594f;
}
.qstat-legend-row i { width: 9px; height: 9px; border-radius: 3px; flex: none; }
.qstat-legend-row b { margin-inline-start: auto; color: var(--ink); font-size: 11.5px; }

/* حضور در آزمون‌ها / مجموعه‌ها */
.qstat-presence {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 9px;
  margin-top: 13px;
}
.qstat-presence-cell {
  border: 1px dashed #e4ddcf;
  border-radius: 11px;
  background: #fffdf8;
  padding: 9px 10px;
  display: grid;
  justify-items: center;
  gap: 2px;
  transition: transform .15s var(--ease-soft, ease), border-color .15s ease;
}
.qstat-presence-cell:hover { transform: translateY(-2px); border-color: #dcc9a6; }
.qstat-presence-cell b { font-size: 17px; color: var(--ink); line-height: 1.1; }
.qstat-presence-cell span { font-size: 9.5px; font-weight: 800; color: var(--muted); }

/* چیپ‌های درصد اولین پاسخ */
.qstat-first { display: grid; grid-template-columns: repeat(3, 1fr); gap: 9px; }
.qstat-first-chip {
  border-radius: 12px;
  padding: 11px 8px 9px;
  display: grid;
  justify-items: center;
  gap: 2px;
  transition: transform .15s var(--ease-soft, ease);
}
.qstat-first-chip:hover { transform: translateY(-2px); }
.qstat-first-chip b { font-size: 17px; line-height: 1.1; }
.qstat-first-chip span { font-size: 9.5px; font-weight: 800; }
.qstat-first-chip.correct { background: #e9f8f2; color: #2f9e83; }
.qstat-first-chip.wrong { background: #fdeee9; color: #d3603f; }
.qstat-first-chip.blank { background: #fbf3df; color: #b5891f; }
.qstat-note { margin: 8px 0 0; font-size: 9.5px; color: var(--muted); font-weight: 700; }

/* میانگین زمان پاسخ‌گویی */
.qstat-time { display: grid; gap: 9px; margin-top: 2px; }
.qstat-time-row {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) 74px;
  align-items: center;
  gap: 10px;
}
.qstat-time-kind { font-size: 10.5px; font-weight: 900; }
.qstat-time-kind.correct { color: #2f9e83; }
.qstat-time-kind.wrong { color: #d3603f; }
.qstat-time-kind.blank { color: #b5891f; }
.qstat-time-track {
  height: 12px;
  border-radius: 7px;
  background: #f1efe8;
  overflow: hidden;
}
.qstat-time-track span {
  display: block;
  height: 100%;
  width: var(--w, 0%);
  border-radius: 7px;
  transition: filter .15s ease;
}
.qstat-time-track span:hover { filter: brightness(1.08); }
.qstat-time-track span.correct { background: #2f9e83; }
.qstat-time-track span.wrong { background: #d3603f; }
.qstat-time-track span.blank { background: #d7a72e; }
.qstat-time-value { font-size: 11px; font-weight: 800; color: var(--ink); text-align: left; direction: ltr; }

/* نمودار میله‌ای گزینه‌ها */
.qstat-bars {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
  align-items: end;
  padding-top: 18px;
}
.qstat-bar-group { display: grid; justify-items: center; gap: 7px; min-width: 0; }
.qstat-bar-pair {
  display: flex;
  align-items: flex-end;
  gap: 5px;
  height: 156px;
}
.qstat-bar {
  position: relative;
  width: 24px;
  height: var(--h, 0%);
  min-height: 3px;
  border-radius: 6px 6px 2px 2px;
  transition: filter .15s ease, transform .15s var(--ease-soft, ease);
  cursor: pointer;
}
.qstat-bar:hover { filter: brightness(1.08); transform: translateY(-2px); }
.qstat-bar b {
  position: absolute;
  top: -16px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 9px;
  font-weight: 800;
  color: var(--muted);
  white-space: nowrap;
}
.qstat-bar.correct { background: #2f9e83; }
.qstat-bar.wrong { background: #d3603f; }
.qstat-bar.blank { background: #d7a72e; }
.qstat-bar.other { opacity: .42; }
.qstat-bar-label { font-size: 10px; font-weight: 800; color: var(--muted); white-space: nowrap; }
.qstat-bar-label.is-correct { color: #2f9e83; }
.qstat-chart-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 14px;
  margin-top: 13px;
  font-size: 9.5px;
  font-weight: 800;
  color: var(--muted);
}
.qstat-chart-legend span { display: inline-flex; align-items: center; gap: 5px; }
.qstat-swatch { width: 9px; height: 9px; border-radius: 3px; display: inline-block; }
.qstat-swatch.solid { background: #8b8578; }
.qstat-swatch.faded { background: #8b8578; opacity: .4; }

/* نمودار مسیر پاسخ‌گویی پس از اولین مواجهه (میله‌های انباشته) */
.qstat-flow {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 26px;
  align-items: end;
  height: 265px;
  padding: 6px 20px 0;
}
.qstat-flow-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  height: 100%;
  min-width: 0;
}
.qstat-flow-pct { font-size: 11.5px; font-weight: 900; color: var(--ink); margin-bottom: 5px; }
.qstat-flow-bar {
  width: min(74px, 100%);
  height: var(--bh, 0%);
  display: flex;
  flex-direction: column-reverse;
  border-radius: 8px 8px 3px 3px;
  overflow: hidden;
  background: #f1efe8;
}
.qstat-flow-seg {
  display: block;
  height: var(--h, 0%);
  min-height: 3px;
  cursor: pointer;
  transition: filter .15s ease;
}
.qstat-flow-seg:hover { filter: brightness(1.12); }
.qstat-flow-seg.correct { background: #2f9e83; }
.qstat-flow-seg.wrong { background: #d3603f; }
.qstat-flow-seg.blank { background: #d7a72e; }
.qstat-flow-seg.none { background: #cfd2d9; }
.qstat-flow-label { margin-top: 8px; font-size: 11px; font-weight: 900; }
.qstat-flow-label.correct { color: #2f9e83; }
.qstat-flow-label.wrong { color: #d3603f; }
.qstat-flow-label.blank { color: #b5891f; }
.qstat-flow-col small { margin-top: 2px; font-size: 9px; font-weight: 700; color: var(--muted); }

/* ردیف اطلاعات پایانی: ورود به بانک / آخرین استفاده / برچسب‌ها */
.qstat-meta {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}
.qstat-meta-cell {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px 13px;
  display: grid;
  gap: 4px;
  align-content: start;
}
.qstat-meta-cell > span { font-size: 9.5px; font-weight: 900; color: var(--muted); }
.qstat-meta-cell > b { font-size: 12px; color: var(--ink); }
.qstat-tags { display: flex; flex-wrap: wrap; gap: 5px; }
.qstat-tags i {
  font-style: normal;
  font-size: 10px;
  font-weight: 800;
  color: #7c5b22;
  background: #fbf3df;
  border-radius: 7px;
  padding: 3px 8px;
}

/* تولتیپ شناور نمودارها */
.qstat-tooltip {
  position: absolute;
  z-index: 30;
  width: max-content;
  max-width: calc(100% - 24px);
  transform: translate(-50%, -100%);
  background: #2b2823;
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  line-height: 1.9;
  padding: 7px 11px;
  border-radius: 9px;
  box-shadow: 0 10px 26px rgba(35, 28, 18, .28);
  opacity: 0;
  pointer-events: none;
  transition: opacity .12s ease;
  text-align: center;
  direction: rtl;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.qstat-tooltip.on { opacity: 1; }

@media (max-width: 760px) {
  .qstat-grid { grid-template-columns: 1fr; }
  .qstat-idcard { grid-template-columns: 1fr; }
  .qstat-code { justify-self: start; }
  .qstat-donut-wrap { grid-template-columns: 1fr; justify-items: center; }
  .qstat-donut-legend { width: 100%; }
  .qstat-meta { grid-template-columns: 1fr; }
  .qstat-flow { gap: 12px; padding-inline: 4px; }
  .qstat-bar { width: 17px; }
  .qstat-bar-pair { gap: 3px; height: 130px; }
  .qstat-tabs { padding: 0 12px; overflow-x: auto; }
}

/* ═══════════ ضریب دشواری رتبه‌محور (۰..۱۰) ═══════════ */
.qdiff-analysis {
  position: relative;
  display: grid;
  gap: 14px;
  min-width: 0;
  padding: 18px;
  border: 1px solid #e7dfd2;
  border-radius: 16px;
  background: linear-gradient(150deg, #fff 0%, #fdfaf6 100%);
  box-shadow: 0 8px 24px rgba(50, 38, 21, .035);
}
.qdiff-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; }
.qdiff-kicker { display: block; margin-bottom: 4px; color: #a86627; font-size: 10px; font-weight: 900; }
.qdiff-head h3 { margin: 0; color: var(--ink); font-size: 16px; font-weight: 950; }
.qdiff-head p { margin: 5px 0 0; color: var(--muted); font-size: 10.5px; line-height: 1.8; }
.qdiff-index {
  flex: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1px;
  min-width: 104px;
  padding: 9px 12px;
  border: 1px solid #e9e2d7;
  border-radius: 13px;
  background: rgba(255,255,255,.9);
  text-align: center;
}
.qdiff-index small { color: #837c72; font-size: 9.5px; font-weight: 800; }
.qdiff-index strong {
  font-family: "Vazirmatn", Tahoma, sans-serif;
  font-size: 29px;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
  line-height: 1.15;
}
.qdiff-index span { font-size: 9.5px; font-weight: 850; }
.qdiff-index.qdiff-band-veasy { border-color: #b8dfd2; background: #eaf8f3; }
.qdiff-index.qdiff-band-veasy strong, .qdiff-index.qdiff-band-veasy span { color: #197a65; }
.qdiff-index.qdiff-band-easy { border-color: #c8dfbd; background: #f0f8ec; }
.qdiff-index.qdiff-band-easy strong, .qdiff-index.qdiff-band-easy span { color: #4e7d3e; }
.qdiff-index.qdiff-band-medium { border-color: #ecd69e; background: #fff9e7; }
.qdiff-index.qdiff-band-medium strong, .qdiff-index.qdiff-band-medium span { color: #987019; }
.qdiff-index.qdiff-band-hard { border-color: #efcfb6; background: #fff4ec; }
.qdiff-index.qdiff-band-hard strong, .qdiff-index.qdiff-band-hard span { color: #b46329; }
.qdiff-index.qdiff-band-vhard { border-color: #ecc0b9; background: #fff0ed; }
.qdiff-index.qdiff-band-vhard strong, .qdiff-index.qdiff-band-vhard span { color: #bd4438; }
.qdiff-index.qdiff-band-unknown { border-color: #e2ddd4; background: #f7f6f3; }
.qdiff-index.qdiff-band-unknown strong, .qdiff-index.qdiff-band-unknown span { color: #8e877d; }
.qdiff-alert {
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 42px;
  padding: 9px 12px;
  border: 1px solid;
  border-radius: 11px;
  font-size: 10.5px;
  font-weight: 750;
  line-height: 1.8;
}
.qdiff-alert svg { width: 17px; height: 17px; flex: none; }
.qdiff-alert.warn { color: #876311; border-color: #ebd8a7; background: #fff9e8; }
.qdiff-alert.neutral { color: #626d76; border-color: #d9e0e4; background: #f4f7f8; }
/* نوار ۰..۱۰: در RTL مبدأ (۰) سمت راست است، پس گرادیان به چپ سخت‌تر می‌شود */
.qdiff-scale { padding: 4px 8px 0; }
.qdiff-track {
  position: relative;
  height: 12px;
  margin-top: 22px;
  border-radius: 999px;
  background: linear-gradient(to left, #cfe9dd 0%, #dfeccb 25%, #f6e6b4 50%, #f3d3b2 75%, #eec0b8 100%);
}
.qdiff-marker {
  position: absolute;
  top: 50%;
  transform: translate(50%, -50%);
  display: grid;
  place-items: center;
  width: 20px;
  height: 20px;
  border: 3px solid #fff;
  border-radius: 50%;
  background: #7a6a55;
  box-shadow: 0 2px 7px rgba(60, 45, 25, .28);
}
.qdiff-marker b {
  position: absolute;
  bottom: calc(100% + 6px);
  padding: 2px 7px;
  border-radius: 999px;
  color: #fff;
  background: #7a6a55;
  font-size: 10px;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
/* سه کارت: درصدِ اولین پاسخ صحیح، رتبه، اتکاپذیری */
.qdiff-parts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 9px; }
.qdiff-parts > article {
  min-width: 0;
  min-height: 76px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 9px 11px;
  border: 1px solid #e9e2d7;
  border-radius: 13px;
  background: rgba(255,255,255,.9);
}
.qdiff-parts small { color: #837c72; font-size: 9.5px; font-weight: 800; }
.qdiff-parts strong { margin-top: 3px; color: #2d2924; font-size: 16px; font-weight: 950; line-height: 1.25; }
.qdiff-parts span { margin-top: 3px; color: #8e877d; font-size: 8.8px; font-weight: 700; line-height: 1.55; }
.qdiff-parts span b { color: #5f574c; font-variant-numeric: tabular-nums; }
.qdiff-confidence.confidence-high { border-color: #c7dfd5; background: #f1f9f5; }
.qdiff-confidence.confidence-medium { border-color: #e6d5ab; background: #fffaf0; }
.qdiff-confidence.confidence-low { border-color: #e8c9c2; background: #fff5f2; }
@media (max-width: 720px) {
  .qdiff-analysis { padding: 14px; }
  .qdiff-head { flex-direction: column; }
  .qdiff-index { align-self: flex-start; }
  .qdiff-parts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
/* نشان‌گر ضریب دشواری روی ریلِ کارت سؤال */
.sq-diff-index {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1px;
  margin-top: 2px;
  padding: 3px 9px;
  border: 1px solid #e2ddd4;
  border-radius: 999px;
  background: #fff;
  cursor: help;
}
.sq-diff-index b { font-size: 12px; font-weight: 900; font-variant-numeric: tabular-nums; line-height: 1.3; }
.sq-diff-index i { color: #98918a; font-size: 8.5px; font-style: normal; font-weight: 800; }
.sq-diff-index.qdiff-band-veasy { border-color: #b8dfd2; background: #eaf8f3; }
.sq-diff-index.qdiff-band-veasy b { color: #197a65; }
.sq-diff-index.qdiff-band-easy { border-color: #c8dfbd; background: #f0f8ec; }
.sq-diff-index.qdiff-band-easy b { color: #4e7d3e; }
.sq-diff-index.qdiff-band-medium { border-color: #ecd69e; background: #fff9e7; }
.sq-diff-index.qdiff-band-medium b { color: #987019; }
.sq-diff-index.qdiff-band-hard { border-color: #efcfb6; background: #fff4ec; }
.sq-diff-index.qdiff-band-hard b { color: #b46329; }
.sq-diff-index.qdiff-band-vhard { border-color: #ecc0b9; background: #fff0ed; }
.sq-diff-index.qdiff-band-vhard b { color: #bd4438; }
.sq-diff-index.qdiff-band-unknown b { color: #9a938b; }

/* ═══════════ ضریب تمیز توانایی‌محور ═══════════ */
.qdisc-analysis {
  --qdisc-green: #268e78;
  --qdisc-red: #d45d46;
  --qdisc-gold: #ca961f;
  position: relative;
  display: grid;
  gap: 14px;
  min-width: 0;
  padding: 18px;
  border: 1px solid #e7dfd2;
  border-radius: 16px;
  background: linear-gradient(150deg, #fff 0%, #fffcf7 100%);
  box-shadow: 0 8px 24px rgba(50, 38, 21, .035);
}
.qdisc-head,
.qdisc-section-title {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}
.qdisc-kicker {
  display: block;
  margin-bottom: 4px;
  color: #a86627;
  font-size: 10px;
  font-weight: 900;
}
.qdisc-head h3,
.qdisc-section-title h4 { margin: 0; color: var(--ink); font-size: 16px; font-weight: 950; }
.qdisc-head p,
.qdisc-section-title p { margin: 5px 0 0; color: var(--muted); font-size: 10.5px; line-height: 1.8; }
.qdisc-updated {
  flex: none;
  padding: 6px 10px;
  border: 1px solid #eadfce;
  border-radius: 999px;
  color: #827667;
  background: #fffaf2;
  font-size: 9.5px;
  font-weight: 800;
}
.qdisc-alert {
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 42px;
  padding: 9px 12px;
  border: 1px solid;
  border-radius: 11px;
  font-size: 10.5px;
  font-weight: 750;
  line-height: 1.8;
}
.qdisc-alert svg { width: 17px; height: 17px; flex: none; }
.qdisc-alert.danger { color: #a8382f; border-color: #f0c5bd; background: #fff0ed; }
.qdisc-alert.warn { color: #876311; border-color: #ebd8a7; background: #fff9e8; }
.qdisc-alert.neutral { color: #626d76; border-color: #d9e0e4; background: #f4f7f8; }
.qdisc-summary {
  display: grid;
  grid-template-columns: 1.05fr repeat(4, minmax(0, 1fr));
  gap: 9px;
}
.qdisc-summary > article {
  min-width: 0;
  min-height: 76px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 9px 11px;
  border: 1px solid #e9e2d7;
  border-radius: 13px;
  background: rgba(255,255,255,.9);
}
.qdisc-summary small { color: #837c72; font-size: 9.5px; font-weight: 800; }
.qdisc-summary strong { margin-top: 3px; color: #2d2924; font-size: 18px; font-weight: 950; line-height: 1.1; }
.qdisc-summary span { margin-top: 3px; color: #8e877d; font-size: 8.8px; font-weight: 700; line-height: 1.45; }
.qdisc-summary span b { color: inherit; }
.qdisc-summary .qdisc-index { border-color: #ead8c3; background: #fff8ee; }
.qdisc-summary .qdisc-index strong {
  font-family: "Vazirmatn", Tahoma, sans-serif;
  font-size: 29px;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
  line-height: 1.15;
  letter-spacing: 0;
}
.qdisc-index.qdisc-band-excellent { border-color: #b8dfd2; background: #eaf8f3; }
.qdisc-index.qdisc-band-excellent strong,
.qdisc-index.qdisc-band-excellent span { color: #197a65; }
.qdisc-index.qdisc-band-good { border-color: #c8dfbd; background: #f0f8ec; }
.qdisc-index.qdisc-band-good strong,
.qdisc-index.qdisc-band-good span { color: #4e7d3e; }
.qdisc-index.qdisc-band-acceptable { border-color: #ecd69e; background: #fff9e7; }
.qdisc-index.qdisc-band-acceptable strong,
.qdisc-index.qdisc-band-acceptable span { color: #987019; }
.qdisc-index.qdisc-band-weak,
.qdisc-index.qdisc-band-none { border-color: #efcfb6; background: #fff4ec; }
.qdisc-index.qdisc-band-weak strong,
.qdisc-index.qdisc-band-none strong,
.qdisc-index.qdisc-band-weak span,
.qdisc-index.qdisc-band-none span { color: #b46329; }
.qdisc-index.qdisc-band-suspicious { border-color: #ecc0b9; background: #fff0ed; }
.qdisc-index.qdisc-band-suspicious strong,
.qdisc-index.qdisc-band-suspicious span { color: #bd4438; }
.qdisc-confidence.confidence-high { border-color: #c7dfd5; background: #f1f9f5; }
.qdisc-confidence.confidence-medium { border-color: #e6d5ab; background: #fffaf0; }
.qdisc-confidence.confidence-low { border-color: #e8c9c2; background: #fff5f2; }
.qdisc-section-title { margin-top: 3px; padding-top: 3px; }
.qdisc-distributions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}
.qdisc-dist-card {
  --qdisc-color: #74808a;
  min-width: 0;
  overflow: hidden;
  border: 1px solid #e8e1d7;
  border-radius: 13px;
  background: #fff;
}
.qdisc-dist-card.correct { --qdisc-color: #2f9e83; }
.qdisc-dist-card.wrong { --qdisc-color: #d3603f; }
.qdisc-dist-card.blank { --qdisc-color: #c99720; }
.qdisc-dist-card > header,
.qdisc-dist-card > footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 10px 12px;
}
.qdisc-dist-card > header { border-bottom: 1px solid #f0ebe3; }
.qdisc-dist-card > header span { display: inline-flex; align-items: center; gap: 6px; color: #504a42; font-size: 10.5px; font-weight: 900; }
.qdisc-dist-card > header i { width: 9px; height: 9px; border-radius: 3px; background: var(--qdisc-color); }
.qdisc-dist-card > header b { color: var(--qdisc-color); font-size: 10px; }
.qdisc-dist-card > footer { border-top: 1px solid #f0ebe3; color: #8c857b; font-size: 8.8px; font-weight: 700; }
.qdisc-dist-card > footer b { color: var(--qdisc-color); font-size: 10px; }
.qdisc-dist-chart { width: 100%; height: auto; display: block; overflow: visible; color: var(--qdisc-color); }
.qdisc-axis { stroke: #d9d3ca; stroke-width: 1; }
.qdisc-axis-label { fill: #9d9589; font: 9px Vazirmatn, sans-serif; }
.qdisc-dist-area { fill: color-mix(in srgb, var(--qdisc-color) 14%, transparent); }
.qdisc-dist-line { fill: none; stroke: var(--qdisc-color); stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; pointer-events: none; }
.qdisc-hist-bar { fill: color-mix(in srgb, var(--qdisc-color) 28%, transparent); cursor: crosshair; transition: fill .15s ease; }
.qdisc-hist-bar:hover { fill: color-mix(in srgb, var(--qdisc-color) 55%, transparent); }
.qdisc-mean-line { stroke: var(--qdisc-color); stroke-width: 1.4; stroke-dasharray: 4 3; cursor: help; }
.qdisc-dist-empty { min-height: 176px; display: grid; place-items: center; padding: 18px; color: var(--muted); font-size: 9.5px; text-align: center; }
/* ضریب واقعی در ریل کارت سؤال */
.sq-disc-band { font-style: normal; font-size: 8.5px; font-weight: 900; color: #9a5a1f; }
.sq-rail-disc.is-pending { color: #8d8b86; background: #f7f6f2; }
.sq-rail-disc.is-pending b,
.sq-rail-disc.is-pending .sq-disc-band { color: #aaa59c; }
.sq-rail-disc.qdisc-band-excellent { background: #eef9f5; }
.sq-rail-disc.qdisc-band-excellent b,
.sq-rail-disc.qdisc-band-excellent .sq-disc-band { color: #207d69; }
.sq-rail-disc.qdisc-band-good { background: #f3f9ef; }
.sq-rail-disc.qdisc-band-good b,
.sq-rail-disc.qdisc-band-good .sq-disc-band { color: #557e43; }
.sq-rail-disc.qdisc-band-acceptable { background: #fff9e9; }
.sq-rail-disc.qdisc-band-acceptable b,
.sq-rail-disc.qdisc-band-acceptable .sq-disc-band { color: #9b7218; }
.sq-rail-disc.qdisc-band-weak,
.sq-rail-disc.qdisc-band-none { background: #fff5ed; }
.sq-rail-disc.qdisc-band-weak b,
.sq-rail-disc.qdisc-band-none b,
.sq-rail-disc.qdisc-band-weak .sq-disc-band,
.sq-rail-disc.qdisc-band-none .sq-disc-band { color: #bb652c; }
.sq-rail-disc.qdisc-band-suspicious { background: #fff0ed; }
.sq-rail-disc.qdisc-band-suspicious b,
.sq-rail-disc.qdisc-band-suspicious .sq-disc-band { color: #bd4438; }

.sp-subject-panel { position: relative; min-width: 0; padding: 20px; overflow: hidden; }
/* نوارِ سرِ کارتِ جایگاه: یک ردیفِ کم‌ارتفاع — درصد در ابتدای خط، صدک به‌صورت
   چیپِ افقی در انتهای خط. قبلاً هر دو بلوکِ ستونی بودند و ۱۰۹px ارتفاع می‌گرفتند. */
.sp-subject-standing-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 9px;
  border-bottom: 1px solid #eee6da;
}
.sp-standing-score { display: flex; align-items: baseline; gap: 8px; min-width: 0; }
.sp-standing-score .sp-kicker { flex: none; color: #a08059; font-size: 10.5px; }
.sp-subject-standing-head h2 { margin: 0; color: #d96329; font-size: 25px; font-weight: 950; line-height: 1.1; }
.sp-subject-standing-head p { margin: 7px 0 0; color: #827b71; font-size: 11px; line-height: 1.8; }
.sp-subject-rank {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  padding: 5px 9px 5px 11px;
  border: 1px solid #d8e4dd;
  border-radius: 11px;
  background: #f2f9f5;
}
.sp-subject-rank small { flex: none; color: #748078; font-size: 10px; font-weight: 800; }
.sp-subject-rank strong { flex: none; color: #297e68; font-size: 18px; font-weight: 950; line-height: 1.2; }
.sp-subject-rank span { padding: 3px 7px; border-radius: 999px; font-size: 9.5px; font-weight: 850; white-space: nowrap; }
.sp-subject-rank span.high { color: #267663; background: #dcefe7; }
.sp-subject-rank span.medium { color: #896719; background: #f8eecf; }
.sp-subject-rank span.low { color: #a65346; background: #f8e0db; }
/* شش کاشیِ عددی، هر کدام یک ردیفِ برچسب + یک عدد. برچسب‌ها تک‌خطی‌اند، پس
   `min-height` قدیمی (که جای دو خط را می‌گرفت) حذف شد و ارتفاع نصف شد. */
.sp-subject-score-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 6px;
  margin: 10px 0;
}
.sp-subject-score-grid.personal-only { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.sp-subject-score-grid article {
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1px;
  padding: 6px 5px 7px;
  border: 1px solid #ebe4d9;
  border-radius: 10px;
  background: #faf8f4;
  text-align: center;
}
.sp-subject-score-grid small {
  max-width: 100%;
  display: flex;
  align-items: center;
  gap: 4px;
  color: #8b847a;
  font-size: 10px;
  font-weight: 800;
  line-height: 1.5;
  white-space: nowrap;
}
.sp-subject-score-grid small::before { content: ""; width: 6px; height: 6px; flex: none; border-radius: 50%; background: #cec5b6; }
.sp-subject-score-grid strong { display: block; color: #37322c; font-size: 15px; font-weight: 950; line-height: 1.3; }
.sp-subject-score-grid .correct small::before { background: #35a189; }
.sp-subject-score-grid .wrong small::before { background: #d4614e; }
.sp-subject-score-grid .blank small::before { background: #d9a627; }
.sp-subject-score-grid .total small::before { background: #9c8f7c; }
.sp-subject-score-grid .correct strong { color: #248771; }
.sp-subject-score-grid .wrong strong { color: #c9503f; }
.sp-subject-score-grid .blank strong { color: #a77a16; }
.sp-subject-score-grid .cohort { border-color: #dfe7e3; background: #f5f9f7; }
.sp-subject-score-grid .cohort small { color: #74857d; }
.sp-subject-score-grid .cohort small::before { background: #8fb3a5; }
.sp-subject-score-grid .cohort strong { color: #2c6f5c; }
.sp-exam-subject-trend {
  position: relative;
  min-width: 0;
  margin: 16px 0 14px;
  padding: 20px 20px 14px;
  border: 1px solid #dde8e2;
  border-radius: 15px;
  background: linear-gradient(180deg, #fbfefc 0%, #fff 100%);
  overflow: visible;
}
.sp-exam-subject-trend > header { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 0 3px 14px; }
.sp-exam-subject-trend > header > div { min-width: 0; }
.sp-exam-subject-trend > header span { display: block; color: #668074; font-size: 11px; font-weight: 850; }
.sp-exam-subject-trend > header h3 { margin: 4px 0 0; overflow: hidden; color: #343d38; font-size: 17px; font-weight: 950; text-overflow: ellipsis; white-space: nowrap; }
.sp-exam-subject-trend > header > small { flex: none; padding: 6px 11px; border-radius: 9px; color: #39735f; background: #e8f5ee; font-size: 11.5px; font-weight: 850; white-space: nowrap; }
.sp-exam-trend-chart-wrap { max-width: 100%; overflow-x: auto; overflow-y: hidden; scrollbar-width: thin; scrollbar-color: #d7d0c7 transparent; }
/* viewBox هم‌اندازهٔ پهنای واقعیِ کارت ساخته می‌شود، پس مقیاس ۱ است و چیزی وا نمی‌رود؛
   width:100% تضمین می‌کند کل کادر پر شود و کنارِ نمودار فضای خالی نماند. */
.sp-exam-trend-chart { width: 100%; min-width: 0; height: auto; display: block; overflow: visible; font-family: inherit; }
.sp-exam-trend-grid line { stroke: #ebe7e0; stroke-width: 1; vector-effect: non-scaling-stroke; }
.sp-exam-trend-grid.zero line { stroke: #cfc7bb; stroke-dasharray: 4 4; }
.sp-exam-trend-grid text { fill: #8d857b; font-size: 11.5px; font-weight: 800; text-anchor: end; }
.sp-exam-trend-line { fill: none; stroke: #36896f; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.sp-exam-trend-x { fill: #6f675e; font-size: 13px; font-weight: 850; text-anchor: middle; direction: rtl; }
.sp-exam-trend-point { outline: none; cursor: pointer; }
.sp-exam-trend-point .hit { fill: transparent; }
.sp-exam-trend-point .dot { fill: #fff; stroke: #2f8d75; stroke-width: 3; transition: r .14s ease, fill .14s ease; vector-effect: non-scaling-stroke; }
.sp-exam-trend-point:hover .dot,
.sp-exam-trend-point:focus .dot,
.sp-exam-trend-point.active .dot { r: 9px; fill: #2f8d75; stroke: #fff; }
.sp-exam-subject-trend > footer { padding: 8px 3px 0; color: #8b8378; font-size: 11px; font-weight: 750; line-height: 1.9; }
.sp-exam-trend-tip {
  position: absolute;
  z-index: 25;
  width: min(390px, calc(100% - 16px));
  display: grid;
  gap: 8px;
  padding: 13px 14px;
  border: 1px solid #d7cec2;
  border-radius: 12px;
  color: #4d463f;
  background: rgba(255,255,255,.985);
  box-shadow: 0 14px 32px rgba(61, 47, 31, .18);
  opacity: 0;
  pointer-events: auto;
  transform: translateY(4px);
  transition: opacity .12s ease, transform .12s ease;
}
.sp-exam-trend-tip.on { opacity: 1; transform: translateY(0); }
.sp-exam-trend-tip[hidden] { display: none; }
.sp-exam-trend-tip > a { display: flex; align-items: center; justify-content: space-between; gap: 10px; color: #246e59; font-size: 13.5px; font-weight: 950; text-decoration: none; }
.sp-exam-trend-tip > a:hover { color: #c85c23; }
.sp-exam-trend-tip > a svg { width: 16px; height: 16px; flex: none; }
.sp-exam-trend-tip > time { margin-top: -4px; color: #958b80; font-size: 10.5px; }
.sp-exam-trend-score { display: flex; align-items: baseline; gap: 10px; }
.sp-exam-trend-score strong { direction: ltr; color: #d66027; font-size: 21px; font-weight: 950; }
.sp-exam-trend-score span { color: #81786e; font-size: 11px; font-weight: 800; }
.sp-exam-trend-counts { display: flex; flex-wrap: wrap; gap: 6px; }
.sp-exam-trend-counts span { padding: 4px 9px; border-radius: 999px; font-size: 11px; font-weight: 850; }
.sp-exam-trend-counts .correct { color: #267a67; background: #e8f5f0; }
.sp-exam-trend-counts .wrong { color: #b95042; background: #fff0ed; }
.sp-exam-trend-counts .blank { color: #9a721d; background: #fff7df; }
.sp-exam-trend-rank { display: flex; gap: 6px; padding-top: 7px; border-top: 1px solid #eee8df; }
.sp-exam-trend-rank span { flex: 1; display: flex; align-items: center; justify-content: space-between; padding: 6px 9px; border-radius: 8px; color: #746b62; background: #f7f4ef; font-size: 10.5px; font-weight: 800; }
.sp-exam-trend-rank b { color: #3d6557; font-size: 12px; }
.sp-exam-trend-tip ul { display: grid; gap: 4px; margin: 0; padding: 8px 0 0; border-top: 1px solid #eee8df; list-style: none; }
.sp-exam-trend-tip li { display: grid; grid-template-columns: minmax(0, 1fr) auto 46px; align-items: center; gap: 9px; padding: 6px 9px; border-radius: 9px; background: #faf8f5; }
.sp-exam-trend-tip li > div { min-width: 0; }
.sp-exam-trend-tip li b,
.sp-exam-trend-tip li small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sp-exam-trend-tip li b { color: #3c3730; font-size: 11.5px; line-height: 1.45; }
.sp-exam-trend-tip li small { margin-top: 1px; color: #999087; font-size: 10px; line-height: 1.5; }
.sp-exam-trend-tip li > span { color: #746c63; font-size: 10.5px; font-weight: 800; white-space: nowrap; }
.sp-exam-trend-tip li > strong { direction: ltr; color: #3e775f; font-size: 12px; font-weight: 950; text-align: left; }
.sp-exam-trend-tip li.no-book { display: block; color: #8d8479; font-size: 11px; text-align: center; }
.sp-exam-subject-empty { min-height: 112px; display: flex; align-items: center; justify-content: center; gap: 10px; padding: 18px; color: #7f776d; text-align: start; }
.sp-exam-subject-empty > svg { width: 28px; height: 28px; flex: none; color: #6d9987; }
.sp-exam-subject-empty b,
.sp-exam-subject-empty span { display: block; }
.sp-exam-subject-empty b { color: #4c4640; font-size: 14px; }
.sp-exam-subject-empty span { margin-top: 5px; font-size: 11px; line-height: 1.8; }
.sat-card {
  position: relative;
  min-width: 0;
  padding: 20px 20px 14px;
  border: 1px solid #dde8e2;
  border-radius: 15px;
  background: linear-gradient(180deg, #fbfefc 0%, #fff 100%);
  overflow: visible;
}
.sat-card > header { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 0 3px 14px; }
.sat-card > header > div { min-width: 0; }
.sat-card > header span { display: block; color: #668074; font-size: 11px; font-weight: 850; }
.sat-card > header h3 { margin: 4px 0 0; overflow: hidden; color: #343d38; font-size: 17px; font-weight: 950; text-overflow: ellipsis; white-space: nowrap; }
.sat-card > header > small { flex: none; padding: 6px 11px; border-radius: 9px; color: #39735f; background: #e8f5ee; font-size: 11.5px; font-weight: 850; white-space: nowrap; }
/* هم‌قوارهٔ کاشی‌های کارتِ «جایگاه در جامعه» (‎.sp-subject-score-grid‎) تا دو کارتِ
   یک ردیف، دو ریتم متفاوت نداشته باشند. */
.sat-summary { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; margin-bottom: 10px; }
.sat-summary article {
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1px;
  padding: 6px 6px 7px;
  border: 1px solid #ebe4d9;
  border-radius: 10px;
  background: #faf8f4;
  text-align: center;
}
.sat-summary small { max-width: 100%; display: block; overflow: hidden; color: #8b847a; font-size: 10px; font-weight: 800; line-height: 1.5; text-overflow: ellipsis; white-space: nowrap; }
.sat-summary strong { display: block; color: #37322c; font-size: 15px; font-weight: 950; line-height: 1.3; }
.sat-summary .up strong { color: #248771; }
.sat-summary .down strong { color: #c9503f; }
.sat-chart-wrap { max-width: 100%; overflow-x: auto; overflow-y: hidden; scrollbar-width: thin; scrollbar-color: #d7d0c7 transparent; }
.sat-chart { width: 100%; min-width: 0; height: auto; display: block; overflow: visible; font-family: inherit; }
.sat-grid line { stroke: #ebe7e0; stroke-width: 1; vector-effect: non-scaling-stroke; }
.sat-grid.zero line { stroke: #cfc7bb; stroke-dasharray: 4 4; }
.sat-grid text { fill: #8d857b; font-size: 11.5px; font-weight: 800; text-anchor: end; }
.sat-area { fill: rgba(47, 141, 117, .09); stroke: none; }
.sat-line { fill: none; stroke: #36896f; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.sat-x text { fill: #6f675e; font-size: 13px; font-weight: 850; text-anchor: middle; direction: rtl; }
.sat-x text.count { fill: #a49a8e; font-size: 11px; font-weight: 800; }
.sat-point { outline: none; cursor: pointer; }
.sat-point .hit { fill: transparent; }
.sat-point .dot { fill: #fff; stroke: #2f8d75; stroke-width: 3; transition: r .14s ease, fill .14s ease; vector-effect: non-scaling-stroke; }
.sat-point:hover .dot,
.sat-point:focus .dot,
.sat-point.active .dot { r: 9px; fill: #2f8d75; stroke: #fff; }
.sat-card > footer { padding: 8px 3px 0; color: #8b8378; font-size: 11px; font-weight: 750; line-height: 1.9; }
.sat-empty { display: flex; align-items: center; gap: 11px; padding: 16px 10px 20px; color: #8d8479; }
.sat-empty svg { width: 34px; height: 34px; flex: none; color: #bdb4a8; }
.sat-empty b { display: block; color: #4c4640; font-size: 14px; }
.sat-empty span { display: block; margin-top: 5px; font-size: 11px; line-height: 1.8; }
.sat-tip {
  position: absolute;
  z-index: 6;
  width: min(390px, 94%);
  display: grid;
  gap: 8px;
  padding: 13px 14px;
  border: 1px solid #e3dbcd;
  border-radius: 13px;
  background: #fff;
  box-shadow: 0 16px 34px rgba(58, 48, 36, .17);
  opacity: 0;
  transform: translateY(5px);
  transition: opacity .14s ease, transform .14s ease;
  pointer-events: auto;
}
.sat-tip.on { opacity: 1; transform: translateY(0); }
.sat-tip[hidden] { display: none; }
.sat-tip-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.sat-tip-title { color: #246e59; font-size: 13.5px; font-weight: 950; }
.sat-tip-main { display: flex; align-items: baseline; gap: 6px; }
.sat-tip-main strong { color: #d96329; font-size: 21px; font-weight: 950; line-height: 1; }
.sat-tip-main small { color: #8b837a; font-size: 11px; font-weight: 800; }
.sat-tip-counts { display: flex; flex-wrap: wrap; gap: 6px; }
.sat-tip-counts span { padding: 4px 9px; border-radius: 999px; font-size: 11px; font-weight: 850; }
.sat-tip-counts .correct { color: #248771; background: #e2f2ec; }
.sat-tip-counts .wrong { color: #c04a39; background: #f8e3df; }
.sat-tip-counts .blank { color: #96700f; background: #f7eed4; }
.sat-tip-sub { padding-top: 7px; border-top: 1px solid #eee8df; color: #8b837a; font-size: 10.5px; font-weight: 850; }
/* بدون اسکرول: پنجره باید یکجا و کامل دیده شود؛ ماهِ پرفصل دو ستونه می‌شود. */
.sat-tip ul { display: grid; gap: 4px; margin: 0; padding: 0; list-style: none; }
.sat-tip.wide { width: min(680px, 96%); }
.sat-tip.wide ul { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px 8px; }
.sat-tip { overflow: auto; scrollbar-width: thin; }
.sat-tip li {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 58px 46px;
  align-items: center;
  gap: 9px;
  padding: 6px 9px;
  border-radius: 9px;
  background: #faf8f5;
}
.sat-tip li.other { background: #f4f1ec; }
.sat-tip li > div { min-width: 0; }
.sat-tip li b,
.sat-tip li small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sat-tip li b { color: #3c3730; font-size: 11.5px; line-height: 1.45; }
.sat-tip li b em { color: #9a9288; font-size: 10.5px; font-style: normal; font-weight: 750; }
.sat-tip li small { margin-top: 1px; color: #999087; font-size: 10px; line-height: 1.5; }
.sat-share { position: relative; display: block; height: 17px; border-radius: 6px; background: #ece7df; overflow: hidden; }
/* از لبهٔ آغازِ متن پر می‌شود (در RTL یعنی از راست) تا هم‌جهت با خواندن باشد. */
.sat-share i { position: absolute; inset-block: 0; inset-inline-start: 0; display: block; border-radius: 5px; background: linear-gradient(to left, #58ab8f, #2f8d75); }
.sat-share b { position: relative; display: block; padding-top: 3px; color: #35302a; font-size: 10px; font-weight: 850; text-align: center; }
.sat-count { color: #746c63; font-size: 11px; font-weight: 800; white-space: nowrap; }
.sat-tip li > strong { direction: ltr; color: #3e775f; font-size: 12px; font-weight: 950; text-align: left; }
.sat-tip li.empty { display: block; color: #8d8479; font-size: 11px; text-align: center; }
/* این دو بدنه داخل کارت تلفیقی هستند و نباید قاب، فاصله یا پس‌زمینهٔ کارت قدیمی
   را دوباره بسازند. اختصاصی‌تر بودن انتخابگر، قواعد عمومی پایین صفحه را خنثی می‌کند. */
.spx-trend-panel > .spx-trend-embedded {
  min-width: 0;
  flex: 1;
  display: flex;
  flex-direction: column;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  overflow: visible;
}
.spx-trend-panel > .spx-trend-embedded.empty { display: grid; place-items: center; }
.spx-trend-panel > .spx-trend-embedded > footer { margin-top: auto; }
.sp-bell-wrap {
  position: relative;
  min-width: 0;
  margin-top: 4px;
  padding: 10px 10px 4px;
  border: 1px solid #e9e1d5;
  border-radius: 14px;
  background: linear-gradient(180deg, #fff 0%, #fffcf7 100%);
  isolation: isolate;
}
/* این سه عدد قبلاً دو بار می‌آمدند: یک بار همین‌جا و یک بار در ردیفِ آیکون‌دارِ
   زیر نمودار. ردیفِ تکراری حذف شد و همین نوار به چیپ تبدیل شد. */
.sp-bell-caption { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; padding: 2px 4px 6px; font-size: 10.5px; font-weight: 850; }
.sp-bell-caption span { display: inline-flex; align-items: center; gap: 6px; padding: 3px 9px; border: 1px solid transparent; border-radius: 999px; }
.sp-bell-caption i { width: 8px; height: 8px; flex: none; border-radius: 3px; }
.sp-bell-caption .below { color: #23705c; border-color: #cfe7de; background: #eaf6f1; }
.sp-bell-caption .equal { color: #96601f; border-color: #ecdcc5; background: #fbf2e6; }
.sp-bell-caption .above { color: #856717; border-color: #ecdfb8; background: #fbf5e0; }
.sp-bell-caption .below i { background: #2f9e83; }
.sp-bell-caption .equal i { background: #dd8a3b; }
.sp-bell-caption .above i { background: #d6a33a; }
.sp-bell-chart { width: 100%; height: auto; display: block; overflow: visible; }
.sp-bell-axis { stroke: #cfc8bd; stroke-width: 1.2; }
.sp-bell-area { transition: opacity .16s ease, filter .16s ease; }
.sp-bell-area.below { fill: rgba(47, 158, 131, .28); }
.sp-bell-area.above { fill: rgba(214, 163, 58, .24); }
.sp-bell-line { fill: none; stroke: #4e524f; stroke-width: 2.8; stroke-linecap: round; stroke-linejoin: round; pointer-events: none; }
.sp-bell-wrap[data-hover-side="below"] .sp-bell-area.below { opacity: 1; filter: saturate(1.2); }
.sp-bell-wrap[data-hover-side="below"] .sp-bell-area.above { opacity: .28; }
.sp-bell-wrap[data-hover-side="above"] .sp-bell-area.above { opacity: 1; filter: saturate(1.2); }
.sp-bell-wrap[data-hover-side="above"] .sp-bell-area.below { opacity: .28; }
.sp-bell-user line { stroke: #e36829; stroke-width: 2.2; stroke-dasharray: 5 4; }
.sp-bell-user circle { fill: #e36829; stroke: #fff; stroke-width: 3; }
/* اندازه در **واحدِ viewBox** است نه پیکسلِ صفحه، و ضریبِ SVG (پهنای رندرشده ÷ ۸۰۰) با
   چیدمان عوض می‌شود: در شبکهٔ دوستونی ~۰٫۷۳، در یک‌ستونیِ عریض ~۱٫۴، و روی موبایل ~۰٫۳۶.
   پس ۱۱ واحدِ قبلی روی دسکتاپ ۸px و روی موبایل ۳٫۲px دیده می‌شد — عملاً خوانده نمی‌شد.
   حالا هر پلهٔ چیدمان واحدِ خودش را دارد تا اندازهٔ **روی صفحه** حدود ۱۰–۱۵px بماند؛
   پلکان عمداً یکنواخت نیست، چون خودِ چیدمان یکنواخت نیست (دوستونی ← یک‌ستونی ← باریک).
   عددها با هارنسِ برش‌خورده از app.js سنجیده شده‌اند، نه چشمی. */
.sp-bell-user text { fill: #c7521b; font: 900 16px Vazirmatn, sans-serif; paint-order: stroke; stroke: #fff; stroke-width: 5px; stroke-linejoin: round; }
/* پلکان باید **بعد از** قاعدهٔ پایه بیاید و کنارِ خودش بماند: بلوک‌های media که جای دیگرِ
   فایل‌اند زودتر از این قاعده می‌آیند و با همین specificity بی‌اثر می‌شوند. */
@media (max-width: 1240px) { .sp-bell-user text { font-size: 10px; } }   /* شبکه یک‌ستونی: کارت تمام‌عرض، ضریب ~۱٫۳–۱٫۴ */
@media (max-width: 1120px) { .sp-bell-user text { font-size: 11px; } }
@media (max-width: 820px)  { .sp-bell-user text { font-size: 15px; } }
@media (max-width: 600px)  { .sp-bell-user text { font-size: 26px; } }   /* موبایل: ضریب ~۰٫۳۶–۰٫۵۹ */
.sp-bell-tick line { stroke: #cfc8bd; }
.sp-bell-tick text { fill: #91897e; font: 10.5px Vazirmatn, sans-serif; }
.sp-bell-cursor line { stroke: #5c6370; stroke-width: 1.4; stroke-dasharray: 3 3; }
.sp-bell-cursor circle { fill: #fff; stroke: #4d5862; stroke-width: 2; }
.sp-bell-hit { cursor: crosshair; touch-action: none; outline: none; }
.sp-bell-hit:focus-visible { stroke: #e36829; stroke-width: 2; stroke-dasharray: 5 4; }
.sp-bell-tip {
  position: absolute;
  z-index: 12;
  width: min(220px, calc(100% - 12px));
  padding: 9px 11px;
  border: 1px solid #dcd3c6;
  border-radius: 10px;
  color: #554e45;
  background: rgba(255,255,255,.97);
  box-shadow: 0 12px 28px rgba(49, 37, 23, .17);
  opacity: 0;
  pointer-events: none;
  transform: translateY(4px);
  transition: opacity .12s ease, transform .12s ease;
}
.sp-bell-tip.on { opacity: 1; transform: translateY(0); }
.sp-bell-tip strong { display: block; margin-bottom: 5px; color: #d35e25; font-size: 14px; }
.sp-bell-tip span { display: flex; justify-content: space-between; gap: 8px; padding: 2px 0; font-size: 10px; }
.sp-bell-tip span b { color: #34302b; }
.sp-bell-tip small { display: block; margin-top: 5px; padding-top: 5px; border-top: 1px solid #eee7de; color: #90887e; font-size: 10px; }
.sp-bell-axis-title { margin-top: -9px; padding-bottom: 4px; color: #938b80; font-size: 10px; font-weight: 800; text-align: center; }
.sp-subject-rank.is-private { border-color: #e5ded3; background: #f8f6f2; }
.sp-subject-rank.is-private strong { color: #8d857a; }
.sp-cohort-private {
  min-height: 180px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 13px;
  margin-top: 4px;
  padding: 26px;
  border: 1px dashed #dfd5c8;
  border-radius: 14px;
  color: #686159;
  background: #faf8f4;
  text-align: start;
}
.sp-cohort-private > span { width: 46px; height: 46px; flex: none; display: grid; place-items: center; border-radius: 13px; color: #8b7461; background: #eee8df; }
.sp-cohort-private svg { width: 21px; height: 21px; }
.sp-cohort-private h3 { margin: 0 0 5px; color: #403a34; font-size: 12px; }
.sp-cohort-private p { max-width: 570px; margin: 0; color: #847c72; font-size: 10.5px; line-height: 1.9; }
.sp-subject-ineligible,
.sp-subject-no-chart,
.sp-subject-empty,
.sp-subject-error,
.sp-subject-loading {
  min-height: 330px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 8px;
  padding: 26px;
  text-align: center;
}
.sp-subject-ineligible > span,
.sp-subject-no-chart > span,
.sp-subject-empty > span,
.sp-subject-error > span { width: 48px; height: 48px; display: grid; place-items: center; border-radius: 14px; color: #b25a29; background: #fff0e5; }
.sp-subject-ineligible svg,
.sp-subject-no-chart svg,
.sp-subject-empty svg,
.sp-subject-error svg { width: 22px; height: 22px; }
.sp-subject-ineligible h3,
.sp-subject-no-chart h3,
.sp-subject-empty h2,
.sp-subject-error h2,
.sp-subject-loading h2 { margin: 0; color: #332e28; font-size: 15px; }
.sp-subject-ineligible p,
.sp-subject-no-chart p,
.sp-subject-empty p,
.sp-subject-error p,
.sp-subject-loading p { max-width: 510px; margin: 0; color: #898177; font-size: 9.5px; line-height: 1.9; }
.sp-subject-loading > div { display: flex; gap: 5px; }
.sp-subject-loading > div span { width: 8px; height: 8px; border-radius: 50%; background: #df6b2b; animation: dashboardPulse 1s infinite ease-in-out; }
.sp-subject-loading > div span:nth-child(2) { animation-delay: .12s; }
.sp-subject-loading > div span:nth-child(3) { animation-delay: .24s; }

@media (max-width: 1120px) {
  .qdisc-summary { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .qdisc-distributions { grid-template-columns: 1fr 1fr; }
  .qdisc-dist-card.blank { grid-column: 1 / -1; }
}
@media (max-width: 820px) {
  .qdisc-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .qdisc-distributions { grid-template-columns: 1fr; }
  .qdisc-dist-card.blank { grid-column: auto; }
  .sp-subject-panel { padding: 16px; }
  .sat-card { padding: 13px 13px 9px; }
  .sat-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 600px) {
  .qdisc-analysis { padding: 13px; }
  .qdisc-head,
  .qdisc-section-title { flex-direction: column; }
  .qdisc-updated { align-self: flex-start; }
  .qdisc-summary { grid-template-columns: 1fr; }
  .qdisc-summary > article { min-height: 74px; }
  .sp-subject-standing-head { align-items: stretch; flex-direction: column; gap: 8px; }
  .sp-subject-rank { width: 100%; justify-content: space-between; }
  .sp-subject-score-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .sp-subject-score-grid.personal-only { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sp-cohort-private { align-items: flex-start; padding: 18px; }
  .sp-bell-caption { justify-content: flex-start; }
}

/* ═══════════ مدل چاپ کنکوریِ آزمون: جلد دفترچه + سربرگ صفحه + کادر محاسبات ═══════════ */
.pstudio-page.pexam-cover-page { padding: 57px; }
.pexam-cover {
  height: 1000px; /* کمی کمتر از ارتفاع مفید A4 (چاپ: 296mm − 2×15mm ≈ 1005px) تا جلد به صفحهٔ دوم سر نخورد */
  display: flex;
  flex-direction: column;
  position: relative;
  isolation: isolate;
  overflow: hidden;
  color: #1c2732;
  --pexam-ink: #214f75;
  --pexam-accent: #ff681d;
  --pexam-soft: #fff3e9;
  /* خطوط جلد: هم‌رنگِ کادرهای اصلی (شمارهٔ دفترچه و جدول دروس) تا در چاپ سیاه‌وسفید
     و روی کاغذ هم واضح دربیایند؛ خطوط داخلی یک پله روشن‌تر تا کادر شلوغ نشود. */
  --pexam-line: #214f75;
  --pexam-line-in: #5c81a1;
  --pexam-line-warm: #b4713c;
}
.pexam-cover::before {
  content: "";
  position: absolute;
  z-index: -1;
  width: 430px;
  height: 430px;
  top: 165px;
  left: 50%;
  transform: translateX(-50%);
  border: 42px double rgba(33, 79, 117, .035);
  border-radius: 50%;
  box-shadow: 0 0 0 34px rgba(255, 104, 29, .025), 0 0 0 86px rgba(33, 79, 117, .018);
  pointer-events: none;
}
.pexam-cover-head {
  display: grid;
  /* دو ستون کناری مساویِ ۱fr و برندِ auto در وسط تا لوگوی «آقای کنکور» دقیقاً وسط صفحه بیفتد؛
     هر باکس با عرض ثابت به لبهٔ بیرونیِ خودش می‌چسبد و تعادل حفظ می‌شود. */
  grid-template-columns: 1fr auto 1fr;
  gap: 16px;
  align-items: stretch;
}
.pexam-cover-bookno {
  width: 122px;
  justify-self: start;
  display: grid;
  grid-template-rows: auto auto 1fr;
  gap: 0;
  align-content: stretch;
  overflow: hidden;
  border: 1.5px solid var(--pexam-line);
  border-radius: 16px;
  text-align: center;
  background: #fff;
}
.pexam-cover-bookno span,
.pexam-cover-bookno b {
  display: grid;
  place-items: center;
  padding: 6px 4px;
  font-size: 10.5px;
  font-weight: 900;
  color: var(--pexam-ink);
}
.pexam-cover-bookno span + span { border-top: 1px solid var(--pexam-line-in); }
.pexam-cover-bookno b {
  min-height: 42px;
  border-top: 1px solid var(--pexam-line-in);
  background: var(--pexam-ink);
  color: #fff;
  font-size: 27px;
  line-height: 1;
}
.pexam-cover-brand {
  display: grid;
  justify-items: center;
  align-content: center;
  gap: 2px;
  min-height: 108px;
}
.pexam-brand-mark {
  width: 62px;
  height: 46px;
  display: grid;
  place-items: center;
  margin-bottom: 3px;
}
.pexam-brand-mark > img, .pexam-brand-mark > svg { width: 100%; height: 100%; object-fit: contain; display: block; }
.pexam-cover-brand > .brand-type { height: 24px; margin: 2px auto 1px; }
.pexam-cover-brand > b { font-size: 16px; font-weight: 950; color: var(--pexam-ink); }
.pexam-cover-brand > small { font-size: 9.5px; color: #667481; font-weight: 700; }
.pexam-cover-info {
  position: relative;
  overflow: hidden;
  width: 200px;
  justify-self: end;
  border: 1.5px solid var(--pexam-line);
  border-radius: 16px;
  padding: 12px 16px 12px 12px;
  display: grid;
  gap: 6px;
  align-content: center;
  text-align: right;
  font-size: 11px;
  font-weight: 700;
  background: linear-gradient(135deg, #f8fbfd, #fff);
  color: #4e5e6a;
}
.pexam-cover-info > b { font-size: 13px; font-weight: 950; color: var(--pexam-ink); }
/* دفترچهٔ اختصاصی (ترتیب تصادفی برای هر شرکت‌کننده): نام و کد داوطلب روی جلد */
.pexam-cover-owner {
  margin-top: 16px;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: center;
  gap: 4px 10px;
  border: 1.6px dashed var(--pexam-line-warm);
  border-radius: 14px;
  padding: 9px 14px 8px;
  background: var(--pexam-soft);
  color: #7a482c;
  font-size: 12px;
  font-weight: 800;
}
.pexam-cover-owner > b { font-size: 17px; font-weight: 950; color: var(--pexam-ink); }
.pexam-cover-owner small { font-size: 11px; font-weight: 800; }
.pexam-cover-owner em { flex-basis: 100%; text-align: center; font-style: normal; font-size: 10px; font-weight: 700; color: #8a6a55; }
.pexam-cover-hero {
  position: relative;
  margin-top: 22px;
  padding: 20px 24px 18px;
  border: 1.6px solid var(--pexam-line);
  border-radius: 22px;
  background: linear-gradient(125deg, rgba(239, 248, 253, .96), rgba(255, 250, 246, .98));
  text-align: center;
  box-shadow: 0 9px 22px rgba(33, 79, 117, .07);
}
.pexam-cover-kicker {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 13px;
  border-radius: 999px;
  background: #fff;
  color: #758491;
  font-size: 10px;
  font-weight: 850;
}
.pexam-cover-title {
  margin-top: 7px;
  padding: 2px 12px;
  text-align: center;
}
.pexam-cover-title h1 { margin: 0; color: var(--pexam-ink); font-size: 20px; font-weight: 950; line-height: 1.75; }
.pexam-cover-group {
  margin: 5px auto 0;
  color: #526675;
  font-size: 12.5px;
  font-weight: 900;
  text-align: center;
}
.pexam-cover-stats {
  width: min(470px, 100%);
  margin: 14px auto 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}
.pexam-cover-stats > span {
  min-height: 42px;
  display: grid;
  place-items: center;
  gap: 1px;
  padding: 6px 8px;
  border: 1.2px solid var(--pexam-line);
  border-radius: 12px;
  background: rgba(255, 255, 255, .88);
}
.pexam-cover-stats small { color: #7a8790; font-size: 9px; font-weight: 800; }
.pexam-cover-stats b { color: var(--pexam-ink); font-size: 12px; font-weight: 950; }
.pexam-cover-table {
  margin-top: 24px;
  border: 1.5px solid var(--pexam-line);
  border-radius: 15px;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 8px 18px rgba(33, 79, 117, .06);
}
.pexam-crow {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr) 96px 84px 84px 122px;
  align-items: stretch;
}
.pexam-crow > span {
  padding: 8px 10px;
  font-size: 11.5px;
  font-weight: 700;
  text-align: center;
  border-inline-start: 1px solid var(--pexam-line-in);
  border-top: 1px solid var(--pexam-line-in);
  display: grid;
  place-items: center;
  min-height: 34px;
}
.pexam-crow > span:first-child { border-inline-start: 0; }
.pexam-crow.head > span {
  border-top: 0;
  border-color: rgba(255, 255, 255, .34);
  background: var(--pexam-ink);
  color: #fff;
  font-weight: 900;
  font-size: 11px;
}
.pexam-crow .pexam-c-title { font-weight: 900; }
.pexam-cover-notes {
  margin-top: 20px;
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: center;
}
.pexam-note {
  border: 1.2px solid var(--pexam-line-warm);
  border-radius: 999px;
  padding: 7px 20px;
  font-size: 11px;
  font-weight: 900;
  background: var(--pexam-soft);
  color: #7a482c;
}
.pexam-cover-foot {
  margin-top: auto;
  border: 1.2px solid var(--pexam-line);
  border-radius: 12px;
  padding: 8px 12px;
  text-align: center;
  font-size: 9.5px;
  font-weight: 700;
  color: #60717e;
  background: #f7fafc;
}

/* خروجی PDF دفترچه روی Quartz/Preview/Safari: حذف لایه‌های نیمه‌شفاف و
   پس‌زمینه‌های ترکیبی که در macOS به شکل کادر نارنجی/خاکستری ظاهر می‌شوند. */
body.pdf-export .pstudio-page.pexam-cover-page .pexam-cover,
body.pdf-export .pstudio-page.pexam-page {
  -webkit-print-color-adjust: exact;
  print-color-adjust: exact;
}
body.pdf-export .pstudio-page.pexam-cover-page .pexam-cover::before { display: none; }
body.pdf-export .pstudio-page.pexam-cover-page .pexam-brand-mark {
  background: none !important;
  background-image: none !important;
  box-shadow: none !important;
  filter: none !important;
  isolation: isolate;
}
body.pdf-export .pstudio-page.pexam-cover-page .pexam-cover-info,
body.pdf-export .pstudio-page.pexam-cover-page .pexam-cover-hero,
body.pdf-export .pstudio-page.pexam-cover-page .pexam-cover-stats > span,
body.pdf-export .pstudio-page.pexam-cover-page .pexam-cover-table,
body.pdf-export .pstudio-page.pexam-cover-page .pexam-note,
body.pdf-export .pstudio-page.pexam-cover-page .pexam-cover-foot,
body.pdf-export .pstudio-page.pexam-cover-page .pexam-crow:not(.head) > span {
  background: #fff !important;
  background-image: none !important;
  box-shadow: none !important;
  filter: none !important;
  isolation: isolate;
}
body.pdf-export .pstudio-page.pexam-cover-page .pexam-crow.head > span {
  background: #214f75 !important;
  background-image: none !important;
  box-shadow: none !important;
  filter: none !important;
}
body.pdf-export .pstudio-page.pexam-page .pq-no-wrap {
  background: #fff !important;
  box-shadow: none !important;
  filter: none !important;
  isolation: isolate;
}

/* صفحات سؤال مدل کنکوری: سربرگ سادهٔ «نام آزمون | درس ....... صفحه N» */
.pstudio-page.pexam-page {
  padding-top: 88px;
  display: flex;
  flex-direction: column;
}
.pexam-page .pstudio-page-inner { flex: 0 0 auto; }
.pexam-page-head {
  position: absolute;
  top: 38px;
  right: 57px;
  left: 57px;
  z-index: 2;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 14px;
  padding-bottom: 8px;
  border-bottom: 1.5px solid #17140f;
}
.pexam-page-head b {
  font-size: 12px;
  font-weight: 900;
  color: #17140f;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.pexam-page-head b i { font-style: normal; color: #8b8578; padding-inline: 3px; }
.pexam-page-head > span { font-size: 11px; font-weight: 900; color: #17140f; flex: none; }

/* کادر «محل انجام محاسبات» پایین صفحات دروس محاسباتی */
.pexam-calc {
  position: absolute;
  right: 57px;
  left: 57px;
  bottom: 220px;
  margin: 0;
  min-height: 0;
  border-top: 1.8px solid #17140f;
  z-index: 2;
  pointer-events: none;
}
.pexam-calc > span {
  display: block;
  width: max-content;
  margin: -13px auto 0;
  background: #f2efe9;
  border: 1px solid #55503f;
  border-radius: 2px;
  padding: 4px 30px;
  font-size: 10.5px;
  font-weight: 900;
  color: #17140f;
}

/* شمارهٔ سؤال مدل کنکوری: خط کوتاه و کنترل‌شده کنار عدد، مستقل از الگوریتم bidi */
.pexam-no {
  width: auto;
  height: auto;
  margin: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  display: inline-flex;
  direction: rtl;
  align-items: baseline;
  justify-content: flex-end;
  gap: 3px;
  color: #17140f;
  font-family: "B Nazanin", "BNazanin", "Vazirmatn", Tahoma, sans-serif;
  font-size: 14.5px;
  font-weight: 700;
  line-height: 1.75;
  min-width: 27px;
  white-space: nowrap;
}
.pexam-no b { font: inherit; }
.pexam-no::after {
  content: "";
  width: 7px;
  flex: 0 0 7px;
  align-self: center;
  border-top: 1.5px solid currentColor;
}
.pexam-qblock .pq-question-row { align-items: flex-start; }
/* همان هم‌ترازیِ خطِ پایه که در قالب ساده توضیح داده شد؛ اینجا اختلاف بیشتر است
   چون شماره فونت و اندازهٔ خودش را دارد و سطرش (1.75) از سطرِ متن کوتاه‌تر است. */
.pexam-qblock:not(.pq-visual-first) .pq-question-row { align-items: baseline; }

/* ═══ خروجی PDF/چاپ: یک تمِ سرمه‌ای برای همهٔ برگه‌ها ═══
   سؤال و پاسخنامه یک پوسته دارند (قاب، سربرگ، پابرگ، عنوان بخش، جدول‌ها) تا وقتی
   کنار هم چاپ و صحافی می‌شوند یک سند دیده شوند؛ پاسخنامه قبلاً فیروزه‌ای/نارنجی بود
   و در دسته‌ای که با دفترچه چاپ می‌شد وصله می‌زد. کلیدِ پاسخ پوستهٔ خودش را نگه
   می‌دارد و فقط کادرهایش سرمه‌ای می‌شود (پایین‌تر). */
/* سندِ PDFِ سرور باید همان چیزی را بدهد که چاپِ مرورگر می‌دهد. مسیر
   `body.pstudio-printing` (داخل @media print) بوم را سفید و سایهٔ صفحه را صفر
   می‌کند، ولی `body.pdf-export` این دو را نگرفته بود و پوستهٔ روی‌صفحه را با خود
   به PDF می‌برد: هالهٔ نارنجیِ رادیالِ body و سایهٔ نرمِ زیر کارتِ صفحه.
   هیچ‌کدام روی کاغذ معنایی ندارند و Chromium هرکدام را روی **هر صفحه** به یک
   تصویر تمام‌صفحهٔ RGB + ماسک رستر می‌کند. اندازه‌گیری روی پاسخنامهٔ ۸ صفحه‌ای:
   ۸۰۰KB → ۳۳۹KB. (هندسهٔ صفحه — ۷۹۴×۱۱۲۳ و padding — عمداً دست‌نخورده می‌ماند،
   چون صفحه‌بندی در مرورگر روی همین ابعاد اندازه‌گیری شده است.) */
body.pdf-export { background: #fff !important; }
body.pdf-export .pstudio-page { box-shadow: none !important; }

body.pdf-export .pstudio-page,
body.pstudio-printing .pstudio-page {
  /* صفحه‌های دور از viewport در پیش‌نمایش با content-visibility از paint کنار
     گذاشته می‌شوند. سندِ چندصفحه‌ایِ سرور نباید آن بهینه‌سازی را به ارث ببرد؛
     وگرنه Chromium گاهی فقط جای متن را نگه می‌دارد و همان صفحه را خالی چاپ می‌کند. */
  content-visibility: visible !important;
  contain: none !important;
  contain-intrinsic-size: none !important;
  text-rendering: geometricPrecision;
  -webkit-print-color-adjust: exact;
  print-color-adjust: exact;
}

/* سؤال‌های قالب ساده: هویت سایت، اما با رنگ‌هایی که در grayscale هم تیره و خوانا می‌مانند. */
body.pdf-export .pstudio-page.is-simple:not(.is-key),
body.pstudio-printing .pstudio-page.is-simple:not(.is-key) { color: #171b1e !important; }
body.pdf-export .pstudio-page.is-simple:not(.is-key)::before,
body.pstudio-printing .pstudio-page.is-simple:not(.is-key)::before {
  border-color: #536b7a !important;
  border-width: 1.5px;
  box-shadow: inset 0 0 0 4px #f6f8f9 !important;
}
body.pdf-export .pstudio-page.is-simple:not(.is-key) .psimple-page-head,
body.pdf-export .pstudio-page.is-simple:not(.is-key) .psimple-page-footer,
body.pstudio-printing .pstudio-page.is-simple:not(.is-key) .psimple-page-head,
body.pstudio-printing .pstudio-page.is-simple:not(.is-key) .psimple-page-footer { border-color: #536b7a !important; color: #394851 !important; }
body.pdf-export .pstudio-page.is-simple:not(.is-key) .psimple-title,
body.pstudio-printing .pstudio-page.is-simple:not(.is-key) .psimple-title { border-color: #899ca8 !important; }
body.pdf-export .pstudio-page.is-simple:not(.is-key) :is(.psimple-brand b,.psimple-count b,.psimple-site),
body.pstudio-printing .pstudio-page.is-simple:not(.is-key) :is(.psimple-brand b,.psimple-count b,.psimple-site) { color: #173e58 !important; }
body.pdf-export .pstudio-page.is-simple:not(.is-key) :is(.psimple-brand small,.psimple-title small,.psimple-count small,.psimple-page-no),
body.pstudio-printing .pstudio-page.is-simple:not(.is-key) :is(.psimple-brand small,.psimple-title small,.psimple-count small,.psimple-page-no) { color: #554f48 !important; }
body.pdf-export .pstudio-page.is-simple:not(.is-key) .psimple-info,
body.pstudio-printing .pstudio-page.is-simple:not(.is-key) .psimple-info {
  border-color: #667b88 !important;
  background: #667b88 !important;
  box-shadow: none !important;
}
body.pdf-export .pstudio-page.is-simple:not(.is-key) .psimple-info .pqh-cell,
body.pstudio-printing .pstudio-page.is-simple:not(.is-key) .psimple-info .pqh-cell { background: #fff !important; color: #20272b !important; }
body.pdf-export .pstudio-page.is-simple:not(.is-key) .psimple-info .pqh-cell b,
body.pstudio-printing .pstudio-page.is-simple:not(.is-key) .psimple-info .pqh-cell b { color: #7f401c !important; }
/* شمارهٔ سؤال دیگر چیپ نیست؛ عددِ ساده فقط باید در چاپ سیاه‌وسفید هم پررنگ بماند. */
body.pdf-export .pstudio-page.is-simple:not(.is-key) .pq-no,
body.pstudio-printing .pstudio-page.is-simple:not(.is-key) .pq-no { color: #171b1e !important; }
body.pdf-export .pstudio-page.is-simple:not(.is-key) .pq-block.with-line,
body.pdf-export .pstudio-page.is-simple:not(.is-key) .pq-extra-space,
body.pstudio-printing .pstudio-page.is-simple:not(.is-key) .pq-block.with-line,
body.pstudio-printing .pstudio-page.is-simple:not(.is-key) .pq-extra-space { border-color: #737b80 !important; }
body.pdf-export .pstudio-page.is-simple:not(.is-key) .pq-section-title,
body.pstudio-printing .pstudio-page.is-simple:not(.is-key) .pq-section-title { color: #173e58 !important; }
body.pdf-export .pstudio-page.is-simple:not(.is-key) .pq-section-title::before,
body.pdf-export .pstudio-page.is-simple:not(.is-key) .pq-section-title::after,
body.pstudio-printing .pstudio-page.is-simple:not(.is-key) .pq-section-title::before,
body.pstudio-printing .pstudio-page.is-simple:not(.is-key) .pq-section-title::after { height: 1.5px; background: #718894 !important; }
body.pdf-export .pstudio-page.is-simple:not(.is-key) .pq-section-title span,
body.pstudio-printing .pstudio-page.is-simple:not(.is-key) .pq-section-title span { border-color: #718894 !important; background: #f5f9fb !important; color: #173e58 !important; }
body.pdf-export .pstudio-page.is-simple:not(.is-key) .pq-option > b,
body.pstudio-printing .pstudio-page.is-simple:not(.is-key) .pq-option > b { color: inherit !important; }
body.pdf-export .pstudio-page.is-simple:not(.is-key) :is(.pq-body table,.pq-body th,.pq-body td,.sq-explanation-columns),
body.pstudio-printing .pstudio-page.is-simple:not(.is-key) :is(.pq-body table,.pq-body th,.pq-body td,.sq-explanation-columns) { border-color: #465761 !important; }
body.pdf-export .pstudio-page.is-simple:not(.is-key) .sq-explanation-column + .sq-explanation-column,
body.pstudio-printing .pstudio-page.is-simple:not(.is-key) .sq-explanation-column + .sq-explanation-column { border-inline-start-color: #465761 !important; }

/* پاسخ تشریحی: رنگی، نرم و هم‌خانواده با سایت؛ این قالب معمولاً برای مطالعه/ارسال دیجیتال است.
   کادرِ دورِ هر پاسخ در خروجی هم برداشته شد تا با صفحه یکی باشد؛ مرزِ پاسخ‌ها
   جداکنندهٔ «آقای کنکور» است. */
/* چیپِ «پاسخ صحیح» عمداً سبز می‌ماند: تنها جای برگه است که خودِ جواب را می‌گوید
   و کاربر همان حسِ آشنای «درست» را از رنگش می‌گیرد؛ بقیهٔ برگه سرمه‌ای است. */
body.pdf-export .pstudio-page.is-simple.is-answers .pq-answer-chip,
body.pstudio-printing .pstudio-page.is-simple.is-answers .pq-answer-chip { border: 1px solid #9ecfc0 !important; background: #e8f6f1 !important; color: #146b59 !important; }
/* چیپِ شمارهٔ سؤالِ پاسخنامه هم از همان خانواده؛ قاعدهٔ عمومیِ `.pq-no` بالا فقط
   عددِ سادهٔ دفترچه را سیاه می‌کند و به این چیپ (که کلاس بیشتری دارد) نمی‌رسد. */
body.pdf-export .pstudio-page.is-simple.is-answers .pa-block .pq-no,
body.pstudio-printing .pstudio-page.is-simple.is-answers .pa-block .pq-no { border-color: #8ea6b6 !important; background: #eef3f7 !important; color: #173e58 !important; }
body.pdf-export .pstudio-page.is-simple.is-answers .pq-answer-divider,
body.pstudio-printing .pstudio-page.is-simple.is-answers .pq-answer-divider { color: #173e58 !important; }
body.pdf-export .pstudio-page.is-simple.is-answers .pad-line,
body.pstudio-printing .pstudio-page.is-simple.is-answers .pad-line { background: #536b7a !important; }
body.pdf-export .pstudio-page.is-simple.is-answers .pad-orn,
body.pstudio-printing .pstudio-page.is-simple.is-answers .pad-orn { border-color: #536b7a !important; background: #eef3f7 !important; }
/* لوگوتایپِ وسطِ جداکننده در چاپ هم همان سبزِ برند می‌ماند (پیش‌تر اینجا نسخهٔ
   سرمه‌ای می‌نشست تا هم‌رنگِ خط‌ها باشد؛ سبز هم روی سفید ۵٫۲۶:۱ است، پس در چاپ
   سیاه‌وسفید هم پررنگ می‌ماند). یعنی پیش‌نمایش و خروجی یک رنگ دارند. */

/* ── کلیدِ پاسخ: فقط کادرها سرمه‌ای ──────────────────────────────────────────
   بقیهٔ برگه دست‌نخورده می‌ماند؛ خواستهٔ روشن این بود که در چاپ (به‌ویژه
   سیاه‌وسفید) مرزِ خانه‌ها و حبابِ گزینهٔ درست از قهوه‌ایِ کم‌کنتراست دربیاید. */
body.pdf-export .pstudio-page.is-key .pkey-card,
body.pstudio-printing .pstudio-page.is-key .pkey-card { border-color: #536b7a !important; }
body.pdf-export .pstudio-page.is-key .psheet-group,
body.pstudio-printing .pstudio-page.is-key .psheet-group { border-color: #667b88 !important; }
body.pdf-export .pstudio-page.is-key .pbs-row i,
body.pstudio-printing .pstudio-page.is-key .pbs-row i { border-color: #536b7a !important; }
body.pdf-export .pstudio-page.is-key .pbs-row i.is-correct,
body.pstudio-printing .pstudio-page.is-key .pbs-row i.is-correct { border-color: #173e58 !important; background: #173e58 !important; color: #fff !important; }

/* استودیوی دفترچهٔ آزمون: بدون سایدبار تنظیمات */
.pstudio-layout.no-side { grid-template-columns: 1fr; }

/* هنگام تولید PDF: اسکیل موبایل خنثی شود تا بوم با ابعاد واقعی گرفته شود */
body.pstudio-exporting .pstudio-page {
  transform: none !important;
  margin-bottom: 24px !important;
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
}

/* ═══ نمودار «نرخ پاسخ‌گویی تجمعی در طول آزمون» ═══ */
.rr-area-chart .rr-edge.wrong { stroke: #cf4b32; }
.rr-area-chart .rr-edge.blank { stroke: #d7a72e; }
.rr-tl-cursor circle.wrong { fill: #cf4b32; }
.rr-tl-cursor circle.blank { fill: #d7a72e; }
.rr-chart-switches label i.wrong { background: #cf4b32; }
.rr-chart-switches label i.blank { background: #d7a72e; }
/* راهنمای نمودار هیچ‌وقت کنارِ توضیحِ بلند فشرده نمی‌شود: هر برچسب یک‌خطی و کلِ ردیف کنارِ هم؛
   روی صفحهٔ باریک (سرِ کارت ستونی می‌شود) ردیف می‌شکند ولی خودِ برچسب نه. */
.rr-chart-switches { flex: none; flex-wrap: wrap; align-items: center; }
.rr-chart-switches label { white-space: nowrap; flex: none; }
.rr-chart-switches label i { flex: none; }
@media (max-width: 560px) { .rr-chart-switches { display: grid !important; grid-template-columns: repeat(2, max-content); gap: 8px 18px !important; } }
.rr-tl-row.wrong small { color: #b2452f; }
.rr-tl-row.blank small { color: #a8831f; }
.rr-bh-tip { min-width: 210px; max-width: 268px; }
.rr-bh-tip.pinned { pointer-events: auto; border-color: #e8b98a; box-shadow: 0 14px 34px rgba(54,40,25,.28); }
.rr-bh-sep { display: block; height: 1px; margin: 3px 0 1px; background: #efe6d8; }
.rr-bh-min-title { font-size:11.5px !important; color: #9a8b74 !important; }
.rr-bh-visits { display: flex; align-items: center; gap: 5px; flex-wrap: wrap; }
.rr-bh-visits > small { font-size:11px; color: #9a8b74; font-weight: 800; flex: none; }
.rr-bh-chiprow { display: inline-flex; gap: 3px; flex-wrap: wrap; }
.rr-bh-chip {
  min-width: 20px; height: 20px; padding: 0 5px;
  border: 1px solid #ecdfcc; border-radius: 6px; background: #fff8ee;
  color: #9a5a1f; font: inherit; font-size:11.5px; font-weight: 900; cursor: pointer;
  transition: border-color .12s ease, background .12s ease;
}
.rr-bh-chip:hover { border-color: var(--orange); background: #fff2e3; }
/* سؤالی که از دقیقهٔ قبل باز مانده: رویداد تازه‌ای ندارد، پس کم‌رنگ‌تر و خط‌چین */
.rr-bh-chip.carry { border-style: dashed; background: #fffdf9; color: #b08a5c; }
.rr-bh-act { display: flex; align-items: center; gap: 5px; font-size:11.5px; font-weight: 700; color: #574c3e; }
.rr-bh-act > span { flex: 1 1 auto; min-width: 0; }
.rr-bh-res { flex: none; font-style: normal; font-size:10.5px; font-weight: 900; padding: 1px 6px; border-radius: 6px; }
.rr-bh-res.correct { background: #e9f8f2; color: #12907b; }
.rr-bh-res.wrong { background: #fdeee9; color: #c24a3a; }
.rr-bh-res.blank { background: #fbf3df; color: #a8831f; }
.rr-bh-more, .rr-bh-none { font-size:11px; color: #9a8b74; font-weight: 700; }
.rr-bh-hint { font-size:10.5px; color: #b3a68f; font-weight: 700; border-top: 1px dashed #efe6d8; padding-top: 4px; margin-top: 2px; }
.rr-bhq-status { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; flex-wrap: wrap; }
.rr-bhq-status .rr-bhq-time { display: inline-flex; align-items: center; gap: 5px; font-size:13px; color: var(--muted); font-weight: 700; }
.rr-bhq-status .rr-bhq-time svg { width: 13px; height: 13px; }
.rr-bhq-options .sq-ans-opt { cursor: default; }
/* آزمون‌ساز */
.professional-exam-wizard { border-top: 3px solid var(--orange); }
.professional-exam-wizard.pro-wide { max-width: 1220px; }
.pro-stepper { overflow-x: auto; padding: 6px 3px 8px; }
.pro-stepper .exam-step { min-width: 96px; }
/* نوع برگزاری: هر سه کارت در یک ردیف */
.pro-type-cards { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.pro-type-cards .ew-type b svg { width: 19px; height: 19px; color: var(--orange); }
/* زمان‌بندی: تاریخ و ساعت کنار هم (چپ‌به‌راست: اول تاریخ بعد ساعت) با پاپ‌آپ */
.pro-schedule-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin: 2px 0; }
.pro-date-box { padding: 13px 14px; border: 1px solid #ead9c2; border-radius: 15px; background: #fffdf9; }
.pro-date-box.on { border-color: var(--orange); box-shadow: 0 0 0 3px rgba(255, 107, 24, .08); }
.pro-date-box > label { display: block; color: var(--muted); font-size: 11.5px; font-weight: 800; margin-bottom: 8px; }
.pro-dt-row { display: flex; gap: 8px; }
.pro-dt-cell { position: relative; flex: 1; min-width: 0; }
.pro-dt-cell:first-child { flex: 1.25; }
.pro-dt-btn { width: 100%; min-height: 46px; display: flex; align-items: center; gap: 9px; border: 1px solid #e3d7c8; border-radius: 12px; background: #fff; color: var(--ink); padding: 6px 11px; font: inherit; cursor: pointer; transition: border-color .15s ease, box-shadow .15s ease; }
.pro-dt-btn:hover { border-color: #f2a562; }
.pro-dt-btn.open { border-color: var(--orange); box-shadow: 0 0 0 3px rgba(255, 107, 24, .1); }
.pro-dt-btn svg { width: 17px; height: 17px; flex: none; color: var(--orange); }
.pro-dt-btn > span { display: grid; gap: 1px; text-align: left; }
.pro-dt-btn small { color: var(--muted); font-size: 9.5px; font-weight: 800; }
.pro-dt-btn b { font-size: 13px; font-weight: 800; white-space: nowrap; }
.pro-pop { position: absolute; top: calc(100% + 8px); left: 0; z-index: 40; min-width: 100%; background: #fff; border: 1px solid #ead9c2; border-radius: 15px; box-shadow: 0 18px 42px rgba(70, 50, 29, .16); padding: 10px; animation: ew-in .18s ease; }
.pro-cal-pop { width: 300px; max-width: min(340px, 86vw); direction: rtl; background: transparent; border: 0; box-shadow: none; padding: 0; }
.pro-dt-cell:last-child .pro-pop { left: auto; right: 0; }
.pro-calendar { width: 100%; max-width: none; margin: 0; }
.pro-time-pop { width: 216px; }
.tp-preview { display: flex; align-items: baseline; justify-content: center; gap: 3px; padding: 4px 0 9px; border-bottom: 1px dashed #ecdfcd; margin-bottom: 8px; }
.tp-preview b { font-size: 19px; font-weight: 900; color: var(--ink); }
.tp-preview i { font-style: normal; color: var(--muted); font-weight: 900; }
.tp-preview small { margin-inline-start: 7px; color: var(--muted); font-size: 9.5px; font-weight: 800; }
.tp-cols { display: flex; gap: 8px; }
.tp-col { flex: 1; min-width: 0; display: grid; gap: 5px; }
.tp-col-label { text-align: center; color: var(--muted); font-size: 10px; font-weight: 800; }
.tp-scroll { height: 178px; overflow-y: auto; display: grid; gap: 3px; padding: 3px; border: 1px solid #f1e8da; border-radius: 11px; background: #fffdf9; scrollbar-width: thin; }
.tp-cell { border: 0; border-radius: 8px; background: transparent; padding: 6px 4px; font: inherit; font-size: 12.5px; font-weight: 700; color: var(--ink); cursor: pointer; }
.tp-cell:hover { background: #fff0e3; }
.tp-cell.on { background: var(--orange); color: #fff; font-weight: 900; }
/* ضریب درس در ردیف درس (ویزارد آزمون‌ساز): ستون اختصاصی بدون سرریز */
.professional-exam-wizard .ew-lesson-row { grid-template-columns: 72px minmax(170px, 1fr) minmax(132px, 158px) minmax(108px, 126px) 42px; }
.ew-ls-coef { display: grid; gap: 7px; min-width: 0; }
.ew-ls-coef > span:first-child { font-size: inherit; color: inherit; margin: 0; }
.ew-ls-coef .ew-time-input { height: 44px; border-radius: 13px; border-color: #e3d7c8; background: #fff; box-shadow: 0 5px 14px rgba(69, 50, 29, .03); padding-inline: 11px; }
.ew-ls-coef .ew-time-input input { width: 100%; min-width: 0; padding: 0; border: 0; outline: 0; background: transparent; box-shadow: none; text-align: center; font: inherit; font-size: 14px; font-weight: 650; }
.ew-ls-coef .ew-time-input svg { color: #9b8a72; width: 15px; height: 15px; }
/* زمان و ضریب: برچسب و محتوای باکس وسط‌چین */
.professional-exam-wizard .ew-ls-time > span:first-child,
.professional-exam-wizard .ew-ls-coef > span:first-child { text-align: center; }
.professional-exam-wizard .ew-ls-time .ew-time-input,
.professional-exam-wizard .ew-ls-coef .ew-time-input { justify-content: center; }
.professional-exam-wizard .ew-ls-time .ew-time-input input { width: 40px; flex: none; text-align: center; }
.professional-exam-wizard .ew-time-input small { margin-inline-start: 2px; }
/* مرحلهٔ پیش‌نمایش: فهرست ترتیب در کنار + کارت واقعی سؤال‌ها (مثل مجموعه سوال) */
.pro-preview-layout { display: grid; grid-template-columns: minmax(196px, 236px) minmax(0, 1fr); gap: 14px; align-items: start; }
.pro-preview-side { position: sticky; top: 82px; max-height: calc(100vh - 100px); overflow: auto; border: 1px solid #ead9c2; border-radius: 16px; background: #fffdf9; padding: 9px; scrollbar-width: none; }
.pro-preview-side::-webkit-scrollbar { display: none; }
.pro-preview-side-inner { display: grid; gap: 8px; }
.pro-ord-booklet { display: flex; align-items: center; gap: 9px; padding: 9px 10px; border-radius: 12px; background: #fff4e9; border: 1px solid #f2ddc4; }
.pro-ord-booklet > div { display: flex; flex-direction: column; }
.pro-ord-booklet b { font-size: 12.5px; }
.pro-ord-booklet small { color: var(--muted); font-size: 10px; }
.pro-ord-lesson-head { display: flex; flex-direction: column; gap: 7px; padding: 8px 4px 0; }
.pro-ord-lesson-head > div { display: flex; flex-direction: column; }
.pro-ord-lesson-head b { font-size: 12.5px; }
.pro-ord-lesson-head small { color: var(--muted); font-size: 10px; }
.pro-ord-lesson-actions { display: flex; flex-wrap: wrap; gap: 5px; }
.pro-ord-lesson-actions button { display: inline-flex; align-items: center; gap: 4px; min-height: 27px; padding: 3px 9px; border: 1px solid #e5d8c6; border-radius: 8px; background: #fff; color: #7a5c39; font: inherit; font-size: 10px; font-weight: 800; cursor: pointer; }
.pro-ord-lesson-actions button:hover { border-color: var(--orange); color: var(--orange); }
.pro-ord-lesson-actions button svg { width: 12px; height: 12px; }
.pro-question-order { display: grid; gap: 5px; }
.pro-question-row { display: grid; grid-template-columns: 22px minmax(0, 1fr) auto auto; align-items: center; gap: 6px; padding: 6px 7px; border: 1px solid #efe7db; border-radius: 10px; background: #fff; cursor: grab; transition: border-color .15s ease, box-shadow .15s ease; }
.pro-question-row:hover { border-color: #f0c396; box-shadow: 0 4px 12px rgba(70, 50, 29, .05); }
.pro-question-row.dragging { opacity: .45; cursor: grabbing; }
.pro-question-row.missing { border-color: #e5b1aa; background: #fff4f2; }
.pro-question-row > b { font-size: 11px; color: #fff; background: var(--orange); border-radius: 7px; width: 22px; height: 22px; display: grid; place-items: center; }
.pro-row-main { display: flex; flex-direction: column; min-width: 0; gap: 1px; }
.pro-row-main strong { font-size: 10.5px; font-weight: 800; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pro-question-row small { color: var(--muted); font-size: 9px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pro-question-row > button { border: 0; background: transparent; color: #9a8b78; display: inline-flex; align-items: center; gap: 4px; cursor: pointer; padding: 2px; }
.pro-question-row > button.danger:hover { color: #c34f4f; }
.pro-question-row > button svg { width: 13px; height: 13px; }
.pro-question-move { display: inline-flex; gap: 2px; }
.pro-question-move button { flex: none; width: 23px; height: 23px; display: inline-flex; align-items: center; justify-content: center; padding: 0; line-height: 0; border: 1px solid #e9dfd1; border-radius: 6px; background: #fff; color: var(--orange); cursor: pointer; }
.pro-question-move button:disabled { opacity: .3; cursor: default; }
.pro-question-move svg { display: block; width: 12px; height: 12px; margin: 0; transform: none; }
/* پنل روش‌های افزودن (خودکار/سطحی/آماری) در حالت انتخاب از بانک */
.exam-add-panel { display: grid; gap: 12px; }
.exam-add-panel .ep-level-segs { display: flex; flex-wrap: wrap; gap: 6px; }
.exam-add-row { display: flex; align-items: end; flex-wrap: wrap; gap: 10px; }
.exam-add-row > label { display: grid; gap: 6px; font-size: 11.5px; font-weight: 800; color: #7a5c39; }
.exam-add-row input { width: 130px; height: 40px; border: 1px solid #e3d7c8; border-radius: 11px; padding: 0 12px; font: inherit; text-align: center; background: #fff; }
.exam-add-row input:focus { outline: 0; border-color: var(--orange); }
/* فیلتر حذف تکراری‌ها (سایدبار حالت انتخاب) */
.epx-search { width: 100%; height: 36px; border: 1px solid #e3d7c8; border-radius: 10px; padding: 0 11px; font: inherit; font-size: 11.5px; background: #fff; margin-bottom: 8px; }
.epx-search:focus { outline: 0; border-color: var(--orange); }
.epx-group-title { display: block; margin: 7px 0 4px; color: var(--muted); font-size: 10px; font-weight: 900; }
.epx-code { font-style: normal; color: var(--muted); font-size: 9px; font-weight: 700; }
.exam-pick-mode .qset-add-tabs .seg { font-size: 10.5px; padding: 5px 10px; }
/* مرحلهٔ انتشار: افقی، ولی هر مشخصه یک واحد یکپارچه (وسط آیتم شکسته نمی‌شود) */
.professional-exam-wizard .ew-review-meta.pro-review-meta { display: flex; flex-wrap: wrap; gap: 10px 24px; }
.professional-exam-wizard .ew-review-meta.pro-review-meta > span { display: inline-flex; align-items: baseline; gap: 6px; white-space: nowrap; }
/* فاصلهٔ نمودار فعالیت مدیران از پنل بالایی در نمای کلی */
.admin-activity-panel { margin-top: 18px; }
/* هم‌قدکردن سر دفترچه با باکس‌های درس/زمان/ضریب */
.ew-bk-head { align-items: end; }
.ew-bk-head .ew-bk-index { margin-block-end: 7px; }
.ew-bk-name { height: 44px; padding: 0 12px; border: 1px solid #e3d7c8; border-radius: 13px; background: #fff; box-shadow: 0 5px 14px rgba(69, 50, 29, .03); }
.ew-bk-stat { height: 44px; padding: 0 13px; border-radius: 13px; }
.ew-bk-head > .ew-mini { width: 44px; height: 44px; border-radius: 13px; }
/* هم‌قدکردن دکمه‌های «انتخاب/ویرایش سؤال» و حذف در مرحلهٔ انتخاب سؤال */
.ew-q-ls-actions { align-items: center; }
.ew-q-ls-actions .ew-pick-button { min-height: 40px; }
.ew-q-ls-actions .ew-mini.danger { width: 40px; height: 40px; padding: 0; display: grid; place-items: center; border-radius: 11px; }
.epx-note { margin: 0 0 8px; color: var(--muted); font-size: 10.5px; line-height: 1.8; }
.epx-on { display: inline-flex; align-items: center; gap: 5px; margin-bottom: 8px; padding: 4px 10px; border-radius: 999px; background: #fff0e3; color: #9a5a1f; font-size: 10.5px; font-weight: 800; }
/* حذف تکراری‌ها در حالت افزودن به مجموعه سؤال */
.epx-group-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.epx-group-head .epx-group-title { margin-bottom: 0; }
.epx-all { border: 0; background: none; padding: 2px 0; color: var(--orange); font: inherit; font-size: 10px; font-weight: 900; cursor: pointer; }
.epx-all:hover { text-decoration: underline; }
.qset-bank-mode .qset-bank-counter { flex: 0 0 auto; display: inline-flex; align-items: center; gap: 7px; padding: 6px 12px; border-radius: 999px; background: rgba(255,255,255,.8); color: #7a5c39; font-size: 11px; font-weight: 800; white-space: nowrap; }
.qset-bank-mode .qset-bank-counter b { font-size: 12.5px; color: var(--ink); }
.qset-bank-mode .qset-bank-counter i { width: 1px; height: 13px; background: #e6d4bf; }
/* فهرستِ بلندِ مجموعه/آزمون: پیش‌فرض کوتاه، بازشده اسکرول‌دار.
   هر گروه کادرِ خودش را دارد، وگرنه مرزِ «مجموعه‌ها» و «آزمون‌ها» گم می‌شد. */
.epx-box { gap: 0; border: 1px solid #f0e8dc; border-radius: 12px; background: #fffdfa; padding: 4px; }
.epx-box .sd-check { border-radius: 9px; }
/* جداکنندهٔ ردیف‌ها با border روی خودِ ردیف کشیده نمی‌شود: ردیف گوشهٔ گرد دارد و
   دو سرِ خط با آن خم می‌شد. خطِ صاف با یک لایهٔ جدا روی لبهٔ بالایی می‌آید. */
.epx-box .sd-check { position: relative; }
.epx-box .sd-check + .sd-check::before {
  content: ""; position: absolute; inset-inline: 0; top: 0; height: 1px; background: #f0e5d7; pointer-events: none;
}
.epx-more { width: 100%; margin-top: 8px; padding: 7px 10px; border: 1px dashed #e3d7c8; border-radius: 10px; background: #fff; color: var(--orange); font: inherit; font-size: 10.5px; font-weight: 900; cursor: pointer; }
.epx-more:hover { border-color: var(--orange); }
.epx-scroll { max-height: 250px; overflow-y: auto; }
.epx-scroll::-webkit-scrollbar { width: 7px; }
.epx-scroll::-webkit-scrollbar-thumb { border-radius: 99px; background: #e3d7c8; }
.epx-scroll::-webkit-scrollbar-track { background: transparent; }
.qset-auto-actions { flex-wrap: wrap; gap: 10px; }
@media (max-width: 700px) {
  .qset-auto-actions .secondary-button, .qset-auto-actions .primary-button { flex: 1 1 100%; }
}
.pro-preview-cards { display: grid; gap: 14px; min-width: 0; }
.pro-cards-booklet-head { display: flex; align-items: center; gap: 9px; padding: 10px 13px; border: 1px solid #f2ddc4; border-radius: 13px; background: #fff4e9; font-weight: 900; }
.pro-missing-card .omr-warn { margin: 8px 0 0; }
/* مرحلهٔ مخاطبان */
.pro-audience-modes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-bottom: 2px; }
.pro-audience-mode { position: relative; display: flex; flex-direction: column; gap: 5px; padding: 14px; border: 1.5px solid #e5dccb; border-radius: 14px; background: #fff; cursor: pointer; }
.pro-audience-mode.on { border-color: var(--orange); box-shadow: 0 0 0 1.5px var(--orange) inset; background: #fffdf9; }
.pro-audience-mode.disabled { opacity: .5; cursor: not-allowed; }
.pro-audience-mode input { position: absolute; opacity: 0; }
.pro-audience-mode b { font-size: 13px; }
.pro-audience-mode span { color: var(--muted); line-height: 1.8; font-size: 11px; }
.pro-student-picker { container-type: inline-size; border: 1px solid #ead9c2; border-radius: 15px; background: #fffdf9; overflow: hidden; }
.pro-student-picker-head { display: flex; justify-content: space-between; align-items: center; padding: 11px 14px; background: #fff4e9; border-bottom: 1px solid #f2ddc4; font-size: 12.5px; }
.pro-student-picker-head b { color: var(--orange); }
.pro-student-tools { display: grid; gap: 8px; padding: 11px 14px; border-bottom: 1px dashed #ecdfcd; }
.pro-aud-search { display: flex; align-items: center; gap: 8px; height: 42px; padding: 0 12px; border: 1px solid #e3d7c8; border-radius: 12px; background: #fff; transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease; }
.pro-aud-search:hover { border-color: #f2a562; }
.pro-aud-search:focus-within { border-color: var(--orange); box-shadow: 0 7px 18px rgba(255, 107, 24, .13); transform: translateY(-1px); }
.pro-aud-search svg { width: 15px; height: 15px; color: var(--muted); flex: none; transition: color .18s ease, transform .18s ease; }
.pro-aud-search:focus-within svg { color: var(--orange); transform: scale(1.12); }
.pro-aud-search input, .pro-aud-search input:focus { flex: 1; min-width: 0; border: 0 !important; outline: 0 !important; box-shadow: none !important; background: transparent; font: inherit; }
.pro-aud-chips { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; }
.pro-aud-chips small { color: var(--muted); font-size: 10.5px; font-weight: 800; }
.pro-aud-chip { border: 1px solid #e5d8c6; border-radius: 999px; background: #fff; padding: 5px 12px; font: inherit; font-size: 11px; font-weight: 800; color: #7a5c39; cursor: pointer; transition: all .15s ease; }
.pro-aud-chip:hover { border-color: var(--orange); }
.pro-aud-chip.on { background: var(--orange); border-color: var(--orange); color: #fff; }
.pro-aud-hint { margin: 0; color: var(--muted); font-size: 10.5px; line-height: 1.9; }
.pro-aud-bulk { display: flex; flex-wrap: wrap; gap: 7px; }
.pro-aud-bulk .secondary-button { min-height: 33px; padding: 5px 12px; font-size: 11px; }
.pro-student-list { max-height: 330px; overflow: auto; scrollbar-width: thin; }
.pro-student-list > label { display: grid; grid-template-columns: 17px 36px minmax(0, 1fr) auto; align-items: center; gap: 9px; min-width: 0; padding: 9px 14px; border-bottom: 1px solid #f3ecdf; cursor: pointer; }
.pro-student-list > label:last-child { border-bottom: 0; }
.pro-student-list > label:hover { background: #fffaf4; }
.pro-student-list > label input { width: 16px; height: 16px; margin: 0; accent-color: var(--orange); }
.pro-student-list > label .avatar { width: 36px; height: 36px; }
.pro-student-list > label > .pro-student-identity { display: grid; justify-items: start; gap: 2px; min-width: 0; }
.pro-student-identity > b { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pro-student-identity small { display: inline-flex; align-items: center; gap: 4px; color: var(--muted); font-size: 10px; }
.pro-student-identity small b { direction: ltr; unicode-bidi: isolate; font-weight: 800; }
.pro-student-list > label em { justify-self: end; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-style: normal; font-size: 10px; font-weight: 800; color: #7a5c39; background: #fff4e9; border: 1px solid #f2ddc4; padding: 3px 9px; border-radius: 999px; }
.pro-student-list > label em.muted { color: var(--muted); background: #f7f5f0; border-color: #ebe6db; }
.pro-student-list .exam-pick-note { padding: 12px 14px; margin: 0; }
@container (max-width: 440px) {
  .pro-student-list > label { grid-template-columns: 17px 36px minmax(0, 1fr); row-gap: 3px; }
  .pro-student-list > label em { grid-column: 3; justify-self: start; padding: 1px 7px; font-size: 9px; }
}
/* تالار آزمون: تاگل روشن/خاموش */
.pro-hall-card { border: 1.5px solid #e5dccb; border-radius: 15px; background: #fff; padding: 14px; }
.pro-hall-card.on { border-color: var(--orange); background: #fffdf9; }
.pro-hall-toggle { display: flex; align-items: flex-start; gap: 12px; cursor: pointer; }
.pro-hall-toggle input { position: absolute; opacity: 0; pointer-events: none; }
.pro-switch { flex: none; width: 42px; height: 24px; margin-top: 2px; border-radius: 999px; background: #e6ded1; position: relative; transition: background .2s ease; }
.pro-switch::after { content: ""; position: absolute; top: 3px; inset-inline-start: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: 0 2px 6px rgba(0, 0, 0, .18); transition: transform .2s ease; }
.pro-hall-toggle input:checked + .pro-switch { background: var(--orange); }
.pro-hall-toggle input:checked + .pro-switch::after { transform: translateX(-18px); }
.pro-hall-text { display: grid; gap: 3px; }
.pro-hall-text b { font-size: 13px; }
.pro-hall-text small { color: var(--muted); font-size: 11.5px; line-height: 1.8; }
.omr-hub-note.omr-hub-personal { display: flex; align-items: flex-start; gap: 8px; padding: 10px 12px; border: 1px solid #f6c69b; border-radius: 12px; background: #fff6ec; color: #7a482c; }
.omr-hub-personal .ui-icon { flex: none; width: 16px; height: 16px; margin-top: 3px; color: var(--orange); }
.pro-sheet-personal { margin: 0 0 12px; }
/* خروج از صفحهٔ آزمون آنلاین: راهنمای شروع + ستونِ نتایج برگزارکننده */
.exam-guide-focus { display: flex; align-items: flex-start; gap: 8px; padding: 10px 12px; border: 1px solid #f3c9c2; border-radius: 12px; background: #fff5f3; color: #9a3b2e; font-size: 12.5px; line-height: 1.9; }
.exam-guide-focus .ui-icon { flex: none; width: 16px; height: 16px; margin-top: 4px; }
.pr-focus { display: inline-grid; justify-items: center; gap: 1px; min-width: 34px; padding: 3px 8px; border-radius: 9px; font-weight: 800; }
.pr-focus small { font-size: 9.5px; font-weight: 700; opacity: .85; white-space: nowrap; }
.pr-focus.ok { color: #168878; background: #eaf8f4; }
.pr-focus.mid { color: #a05a12; background: #fff3e2; }
.pr-focus.high { color: #c24a3a; background: #fdeceb; }
/* مرحلهٔ ۴: ترتیب تصادفیِ سؤال‌ها برای هر شرکت‌کننده */
.pro-order-mode-card { margin-bottom: 14px; }
.pro-order-mode-card .pro-hall-text b { display: inline-flex; align-items: center; gap: 6px; }
.pro-order-mode-card .pro-hall-text b .ui-icon { width: 15px; height: 15px; color: var(--orange); }
.pro-hall-settings { margin-top: 12px; padding: 13px 14px; border: 1px dashed #ecdfcd; border-radius: 13px; background: #fffaf4; }
.pro-hall-settings h3 { margin: 0 0 9px; font-size: 12px; }
.pro-hall-settings > label { display: flex; gap: 9px; margin: 8px 0; cursor: pointer; }
.pro-hall-settings > label input { accent-color: var(--orange); }
.pro-hall-settings > label span { display: flex; flex-direction: column; }
.pro-hall-settings small { color: var(--muted); }
/* حالت انتخاب سؤال از بانک برای آزمون‌ساز */
.exam-pick-mode { position: sticky; top: 74px; z-index: 25; display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; gap: 10px 14px; box-shadow: 0 10px 26px rgba(70, 50, 29, .08); }
.exam-pick-mode .qset-bank-title { grid-column: 1; grid-row: 1; }
.exam-pick-mode .exam-pick-counter { grid-column: 2; grid-row: 1; justify-self: center; }
.exam-pick-mode > .primary-button { grid-column: 3; grid-row: 1; justify-self: end; }
.exam-pick-foot { grid-column: 1 / -1; display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 9px 12px; border-top: 1px dashed #f0d7c2; padding-top: 10px; }
.exam-pick-counter { display: inline-flex; align-items: center; gap: 6px; font-size: 11.5px; font-weight: 800; color: #7a5c39; background: #fff; border: 1px solid #f0d7c2; border-radius: 999px; padding: 6px 13px; }
.exam-pick-counter b { color: var(--orange); }
.exam-pick-counter i { width: 1px; height: 14px; background: #ecd9c4; }
.sbank-chip.is-static { cursor: default; }
.admin-exam-pick { margin-top: 4px; }
@media (max-width: 980px) {
  .pro-preview-layout { grid-template-columns: 1fr; }
  .pro-preview-side { position: static; max-height: 320px; }
}
@media (max-width: 900px) {
  .professional-exam-wizard .ew-lesson-row { grid-template-columns: 68px minmax(130px, 1fr) minmax(118px, 140px) minmax(92px, 108px) 42px; }
}
@media (max-width: 760px) {
  .pro-type-cards { grid-template-columns: 1fr; }
  .pro-schedule-grid { grid-template-columns: 1fr; }
  .pro-audience-modes { grid-template-columns: 1fr; }
  .exam-pick-mode { position: static; }
  .pro-dt-row { flex-direction: column; }
  .pro-dt-cell:last-child .pro-pop { right: auto; left: 0; }
}
@media (max-width: 640px) {
  /* نوار انتخاب سؤال در موبایل: عنوان، شمارنده، دکمه و تب‌ها زیر هم */
  .exam-pick-mode { grid-template-columns: 1fr; }
  .exam-pick-mode .exam-pick-counter { grid-column: 1; grid-row: 2; justify-self: center; }
  .exam-pick-mode > .primary-button { grid-column: 1; grid-row: 3; justify-self: stretch; }
  .exam-pick-foot { grid-row: 4; }
  .exam-pick-mode .qset-add-tabs { display: flex; flex-wrap: wrap; justify-content: center; max-width: 100%; }
}
@media (max-width: 680px) {
  .professional-exam-wizard .ew-lesson-row { grid-template-columns: 62px minmax(0, 1fr) minmax(0, 1fr) 42px; }
  .professional-exam-wizard .ew-ls-field { grid-column: 2 / 4; }
  .professional-exam-wizard .ew-ls-time { grid-column: 2; grid-row: 2; width: 100%; }
  .professional-exam-wizard .ew-ls-coef { grid-column: 3; grid-row: 2; }
  .professional-exam-wizard .ew-lesson-row > .ew-mini { grid-column: 4; grid-row: 1; }
}
.hall-panel { overflow: hidden; gap: 12px; padding: 16px; align-content: start; }
.hall-panel .hall-head { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; }
.hall-heading { min-width: 0; }
.hall-title-line { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; }
.hall-total { padding: 3px 9px; border-radius: 7px; background: var(--purple-soft); color: var(--purple); font-size: 11px; font-weight: 800; }
.hall-panel .hall-heading p { margin-top: 3px; font-size: 11px; line-height: 1.7; }
.hall-head-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.hall-head-actions .secondary-button { min-height: 36px; padding: 6px 10px; font-size: 11px; }
.hall-toolbar { padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: color-mix(in srgb, var(--purple) 3%, var(--panel)); }
.hall-toolbar-filters,.hall-toolbar-rankings { display: flex; align-items: end; flex-wrap: wrap; gap: 8px; }
.hall-toolbar-filters { align-items: center; gap: 10px; }
.hall-toolbar label { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 11px; font-weight: 800; }
.hall-toolbar label:last-child { margin-inline-start: auto; }
.hall-toolbar select { height: 35px; min-width: 145px; padding: 5px 10px; border: 1px solid #dcdce5; border-radius: 9px; background: #fff; color: var(--ink); font: inherit; font-size: 11.5px; cursor: pointer; }
.hall-toolbar .secondary-button { min-height: 35px; padding: 5px 10px; font-size: 11.5px; }
.hall-toolbar-rankings .secondary-button { color: #554492; border-color: #d8d1ee; background: #f8f6ff; }
.hall-active-filters { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; margin: 0; }
.hall-filter-chip { display: inline-flex; align-items: center; gap: 5px; padding: 4px 8px; border: 1px solid #d9d0ec; border-radius: 99px; background: #f8f6ff; color: #5b4b8f; font-size: 10px; font-weight: 800; }
.hall-filter-chip button,.hall-filter-clear { border: 0; background: transparent; color: inherit; font: inherit; cursor: pointer; }
.hall-filter-chip button { display: grid; place-items: center; padding: 0; }
.hall-filter-chip .ui-icon { width: 12px; height: 12px; }
.hall-filter-clear { font-size: 10px; color: #ad5b3f; }
.hall-demo-note,.hall-error-note { display: flex; align-items: center; gap: 8px; margin: 0; padding: 7px 10px; border: 1px solid #f2dcaa; border-radius: 9px; background: #fff9e9; color: #805e18; font-size: 10px; font-weight: 700; }
.hall-demo-note .ui-icon { width: 15px; height: 15px; flex: none; }
.hall-error-note { border-color: var(--line); background: var(--yellow-soft); color: var(--ink); }
.hall-results-head { display: flex; align-items: baseline; flex-wrap: wrap; gap: 8px; padding: 0; }
.hall-results-head b { font-size: 12px; }
.hall-results-head span { color: var(--muted); font-size: 10px; }
.hall-scroll-hint { display: none; }
.hall-exam-scroll,.hall-ranking-scroll { overflow-x: auto; scrollbar-width: thin; }
.hall-exam-scroll { margin: 0; border: 1px solid #e7e4ed; border-radius: 11px; }
.hall-exam-table,.hall-ranking table { width: 100%; border-collapse: collapse; text-align: right; }
.hall-exam-table { min-width: 1298px; table-layout: fixed; }
.hall-exam-table th,.hall-ranking th { padding: 11px 9px; border-bottom: 1px solid #ddd9e7; background: #f5f3f9; color: #615b72; font-size: 11px; font-weight: 900; white-space: nowrap; }
.hall-exam-table td,.hall-ranking td { padding: 10px 9px; border-bottom: 1px solid #eeeaf1; color: #373346; font-size: 11.5px; vertical-align: middle; white-space: nowrap; }
.hall-exam-table th:nth-child(n+3),.hall-exam-table td:nth-child(n+3),.hall-ranking th:not(:nth-child(2)),.hall-ranking td:not(:nth-child(2)) { text-align: center; }
.hall-exam-table tbody tr:last-child td,.hall-ranking tbody tr:last-child td { border-bottom: 0; }
.hall-exam-table tbody tr:hover,.hall-ranking tbody tr:hover { background: #faf9fe; }
.hall-exam-table .hall-exam-name { min-width: 175px; white-space: normal; }
.hall-exam-table th:first-child,.hall-exam-table .hall-exam-name { position: sticky; right: 0; z-index: 1; background: #fff; box-shadow: -1px 0 #e7e4ed; }
.hall-exam-table th:first-child { z-index: 2; background: #f5f3f9; }
.hall-exam-table tbody tr:hover .hall-exam-name { background: #faf9fe; }
.hall-exam-name strong { display: block; font-size: 12px; line-height: 1.6; }
.hall-exam-table td small { display: block; margin-top: 2px; color: var(--muted); font-size: 9px; }
.hall-exam-table tr.is-locked { background: #faf9f7; }
.hall-exam-table tr.is-locked .hall-exam-name small { color: #ad6b30; }
.hall-text-button { padding: 0; border: 0; background: transparent; color: #5b4bb5; font: inherit; font-weight: 800; text-align: right; cursor: pointer; }
.hall-text-button:hover { text-decoration: underline; }
.hall-match-cell { color: #156d52 !important; font-weight: 900; }
.hall-join-button { min-width: 76px; padding: 6px 9px; border: 1px solid var(--orange); border-radius: 8px; background: var(--orange); color: #fff; font: inherit; font-size: 10px; font-weight: 800; cursor: pointer; }
.hall-join-button:disabled { border-color: #e6e2e9; background: #f4f2f5; color: #898493; cursor: default; }
/* بودجه‌بندیِ آزمونِ تالار: دکمهٔ جدول + مودالِ درس ← فصل ← بخش */
.hall-budget-button { display: inline-flex; align-items: center; gap: 5px; padding: 6px 10px; border: 1px solid #d8d1ee; border-radius: 8px; background: #f8f6ff; color: #554492; font: inherit; font-size: 10.5px; font-weight: 800; cursor: pointer; }
.hall-budget-button svg { width: 13px; height: 13px; }
.hall-budget-button:hover { border-color: #b9aee4; background: #f0ecff; }
.hall-budget { display: grid; gap: 14px; }
.hall-budget-lead { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.9; }
.hall-budget-lesson { border: 1px solid #e7e2f1; border-radius: 14px; background: #fff; overflow: hidden; }
.hall-budget { --hb-cols: minmax(0, 1fr) minmax(60px, 150px) 62px 38px 14px; }
.hall-budget-lesson > header { display: grid; grid-template-columns: var(--hb-cols); align-items: center; gap: 10px; padding: 11px 14px; background: #f7f5fc; border-bottom: 1px solid #ece8f4; }
.hall-budget-lesson > header > b:first-child { grid-column: span 2; min-width: 0; color: #3d3466; font-size: 14px; }
.hall-budget-chapters { display: grid; }
.hall-budget-chapter + .hall-budget-chapter { border-top: 1px solid #f1eef6; }
.hall-budget-chapter > summary, .hall-budget-chapter.is-flat, .hall-budget-chapter li {
  display: grid; grid-template-columns: var(--hb-cols); align-items: center; gap: 10px;
  padding: 9px 14px; font-size: 12px;
}
.hall-budget-chapter > summary { cursor: pointer; list-style: none; }
.hall-budget-chapter > summary::-webkit-details-marker { display: none; }
.hall-budget-chapter > summary:hover { background: #fbfaff; }
.hall-budget-chapter > summary > svg { width: 14px; height: 14px; color: #8c83a8; transition: transform .2s ease; }
.hall-budget-chapter[open] > summary > svg { transform: rotate(180deg); }
.hall-budget-chapter ul { margin: 0; padding: 0 0 6px; list-style: none; background: #fcfbfe; }
.hall-budget-chapter li { padding-block: 6px; color: #5e5873; font-size: 11.5px; }
.hall-budget-chapter li .hall-budget-name { padding-inline-start: 16px; }
.hall-budget-chapter li.is-rest { color: var(--muted); font-style: italic; }
.hall-budget-name { min-width: 0; font-weight: 800; color: #383149; overflow-wrap: anywhere; }
.hall-budget-chapter li .hall-budget-name { font-weight: 700; color: inherit; }
.hall-budget-name small { color: var(--muted); font-size: 10px; font-weight: 700; margin-inline-start: 4px; }
.hall-budget-bar { display: block; height: 7px; border-radius: 99px; background: #eeebf5; overflow: hidden; }
.hall-budget-bar i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #8b7ce0, #5b4bb5); }
.hall-budget-count { white-space: nowrap; color: #2f2944; font-size: 12.5px; text-align: center; }
.hall-budget-count small { color: var(--muted); font-size: 10px; font-weight: 700; }
.hall-budget-pct { color: #6b5fb0; font-size: 11px; font-weight: 800; text-align: center; }
@media (max-width: 560px) {
  .hall-budget { --hb-cols: minmax(0, 1fr) 58px 34px 14px; }
  .hall-budget-chapter > summary, .hall-budget-chapter.is-flat, .hall-budget-chapter li, .hall-budget-lesson > header { gap: 6px; padding-inline: 10px; }
  .hall-budget-lesson > header > b:first-child { grid-column: auto; }
  .hall-budget-chapter li .hall-budget-name { padding-inline-start: 10px; }
  .hall-budget-bar { display: none; }
}
.hall-ranking-demo { margin: 0 0 10px; padding: 8px 10px; border-radius: 8px; background: #fff9e9; color: #805e18; font-size: 10px; }
.hall-ranking > p { margin: 0 0 10px; color: var(--muted); font-size: 11px; }
.hall-ranking-scroll { border: 1px solid #e7e4ed; border-radius: 10px; }
.hall-ranking table { min-width: 790px; table-layout: fixed; }
.hall-ranking th:nth-child(2),.hall-ranking td:nth-child(2) { width: 180px; text-align: right; }
.hall-ranking td { font-size: 11.5px; }
.hall-level-badge { display: inline-block; min-width: 30px; padding: 3px 6px; border-radius: 7px; background: #efeaff; color: #5b43a0; font-weight: 900; }
.hall-rank-number { display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 7px; background: #f1eef9; color: #5d4c95; }
.hall-ranking tr:nth-child(-n+3) .hall-rank-number { background: #fff0cc; color: #946114; }
.hall-positive { color: #16805d !important; font-weight: 800; }
.hall-negative { color: #c85b52 !important; font-weight: 800; }
@media (max-width: 1150px) { .hall-scroll-hint { display: inline; } }
@media (max-width: 700px) {
  .hall-head-actions { width: 100%; }
  .hall-toolbar-rankings { flex: 1; }
  .hall-toolbar-rankings button { flex: 1; }
  .hall-toolbar label { display: grid; }
  .hall-toolbar label:last-child { margin-inline-start: 0; }
}
.pro-direct-picker { border: 1px solid var(--line); border-radius: 13px; max-height: 420px; overflow: auto; }
.pro-direct-head { position: sticky; top: 0; z-index: 2; display: flex; justify-content: space-between; padding: 10px 12px; background: var(--surface); border-bottom: 1px solid var(--line); }
.pro-direct-picker > label { display: grid; grid-template-columns: auto minmax(0,1fr) auto; align-items: center; gap: 9px; padding: 8px 12px; border-bottom: 1px solid var(--line); }
.pro-direct-picker > label > span { display: flex; flex-direction: column; }
.pro-direct-picker > label > button { border: 0; background: transparent; color: #6d5bd0; }
.exam-picker-context { position: sticky; top: -18px; z-index: 5; margin: -4px -2px 14px; padding: 12px; border: 1px solid #dcd5f7; border-radius: 14px; background: rgba(250,248,255,.97); box-shadow: 0 8px 24px rgba(75,61,145,.09); backdrop-filter: blur(8px); }
.exam-picker-context-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 9px; }
.exam-picker-context-head > div { display: flex; flex-direction: column; gap: 2px; }
.exam-picker-context-head span,.exam-picker-context-head strong { color: var(--muted); font-size: 10px; }
.exam-picker-context-head b { font-size: 13px; color: #4e3fa8; }
.exam-picker-context-booklets { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 2px; }
.exam-picker-context-booklets article { flex: 0 0 min(310px,85vw); border: 1px solid #e7e1f8; border-radius: 10px; background: var(--surface); overflow: hidden; }
.exam-picker-context-booklets article > header { display: flex; align-items: center; gap: 7px; padding: 7px 9px; background: #f4f1ff; }
.exam-picker-context-booklets article > header > span { width: 22px; height: 22px; display: grid; place-items: center; border-radius: 7px; background: #6d5bd0; color: #fff; font-size: 10px; }
.exam-picker-context-booklets article > header > div { display: flex; flex-direction: column; }
.exam-picker-context-booklets article > header small { color: var(--muted); font-size: 9px; }
.exam-picker-context-booklets article > div { display: flex; flex-wrap: wrap; gap: 5px; padding: 7px; }
.exam-picker-context-booklets article > div button { display: inline-flex; align-items: center; gap: 6px; padding: 5px 8px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); color: var(--ink); font: inherit; font-size: 10px; cursor: pointer; }
.exam-picker-context-booklets article > div button b { min-width: 18px; padding: 1px 4px; border-radius: 999px; background: #eeeaf9; color: #5b4ab5; text-align: center; }
.exam-picker-context-booklets article > div button.on { border-color: #6d5bd0; background: #f3efff; color: #4e3fa8; box-shadow: 0 0 0 2px rgba(109,91,208,.08); }
.user-educator-section { margin-top: 16px; padding: 12px; border: 1px solid #ddd6f5; border-radius: 14px; background: #faf8ff; }
.user-educator-head { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; margin-bottom: 9px; }
.user-educator-head h3 { margin: 0 0 3px; font-size: 12px; }
.user-educator-head p { margin: 0; max-width: 520px; color: var(--muted); font-size: 10px; line-height: 1.8; }
.user-educator-head > span { flex: none; padding: 4px 8px; border-radius: 999px; background: #ece7fb; color: #5c4bb5; font-size: 10px; font-weight: 900; }
.user-educator-picker { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 6px; max-height: 250px; overflow: auto; }
.user-educator-picker > label { display: grid; grid-template-columns: auto auto minmax(0,1fr); align-items: center; gap: 7px; padding: 8px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); cursor: pointer; }
.user-educator-picker > label.on { border-color: #7767ce; background: #f3f0ff; }
.user-educator-picker > label > span:last-child { display: flex; flex-direction: column; min-width: 0; }
.user-educator-picker small { color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-educator-picker small i { font-style: normal; }
.pro-analytics { display: grid; gap: 14px; }
.pro-analysis-scopes { position: sticky; top: -18px; z-index: 3; width: max-content; max-width: 100%; padding: 6px; border: 1px solid var(--line); border-radius: 12px; background: rgba(255,255,255,.96); box-shadow: 0 7px 20px rgba(52,43,95,.07); }
.pro-analysis-tiles { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 9px; }
.pro-analysis-tiles article { display: grid; gap: 5px; padding: 13px; border: 1px solid #ded8f2; border-radius: 13px; background: linear-gradient(145deg,#fbfaff,#f4f1ff); }
.pro-analysis-tiles span { color: var(--muted); font-size: 10px; }
.pro-analysis-tiles b { color: #5142a8; font-size: 20px; }
.pro-analysis-state { min-height: 220px; display: grid; place-items: center; align-content: center; gap: 9px; color: var(--muted); text-align: center; }
.pro-analysis-state > svg { width: 36px; height: 36px; color: #7a69d2; }
.pro-analysis-state p { margin: 0; }
.pro-analysis-state.error > svg { color: #bd594a; }
.pro-analysis-empty { padding: 22px 14px; color: var(--muted); text-align: center; font-size: 11px; }
.pro-analysis-section { border: 1px solid var(--line); border-radius: 14px; overflow: hidden; background: var(--surface); }
.pro-analysis-section > h3 { margin: 0; padding: 11px 13px; border-bottom: 1px solid var(--line); background: var(--surface-soft,#fafafa); font-size: 12px; }
.pro-analysis-table { overflow-x: auto; }
.pro-analysis-table > div { min-width: 650px; display: grid; grid-template-columns: 55px minmax(160px,1.5fr) 110px 90px 110px; gap: 8px; align-items: center; padding: 9px 12px; border-bottom: 1px solid var(--line); font-size: 10.5px; text-align: center; }
.pro-analysis-table.lessons > div { grid-template-columns: minmax(150px,1fr) 65px 65px 100px 100px 100px; }
.pro-analysis-table > div:last-child { border-bottom: 0; }
.pro-analysis-table > div.head { background: #f6f3ff; color: #6253ad; font-weight: 900; }
.pro-analysis-table > div > span:nth-child(2) { display: flex; flex-direction: column; min-width: 0; }
.pro-analysis-table small { color: var(--muted); }
.pro-question-stats { display: grid; grid-template-columns: repeat(auto-fill,minmax(280px,1fr)); gap: 8px; padding: 10px; }
.pro-question-stats article { border: 1px solid var(--line); border-radius: 11px; overflow: hidden; }
.pro-question-stats header { display: grid; grid-template-columns: auto minmax(0,1fr) auto; gap: 7px; align-items: center; padding: 8px 10px; background: #faf8ff; }
.pro-question-stats header small { overflow: hidden; text-overflow: ellipsis; color: var(--muted); }
.pro-question-stats header strong { color: #188679; }
.pro-question-stats article > div { display: flex; flex-wrap: wrap; gap: 5px; padding: 8px; }
.pro-question-stats article > div span { padding: 4px 7px; border-radius: 7px; background: var(--surface-soft,#f5f5f5); color: var(--muted); font-size: 9.5px; }
.pro-question-stats article > div .ok { background: #eaf8f3; color: #188679; }
.pro-question-stats article > div .bad { background: #fceeea; color: #bd5041; }
.pro-sheet-manager { display: grid; align-content: start; gap: 16px; min-width: 0; }
.pro-sheet-head { display: flex; justify-content: space-between; align-items: center; gap: 18px; padding: 22px; border: 1px solid #d7e5dc; border-radius: 18px; background: linear-gradient(125deg,#f4fbf8,#fffdf9); }
.pro-sheet-head > div:first-child { display: grid; gap: 7px; min-width: 0; }
.pro-sheet-eyebrow { color: #168878; font-size: 11px; font-weight: 900; letter-spacing: .02em; }
.pro-sheet-head h3 { margin: 0; color: var(--ink); font-size: 19px; line-height: 1.5; }
.pro-sheet-head p { max-width: 620px; margin: 0; color: var(--muted); font-size: 12px; line-height: 1.8; }
.pro-sheet-facts { display: flex; flex: none; flex-wrap: wrap; gap: 7px; justify-content: flex-end; max-width: 300px; }
.pro-sheet-facts span { display: inline-flex; align-items: center; gap: 4px; padding: 6px 10px; border: 1px solid #d4e8dc; border-radius: 999px; background: #fff; color: #3f6252; font-size: 11px; font-weight: 700; white-space: nowrap; }
.pro-sheet-facts b { color: #166f60; font-size: 14px; }
.pro-sheet-steps { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 8px; }
.pro-sheet-steps span { display: flex; align-items: center; gap: 8px; min-width: 0; padding: 10px 12px; border: 1px solid #e7e2d9; border-radius: 11px; background: #fff; color: #554e43; font-size: 11.5px; font-weight: 750; }
.pro-sheet-steps b { display: grid; flex: none; place-items: center; width: 23px; height: 23px; border-radius: 50%; background: #e8f6ef; color: #168878; font-size: 11px; }
.pro-sheet-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.pro-sheet-actions button { justify-content: center; }
.pro-sheet-drop { display: flex; align-items: center; gap: 14px; padding: 16px; border: 1.5px dashed #a2cbbb; border-radius: 14px; background: #fbfefd; cursor: pointer; transition: border-color .15s,background .15s,box-shadow .15s; }
.pro-sheet-drop:hover,.pro-sheet-drop.is-dragging,.pro-sheet-drop:focus-visible { border-color: #168878; background: #ecf9f3; box-shadow: 0 0 0 3px #16887820; outline: 0; }
.pro-sheet-drop-icon { display: grid; flex: none; place-items: center; width: 44px; height: 44px; border-radius: 12px; background: #e7f6ee; color: #168878; }
.pro-sheet-drop-icon svg { width: 21px; height: 21px; }
.pro-sheet-drop > span:last-child { display: grid; gap: 3px; min-width: 0; }
.pro-sheet-drop b { font-size: 13px; }
.pro-sheet-drop small { color: var(--muted); font-size: 11px; line-height: 1.8; }
.pro-sheet-progress { display: grid; gap: 8px; padding: 12px 15px; border: 1px solid #cfe6df; border-radius: 12px; background: #f5fbf8; }
.pro-sheet-progress[hidden],.pro-sheet-errors[hidden],.pro-sheet-search-empty[hidden] { display: none; }
.pro-sheet-progress[data-tone="error"] { background: #fff8f5; border-color: #f0d4c9; }
.pro-sheet-progress[data-tone="warn"] { background: #fff9e9; border-color: #efdcae; }
.pro-sheet-progress > div { display: flex; justify-content: space-between; gap: 12px; font-size: 11px; }
.pro-sheet-progress > div > span { white-space: nowrap; font-weight: 800; }
.pro-sheet-progress progress { width: 100%; height: 8px; accent-color: #188679; }
.pro-sheet-errors { padding: 12px 14px; border: 1px solid #f0d4c9; border-radius: 12px; background: #fff9f6; font-size: 11px; }
.pro-sheet-errors > b { color: #a54838; }
.pro-sheet-errors ul { display: grid; gap: 5px; max-height: 160px; overflow: auto; margin: 8px 0 0; padding: 0; list-style: none; }
.pro-sheet-errors li { display: flex; gap: 8px; padding: 7px 9px; border-radius: 7px; background: #fff; }
.pro-sheet-errors strong { min-width: 120px; max-width: 35%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pro-sheet-errors span { color: #824637; }
.pro-sheet-downloads { display: grid; gap: 10px; min-width: 0; padding-top: 14px; border-top: 1px solid var(--line); }
.pro-sheet-section-title { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.pro-sheet-section-title > div { display: grid; gap: 2px; }
.pro-sheet-section-title b { font-size: 14px; }
.pro-sheet-section-title small, .pro-sheet-list small { color: var(--muted); }
.pro-sheet-section-title input { width: min(290px,100%); padding: 8px 11px; border: 1px solid var(--line); border-radius: 9px; background: #fff; font: inherit; font-size: 11px; }
.pro-sheet-list { display: grid; grid-template-columns: repeat(auto-fit,minmax(270px,1fr)); gap: 8px; max-height: 350px; overflow: auto; }
.pro-sheet-list .pro-sheet-student { display: grid; grid-template-columns: auto minmax(0,1fr); align-items: center; gap: 4px 10px; min-width: 0; padding: 11px 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.pro-sheet-list .pro-sheet-student[hidden] { display: none; }
.pro-sheet-student-info { display: grid; min-width: 0; }
.pro-sheet-student-info b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pro-sheet-student-info small { justify-self: start; direction: ltr; }
.pro-sheet-row-btns { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 6px; margin-top: 5px; }
.pro-sheet-row-btns button { flex: 1; justify-content: center; }
.pro-sheet-search-empty { margin: 0; padding: 10px; color: var(--muted); font-size: 12px; text-align: center; }
.pro-sheet-review { display: grid; gap: 12px; padding: 15px; border: 1px solid #d7eadf; border-radius: 15px; background: #f6fcf9; }
.pro-sheet-review-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.pro-sheet-review-head > div { display: grid; gap: 3px; }
.pro-sheet-review-head b { font-size: 14px; }
.pro-sheet-review-head small { color: var(--muted); line-height: 1.6; }
.pro-sheet-review-list { display: grid; gap: 10px; max-height: min(60vh,680px); overflow: auto; }
.pro-sheet-review-list > article { padding: 13px; border: 1px solid #dce9e2; border-radius: 12px; background: var(--surface); }
.pro-sheet-review-list > article.is-incomplete { border-color: #e8d7b6; background: #fffdf8; }
.pro-sheet-review-list > article > header { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-bottom: 10px; }
.pro-sheet-review-list > article > header > span { display: grid; min-width: 0; }
.pro-sheet-review-list > article > header small { color: var(--muted); }
.pro-sheet-ready { margin-inline-start: auto; padding: 4px 9px; border-radius: 999px; background: #e5f7ee; color: #157b56; font-size: 10px; font-style: normal; font-weight: 800; }
.pro-sheet-ready.is-pending { background: #fff0da; color: #946118; }
.pro-sheet-clear { padding: 5px 8px; font-size: 10px; }
.pro-sheet-missing,.pro-sheet-warning { margin: 0 0 9px; padding: 8px 10px; border-radius: 8px; background: #fff4df; color: #795819; font-size: 11px; line-height: 1.7; }
.pro-sheet-warning { background: #fcefea; color: #a44738; }
.pro-sheet-result-body { display: grid; gap: 8px; }
.pro-sheet-previews,.pro-sheet-answers { border: 1px solid var(--line); border-radius: 10px; background: #fff; }
.pro-sheet-previews summary,.pro-sheet-answers summary { padding: 10px 12px; cursor: pointer; font-size: 11px; font-weight: 850; }
.pro-sheet-previews > div { display: grid; grid-template-columns: repeat(auto-fit,minmax(min(100%,240px),1fr)); gap: 9px; padding: 9px; border-top: 1px solid var(--line); }
.pro-sheet-preview { min-width: 0; margin: 0; overflow: hidden; border: 1px solid #dde9e4; border-radius: 10px; background: #f7f8f7; }
.pro-sheet-preview figcaption { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 7px 10px; background: #edf7f2; font-size: 10px; }
.pro-sheet-preview figcaption span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pro-sheet-preview figcaption a { white-space: nowrap; }
.pro-sheet-preview img,.pro-sheet-preview iframe { display: block; width: 100%; height: 210px; border: 0; object-fit: contain; background: #fff; }
.pro-sheet-answer-grid { display: grid; grid-template-columns: repeat(auto-fill,minmax(76px,1fr)); gap: 5px; max-height: 250px; overflow: auto; padding: 9px; border-top: 1px solid var(--line); }
.pro-sheet-answer-grid label { display: flex; align-items: center; justify-content: space-between; gap: 4px; padding: 5px 6px; border: 1px solid var(--line); border-radius: 7px; background: var(--surface-soft,#fafafa); }
.pro-sheet-answer-grid label.is-edited { border-color: #87c3a6; background: #effaf3; }
.pro-sheet-answer-grid select { min-width: 38px; border: 0; background: transparent; font: inherit; cursor: pointer; }
.exam-window-state { display: inline-flex; max-width: 160px; color: var(--muted); font-size: 10px; line-height: 1.6; }
.exam-window-state.upcoming { color: #8a681d; }
.exam-window-state.closed { color: #a04e4e; }
@media (max-width: 820px) {
  .pro-schedule-grid,.pro-audience-modes { grid-template-columns: 1fr; }
  .pro-question-row { grid-template-columns: 22px minmax(0,1fr) auto auto; }
  .pro-question-move { grid-column: 3; grid-row: 1; }
  .pro-question-row > button { grid-column: auto; font-size: 0; }
  .pro-preview-lesson-head { align-items: flex-start; flex-direction: column; }
  .exam-picker-context { top: -12px; }
  .exam-picker-context-head { align-items: flex-start; flex-direction: column; }
  .user-educator-picker { grid-template-columns: 1fr; }
  .pro-analysis-tiles { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .pro-sheet-head,.pro-sheet-review-head { align-items: stretch; flex-direction: column; }
  .pro-sheet-actions { justify-content: stretch; }
  .pro-sheet-actions button { flex: 1; }
  .pro-sheet-facts { max-width: none; justify-content: flex-start; }
}
@media (max-width: 560px) {
  .pro-sheet-head { padding: 16px; }
  .pro-sheet-head h3 { font-size: 17px; }
  .pro-sheet-steps { grid-template-columns: 1fr; gap: 5px; }
  .pro-sheet-steps span { padding: 7px 10px; }
  .pro-sheet-drop { align-items: flex-start; padding: 12px; }
  .pro-sheet-drop-icon { width: 36px; height: 36px; }
  .pro-sheet-actions button { flex: 1 1 100%; }
  .pro-sheet-section-title { align-items: stretch; flex-direction: column; }
  .pro-sheet-section-title input { width: 100%; box-sizing: border-box; }
  .pro-sheet-errors li { display: grid; gap: 2px; }
  .pro-sheet-errors strong { max-width: 100%; }
}

/* ===== شک‌دار حین آزمون + کارنامهٔ تفسیری ===== */
/* رنگ شک: بنفش سایت (#7458b8) تا از نارنجیِ نشان‌دار کاملاً جدا باشد */
.er-nh-doubt i { display: inline-grid; place-items: center; color: #7458b8; }
.er-nh-doubt svg { width: 14px; height: 14px; }
.er-iconbtn.er-doubt-btn:hover { border-color: #8f6cd0; color: #7458b8; }
.er-iconbtn.er-doubt-btn.on { background: #f2edff; border-color: #9b7fd8; color: #7458b8; }
.er-cell.doubted { box-shadow: inset 0 0 0 1.5px #b9a3e3; }
.er-cell.doubted.current { box-shadow: 0 0 0 2px var(--orange) inset, inset 0 0 0 3.5px #b9a3e3; }
.er-cell-doubt {
  position: absolute; top: -5px; inset-inline-start: -5px; width: 14px; height: 14px;
  display: grid; place-items: center; border-radius: 50%; background: #7458b8; color: #fff;
  font-size: 8.5px; font-style: normal; font-weight: 900; pointer-events: none;
  box-shadow: 0 0 0 1.5px #fff;
}
.er-doubt-row {
  display: grid; gap: 8px; padding: 11px 13px;
  border: 1px dashed #c9b8e8; border-radius: 13px; background: #faf8ff;
}
.er-doubt-q { display: flex; align-items: center; gap: 7px; color: #63489c; font-size: 12px; font-weight: 900; }
.er-doubt-q svg { width: 16px; height: 16px; flex: none; }
.er-doubt-opts { display: flex; flex-wrap: wrap; gap: 7px; }
.er-doubt-opt {
  min-width: 36px; height: 31px; padding: 0 11px;
  border: 1px solid #d9cdf0; border-radius: 9px; background: #fff;
  font: inherit; font-size: 11.5px; font-weight: 900; color: #63489c; cursor: pointer;
  transition: border-color .14s ease, background .14s ease, color .14s ease, transform .14s var(--ease-soft);
}
.er-doubt-opt:hover { border-color: #8f6cd0; transform: translateY(-1px); }
.er-doubt-opt.on { background: #7458b8; border-color: #7458b8; color: #fff; }
.er-doubt-row > small { color: #8b7fae; font-size: 9.5px; font-weight: 700; line-height: 1.9; }

/* پاسخبرگ کارنامه: نشانهٔ سؤال شک‌دار + گزینهٔ شکِ سؤال‌های نزده */
.rr-sheet-summary .doubted { background: #faf8ff; border-color: #ddd2f0; }
.rr-sheet-summary .doubted b { color: #7458b8; }
.rr-sheet-legend .doubted { background: #f2edff; color: #63489c; }
.rr-sheet-legend .doubt-lean { background: #fff; color: #63489c; box-shadow: inset 0 0 0 1.5px #b9a3e3; }
.rr-sheet-question.doubted { background: #fdfcff; }
.rr-sheet-question.doubted > b { position: relative; }
.rr-sheet-doubt {
  position: absolute; top: -7px; inset-inline-end: -9px; width: 12px; height: 12px;
  display: grid; place-items: center; border-radius: 50%; background: #7458b8; color: #fff;
  font-size:9.5px; font-style: normal; font-weight: 900; line-height: 1;
}
.rr-sheet-question > i.doubt-lean { border: 1.5px dashed #8f6cd0; color: #63489c; background: #f7f4fe; }

/* کارنامهٔ تفسیری */
.rr-interpretive { display: grid; gap: 13px; }
.rr-interpretive .tone-teal { --tone: #168878; --tone-soft: #eaf8f4; }
.rr-interpretive .tone-red { --tone: #c24a3a; --tone-soft: #fdeceb; }
.rr-interpretive .tone-yellow { --tone: #a97925; --tone-soft: #fbf1df; }
.rr-interpretive .tone-purple { --tone: #7458b8; --tone-soft: #f2edff; }
.rr-int-empty svg { width: 40px; height: 40px; color: #b9a3e3; }
/* کاشی‌های تفسیری: تک‌ردیفهٔ فشرده — آیکون + عنوان + عدد در یک خط، بدون جملهٔ زیرین */
.rr-int-tiles article { min-height: 0; gap: 7px; padding: 8px 11px; }
.rr-int-tiles article > i { width: 27px; height: 27px; }
.rr-int-tiles article > i svg { width: 14px; height: 14px; }
.rr-int-tiles article > small { flex: 1; min-width: 0; color: #6a6154; font-size:12px; font-weight: 850; line-height: 1.4; }
.rr-int-tiles article > b { flex: none; color: #302b25; font-size:17px; font-weight: 950; unicode-bidi: plaintext; }
.rr-int-compose {
  display: grid; gap: 10px; padding: 13px 15px;
  border: 1px solid #e8dfd3; border-radius: 15px; background: linear-gradient(145deg, #fff, #fdfbf8);
}
.rr-int-compose > header { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.rr-int-compose > header b { color: #302b25; font-size:13.5px; font-weight: 950; }
.rr-int-compose > header span { color: #988d7d; font-size:11.5px; font-weight: 750; }
.rr-int-bar { display: flex; gap: 2px; height: 16px; border-radius: 999px; overflow: hidden; }
.rr-int-bar i { display: block; min-width: 8px; transition: filter .15s ease; }
.rr-int-bar i:hover { filter: brightness(1.12); }
.rr-int-bar .ok { background: #1aa58e; }
.rr-int-bar .bad { background: #ef5f4e; }
.rr-int-bar .missed { background: #e0a52e; }
.rr-int-bar .saved { background: #5b83c4; }
.rr-int-bar .none { background: #c9c0b2; }
.rr-int-legend { display: flex; flex-wrap: wrap; gap: 7px 13px; }
.rr-int-legend span { display: inline-flex; align-items: center; gap: 5px; color: #6a6154; font-size:11.5px; font-weight: 850; }
.rr-int-legend span i { width: 9px; height: 9px; border-radius: 3px; }
.rr-int-legend .ok i { background: #1aa58e; }
.rr-int-legend .bad i { background: #ef5f4e; }
.rr-int-legend .missed i { background: #e0a52e; }
.rr-int-legend .saved i { background: #5b83c4; }
.rr-int-legend .none i { background: #c9c0b2; }
.rr-int-legend span b { color: #302b25; }
.rr-int-blocks { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 460px), 1fr)); gap: 13px; align-items: start; }
.rr-int-block { display: grid; min-width: 0; gap: 10px; padding: 13px 15px; border: 1px solid #e8dfd3; border-radius: 16px; background: #fffdfb; }
.rr-int-block-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding-bottom: 9px; border-bottom: 1px dashed #e5dccb; }
.rr-int-block-head b { color: #302b25; font-size:14px; font-weight: 950; }
.rr-int-block-head span { color: #988d7d; font-size:11.5px; font-weight: 800; }
.rr-int-cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
.rr-int-card { --int-tone: #847968; --int-soft: #f1eee8; display: grid; gap: 9px; align-content: start; padding: 11px 13px; border: 1px solid #e8dfd3; border-radius: 13px; background: #fff; }
.rr-int-card.ok { --int-tone: #168878; --int-soft: #eaf8f4; }
.rr-int-card.bad { --int-tone: #c24a3a; --int-soft: #fdeceb; }
.rr-int-card.missed { --int-tone: #a97925; --int-soft: #fbf1df; }
.rr-int-card.saved { --int-tone: #4268a5; --int-soft: #eef3fc; }
.rr-int-card > header { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; }
.rr-int-card > header b { color: var(--int-tone); font-size:13px; font-weight: 950; }
.rr-int-card > header small { color: #988d7d; font-size:10.5px; font-weight: 750; }
.rr-int-card > header span { margin-inline-start: auto; padding: 3px 9px; border-radius: 999px; background: var(--int-soft); color: var(--int-tone); font-size:10.5px; font-weight: 900; white-space: nowrap; }
.rr-int-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.rr-int-chip {
  min-width: 30px; height: 28px; padding: 0 8px;
  border: 1px solid color-mix(in srgb, var(--int-tone, #847968) 32%, #e8dfd3); border-radius: 9px;
  background: var(--int-soft, #f1eee8); color: var(--int-tone, #6a6154);
  font: inherit; font-size:12.5px; font-weight: 900; cursor: pointer;
  transition: transform .13s var(--ease-soft), box-shadow .13s ease;
}
.rr-int-chip:hover { transform: translateY(-1.5px); box-shadow: 0 5px 12px color-mix(in srgb, var(--int-tone, #847968) 22%, transparent); }
.rr-int-chip.ok { --int-tone: #168878; --int-soft: #eaf8f4; }
.rr-int-chip.bad { --int-tone: #c24a3a; --int-soft: #fdeceb; }
.rr-int-chip.missed { --int-tone: #a97925; --int-soft: #fbf1df; }
.rr-int-chip.saved { --int-tone: #4268a5; --int-soft: #eef3fc; }
.rr-int-chip.none { --int-tone: #847968; --int-soft: #f1eee8; }
.rr-int-chip.inline { height: 24px; min-width: 26px; font-size:11.5px; }
.rr-int-whatif { display: grid; min-width: 0; gap: 10px; padding: 12px 13px; border: 1px solid #e9e1d4; border-radius: 13px; background: #fff; }
.rr-int-whatif > header { display: grid; gap: 3px; }
.rr-int-whatif > header b { color: #302b25; font-size:13px; font-weight: 950; }
.rr-int-whatif > header p { margin: 0; color: #988d7d; font-size:11.5px; font-weight: 750; line-height: 1.9; }
.rr-int-table { min-width: 0; }
.rr-int-table th, .rr-int-table td { padding: 8px 6px; }
.rr-int-table th { white-space: normal; }
.rr-int-table th.lesson, .rr-int-table td.lesson { min-width: 70px; padding-inline-start: 8px; white-space: normal; }
.rr-int-table td.percent, .rr-int-table .rr-lt-percent { min-width: 0; }
.rr-int-table tr.muted td { opacity: .55; }
.rr-int-delta { display: inline-flex; align-items: center; gap: 4px; padding: 4px 9px; border-radius: 999px; font-size:12px; font-weight: 950; white-space: nowrap; }
.rr-int-delta i { font-size:10px; font-style: normal; }
.rr-int-delta.up { background: #eaf8f4; color: #168878; }
.rr-int-delta.down { background: #fdeceb; color: #c24a3a; }
.rr-int-delta.zero { background: #f1eee8; color: #988d7d; font-weight: 800; }
.rr-int-ranks { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
.rr-int-ranks article {
  display: grid; gap: 6px; justify-items: center; padding: 11px 12px;
  border: 1px solid #e6ddd0; border-radius: 12px; background: linear-gradient(145deg, #fff, #fcfaf6); text-align: center;
}
.rr-int-ranks article span { color: #988d7d; font-size:11px; font-weight: 850; }
.rr-int-ranks article > div { display: inline-flex; align-items: center; gap: 7px; }
.rr-int-ranks article b { color: #6a6154; font-size:16px; font-weight: 950; }
.rr-int-ranks article b.sim { color: #7458b8; }
.rr-int-ranks article i { display: inline-grid; place-items: center; color: #c2b7a4; }
.rr-int-ranks article i svg { width: 13px; height: 13px; }
.rr-int-ranks > p { grid-column: 1 / -1; margin: 0; color: #a79b89; font-size:10.5px; font-weight: 750; text-align: center; }
.rr-int-note { align-items: center; flex-wrap: wrap; gap: 6px; }
@media (max-width: 760px) {
  .rr-int-cards { grid-template-columns: minmax(0, 1fr); }
  .rr-int-ranks { grid-template-columns: minmax(0, 1fr); }
  .rr-int-block, .rr-int-compose { padding: 11px; }
}

/* ===== شرکت مجدد: تایمر شمارش معکوس ۲۴ ساعته ===== */
.exam-retake-icon.is-locked { color: #b1b1b1; border-color: #e6e0d6; background: #f6f3ee; cursor: not-allowed; }
.exam-retake-icon.is-locked:hover svg { transform: none; }
.exam-retake-timer { display: inline-flex; align-items: center; gap: 4px; padding: 3px 8px; border-radius: 999px; background: #fff3e2; border: 1px solid #f4d6ab; color: #a9601a; font-size: 10.5px; font-weight: 750; white-space: nowrap; }
.exam-retake-timer svg { width: 12px; height: 12px; }
.exam-retake-timer b { font-variant-numeric: tabular-nums; letter-spacing: .4px; }
.exam-retake-timer small { color: #b8792f; font-size: 9px; font-weight: 800; }
.exam-retake-wait { display: inline-flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.exam-retake-wait .primary-button[disabled] { opacity: .55; cursor: not-allowed; }
.exam-td-actions .exam-retake-timer { font-size: 9px; padding: 2px 5px; gap: 3px; }
.exam-td-actions .exam-retake-timer svg { width: 10px; height: 10px; }
/* فقط ردیفی که تایمر شرکت مجدد دارد اجازهٔ شکستن به خط بعد را می‌گیرد تا هرگز اسکرول افقی نسازد */
.exam-td-actions:has(.exam-retake-timer) { flex-wrap: wrap; row-gap: 4px; }

/* ===== صدور کارنامه: آنی / بعد از پایان آزمون (آزمون جمعی) ===== */
.pro-report-card { margin-top: 14px; border: 1.5px solid #e5dccb; border-radius: 15px; background: #fff; padding: 14px; }
.pro-report-head { display: flex; align-items: flex-start; gap: 12px; margin-bottom: 12px; }
.pro-report-icon { flex: none; display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; background: #fff3e2; color: var(--orange); }
.pro-report-icon svg { width: 18px; height: 18px; }
.pro-report-head b { display: block; font-size: 13px; }
.pro-report-head small { display: block; margin-top: 2px; color: var(--muted); font-size: 11px; line-height: 1.7; }
.pro-report-modes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.pro-report-mode { position: relative; display: flex; padding: 12px; border: 1.5px solid #e5dccb; border-radius: 13px; background: #fff; cursor: pointer; transition: border-color .18s ease, box-shadow .18s ease, background .18s ease; }
.pro-report-mode.on { border-color: var(--orange); box-shadow: 0 0 0 1.5px var(--orange) inset; background: #fffdf9; }
.pro-report-mode input { position: absolute; opacity: 0; pointer-events: none; }
.pro-report-mode-main { display: flex; flex-direction: column; gap: 5px; }
.pro-report-mode-main b { display: flex; align-items: center; gap: 6px; font-size: 12.5px; }
.pro-report-mode-main b svg { width: 15px; height: 15px; color: var(--orange); }
.pro-report-mode-main small { color: var(--muted); font-size: 11px; line-height: 1.75; }
@media (max-width: 640px) {
  .pro-report-modes { grid-template-columns: minmax(0, 1fr); }
}

/* ═══════════════════ آزمون اعتبارسنجی و نظرسنجی ═══════════════════ */
.pro-extra-card { margin-top: 14px; border: 1.5px solid #e5dccb; border-radius: 15px; background: #fff; padding: 14px; }
.pro-extra-card.on { border-color: var(--orange); background: #fffdf9; }
.pro-extra-body { display: grid; gap: 12px; margin-top: 13px; padding-top: 13px; border-top: 1px dashed #ecdfc9; }
.pro-val-modes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.pro-val-mode { position: relative; display: grid; gap: 5px; padding: 12px; border: 1.5px solid #e5dccb; border-radius: 13px; background: #fff; cursor: pointer; transition: border-color .18s ease, box-shadow .18s ease; }
.pro-val-mode.on { border-color: var(--orange); box-shadow: 0 0 0 1.5px var(--orange) inset; background: #fffdf9; }
.pro-val-mode.disabled { opacity: .5; cursor: not-allowed; }
.pro-val-mode input { position: absolute; opacity: 0; pointer-events: none; }
.pro-val-mode b { font-size: 12.5px; }
.pro-val-mode span { color: var(--muted); font-size: 11px; line-height: 1.75; }
/* ورودی زمان اعتبارسنجی: هم‌شکلِ فیلدهای زمان/ضریب مرحلهٔ دفترچه‌ها */
.pro-val-time { display: grid; gap: 7px; width: max-content; max-width: 100%; }
.pro-val-time > span:first-child { margin-inline-start: 4px; color: #9a8c78; font-size: 10.5px; font-weight: 700; }
.pro-val-time .ew-time-input {
  height: 44px; padding-inline: 12px; border: 1px solid #e3d7c8; border-radius: 13px;
  background: #fff; box-shadow: 0 5px 14px rgba(69, 50, 29, .03); justify-content: center;
}
.pro-val-time .ew-time-input svg { width: 15px; height: 15px; color: #9b8a72; }
.pro-val-time .ew-time-input input {
  width: 54px; flex: none; padding: 0; border: 0; outline: 0; background: transparent; box-shadow: none;
  text-align: center; font: inherit; font-size: 14px; font-weight: 650; color: var(--ink);
}
.pro-val-time .ew-time-input small { margin-inline-start: 2px; font-size: 11px; }

.pro-survey-list { display: grid; gap: 10px; }
.pro-survey-row { border: 1px solid #e9dfcd; border-radius: 14px; background: #fff; padding: 12px; display: grid; gap: 11px; }
.pro-survey-row > header {
  display: grid; gap: 9px; align-items: end;
  grid-template-columns: 30px minmax(0, 1fr) 158px auto 44px;
  grid-template-areas: "num title type req del";
}
.pro-survey-row > header > .ew-bk-index { grid-area: num; margin-bottom: 7px; }
.pro-survey-row > header > .pro-survey-field:not(.is-type) { grid-area: title; }
.pro-survey-row > header > .pro-survey-field.is-type { grid-area: type; }
.pro-survey-row > header > .pro-survey-req { grid-area: req; }
.pro-survey-row > header > .ew-mini { grid-area: del; height: 44px; width: 44px; border-radius: 13px; }
/* فیلدِ برچسب‌بالا: متن پرسش و نوع پرسش */
.pro-survey-field { display: grid; gap: 7px; min-width: 0; }
.pro-survey-field > span { margin-inline-start: 4px; color: #9a8c78; font-size: 10.5px; font-weight: 700; }
.pro-survey-field input,
.pro-survey-field select {
  width: 100%; min-width: 0; height: 44px; padding: 0 12px;
  border: 1px solid #e3d7c8; border-radius: 13px; background: #fff; outline: 0;
  font: inherit; font-size: 13px; font-weight: 650; color: var(--ink);
  box-shadow: 0 5px 14px rgba(69, 50, 29, .03);
  transition: border-color .16s ease, box-shadow .16s ease;
}
.pro-survey-field input::placeholder { color: #b9ab97; font-weight: 500; }
.pro-survey-field input:hover,
.pro-survey-field select:hover { border-color: #dccbb4; }
.pro-survey-field input:focus,
.pro-survey-field select:focus { border-color: #f2a562; box-shadow: 0 0 0 3px rgba(255, 101, 25, .1); }
.pro-survey-field.is-type { position: relative; }
.pro-survey-field.is-type select { appearance: none; -webkit-appearance: none; padding-inline-end: 30px; cursor: pointer; }
.pro-survey-field.is-type::after {
  content: ""; position: absolute; inset-inline-end: 14px; bottom: 20px; width: 7px; height: 7px;
  border-right: 1.7px solid #8d806e; border-bottom: 1.7px solid #8d806e;
  transform: rotate(45deg) translateY(-1px); pointer-events: none;
}
.pro-survey-req {
  display: inline-flex; align-items: center; gap: 6px; height: 44px; padding-inline: 12px; margin-bottom: 0;
  border: 1px solid #e3d7c8; border-radius: 13px; background: #fff;
  color: var(--muted); font-size: 11px; font-weight: 700; white-space: nowrap; cursor: pointer;
  transition: border-color .16s ease, background .16s ease, color .16s ease;
}
.pro-survey-req input { accent-color: var(--orange); width: 15px; height: 15px; cursor: pointer; }
.pro-survey-req.on { border-color: #f6c69b; background: #fff8ef; color: #b4590f; }
.pro-survey-options { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.pro-survey-options-label { flex: 0 0 100%; margin-inline-start: 4px; color: #9a8c78; font-size: 10.5px; font-weight: 700; }
.pro-survey-option {
  display: inline-flex; align-items: center; gap: 6px; height: 36px; padding-inline: 9px;
  border: 1px solid #eadfcc; border-radius: 11px; background: #fdfbf7;
  transition: border-color .16s ease, box-shadow .16s ease, background .16s ease;
}
.pro-survey-option:focus-within { border-color: #f2a562; background: #fff; box-shadow: 0 0 0 3px rgba(255, 101, 25, .08); }
.pro-survey-option b { flex: none; color: var(--orange); font-size: 10.5px; }
.pro-survey-option input {
  width: 122px; min-width: 0; padding: 0; border: 0; outline: 0; background: transparent; box-shadow: none;
  font: inherit; font-size: 11.5px; font-weight: 650; color: var(--ink);
}
.pro-survey-option input::placeholder { color: #b9ab97; font-weight: 500; }
.pro-survey-option button {
  flex: none; width: 20px; height: 20px; border: 0; border-radius: 6px; background: transparent;
  color: #a4907a; cursor: pointer; display: grid; place-items: center; transition: background .16s ease, color .16s ease;
}
.pro-survey-option button:hover { background: #fdecea; color: #b3372f; }
.pro-survey-option button svg { width: 12px; height: 12px; }
.pro-survey-hint { margin: 0; color: var(--muted); font-size: 10.5px; line-height: 1.9; }
.pro-survey-actions { display: flex; gap: 9px; flex-wrap: wrap; }

/* نظرسنجی سمت دانش‌آموز */
.exam-survey-modal { display: grid; gap: 14px; }
.sv-q { display: grid; gap: 9px; padding: 12px; border: 1px solid var(--line); border-radius: 13px; background: var(--surface, #fff); }
.sv-q > header { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.sv-q > header b { font-size: 12.5px; }
.sv-req { padding: 2px 7px; border-radius: 999px; background: #fdeaea; color: #b3372f; font-size: 9.5px; font-style: normal; }
.sv-choices { display: flex; flex-wrap: wrap; gap: 8px; }
.sv-choice { padding: 8px 13px; border: 1.5px solid #e5dccb; border-radius: 11px; background: #fff; font-size: 11.5px; cursor: pointer; transition: border-color .16s ease, background .16s ease; }
.sv-choice:hover { border-color: var(--orange); }
.sv-choice.on { border-color: var(--orange); background: #fff5e6; font-weight: 800; }
.sv-stars { display: inline-flex; align-items: center; gap: 4px; }
.sv-star { border: 0; background: transparent; color: #dcd3c4; font-size: 27px; line-height: 1; cursor: pointer; transition: color .14s ease, transform .14s ease; }
.sv-star:hover { transform: scale(1.08); }
.sv-star.on { color: #f5a623; }
.sv-star-label { margin-inline-start: 8px; color: var(--muted); font-size: 10.5px; font-style: normal; }
.sv-text {
  width: 100%; border: 1px solid #e3d7c8; border-radius: 12px; padding: 11px; outline: 0;
  background: #fff; font: inherit; font-size: 12px; line-height: 1.9; color: var(--ink); resize: vertical;
  transition: border-color .16s ease, box-shadow .16s ease;
}
.sv-text::placeholder { color: #b9ab97; }
.sv-text:hover { border-color: #dccbb4; }
.sv-text:focus { border-color: #f2a562; box-shadow: 0 0 0 3px rgba(255, 101, 25, .1); }

/* اجراکنندهٔ اعتبارسنجی */
.exam-validation-runner .ev-top { border-bottom-color: #f0d9ae; }
.exam-validation-runner .er-title strong { color: var(--orange); }
.ev-info-body { display: grid; gap: 10px; }
.ev-result-ring {
  position: relative; display: grid; place-items: center; gap: 2px; width: 132px; height: 132px; margin: 4px auto 12px;
  border-radius: 50%; background: conic-gradient(var(--orange) calc(var(--rr-p, 0) * 1%), #eee6d8 0);
}
.ev-result-ring::before { content: ""; position: absolute; inset: 11px; border-radius: 50%; background: #fff; }
.ev-result-ring b { position: relative; font-size: 25px; color: var(--orange); }
.ev-result-ring span { position: relative; color: var(--muted); font-size: 10px; }

/* کارت اعتبارسنجی در کارنامه */
.rr-validation-card { border: 1.5px solid #e6dcc9; border-radius: 15px; background: #fff; padding: 13px 14px; display: grid; gap: 10px; }
.rr-validation-card.pending { border-color: var(--orange); background: #fffdf8; }
.rr-validation-card > header { display: flex; align-items: center; gap: 11px; flex-wrap: wrap; }
.rr-validation-card > header > div { flex: 1 1 220px; min-width: 0; }
.rr-validation-card b { display: block; font-size:14.5px; }
.rr-validation-card small { display: block; margin-top: 2px; color: var(--muted); font-size:12.5px; line-height: 1.8; }
.rr-validation-icon { flex: none; display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; background: #fff3e2; color: var(--orange); }
.rr-validation-icon svg { width: 18px; height: 18px; }
.rr-validation-pct { flex: none; font-size:22px; color: var(--orange); }
.rr-validation-stats { display: flex; flex-wrap: wrap; gap: 8px; font-size:12.5px; }
.rr-validation-stats span { padding: 4px 9px; border-radius: 999px; background: #f6f2ea; color: var(--muted); }
.rr-validation-stats .ok { background: #e8f6ec; color: #1f7a3d; }
.rr-validation-stats .bad { background: #fdecea; color: #b3372f; }

/* تحلیل برگزارکننده: اعتبارسنجی و نظرسنجی */
.pro-analysis-tiles.compact { grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); padding: 12px 13px 0; }
.pro-analysis-tiles.compact b { font-size: 15px; }
.pro-analysis-section > .pro-aud-hint { padding: 0 13px 12px; }
.pro-analysis-table.pro-val-lessons { margin-top: 12px; border-top: 1px solid var(--line); }
.pro-analysis-table.pro-val-lessons > div { min-width: 420px; grid-template-columns: minmax(140px, 1fr) 80px 120px; }
.pro-analysis-table.pro-val-rows { margin-top: 12px; border-top: 1px solid var(--line); }
.pro-analysis-table.pro-val-rows > div { min-width: 620px; grid-template-columns: minmax(160px, 1.4fr) minmax(90px, 1fr) minmax(110px, 1fr) 120px 80px; }
.pro-survey-stats { display: grid; gap: 11px; padding: 12px 13px; }
.pro-survey-stat { border: 1px solid var(--line); border-radius: 12px; background: var(--surface, #fff); padding: 11px; display: grid; gap: 9px; }
.pro-survey-stat > header { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.pro-survey-stat > header b { flex: 1 1 180px; font-size: 12px; }
.pro-survey-stat > header strong { color: #5142a8; font-size: 12px; }
.pro-survey-stars-avg { display: flex; align-items: center; gap: 3px; }
.pro-survey-stars-avg .sv-star { font-size: 20px; color: #dcd3c4; }
.pro-survey-stars-avg .sv-star.on { color: #f5a623; }
.pro-survey-stars-avg small { margin-inline-start: 8px; color: var(--muted); font-size: 10px; }
.pro-survey-bars { display: grid; gap: 6px; }
.pro-survey-bar { display: grid; grid-template-columns: minmax(64px, 132px) 1fr 34px 44px; align-items: center; gap: 8px; font-size: 10.5px; }
.pro-survey-bar-label { color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pro-survey-bar-track { height: 9px; border-radius: 999px; background: #f0ecf9; overflow: hidden; }
.pro-survey-bar-track i { display: block; height: 100%; border-radius: 999px; background: linear-gradient(90deg, #7b68d6, #a794f0); }
.pro-survey-bar b { text-align: center; }
.pro-survey-bar em { color: var(--muted); font-style: normal; text-align: center; }
.pro-survey-texts { display: grid; gap: 8px; }
.pro-survey-texts blockquote { margin: 0; padding: 9px 11px; border-inline-start: 3px solid #a794f0; border-radius: 10px; background: #faf8ff; display: grid; gap: 4px; }
.pro-survey-texts blockquote > span { display: flex; align-items: center; gap: 7px; font-size: 10px; }
.pro-survey-texts blockquote small { color: var(--muted); }
.pro-survey-texts blockquote em { padding: 1px 6px; border-radius: 999px; background: #ece7fb; color: #5142a8; font-style: normal; font-size: 9px; }
.pro-survey-texts blockquote p { margin: 0; font-size: 11px; line-height: 1.9; }
.pro-analysis-table.pro-survey-people > div { grid-template-columns: minmax(150px, 1.4fr) repeat(auto-fit, minmax(110px, 1fr)); text-align: center; }
.pro-analysis-table.pro-survey-people em { padding: 1px 6px; border-radius: 999px; background: #ece7fb; color: #5142a8; font-style: normal; font-size: 9px; }
.pro-sheet-row-btns { display: inline-flex; gap: 7px; flex-wrap: wrap; }
.pro-sheet-val-badge { padding: 2px 8px; border-radius: 999px; background: #fff3e2; color: var(--orange); font-style: normal; font-size: 9.5px; white-space: nowrap; }
.pro-sheet-answer-grid label.is-validation span { background: #fff3e2; color: var(--orange); border-radius: 6px; }
@media (max-width: 900px) {
  .pro-survey-row > header {
    grid-template-columns: 30px minmax(0, 1fr) 44px;
    grid-template-areas: "num title del" "type type type" "req req req";
  }
  .pro-survey-row > header > .pro-survey-req { justify-self: start; }
}
@media (max-width: 640px) {
  .pro-val-modes { grid-template-columns: minmax(0, 1fr); }
  .pro-survey-option { flex: 1 1 100%; }
  .pro-survey-option input { width: 100%; }
  .pro-survey-bar { grid-template-columns: minmax(58px, 1fr) 1fr 30px 40px; }
}

/* ═══════════════════ ماهنامه ═══════════════════ */
.mn-lesson-tabs,
.mn-layout {
  --primary: var(--orange);
  --surface: var(--panel);
  --border: var(--line);
  --text: var(--ink);
}
.mn-head-badge {
  align-self: center; font-size: .82rem; font-weight: 700; padding: 8px 14px; border-radius: 999px;
  background: color-mix(in srgb, var(--primary) 12%, transparent); color: var(--primary); white-space: nowrap;
}
/* چیدمان دوستونی: فیلتر موضوع و منبع در راست، فهرست سؤال‌ها در چپ */
.mn-layout { display: grid; grid-template-columns: 276px minmax(0, 1fr); gap: 18px; align-items: start; }
.mn-main { grid-column: 2; grid-row: 1; min-width: 0; display: flex; flex-direction: column; gap: 14px; }
.mn-toolbar {
  display: flex; flex-wrap: wrap; align-items: center; gap: 10px;
  padding: 12px 14px; border-radius: 16px; background: #fff; border: 1px solid #e8dfd3;
  box-shadow: 0 8px 24px rgba(67, 52, 35, .045);
}
.mn-admin-toolbar { justify-content: flex-start; }
.mn-toolbar-title {
  display: flex; flex: 0 0 auto; flex-direction: column; gap: 2px; min-width: 132px;
  padding-inline-end: 13px; border-inline-end: 1px solid #eee6dc;
}
.mn-toolbar-title strong { color: var(--ink); font-size: 12px; font-weight: 900; }
.mn-toolbar-title small { color: var(--muted); font-size: 9px; font-weight: 700; white-space: nowrap; }
.mn-admin-toolbar .seg-group { flex: 0 0 auto; background: #f3eee7; border: 1px solid #ece3d7; }
.mn-admin-toolbar .seg { color: #847968; }
.mn-admin-toolbar .seg.on { background: #fff; color: #c9510c; box-shadow: 0 3px 9px rgba(91, 62, 34, .1); }
.mn-toolbar .sbank-search { flex: 1 1 230px; min-width: 190px; max-width: 430px; }
.mn-toolbar .sbank-search input { height: 38px; border-color: #e6ddd0; background: #fffdfb; }
.mn-found { font-size: .82rem; color: var(--muted); white-space: nowrap; }
.mn-found b { color: var(--text); font-weight: 800; }
.mn-admin-toolbar .mn-found {
  margin-inline-start: auto; padding: 7px 10px; border-radius: 10px;
  background: #faf7f2; border: 1px solid #eee6dc;
}
.mn-list { display: flex; flex-direction: column; gap: 12px; }

/* نوار کناری */
.mn-side {
  grid-column: 1; grid-row: 1; position: sticky; top: 12px; display: flex; flex-direction: column; gap: 11px;
  padding: 12px; border-radius: 18px; background: #fff; border: 1px solid #e5dccf;
  box-shadow: 0 10px 28px rgba(67, 52, 35, .055);
  max-height: calc(100vh - 30px); overflow: auto;
  scrollbar-width: thin; scrollbar-color: #d8ccbc transparent;
}
.mn-side::-webkit-scrollbar { width: 6px; }
.mn-side > * { flex-shrink: 0; }
.mn-side::-webkit-scrollbar-thumb { background: #d8ccbc; border-radius: 999px; }
.mn-side-head {
  display: flex; align-items: center; gap: 9px; padding: 2px 2px 5px; font-size: .86rem;
}
.mn-side-icon {
  width: 34px; height: 34px; flex: 0 0 auto; display: grid; place-items: center;
  border-radius: 11px; background: var(--orange-soft); color: #d85b13;
}
.mn-side-icon .ui-icon { width: 17px; height: 17px; }
.mn-side-copy { min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.mn-side-copy strong { color: var(--ink); font-size: 12px; font-weight: 900; }
.mn-side-copy small { color: var(--muted); font-size: 9px; font-weight: 700; white-space: nowrap; }
.mn-chips {
  display: flex; flex-wrap: wrap; gap: 6px; padding: 8px;
  border-radius: 12px; background: #faf7f2; border: 1px dashed #e5d9ca;
}
.mn-clear {
  align-self: stretch; justify-content: center; min-height: 32px; padding: 5px 9px;
  border: 1px solid #eadfd2; border-radius: 10px; background: #fff; color: #9b6a46; font-size: .74rem;
}
.mn-clear:hover { border-color: #efb78e; background: #fff8f2; color: #c9510c; }
.mn-sec {
  overflow: hidden; padding: 0; border: 1px solid #e8dfd3; border-radius: 13px; background: #fffdfb;
}
.mn-sec > summary {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  min-height: 40px; cursor: pointer; list-style: none; padding: 8px 10px;
  color: #4d463e; font-size: .8rem; font-weight: 850;
  transition: background .15s ease, color .15s ease;
}
.mn-sec > summary:hover { background: #faf4ec; color: #b64e12; }
.mn-sec > summary::-webkit-details-marker { display: none; }
.mn-sec > summary .ui-icon { width: 15px; height: 15px; color: var(--muted); transition: transform .18s ease; }
.mn-sec[open] > summary .ui-icon { transform: rotate(180deg); }
.mn-sec[open] > summary { background: #faf7f2; border-bottom: 1px solid #eee6dc; }
.mn-sec-body { padding: 7px; }
.mn-empty-note { font-size: .78rem; color: var(--muted); padding: 6px 2px; }
.mn-hint { font-size: .8rem; color: var(--muted); line-height: 1.9; margin: 0 0 8px; }

/* درخت موضوعی */
.mn-tree, .mn-ftree { display: flex; flex-direction: column; gap: 2px; }
.mn-trow, .mn-frow, .mn-ex-row {
  display: flex; align-items: center; gap: 6px; min-height: 34px; border: 1px solid transparent; border-radius: 9px; padding: 6px;
  padding-inline-start: calc(6px + var(--mn-depth, 0) * 12px);
  transition: background .15s ease, border-color .15s ease;
}
.mn-trow:hover, .mn-frow:hover, .mn-ex-row:hover { background: #faf4ec; border-color: #f2e3d1; }
.mn-trow:active { background: #f6ebdd; }
.mn-trow.on, .mn-frow.on { background: var(--orange-soft); border-color: #f4ceb4; }
.mn-tcaret {
  flex: 0 0 auto; display: grid; place-items: center; width: 20px; height: 20px; padding: 0;
  border: 0; border-radius: 7px; background: transparent; color: var(--muted); cursor: pointer;
  transition: background .15s ease, color .15s ease;
}
.mn-tcaret:hover { background: #f3e7d7; color: var(--orange); }
.mn-tcaret:focus-visible { outline: 2px solid rgba(255,101,25,.5); outline-offset: 1px; }
.mn-tcaret .ui-icon { width: 13px; height: 13px; transition: transform .22s cubic-bezier(.22,.61,.36,1); }
.mn-tcaret.open .ui-icon { transform: rotate(180deg); }
.mn-tcaret-sp { flex: 0 0 auto; width: 20px; }
.mn-tcheck { display: grid; place-items: center; flex: 0 0 auto; }
.mn-tcheck input { width: 15px; height: 15px; cursor: pointer; accent-color: var(--orange); }
.mn-tlabel, .mn-flabel {
  flex: 1 1 auto; min-width: 0; color: #514a42; font-size: .76rem; font-weight: 700; cursor: pointer;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.mn-tcount {
  flex: 0 0 auto; min-width: 24px; color: #8d8273; font-size: .68rem; font-weight: 850; text-align: center;
  background: #f1eee8; border-radius: 999px; padding: 2px 6px;
}
.mn-trow.on .mn-tcount { background: #fff; color: #c9510c; }
/* شاخهٔ نقشهٔ مباحث که هنوز سؤالی ندارد: دیده می‌شود ولی کم‌رنگ */
.mn-trow.is-empty:not(.on) .mn-tlabel { color: #a89e91; font-weight: 600; }
.mn-trow.is-empty:not(.on) .mn-tcount { background: #f6f3ee; color: #b5aa9b; }
.mn-tkids, .mn-fkids, .mn-ex-kids { display: flex; flex-direction: column; gap: 2px; }
/* ارتفاعِ شاخهٔ بازشونده با slideBlock انیمیت می‌شود؛ margin نداشته باشد تا پرش نکند */
.mn-tkids { margin: 0; }

/* منابع */
.mn-src-list { display: flex; flex-direction: column; gap: 3px; }
.mn-src {
  display: flex; align-items: center; gap: 8px; min-height: 35px; padding: 6px 8px; border-radius: 9px;
  color: #514a42; font-size: .76rem; font-weight: 700; cursor: pointer; border: 1px solid transparent;
}
.mn-src:hover { background: #faf4ec; }
.mn-src.on { background: var(--orange-soft); border-color: #f4ceb4; }
.mn-src input { width: 15px; height: 15px; accent-color: var(--orange); }
.mn-src span { flex: 1 1 auto; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mn-src b { min-width: 24px; padding: 2px 6px; border-radius: 999px; background: #f1eee8; color: #8d8273; font-size: .68rem; font-weight: 850; text-align: center; }
.mn-src.on b { background: #fff; color: #c9510c; }
/* ردیفِ آزمون: نامِ مرحله (با تاریخ) + منبع/سال/پایه زیرش */
.mn-exam-row { align-items: flex-start; }
.mn-exam-row input { margin-top: 3px; }
.mn-src .mn-exam-copy { display: flex; flex-direction: column; gap: 2px; min-width: 0; white-space: normal; }
.mn-exam-copy strong { font-size: .76rem; font-weight: 800; color: inherit; line-height: 1.5; }
.mn-exam-copy small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #8d8273; font-size: .66rem; font-weight: 650; }
.mn-exam-fresh { flex: 0 0 auto; padding: 2px 6px; border-radius: 999px; background: #e3f4ec; color: #17734c; font-size: .62rem; font-style: normal; font-weight: 850; }

/* صفحه‌بندی */
.mn-pager { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 5px; padding: 6px 0 2px; }
.mn-pager button {
  min-width: 32px; height: 32px; padding: 0 8px; border-radius: 10px; cursor: pointer;
  background: var(--surface); border: 1px solid var(--border); color: var(--text); font-weight: 700; font-size: .8rem;
}
.mn-pager button:hover:not(:disabled) { border-color: var(--primary); color: var(--primary); }
.mn-pager button.on { background: var(--primary); border-color: var(--primary); color: #fff; }
.mn-pager button:disabled { opacity: .45; cursor: default; }
.mn-pager button .ui-icon { width: 14px; height: 14px; }
.mn-pager-gap { color: var(--muted); padding: 0 2px; }

/* تبِ آزمون‌های ماهنامه */
.mn-ex-panel { display: flex; flex-direction: column; gap: var(--space-3); }
.mn-ex-panel-head { gap: var(--space-2); }
.mn-ex-panel-head h2 { font-size: 16px; }
.mn-ex-panel-head p { margin: 0; font-size: 12px; }
.mn-ex-available {
  flex: none; color: var(--muted); font-size: 12px; font-weight: 750; white-space: nowrap;
}
.mn-ex-available b { color: #c9510c; font-size: 13px; }
.mn-ex-layout { align-items: start; }
.mn-ex-filter .exam-filter-title > b {
  margin-inline-start: auto; min-width: 22px; height: 22px; display: grid; place-items: center;
  padding: 0 6px; border-radius: 8px; background: var(--orange-soft); color: #c9510c; font-size: 10px;
}
.mn-ex-tree {
  display: grid; gap: 4px; padding: 10px 12px; border: 1px solid #e7ddcf; border-radius: 16px;
  background: #fff; box-shadow: 0 8px 24px rgba(67, 52, 35, .035);
}
.mn-ex-node .eb-row { border-radius: 10px; }
.mn-ex-node .eb-exam { margin-block: 3px; }
.mn-ex-node .eb-row.picked {
  border-color: #efb27f; background: #fff4e8; box-shadow: inset 3px 0 0 var(--orange);
}
.mn-ex-node .eb-branch.open { background: #faf7f2; }
.mn-ex-node .eb-name { gap: var(--space-1); }
.mn-ex-node .eb-title-line > b { flex: 0 1 auto; overflow-wrap: anywhere; }
.mn-ex-context {
  display: block; min-width: 0; font-size: 11px; font-weight: 700;
  line-height: 1.6; white-space: normal; overflow-wrap: anywhere;
}
.mn-ex-lessons { color: #2f756e; }
.mn-ex-meta-separator { color: var(--muted); }
.mn-ex-path { color: #a85b23; }
.mn-ex-summary .eb-pick-title { display: grid; align-content: center; gap: var(--space-1); }
.mn-ex-summary .eb-pick-name { max-width: none; white-space: normal; overflow-wrap: anywhere; }
.eb-stage-paths > .mn-ex-context { white-space: normal; overflow: visible; }
.mn-ex-node .eb-join { background: linear-gradient(135deg, #ff7a2b, var(--orange)); box-shadow: 0 5px 12px rgba(255, 107, 24, .16); }
/* سرشاخهٔ منبع: مرحله‌ها زیرمجموعهٔ آن باز می‌شوند */
.mn-ex-src-node + .mn-ex-src-node { margin-top: 5px; }
.mn-ex-node .eb-row.mn-ex-src {
  cursor: pointer; padding: 9px 11px; border: 1px solid #eadfce; border-radius: 12px;
  background: #fdfbf7; transition: background .15s ease, border-color .15s ease;
}
.mn-ex-node .eb-row.mn-ex-src:hover { background: #faf4ec; border-color: #e3d3ba; }
.mn-ex-node .eb-row.mn-ex-src.open { background: #f8f3ea; border-color: #e3d3ba; }
.mn-ex-node .eb-row.mn-ex-src > .eb-badges { display: inline-flex; }
.mn-ex-node .eb-row.mn-ex-src .eb-title-line > b { font-size: 13.5px; font-weight: 900; }
.mn-ex-src-note {
  overflow: hidden; color: #a2937f; font-size: 9.5px; font-weight: 700;
  text-overflow: ellipsis; white-space: nowrap;
}
.mn-ex-src-node > .eb-children-anim > .eb-children { margin-inline-start: 14px; padding-inline-start: 8px; }
@media (max-width: 760px) {
  .mn-ex-node .eb-row.eb-exam {
    display: grid;
    grid-template-columns: 24px minmax(0, 1fr) auto;
    grid-template-areas: "check identity identity" ". badges action";
    gap: var(--space-1) var(--space-2);
  }
  .mn-ex-node .eb-exam > .eb-caret-sp { display: none; }
  .mn-ex-node .eb-exam > .eb-check { grid-area: check; align-self: start; }
  .mn-ex-node .eb-exam > .eb-name { grid-area: identity; }
  .mn-ex-node .eb-exam > .eb-badges { grid-area: badges; width: auto; padding: 0; }
  .mn-ex-node .eb-exam > .eb-join { grid-area: action; margin: 0; }
}
.mn-ex-summary {
  display: block; margin-top: 15px; padding: 14px; border: 1px solid #e2d5c4; border-radius: 16px;
  background: linear-gradient(135deg, #fdfaf4, #fbf7ef); box-shadow: 0 9px 26px rgba(67, 52, 35, .045);
}

/* تبِ سطح آزمون‌ها: نمودار عمودیِ مینیمالِ میانگین ضریب دشواری
   یک رنگِ واحد برای همهٔ ستون‌ها (طیفِ باند عمداً حذف شده)، خط‌چین‌های راهنما و
   محورِ صاف؛ لوگوی منبع و عدد بالای هر ستون، نامِ آزمون زیرِ محور. */
.mn-lv-panel { display: flex; flex-direction: column; gap: 14px; }
.mn-lv-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(118px, 1fr)); gap: 10px; }
.mn-lv-stat {
  display: flex; flex-direction: column; gap: 3px; padding: 10px 12px;
  border: 1px solid #eadfd2; border-radius: 12px; background: #fff;
}
.mn-lv-stat small { color: #8d8170; font-size: 9.5px; font-weight: 800; }
.mn-lv-stat > b {
  color: var(--ink); font-size: 13.5px; font-weight: 950; overflow-wrap: anywhere;
}
.mn-lv-toolbar {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px;
  padding: 10px 12px; border: 1px solid #eadfd2; border-radius: 14px; background: #fff;
}
.mn-lv-lessons { display: flex; flex-wrap: wrap; gap: 6px; min-width: 0; }
.mn-lv-chip {
  display: inline-flex; align-items: center; gap: 6px; padding: 7px 11px;
  border: 1px solid #eadfd2; border-radius: 999px; background: #fdfbf7;
  font: inherit; font-size: 11px; font-weight: 850; color: #6a6154; cursor: pointer;
  transition: background .15s ease, border-color .15s ease, color .15s ease;
}
.mn-lv-chip b {
  min-width: 18px; padding: 0 5px; border-radius: 7px;
  background: #f2ece2; color: #8d8170; font-size: 9.5px; font-weight: 900;
}
.mn-lv-chip:hover { border-color: #b9d8d2; background: #f0f8f6; color: #2f756e; }
.mn-lv-chip.on { border-color: #2f756e; background: #2f756e; color: #fff; }
.mn-lv-chip.on b { background: rgba(255, 255, 255, .22); color: #fff; }
/* راهنمای رنگ: سه حالتِ سخت/متوسط/آسان */
.mn-lv-legend { display: inline-flex; align-items: center; gap: 12px; color: #8d8170; font-size: 10px; font-weight: 800; }
.mn-lv-legend span { display: inline-flex; align-items: center; gap: 5px; }
.mn-lv-legend i { width: 9px; height: 9px; border-radius: 3px; }
.mn-lv-legend .tone-hot i, .mn-lv-col.tone-hot .mn-lv-bar { background: #e0574c; }
.mn-lv-legend .tone-warm i, .mn-lv-col.tone-warm .mn-lv-bar { background: #eab73c; }
.mn-lv-legend .tone-cool i, .mn-lv-col.tone-cool .mn-lv-bar { background: #4aa473; }
.mn-lv-wait {
  display: flex; align-items: center; gap: 7px; margin: 0; padding: 9px 12px;
  border: 1px solid #ecdfc9; border-radius: 12px; background: #fffaf0;
  color: #8a6a1f; font-size: 11px; font-weight: 800;
}
.mn-lv-wait svg { width: 15px; height: 15px; flex: none; }
.mn-lv-chart {
  display: flex; flex-direction: column; gap: 12px; padding: 18px 16px 14px;
  border: 1px solid #e7ddcf; border-radius: 17px; background: #fff;
  min-width: 0; overflow-x: auto; scrollbar-width: thin;
}
/* ستون‌ها تا حدِ برچسبشان جمع می‌شوند. اگر جا کم بود خودِ نمودار افقی پیمایش می‌شود. */
.mn-lv-canvas { --plot: 240px; --cap: 42px; position: relative; min-width: 100%; width: min-content; padding-top: var(--cap); }
/* خط‌چین‌ها دقیقاً روی ناحیهٔ رسم می‌افتند (نه فاصلهٔ حدسی از پایین) */
.mn-lv-axis { position: absolute; inset-block-start: var(--cap); inset-inline: 0; height: var(--plot); pointer-events: none; }
.mn-lv-axis i {
  position: absolute; inset-inline: 0; bottom: var(--p);
  border-top: 1px dashed #e7e2d8;
}
.mn-lv-axis .mn-lv-base { bottom: 0; border-top: 1px solid #ddd5c9; }
/* ستون‌ها: یک گرید، و هر ستون شاملِ میله، نامِ آزمون و پاپ‌آپِ خودش — تا هاور
   روی هر جای ستون همان پاپ‌آپ را باز کند. */
.mn-lv-cols {
  position: relative; display: grid; grid-auto-flow: column; grid-auto-columns: minmax(min-content, 1fr); gap: 14px;
}
.mn-lv-col { position: relative; display: flex; flex-direction: column; min-width: 0; outline: none; }
.mn-lv-slot { position: relative; display: flex; align-items: flex-end; justify-content: center; height: var(--plot); }
.mn-lv-pop-row { align-items: center; }
.mn-lv-bar {
  width: 54px; height: var(--h, 0%); border-radius: 7px 7px 0 0;
  background: #c9bfb2; transition: height .35s var(--ease-soft), filter .15s ease;
}
.mn-lv-col:hover .mn-lv-bar,
.mn-lv-col:focus-visible .mn-lv-bar { filter: brightness(.93); }
/* کلاهکِ ستون: نسبت به کفِ ستون بالای سرِ میله می‌ایستد */
.mn-lv-cap {
  position: absolute; inset-inline: 0; bottom: var(--h, 0%);
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  padding-bottom: 7px; pointer-events: none;
}
.mn-lv-cap > b { color: #2a2622; font-size: 13.5px; font-weight: 950; line-height: 1; }
.mn-lv-col.tone-hot .mn-lv-cap > b { color: #bf4136; }
.mn-lv-col.tone-warm .mn-lv-cap > b { color: #a17716; }
.mn-lv-col.tone-cool .mn-lv-cap > b { color: #2f7a52; }
/* لوگوی منبع کنارِ نامِ آزمون، هم‌قوارهٔ دو خطِ نام و تاریخ.
   قابِ بسته + قانونِ فرزند، وگرنه SVGِ بدونِ viewBox از کادر می‌زند بیرون. */
.mn-lv-logo-box {
  display: grid; place-items: center; flex: none; overflow: hidden;
  width: 30px !important; height: 30px !important;
  min-width: 30px; min-height: 30px; max-width: 30px; max-height: 30px;
  border: 1px solid #ece6dc; border-radius: 10px; background: #fff;
}
.mn-lv-logo-box svg,
.mn-lv-logo-box img { width: 82%; height: 82%; object-fit: contain; }
.mn-lv-logo-box.src-icon-fallback { color: #c2b8aa; }
.mn-lv-logo-box.src-icon-fallback svg { width: 15px; height: 15px; }
.mn-lv-tag { display: flex; align-items: center; justify-content: center; gap: var(--space-1); min-width: 0; padding-top: 10px; }
.mn-lv-tag-copy { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.mn-lv-source { color: var(--ink); font-size: 11.5px; font-weight: 900; white-space: nowrap; }
.mn-lv-qualifier { color: var(--muted); font-size: .82em; font-weight: 700; }
.mn-lv-tag small {
  color: #a2937f; font-size: 9.5px; font-weight: 750; overflow-wrap: anywhere;
}

/* پاپ‌آپِ هاور — همان کارتِ تیرهٔ فروشگاه، اینجا با ردیف‌های درس/فصل */
.mn-lv-pop {
  position: absolute; top: calc(100% + 10px); left: 50%; z-index: 40;
  /* بالای هر ستون باز می‌شود؛ موقعیتِ دقیقش را بلوکِ .mn-lv-slot پایین‌تر می‌گذارد */
  display: flex; flex-direction: column; gap: 7px;
  width: min(258px, 78vw); padding: 11px 12px;
  border: 1px solid rgba(255, 255, 255, .1); border-radius: 12px;
  background: #17233a; color: rgba(255, 255, 255, .94);
  box-shadow: 0 16px 36px rgba(15, 26, 47, .24);
  direction: rtl; text-align: right; white-space: normal;
  visibility: hidden; opacity: 0; pointer-events: none;
  transform: translate(-50%, -4px);
  transition: opacity .16s ease, visibility .16s ease, transform .16s ease;
}
.mn-lv-pop::before {
  content: ""; position: absolute; bottom: 100%; left: var(--arrow, 50%); margin-left: -6px;
  border: 6px solid transparent; border-bottom-color: #17233a;
}
.mn-lv-stat:hover > .mn-lv-pop,
.mn-lv-stat:focus-visible > .mn-lv-pop { visibility: visible; opacity: 1; transform: translate(-50%, 0); }
/* پاپ‌آپِ ستون بالای سرِ میله می‌ایستد (پایینِ نمودار از کادر بیرون می‌افتاد و دیده
   نمی‌شد) و فلشش رو به پایین، وسطِ همان ستون است. جای کادر را monthlyLevelPlacePop
   هنگام هاور می‌گذارد (چون عرضِ ستون 1fr است)، پس اینجا transform فقط عمودی است. */
.mn-lv-slot > .mn-lv-pop {
  display: none; top: var(--pop-top, auto); bottom: var(--pop-bottom, calc(var(--h, 0%) + 38px));
  left: var(--pop-left, 50%); right: auto; transform: translate(var(--pop-tx, -50%), 4px);
}
.mn-lv-col:hover .mn-lv-slot > .mn-lv-pop,
.mn-lv-col:focus-visible .mn-lv-slot > .mn-lv-pop {
  display: flex; visibility: visible; opacity: 1; transform: translate(var(--pop-tx, -50%), 0);
}
.mn-lv-slot > .mn-lv-pop::before {
  top: 100%; bottom: auto;
  border-bottom-color: transparent; border-top-color: #17233a;
}
.mn-lv-pop > b { color: #fff; font-size: 10.75px; font-weight: 900; line-height: 1.7; }
.mn-lv-pop-meta { color: rgba(255, 255, 255, .66); font-size: 9.5px; font-weight: 650; }
.mn-lv-pop-list {
  display: flex; flex-direction: column; gap: 5px; padding-top: 6px;
  border-top: 1px solid rgba(255, 255, 255, .12);
}
.mn-lv-pop-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.mn-lv-pop-name { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.mn-lv-pop-name > b { color: rgba(255, 255, 255, .92); font-size: 10px; font-weight: 850; }
.mn-lv-pop-num { display: flex; align-items: center; gap: 7px; flex: none; }
.mn-lv-pop-num > i { color: rgba(255, 255, 255, .55); font-size: 9px; font-style: normal; font-weight: 700; white-space: nowrap; }
.mn-lv-pop-num > b { font-size: 11px; font-weight: 950; }
.mn-lv-pop-num > b.tone-hot { color: #ff8b7e; }
.mn-lv-pop-num > b.tone-warm { color: #f6cf6a; }
.mn-lv-pop-num > b.tone-cool { color: #7fd6a5; }
.mn-lv-pop-num > b.tone-none { color: rgba(255, 255, 255, .45); }
.mn-lv-pop-empty,
.mn-lv-pop-cap { color: rgba(255, 255, 255, .55); font-size: 9px; font-weight: 650; }
.mn-lv-pop-cap { margin-bottom: 1px; }
.mn-lv-pop-sm { width: min(230px, 78vw); font-size: 9.5px; font-weight: 650; line-height: 1.9; }
.mn-lv-stat { position: relative; }
.mn-lv-stat.has-pop { cursor: help; }
@media (max-width: 720px) {
  .mn-lv-canvas { --plot: 200px; }
  .mn-lv-chart { padding-inline: var(--space-2); }
  .mn-lv-cols { gap: var(--space-1); }
  .mn-lv-bar { width: 22px; }
  .mn-lv-tag { flex-direction: column; gap: var(--space-1); text-align: center; }
  .mn-lv-tag-copy { align-items: center; max-width: 100%; }
  .mn-lv-logo-box {
    width: 26px !important; height: 26px !important;
    min-width: 26px; min-height: 26px; max-width: 26px; max-height: 26px; border-radius: 9px;
  }
}

/* سؤال‌های منتخبِ پنل کاربر */
.mn-picked-toolbar { gap: var(--space-2) var(--space-3); padding: var(--space-2) var(--space-3); border-radius: 12px; }
.mn-picked-toolbar .mn-found {
  padding: var(--space-1) var(--space-2); border: 1px solid var(--line); border-radius: 8px; background: var(--panel-soft);
}
.mn-picked-toolbar .sbank-search {
  flex: 0 1 390px; width: min(390px, 100%); max-width: 390px; margin-inline-start: auto;
}
.mn-picked-list .sq-item {
  overflow: hidden; border-color: #e5dccf; border-radius: 17px; background: #fff;
  box-shadow: 0 8px 25px rgba(67, 52, 35, .04);
}
.mn-picked-list .sq-main { padding-top: 15px; }
.mn-picked-list .sq-item-head { min-height: 36px; padding-bottom: 10px; border-bottom: 1px solid #f0e9df; }
.mn-picked-list .sq-rail {
  width: 122px; border-inline-start-color: #eee4d8;
  background: linear-gradient(180deg, #fffaf6 0%, #fbfaf7 100%);
}
.mn-picked-list .sq-rail-cell { min-height: 92px; padding: 11px 8px; gap: 5px; }
.mn-picked-list .sq-rail-cell + .sq-rail-cell { border-top-color: #eee4d8; }
.mn-picked-list .sq-src-icon {
  width: 46px !important; height: 46px !important; min-width: 46px; min-height: 46px; max-width: 46px; max-height: 46px;
  margin-bottom: 3px; border-radius: 13px;
}

/* پنل مدیریت */
.mn-admin-list { display: flex; flex-direction: column; gap: 10px; }
.mn-admin-row {
  display: grid; grid-template-columns: minmax(240px, 1fr) 118px minmax(350px, .9fr) 92px auto;
  align-items: center; gap: 10px; min-height: 52px; padding: 7px 11px; border-radius: 14px;
  background: #fff; border: 1px solid #e6dbcd; box-shadow: 0 7px 22px rgba(67, 52, 35, .045);
  transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}
.mn-admin-row:hover {
  border-color: #edb58e; box-shadow: 0 11px 28px rgba(101, 70, 42, .08); transform: translateY(-1px);
}
.mn-admin-main { min-width: 0; display: flex; align-items: center; gap: 7px; white-space: nowrap; }
.mn-admin-main > b { overflow: hidden; color: #2d2823; font-size: .91rem; font-weight: 900; text-overflow: ellipsis; white-space: nowrap; }
.mn-admin-main small {
  overflow: hidden; max-width: 150px; color: #988c7e; font-size: .65rem; font-weight: 700;
  text-overflow: ellipsis; white-space: nowrap;
}
.mn-admin-main small::before { content: "-"; margin-inline-end: 7px; color: #c8bdae; }
.mn-admin-scope {
  display: flex; align-items: center; justify-content: center; width: 118px; height: 30px; min-height: 30px;
  padding: 0 8px; border: 1px solid #e7dfd5; border-radius: 8px; box-sizing: border-box;
  background: #f7f3ed; color: #756a5e; font-size: .67rem; font-weight: 850; white-space: nowrap;
}
.mn-admin-stats { display: grid; grid-template-columns: repeat(4, minmax(72px, 1fr)); gap: 6px; min-width: 0; }
.mn-admin-stats i {
  display: flex; align-items: center; justify-content: space-between; gap: 6px; min-width: 0;
  height: 30px; min-height: 30px; padding: 0 7px; border: 1px solid #ebe3d8; border-radius: 8px; box-sizing: border-box;
  background: #faf8f5; color: #766b5f; font-style: normal;
}
.mn-admin-stats i small { overflow: hidden; color: #9a8f82; font-size: .62rem; font-weight: 750; text-overflow: ellipsis; white-space: nowrap; }
.mn-admin-stats i b { color: #5e554c; font-size: .79rem; font-weight: 900; white-space: nowrap; }
.mn-admin-stats i.on { border-color: #f3cfb5; background: #fff2e8; }
.mn-admin-stats i.on small, .mn-admin-stats i.on b { color: #bd4f0d; }
.mn-admin-stats i.lesson { grid-column: span 2; }
.mn-admin-stats i.lesson b { overflow: hidden; max-width: 140px; text-overflow: ellipsis; }
.mn-admin-status {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  width: 92px; height: 30px; min-height: 30px; padding: 0 8px; border: 1px solid transparent;
  border-radius: 8px; box-sizing: border-box; font-size: .67rem; font-weight: 850; white-space: nowrap;
}
.mn-admin-status::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.mn-admin-status.ok { border-color: #cfe9de; background: #edf8f3; color: #278460; }
.mn-admin-status.draft { border-color: #e6dfd5; background: #f5f2ed; color: #82776a; }
.mn-admin-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 5px; min-width: 0; }
.mn-admin-actions .mn-admin-quick-add { border-color: #acd1bd; color: #286b51; background: #f2faf5; }
.mn-workspace-actions { justify-content: flex-end; }
.mn-workspace-actions .mn-head-badge { flex-basis: 100%; justify-content: flex-end; }
.mn-admin-actions .secondary-button {
  height: 30px; min-height: 30px; padding: 0 8px; border-color: #e6d8c9; border-radius: 8px;
  box-sizing: border-box; color: #4e463e; background: #fff; font-size: .67rem; font-weight: 850; white-space: nowrap;
}
.mn-admin-actions .secondary-button:hover { border-color: #efad7e; color: #bd4f0d; background: #fff9f4; }
.mn-admin-actions .secondary-button .ui-icon { width: 15px; height: 15px; }
.mn-admin-actions > .row-action {
  width: 30px; height: 30px; margin: 0; border: 1px solid #e8dfd4; border-radius: 8px;
  min-height: 30px; padding: 0; box-sizing: border-box; background: #fff; color: #8a8074;
  box-shadow: 0 2px 7px rgba(67, 52, 35, .035);
}
.mn-admin-actions > .row-action:hover { border-color: #efb58b; background: #fff9f4; color: #c05212; box-shadow: 0 4px 10px rgba(67, 52, 35, .08); }
.mn-admin-actions > .row-action.danger:hover { border-color: #efc5bf; color: var(--red); background: #fff3f1; }
.mn-admin-actions > .row-action .ui-icon { width: 14px; height: 14px; }

.mn-lesson-tabs {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 16px; padding: 10px;
  border: 1px solid #e8dfd3; border-radius: 16px; background: rgba(255, 255, 255, .82);
  box-shadow: 0 8px 24px rgba(67, 52, 35, .035);
}
.mn-lesson-tab {
  display: inline-flex; align-items: center; gap: 7px; min-height: 36px; padding: 8px 14px; border-radius: 11px; cursor: pointer;
  background: #fff; border: 1px solid #e6ddd0; color: #4d463e; font-size: .8rem; font-weight: 800;
  transition: border-color .16s ease, background .16s ease, color .16s ease, transform .16s ease, box-shadow .16s ease;
}
.mn-lesson-tab b {
  min-width: 24px; padding: 2px 7px; border-radius: 999px;
  background: #f1eee8; color: #817668; font-size: .69rem; font-weight: 900; text-align: center;
}
.mn-lesson-tab:hover { border-color: #efb78e; background: #fffaf6; color: #b64e12; transform: translateY(-1px); }
.mn-lesson-tab.on {
  background: linear-gradient(135deg, #ff7a2b, var(--orange)); border-color: var(--orange); color: #fff;
  box-shadow: 0 7px 16px rgba(255, 107, 24, .2);
}
.mn-lesson-tab.on b { background: rgba(255, 255, 255, .2); color: #fff; }

.mn-pick-card {
  overflow: hidden; border: 1px solid #e5dccf; border-radius: 17px; background: #fff;
  box-shadow: 0 8px 26px rgba(67, 52, 35, .045);
  transition: border-color .18s ease, box-shadow .18s ease;
}
.mn-pick-card.on { border-color: #f0a36d; box-shadow: 0 0 0 2px rgba(255, 107, 24, .1), 0 10px 30px rgba(80, 54, 30, .07); }
.mn-pick-card .sq-item { border: 0; border-radius: 0; background: #fff; }
.mn-pick-card .sq-main { padding-top: 14px; }
.mn-pick-card .sq-item-head {
  min-height: 41px; margin: -2px 0 14px; padding-bottom: 11px; border-bottom: 1px solid #f0e9df;
}
.mn-pick-card .sq-num {
  width: auto; min-width: 33px; height: 29px; padding: 0 9px;
  border: 1px solid #e9ded0; border-radius: 9px; background: #faf7f2; color: #5f574d; font-weight: 900;
}
.mn-pick-action {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 34px;
  margin-inline-start: auto; padding: 7px 13px; border: 1px solid var(--orange); border-radius: 10px;
  background: linear-gradient(135deg, #ff7a2b, var(--orange)); color: #fff;
  font: inherit; font-size: 11px; font-weight: 900; cursor: pointer;
  box-shadow: 0 6px 14px rgba(255, 107, 24, .18);
  transition: transform .16s var(--ease-soft), box-shadow .16s ease, background .16s ease, border-color .16s ease;
}
.mn-pick-action .ui-icon { width: 15px; height: 15px; }
.mn-pick-action:hover { transform: translateY(-1px); box-shadow: 0 9px 20px rgba(255, 107, 24, .25); }
.mn-pick-action.on {
  border-color: #92d4c7; background: #eaf8f4; color: #168878;
  box-shadow: 0 5px 13px rgba(22, 136, 120, .1);
}
.mn-pick-action.on:hover { border-color: #6fc3b2; box-shadow: 0 8px 18px rgba(22, 136, 120, .15); }
.mn-pick-card .sq-rail {
  width: 122px; border-inline-start-color: #eee4d8;
  background: linear-gradient(180deg, #fffaf6 0%, #fbfaf7 100%);
}
.mn-pick-card .sq-rail-cell { min-height: 92px; padding: 11px 8px; gap: 5px; }
.mn-pick-card .sq-rail-cell + .sq-rail-cell { border-top-color: #eee4d8; }
.mn-pick-card .sq-src-icon {
  width: 46px !important; height: 46px !important; min-width: 46px; min-height: 46px; max-width: 46px; max-height: 46px;
  margin-bottom: 3px; border-radius: 13px; box-shadow: 0 5px 12px rgba(72, 52, 31, .06);
}
.mn-pick-card .sq-rail-cell b { font-size: 10.5px; }
.mn-pick-card .sq-rail-cell small { font-size: 9px; }

/* مودال‌های ماهنامه */
.mn-folders-body { display: flex; flex-direction: column; gap: 10px; }
.mn-folder-search { width: 100%; }
.mn-ftree { max-height: 46vh; overflow: auto; padding: 8px; border-radius: 12px; border: 1px solid var(--border); }
.mn-fcounts { display: flex; align-items: center; gap: 6px; flex: 0 0 auto; }
.mn-fcounts b { font-size: .72rem; font-weight: 800; color: var(--primary); }
.mn-fcounts i { font-style: normal; font-size: .7rem; color: var(--muted); }
.mn-folder-foot {
  display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 9px 12px;
  border-radius: 12px; background: color-mix(in srgb, var(--primary) 7%, transparent); font-size: .82rem;
}
/* مودالِ «مدیرانِ این شماره»: راست = جست‌وجو و افزودن، چپ = مدیرانِ افزوده با تیکِ درس.
   هر ستون اسکرولِ خودش را دارد و تیکِ درس فقط همان کارت را عوض می‌کند (بی‌پرش). */
.modal.mn-access-modal { width: min(1040px, 96vw); }
.mn-access-body {
  --primary: var(--orange);
  display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: 14px; align-items: start;
}
.mn-acc-intro { grid-column: 1 / -1; display: flex; flex-direction: column; gap: 10px; }
.mn-acc-intro p { margin: 0; color: var(--muted); font-size: .82rem; line-height: 1.8; }
.mn-acc-intro p b { color: var(--ink); }
.mn-acc-coverage { display: flex; flex-wrap: wrap; gap: 6px; }
.mn-acc-cov {
  display: inline-flex; align-items: center; gap: 6px; padding: 5px 11px; border-radius: 999px; font-size: .76rem;
  color: var(--teal); background: var(--teal-soft); border: 1px solid color-mix(in srgb, var(--teal) 22%, transparent);
}
.mn-acc-cov b { color: var(--ink); font-weight: 800; }
.mn-acc-cov.empty { color: var(--red); background: var(--red-soft); border-color: color-mix(in srgb, var(--red) 24%, transparent); }
.mn-acc-col {
  display: flex; flex-direction: column; min-width: 0; border: 1px solid var(--line); border-radius: 16px;
  background: var(--panel-soft); overflow: hidden; height: min(62vh, 600px);
}
.mn-acc-col-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 12px 14px 8px; }
.mn-acc-col-head h3 { display: flex; align-items: center; gap: 7px; margin: 0; font-size: .92rem; }
.mn-acc-col-head h3 .ui-icon { width: 17px; height: 17px; color: var(--primary); }
.mn-acc-count { min-width: 26px; padding: 2px 9px; border-radius: 999px; background: var(--orange-soft); color: var(--primary); font-weight: 800; font-size: .78rem; text-align: center; }
.mn-acc-search {
  display: flex; align-items: center; gap: 8px; margin: 0 12px 10px; padding: 0 12px; height: 42px;
  border-radius: 12px; border: 1px solid var(--line); background: var(--panel);
}
.mn-acc-search:focus-within { border-color: var(--primary); box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 16%, transparent); }
.mn-acc-search .ui-icon { width: 17px; height: 17px; color: var(--muted); flex: none; }
.mn-acc-search input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; color: var(--ink); font: inherit; font-size: .88rem; }
.mn-acc-list {
  display: flex; flex-direction: column; gap: 8px; padding: 0 12px 12px;
  flex: 1; min-height: 0; overflow: auto; overscroll-behavior: contain;
}
.mn-acc-avatar { width: 34px; height: 34px; flex: none; }
.mn-acc-who { display: flex; flex-direction: column; min-width: 72px; flex: 1; gap: 1px; text-align: start; }
.mn-acc-who strong { font-size: .86rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mn-acc-who small { color: var(--muted); font-size: .72rem; text-align: right; }
.mn-acc-global {
  flex: none; max-width: 46%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  padding: 2px 8px; border-radius: 999px; font-size: .7rem; font-weight: 800; font-style: normal;
  background: var(--orange-soft); color: var(--primary);
}
.mn-acc-cand {
  display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px 10px; border-radius: 12px; cursor: pointer;
  border: 1px solid var(--line); background: var(--panel); color: var(--ink); font: inherit;
  transition: border-color var(--motion-fast) ease, background var(--motion-fast) ease;
}
.mn-acc-cand:hover, .mn-acc-cand:focus-visible { border-color: color-mix(in srgb, var(--primary) 45%, transparent); background: color-mix(in srgb, var(--primary) 5%, var(--panel)); outline: 0; }
.mn-acc-add {
  display: inline-flex; align-items: center; gap: 4px; flex: none; padding: 5px 10px; border-radius: 9px;
  font-size: .76rem; font-weight: 800; color: var(--primary); background: var(--orange-soft);
}
.mn-acc-add .ui-icon { width: 14px; height: 14px; }
.mn-acc-cand:hover .mn-acc-add { background: var(--primary); color: #fff; }
.mn-acc-none { margin: 6px 4px 10px; color: var(--muted); font-size: .8rem; text-align: center; }
.mn-acc-card {
  padding: 10px 12px; border-radius: 14px; border: 1px solid color-mix(in srgb, var(--primary) 30%, var(--line));
  background: var(--panel);
}
.mn-acc-card header { display: flex; align-items: center; gap: 10px; }
.mn-acc-card.needs { border-color: color-mix(in srgb, var(--red) 45%, transparent); }
.mn-acc-card.suspended { border-color: var(--line); opacity: .72; }
.mn-acc-card.flash { animation: mn-acc-flash 1.2s ease; }
@keyframes mn-acc-flash { 0%, 40% { box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 35%, transparent); } 100% { box-shadow: 0 0 0 0 transparent; } }
.mn-acc-suspended { flex: none; padding: 2px 8px; border-radius: 999px; font-size: .7rem; font-style: normal; font-weight: 800; color: var(--red); background: var(--red-soft); }
.mn-acc-all {
  flex: none; padding: 4px 9px; border-radius: 8px; border: 1px solid var(--line); background: transparent;
  color: var(--muted); font: inherit; font-size: .72rem; cursor: pointer;
}
.mn-acc-all:hover { color: var(--primary); border-color: var(--primary); }
.mn-acc-remove {
  flex: none; display: grid; place-items: center; width: 30px; height: 30px; border-radius: 9px; cursor: pointer;
  border: 0; background: transparent; color: var(--muted);
}
.mn-acc-remove:hover { background: var(--red-soft); color: var(--red); }
.mn-acc-remove .ui-icon { width: 15px; height: 15px; }
.mn-acc-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.mn-acc-chip {
  position: relative; display: inline-flex; align-items: center; gap: 6px; padding: 6px 11px; border-radius: 999px; cursor: pointer;
  font-size: .8rem; border: 1px solid var(--line); background: var(--panel-soft); color: var(--ink); user-select: none;
}
.mn-acc-chip input { position: absolute; opacity: 0; pointer-events: none; width: 1px; height: 1px; }
.mn-acc-chip::before {
  content: ""; display: grid; place-items: center; width: 15px; height: 15px; border-radius: 5px; flex: none;
  border: 1.5px solid color-mix(in srgb, var(--muted) 70%, transparent); background: var(--panel);
  font-size: 11px; font-weight: 900; line-height: 1;
}
.mn-acc-chip.on { background: var(--primary); border-color: var(--primary); color: #fff; }
.mn-acc-chip.on::before { content: "✓"; border-color: #fff; background: #fff; color: var(--primary); }
.mn-acc-chip:has(input:focus-visible) { outline: 2px solid var(--primary); outline-offset: 2px; }
.mn-acc-chip:has(input:disabled) { cursor: not-allowed; }
.mn-acc-chip small { font-size: .7rem; font-weight: 800; opacity: .7; }
.mn-acc-need { margin: 8px 2px 0; color: var(--red); font-size: .76rem; font-weight: 700; }
.mn-acc-need.muted { color: var(--muted); font-weight: 500; }
.mn-acc-empty { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 30px 10px; text-align: center; color: var(--muted); }
.mn-acc-empty .ui-icon { width: 30px; height: 30px; opacity: .6; }
.mn-acc-empty p { margin: 4px 0 0; color: var(--ink); font-weight: 700; font-size: .86rem; }
.mn-acc-empty small { font-size: .76rem; }
.mn-acc-summary { margin-inline-end: auto; font-size: .82rem; color: var(--muted); }
.mn-acc-summary b { color: var(--ink); }
.mn-acc-summary .warn { color: var(--red); font-weight: 700; }
@media (max-width: 760px) {
  .mn-access-body { grid-template-columns: 1fr; }
  .mn-acc-col { height: auto; }
  .mn-acc-pick .mn-acc-list { max-height: 38vh; }
  .mn-acc-global { display: none; }
  .mn-acc-summary { flex-basis: 100%; }
  .mn-access-modal .modal-footer { flex-wrap: wrap; }
}

@media (max-width: 1080px) {
  .mn-layout { grid-template-columns: 1fr; }
  /* grid-row: auto لازم است؛ وگرنه هر دو در ردیف ۱ می‌مانند و نوار کناری روی فهرست می‌افتد */
  .mn-main, .mn-side { grid-column: 1; grid-row: auto; }
  .mn-side { position: static; max-height: none; order: -1; }
}
@media (max-width: 1480px) {
  .mn-admin-row { grid-template-columns: minmax(180px, 1fr) 118px 92px; }
  .mn-admin-stats { grid-column: 1 / 3; grid-row: 2; }
  .mn-admin-status { grid-column: 3; grid-row: 1; }
  .mn-admin-actions { grid-column: 1 / -1; grid-row: 3; }
}
@media (max-width: 720px) {
  .mn-admin-row { grid-template-columns: minmax(0, 1fr) auto; gap: 10px; }
  .mn-admin-main { grid-column: 1 / -1; }
  .mn-admin-scope { width: auto; }
  .mn-admin-status { grid-column: 2; grid-row: 2; }
  .mn-admin-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-column: 1 / -1; grid-row: auto; }
  .mn-admin-actions { grid-column: 1 / -1; grid-row: auto; justify-content: flex-start; }
  .mn-workspace-actions { justify-content: flex-start; }
  .mn-toolbar { gap: 8px; }
  .mn-toolbar-title { width: 100%; padding: 0 0 8px; border-inline-end: 0; border-bottom: 1px solid #eee6dc; }
  .mn-admin-toolbar .seg-group, .mn-toolbar .sbank-search { flex: 1 1 100%; max-width: none; }
  .mn-admin-toolbar .seg { flex: 1 1 0; }
  .mn-admin-toolbar .mn-found { margin-inline-start: 0; }
  .mn-picked-toolbar .sbank-search { flex: 1 1 100%; width: 100%; max-width: none; margin-inline-start: 0; order: 3; }
  .mn-ex-panel-head { align-items: flex-start; }
  .mn-ex-available { justify-self: start; }
  .mn-ex-node .eb-badges { padding-inline-start: 0; }
  .mn-ex-node .eb-join { margin-inline-start: 0; }
  .mn-pick-action span { display: none; }
  .mn-pick-action { width: 34px; padding: 0; }
  .mn-pick-card .sq-rail { width: 105px; }
  .mn-picked-list .sq-rail { width: 105px; }
}



.tm-tool-content { min-width:0; }
.tm-radar-card { min-width:0; padding:20px; }
@keyframes tm-spin { to { transform:rotate(360deg); } }
.tm-empty { display:flex; flex-direction:column; align-items:center; gap:8px; padding:28px 16px; color:#877f75; text-align:center; }
.tm-empty > span,.tm-empty span svg { width:32px; height:32px; color:#b9b0a3; }
.tm-empty h2 { margin:0; color:#38322c; font-size:15px; font-weight:950; }
.tm-empty p { max-width:480px; margin:0; font-size:11px; line-height:1.85; }
.tm-empty.small { padding:20px; }

/* نقشهٔ کامل مباحث */
.tm-map-browser { display:grid; gap:11px; padding-top:13px; }
.tm-crumbs { min-height:27px; display:flex; align-items:center; flex-wrap:wrap; gap:4px; }
.tm-crumb {
  min-height:27px; display:inline-flex; align-items:center; gap:5px; padding:3px 9px; border:1px solid #e5ddd2; border-radius:8px;
  color:#665f56; background:#fff; font:inherit; font-size:10.5px; font-weight:850; cursor:pointer; transition:all .14s ease;
}
.tm-crumb svg { width:12px; height:12px; }
.tm-crumb:hover { border-color:#e7b995; color:#b55422; background:#fff8f2; }
.tm-crumb.current { border-color:#3b342e; color:#fff; background:#3b342e; cursor:default; }
.tm-crumb-sep { width:15px; height:15px; display:grid; place-items:center; color:#b8afa4; }
.tm-crumb-sep svg { width:10px; height:10px; }
.tm-bar { display:flex; flex-wrap:wrap; align-items:stretch; gap:6px; padding:6px; border:1px solid #ece4d8; border-radius:14px; background:#f4f0e9; }
/* نوار چندردیفه: نگه‌دارنده ستون ردیف‌هاست و دکمهٔ بازگشت بیرون آن می‌ماند. */
.tm-bar.tm-pack { flex-wrap:nowrap; }
.tm-pack-rows { flex:1 1 auto; min-width:0; display:flex; flex-wrap:wrap; align-items:stretch; gap:6px; }
.tm-pack-rows.is-packed { flex-direction:column; flex-wrap:nowrap; }
/* همهٔ ردیف‌ها هم‌ارتفاع‌اند؛ تفاوت مبحث‌ها فقط در طول است (پهنا = سهمشان از سؤال‌ها). */
.tm-pack-row { min-width:0; display:flex; align-items:stretch; justify-content:flex-start; gap:6px; height:var(--tm-row-h,58px); }
.tm-pack-row > .tm-seg { flex:var(--tm-grow,1) 1 0; width:auto; min-width:var(--tm-seg-min,54px); min-height:0; height:100%; }
.tm-seg {
  flex:var(--tm-grow) 1 190px; min-width:170px; min-height:52px; display:grid; grid-template-columns:minmax(0,1fr) minmax(64px,auto); align-items:center; gap:8px;
  padding:6px 9px; border:1px solid rgba(35,88,61,.08); border-radius:10px; color:#173b29; font:inherit; text-align:start; cursor:default;
  overflow:hidden; transition:transform .16s ease,box-shadow .16s ease,filter .16s ease,border-color .16s ease;
}
.tm-seg.drillable { cursor:pointer; }
.tm-seg.drillable:hover { z-index:2; transform:translateY(-2px); border-color:rgba(42,111,75,.28); box-shadow:0 9px 20px rgba(30,70,49,.14); filter:saturate(1.06); }
.tm-seg.untouched { border-color:#e4ddd3; color:#837b71!important; background:#f8f6f2!important; }
.tm-seg.untouched.drillable:hover { border-color:#e7b58d; color:#6b5442!important; background:#fff8f1!important; }
.tm-seg-copy { min-width:0; overflow:hidden; display:flex; flex-direction:column; align-items:flex-start; gap:4px; }
.tm-seg-level { padding:2px 5px; border-radius:5px; color:inherit; background:rgba(255,255,255,.42); font-size:9px; font-weight:850; }
.tm-seg-stats { min-width:64px; max-width:86px; overflow:hidden; display:grid; justify-items:end; gap:2px; text-align:left; }
.tm-seg-pct { direction:ltr; font-size:12px; font-weight:950; }
.tm-seg-label { display:block; width:100%; overflow:hidden; line-height:1.4; text-overflow:ellipsis; white-space:nowrap; font-size:13px; font-weight:950; }
.tm-seg-meta { max-width:100%; overflow:hidden; color:inherit; opacity:.76; font-size:9px; font-weight:750; text-overflow:ellipsis; white-space:nowrap; }
/* مبحث باریک تک‌ستونی می‌شود، ولی عنوان همیشه یک‌خطی است و اضافه‌اش سه‌نقطه می‌شود؛
   چیپ نام کتاب هم هرگز حذف نمی‌شود تا همهٔ باکس‌های یک ردیف یک‌شکل بمانند. */
.tm-seg-slim { grid-template-columns:minmax(0,1fr); align-content:center; gap:2px; padding:5px 7px; }
.tm-seg-slim .tm-seg-copy { flex-direction:row; align-items:center; gap:5px; }
.tm-seg-slim .tm-seg-level { flex:none; max-width:46%; overflow:hidden; font-size:8px; text-overflow:ellipsis; white-space:nowrap; }
.tm-seg-slim .tm-seg-label { font-size:11px; }
.tm-seg-slim .tm-seg-stats { min-width:0; max-width:none; display:flex; align-items:baseline; justify-content:flex-start; gap:6px; text-align:start; }
.tm-seg-slim .tm-seg-pct { font-size:10.5px; }
.tm-seg-slim .tm-seg-meta { font-size:8px; }
.tm-seg-tight { padding:4px 5px; }
.tm-seg-tight .tm-seg-copy { flex-direction:column; align-items:flex-start; gap:1px; }
.tm-seg-tight .tm-seg-level { max-width:100%; padding:1px 4px; font-size:7.5px; }
.tm-seg-tight .tm-seg-meta { display:none; }
.tm-seg-tight .tm-seg-label { font-size:10px; }
.tm-seg-tight .tm-seg-pct { font-size:9.5px; }
.tm-seg-mini { padding:3px 4px; }
.tm-seg-mini .tm-seg-label { font-size:8.5px; }
.tm-seg-mini .tm-seg-level { padding:1px 3px; font-size:7px; }
.tm-seg-mini .tm-seg-pct { font-size:8.5px; }
.tm-hint { display:flex; align-items:center; gap:5px; color:#8c8378; font-size:10px; font-weight:750; }
.tm-hint svg { width:12px; height:12px; }

/* در سطح درس، فصل‌های هر کتاب مستقیماً در یک نوار مستقل و متناسب با تعداد سؤال می‌آیند. */
.tm-book-chapter-list { display:grid; gap:8px; }
.tm-book-chapter-row {
  min-width:0; padding:6px; border:1px solid #e9e0d4; border-radius:13px; background:#fbf9f5;
}
.tm-book-chapter-bar { min-width:0; }
.tm-book-chapter-bar .tm-seg-level { max-width:100%; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.tm-book-row-back {
  flex:0 0 34px; min-width:34px; align-self:stretch; display:grid; place-items:center; padding:0; border:1px solid #e5d9cb;
  border-radius:9px; color:#b55a29; background:#fffaf5; cursor:pointer; transition:border-color .15s ease,background .15s ease;
}
.tm-book-row-back:hover { border-color:#ef9b69; background:#fff3e9; }
.tm-book-row-back svg { width:14px; height:14px; }
.tm-book-chapter-empty { min-height:58px; display:flex; align-items:center; gap:8px; padding:8px 12px; border-radius:10px; color:#958c81; background:#f6f3ee; font-size:10px; font-weight:750; }
.tm-book-chapter-empty .tm-book-row-back { margin-inline-start:auto; align-self:center; min-height:34px; }

/* نمودار مقایسه‌ای سلسله‌مراتبی */
/* ── نوار انتخاب گروه مقایسه (همه / یک پله بالاتر / هم‌سطح / یک پله پایین‌تر) ── */
.tm-group-switch {
  display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); align-items:stretch; gap:7px; margin-top:12px;
  padding:7px; border:1px solid #eee7dd; border-radius:13px; background:#fbf8f4;
}
.tm-group-switch > button {
  min-width:0; min-height:36px; display:grid; place-items:center; padding:7px 9px;
  border:1px solid transparent; border-radius:10px; color:#6d6459; background:#fff;
  font:inherit; text-align:center; cursor:pointer;
  transition:border-color .14s ease,background .14s ease,color .14s ease;
}
.tm-group-switch > button b { font-size:13px; font-weight:950; }
.tm-group-switch > button:hover { border-color:#f0c8a6; background:#fff9f3; }
.tm-group-switch > button.on { border-color:var(--orange); color:#a8511a; background:#fff2e6; }
.tm-group-empty {
  display:flex; align-items:center; gap:7px; margin-top:9px; padding:9px 12px;
  border:1px solid #f0dcc4; border-radius:11px; background:#fdf6ec; color:#8a6534;
  font-size:11px; font-weight:800;
}
.tm-group-empty svg { width:14px; height:14px; flex:none; }
/* رنگ دو سریِ نمودار. تا نسخهٔ ۲۰۲۶-۰۸-۱۶ این دو متغیر هیچ‌جا تعریف نشده بودند، پس
   `stroke/fill:var(--tm-blue)` بی‌اعتبار می‌شد و هر دو چندضلعی مشکیِ یک‌شکل درمی‌آمدند. */
:root {
  --tm-blue: #2f6fed;
  --tm-blue-soft: #eaf1ff;
  --tm-red: #e0344b;
  --tm-red-soft: #ffeef0;
}
.tm-radar-controls { min-height:34px; display:flex; align-items:center; gap:9px; padding:8px 0 2px; }
.tm-back { min-height:32px; display:inline-flex; align-items:center; gap:4px; padding:4px 11px; border:1px solid #e3d9cc; border-radius:8px; color:#5f574f; background:#fff; font:inherit; font-size:12px; font-weight:900; cursor:pointer; }
.tm-back:hover { border-color:#e6ad83; color:#b55321; background:#fff8f2; }
.tm-back svg { width:12px; height:12px; }
.tm-radar-trail { min-width:0; overflow:hidden; color:#8d847a; font-size:12px; font-weight:800; text-overflow:ellipsis; white-space:nowrap; }
/* نمودار تنها محتوای صحنه است؛ کارت‌های تکراریِ کنار آن حذف شده‌اند. */
.tm-radar-stage { min-width:0; display:block; padding:6px 0 4px; direction:ltr; }
.tm-radar-visual { width:100%; min-width:0; display:grid; place-items:center; direction:rtl; }
/* سقفِ ارتفاع به بلندیِ پنجره گره خورده تا کلِ کارت یک‌جا در صفحه دیده شود؛ وگرنه روی
   نمایشگرِ کوتاه، نمودار پایینِ صفحه می‌افتاد و باید اسکرول می‌شد. پهنا از همین سقف و
   نسبتِ واقعیِ viewBox (`--tm-radar-ar`، از خودِ topicRadarSvg) درمی‌آید — نه از
   `max-height` — چون آن یکی SVG را داخل کادرش letterbox می‌کرد و فضای خالی را از
   بالا و پایین به پهلوها منتقل می‌کرد. */
.tm-radar-svg {
  --tm-radar-cap: min(520px, max(320px, calc(92vh - 230px)));   /* ۲۳۰px = ارتفاعِ اندازه‌گیری‌شدهٔ سربرگ+کلیدِ گروه+نوارِ مسیر+پاورقیِ همین کارت */
  width:min(100%, 720px, calc(var(--tm-radar-cap) * var(--tm-radar-ar, 1.58)));
  height:auto; display:block; margin:auto; overflow:visible;
}
/* شبکهٔ دایره‌ای؛ حلقهٔ صفر پررنگ‌تر است چون کفِ نمرهٔ مثبت همان‌جاست، نه مرکز. */
.tm-radar-ring { fill:none; stroke:#ebe3d8; stroke-width:1; }
.tm-radar-ring.zero { stroke:#d6ccbd; stroke-dasharray:4 3; }
.tm-radar-ring.edge { stroke:#ddd3c5; stroke-width:1.2; }
/* حلقهٔ کفِ مقیاس: پایین‌ترین جایی که یک رأس می‌تواند بنشیند. */
.tm-radar-ring.floor { stroke:#efe8de; }
/* نقطهٔ مرکز — لنگرِ دیداریِ نمودار، هم‌رنگِ شبکه نه هم‌رنگِ داده. */
.tm-radar-origin { fill:#d9cfc0; stroke:none; pointer-events:none; }
.tm-radar-spoke { fill:none; stroke:#efe8de; stroke-width:1; }
.tm-radar-tick {
  fill:#a2988b; font-size:9px; font-weight:900; direction:ltr; pointer-events:none;
  paint-order:stroke; stroke:#fff; stroke-width:3.4; stroke-linejoin:round;
}
/* سطح و لبه از هم جدا شده‌اند: لبه‌ها خط‌به‌خط کشیده می‌شوند تا ضلعی که از روی مبحثِ
   بی‌پاسخ می‌پرد بتواند چین‌چین باشد. */
.tm-radar-area { stroke:none; fill-opacity:.15; }
.tm-radar-area.user { fill:var(--tm-blue); }
.tm-radar-area.cohort { fill:var(--tm-red); }
.tm-radar-edge { fill:none; stroke-width:2.4; stroke-linecap:round; }
.tm-radar-edge.user { stroke:var(--tm-blue); }
.tm-radar-edge.cohort { stroke:var(--tm-red); }
.tm-radar-edge.bridged { stroke-dasharray:5 4.5; opacity:.45; }
/* دو سری با دو شکل هم از هم جدا می‌شوند: دایره = من، مربع = گروه. */
.tm-radar-dot { stroke:#fff; stroke-width:1.5; pointer-events:none; }
.tm-radar-dot.user { fill:var(--tm-blue); }
.tm-radar-dot.cohort { fill:var(--tm-red); }
/* هدفِ موس قطاعِ محور است، نه نقطهٔ ۴پیکسلیِ روی آن. */
.tm-radar-wedge { fill:transparent; stroke:none; pointer-events:all; cursor:default; transition:fill .12s ease; }
.tm-radar-wedge:hover { fill:rgba(255,107,24,.06); }
.tm-radar-wedge.drillable { cursor:pointer; }
/* حفرهٔ مرکزی مالِ گرهٔ جاری است؛ همهٔ محورهای بی‌داده روی مرکز جمع می‌شوند. */
.tm-radar-core { fill:transparent; stroke:none; pointer-events:all; cursor:default; transition:fill .12s ease; }
.tm-radar-core:hover { fill:rgba(59,52,46,.06); }
.tm-radar-core.up { cursor:pointer; }
/* `bounding-box` لازم است: با پیش‌فرضِ visiblePainted فقط خودِ گلیف‌ها هدف‌اند، پس در
   عنوانِ چندسطری، فاصلهٔ بین سطرها هاور را از دست می‌داد. */
.tm-radar-axis { fill:#4c453d; font-weight:850; cursor:default; pointer-events:bounding-box; }
.tm-radar-axis.blank { fill:#a79e93; }
/* خط راهنما: برچسبی که برای جلوگیری از هم‌پوشانی جابه‌جا شده را به نوکِ محورش وصل می‌کند */
.tm-radar-leader { fill:none; stroke:#cdc1b1; stroke-width:1; stroke-linejoin:round; stroke-linecap:round; }
.tm-radar-axis.drillable { cursor:pointer; text-decoration:underline; text-decoration-style:dotted; text-decoration-color:#c9bdab; text-underline-offset:3px; }
.tm-radar-axis.drillable:hover { fill:#d0561a; text-decoration-color:#f0a271; }
/* پاورقی فقط راهنمای دو سری است؛ پانویسِ توضیحی حذف شد. */
.tm-radar-footer { display:grid; margin-top:12px; padding-top:12px; border-top:1px solid #eee7de; }
.tm-radar-legend {
  justify-self:center; display:inline-flex; align-items:center; flex-wrap:wrap; gap:8px 18px;
  padding:8px 14px; border:1px solid #e9e1d6; border-radius:12px; background:#fdfbf7;
}
.tm-radar-legend span { display:inline-flex; align-items:center; gap:7px; color:#4c453d; font-size:12.5px; font-weight:900; }
.tm-radar-legend i { width:11px; height:11px; border:2px solid #fff; box-shadow:0 0 0 1px currentColor; }
.tm-radar-legend .user { color:var(--tm-blue); }
.tm-radar-legend .cohort { color:var(--tm-red); }
.tm-radar-legend .user i { border-radius:999px; background:var(--tm-blue); }
.tm-radar-legend .cohort i { border-radius:2px; background:var(--tm-red); }

/* نمودار میله‌ای برای سطح‌های یک یا دو گزینه‌ای — و جایگزینِ رادار روی نمایشگر باریک */
.tm-radar-stage:has(> .tm-radar-bars) { display:block; min-height:0; }
.tm-radar-bars { width:100%; display:grid; gap:7px; padding-top:7px; direction:rtl; }
.tm-radar-bars.narrow-only { display:none; }
.tm-rb-row {
  width:100%; min-height:56px; display:grid; grid-template-columns:minmax(120px,1.1fr) minmax(180px,2fr) minmax(180px,2fr) auto;
  align-items:center; gap:10px; padding:7px 9px; border:1px solid #eae2d8; border-radius:10px; color:#4b443d; background:#fff; font:inherit; text-align:start;
}
.tm-rb-row.drillable { cursor:pointer; transition:border-color .14s ease,background .14s ease,transform .14s ease; }
.tm-rb-row.drillable:hover { border-color:#efb88f; background:#fff9f3; transform:translateX(-2px); }
.tm-rb-row:disabled { opacity:.82; }
.tm-rb-name { min-width:0; font-size:14px; font-weight:950; }
.tm-rb-name small { display:block; margin-top:2px; color:#8f867c; font-size:11px; font-weight:750; }
.tm-rb-series { display:grid; grid-template-columns:48px minmax(0,1fr) 50px; align-items:center; gap:7px; }
.tm-rb-series > small { color:#877e73; font-size:11.5px; font-weight:800; }
.tm-rb-track { height:9px; overflow:hidden; border-radius:999px; background:#eee8df; direction:ltr; }
.tm-rb-track i { display:block; height:100%; border-radius:inherit; }
.tm-rb-track i.user { background:var(--tm-blue); }
.tm-rb-track i.cohort { background:var(--tm-red); }
.tm-rb-val { direction:ltr; font-size:12px; font-weight:950; text-align:left; }
.tm-rb-val.user { color:var(--tm-blue); }
.tm-rb-val.cohort { color:var(--tm-red); }
.tm-rb-coverage { display:inline-flex; align-items:center; gap:4px; color:#8a8177; font-size:11.5px; font-weight:800; white-space:nowrap; }
.tm-rb-coverage svg { width:11px; height:11px; color:#d16b35; }

/* ===== لانهٔ زنبوریِ بخش‌های درس (tm-hive-*) ===== */
/* هر خانه یک بخش است و پررنگی‌اش «چقدر تست زده» را می‌گوید. رنگ از همان رمپِ سبزِ
   نقشهٔ تسلط می‌آید (topicCoverageColor) تا دو کارتِ همسایه یک زبان رنگی داشته باشند. */
.spx-card.hive { display:flex; flex-direction:column; }
.tm-hive-tools { display:flex; align-items:center; justify-content:space-between; gap:10px; flex-wrap:wrap; padding-bottom:10px; }
.tm-hive-crumbs { min-width:0; flex:1 1 190px; }
.tm-hive-metric { flex:0 0 auto; }
.tm-hive-metric button { min-height:29px; padding:0 9px; font-size:10.5px; white-space:nowrap; }
.tm-hive {
  flex:1 1 auto; min-width:0; display:grid; place-items:center; align-content:center;
  padding:10px 4px; border:1px solid #f0e9df; border-radius:14px; background:#fdfbf7;
}
/* سقفِ ارتفاع از نسبتِ واقعیِ viewBox می‌آید، نه از max-height؛ وگرنه لانه داخل کادرش
   letterbox می‌شد و همان فضای خالی که برداشتیم از پهلوها برمی‌گشت. ← همان قاعدهٔ رادار. */
/* سه سقف هم‌زمان: پهنای ستون، قدِ پنجره، و قدِ خودِ خانه — بدون سومی، شاخه‌ای با دو
   زیربخش دو شش‌ضلعیِ ۱۸۰ پیکسلی می‌شد. ۷۴px یعنی خانه در همهٔ سطح‌ها هم‌اندازه بماند. */
.tm-hive-svg {
  --tm-hive-cap:min(400px, max(220px, calc(74vh - 300px)));
  width:min(100%, calc(var(--tm-hive-cols, 8) * 74px), calc(var(--tm-hive-cap) * var(--tm-hive-ar, 1.4)));
  height:auto; display:block; overflow:visible;
}
.tm-hive-hex { stroke:#fff; stroke-width:.7; transition:fill .16s ease, opacity .16s ease; }
.tm-hive-cell.untouched .tm-hive-hex { stroke:#f2ece2; }
.tm-hive-val { font-family:inherit; font-weight:900; pointer-events:none; }
.tm-hive-cell { cursor:default; }
.tm-hive-cell.drillable { cursor:pointer; }
/* هاور روی یک خانه، هم‌فصلی‌هایش را روشن نگه می‌دارد و بقیه را عقب می‌برد. */
.tm-hive.is-grouping .tm-hive-cell { opacity:.24; }
.tm-hive.is-grouping .tm-hive-cell.is-hot { opacity:1; }
.tm-hive .tm-hive-cell.is-hot .tm-hive-hex { stroke:#4c443c; stroke-width:1.1; }
.tm-hive-scale { display:flex; align-items:center; gap:8px; padding:10px 2px 0; }
.tm-hive-scale i { flex:1 1 auto; height:8px; border:1px solid #efe8de; border-radius:999px; }
.tm-hive-scale small { flex:0 0 auto; color:#8d847a; font-size:10.5px; font-weight:850; }
.tm-hive-groups { display:flex; flex-wrap:wrap; gap:6px; margin-top:11px; }
.tm-hive-chip {
  display:inline-flex; align-items:center; gap:6px; max-width:100%; padding:4px 9px;
  border:1px solid #eae2d8; border-radius:999px; color:#5b534b; background:#fff; font:inherit; font-size:11px; font-weight:850; cursor:default;
  transition:border-color .14s ease, background .14s ease;
}
.tm-hive-chip i { flex:0 0 auto; width:9px; height:9px; border:1px solid rgba(0,0,0,.08); border-radius:2px; }
.tm-hive-chip b { min-width:0; overflow:hidden; font-weight:900; text-overflow:ellipsis; white-space:nowrap; }
.tm-hive-chip small { flex:0 0 auto; color:#93897d; font-size:10px; font-weight:800; }
.tm-hive-chip.drillable { cursor:pointer; }
.tm-hive-chip.is-hot { border-color:#c9b79c; background:#fdf7ee; }
.tm-hive-groups.is-grouping .tm-hive-chip:not(.is-hot) { opacity:.45; }
.tm-hive-foot { display:grid; gap:6px; margin-top:12px; padding-top:11px; border-top:1px solid #eee7de; color:#6d655c; font-size:11.5px; font-weight:800; }
.tm-hive-foot b { color:#2f8163; font-weight:950; }
.tm-hive-hint { display:inline-flex; align-items:flex-start; gap:6px; color:#8d847a; font-size:11px; font-weight:750; line-height:1.75; }
.tm-hive-hint svg { flex:0 0 auto; width:12px; height:12px; margin-top:2px; color:#b7ab9b; }

.tm-tooltip {
  position:fixed; z-index:9999; width:max-content; min-width:0; max-width:min(220px,calc(100vw - 24px)); padding:7px 9px; border:1px solid rgba(255,255,255,.1); border-radius:8px;
  color:#fbf8f3; background:rgba(43,38,33,.97); box-shadow:0 12px 28px rgba(20,20,15,.28);
  font-size:10px; font-weight:750; line-height:1.75; text-align:right; white-space:pre-line; opacity:0; pointer-events:none;
  transform:translate(-50%,calc(-100% - 11px)); transition:opacity .12s ease;
}
.tm-tooltip.show { opacity:1; }
.tm-tooltip.wide { max-width:min(300px,calc(100vw - 24px)); padding:9px 11px; font-size:11px; line-height:1.85; }
.tm-tooltip.below { transform:translate(-50%,14px); }

@media (max-width: 980px) {
  .tm-rb-row { grid-template-columns:minmax(100px,1fr) minmax(150px,2fr) minmax(150px,2fr); }
  .tm-rb-coverage { grid-column:1 / -1; }
}
/* زیر این عرض، عنوانِ محورهای رادار به زیر ۱۰px می‌رسد؛ همان داده به‌شکل فهرستِ خوانا می‌آید. */
@media (max-width: 760px) {
  .tm-radar-visual { display:none; }
  .tm-radar-bars.narrow-only { display:grid; }
}
@media (max-width: 640px) {
  .tm-group-switch { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .tm-radar-card { padding:13px; }
  .tm-seg { min-width:160px; min-height:50px; }
  .tm-bar.tm-pack { gap:4px; padding:4px; }
  .tm-pack-rows, .tm-pack-row { gap:4px; }
  .tm-pack-row > .tm-seg { min-width:var(--tm-seg-min,48px); }
  .tm-book-row-back { flex-basis:30px; min-width:30px; }
  .tm-rb-row { grid-template-columns:1fr; gap:7px; }
  .tm-rb-series { grid-template-columns:50px minmax(0,1fr) 44px; }
}

/* ===== آزمون مشابه (sx-*) ===== */
.exam-similar-icon { color: #7a56c9; border-color: #e0d6f6; background: #f8f5ff; }
.exam-similar-icon:hover { color: #6741bd; border-color: #c3aef0; background: #f2ecff; }
.sx-body { display: grid; gap: 14px; }
.sx-state {
  display: grid; gap: 10px; place-items: center; text-align: center;
  padding: 46px 18px; border: 1px dashed #e4ded2; border-radius: 16px; background: var(--panel-soft);
  color: var(--muted); font-size: 12.5px; font-weight: 700;
}
.sx-state svg { width: 30px; height: 30px; color: #c3b8a3; }
.sx-state.error svg { color: var(--red); }

.sx-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(128px, 1fr)); gap: 9px; }
.sx-tiles article {
  display: grid; gap: 3px; place-items: center; text-align: center; min-height: 74px;
  align-content: center; padding: 10px 8px;
  background: var(--panel); border: 1px solid var(--line); border-radius: 13px;
}
.sx-tiles article span { font-size: 11px; color: #9a8c78; font-weight: 750; }
.sx-tiles article b { font-size: 18px; }
.sx-tiles article small { font-size: 10px; color: #b3a790; line-height: 1.5; }

.sx-modes { display: grid; gap: 8px; }
.sx-mode-seg { justify-self: start; }
.sx-mode-seg .seg { display: inline-flex; align-items: center; gap: 6px; }
.sx-mode-seg .seg svg { width: 14px; height: 14px; }
.sx-mode-note {
  margin: 0; padding: 11px 13px; border: 1px solid #eee3d7; border-radius: 13px;
  background: #fbf8f3; color: #706654; font-size: 12px; font-weight: 650; line-height: 1.95;
}
.sx-mode-note b { color: var(--ink); }

.sx-lessons { display: grid; gap: 9px; }
.sx-lesson { border: 1px solid var(--line); border-radius: 15px; background: var(--panel); overflow: hidden; }
.sx-lesson.open { border-color: #d7c9ee; box-shadow: 0 8px 22px rgba(87, 60, 155, .06); }
.sx-lesson-head {
  display: grid; align-items: center; gap: 10px; padding: 11px 13px; cursor: pointer;
  grid-template-columns: minmax(150px, 1.5fr) repeat(3, minmax(62px, .7fr)) minmax(112px, 1fr) minmax(92px, .9fr) 18px;
  transition: background .14s ease;
}
.sx-lesson-head:hover { background: var(--panel-soft); }
.sx-l-name { display: flex; align-items: center; gap: 7px; min-width: 0; }
.sx-l-name svg { width: 15px; height: 15px; color: #a99a80; }
.sx-l-name b { font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sx-l-name small { flex: none; font-size: 10.5px; color: #a99a80; font-weight: 700; }
.sx-l-cell { display: grid; gap: 2px; justify-items: center; text-align: center; }
.sx-l-cell small { font-size: 10px; color: #a99a80; font-weight: 700; }
.sx-l-cell b { font-size: 13px; font-weight: 850; }
.sx-caret { display: inline-grid; place-items: center; color: #b8ab94; transition: transform .2s var(--ease-soft); }
.sx-caret svg { width: 15px; height: 15px; }
.sx-lesson.open .sx-caret { transform: rotate(180deg); }

.sx-delta { font-size: 13px; font-weight: 850; }
.sx-delta.up { color: #1f8f5f; }
.sx-delta.down { color: var(--red); }
.sx-delta.flat { color: #8b8272; }
.sx-delta.none { color: #c0b6a3; }
.sx-verdict {
  display: inline-flex; align-items: center; padding: 3px 9px; border-radius: 999px;
  font-size: 10.5px; font-weight: 800; white-space: nowrap;
}
.sx-verdict.up { background: #e7f7ef; color: #1a7d54; }
.sx-verdict.down { background: var(--red-soft); color: #b8453f; }
.sx-verdict.flat { background: #f3f0e9; color: #7c7466; }
.sx-verdict.none { background: #f6f4ef; color: #aba290; }

.sx-level-row {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  padding: 9px 13px; border-top: 1px dashed #eee3d7; background: var(--panel-soft);
  font-size: 11.5px; font-weight: 750; color: #706654;
}
.sx-levels .seg { min-width: 68px; }

.sx-detail { display: grid; gap: 12px; padding: 12px 13px 14px; border-top: 1px solid var(--line); background: var(--panel-soft); }
.sx-mix-block { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 10px; }
.sx-mix-block > div { display: grid; gap: 5px; }
.sx-mix-block small { font-size: 10.5px; color: #9a8c78; font-weight: 750; }
.sx-mix { display: flex; height: 22px; border-radius: 8px; overflow: hidden; border: 1px solid var(--line); background: #fff; }
.sx-mix.empty { background: repeating-linear-gradient(45deg, #f6f3ec 0 6px, #fff 6px 12px); }
.sx-mix-part {
  flex: 0 0 calc(var(--sx-w) * 1%); display: grid; place-items: center;
  font-style: normal; min-width: 0; overflow: hidden;
}
.sx-mix-part b { font-size: 10px; font-weight: 850; color: #fff; }
.sx-mix-part.veasy { background: #58c08d; }
.sx-mix-part.easy { background: #8ecf78; }
.sx-mix-part.medium { background: #e3b64a; }
.sx-mix-part.hard { background: #e8874c; }
.sx-mix-part.vhard { background: #d75a53; }
.sx-mix-part.unknown { background: #c6bcaa; }

.sx-table-title {
  display: flex; align-items: center; gap: 7px; font-size: 11.5px; font-weight: 800; color: #7d7263;
}
.sx-table-title svg { width: 15px; height: 15px; color: #a99a80; }
.sx-table-wrap { border: 1px solid var(--line); border-radius: 12px; background: var(--panel); overflow-x: auto; }
.sx-table { width: 100%; border-collapse: collapse; font-size: 11.5px; }
.sx-table th {
  padding: 8px 9px; text-align: center; font-size: 10.5px; font-weight: 800;
  color: #9a8c78; background: var(--panel-soft); border-bottom: 1px solid var(--line); white-space: nowrap;
}
.sx-table td { padding: 7px 9px; text-align: center; border-bottom: 1px solid #f3efe7; font-weight: 750; }
.sx-table tr:last-child td { border-bottom: 0; }
.sx-table .sx-band-name, .sx-table .sx-topic-name { text-align: start; white-space: nowrap; }
.sx-band-name { display: flex; align-items: center; gap: 7px; }
.sx-dot { width: 9px; height: 9px; border-radius: 50%; flex: none; }
.sx-dot.veasy { background: #58c08d; }
.sx-dot.easy { background: #8ecf78; }
.sx-dot.medium { background: #e3b64a; }
.sx-dot.hard { background: #e8874c; }
.sx-dot.vhard { background: #d75a53; }
.sx-dot.unknown { background: #c6bcaa; }
.sx-topic-name span { display: inline-block; padding-inline-start: calc(var(--sx-indent) * 14px); }
.sx-table.topics tr.lv1 .sx-topic-name span { font-weight: 850; }
.sx-table.topics tr.lv4 .sx-topic-name span { color: #7d7263; }

.sx-note { margin: 0; font-size: 11.5px; color: #8b8272; font-weight: 700; line-height: 1.9; }
.sx-note.warn {
  display: flex; align-items: center; gap: 8px; padding: 10px 12px;
  border: 1px solid #f3ddc4; border-radius: 12px; background: var(--yellow-soft); color: #8a6414;
}
.sx-note.warn svg { width: 16px; height: 16px; flex: none; }

.sx-footer { flex-wrap: wrap; gap: 10px; }
.sx-name { display: flex; align-items: center; gap: 8px; min-width: 0; flex: 1 1 260px; }
.sx-name span { flex: none; font-size: 11.5px; font-weight: 750; color: #8b8272; }
.sx-name input {
  flex: 1 1 auto; min-width: 0; height: 34px; padding: 0 11px;
  border: 1px solid var(--line); border-radius: 10px; background: var(--panel);
  font: inherit; font-size: 12.5px; color: var(--ink);
}
.sx-name input:focus { outline: none; border-color: #c3aef0; }

@media (max-width: 900px) {
  .sx-lesson-head { grid-template-columns: minmax(0, 1fr) 18px; row-gap: 9px; }
  .sx-l-name { grid-column: 1; }
  .sx-caret { grid-column: 2; grid-row: 1; }
  .sx-l-cell { grid-column: 1 / -1; grid-template-columns: minmax(0, 1fr) max-content; justify-items: stretch; }
  .sx-l-cell small { text-align: start; }
  .sx-l-cell b, .sx-l-cell .sx-delta, .sx-l-cell .sx-verdict { justify-self: end; }
}
.sx-body.busy .sx-lessons, .sx-body.busy .sx-tiles { opacity: .55; transition: opacity .18s ease; }
.sx-refresh {
  display: flex; align-items: center; gap: 9px; padding: 8px 12px;
  border: 1px solid #e0d6f6; border-radius: 11px; background: #f8f5ff;
  color: #6741bd; font-size: 11.5px; font-weight: 750;
}
.sx-refresh i {
  width: 13px; height: 13px; flex: none; border-radius: 50%;
  border: 2px solid #d8caf5; border-top-color: #7a56c9;
  animation: sx-spin .7s linear infinite;
}
@keyframes sx-spin { to { transform: rotate(360deg); } }

/* ضریب هدف: عدد درشت = هدف، زیرش مبدأ؛ ▲/▼ جهت تغییر */
.sx-target { display: inline-flex; align-items: center; gap: 4px; font-size: 14px; font-weight: 850; }
.sx-target i { font-style: normal; font-size: 9px; line-height: 1; }
.sx-target.up { color: #c2582f; }
.sx-target.down { color: #1f8f5f; }
.sx-target.flat { color: var(--ink); }
.sx-target.flat i { color: #b8ab94; }
.sx-tiles article .sx-target { font-size: 18px; }
.sx-l-cell .sx-target + small, .sx-tiles article .sx-target + small { color: #a99a80; }

/* سطح خودکار سؤال: قفلِ ناشی از رسیدن به آستانهٔ کاربر یکتا */
.qdiff-alert.auto { color: #5b3fa8; border-color: #ddd0f5; background: #f8f5ff; }
.qdiff-alert.auto b { color: #45308a; }
.auto-diff-note {
  display: flex; align-items: flex-start; gap: 8px;
  padding: 9px 11px; border: 1px solid #ddd0f5; border-radius: 11px;
  background: #f8f5ff; color: #5b3fa8; font-size: 10.5px; font-weight: 700; line-height: 1.85;
}
.auto-diff-note svg { width: 16px; height: 16px; flex: none; margin-top: 2px; }
.auto-diff-note b { color: #45308a; }

/* ═══════════════════ کنکور نوردی ═══════════════════ */
/* نشانِ سازمان سنجش: توپُر و رنگ‌گیرنده از currentColor (برخلاف بقیهٔ آیکون‌های خطی) */
.kn-glyph { display: inline-block; width: 1em; height: 1em; fill: currentColor; stroke: none; vertical-align: middle; flex: 0 0 auto; }
.nav-icon-konkur {
  width:19px;
  height:19px;
  fill:currentColor;
  stroke:none;
  transform:scale(.88);
  transform-origin:center;
}
.kn-unit-glyph { width: 20px; height: 20px; }
.kn-chip-glyph { width: 13px; height: 13px; }
.kn-empty-glyph { width: 34px; height: 34px; color: var(--orange); }

.kn-group + .kn-group { margin-top: 16px; }
.kn-unit-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(268px, 1fr)); gap: 13px; }
/* شبکهٔ کارت‌ها داخل پنل است و پنل خودش padding ندارد؛ وگرنه کارت‌ها به لبه می‌چسبند */
.kn-group > .kn-unit-grid { padding: 15px 17px 17px; }
.kn-unit-card {
  display: flex; flex-direction: column; gap: 9px; padding: 14px; text-align: right; cursor: pointer;
  border: 1px solid #e5d7c5; border-radius: 17px; background: #fff; color: var(--ink);
  box-shadow: 0 8px 24px rgba(67, 52, 35, .05);
  transition: border-color .18s ease, transform .18s ease, box-shadow .18s ease;
}
.kn-unit-card:hover { border-color: #c58cf2; transform: translateY(-2px); box-shadow: 0 12px 30px rgba(96, 55, 140, .12); }
.kn-unit-top { display: flex; align-items: center; gap: 10px; min-width: 0; }
.kn-unit-icon {
  flex: 0 0 auto; display: grid; place-items: center; width: 38px; height: 38px; border-radius: 12px;
  color: #fff; background: linear-gradient(135deg, var(--kn-color, #c344fd), color-mix(in srgb, var(--kn-color, #c344fd) 65%, #000));
}
.kn-unit-icon .ui-icon { width: 19px; height: 19px; }
.kn-unit-name { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.kn-unit-name strong { font-size: .92rem; font-weight: 900; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.kn-unit-name small { color: var(--muted); font-size: .7rem; font-weight: 700; }
.kn-unit-meta { display: flex; align-items: center; gap: 8px; color: #6d6357; font-size: .74rem; font-weight: 700; }
.kn-unit-meta b { color: #c9510c; font-size: .86rem; font-weight: 900; }
.kn-unit-meta i { width: 1px; height: 13px; background: #e6dcd0; }
.kn-unit-bar { display: block; height: 7px; border-radius: 999px; background: #f1ebe2; overflow: hidden; }
.kn-unit-bar > span { display: block; height: 100%; border-radius: 999px; background: linear-gradient(90deg, #ff7a2b, var(--orange)); transition: width .3s ease; }
.kn-unit-cover { color: var(--muted); font-size: .7rem; font-weight: 700; }

/* ── حالتِ جابه‌جاییِ ترتیبِ کنکورها ─────────────────────────────────────────
   کارت در این حالت دستهٔ کشیدن است نه دکمهٔ ورود؛ نشانگر و دستهٔ ⠿ همین را
   می‌گویند. خطِ رهاکردن روی لبهٔ کارتِ زیرِ اشاره‌گر کشیده می‌شود: راست = قبل،
   چپ = بعد (صفحه راست‌به‌چپ است). */
.kn-head-tools { display: flex; flex-wrap: wrap; justify-content: flex-end; align-items: center; gap: 10px; }
.kn-reorder-btn { white-space: nowrap; }
.kn-reorder-btn.on { border-color: var(--primary); background: color-mix(in srgb, var(--primary) 12%, transparent); color: var(--primary); }
.kn-reorder-hint {
  display: flex; align-items: center; gap: 8px; margin-bottom: 14px; padding: 10px 13px;
  border: 1px dashed color-mix(in srgb, var(--primary) 40%, #e5d7c5); border-radius: 13px;
  background: color-mix(in srgb, var(--primary) 7%, transparent);
  color: var(--ink); font-size: .78rem; font-weight: 700;
}
.kn-reorder-hint .ui-icon { width: 16px; height: 16px; flex: 0 0 auto; color: var(--primary); }
.kn-unit-card.kn-unit-draggable { cursor: grab; }
.kn-unit-card.kn-unit-draggable:active { cursor: grabbing; }
.kn-unit-card.kn-unit-draggable:hover { transform: none; }
.kn-unit-grip { margin-inline-start: auto; color: var(--muted); font-size: 1.05rem; line-height: 1; letter-spacing: -1px; }
.kn-unit-card.dragging { opacity: .45; }
.kn-unit-card.drag-over { border-color: var(--primary); box-shadow: 3px 0 0 var(--primary) inset; }
.kn-unit-card.drag-over.drop-after { box-shadow: -3px 0 0 var(--primary) inset; }

/* ── کارت نمایش سؤال (qv-*) ────────────────────────────────────────────────
   تنها فرمتِ نمایشِ سؤال در پاپ‌آپ‌ها و فهرست‌های فقط‌خواندنیِ هر سه پنل
   (کاربر، مدیر، حساب‌های غیر دانش‌آموز). چیدمانِ عمودی: نوارِ بالا (شماره،
   نشان‌ها، اسلاتِ اختصاصیِ صفحه) و زیرش صورتِ سؤال در تمام عرض و بعد گزینه‌ها. */
.qv-list { display: flex; flex-direction: column; gap: 10px; }
.qv-card {
  display: flex; flex-direction: column; gap: 9px;
  padding: 13px; border: 1px solid #e5dccf; border-radius: 15px; background: #fff;
  box-shadow: 0 6px 20px rgba(67, 52, 35, .04);
}
.qv-card.has-similar { border-color: #cfa5f0; box-shadow: inset 3px 0 0 #a855f7, 0 6px 20px rgba(67, 52, 35, .04); }
/* رنگِ نازکِ کنارهٔ کارت بر اساس نتیجهٔ کاربر (کارنامه/پاسخبرگ) */
.qv-card.qv-correct { box-shadow: inset 3px 0 0 #2f9e83, 0 6px 20px rgba(67, 52, 35, .04); }
.qv-card.qv-wrong { box-shadow: inset 3px 0 0 #dc5b52, 0 6px 20px rgba(67, 52, 35, .04); }
.qv-card.qv-blank { box-shadow: inset 3px 0 0 #c3b8a8, 0 6px 20px rgba(67, 52, 35, .04); }
/* همهٔ نشان‌ها و دکمه‌های نوارِ بالا هم‌ارتفاع‌اند (نازک و سبک) تا ردیف یکدست دیده شود */
.qv-top { display: flex; align-items: center; flex-wrap: nowrap; gap: 7px; --qv-top-h: 26px; }
.qv-no {
  flex: none; display: grid; place-items: center; min-width: var(--qv-top-h); height: var(--qv-top-h);
  padding: 0 7px; border-radius: 8px;
  background: #faf7f2; border: 1px solid #ece3d6; color: #5f574d; font-size: .78rem; font-weight: 900;
}
.qv-head { display: flex; flex-wrap: wrap; align-items: center; gap: 7px; }
/* نشانِ مبحث می‌تواند خیلی بلند باشد؛ کوتاه می‌شود تا آمار و دکمه در همان ردیف بمانند */
.qv-top .qv-head { flex: 1 1 0; min-width: 0; flex-wrap: nowrap; overflow: hidden; }
.qv-top .qv-head > .meta-chip { min-width: 0; overflow: hidden; }
.qv-top .qv-head > .meta-chip b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.qv-top .qv-head > :not(.meta-chip) { flex: none; }
.qv-head small { color: var(--muted); font-size: .7rem; font-weight: 700; }
.qv-uid {
  padding: 2px 7px; border-radius: 7px; background: #f3eee7; color: #7d7263;
  font-size: .68rem; font-weight: 850; direction: ltr;
}
/* نوع سؤال و یادداشت‌های کوتاهِ نوار بالا (پنل مدیر) */
.qv-type, .qv-note {
  padding: 0 9px; border-radius: 8px; background: #f7f3ed; border: 1px solid #ece3d6;
  color: #7d7263; font-size: .68rem; font-weight: 800; white-space: nowrap;
}
/* هم‌قدسازیِ اجزای نوارِ بالا: نشانِ مبحث، کد سؤال، سطح، نوع، وضعیت و اسلات‌ها */
.qv-top .qv-head > .meta-chip,
.qv-top .qv-uid,
.qv-top .qv-diff,
.qv-top .qv-type,
.qv-top .qv-note,
.qv-top .qv-head > .badge,
.qv-top .qv-status,
.qv-top .kn-qstats > i,
.qv-top .kn-qopen {
  height: var(--qv-top-h); border-radius: 8px;
}
.qv-top .qv-head > .meta-chip { display: inline-flex; align-items: center; }
.qv-top .qv-uid,
.qv-top .qv-type,
.qv-top .qv-note,
.qv-top .qv-head > .badge { display: inline-grid; place-items: center; padding: 0 9px; }
/* نشانِ وضعیت در نوار بالای کارت با inline-grid هم‌قد بقیه می‌شود؛ در این حالت
   نقطهٔ ::beforeِ .badge یک ردیفِ جدا در گرید می‌سازد و بالای متن می‌نشیند.
   نوار بالا خودش رنگ‌بندی دارد، پس نقطه اینجا لازم نیست. */
.qv-top .qv-head > .badge::before { display: none; }
/* سطح دشواری با نامِ خودش می‌آید؛ رنگِ ملایمِ متناسب با سطح */
.qv-diff {
  flex: none; display: inline-grid; place-items: center; padding: 0 9px;
  border: 1px solid transparent; font-size: .7rem; font-weight: 850; white-space: nowrap;
}
.qv-diff.lvl-1 { background: #eef8f5; border-color: #d3ebe4; color: #16816f; }
.qv-diff.lvl-2 { background: #fdf6e7; border-color: #f0e2c2; color: #a2760f; }
.qv-diff.lvl-3 { background: #fef2ea; border-color: #f6dbc8; color: #c25d21; }
.qv-diff.lvl-4 { background: #fdeef0; border-color: #f6d3d7; color: #c4444e; }
/* نتیجهٔ کاربر روی همین سؤال (کارنامه، پاسخبرگ، مرور رفتاری) */
.qv-status {
  flex: none; display: inline-grid; place-items: center; padding: 0 11px;
  border: 1px solid transparent; font-size: .71rem; font-weight: 900; white-space: nowrap;
}
.qv-status.correct { background: #edf9f4; border-color: #b7dfd0; color: #1c7d64; }
.qv-status.wrong { background: #fdeeed; border-color: #f2ccc8; color: #b9433a; }
.qv-status.blank, .qv-status.dunno { background: #f6f3ee; border-color: #e5dccf; color: #7d7263; }
/* متنِ کاملِ سؤال؛ هیچ‌جا کوتاه نمی‌شود */
.qv-body { display: block; color: #4e463d; font-size: .84rem; line-height: 1.9; }
.qv-body img { max-width: 100%; height: auto; }
/* placeholderِ تصویرِ لودنشده نسبتِ ۱۶:۱۰ دارد و در فهرستِ بلند خیلی جا می‌گیرد */
.qv-body img.sq-img-lazy { max-height: 150px; }
.qv-opts {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: stretch; align-content: start; grid-auto-rows: 1fr; gap: 6px 10px; margin-top: 4px;
}
.qv-opts.is-row { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.qv-opts.is-row > span { width: 100%; min-width: 0; }
.qv-opts.is-two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.qv-opts.is-stack { grid-template-columns: minmax(0, 1fr); grid-auto-rows: max-content; }
.qv-opts > span {
  display: flex; align-items: center; gap: 6px; min-width: 0;
  min-height: 36px; padding: 2px 9px; border: 1px solid #eee5d9; border-radius: 9px; background: #fdfbf7;
  color: #5b5248; font-size: .76rem; line-height: 1.8;
}
.qv-opts > span.is-correct { border-color: #b3ddd0; background: #f1fbf7; }
.qv-opts > span.is-picked { border-color: #d9c6ea; background: #faf6fe; }
.qv-opts > span.is-correct.is-picked { border-color: #8ccbb5; background: #ecfaf4; }
.qv-opts > span > b {
  flex: none; display: grid; place-items: center; width: 18px; height: 18px;
  border-radius: 6px; background: #f1efe8; color: #7d7263; font-size: .64rem; font-weight: 900;
}
.qv-opts > span.is-correct > b { background: #2f9e83; color: #fff; }
.qv-opts > span.is-picked > b { background: #8b45d6; color: #fff; }
.qv-opts > span.is-correct.is-picked > b { background: #2f9e83; color: #fff; }
.qv-opts > span > span { min-width: 0; overflow-wrap: anywhere; flex: 1 1 auto; line-height: 1.55; }
.qv-opts > span > span > :first-child { margin-top: 0; }
.qv-opts > span > span > :last-child { margin-bottom: 0; }
.qv-opts > span > span > p { margin-block: 0; line-height: 1.55; }
.qv-opts > span img { max-width: 100%; height: auto; }
@media (max-width: 760px) {
  .qv-opts.is-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
/* فقط نشانِ انتخاب کاربر چسبیده به انتهای گزینه می‌آید. گزینهٔ صحیح مثل بانک
   سؤال با رنگِ کادر و شماره مشخص است و آیکون تیکِ جداگانه ندارد. */
.qv-opt-flags { flex: none; display: inline-flex; align-items: center; gap: 5px; margin-top: 1px; font-style: normal; }
.qv-opt-flags > em { display: inline-flex; align-items: center; font-style: normal; }
.qv-opt-flags > em.pick {
  padding: 1px 7px; border-radius: 6px; background: #f3e9fb; color: #7a3ec2;
  font-size: .63rem; font-weight: 850; white-space: nowrap;
}
/* پاسخ تشریحی و درسنامه، زیر همان کارت و با همان قاب */
.qv-answer { display: flex; flex-direction: column; gap: 10px; }
.qv-panel {
  padding: 13px; border: 1px solid #e5dccf; border-radius: 15px; background: #fff;
  box-shadow: 0 6px 20px rgba(67, 52, 35, .04);
}
.qv-panel > h3 { margin: 0 0 9px; font-size: .82rem; font-weight: 900; color: #4e463d; }
.qv-panel-body { color: #4e463d; font-size: .82rem; line-height: 2; }
.qv-panel-body img { max-width: 100%; height: auto; }
.qv-muted { color: var(--muted); font-size: .78rem; }
/* بدنهٔ پاپ‌آپی که سؤال نشان می‌دهد: فقط فاصله‌گذاری بین کارت و پنل‌ها */
.qv-modal { display: flex; flex-direction: column; gap: 10px; }
.qv-modal .question-detail-grid { margin: 0; }
.qv-modal .detail-main, .qv-modal .qrep-modal-main { display: flex; flex-direction: column; gap: 10px; }
.kn-qstats { display: flex; align-items: center; gap: 6px; flex: none; }
.kn-qstats > i {
  display: flex; align-items: center; gap: 5px; font-style: normal;
  padding: 0 9px; border: 1px solid #efe7db; border-radius: 8px; background: #fcfaf7;
}
.kn-qstats b { color: #b3a99b; font-size: .76rem; font-weight: 900; }
.kn-qstats > i.on { border-color: #f7d0b6; background: #fff5ec; }
.kn-qstats > i.on b { color: #c9510c; }
.kn-qstats > i.inherit { border-color: #e0c7f5; background: #faf4ff; }
.kn-qstats > i.inherit b { color: #8b45d6; }
.kn-qstats small { color: var(--muted); font-size: .67rem; font-weight: 700; white-space: nowrap; }
.kn-qopen { flex: none; justify-content: center; height: var(--qv-top-h); padding: 0 11px; gap: 5px; font-size: .73rem; }
.kn-qopen .ui-icon { width: 14px; height: 14px; }

/* نوار کناریِ کنکور نوردی: هیچ اسکرولِ داخلی ندارد — کلِ باکس دقیقاً به‌اندازهٔ درختِ
   بازشده بلند می‌شود و همراه صفحه اسکرول می‌شود (به همین دلیل sticky هم نیست). */
.kn-side { position: static; max-height: none; overflow: visible; }
.kn-side-scroll { display: flex; flex-direction: column; gap: 9px; min-width: 0; }
.kn-side .mn-sec-body { max-height: none; overflow: visible; }
.kn-side .mn-sec { flex: 0 0 auto; }

/* نامِ شاخهٔ (پایه، رشته)ای که کتاب‌هایش نشان داده می‌شود؛ بدون این، کاربرِ چنداشتراکه
   نمی‌فهمد «فیزیک ۱» مالِ کدام پایه/رشته است. */
.kn-side .mn-sec > summary .kns-sec-title { display: inline-flex; align-items: center; gap: 6px; min-width: 0; }
.kns-branch {
  flex: none; padding: 1px 7px; border: 1px solid #f0e0cd; border-radius: 999px;
  background: #fdf3e9; color: #9b6a46; font-size: .67rem; font-style: normal; font-weight: 800;
}

/* نوار کناریِ workspace: وضعیت مشابه‌داشتن */
.kn-status-group { display: flex; flex-direction: column; gap: 4px; margin-bottom: 10px; }
.kn-status {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding: 8px 11px; border: 1px solid #ece3d6; border-radius: 10px; background: #fff;
  font: inherit; font-size: .78rem; font-weight: 800; color: #514a42; cursor: pointer;
  transition: border-color .15s ease, background .15s ease;
}
.kn-status:hover { border-color: #f0b487; }
.kn-status.on { border-color: #f4ceb4; background: var(--orange-soft); color: #c9510c; }
.kn-status b { min-width: 24px; padding: 2px 7px; border-radius: 999px; background: #f1eee8; color: #8d8273; font-size: .68rem; font-weight: 850; text-align: center; }
.kn-status.on b { background: #fff; color: #c9510c; }
/* با نوار کناری، ستون سؤال باریک‌تر می‌شود؛ تصویر سؤال هم به تعادل می‌رسد */
.kn-workspace .qv-list { gap: 10px; }

/* سؤال کنکورِ هدف در صفحهٔ انتخاب مشابه */
.kn-target {
  overflow: hidden; margin-bottom: 16px; border: 1px solid #d9bdf3; border-radius: 18px; background: #fff;
  box-shadow: 0 10px 30px rgba(96, 55, 140, .08);
}
.kn-target-head {
  display: flex; flex-wrap: wrap; align-items: center; gap: 9px; padding: 10px 14px;
  background: linear-gradient(135deg, #f9f2ff, #fdfaff); border-bottom: 1px solid #ecdcfb;
  color: #6b5a80; font-size: .76rem; font-weight: 800;
}
.kn-target-tag {
  padding: 4px 10px; border-radius: 999px; color: #fff; font-size: .69rem; font-weight: 900;
  background: linear-gradient(135deg, #a855f7, #7c3aed);
}
.kn-target .sq-item { border: 0; border-radius: 0; }

/* کارت‌های انتخاب مشابه */
.kn-pick-card.inherited { border-color: #d3b1f0; }
.kn-inherit-note {
  display: flex; align-items: center; gap: 7px; padding: 8px 13px;
  background: #f8f2ff; border-bottom: 1px solid #ecdcfb; color: #6c4a9c; font-size: .72rem; font-weight: 800;
}
.kn-inherit-note .ui-icon { width: 14px; height: 14px; flex: none; }
.kn-pick-action.on { border-color: #f0a9a9; background: #fdf0f0; color: #c0392b; box-shadow: 0 5px 13px rgba(192, 57, 43, .1); }
.kn-pick-action.on:hover { border-color: #e08a8a; box-shadow: 0 8px 18px rgba(192, 57, 43, .15); }
.kn-tab-count { margin-inline-start: 5px; padding: 1px 6px; border-radius: 999px; background: #fff2e6; color: #c9510c; font-size: .66rem; font-weight: 900; }

/* نوار کناری فیلتر مخزن */
.kn-side .sd-check-group { display: flex; flex-direction: column; gap: 3px; }
.kn-sub-title { margin: 9px 2px 4px; color: var(--muted); font-size: .69rem; font-weight: 850; }

/* نشان «مشابه کنکور» روی کارت سؤال */
.kn-chip {
  display: inline-flex; align-items: center; gap: 5px; padding: 4px 9px; border-radius: 999px;
  border: 1px solid #e3cdf8; background: #f8f2ff; color: #7c3aed; font-size: .69rem; font-weight: 850; white-space: nowrap;
}
.kn-chip .ui-icon { width: 13px; height: 13px; }
.kn-chip b { padding: 1px 6px; border-radius: 999px; background: #fff; color: #6d28d9; font-size: .64rem; font-weight: 900; }
.kn-chip.is-konkur { border-color: #f7d0b6; background: #fff3e9; color: #c2410c; }
.kn-chip.is-konkur b { color: #9a3412; }
/* نشانِ «مشابهِ سؤال کنکور» روی کارت سؤال: فقط آیکونِ سنجش؛ متن روی hover می‌آید */
.kn-chip-icon {
  flex: 0 0 auto; display: inline-grid; place-items: center; width: 27px; height: 27px; padding: 0;
  border-color: #e6d4fa; border-radius: 9px; background: linear-gradient(180deg, #fdfbff, #f7f0ff);
  color: #7c3aed; box-shadow: 0 4px 11px rgba(124, 58, 237, .09); cursor: help;
}
.kn-chip-icon:hover, .kn-chip-icon:focus-visible { border-color: #c9a6f2; background: #f5ecff; outline: none; }
.kn-chip-icon .kn-chip-glyph { width: 16px; height: 16px; }

@media (max-width: 860px) {
  .kn-unit-grid { grid-template-columns: 1fr; }
  .qv-top { flex-wrap: wrap; }
  .qv-top .qv-head { flex: 1 1 100%; order: 3; }
  .kn-qstats { flex: 1 1 auto; }
  .kn-qopen { flex: 1 1 auto; }
}

/* ── کنکور نوردی: پنل کاربر ── */
/* دروازهٔ «همهٔ سؤال‌های کنکور»: یک نوارِ عریض بالای گروه‌های رشته، نه یک کارت در
   شبکه — چون یک چیزِ یکتاست و نباید با کارت‌های تک‌کنکور اشتباه گرفته شود. */
.kns-all-card {
  --kns-all: #6b5bd6;
  position: relative; overflow: hidden; display: flex; align-items: center; gap: 13px; width: 100%;
  margin-bottom: 20px; padding: 15px 17px; border-radius: 18px; cursor: pointer; font: inherit;
  text-align: right; color: inherit;
  border: 1px solid color-mix(in srgb, var(--kns-all) 26%, #fff);
  background:
    radial-gradient(120% 150% at 100% 0%, color-mix(in srgb, var(--kns-all) 13%, transparent), transparent 60%),
    linear-gradient(180deg, #fff, color-mix(in srgb, var(--kns-all) 5%, #fff));
  transition: border-color .2s ease, box-shadow .22s ease, transform .12s ease;
}
.kns-all-card:hover {
  border-color: color-mix(in srgb, var(--kns-all) 45%, #fff);
  box-shadow: 0 16px 34px color-mix(in srgb, var(--kns-all) 18%, rgba(67, 52, 35, .07));
}
.kns-all-card:active { transform: translateY(1px); }
.kns-all-card:focus-visible { outline: 2px solid color-mix(in srgb, var(--kns-all) 70%, #000); outline-offset: 2px; }
.kns-all-icon {
  flex: 0 0 auto; display: grid; place-items: center; width: 46px; height: 46px; border-radius: 15px;
  background: linear-gradient(140deg, var(--kns-all), color-mix(in srgb, var(--kns-all) 62%, #000));
  color: #fff; box-shadow: 0 9px 20px color-mix(in srgb, var(--kns-all) 34%, transparent);
  transition: transform .24s cubic-bezier(.34, 1.5, .64, 1);
}
.kns-all-card:hover .kns-all-icon { transform: translateY(-1px) scale(1.04); }
.kns-all-glyph { width: 24px; height: 24px; }
.kns-all-copy { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.kns-all-copy strong { color: var(--ink); font-size: 1rem; font-weight: 900; }
.kns-all-copy small { color: var(--muted); font-size: .75rem; font-weight: 650; line-height: 1.6; }
.kns-all-count {
  flex: 0 0 auto; display: flex; flex-direction: column; align-items: center; gap: 1px;
  padding: 7px 13px; border-radius: 13px;
  border: 1px solid color-mix(in srgb, var(--kns-all) 22%, #fff);
  background: color-mix(in srgb, var(--kns-all) 8%, #fff);
}
.kns-all-count b { color: color-mix(in srgb, var(--kns-all) 78%, #000); font-size: 1.05rem; font-weight: 900; }
.kns-all-count i { color: var(--muted); font-size: .66rem; font-weight: 800; font-style: normal; }
.kns-all-arrow {
  flex: 0 0 auto; display: grid; place-items: center; width: 28px; height: 28px; border-radius: 10px;
  opacity: .45; color: color-mix(in srgb, var(--kns-all) 70%, #000);
  transition: opacity .2s ease, transform .2s ease, background .2s ease;
}
.kns-all-arrow .ui-icon { width: 17px; height: 17px; }
.kns-all-card:hover .kns-all-arrow {
  opacity: 1; transform: translateX(-3px); background: color-mix(in srgb, var(--kns-all) 11%, #fff);
}
@media (max-width: 640px) {
  .kns-all-card { flex-wrap: wrap; gap: 11px; }
  .kns-all-copy { flex-basis: 100%; order: 3; }
  .kns-all-count { margin-inline-start: auto; }
}
@media (prefers-reduced-motion: reduce) {
  .kns-all-card, .kns-all-icon, .kns-all-arrow { transition: none; }
}

.kns-group + .kns-group { margin-top: 18px; }
.kns-group-head { display: flex; align-items: baseline; gap: 9px; margin: 0 2px 10px; }
.kns-group-head strong { color: var(--ink); font-size: .95rem; font-weight: 900; }
.kns-group-head span { color: var(--muted); font-size: .74rem; font-weight: 700; }

/* کارت کنکور در پنل کاربر: بدنهٔ کلیک‌پذیر (رفتن به سؤال‌ها) + پای کارت (شرکت در آزمون).
   رنگِ کنکور در حالت عادی فقط تهرنگ است و روی هاور توپُر می‌شود تا نشان سفید بدرخشد. */
.kns-unit-card {
  position: relative; padding: 0; gap: 0; overflow: hidden; cursor: default;
  --kn-soft: color-mix(in srgb, var(--kn-color, #c344fd) 11%, #fff);
  --kn-line: color-mix(in srgb, var(--kn-color, #c344fd) 27%, #fff);
  --kn-deep: color-mix(in srgb, var(--kn-color, #c344fd) 76%, #000);
}
/* هالهٔ رنگیِ گوشهٔ کارت؛ فقط روی هاور محو-ظاهر می‌شود */
.kns-unit-card::before {
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: 0;
  background: radial-gradient(125% 85% at 100% 0%, color-mix(in srgb, var(--kn-color, #c344fd) 14%, transparent), transparent 62%);
  transition: opacity .22s ease;
}
.kns-unit-card:hover {
  border-color: var(--kn-line);
  box-shadow: 0 16px 34px color-mix(in srgb, var(--kn-color, #c344fd) 17%, rgba(67, 52, 35, .07));
}
.kns-unit-card:hover::before { opacity: 1; }
.kns-unit-open {
  position: relative; z-index: 1; display: flex; flex-direction: column; gap: 9px; width: 100%;
  padding: 14px 14px 11px; border: 0; background: none; color: inherit; font: inherit;
  text-align: right; cursor: pointer;
}
.kns-unit-open:focus-visible { outline: 2px solid var(--kn-deep); outline-offset: -3px; border-radius: 16px; }
.kns-unit-card .kn-unit-icon {
  width: 40px; height: 40px; border-radius: 13px;
  background: var(--kn-soft); color: var(--kn-deep); border: 1px solid var(--kn-line);
  box-shadow: inset 0 1px 0 #fff;
  transition: background .22s ease, color .22s ease, border-color .22s ease, box-shadow .22s ease,
              transform .24s cubic-bezier(.34, 1.5, .64, 1);
}
.kns-unit-card .kn-unit-glyph { width: 22px; height: 22px; transition: transform .24s cubic-bezier(.34, 1.5, .64, 1); }
.kns-unit-card:hover .kn-unit-icon {
  background: linear-gradient(140deg, var(--kn-color, #c344fd), var(--kn-deep));
  border-color: transparent; color: #fff; transform: translateY(-1px) scale(1.05);
  box-shadow: 0 9px 18px color-mix(in srgb, var(--kn-color, #c344fd) 36%, transparent);
}
.kns-unit-card:hover .kn-unit-glyph { transform: scale(1.06); }
.kns-unit-card .kn-unit-name strong { transition: color .2s ease; }
.kns-unit-open:hover .kn-unit-name strong { color: var(--kn-deep); }
.kns-unit-arrow {
  flex: 0 0 auto; margin-inline-start: auto; display: grid; place-items: center;
  width: 26px; height: 26px; border-radius: 9px; background: transparent; opacity: .4;
  color: color-mix(in srgb, var(--kn-color, #c344fd) 65%, #6b6053);
  transition: opacity .2s ease, transform .2s ease, background .2s ease, color .2s ease;
}
.kns-unit-arrow .ui-icon { width: 16px; height: 16px; }
.kns-unit-open:hover .kns-unit-arrow, .kns-unit-open:focus-visible .kns-unit-arrow {
  opacity: 1; transform: translateX(-3px); background: var(--kn-soft); color: var(--kn-deep);
}
.kns-unit-card .kn-unit-cover {
  align-self: flex-start; padding: 3px 9px; border-radius: 999px;
  border: 1px solid #efe6da; background: #fbf7f2; color: #7a6e60; font-size: .69rem; font-weight: 800;
  transition: border-color .2s ease, background .2s ease, color .2s ease;
}
.kns-unit-card:hover .kn-unit-cover { border-color: var(--kn-line); background: var(--kn-soft); color: var(--kn-deep); }
.kns-unit-foot { position: relative; z-index: 1; padding: 0 14px 14px; }
.kns-unit-exam {
  position: relative; overflow: hidden; display: flex; align-items: center; justify-content: center; gap: 7px;
  width: 100%; padding: 10px 12px; border-radius: 12px; cursor: pointer; font: inherit;
  font-size: .78rem; font-weight: 900;
  border: 1px solid var(--kn-line); background: var(--kn-soft); color: var(--kn-deep);
  transition: background .2s ease, color .2s ease, border-color .2s ease, box-shadow .2s ease, transform .12s ease;
}
/* برقِ عبوریِ دکمه هنگام هاور */
.kns-unit-exam::after {
  content: ""; position: absolute; top: 0; bottom: 0; left: -60%; width: 26%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .3), transparent);
  transform: skewX(-18deg); transition: left .55s ease;
}
.kns-unit-exam:hover::after { left: 125%; }
.kns-unit-exam .ui-icon { width: 17px; height: 17px; transition: transform .2s ease; }
.kns-unit-exam:hover {
  background: linear-gradient(140deg, var(--kn-color, #c344fd), var(--kn-deep));
  border-color: transparent; color: #fff;
  box-shadow: 0 10px 22px color-mix(in srgb, var(--kn-color, #c344fd) 33%, transparent);
}
.kns-unit-exam:hover .ui-icon { transform: scale(1.08) rotate(-5deg); }
.kns-unit-exam:active { transform: translateY(1px); }
.kns-unit-exam:focus-visible { outline: 2px solid var(--kn-deep); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) {
  .kns-unit-card, .kns-unit-card::before, .kns-unit-card .kn-unit-icon, .kns-unit-card .kn-unit-glyph,
  .kns-unit-arrow, .kns-unit-exam, .kns-unit-exam::after { transition: none; }
}
.kns-list { gap: 16px; }
.kns-card {
  overflow: hidden; border: 1px solid #e5dccf; border-radius: 17px; background: #fff;
  box-shadow: 0 8px 26px rgba(67, 52, 35, .045);
}
.kns-card .sq-item { border: 0; border-radius: 0; }
.kns-card-head {
  display: flex; flex-wrap: wrap; align-items: center; gap: 9px; padding: 10px 14px;
  background: linear-gradient(135deg, #fdf8f3, #fffdfb); border-bottom: 1px solid #f0e9df;
}
.kns-qno {
  padding: 4px 11px; border-radius: 999px; background: #fff2e6; color: #c2410c;
  font-size: .74rem; font-weight: 900; border: 1px solid #f7d8bf;
}
.kns-unit-tag {
  padding: 4px 10px; border-radius: 999px; background: #f8f2ff; color: #7c3aed;
  font-size: .71rem; font-weight: 800; border: 1px solid #e8d8fa;
}
.kns-similar-btn {
  display: inline-flex; align-items: center; gap: 6px; margin-inline-start: auto;
  padding: 7px 13px; border-radius: 10px; cursor: pointer; font: inherit;
  border: 1px solid #d9bdf3; background: #fff; color: #7c3aed; font-size: .75rem; font-weight: 900;
  transition: background .16s ease, border-color .16s ease, transform .16s var(--ease-soft);
}
.kns-similar-btn:hover { background: #f8f2ff; border-color: #b98df0; transform: translateY(-1px); }
.kns-similar-btn b { padding: 1px 7px; border-radius: 999px; background: #f3e9ff; color: #6d28d9; font-size: .68rem; }
.kns-similar-none { margin-inline-start: auto; color: var(--muted); font-size: .72rem; font-weight: 700; }
.kns-target { margin-bottom: 14px; }
.kns-relbar {
  display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 14px;
  padding: 11px 14px; border-radius: 15px; background: #fff; border: 1px solid #e8dfd3;
  box-shadow: 0 8px 24px rgba(67, 52, 35, .04);
}
.kns-relbar .seg-group { background: #f3eee7; border: 1px solid #ece3d7; }
.kns-relbar .seg { color: #847968; gap: 5px; }
.kns-relbar .seg.on { background: #fff; color: #c9510c; box-shadow: 0 3px 9px rgba(91, 62, 34, .1); }
.kns-relbar .seg b { padding: 1px 6px; border-radius: 999px; background: #ece5db; color: #7d7263; font-size: .66rem; font-weight: 900; }
.kns-relbar .seg.on b { background: #fff2e6; color: #c9510c; }
.kns-basis { margin-inline-start: auto; color: var(--muted); font-size: .71rem; font-weight: 700; }
.kns-rel { padding: 4px 10px; border-radius: 999px; font-size: .71rem; font-weight: 850; border: 1px solid transparent; }
.kns-rel-harder { background: #fdecec; color: #c0392b; border-color: #f6d2d2; }
.kns-rel-same   { background: #eef7f5; color: #2f756e; border-color: #d5eae6; }
.kns-rel-easier { background: #eef6ec; color: #3f7a34; border-color: #d8ecd3; }
@media (max-width: 640px) {
  .kns-similar-btn, .kns-similar-none { margin-inline-start: 0; width: 100%; justify-content: center; }
  .kns-basis { margin-inline-start: 0; }
}

/* ── کنکور نوردی: هم‌خانواده‌ها در پنل پاسخ + مودال شرکت در آزمون ── */
.sq-reveal-tabs button b { margin-inline-start: 5px; padding: 1px 6px; border-radius: 999px; background: #f1eae0; color: #7d7263; font-size: .66rem; font-weight: 900; }
.sq-reveal-tabs button.on b { background: #fff2e6; color: #c9510c; }
.kn-fam { display: flex; flex-direction: column; gap: 9px; }
.kn-fam-note { margin: 0; color: var(--muted); font-size: .76rem; font-weight: 700; line-height: 1.8; }
.kn-fam-empty { margin: 0; color: var(--muted); font-size: .78rem; }
.kn-fam-list { display: flex; flex-direction: column; gap: 6px; }
.kn-fam-row {
  display: flex; align-items: center; gap: 10px; width: 100%; padding: 9px 11px; cursor: pointer;
  border: 1px solid #e8dfd3; border-radius: 11px; background: #fff; color: var(--ink);
  font: inherit; font-size: .77rem; text-align: right;
  transition: border-color .16s ease, background .16s ease, transform .16s var(--ease-soft);
}
.kn-fam-row:hover { border-color: #efb27f; background: #fffaf5; transform: translateY(-1px); }
.kn-fam-row.is-konkur { border-color: #e3cdf8; background: #fdfbff; }
.kn-fam-row.is-konkur:hover { border-color: #c58cf2; background: #f8f2ff; }
.kn-fam-tag { display: inline-flex; align-items: center; gap: 5px; min-width: 0; font-weight: 850; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.kn-fam-row.is-konkur .kn-fam-tag { color: #7c3aed; }
.kn-fam-no { flex: 0 0 auto; padding: 2px 8px; border-radius: 999px; background: #fff2e6; color: #c2410c; font-size: .69rem; font-weight: 900; }
.kn-fam-diff { display: inline-flex; align-items: center; gap: 4px; color: var(--muted); font-size: .71rem; font-weight: 700; }
.kn-fam-diff img, .kn-fam-diff svg { width: 15px; height: 15px; }
.kn-fam-uid { margin-inline-start: auto; color: #8d8273; font-size: .69rem; font-weight: 800; }
.kn-fam-go { flex: 0 0 auto; color: var(--muted); display: grid; place-items: center; }
.kn-fam-go .ui-icon { width: 15px; height: 15px; }
.kn-peek-body { display: flex; flex-direction: column; gap: 14px; }
.kn-peek-panel { margin: 0; }

.kne-body { display: flex; flex-direction: column; gap: 15px; }
.kne-field { display: flex; flex-direction: column; gap: 6px; }
.kne-field > span { color: var(--ink); font-size: .78rem; font-weight: 850; }
.kne-field input { height: 40px; padding: 0 12px; border: 1px solid #e6ddd0; border-radius: 11px; background: #fffdfb; font: inherit; }
.kne-section { display: flex; flex-direction: column; gap: 8px; }
.kne-section > b { color: var(--ink); font-size: .78rem; font-weight: 900; }
.kne-hint { color: var(--muted); font-size: .72rem; font-weight: 700; }
.kne-delivery { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 10px; }
.kne-delivery-card {
  display: flex; flex-direction: column; gap: 3px; padding: 12px 13px; cursor: pointer;
  border: 1px solid #e6ddd0; border-radius: 13px; background: #fff;
  transition: border-color .16s ease, background .16s ease, box-shadow .16s ease;
}
.kne-delivery-card.on { border-color: var(--orange); background: var(--orange-soft); box-shadow: 0 6px 16px rgba(255, 107, 24, .12); }
.kne-delivery-card input { position: absolute; opacity: 0; pointer-events: none; }
.kne-dc-title { color: var(--ink); font-size: .82rem; font-weight: 900; }
.kne-dc-desc { color: var(--muted); font-size: .71rem; font-weight: 700; line-height: 1.7; }
.kne-bkmode { width: fit-content; }
/* نقشهٔ دفترچه‌ها در حالت «مشابه کنکور» */
.kne-bkmap {
  display: flex; flex-direction: column; gap: 5px; padding: 9px 11px;
  border: 1px solid #e8dfd3; border-radius: 12px; background: #fdfbf7;
}
.kne-bkmap-row { display: flex; align-items: center; gap: 9px; font-size: .76rem; }
.kne-bkmap-row i {
  flex: 0 0 auto; padding: 2px 9px; border-radius: 999px; font-style: normal;
  background: #fff2e6; color: #c2410c; font-size: .69rem; font-weight: 900;
}
.kne-bkmap-row b { min-width: 0; color: #514a42; font-weight: 800; }
.kne-lessons { display: flex; flex-direction: column; gap: 6px; }
.kne-row {
  display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 9px 11px;
  border: 1px solid #eee6dc; border-radius: 11px; background: #fdfbf8;
}
.kne-row.off { opacity: .5; }
.kne-check { display: flex; align-items: center; gap: 8px; min-width: 128px; cursor: pointer; font-size: .8rem; font-weight: 850; }
.kne-check input { width: 16px; height: 16px; accent-color: var(--orange); }
.kne-count { color: var(--muted); font-size: .73rem; font-weight: 800; }
.kne-time, .kne-bk { display: inline-flex; align-items: center; gap: 6px; margin-inline-start: auto; }
.kne-bk { margin-inline-start: 0; }
.kne-time input, .kne-bk input {
  width: 62px; height: 34px; padding: 0 8px; text-align: center; font: inherit; font-weight: 800;
  border: 1px solid #e6ddd0; border-radius: 9px; background: #fff;
}
.kne-bk input { width: 48px; }
.kne-time i, .kne-bk span { color: var(--muted); font-size: .71rem; font-style: normal; font-weight: 700; }
.kne-switch { display: flex; align-items: flex-start; gap: 9px; cursor: pointer; color: #514a42; font-size: .77rem; font-weight: 700; line-height: 1.8; }
.kne-switch input { margin-top: 3px; width: 16px; height: 16px; accent-color: var(--orange); flex: 0 0 auto; }
.kne-summary {
  display: flex; flex-wrap: wrap; gap: 8px 18px; padding: 12px 14px;
  border: 1px solid #efe6da; border-radius: 13px; background: #faf7f2;
  color: #6d6357; font-size: .77rem; font-weight: 700;
}
.kne-summary b { color: #c9510c; font-size: .95rem; font-weight: 900; }
.kne-summary.over { border-color: #f3c4c4; background: #fdf1f1; }
.kne-summary.over b { color: #c0392b; }
.kne-error { margin: 0; color: #c0392b; font-size: .77rem; font-weight: 800; }

/* ═══════════════ برنامه راهبردی ═══════════════ */
/* فاصلهٔ عمودیِ بلوک‌های برد: قاعدهٔ سراسریِ `.content > *{margin-bottom:22px}`
   هر بلوکِ این صفحه را ۲۲px از بعدی دور می‌کرد و برد کشیده و پراکنده می‌شد.
   اینجا فقط برای برنامه راهبردی به ۱۳px (۴۰٪ کمتر) بسته می‌شود؛ گزینش با دو
   کلاس است تا بدون !important از آن قاعده جلو بزند.                          */
.content > .pl-head,
.content > .pl-modebar,
.content > .pl-next,
.content > .pl-report,
.content > .pl-brandbar,
.content > .pl-cal-grid,
.content > .pl-roadmap,
.content > .pl-exam-head,
.content > .pl-ws { margin-bottom: 13px; }
.content > .pl-modebar { margin-top: 2px; }

.pl-head-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.pl-head-actions > button { white-space: nowrap; }
.pl-head-actions > button .ui-icon { width: 19px; height: 19px; }
.pl-logo {
  display: inline-flex; align-items: center; justify-content: center;
  width: 46px; height: 46px; flex: 0 0 auto; border-radius: 12px; overflow: hidden;
  background: color-mix(in srgb, var(--pl-brand, var(--orange)) 12%, #fff);
  border: 1px solid color-mix(in srgb, var(--pl-brand, var(--orange)) 26%, #fff);
}
.pl-logo > svg, .pl-logo > img { width: 100%; height: 100%; object-fit: contain; display: block; }
.pl-logo-text { font-weight: 900; font-size: 1.2rem; color: var(--pl-brand, var(--orange)); }
/* آیکونِ آپلودشدهٔ منبع: همان قاب لوگو، با کمی فاصلهٔ داخلی تا تصویر نچسبد */
.pl-logo-src { padding: 3px; background: #fff; }
.pl-logo-src > svg, .pl-logo-src > img { width: 100%; height: 100%; object-fit: contain; display: block; }
.pl-logo-src.src-icon-fallback { padding: 5px; color: var(--pl-brand, var(--orange)); }
.pl-chip-logo.pl-logo-src, .pl-cal-logo.pl-logo-src { padding: 2px; }

/* نوار حالت نمایش */
.pl-modebar {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  flex-wrap: wrap; margin: 4px 0 14px;
}
.pl-mode-tabs { display: inline-flex; gap: 4px; padding: 4px; background: #efece4; border-radius: 13px; }
.pl-mode-tab {
  display: inline-flex; align-items: center; gap: 7px; border: 0; background: transparent;
  font: inherit; font-size: .8rem; font-weight: 800; color: var(--muted);
  padding: 8px 16px; border-radius: 10px; cursor: pointer; transition: .16s ease;
}
.pl-mode-tab .ui-icon { width: 20px; height: 20px; }
.pl-mode-tab.on { background: #fff; color: var(--orange); box-shadow: 0 4px 12px rgba(79,58,38,.09); }
.pl-mode-count { font-size: .78rem; font-weight: 700; color: var(--muted); }
.pl-mode-count b { color: var(--ink); font-size: .95rem; font-weight: 900; }

/* نوار سری آزمون‌ها */
.pl-brandbar {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  padding: 12px 14px; margin-bottom: 16px;
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow);
}
.pl-brandbar-title { display: inline-flex; align-items: center; gap: 6px; font-size: .76rem; font-weight: 800; color: var(--muted); }
.pl-brandbar-title .ui-icon { width: 19px; height: 19px; }
.pl-brand-chips { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; flex: 1 1 auto; }
.pl-brand-chip {
  display: inline-flex; align-items: center; gap: 7px; padding: 5px 11px 5px 7px;
  border: 1.5px solid var(--line); border-radius: 999px; background: #fff;
  font: inherit; font-size: .76rem; font-weight: 800; color: var(--muted);
  cursor: pointer; transition: .16s ease;
}
.pl-brand-chip b { font-weight: 800; }
.pl-brand-chip i { font-style: normal; font-size: .68rem; font-weight: 700; opacity: .7; }
.pl-brand-chip.on {
  color: var(--ink);
  border-color: color-mix(in srgb, var(--pl-brand, var(--orange)) 55%, #fff);
  background: color-mix(in srgb, var(--pl-brand, var(--orange)) 9%, #fff);
}
.pl-brand-chip:not(.on) { opacity: .55; }
.pl-brand-all { --pl-brand: var(--teal); }
.pl-brand-all .ui-icon { width: 15px; height: 15px; }
.pl-chip-logo { width: 30px; height: 30px; border-radius: 9px; }
.pl-chip-logo.pl-logo-text { font-size: .9rem; }
.pl-save-btn {
  display: inline-flex; align-items: center; gap: 6px; border: 0; border-radius: 10px;
  background: var(--teal-soft); color: #0e7f70; font: inherit; font-size: .76rem; font-weight: 800;
  padding: 8px 13px; cursor: pointer; transition: .16s ease;
}
.pl-save-btn:hover { background: #d8f2ed; }
.pl-save-btn .ui-icon { width: 18px; height: 18px; }

/* ---------- تقویم ---------- */
.pl-cal-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; align-items: start; }
.pl-cal-month {
  min-width: 0; background: #fff; border: 1px solid #e8e4de; border-radius: var(--radius);
  box-shadow: 0 10px 28px rgba(53, 45, 35, .055); padding: 12px;
}
.pl-cal-head { display: flex; align-items: baseline; gap: 8px; margin-bottom: 10px; }
.pl-cal-head b { font-size: 1rem; font-weight: 900; }
.pl-cal-head small { color: var(--muted); font-weight: 700; }
.pl-cal-head i { margin-inline-start: auto; font-style: normal; font-size: .68rem; font-weight: 800; color: #77716a; background: #f3f1ed; padding: 3px 9px; border-radius: 999px; }
.pl-cal-weekdays, .pl-cal-days { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 3px; }
.pl-cal-weekdays { margin-bottom: 5px; }
.pl-cal-weekdays span { text-align: center; font-size: .68rem; font-weight: 800; color: var(--muted); }
.pl-cal-cell {
  position: relative; min-width: 0; min-height: 64px; border-radius: 9px; padding: 4px 2px;
  border: 1px solid transparent; background: #f8f7f4; display: flex; flex-direction: column; gap: 4px; align-items: center;
}
.pl-cal-cell.empty { background: transparent; }
.pl-cal-day { font-size: .72rem; font-weight: 800; color: #8d8880; }
.pl-cal-cell.has { background: #fff; border-color: #ddd8d1; box-shadow: none; }
.pl-cal-cell.has .pl-cal-day { color: var(--ink); }
.pl-cal-cell.today { border-color: #88827a; background: #f5f4f1; box-shadow: inset 0 0 0 1px #88827a; }
.pl-cal-cell.today .pl-cal-day { color: #393633; font-weight: 900; }
.pl-cal-marks {
  display: grid; grid-template-columns: repeat(2, minmax(0, 20px)); justify-content: center; align-content: start;
  gap: 3px; width: 100%; min-height: 28px;
}
.pl-cal-marks.single { grid-template-columns: minmax(0, 28px); }
.pl-cal-mark {
  position: relative; display: grid; place-items: center; width: 100%; aspect-ratio: 1; min-width: 0; padding: 0;
  border: 0; border-radius: 6px; cursor: pointer; font: inherit; background: transparent;
  transition: transform .14s ease, background .14s ease;
}
.pl-cal-mark:hover, .pl-cal-mark:focus-visible { z-index: 8; transform: translateY(-1px) scale(1.08); background: #f1efeb; outline: 0; }
.pl-cal-logo { width: 100%; height: 100%; max-width: 28px; max-height: 28px; padding: 0 !important; border-radius: 6px; border: 0 !important; background: transparent !important; color: #5f5b55 !important; object-fit: contain; }
.pl-cal-marks:not(.single) .pl-cal-logo { max-width: 20px; max-height: 20px; }
.pl-cal-logo.pl-logo-text { display: grid; place-items: center; font-size: .62rem; }
.pl-cal-tooltip {
  position: absolute; left: 50%; bottom: calc(100% + 7px); z-index: 20;
  width: max-content; max-width: 220px; padding: 6px 9px; border: 1px solid #ded9d1; border-radius: 8px;
  background: #292725; color: #fff; box-shadow: 0 8px 20px rgba(35, 31, 27, .18);
  font-size: .67rem; font-weight: 750; line-height: 1.55; white-space: nowrap;
  opacity: 0; visibility: hidden; pointer-events: none; transform: translate(-50%, 4px); transition: .14s ease;
}
.pl-cal-tooltip::after { content: ""; position: absolute; top: 100%; left: 50%; width: 7px; height: 7px; background: #292725; transform: translate(-50%, -4px) rotate(45deg); }
.pl-cal-mark:hover .pl-cal-tooltip, .pl-cal-mark:focus-visible .pl-cal-tooltip { opacity: 1; visibility: visible; transform: translate(-50%, 0); }

/* ---------- نقشه راه ---------- */
.pl-roadmap { position: relative; padding: 4px 0 24px; }
.pl-rm-rail {
  position: absolute; top: 0; bottom: 0; inset-inline-start: 50%; width: 3px;
  transform: translateX(50%); border-radius: 3px;
  background: linear-gradient(#f0e7db, #e6ddd0);
}
.pl-rm-today {
  position: relative; z-index: 3; display: flex; align-items: center; justify-content: center; gap: 8px;
  margin: 11px auto; width: fit-content; padding: 7px 16px; border-radius: 999px;
  background: var(--orange); color: #fff; box-shadow: 0 8px 20px rgba(255,107,24,.3);
}
.pl-rm-today b { font-size: .8rem; font-weight: 900; }
.pl-rm-today small { font-size: .7rem; opacity: .85; }
.pl-rm-today-dot { width: 9px; height: 9px; border-radius: 50%; background: #fff; box-shadow: 0 0 0 4px rgba(255,255,255,.28); }
.pl-rm-item { position: relative; display: flex; width: 50%; margin-top: var(--pl-gap, 24px); }
.pl-rm-item.pl-rm-start { margin-inline-end: 50%; justify-content: flex-start; padding-inline-end: 30px; }
.pl-rm-item.pl-rm-end { margin-inline-start: 50%; justify-content: flex-end; padding-inline-start: 30px; }
.pl-rm-node {
  position: absolute; top: 14px; z-index: 2;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 50%; background: #fff;
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--pl-brand, var(--orange)) 35%, #fff), 0 6px 14px rgba(79,58,38,.12);
}
.pl-rm-start .pl-rm-node { inset-inline-end: -27px; }
.pl-rm-end .pl-rm-node { inset-inline-start: -27px; }
.pl-rm-logo { width: 52px; height: 52px; border-radius: 50%; border: 0; }
.pl-rm-card {
  position: relative; width: 100%; max-width: 420px; cursor: pointer;
  padding: 12px 14px; border-radius: 15px; background: var(--panel);
  border: 1px solid var(--line); border-inline-start: 4px solid var(--pl-brand, var(--orange));
  box-shadow: var(--shadow); transition: .18s ease;
}
.pl-rm-end .pl-rm-card { border-inline-start: 1px solid var(--line); border-inline-end: 4px solid var(--pl-brand, var(--orange)); }
.pl-rm-item:hover .pl-rm-card { transform: translateY(-2px); box-shadow: 0 16px 34px rgba(41,36,29,.11); }
.pl-rm-item.past .pl-rm-card { opacity: .62; }
.pl-rm-item.past:hover .pl-rm-card { opacity: 1; }
.pl-rm-date {
  display: inline-flex; align-items: baseline; gap: 5px; font-size: .72rem; font-weight: 900;
  color: var(--pl-brand, var(--orange));
}
.pl-rm-date small { font-weight: 700; opacity: .7; }
.pl-rm-name { display: block; margin: 4px 0 5px; font-size: .92rem; font-weight: 900; }
.pl-rm-line {
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
  font-size: .72rem; font-weight: 600; color: var(--muted); line-height: 1.75;
}
.pl-rm-actions { display: flex; margin-top: 9px; }
.pl-mini-btn {
  display: inline-flex; align-items: center; gap: 5px; border: 1px solid var(--line);
  border-radius: 9px; background: #fff; font: inherit; font-size: .72rem; font-weight: 800;
  color: var(--ink); padding: 6px 11px; cursor: pointer; transition: .15s ease;
}
.pl-mini-btn:hover { border-color: var(--orange); color: var(--orange); background: var(--orange-soft); }
.pl-mini-btn .ui-icon { width: 15px; height: 15px; }
.pl-rm-pop {
  position: absolute; top: 0; z-index: 9; width: 320px; padding: 14px;
  border-radius: 15px; background: var(--panel); border: 1px solid var(--line);
  box-shadow: 0 22px 48px rgba(41,36,29,.16);
  opacity: 0; visibility: hidden; transform: translateY(6px); transition: .18s ease; pointer-events: none;
}
.pl-rm-start .pl-rm-pop { inset-inline-start: calc(100% + 6px); }
.pl-rm-end .pl-rm-pop { inset-inline-end: calc(100% + 6px); }
.pl-rm-item:hover .pl-rm-pop, .pl-rm-item.on .pl-rm-pop { opacity: 1; visibility: visible; transform: none; pointer-events: auto; }
.pl-pop-head { display: flex; align-items: center; gap: 9px; margin-bottom: 10px; }
.pl-pop-head b { display: block; font-size: .85rem; font-weight: 900; }
.pl-pop-head small { color: var(--muted); font-size: .7rem; font-weight: 700; }
.pl-pop-logo { width: 44px; height: 44px; }
.pl-pop-note { margin: 8px 0 0; font-size: .72rem; font-weight: 700; color: var(--muted); }
.pl-pop-cta { width: 100%; margin-top: 11px; justify-content: center; }

/* ---------- بودجه‌بندی ---------- */
.pl-budget { list-style: none; margin: 0; padding: 0; display: grid; gap: 7px; }
/* نامِ کتاب ستونِ جدا نیست: با چیپ‌ها در یک جریانِ شکسته می‌آید تا وقتی مباحث به
   خط دوم و سوم می‌روند، زیرِ نامِ کتاب فضای خالیِ بلند نماند (بازخورد کاربر). */
.pl-budget > li {
  display: flex; flex-wrap: wrap; align-items: flex-start; gap: 5px 7px;
  padding: 7px 9px; border-radius: 10px; background: var(--panel-soft); border: 1px solid var(--line);
}
.pl-budget-book { flex: 0 0 auto; padding-top: 3px; font-size: .74rem; font-weight: 900; color: var(--ink); }
/* چیپ‌ها باید فرزندِ مستقیمِ همان فلکس باشند تا در فضای خالی بشکنند */
.pl-budget-val { display: contents; }
.pl-budget-all { font-size: .72rem; font-weight: 900; color: var(--teal); background: var(--teal-soft); padding: 2px 9px; border-radius: 999px; }
.pl-budget-chip {
  display: inline-flex; flex-direction: column; gap: 1px;
  font-size: .7rem; font-weight: 800; color: #6d6357;
  background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 3px 8px;
}
.pl-budget-chip i { font-style: normal; font-size: .64rem; font-weight: 600; color: var(--muted); }
.pl-budget-compact > li { padding: 5px 8px; }
.pl-budget-empty { margin: 0; font-size: .74rem; font-weight: 700; color: var(--muted); }

/* ---------- مودال جزئیات ---------- */
.pl-modal-head { display: flex; align-items: center; gap: 10px; }
.pl-modal-logo { width: 52px; height: 52px; }
.pl-modal-head h2 small { display: block; font-size: .72rem; font-weight: 700; color: var(--muted); margin-top: 2px; }
.pl-modal-meta { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 14px; }
.pl-modal-meta span { display: inline-flex; align-items: center; gap: 5px; font-size: .74rem; font-weight: 800; color: var(--muted); }
.pl-modal-meta .ui-icon { width: 17px; height: 17px; }
.pl-modal-sub { margin: 0 0 8px; font-size: .8rem; font-weight: 900; }

/* ---------- صفحهٔ آزمون (انتخاب محدوده) ---------- */
.pl-exam-head .pl-back { margin-bottom: 8px; }
.pl-exam-title { display: flex; align-items: center; gap: 10px; }
.pl-exam-logo { width: 56px; height: 56px; }
.pl-head-badge {
  align-self: flex-start; font-size: .74rem; font-weight: 800; color: var(--orange);
  background: var(--orange-soft); padding: 7px 14px; border-radius: 999px;
}
.pl-ws { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 16px; align-items: start; }
.pl-ws-main, .pl-ws-card, .pl-ws-cta {
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow);
}
.pl-ws-main { padding: 14px; }
.pl-ws-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.pl-ws-copy strong { display: block; font-size: .85rem; font-weight: 900; }
.pl-ws-copy small { color: var(--muted); font-size: .72rem; font-weight: 700; }
.pl-ws-bulk { display: inline-flex; gap: 7px; }
.pl-tree { display: grid; gap: 3px; max-height: 62vh; overflow-y: auto; padding-inline-end: 4px; }
.pl-tn-row {
  display: flex; align-items: center; gap: 8px; padding: 7px 9px; border-radius: 10px;
  cursor: pointer; transition: .14s ease; border: 1px solid transparent;
}
.pl-tn-row:hover { background: var(--panel-soft); }
.pl-tn-row.has-sel { background: transparent; }
.pl-tn-arr, .pl-tn-arr-ph { width: 14px; flex: 0 0 14px; text-align: center; color: var(--muted); font-size: .7rem; }
.pl-tn-cb input { width: 16px; height: 16px; accent-color: var(--orange); cursor: pointer; }
.pl-tn-lbl { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; line-height: 1.45; color: #1a1814; font-weight: 600; }
.pl-tn-cnt { font-style: normal; font-size: 10px; font-weight: 700; color: #c0bab0; white-space: nowrap; }
.pl-tn-lesson > .pl-tn-row .pl-tn-lbl { font-size: 13px; font-weight: 700; }
.pl-tn-book > .pl-tn-row .pl-tn-lbl { color: #b84500; font-weight: 600; }
.pl-tn-chapter > .pl-tn-row .pl-tn-lbl { font-size: 12px; font-weight: 500; }
.pl-tn-section > .pl-tn-row .pl-tn-lbl { font-size: 11.5px; font-weight: 500; }
.pl-tn-leaf > .pl-tn-lbl { font-size: 11px; color: #555; font-weight: 500; }
.pl-tn-ch { display: none; padding-inline-start: 18px; border-inline-start: 1px dashed var(--line); margin-inline-start: 14px; }
.pl-tn-ch.open { display: block; }
.pl-ws-side { display: grid; gap: 12px; position: sticky; top: 14px; }
.pl-ws-card { padding: 14px; }
.pl-ws-card h4 { display: flex; align-items: center; gap: 6px; margin: 0 0 10px; font-size: .82rem; font-weight: 900; }
.pl-ws-card h4 .ui-icon { width: 19px; height: 19px; color: var(--orange); }
.pl-ws-stats, .pl-ws-lessons { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.pl-ws-stats > li, .pl-ws-lessons > li {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  font-size: .74rem; font-weight: 700; color: var(--muted);
}
.pl-ws-stats b, .pl-ws-lessons b { color: var(--ink); font-size: .88rem; font-weight: 900; }
.pl-ws-lessons { margin-top: 10px; padding-top: 10px; border-top: 1px dashed var(--line); }
.pl-ws-cta { padding: 12px; display: grid; gap: 8px; }
.pl-ws-cta button { width: 100%; justify-content: center; }
.pl-ws-cta button .ui-icon { width: 19px; height: 19px; }
.pl-ws-hint { margin: 0; font-size: .7rem; font-weight: 600; color: var(--muted); line-height: 1.9; }

/* ---------- ساخت آزمون ---------- */
.pl-build-opts { display: flex; gap: 18px; flex-wrap: wrap; margin: 12px 0; }
.pl-build-rows { display: grid; gap: 8px; }
.pl-build-row {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  padding: 9px 11px; border: 1px solid var(--line); border-radius: 12px; background: var(--panel-soft);
}
.pl-build-lesson { font-size: .8rem; font-weight: 900; min-width: 92px; }
.pl-build-avail { font-size: .68rem; font-weight: 700; color: var(--muted); }
.pl-build-num { display: inline-flex; align-items: center; gap: 6px; margin-inline-start: auto; }
.pl-build-num span { font-size: .68rem; font-weight: 800; color: var(--muted); }
.pl-build-num input {
  width: 60px; height: 32px; text-align: center; font-weight: 800;
  border: 1px solid #e6ddd0; border-radius: 9px; background: #fff;
}

/* ---------- پنل مدیریت ---------- */
.pl-adm-toolbar {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  padding: 12px 14px; margin-bottom: 14px;
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow);
}
.pl-adm-toolbar select { height: 36px; border: 1px solid var(--line); border-radius: 10px; padding: 0 10px; background: #fff; font-weight: 700; font-size: .76rem; }
.pl-adm-count { margin-inline-start: auto; font-size: .74rem; font-weight: 800; color: var(--muted); }
.pl-adm-list { display: grid; gap: 8px; }
.pl-adm-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  grid-template-areas: "logo main actions" "logo meta meta";
  align-items: center; gap: 5px 12px;
  padding: 10px 13px; background: var(--panel); border: 1px solid var(--line);
  border-inline-start: 4px solid var(--pl-brand, var(--orange));
  border-radius: 14px; box-shadow: var(--shadow);
}
.pl-adm-logo { grid-area: logo; width: 46px; height: 46px; align-self: center; }
.pl-adm-main { grid-area: main; min-width: 0; }
.pl-adm-main b { display: block; font-size: .84rem; font-weight: 900; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pl-adm-main small { display: block; font-size: .69rem; font-weight: 600; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pl-adm-meta { grid-area: meta; display: flex; align-items: center; gap: 6px 14px; flex-wrap: wrap; min-width: 0; }
.pl-adm-meta > i { display: inline-flex; align-items: center; gap: 5px; font-style: normal; font-size: .7rem; font-weight: 800; color: var(--muted); }
.pl-adm-meta .ui-icon { width: 14px; height: 14px; }
.pl-adm-live { color: var(--teal); }
.pl-adm-actions { grid-area: actions; display: inline-flex; gap: 4px; }
@media (max-width: 620px) {
  .pl-adm-row { grid-template-columns: auto minmax(0, 1fr); grid-template-areas: "logo main" "meta meta" "actions actions"; }
  .pl-adm-actions { justify-content: flex-end; }
}

/* نوارِ ماه‌های پنل مدیریت (۲۰۲۶-۱۰-۱۶): فقط ماهِ انتخاب‌شده رسم می‌شود. */
.pl-adm-months {
  display: flex; gap: 6px; overflow-x: auto; scrollbar-width: thin;
  margin: -4px 0 14px; padding: 2px 2px 8px;
}
.pl-adm-month {
  flex: 0 0 auto; display: inline-flex; align-items: baseline; gap: 5px;
  min-height: 36px; padding: 6px 12px; border: 1px solid var(--line); border-radius: 999px;
  background: var(--panel); color: var(--ink); font: inherit; cursor: pointer; transition: .14s ease;
}
.pl-adm-month b { font-size: .76rem; font-weight: 900; }
.pl-adm-month small { font-size: .66rem; font-weight: 700; color: var(--muted); }
.pl-adm-month i {
  display: inline-flex; align-items: center; gap: 3px; font-style: normal; font-size: .64rem; font-weight: 900;
  color: #77716a; background: #f3f1ed; padding: 2px 7px; border-radius: 999px;
}
.pl-adm-month i .ui-icon, .pl-adm-month i svg { width: 11px; height: 11px; }
.pl-adm-month:hover { border-color: #cfc8bf; }
.pl-adm-month.on { background: var(--orange); border-color: var(--orange); color: #fff; box-shadow: 0 6px 16px rgba(255, 107, 24, .22); }
.pl-adm-month.on small { color: rgba(255, 255, 255, .85); }
.pl-adm-month.on i { background: rgba(255, 255, 255, .22); color: #fff; }
.pl-adm-month.locked:not(.on) { background: #f7f6f3; }
.pl-adm-months.searching .pl-adm-month.on { background: var(--panel); border-color: var(--line); color: var(--ink); box-shadow: none; }
.pl-adm-months.searching .pl-adm-month.on small { color: var(--muted); }
.pl-adm-months.searching .pl-adm-month.on i { background: #f3f1ed; color: #77716a; }
.pl-adm-cloud { color: #7b7f8c; }

/* ماه‌های قفلِ پنل کاربر: «هستند ولی دیده نمی‌شوند». یک blur برای هر ماه. */
.pl-ctx-chip {
  display: inline-flex; align-items: center; gap: 6px; padding: 8px 13px; border-radius: 12px;
  border: 1px solid var(--line); background: var(--panel-soft, #f8f7f4); font-size: .78rem; font-weight: 850; color: var(--ink);
}
.pl-ctx-chip .ui-icon { width: 17px; height: 17px; color: var(--muted); }
.pl-rm-month.locked .pl-rm-month-label { background: #f4f3f1; color: #8a857e; border-style: dashed; }
.pl-rm-cloud {
  position: relative; z-index: 3; display: grid; place-items: center;
  width: min(560px, calc(100% - 24px)); min-height: 112px; margin: 6px auto 4px; overflow: hidden;
  border: 1px dashed #d6d0c7; border-radius: 18px;
  background: linear-gradient(135deg, #fbfaf8, #f1efeb);
}
.pl-rm-cloud-veil {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; gap: 12px;
  padding: 14px; filter: blur(7px); opacity: .55; pointer-events: none;
}
.pl-rm-cloud-card {
  display: grid; grid-template-columns: 34px 1fr; grid-template-rows: auto auto; gap: 6px 8px; align-items: center;
  width: 128px; padding: 10px; border-radius: 12px; background: #fff;
  border-inline-start: 4px solid var(--pl-brand, var(--orange));
}
.pl-rm-cloud-logo { grid-row: span 2; width: 34px; height: 34px; }
.pl-rm-cloud-card i { display: block; height: 8px; border-radius: 4px; background: #d9d4cc; }
.pl-rm-cloud-card i + i { width: 60%; }
.pl-rm-cloud-lock { position: relative; display: grid; justify-items: center; gap: 3px; padding: 12px 18px; text-align: center; }
.pl-rm-cloud-lock b { font-size: .84rem; font-weight: 950; color: #4f4a44; }
.pl-rm-cloud-lock small { font-size: .72rem; font-weight: 800; color: #7d776f; }
.pl-rm-cloud-icon {
  display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%;
  background: #fff; color: #6f6a63; box-shadow: 0 5px 14px rgba(61, 48, 35, .12);
}
.pl-rm-cloud-icon .ui-icon, .pl-rm-cloud-icon svg { width: 17px; height: 17px; }
.pl-cal-month.cloud { position: relative; overflow: hidden; background: #fbfaf8; }
.pl-cal-month.cloud .pl-cal-days, .pl-cal-month.cloud .pl-cal-weekdays { filter: blur(3px); opacity: .6; pointer-events: none; user-select: none; }
.pl-cal-month.cloud .pl-cal-head i { display: inline-flex; align-items: center; gap: 4px; }
.pl-cal-month.cloud .pl-cal-head i .ui-icon { width: 12px; height: 12px; }
.pl-cal-mark.ghost { cursor: default; width: 70%; border-radius: 50%; background: var(--pl-brand, #c9c5bf); opacity: .7; }
.pl-cal-cloud {
  position: absolute; inset: 44px 0 0; display: grid; place-content: center; justify-items: center; gap: 6px;
  text-align: center; pointer-events: none;
}
.pl-cal-cloud small { padding: 4px 11px; border-radius: 999px; background: rgba(255, 255, 255, .92); font-size: .72rem; font-weight: 850; color: #5f5a54; }
.pl-locked-note { display: flex; align-items: center; gap: 12px; padding: 14px; border-radius: 14px; background: #f7f6f3; border: 1px dashed #d6d0c7; }
.pl-locked-note b { display: block; font-size: .86rem; font-weight: 900; }
.pl-locked-note small { display: block; margin-top: 3px; font-size: .74rem; font-weight: 700; color: var(--muted); line-height: 1.8; }
@media (max-width: 620px) {
  .pl-rm-cloud { width: 100%; }
  .pl-rm-cloud-card { width: 96px; }
}

/* مودال «رنگ سری‌ها»: یک ردیف به‌ازای هر منبع، رنگ دستی + بازگشت به خودکار */
.plc-hint { display: flex; align-items: flex-start; gap: 7px; margin: 0 0 12px; font-size: .72rem; font-weight: 700; line-height: 1.9; color: var(--muted); }
.plc-hint svg { width: 15px; height: 15px; flex: 0 0 15px; margin-top: 3px; color: var(--orange); }
.pl-brand-list { display: grid; gap: 8px; }
.pl-brand-row {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 10px; border: 1px solid var(--line); border-radius: 12px; background: var(--panel-soft);
  border-inline-start: 4px solid var(--pl-brand, var(--orange));
}
.pl-brand-row.on { background: var(--panel); box-shadow: inset 0 0 0 1px var(--pl-brand, var(--orange)); }
.pl-brand-row-logo { width: 30px; height: 30px; flex: 0 0 30px; }
.plc-main { flex: 1 1 auto; min-width: 0; display: grid; gap: 2px; }
.plc-main b { font-size: .8rem; font-weight: 900; }
.plc-main small { font-size: .66rem; font-weight: 700; color: var(--muted); }
.plc-sample {
  flex: 0 0 auto; font-size: .64rem; font-weight: 900; padding: 4px 10px; border-radius: 999px;
  color: #fff; background: var(--pl-brand, var(--orange));
}
.pl-brand-color { width: 40px; height: 34px; flex: 0 0 40px; padding: 2px; border: 1px solid var(--line); border-radius: 9px; background: #fff; cursor: pointer; }
.plc-hex {
  width: 92px; flex: 0 0 92px; height: 34px; border: 1px solid var(--line); border-radius: 9px;
  padding: 0 9px; background: #fff; font-family: ui-monospace, Menlo, monospace; font-size: .72rem; font-weight: 700; text-align: center;
}
.plc-hex::placeholder { color: var(--muted); font-weight: 600; opacity: .75; }
@media (max-width: 560px) {
  .pl-brand-row { flex-wrap: wrap; }
  .plc-main { flex: 1 1 100%; }
  .plc-hex { flex: 1 1 auto; width: auto; }
}

/* مودال تعریف آزمون: ردیف اول سری/پایه/رشته، ردیف دوم عنوان/تاریخ */
.pl-edit-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; align-items: end; }
.pl-edit-grid > .pl-source-field,
.pl-edit-grid > .pl-title-field,
.pl-edit-grid > .pl-date-field { grid-column: span 2; }
.pl-source-row { display: flex; align-items: center; gap: 8px; }
.pl-source-row select { flex: 1 1 auto; min-width: 0; }
.pl-source-logo { width: 46px; height: 46px; flex: 0 0 46px; }
.pl-source-color input[type="color"] { width: 38px; height: 36px; padding: 2px; border: 1px solid var(--line); border-radius: 9px; background: #fff; cursor: pointer; }
.pl-date-field .pro-dt-cell { position: relative; }
.pl-note-field { grid-column: 1 / -1; }
.pl-bg-rows { display: grid; gap: 8px; }
.pl-bg-row {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  padding: 9px 11px; border: 1px solid var(--line); border-radius: 12px; background: var(--panel-soft);
}
.pl-bg-lesson { font-size: .8rem; font-weight: 900; min-width: 88px; }
.pl-bg-sum { flex: 1 1 220px; min-width: 0; font-size: .7rem; font-weight: 700; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pl-bg-count { font-style: normal; font-size: .68rem; font-weight: 800; color: var(--orange); background: var(--orange-soft); padding: 3px 9px; border-radius: 999px; }
/* ردیفِ عنوانِ بودجه‌بندی: متنِ راهنما می‌شکند و دکمهٔ «ترتیب کنکوری» ته ردیف می‌نشیند */
/* ⚠️ دکمهٔ «ترتیب کنکوری» ۳۲px بلند است و ردیفِ عنوان را قدبلند می‌کند؛ بدون
   فاصلهٔ بالا مستقیم به کادرِ «تاریخ برگزاری» می‌چسبید (اندازه‌گیری: فاصلهٔ صفر).
   `row-gap` هم لازم است تا وقتی متن راهنما دکمه را به خط دوم می‌فرستد، دکمه
   روی خط بالا نیفتد. */
.pl-edit-body .eb-stage-assignments { margin-top: 18px; }
.pl-edit-body .eb-budget-title { flex-wrap: wrap; row-gap: 8px; align-items: center; margin-bottom: 10px; }
.pl-edit-body .eb-budget-title small { min-width: 0; flex: 1 1 240px; line-height: 1.7; }
.pl-bg-sort { margin-inline-start: auto; }
.pl-bg-add { display: grid; gap: 8px; margin-top: 12px; padding: 10px 11px; border: 1px solid var(--line); border-radius: 12px; background: var(--panel-soft); }
.pl-bg-add-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.pl-bg-add-head > b { display: inline-flex; align-items: center; gap: 6px; font-size: .76rem; font-weight: 900; }
.pl-bg-add-head > b svg { width: 14px; height: 14px; }
.pl-bg-add-head small { font-size: .64rem; font-weight: 700; color: var(--muted); }
.pl-bg-add-tools { display: inline-flex; gap: 6px; }
.pl-bg-add-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.pl-bg-add-chip {
  display: inline-flex; align-items: center; gap: 6px; cursor: pointer;
  padding: 5px 10px; border: 1px solid var(--line); border-radius: 999px;
  background: #fff; font-size: .72rem; font-weight: 800; color: var(--muted);
}
.pl-bg-add-chip.on { border-color: var(--orange); background: var(--orange-soft); color: #a25528; }
.pl-bg-add-chip input { width: 13px; height: 13px; accent-color: var(--orange); margin: 0; }
.pl-bg-add-btn { justify-self: start; }
.pl-bg-add-btn[disabled] { opacity: .5; cursor: not-allowed; }
.pl-edit-preview { margin-top: 14px; padding-top: 12px; border-top: 1px dashed var(--line); }
.pl-edit-preview h4 { display: flex; align-items: center; gap: 6px; margin: 0 0 9px; font-size: .8rem; font-weight: 900; }
.pl-edit-preview h4 .ui-icon { width: 15px; height: 15px; color: var(--orange); }

@media (max-width: 1000px) {
  .pl-ws { grid-template-columns: 1fr; }
  .pl-ws-side { position: static; }
}
@media (max-width: 900px) {
  .pl-rm-rail { inset-inline-start: 22px; transform: none; }
  .pl-rm-item, .pl-rm-item.pl-rm-start, .pl-rm-item.pl-rm-end {
    width: 100%; margin-inline: 0; padding-inline: 46px 0; justify-content: flex-start;
  }
  .pl-rm-start .pl-rm-node, .pl-rm-end .pl-rm-node { inset-inline-start: 4px; inset-inline-end: auto; }
  .pl-rm-end .pl-rm-card { border-inline-start: 4px solid var(--pl-brand, var(--orange)); border-inline-end: 1px solid var(--line); }
  .pl-rm-pop { position: static; width: auto; margin-top: 9px; box-shadow: none; transform: none; display: none; }
  .pl-rm-item.on .pl-rm-pop { display: block; }
  .pl-rm-item:hover .pl-rm-pop { opacity: 1; visibility: visible; }
  .pl-rm-today { margin-inline-start: 0; }
  .pl-cal-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* ══ خط زمانی برنامه راهبردی: محور مرکزی، کارت‌های فشرده و گروه‌بندی هم‌روز ══ */
.pl-brandbar { padding: 10px 12px; gap: 10px; }
.pl-brand-chips { gap: 7px; }
.pl-brand-chip {
  min-height: 42px;
  padding: 5px 9px 5px 6px;
  gap: 6px;
}
.pl-brand-all { min-width: 102px; }
.pl-chip-all-icon {
  display: grid;
  place-items: center;
  color: #0e7f70;
  background: var(--teal-soft);
  border: 1px solid #b9e1d9;
}
.pl-chip-all-icon .ui-icon { width: 20px; height: 20px; }
.pl-save-btn { min-height: 42px; }
.pl-mode-tab[data-pl-mode="roadmap"] .ui-icon { width: 22px; height: 22px; }

.pl-roadmap {
  position: relative;
  max-width: 1180px;
  margin: 0 auto;
  padding: 6px 0 42px;
}
.pl-rm-rail {
  position: absolute;
  top: 42px;
  bottom: 20px;
  inset-inline-start: 50%;
  width: 3px;
  transform: translateX(50%);
  border-radius: 999px;
  background: #c9c5bf;
  box-shadow: 0 0 0 4px rgba(88, 83, 76, .025);
}
.pl-rm-rail::after {
  content: "";
  position: absolute;
  top: calc(100% + 7px);
  left: 50%;
  width: 9px;
  height: 34px;
  transform: translateX(-50%);
  background: radial-gradient(circle, #aaa59e 0 2px, transparent 2.4px) center top / 9px 9px repeat-y;
}
.pl-rm-month {
  position: relative;
  z-index: 4;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  width: 100%;
  margin: 15px 0 8px;
  padding: 0;
  border: 0;
  background: transparent;
  color: #554d44;
  box-shadow: none;
}
.pl-rm-month::before,
.pl-rm-month::after {
  content: "";
  flex: 1 1 auto;
  border-top: 1px dashed #d8cfc4;
}
.pl-rm-month-label {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  padding: 6px 13px;
  border: 1px solid #ddd6cc;
  border-radius: 999px;
  background: #fff;
  box-shadow: 0 5px 14px rgba(61, 48, 35, .07);
}
.pl-rm-month-label strong { font-size: .78rem; font-weight: 950; }
.pl-rm-month-label b { color: var(--muted); font-size: .67rem; }
.pl-rm-today {
  position: relative;
  z-index: 5;
  width: fit-content;
  margin: 9px auto;
  padding: 6px 12px;
  border: 4px solid var(--bg, #f7f6f2);
}
.pl-rm-day { position: relative; z-index: 2; padding: 2px 0 5px; }
.pl-rm-date {
  position: relative;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  width: fit-content;
  min-height: 32px;
  margin: 0 auto 5px;
  padding: 4px 10px;
  border: 2px solid #fff;
  border-radius: 999px;
  background: #f2eee8;
  color: #5c554d;
  box-shadow: 0 0 0 1px #ddd5cb, 0 5px 13px rgba(61, 48, 35, .07);
}
.pl-rm-date > b { color: var(--ink); font-size: .83rem; font-weight: 950; line-height: 1; }
.pl-rm-date > span { margin: 0; font-size: .65rem; font-weight: 850; }
.pl-rm-date > small {
  padding-inline-start: 6px;
  border-inline-start: 1px solid #d8d0c5;
  color: var(--orange);
  font-size: .6rem;
  font-weight: 900;
}
.pl-rm-day-list { display: grid; gap: 2px; }
.pl-rm-item,
.pl-rm-item.pl-rm-start,
.pl-rm-item.pl-rm-end {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 72px minmax(0, 1fr);
  align-items: start;
  width: 100%;
  min-height: 68px;
  margin: 0;
  padding: 2px 0;
  direction: ltr;
}
.pl-rm-item .pl-rm-node {
  position: relative;
  inset: auto;
  top: 0;
  z-index: 4;
  grid-column: 2;
  grid-row: 1;
  justify-self: center;
  width: 48px;
  height: 48px;
  border: 4px solid #fff;
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--pl-brand, var(--orange)) 48%, #fff), 0 6px 14px rgba(64, 45, 27, .11);
}
.pl-rm-logo {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: contain;
}
.pl-rm-item .pl-rm-card {
  position: relative;
  z-index: 3;
  grid-row: 1;
  width: min(100%, 430px);
  max-width: 430px;
  padding: 0;
  overflow: visible;
  cursor: default;
  border: 2px solid color-mix(in srgb, var(--pl-brand, var(--orange)) 62%, #e7ddd1);
  border-radius: 15px;
  background: #fff;
  direction: rtl;
  box-shadow: 0 8px 22px rgba(55, 42, 29, .07);
}
.pl-rm-left .pl-rm-card { grid-column: 1; justify-self: end; margin-right: 34px; }
.pl-rm-right .pl-rm-card { grid-column: 3; justify-self: start; margin-left: 34px; }
.pl-rm-card::before {
  content: "";
  position: absolute;
  top: 23px;
  z-index: -1;
  width: 72px;
  border-top: 2px solid var(--pl-brand, var(--orange));
}
.pl-rm-left .pl-rm-card::before { left: calc(100% + 1px); }
.pl-rm-right .pl-rm-card::before { right: calc(100% + 1px); }
.pl-rm-item:hover .pl-rm-card { transform: none; box-shadow: 0 12px 28px rgba(55, 42, 29, .11); }
.pl-rm-item.past .pl-rm-card { opacity: .72; filter: saturate(.78); }
.pl-rm-item.past:hover .pl-rm-card,
.pl-rm-item.next .pl-rm-card { opacity: 1; filter: none; }
.pl-rm-item.next .pl-rm-card {
  border-color: var(--pl-brand, var(--orange));
  box-shadow: 0 12px 30px color-mix(in srgb, var(--pl-brand, var(--orange)) 15%, transparent);
}
.pl-rm-card-main {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 7px;
  align-items: center;
  width: 100%;
  min-height: 40px;
  padding: 7px 9px 5px;
  border: 0;
  border-radius: 13px 13px 0 0;
  background: transparent;
  color: var(--ink);
  font: inherit;
  text-align: start;
  cursor: pointer;
}
.pl-rm-summary {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  white-space: nowrap;
}
.pl-rm-summary i,
.pl-rm-summary em { flex: 0 0 auto; font-style: normal; font-size: .59rem; font-weight: 850; }
.pl-rm-summary i {
  padding: 2px 6px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--pl-brand, var(--orange)) 10%, #fff);
  color: var(--pl-brand, var(--orange));
}
.pl-rm-summary b { overflow: hidden; min-width: 0; font-size: .78rem; font-weight: 950; text-overflow: ellipsis; }
.pl-rm-summary em { color: var(--muted); }
.pl-rm-expand { display: inline-flex; align-items: center; gap: 3px; color: var(--muted); white-space: nowrap; }
.pl-rm-expand .ui-icon { width: 16px; height: 16px; transition: transform .2s ease; }
.pl-rm-expand small { font-size: .56rem; font-weight: 800; }
.pl-rm-item.on .pl-rm-expand .ui-icon { transform: rotate(180deg); }
.pl-rm-actions {
  display: flex;
  align-items: stretch;
  gap: 6px;
  width: 100%;
  margin: 0;
  padding: 0 8px 8px;
}
.pl-rm-actions .primary-button,
.pl-rm-actions .secondary-button {
  flex: 1 1 auto;
  width: auto;
  min-width: 0;
  height: 31px;
  justify-content: center;
  padding-inline: 8px;
  border-radius: 9px;
  font-size: .66rem;
}
/* دکمهٔ ثبت/نمایش نتیجه: عرضِ محتوا، بدون شکستن خط */
.pl-rm-result {
  flex: 0 0 auto;
  height: 31px;
  padding-inline: 11px;
  border: 1px solid #e7ddd1;
  border-radius: 9px;
  background: #fff;
  color: #6d6357;
  font: inherit;
  font-size: .66rem;
  font-weight: 800;
  white-space: nowrap;
  cursor: pointer;
  transition: .15s ease;
}
.pl-rm-result:hover { border-color: var(--pl-brand, var(--orange)); color: var(--pl-brand, var(--orange)); }
.pl-rm-actions .ui-icon { width: 13px; height: 13px; }
.pl-rm-details {
  display: block;
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  padding: 0 11px;
  border-top: 1px solid transparent;
  transition: max-height .28s ease, opacity .18s ease, padding .22s ease, border-color .22s ease;
}
.pl-rm-item.on .pl-rm-details {
  max-height: 1200px;
  opacity: 1;
  padding: 10px 11px 12px;
  border-top-color: #eee5da;
}

.pl-exam-head .pl-back {
  position: sticky;
  top: 8px;
  z-index: 12;
  min-height: 38px;
  margin-bottom: 11px;
  padding-inline: 12px;
  border: 1px solid #e7ddd1;
  background: rgba(255, 255, 255, .94);
  color: #514940;
  box-shadow: 0 7px 18px rgba(53, 40, 27, .07);
  backdrop-filter: blur(10px);
}
.pl-ws { grid-template-columns: minmax(0, 1fr) 280px; gap: 0; }
.pl-ws-main,
.pl-ws-card,
.pl-ws-cta {
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}
.pl-ws-main { padding: 0 0 0 16px; }
.pl-ws-toolbar {
  margin: 0 4px 9px;
  padding: 0 0 11px;
  border-bottom: 1px solid #ede8de;
}
.pl-ws-side {
  gap: 8px;
  padding-inline-start: 16px;
  border-inline-start: 1px solid #ede8de;
}
.pl-ws-card { padding: 4px 0; }
.pl-ws-cta { padding: 8px 0 0; }
.pl-ws-copy strong { display: flex; align-items: center; gap: 6px; font-size: .92rem; }
.pl-ws-copy strong .ui-icon { width: 20px; height: 20px; color: var(--orange); }
.pl-scope-selected {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 4px 8px;
  padding: 6px 0 8px;
  border: 0;
  border-bottom: 1px solid #ede8de;
  border-radius: 0;
  background: transparent;
  overflow: hidden;
}
.pl-scope-selected > span { flex: 0 0 auto; color: #7a6e61; font-size: .7rem; font-weight: 800; }
.pl-scope-selected > span b { color: var(--orange); font-size: .84rem; }
.pl-scope-selected > div { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 2px; }
.pl-scope-selected button {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  flex: 0 0 auto;
  height: 29px;
  padding: 0 8px;
  border: 1px solid #f0c9aa;
  border-radius: 999px;
  background: #fff;
  color: #6e5b4c;
  font: inherit;
  cursor: pointer;
}
.pl-scope-selected button b { font-size: .68rem; }
.pl-scope-selected button i { min-width: 18px; padding: 1px 5px; border-radius: 999px; background: var(--orange-soft); color: var(--orange); font-style: normal; font-size: .61rem; font-weight: 900; }
.pl-scope-selected button .ui-icon { width: 13px; height: 13px; color: #b26d48; }
.pl-scope-empty { margin: 0 4px 8px; padding: 8px 0 10px; border: 0; border-bottom: 1px solid #ede8de; border-radius: 0; color: var(--muted); font-size: .71rem; font-weight: 700; }
.pl-tree { gap: 0; max-height: 68vh; padding: 4px 2px; }
.pl-tree .pl-tn-ch {
  margin-inline-start: 14px;
  padding-inline-start: 8px;
  border-inline-start: 2px solid #ede8de;
}
.pl-tn-lesson {
  overflow: visible;
  border: 0;
  border-radius: 0;
  background: transparent;
}
.pl-tn-lesson > .pl-tn-row { min-height: 36px; padding: 6px 8px; border-radius: 9px; background: transparent; }
.pl-tn-lesson > .pl-tn-ch {
  margin: 0 14px 0 0;
  padding: 0 8px 0 0;
  border-inline-start: 2px solid #ede8de;
}
/* هم‌شکل با ردیف‌های پاپ‌آپ موضوعِ بانک: بدون کادر و پس‌زمینهٔ رنگی؛
   انتخاب فقط با نارنجی‌شدنِ برچسب و شمارنده دیده می‌شود. */
.pl-tn-row { min-height: 34px; padding: 6px 8px; border: 0; border-radius: 9px; background: transparent; }
.pl-tn-row:hover { background: #f5f1eb; }
.pl-tn-row.has-sel > .pl-tn-lbl { color: var(--orange); }
.pl-tn-row.has-sel > .pl-tn-arr { color: var(--orange); }
.pl-tn-leaf { cursor: default; }
.pl-tn-leaf:hover { background: #f6f2ec; }
.pl-tn-leaf.pl-tn-picked { background: transparent; }
.pl-tn-leaf.pl-tn-picked > .pl-tn-lbl { color: #c85000; font-weight: 700; }
.pl-tn-cb { display: grid; place-items: center; width: 20px; height: 20px; padding: 3px 2px; }
.pl-tn-cb input { width: 14px; height: 14px; }
.pl-tn-cnt { min-width: 36px; padding: 0; background: transparent; color: #b9b2a8; text-align: center; font-size: 10px; font-weight: 700; white-space: nowrap; }
.pl-tn-row.has-sel > .pl-tn-cnt { color: var(--orange); }
.pl-ws-lessons > li { min-height: 27px; }
.pl-ws-lessons > li button { display: grid; place-items: center; width: 24px; height: 24px; padding: 0; border: 0; border-radius: 7px; background: #fff1eb; color: #bf633c; cursor: pointer; }
.pl-ws-lessons > li button .ui-icon { width: 13px; height: 13px; }

.lesson-source-all { width: fit-content; color: var(--muted); font-size: 9px; font-weight: 700; }
.lesson-source-chips { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.lesson-source-chips > i { display: inline-flex; align-items: center; gap: 4px; padding: 2px 6px; border: 1px solid #e8dfd4; border-radius: 999px; background: #fff; color: #71685f; font-style: normal; font-size: 8.5px; font-weight: 750; }
.lesson-source-chip-logo { width: 17px; height: 17px; border-radius: 5px; }
/* لوگوی منبع همان چیزی است که مدیر آپلود کرده: SVGای با width="800px" یا PNGای
   ۲۰۰۰ پیکسلی. کادر باید خودش قیچی کند و محتوا را به اندازهٔ خودش برساند، وگرنه
   لوگو با اندازهٔ طبیعی روی کلِ مودال پخش می‌شود. */
.lesson-source-logo,
.lesson-source-chip-logo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: #fff;
}
.lesson-source-logo > svg,
.lesson-source-logo > img,
.lesson-source-chip-logo > svg,
.lesson-source-chip-logo > img {
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  display: block;
}
.lesson-source-logo.src-icon-fallback > svg,
.lesson-source-chip-logo.src-icon-fallback > svg { width: 60%; height: 60%; color: var(--muted); }
.lesson-source-help { margin: 3px 0 8px; color: var(--muted); font-size: 10px; font-weight: 650; }
.lesson-source-picker { display: grid; grid-template-columns: repeat(auto-fill, minmax(155px, 1fr)); gap: 7px; max-height: 280px; overflow-y: auto; padding: 3px; }
.lesson-source-option { display: flex; align-items: center; gap: 8px; min-height: 50px; padding: 7px 9px; border: 1px solid #e7ddd1; border-radius: 11px; background: #fff; cursor: pointer; transition: .15s ease; }
.lesson-source-option:hover { border-color: #efb98f; background: #fffaf6; }
.lesson-source-option.on { border-color: var(--orange); background: var(--orange-soft); box-shadow: 0 0 0 2px rgba(255, 107, 24, .08); }
.lesson-source-option input { width: 15px; height: 15px; accent-color: var(--orange); }
.lesson-source-option > span:last-child { display: grid; min-width: 0; }
.lesson-source-option b { overflow: hidden; font-size: 10.5px; text-overflow: ellipsis; white-space: nowrap; }
.lesson-source-option small { color: var(--muted); font-size: 8.5px; }
.lesson-source-logo { width: 30px; height: 30px; flex: 0 0 30px; border-radius: 8px; }
.lesson-source-empty { padding: 15px; border: 1px dashed var(--line); border-radius: 11px; color: var(--muted); text-align: center; font-size: 10px; }

/* هماهنگی ابعاد کنترل‌های ردیف در پنل مدیریت */
.pl-adm-actions > .row-action { min-width: 32px; width: 32px; height: 32px; padding: 0; justify-content: center; }
.pl-adm-actions > .row-action .ui-icon { width: 17px; height: 17px; }

.nav-item[data-view="exam-builder"] .nav-icon,
.nav-item[data-sview="exams"] .nav-icon { width: 21px; height: 21px; margin-inline: -1px; stroke-width: 1.9; }
/* همهٔ کنترل‌های ردیف اول/دوم هم‌قد ۴۶ پیکسل — از جمله سلکتِ داخلِ ردیفِ سری آزمون */
.pl-edit-grid .field > input,
.pl-edit-grid .field > select,
.pl-edit-grid .pl-source-row > select,
.pl-edit-grid .pro-dt-btn { height: 46px; min-height: 46px; }
.pl-date-field .pro-dt-btn > span { text-align: start; }
.pl-source-logo { width: 52px; height: 52px; flex-basis: 52px; }
.pl-bg-row > .ew-drag-handle { flex: 0 0 auto; }
.pl-bg-rank { display: grid; place-items: center; min-width: 22px; height: 22px; border-radius: 7px; background: var(--panel); border: 1px solid var(--line); font-size: .65rem; color: var(--muted); }
.pl-bg-row.dragging { opacity: .55; border-style: dashed; }
.pl-bg-sum { display: grid; gap: 3px; white-space: normal; }
.pl-bg-sum > b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

@media (max-width: 1000px) {
  .pl-ws { grid-template-columns: 1fr; }
  .pl-ws-main { padding: 0; }
  .pl-ws-side {
    position: static;
    margin-top: 14px;
    padding: 12px 0 0;
    border-inline-start: 0;
    border-top: 1px solid #ede8de;
  }
}

@media (max-width: 760px) {
  .pl-cal-grid { grid-template-columns: 1fr; }
  .pl-brandbar { align-items: flex-start; }
  .pl-brandbar-title { width: 100%; }
  .pl-brand-chips { width: 100%; overflow-x: auto; flex-wrap: nowrap; padding-bottom: 2px; }
  .pl-brand-chip { flex: 0 0 auto; }
  .pl-save-btn { width: 100%; justify-content: center; }
  .pl-rm-rail { inset-inline-start: 24px; transform: none; }
  .pl-rm-month { justify-content: flex-start; gap: 6px; }
  .pl-rm-month::before { flex: 0 0 24px; }
  .pl-rm-today,
  .pl-rm-date { margin-inline-start: 0; margin-inline-end: auto; }
  .pl-rm-date { min-height: 29px; padding: 3px 8px; }
  .pl-rm-item,
  .pl-rm-item.pl-rm-start,
  .pl-rm-item.pl-rm-end {
    grid-template-columns: 50px minmax(0, 1fr);
    gap: 9px;
    min-height: 62px;
    padding: 4px 0;
    direction: rtl;
  }
  .pl-rm-item .pl-rm-node { grid-column: 1; width: 44px; height: 44px; border-width: 4px; }
  .pl-rm-logo { width: 36px; height: 36px; }
  .pl-rm-left .pl-rm-card,
  .pl-rm-right .pl-rm-card {
    grid-column: 2;
    justify-self: stretch;
    width: 100%;
    max-width: none;
    margin: 0;
  }
  .pl-rm-left .pl-rm-card::before,
  .pl-rm-right .pl-rm-card::before {
    right: auto;
    left: 100%;
    width: 34px;
  }
  .pl-rm-card-main { padding: 8px 10px 5px; }
  .pl-rm-actions { padding: 0 10px 8px; }
  .pl-rm-details { padding-inline: 10px; }
  .pl-rm-item.on .pl-rm-details { padding: 9px 10px 11px; }
  .pl-scope-selected { align-items: flex-start; flex-direction: column; }
  .pl-scope-selected > div { width: 100%; }
  .lesson-source-picker { grid-template-columns: 1fr; }
  .pl-bg-row { align-items: flex-start; }
  .pl-edit-grid { grid-template-columns: 1fr; }
  .pl-edit-grid > .pl-source-field,
  .pl-edit-grid > .pl-title-field,
  .pl-edit-grid > .pl-date-field { grid-column: 1 / -1; }
}


/* ── پراکندگی سطح سؤال‌های انتخاب‌شده (پیکر آزمون شخصی و برنامه راهبردی) ── */
.ep-spread {
  margin-top: 14px; padding: 12px 13px;
  border: 1px solid var(--line); border-radius: 13px; background: var(--panel-soft);
}
.ep-spread-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin-bottom: 9px; }
.ep-spread-head span { font-size: .76rem; font-weight: 800; color: var(--ink); }
.ep-spread-head b { font-size: .74rem; font-weight: 800; color: var(--orange); }
.ep-spread-bar { display: flex; height: 26px; border-radius: 8px; overflow: hidden; background: #ece7de; }
.ep-spread-part {
  flex: 0 0 auto; width: calc(var(--ep-w) * 1%); min-width: 22px;
  display: flex; align-items: center; justify-content: center;
  font-style: normal; transition: width .2s ease;
}
.ep-spread-part b { font-size: .68rem; font-weight: 800; color: #fff; }
.ep-spread-part.lv-1 { background: #4aa96c; }
.ep-spread-part.lv-2 { background: #e0a92b; }
.ep-spread-part.lv-3 { background: #e07b39; }
.ep-spread-part.lv-4 { background: #cf4b4b; }
.ep-spread-legend { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-top: 9px; }
.ep-spread-legend span { display: inline-flex; align-items: center; gap: 5px; font-size: .7rem; font-weight: 700; color: var(--muted); }
.ep-spread-legend b { margin-inline-start: 2px; color: var(--ink); font-weight: 800; }
.ep-spread-legend i { width: 9px; height: 9px; border-radius: 3px; }
.ep-spread-legend .lv-1 i { background: #4aa96c; }
.ep-spread-legend .lv-2 i { background: #e0a92b; }
.ep-spread-legend .lv-3 i { background: #e07b39; }
.ep-spread-legend .lv-4 i { background: #cf4b4b; }
.ep-spread-note { margin: 0; font-size: .72rem; font-weight: 600; color: var(--muted); }
.ep-spread.empty { background: transparent; border-style: dashed; }

/* ══════ برنامه راهبردی: پوشش، شمارش معکوس، ضعف‌ها، نتیجه و مقایسه ══════ */
.pl-mode-tools { display: inline-flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.pl-tool-btn {
  display: inline-flex; align-items: center; gap: 6px; padding: 7px 12px;
  border: 1px solid var(--line); border-radius: 10px; background: #fff;
  font: inherit; font-size: .74rem; font-weight: 800; color: var(--muted); cursor: pointer; transition: .15s ease;
}
.pl-tool-btn .ui-icon { width: 15px; height: 15px; }
.pl-tool-btn:hover { border-color: var(--orange); color: var(--orange); }
.pl-tool-btn.on { background: var(--orange-soft); border-color: color-mix(in srgb, var(--orange) 40%, #fff); color: var(--orange); }

/* شمارش معکوس آزمون بعدی */
.pl-next {
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
  padding: 14px 16px; margin-bottom: 14px;
  background: var(--panel); border: 1px solid var(--line);
  border-inline-start: 5px solid var(--pl-brand, var(--orange));
  border-radius: var(--radius); box-shadow: var(--shadow);
}
.pl-next.hot { background: linear-gradient(90deg, #fff6f2, var(--panel) 55%); }
.pl-next-logo { width: 48px; height: 48px; }
.pl-next-main { flex: 1 1 190px; min-width: 0; }
.pl-next-eyebrow { display: block; font-size: .66rem; font-weight: 800; color: var(--pl-brand, var(--orange)); }
.pl-next-name { display: block; margin: 2px 0; font-size: .95rem; font-weight: 900; }
.pl-next-date { color: var(--muted); font-size: .72rem; font-weight: 700; }
.pl-next-count { text-align: center; padding: 0 10px; }
.pl-next-count b { display: block; font-size: 1.6rem; font-weight: 900; line-height: 1.1; color: var(--pl-brand, var(--orange)); }
.pl-next-count span { font-size: .66rem; font-weight: 700; color: var(--muted); }
.pl-next-cta { white-space: nowrap; }

/* نقاط ضعف */
.pl-weak h4 .ui-icon { color: #d8734a; }
.pl-weak-list { list-style: none; margin: 0 0 8px; padding: 0; display: grid; gap: 5px; }
.pl-weak-list > li { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 6px 9px; border-radius: 9px; background: #fff7f3; }
.pl-weak-list > li.bad { background: #fdf0ef; }
.pl-weak-list b { display: block; font-size: .74rem; font-weight: 800; }
.pl-weak-list small { display: block; font-size: .64rem; font-weight: 600; color: var(--muted); }
.pl-weak-list i { font-style: normal; font-size: .8rem; font-weight: 900; color: #cf4b4b; }
.pl-weak-list > li.mid i { color: #d8934a; }
.pl-weak-untouched { margin: 0 0 8px; font-size: .69rem; font-weight: 700; color: var(--muted); }
.pl-weak-empty { margin: 0; font-size: .71rem; font-weight: 600; color: var(--muted); line-height: 1.8; }
.pl-weak-actions { display: flex; flex-wrap: wrap; gap: 6px; }
.pl-weak-actions .pl-mini-btn { flex: 1 1 auto; justify-content: center; }

/* ثبت نتیجه روی کارت خط زمانی */
.pl-rm-result.done { border-color: color-mix(in srgb, var(--teal) 50%, #fff); background: var(--teal-soft); color: #0e7f70; }
.pl-rm-result.done:hover { border-color: var(--teal); color: #0b6a5d; }
.pl-rm-compare {
  display: block; margin-top: 6px; padding: 4px 9px; border: 1px solid var(--line);
  border-radius: 8px; background: #fff; font: inherit; font-size: .62rem; font-weight: 800;
  color: var(--muted); cursor: pointer; white-space: nowrap;
}
.pl-rm-compare:hover { border-color: var(--orange); color: var(--orange); }

/* مودال ثبت نتیجه */
.pl-result-rows { display: grid; gap: 8px; margin-bottom: 12px; }
.pl-result-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 9px 11px; border: 1px solid var(--line); border-radius: 11px; background: var(--panel-soft); }
.pl-result-row b { font-size: .8rem; font-weight: 800; }
/* نشانِ درصد داخلِ خودِ کادر و سمتِ راستِ آن می‌نشیند (اول در DOM ⇒ راست در RTL) */
.pl-pct-field {
  display: inline-flex; align-items: center; gap: 0;
  border: 1px solid #e6ddd0; border-radius: 10px; background: #fff; overflow: hidden;
}
.pl-pct-field:focus-within { border-color: var(--orange); }
.pl-pct-icon {
  display: grid; place-items: center; width: 34px; height: 36px; flex: 0 0 34px;
  background: var(--orange-soft); color: var(--orange); border-inline-end: 1px solid #f0e2d4;
}
.pl-pct-icon .ui-icon { width: 15px; height: 15px; }
.pl-pct-field input { width: 84px; height: 36px; text-align: center; font-weight: 800; border: 0; background: transparent; }
.pl-pct-field input:focus { outline: none; }
/* تراز و رتبه: دو کارتِ هم‌وزن با آیکون */
.pl-result-scores { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 10px; margin-top: 4px; }
.pl-score-card {
  display: flex; align-items: center; gap: 10px; cursor: text;
  padding: 10px 12px; border: 1px solid var(--line); border-radius: 13px; background: var(--panel-soft);
  border-inline-start: 4px solid var(--pl-score, var(--orange));
}
.pl-score-card.taraz { --pl-score: #2471a3; }
.pl-score-card:focus-within { border-color: var(--pl-score); background: #fff; }
.pl-score-icon { display: grid; place-items: center; width: 34px; height: 34px; flex: 0 0 34px; border-radius: 11px; background: color-mix(in srgb, var(--pl-score) 12%, #fff); color: var(--pl-score); }
.pl-score-icon .ui-icon { width: 18px; height: 18px; }
.pl-score-main { display: grid; gap: 1px; flex: 1 1 auto; min-width: 0; }
.pl-score-main b { font-size: .8rem; font-weight: 900; }
.pl-score-main small { font-size: .64rem; font-weight: 700; color: var(--muted); }
.pl-score-card input { width: 88px; height: 38px; flex: 0 0 88px; text-align: center; font-weight: 900; font-size: .86rem; border: 1px solid #e6ddd0; border-radius: 10px; background: #fff; }
.pl-score-card input:focus { border-color: var(--pl-score); outline: none; }
.pl-result-note { margin: 10px 0 0; font-size: .68rem; font-weight: 700; color: var(--muted); }

/* مقایسهٔ بودجه */
.pl-compare-top { display: flex; align-items: center; gap: 12px; padding: 12px 14px; margin-bottom: 14px; border-radius: 13px; background: var(--orange-soft); }
.pl-compare-top b { font-size: 1.5rem; font-weight: 900; color: var(--orange); }
.pl-compare-top span { font-size: .76rem; font-weight: 700; color: #7a5340; line-height: 1.7; }
.pl-compare-top span b { font-size: inherit; }
.pl-compare-top.high { background: var(--teal-soft); }
.pl-compare-top.high > b, .pl-compare-top.high span b { color: #0e7f70; }
.pl-compare-top.high span { color: #17635a; }
.pl-compare-top.low { background: #f6efe6; }
.pl-compare-block { margin-bottom: 12px; }
.pl-compare-block h4 { display: flex; align-items: center; gap: 9px; margin: 0 0 8px; font-size: .78rem; font-weight: 900; }
.pl-compare-block h4 > span { display: grid; gap: 1px; min-width: 0; }
.pl-compare-block h4 small { font-size: .66rem; font-weight: 700; color: var(--muted); }
.pl-compare-logo { width: 48px; height: 48px; flex: 0 0 48px; }
.pl-compare-block > div { display: flex; flex-wrap: wrap; gap: 6px; }
.pl-compare-block > div > span { display: inline-flex; align-items: center; gap: 6px; font-size: .7rem; font-weight: 700; color: #6d6357; background: var(--panel-soft); border: 1px solid var(--line); border-radius: 8px; padding: 4px 9px; }
.pl-compare-block > div > span i { font-style: normal; font-size: .62rem; font-weight: 900; opacity: .7; }
.pl-compare-block.shared > div > span { background: var(--teal-soft); border-color: #cdeae4; color: #0e7f70; }
.pl-compare-block em { font-size: .7rem; color: var(--muted); }
.pl-compare-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 14px; }

@media (max-width: 700px) {
  .pl-next { gap: 10px; }
  .pl-next-count { padding: 0; }
  .pl-next-cta { width: 100%; justify-content: center; }
}

/* ══════ گزارش روند و شرکت در آزمون‌های برگزارشده ══════ */
/* گزارش روند — آکاردئونِ بالای برد؛ پیش‌فرض بسته تا صفحه بلند نشود */
.pl-report { margin: 8px 0 13px; padding: 0; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.pl-report-head {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap; width: 100%;
  padding: 13px 16px; border: 0; background: transparent; font: inherit; text-align: start; cursor: pointer;
}
.pl-report-head:hover { background: var(--panel-soft); }
.pl-report-head b { display: inline-flex; align-items: center; gap: 7px; font-size: .95rem; font-weight: 900; }
.pl-report-head b .ui-icon { width: 18px; height: 18px; color: var(--orange); }
.pl-report-head small { color: var(--muted); font-size: .72rem; font-weight: 700; }
.pl-report-chev { margin-inline-start: auto; display: grid; place-items: center; color: var(--muted); transition: transform .2s ease; }
.pl-report-chev .ui-icon { width: 18px; height: 18px; }
.pl-report.open .pl-report-chev { transform: rotate(180deg); }
.pl-report-panel { display: none; padding: 0 16px 16px; }
.pl-report.open .pl-report-panel { display: block; }
/* نقطه‌ها خودشان دکمه‌اند: هالهٔ نامرئیِ ۱۱px سطحِ کلیک را بزرگ می‌کند */
.plrep-dot { cursor: pointer; }
.plrep-dot-halo { fill: transparent; }
.plrep-dot-core { transition: r .15s ease; stroke: var(--panel); stroke-width: 1.6; }
.plrep-dot:hover .plrep-dot-halo,
.plrep-dot:focus-visible .plrep-dot-halo { fill: color-mix(in srgb, var(--orange) 16%, transparent); }
.plrep-dot:hover .plrep-dot-core { r: 6; }
.plrep-dot:focus { outline: none; }
/* هشدارِ ناهم‌مقیاسیِ تراز بین سری‌ها */
.plrep-warn {
  display: flex; align-items: flex-start; gap: 7px; margin: 0 0 8px; padding: 9px 11px;
  border: 1px solid #cfe3ef; border-radius: 11px; background: #eef6fb;
  font-size: .7rem; font-weight: 700; line-height: 1.75; color: #1d5f83;
}
.plrep-warn .ui-icon { width: 15px; height: 15px; flex: 0 0 15px; margin-top: 2px; color: #2471a3; }
/* نبضِ لوگوی آزمونِ انتخاب‌شده از نمودار — بدون کادر دور کارت */
@keyframes plLogoLive {
  0%, 100% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--pl-brand, var(--orange)) 45%, transparent); transform: scale(1); }
  50% { box-shadow: 0 0 0 10px color-mix(in srgb, var(--pl-brand, var(--orange)) 0%, transparent); transform: scale(1.14); }
}
.pl-logo-live { animation: plLogoLive 1.05s ease-out 3; z-index: 4; }
/* فیلترها افقی کنار هم می‌نشینند (قبلاً سه ردیفِ جدا بودند و فضای عمودیِ خالی
   می‌ساختند)؛ فقط وقتی جا کم بیاید سطر بعد می‌روند. */
.pl-report-filters { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 6px; margin-bottom: 12px; }
.pl-report-filter-row { display: inline-flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.pl-report-filter-row + .pl-report-filter-row { padding-inline-start: 6px; border-inline-start: 1px solid var(--line); margin-inline-start: 4px; }
.pl-report-filter-row > span { font-size: .7rem; font-weight: 800; color: var(--muted); white-space: nowrap; }
.pl-chip {
  display: inline-flex; align-items: center; gap: 5px; padding: 5px 11px;
  border: 1px solid var(--line); border-radius: 999px; background: #fff;
  font: inherit; font-size: .71rem; font-weight: 800; color: var(--muted); cursor: pointer; transition: .15s ease;
}
.pl-chip i { font-style: normal; font-size: .64rem; opacity: .75; }
.pl-chip:hover { border-color: var(--pl-brand, var(--orange)); color: var(--pl-brand, var(--orange)); }
.pl-chip.on { background: color-mix(in srgb, var(--pl-brand, var(--orange)) 12%, #fff); border-color: color-mix(in srgb, var(--pl-brand, var(--orange)) 52%, #fff); color: var(--pl-brand, var(--orange)); }
.plrep-chart-wrap {
  overflow-x: auto; margin-top: 4px; padding: 6px 4px 2px;
  border: 1px solid var(--line); border-radius: 14px; background: var(--panel-soft);
}
/* viewBox ثابت + عرضِ ۱۰۰٪ ⇒ نمودار همیشه تمامِ طولِ کادر را می‌گیرد و ارتفاعش
   متناسب بالا/پایین می‌رود؛ روی موبایل به‌جای فشرده‌شدن، افقی اسکرول می‌شود. */
.plrep-chart { width: 100%; min-width: 540px; height: auto; display: block; }
.plrep-grid { stroke: #e7e1d7; stroke-width: 1; stroke-dasharray: 3 4; }
.plrep-axis { stroke: #d8d0c4; stroke-width: 1.2; }
.plrep-area { opacity: .1; }
/* `direction: ltr` لازم است: در صفحهٔ RTL معنای text-anchor برعکس می‌شود و
   عددهای محور روی خودِ نمودار می‌افتادند. عددها خنثی‌اند، پس LTR امن است. */
.plrep-ytick { fill: #a7a096; font-size: 9.5px; font-weight: 700; text-anchor: end; direction: ltr; }
.plrep-xtick { fill: #857f77; font-size: 9.5px; font-weight: 700; text-anchor: middle; }
.plrep-metrics .pl-chip { min-width: 56px; justify-content: center; }
.plrep-legend { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-top: 8px; }
.plrep-legend span { display: inline-flex; align-items: center; gap: 5px; font-size: .69rem; font-weight: 700; color: var(--muted); }
.plrep-legend i { width: 9px; height: 9px; border-radius: 3px; }
.plrep-summary { display: flex; flex-wrap: wrap; gap: 10px 22px; margin-top: 12px; padding-top: 12px; border-top: 1px dashed var(--line); }
.plrep-summary > div { display: grid; gap: 2px; }
.plrep-summary span { font-size: .67rem; font-weight: 700; color: var(--muted); }
.plrep-summary b { font-size: 1.05rem; font-weight: 900; }
.plrep-summary b.good { color: #2f9e5f; }
.plrep-summary b.mid { color: #d8934a; }
.plrep-summary b.low { color: #cf4b4b; }
.plrep-summary b.up { color: #2f9e5f; }
.plrep-summary b.down { color: #cf4b4b; }
.plrep-points { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 12px; }
.plrep-point {
  display: grid; gap: 1px; min-width: 96px; padding: 7px 10px; text-align: center;
  border: 1px solid var(--line); border-radius: 11px; background: var(--panel-soft); font: inherit; cursor: pointer;
}
.plrep-point:hover { border-color: var(--orange); }
.plrep-point small { font-size: .62rem; font-weight: 700; color: var(--muted); }
.plrep-point b { font-size: .72rem; font-weight: 800; }
.plrep-point i { font-style: normal; font-size: .82rem; font-weight: 900; color: var(--orange); }
.plrep-empty { margin: 0; font-size: .74rem; font-weight: 700; color: var(--muted); }

/* شرکت در آزمون برگزارشده */
.pl-rm-join {
  flex: 0 0 auto; height: 31px; padding-inline: 11px;
  border: 1px solid color-mix(in srgb, var(--teal) 45%, #fff); border-radius: 9px;
  background: var(--teal-soft); color: #0e7f70; font: inherit; font-size: .66rem; font-weight: 800;
  white-space: nowrap; cursor: pointer; transition: .15s ease;
}
.pl-rm-join:hover { background: #d5f0ea; border-color: var(--teal); }
.pl-join-lessons { list-style: none; margin: 0 0 14px; padding: 0; display: grid; gap: 6px; }
.pl-join-lessons > li { display: flex; align-items: center; justify-content: space-between; padding: 8px 11px; border: 1px solid var(--line); border-radius: 10px; background: var(--panel-soft); font-size: .76rem; font-weight: 700; }
.pl-join-lessons b { font-weight: 900; color: var(--orange); }
/* انتخاب کتاب‌های هر درس هنگام شرکت در آزمون برگزارشده */
.pl-join-books { display: flex; flex-wrap: wrap; align-items: center; gap: 5px; flex: 1 1 220px; min-width: 0; }
.pl-join-book {
  display: inline-flex; align-items: center; gap: 5px; cursor: pointer;
  padding: 3px 8px; border: 1px solid var(--line); border-radius: 999px;
  background: var(--panel); font-size: .68rem; font-weight: 800; color: var(--muted);
}
.pl-join-book.on { border-color: var(--orange); background: var(--orange-soft); color: #a25528; }
.pl-join-book input { width: 13px; height: 13px; accent-color: var(--orange); margin: 0; }
.pl-join-book i { font-style: normal; font-size: .62rem; font-weight: 900; opacity: .75; }
.pl-join-row.off { opacity: .55; }
.pl-join-row.dragging { opacity: .55; }
.pl-join-section-field { margin-top: 10px; }
.pl-join-section-hint { display: block; margin-top: 6px; font-size: .66rem; font-weight: 700; color: var(--muted); }
.pl-folder-open { margin-top: 12px; }
.pl-adm-play { color: var(--teal); }
.pl-adm-idle { color: #b9b2a8; }
.pl-adm-actions .row-action.on { color: var(--teal); background: var(--teal-soft); }

/* ── صفحهٔ عمومیِ برنامه راهبردی ──────────────────────────────────────────
   نشانی‌های `/برنامه-راهبردی/...` را سرور رندر می‌کند (backend/seo_pages.py) و
   app.js همان صفحه را به بردِ زندهٔ پنل ارتقا می‌دهد. پوسته همان `store-public`
   است؛ اینجا فقط تفاوت‌ها. */
.plan-public .content { max-width: 1180px; }
.plan-public .store-public-brand .brand-mark { background: none; }
/* دکمهٔ «تمرین و آزمون» وقتی اشتراکِ آن پایه/رشته نیست: پیدا می‌ماند ولی
   وعدهٔ باز بودن نمی‌دهد. حذفش نمی‌کنیم چون کاربر باید بداند چه چیزی هست. */
.pl-rm-go.locked { background: var(--panel-2, var(--panel)); color: var(--muted); border: 1px solid var(--line); box-shadow: none; }
.pl-rm-go.locked .ui-icon { width: 15px; height: 15px; margin-inline-end: 5px; }
.pl-gate-text { margin: 0 0 10px; font-size: .82rem; line-height: 2; color: var(--ink); }
.pl-ctx-note {
  display: flex; align-items: flex-start; gap: 7px; margin: 0 0 14px;
  padding: 9px 12px; border-radius: 12px; background: var(--teal-soft);
  font-size: .72rem; font-weight: 700; line-height: 1.9; color: var(--teal);
}
.pl-ctx-note .ui-icon { width: 16px; height: 16px; flex: 0 0 auto; margin-top: 4px; }
/* نامِ برند در پانویسِ صفحه‌های عمومی: نارنجی و کلیک‌شدنی به صفحهٔ اصلی. */
.store-public-foot .foot-brand { color: var(--orange); font-weight: 900; text-decoration: none; }
.store-public-foot .foot-brand:hover { text-decoration: underline; }

/* ===================================================================
   میز کار سؤال (Question workbench) — بازطراحی «تعریف سؤال»
   نوار بالای چسبان + نوار متای یک‌ردیفه + تب‌های محتوا + ستون طبقه‌بندی
   =================================================================== */
.question-page.qw {
  width: 100%;
  max-width: none;
  padding-bottom: 24px;
}

/* ── نوار بالا: هویت سؤال، چک‌لیست ثبت و دکمه‌های ذخیره ───────────── */
.qw-topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
  /* پدینگ .content را خنثی می‌کند تا نوار تمام‌عرض بچسبد */
  margin: -28px -30px 0;
  padding: 9px 30px;
  background: rgba(247, 246, 242, .93);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.qw-topbar-id { min-width: 0; }
.qw-topbar-id .breadcrumbs { font-size: 9px; margin: 0; }
.qw-topbar-id h1 { margin: 2px 0 0; font-size: 17px; white-space: nowrap; }
.qw-topbar-actions { display: flex; align-items: center; gap: 8px; }
.qw-topbar .primary-button,
.qw-topbar .secondary-button { min-height: 34px; padding: 6px 13px; font-size: 10.5px; }
.qw-ghost-btn {
  height: 34px;
  padding: 0 12px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: var(--muted);
  font-size: 10.5px;
  font-weight: 700;
  cursor: pointer;
}
.qw-ghost-btn:hover { background: #efece5; color: var(--ink); }

/* ── چک‌لیست ثبت: دقیقاً همان شرط‌های اعتبارسنجی ذخیره ───────────── */
.qw-ready { display: flex; align-items: center; justify-content: center; gap: 9px; min-width: 0; }
.qw-ready-label {
  flex: 0 0 auto;
  padding: 5px 11px;
  border-radius: 99px;
  background: var(--orange-soft);
  color: #d9570e;
  font-size: 9.5px;
  font-weight: 800;
  white-space: nowrap;
}
.qw-ready.all-done .qw-ready-label { background: var(--teal-soft); color: #168878; }
.qw-ready-chips { display: flex; flex-wrap: wrap; gap: 5px; }
.qw-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 26px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 99px;
  background: #fff;
  color: #8a8478;
  font-size: 9.5px;
  font-weight: 700;
  white-space: nowrap;
  cursor: pointer;
  transition: .14s;
}
.qw-chip::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: #d8d3c8; transition: .14s; }
.qw-chip.done { border-color: #bfe6dd; background: var(--teal-soft); color: #168878; }
.qw-chip.done::before { background: var(--teal); }
.qw-chip:hover { border-color: var(--orange); color: #d9570e; }

/* ── نوار متا: نوع، سطح دشواری و پوشه در یک ردیف ────────────────── */
.qw-meta {
  display: flex;
  align-items: flex-end;
  flex-wrap: wrap;
  gap: 10px 18px;
  margin: 14px 0 12px;
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: rgba(255, 255, 255, .92);
  box-shadow: 0 5px 18px rgba(46, 39, 29, .03);
}
.qw-meta-cell { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; min-width: 0; }
.qw-meta-grow { flex: 1 1 auto; }
.qw-meta-cell > label {
  display: flex;
  align-items: center;
  gap: 7px;
  color: var(--muted);
  font-size: 9px;
  font-weight: 700;
}
.qw-auto-flag {
  padding: 2px 7px;
  border-radius: 99px;
  background: var(--teal-soft);
  color: #168878;
  font-size: 8px;
  font-weight: 800;
  cursor: help;
}
.qw-folder-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 36px;
  padding: 0 12px;
  border: 1px solid #cfe9e3;
  border-radius: 11px;
  background: var(--teal-soft);
  color: #157a6c;
  font-size: 10.5px;
  font-weight: 800;
}
.qw-folder-chip .ui-icon { width: 14px; height: 14px; }

/* ── نوار «پوشهٔ تصاویر» میز کار سؤال ───────────────────────────────────────
   یک ردیفِ باریک زیر نوار متا: وصل‌بودنِ پوشه، شماره‌های موجود، وضعیتِ شمارهٔ
   جاری و شمارهٔ بعدی. تا وقتی پوشه‌ای وصل نیست عمداً بی‌رنگ و کم‌ارتفاع می‌ماند
   تا کسی که تک‌سؤال وارد می‌کند حواسش پرت نشود. */
.qw-mfolder {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 14px;
  margin: 0 0 12px;
  padding: 8px 14px;
  border: 1px dashed var(--line);
  border-radius: 15px;
  background: #faf9f5;
}
.qw-mfolder.is-on {
  border-style: solid;
  border-color: #cfe8e1;
  background: linear-gradient(90deg, var(--teal-soft), rgba(255, 255, 255, .92));
}
.qw-mfolder-title {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--ink);
  font-size: 11px;
  font-weight: 800;
}
.qw-mfolder-title .ui-icon { width: 15px; height: 15px; color: var(--muted); }
.qw-mfolder.is-on .qw-mfolder-title .ui-icon { color: #168878; }
.qw-mfolder-title b { max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.qw-mfolder-hint { flex: 1 1 320px; margin: 0; color: var(--muted); font-size: 10px; line-height: 1.8; }
.qw-mfolder-hint b {
  display: inline-block;
  padding: 0 5px;
  border-radius: 6px;
  background: #efece4;
  color: #5c5749;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 10px;
}
.qw-mfolder-pick { height: 30px; padding: 0 14px; font-size: 10.5px; }
.qw-mfolder-range,
.qw-mfolder-next,
.qw-mfolder-unknown {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
}
.qw-mfolder-range bdi { color: #5c5749; }
.qw-mfolder-next { color: #7a6a2f; }
.qw-mfolder-unknown { color: #b0763d; cursor: help; }
.qw-mfolder-status { display: inline-flex; align-items: center; flex-wrap: wrap; gap: 6px; }
.qw-mfolder-state {
  display: inline-flex;
  align-items: center;
  height: 22px;
  padding: 0 9px;
  border-radius: 99px;
  font-size: 10px;
  font-weight: 800;
}
.qw-mfolder-state.is-ok { background: #dff2ec; color: #137f70; }
.qw-mfolder-state.is-warn { background: #fdecd8; color: #9a6320; }
.qw-mfolder-state.is-busy { background: #e9e6dc; color: #6b6659; }
.qw-mfolder-part {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: #9b968b;
  font-size: 10px;
  font-weight: 700;
}
.qw-mfolder-part.on { color: #137f70; }
.qw-mfolder-part b { font-weight: 800; }
.qw-mfolder-auto {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #6b6659;
  font-size: 10px;
  font-weight: 700;
  cursor: pointer;
}
.qw-mfolder-actions { display: inline-flex; align-items: center; gap: 6px; margin-inline-start: auto; }
.qw-mfolder-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 27px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #fff;
  color: #5c5749;
  font-size: 10px;
  font-weight: 700;
  cursor: pointer;
}
.qw-mfolder-btn:hover { border-color: #cfc9bb; color: var(--ink); }
.qw-mfolder-btn[disabled] { opacity: .5; cursor: default; }
.qw-mfolder-btn .ui-icon { width: 13px; height: 13px; }
.qw-mfolder-btn.is-danger:hover { border-color: #e5b3ad; color: #b4483c; }

.qw-seg {
  display: inline-flex;
  gap: 4px;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #f6f4ee;
}
.qw-seg-wrap { flex-wrap: wrap; }
.qw-seg-btn {
  display: inline-flex;
  align-items: center;
  height: 30px;
  padding: 0 14px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: #6b6659;
  font-size: 10.5px;
  font-weight: 700;
  cursor: pointer;
  transition: .14s;
}
.qw-seg-btn:hover { background: #ebe7dd; color: var(--ink); }
.qw-seg-btn.on {
  background: #fff;
  color: #d9570e;
  box-shadow: 0 2px 7px rgba(46, 39, 29, .09);
}

/* ── چیدمان دوستونی: محتوا + طبقه‌بندی ─────────────────────────── */
.qw-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) clamp(272px, 25%, 344px);
  gap: 14px;
  align-items: start;
}
.question-form-main.qw-main { display: block; gap: 0; }

/* ── تب‌های محتوا ─────────────────────────────────────────────── */
.qw-tabbar {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px;
  border: 1px solid var(--line);
  border-bottom: 0;
  border-radius: 15px 15px 0 0;
  background: #fbfaf7;
}
.qw-tab {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 36px;
  padding: 0 14px;
  border: 1px solid transparent;
  border-radius: 10px;
  background: transparent;
  color: #6b6659;
  font-size: 11.5px;
  font-weight: 700;
  white-space: nowrap;
  cursor: pointer;
  transition: .14s;
}
.qw-tab:hover { background: #f1eee7; color: var(--ink); }
.qw-tab.on {
  background: #fff;
  border-color: var(--line);
  color: var(--ink);
  box-shadow: 0 2px 8px rgba(46, 39, 29, .07);
}
.qw-tab-badge {
  min-width: 20px;
  height: 20px;
  padding: 0 5px;
  display: grid;
  place-items: center;
  border-radius: 7px;
  background: #ece9e1;
  color: var(--muted);
  font-size: 9px;
  font-weight: 800;
}
.qw-tab.filled .qw-tab-badge { background: var(--teal-soft); color: #168878; }
.qw-tab[data-qw-required]:not(.filled) .qw-tab-badge { background: var(--orange-soft); color: #d9570e; }
.qw-tabbar-tools { margin-inline-start: auto; display: flex; align-items: center; gap: 8px; }
.qw-paste-hint {
  padding: 5px 9px;
  border-radius: 8px;
  background: #f1eee7;
  color: var(--muted);
  font-size: 8.5px;
  font-weight: 700;
  white-space: nowrap;
}
.qw-add-btn { min-height: 32px; padding: 6px 11px; font-size: 10px; border-radius: 9px; }
.qw-ai-btn {
  min-height: 32px;
  gap: 6px;
  padding: 6px 11px;
  border-color: #c9b9ef;
  border-radius: 9px;
  background: linear-gradient(135deg, #f7f3ff, #fff8f1);
  color: #6549a7;
  font-size: 10px;
  font-weight: 850;
  white-space: nowrap;
}
.qw-ai-btn:hover { border-color: #9f82df; background: #f1eaff; color: #53348f; }
.qw-ai-btn .ui-icon { width: 13px; height: 13px; }

.qw-panel {
  padding: 12px;
  border: 1px solid var(--line);
  border-top: 0;
  border-radius: 0 0 15px 15px;
  background: rgba(255, 255, 255, .92);
}
.qw-scope-note { margin: 0 0 10px; }

/* ── مقایسهٔ تصویر و خروجی رونویسی هوشمند ───────────────────────── */
.qai-head > div { min-width: 0; }
.qai-head p { margin: 3px 0 0; color: var(--muted); font-size: 10px; }
.qai-review { display: grid; gap: 12px; background: #f8f6f1; }
.qai-summary { display: flex; flex-wrap: wrap; gap: 8px; }
.qai-summary > span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 10px;
  border: 1px solid #d8e8e2;
  border-radius: 99px;
  background: #f2fbf8;
  color: #527067;
  font-size: 9.5px;
  font-weight: 750;
}
.qai-summary > span b { color: #187b6c; font-size: 10.5px; }
.qai-summary.needs-review > span:first-child { border-color: #f0d2ad; background: #fff7eb; color: #8b6837; }
.qai-summary.needs-review > span:first-child b { color: #bf6a1d; }
.qai-warnings {
  display: grid;
  gap: 5px;
  padding: 9px 12px;
  border: 1px solid #efd3ad;
  border-radius: 11px;
  background: #fff9ef;
  color: #795a30;
  font-size: 10px;
}
.qai-warnings strong { display: flex; align-items: center; gap: 5px; color: #aa621d; }
.qai-warnings strong .ui-icon { width: 13px; height: 13px; }
.qai-warnings ul { margin: 0; padding-inline-start: 20px; line-height: 1.8; }
.qai-compare { display: grid; grid-template-columns: minmax(250px, 34%) minmax(0, 1fr); gap: 12px; align-items: start; }
.qai-source,
.qai-output { min-width: 0; overflow: hidden; border: 1px solid var(--line); border-radius: 14px; background: #fff; }
.qai-source > header,
.qai-output > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 42px;
  padding: 8px 12px;
  border-bottom: 1px solid var(--line);
  background: #fcfbf8;
}
.qai-source > header strong,
.qai-output > header strong { font-size: 11.5px; }
.qai-source > header small,
.qai-output > header small { color: var(--muted); font-size: 8.5px; }
.qai-source > div { display: grid; gap: 9px; max-height: 66vh; overflow: auto; padding: 10px; }
.qai-source figure { margin: 0; overflow: hidden; border: 1px solid #e7dfd3; border-radius: 10px; background: #f3f0e9; }
.qai-source img { display: block; width: 100%; max-height: 58vh; object-fit: contain; background: #ece8df; }
.qai-source figcaption { padding: 6px 8px; color: var(--muted); font-size: 8.5px; overflow-wrap: anywhere; }
.qai-output { max-height: 70vh; overflow-y: auto; }
.qai-section { padding: 12px 14px; }
.qai-section + .qai-section { border-top: 1px solid #ece6dc; }
.qai-section > header { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 9px; }
.qai-section > header label { display: flex; align-items: center; gap: 7px; color: #554d42; font-size: 10.5px; font-weight: 850; cursor: pointer; }
.qai-section > header input { width: 15px; height: 15px; accent-color: var(--teal); }
.qai-section > header small { padding: 3px 7px; border-radius: 7px; background: #f3f0e9; color: var(--muted); font-size: 8.5px; }
.qai-render { padding: 10px 12px; border: 1px dashed #ded5c8; border-radius: 10px; background: #fffdfa; font-size: 12px; }
.qai-render .mktable { max-width: 100%; }
.qai-options { display: grid; gap: 7px; }
.qai-option { display: grid; grid-template-columns: 28px minmax(0, 1fr); gap: 8px; align-items: start; padding: 8px; border: 1px solid #e8e1d6; border-radius: 10px; background: #fffdfa; }
.qai-option > b { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 8px; background: #efebe3; color: #756c5f; }
.qai-option.is-correct { border-color: #9ed8cc; background: #f1fbf8; }
.qai-option.is-correct > b { background: var(--teal); color: #fff; }
.qai-option > div { min-width: 0; line-height: 2; }
.qai-keep-source { display: flex; align-items: flex-start; gap: 9px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; background: #fff; cursor: pointer; }
.qai-keep-source input { margin-top: 3px; accent-color: var(--teal); }
.qai-keep-source span { display: grid; gap: 2px; }
.qai-keep-source b { font-size: 10.5px; }
.qai-keep-source small { color: var(--muted); font-size: 8.5px; line-height: 1.7; }
.qai-footer { gap: 10px; }
.qai-footer > span { flex: 1; color: var(--muted); font-size: 9px; text-align: center; }
.qai-loading { display: grid; gap: 14px; justify-items: center; padding-block: 26px; }
.qai-loader { display: grid; justify-items: center; gap: 6px; text-align: center; }
.qai-loader > span { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 50%; background: #f0e9ff; color: #6845ad; animation: qaiSpin 1.25s linear infinite; }
.qai-loader > span .ui-icon { width: 22px; height: 22px; }
.qai-loader b { color: #54486c; font-size: 12.5px; }
.qai-loader small { color: var(--muted); font-size: 9.5px; }
.qai-loading-images { display: flex; justify-content: center; gap: 8px; max-width: 100%; overflow-x: auto; }
.qai-loading-images img { width: 118px; height: 88px; object-fit: contain; border: 1px solid var(--line); border-radius: 9px; background: #f2efe9; }
@keyframes qaiSpin { to { transform: rotate(360deg); } }

@media (max-width: 820px) {
  .qai-compare { grid-template-columns: 1fr; }
  .qai-source > div { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); max-height: 38vh; }
  .qai-source img { max-height: 32vh; }
  .qai-output { max-height: none; }
  .qai-footer > span { display: none; }
}

/* ── ناحیهٔ تصویر ─────────────────────────────────────────────── */
.qw-media { margin: 0; border: 0; border-radius: 0; overflow: visible; background: transparent; }
.qw-drop { margin: 0; min-height: 78px; padding: 12px 16px; }
.qw-drop.compact { min-height: 54px; padding: 9px 14px; }
.question-page .qw-media-list {
  padding: 10px 0 0;
  gap: 10px;
  /* حداقل عریض تا تصویرها ریز نشوند؛ یک تصویر تمام‌عرض می‌ماند */
  grid-template-columns: repeat(auto-fit, minmax(430px, 1fr));
  align-items: start;
  justify-items: start;
}
/* کارت به عرض خودِ تصویر جمع می‌شود تا دو طرفش کادر سفید نیفتد */
.qw-media .media-card { width: fit-content; max-width: 100%; }
/* تصویر دقیقاً با همان برشی که ساخته شده دیده می‌شود: بدون سقف ارتفاع و بدون
   letterbox. سقفِ ارتفاع + object-fit:contain باعث می‌شد تصویرهای بلند کوچک
   شوند و دو طرفشان کادر سفید بیفتد؛ حالا نسبت ابعاد طبیعی حفظ می‌شود و بزرگ‌تر
   از اندازهٔ واقعی هم کشیده نمی‌شود. */
.qw-media .media-card img {
  width: auto;
  max-width: 100%;
  height: auto;
  max-height: none;
  object-fit: unset;
  margin-inline: auto;
}
.qw-media .media-card-body { display: flex; align-items: center; gap: 7px; padding: 7px; }
.qw-media .media-card-body input { flex: 1 1 auto; height: 28px; font-size: 9.5px; }
.qw-media .image-dimensions { margin: 0; padding: 5px 8px; font-size: 8.5px; white-space: nowrap; }

/* ── هشدارِ قوارهٔ چاپ روی A4 ──────────────────────────────────────────────
   عددهایش در app.js (`QW_PRINT_FIT`) اندازه‌گیری شده‌اند؛ اینجا فقط دیده می‌شود. */
.qw-print-fit {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin: 10px 0 0;
  padding: 9px 11px;
  border: 1px solid #f0d3b4;
  border-radius: 10px;
  background: #fff6ec;
  color: #8a5a1f;
}
.qw-print-fit.is-over { border-color: #f2c4c4; background: #fff1f1; color: #9c3535; }
.qw-print-fit svg { flex: none; width: 15px; height: 15px; margin-top: 1px; }
.qw-print-fit > span { display: grid; gap: 2px; min-width: 0; }
.qw-print-fit strong { font-size: 10.5px; font-weight: 900; }
.qw-print-fit small { color: inherit; font-size: 9.5px; line-height: 1.85; opacity: .88; }
/* نسبتِ ابعاد کنارِ ابعادِ پیکسلی می‌نشیند؛ همان قوارهٔ چیپِ `.image-dimensions` */
.image-ratio {
  padding: 5px 8px;
  border-radius: 8px;
  background: #f6f3ed;
  color: var(--muted);
  font-size: 8.5px;
  font-weight: 800;
  white-space: nowrap;
}
.image-ratio.is-over { background: #fff1f1; color: #9c3535; }
.order-btn.danger:hover:not(:disabled) { border-color: var(--red); color: var(--red); background: var(--red-soft); }

/* ── ردیف‌های درون‌پنلی (چیدمان پاسخ تشریحی) ───────────────────── */
.qw-inline-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px 14px;
  margin: 0 0 11px;
  padding: 8px 11px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fbfaf7;
}
.qw-inline-label { display: flex; flex-direction: column; font-size: 10.5px; font-weight: 700; }
.qw-inline-label small { color: var(--muted); font-size: 8.5px; font-weight: 500; }
.qw-inline-note { color: var(--muted); font-size: 8.5px; }
.qw-layout-ico {
  display: inline-flex;
  gap: 1.5px;
  width: 13px;
  height: 11px;
  margin-inline-end: 6px;
}
.qw-layout-ico.is-horizontal { flex-direction: column; }
.qw-layout-ico b { flex: 1; border-radius: 1px; background: #cfc9bd; }
.qw-seg-btn.on .qw-layout-ico b { background: #ffb07e; }

/* ── گزینهٔ صحیح: یک نوار افقی زیر تصویر صورت سؤال ─────────────── */
.qw-correct {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  margin-top: 12px;
  padding: 10px 13px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fbfaf7;
}
.qw-correct.empty { border-color: #f4cdad; background: var(--orange-soft); }
.qw-correct-picker { display: flex; gap: 7px; }
.qw-correct-btn {
  width: 44px;
  height: 38px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
  transition: .14s;
}
.qw-correct-btn:hover { border-color: #8fd0c4; background: #f3fffd; }
.qw-correct-btn.on { border-color: var(--teal); background: var(--teal); color: #fff; box-shadow: 0 4px 12px rgba(26, 163, 146, .28); }

/* ── ستون طبقه‌بندی ───────────────────────────────────────────── */
/* بدون اسکرول داخلی و بدون sticky: ستون همراه خودِ صفحه بالا و پایین می‌رود،
   پس چرخ ماوس هرجای صفحه — از جمله روی همین ستون — یکسان کار می‌کند.
   کل فرم حالا تقریباً یک صفحه است، پس چسبان‌بودن چیزی اضافه نمی‌کرد و فقط
   اسکرول را دو تکه می‌کرد. برای پریدن به هر بخش، چیپ‌های چک‌لیست بالا هستند. */
.qw-side { align-self: start; }
.qw-card {
  border: 1px solid var(--line);
  border-radius: 15px;
  background: rgba(255, 255, 255, .92);
  overflow: hidden;
}
.qw-card + .qw-card,
.qw-side .book-tags + .qw-card,
.qw-card + .book-tags { margin-top: 10px; }
.qw-card-head {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-bottom: 1px solid var(--line);
  background: #fbfaf7;
}
.qw-card-head strong { font-size: 11.5px; }
.qw-card-count {
  min-width: 21px;
  height: 21px;
  padding: 0 6px;
  display: grid;
  place-items: center;
  border-radius: 7px;
  background: #ece9e1;
  color: var(--muted);
  font-size: 9px;
  font-weight: 800;
}
.qw-card-count.on { background: var(--teal-soft); color: #168878; }
.qw-card-hint {
  margin-inline-start: auto;
  max-width: 130px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--muted);
  font-size: 8.5px;
}
.qw-card-action {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-inline-start: auto;
  height: 27px;
  padding: 0 10px;
  border: 1px solid #f2d4bd;
  border-radius: 8px;
  background: var(--orange-soft);
  color: #d9570e;
  font-size: 9.5px;
  font-weight: 800;
  cursor: pointer;
  transition: .14s;
}
.qw-card-action:hover { background: var(--orange); color: #fff; border-color: var(--orange); }
.qw-card-action .ui-icon { width: 12px; height: 12px; }
.qw-card-body { padding: 10px 12px; }
.qw-empty { margin: 0; color: var(--muted); font-size: 9px; line-height: 1.9; }
.qw-note {
  width: 100%;
  min-height: 54px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fdfcfa;
  font-size: 10px;
  resize: vertical;
}

.qw-topic-chips { display: flex; flex-direction: column; gap: 5px; }
.qw-topic-chip {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 6px 9px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #f8f6f1;
}
.qw-topic-chip b { flex: 0 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 10px; }
.qw-topic-lvl {
  flex-shrink: 0;
  font-style: normal;
  font-size: 8px;
  font-weight: 700;
  color: var(--muted);
  background: #efeae0;
  border-radius: 5px;
  padding: 1px 4px;
}
.qw-topic-chip i {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--muted);
  font-size: 8px;
  font-style: normal;
}
.qw-topic-chip > button {
  flex: 0 0 auto;
  width: 20px;
  height: 20px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}
.qw-topic-chip > button:hover { background: var(--red-soft); color: var(--red); }
.qw-topic-chip > button .ui-icon { width: 11px; height: 11px; }

/* ── معادل مبحث در پایه/رشتهٔ دیگر (کارت طبقه‌بندی) ─────────── */
.qw-eq-mini {
  display: flex;
  align-items: center;
  gap: 5px;
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 8.5px;
}
.qw-eq-mini .ui-icon { width: 11px; height: 11px; }
.qw-eq-note { margin: 0 0 8px; color: var(--muted); font-size: 8.5px; line-height: 1.85; }
/* «انتخاب همه»: میان‌بُرِ تیک‌زدنِ همهٔ پیشنهادها، داخل بدنهٔ کارت می‌ماند تا
   نوار سر کارت (ستون باریکِ ۲۷۲px) دو دکمه‌ای و شکسته نشود. */
.qw-eq-bulk {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 8.5px;
}
.qw-eq-bulk > button {
  margin-inline-start: auto;
  height: 22px;
  padding: 0 9px;
  border: 1px solid #b9e0d7;
  border-radius: 7px;
  background: var(--teal-soft);
  color: #168878;
  font-family: inherit;
  font-size: 8.5px;
  font-weight: 800;
  cursor: pointer;
  transition: .14s;
}
.qw-eq-bulk > button:hover { background: #d7f0ea; }
.qw-eq-bulk > button[data-equiv-all="off"] { border-color: var(--line); background: #f4f2ec; color: var(--muted); }
.qw-eq-group + .qw-eq-group { margin-top: 9px; padding-top: 9px; border-top: 1px dashed var(--line); }
.qw-eq-src {
  display: flex;
  align-items: baseline;
  gap: 6px;
  margin-bottom: 5px;
  min-width: 0;
}
.qw-eq-src b { flex: 0 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 9.5px; }
.qw-eq-src i {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--muted);
  font-size: 8px;
  font-style: normal;
}
.qw-eq-row {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 6px 8px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fdfcfa;
  cursor: pointer;
  transition: .14s;
}
.qw-eq-row + .qw-eq-row { margin-top: 5px; }
.qw-eq-row:hover { border-color: #cfe9e3; background: #f8fdfc; }
.qw-eq-row.on { border-color: #b9e0d7; background: #f2fbf9; }
.qw-eq-row > input { flex: 0 0 auto; width: 13px; height: 13px; accent-color: #17a68b; cursor: pointer; }
.qw-eq-main { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.qw-eq-main b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 9.5px; }
.qw-eq-main i {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--muted);
  font-size: 8px;
  font-style: normal;
}
.qw-eq-tag {
  flex: 0 0 auto;
  padding: 2px 6px;
  border-radius: 6px;
  background: #ece9e1;
  color: var(--muted);
  font-size: 7.5px;
  font-style: normal;
  font-weight: 800;
  white-space: nowrap;
}
.qw-eq-tag.is-link { background: var(--teal-soft); color: #168878; }
/* پایه‌ای که کتابِ سؤالِ ترکیبی را ندارد: پیشنهاد نمی‌شود، ولی دلیلش دیده می‌شود */
.qw-eq-block {
  display: flex;
  align-items: flex-start;
  gap: 5px;
  margin: 0 0 8px;
  padding: 6px 8px;
  border: 1px solid #f0dcb4;
  border-radius: 9px;
  background: #fdf6e7;
  color: #8a6417;
  font-size: 8px;
  line-height: 1.8;
}
.qw-eq-block .ui-icon { flex: 0 0 auto; width: 11px; height: 11px; margin-top: 2px; }
.qw-eq-block b { font-weight: 800; }
.qw-eq-row.warn { border-color: #f0dcb4; background: #fdf8ee; }
.qw-eq-tag.is-warn { background: #f7e7c6; color: #8a6417; }

.qw-source-list { display: flex; flex-direction: column; gap: 8px; }
.qw-source-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto;
  gap: 6px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: #fdfcfa;
}
.qw-source-row.primary { border-color: #cfe9e3; background: #f6fdfb; }
.qw-source-row select,
.qw-source-row input {
  width: 100%;
  min-width: 0;
  height: 32px;
  padding: 0 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  font-size: 9.5px;
}
.qw-source-row .qw-source-main { grid-column: 1 / span 2; }
.qw-source-row .qw-row-remove { grid-column: 3; grid-row: 1; }
.qw-source-row .qw-primary-pick { grid-column: 3; grid-row: 2; }
.qw-primary-pick {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 32px;
  padding: 0 9px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--muted);
  font-size: 9px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
}
.qw-source-row.primary .qw-primary-pick { border-color: var(--teal); background: var(--teal-soft); color: #157a6c; }
.qw-primary-pick input { accent-color: var(--teal); margin: 0; }
.qw-row-remove {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--muted);
  cursor: pointer;
}
.qw-row-remove:hover { border-color: var(--red); background: var(--red-soft); color: var(--red); }
.qw-row-remove .ui-icon { width: 12px; height: 12px; }

.qw-tag-selector { display: flex; flex-wrap: wrap; gap: 5px; }
/* برچسب‌هایی که روی سؤال هستند ولی دیگر در فهرستِ انتخاب نیستند — تیک‌خورده می‌مانند تا پاک نشوند */
.qw-tag-offtype { margin-top: 8px; padding-top: 8px; border-top: 1px dashed var(--line); }
.qw-tag-offtype > small { display: block; margin-bottom: 5px; color: var(--muted); font-size: 9.5px; font-weight: 650; }
.qw-side .book-tags {
  margin: 10px 0 0;
  padding: 10px 12px;
  border-radius: 15px;
  background: rgba(255, 255, 255, .92);
}
.qw-side .book-tags-head { margin-bottom: 8px; }

.qw-flash { animation: qwFlash .9s ease; }
@keyframes qwFlash {
  0%, 100% { box-shadow: 0 0 0 0 rgba(255, 107, 24, 0); }
  30% { box-shadow: 0 0 0 4px rgba(255, 107, 24, .22); }
}

@media (max-width: 1280px) {
  .qw-topbar { grid-template-columns: minmax(0, 1fr) auto; row-gap: 8px; }
  .qw-ready { grid-column: 1 / -1; grid-row: 2; justify-content: flex-start; }
}
@media (max-width: 1360px) {
  .qw-paste-hint { display: none; }
}
@media (max-width: 1120px) {
  .qw-layout { grid-template-columns: minmax(0, 1fr); }
  .qw-card + .qw-card { margin-top: 10px; }
}
@media (max-width: 720px) {
  .qw-topbar { margin: -20px -16px 0; padding: 9px 16px; grid-template-columns: minmax(0, 1fr) auto; }
  /* در موبایل فقط شمارندهٔ چک‌لیست می‌ماند تا نوار چسبان ارتفاع نگیرد */
  .qw-ready { grid-column: 1 / -1; grid-row: 2; }
  .qw-ready-chips { display: none; }
  .qw-topbar-actions { grid-column: 2; grid-row: 1; flex-wrap: wrap; justify-content: flex-end; }
  .qw-topbar-actions .qw-ghost-btn { display: none; }
  .qw-topbar-id h1 { font-size: 15px; }
  .qw-tabbar { flex-wrap: wrap; }
  .qw-tabbar-tools { margin-inline-start: 0; width: 100%; }
  .qw-meta { gap: 10px; }
  .qw-mfolder { gap: 8px 10px; }
  .qw-mfolder-actions { margin-inline-start: 0; width: 100%; }
  .qw-source-row { grid-template-columns: minmax(0, 1fr) auto; }
  .qw-source-row .qw-source-main { grid-column: 1 / span 2; }
}

/* ── حالت تمرکز صفحهٔ تعریف سؤال: بدون نوار ناوبری سایت ───────────── */
.app-shell.question-focus { grid-template-columns: minmax(0, 1fr); }
.app-shell.question-focus > .sidebar,
.app-shell.question-focus > .sidebar-backdrop { display: none; }
/* دکمهٔ منوی موبایل بدون نوار ناوبری کاری نمی‌کند، پس مخفی می‌شود */
.app-shell.question-focus #menuToggle { display: none; }

/* ستون طبقه‌بندی سمت راست (ابتدای جریان RTL) و محتوا سمت چپ */
.qw-layout { direction: rtl; }
.qw-side { grid-column: 1; grid-row: 1; }
.question-form-main.qw-main { grid-column: 2; grid-row: 1; }
.qw-layout { grid-template-columns: clamp(272px, 25%, 344px) minmax(0, 1fr); }

/* در حالت تک‌ستونی، محتوا بالا می‌ماند و طبقه‌بندی زیرش می‌آید */
@media (max-width: 1120px) {
  .qw-side { grid-column: 1; grid-row: 2; }
  .question-form-main.qw-main { grid-column: 1; grid-row: 1; }
}

/* ── نشانهٔ منابعِ منتقل‌شده از سؤال قبلی + دکمهٔ پیش‌نویس ─────────── */
.qw-carried-flag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 21px;
  padding: 0 8px;
  border: 1px solid #cfe9e3;
  border-radius: 99px;
  background: var(--teal-soft);
  color: #157a6c;
  font-size: 8.5px;
  font-weight: 800;
  white-space: nowrap;
  cursor: pointer;
  transition: .14s;
}
.qw-carried-flag:hover { border-color: var(--red); background: var(--red-soft); color: var(--red); }
.qw-draft-btn {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, .8);
  color: #6b6659;
}
.qw-draft-btn:hover { border-color: var(--yellow); background: var(--yellow-soft); color: #97701a; }

/* ===== رفع اشکالِ سؤال: پرسش‌وپاسخ زیرِ هر تست + صفحهٔ پاسخ‌گوییِ مدیر ===== */
.sq-info-act.sq-qd-act { gap: 5px; }
.sq-info-act.sq-qd-act.has-items { border-color: #f3cfb3; background: var(--orange-soft); color: #b4501a; }
.sq-info-act.sq-qd-act.has-items:hover { border-color: var(--orange); }
.sq-info-act.sq-qd-act.on { border-color: var(--orange); background: var(--orange); color: #fff; }
.sq-info-act.sq-qd-act.is-locked { color: var(--muted); background: var(--panel-soft); border-style: dashed; }
.sq-info-act.sq-qd-act.is-locked.has-items { color: #9b6a46; background: #fff8f2; border-color: #f0d6c2; }
.sq-info-act.sq-qd-act span { font-variant-numeric: tabular-nums; }

.qd-host:empty { display: none; }
.qd-panel { margin-top: 14px; border: 1px solid #efe4d8; border-radius: 16px; background: linear-gradient(180deg, #fffaf5 0, var(--panel) 96px); box-shadow: 0 6px 22px rgba(120, 72, 30, .05); overflow: visible; animation: qd-in .22s ease-out; text-align: start; }
@keyframes qd-in { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }
.qd-head { display: flex; align-items: center; gap: 11px; padding: 13px 15px; border-bottom: 1px solid #f3ebe2; }
.qd-head-icon { width: 36px; height: 36px; flex: none; display: grid; place-items: center; border-radius: 11px; background: var(--orange-soft); color: var(--orange); }
.qd-head-icon .ui-icon { width: 19px; height: 19px; }
.qd-head-copy { min-width: 0; flex: 1; }
.qd-head-copy h4 { margin: 0; font-size: 13.5px; font-weight: 800; color: var(--ink); }
.qd-head-copy p { margin: 2px 0 0; font-size: 11px; color: var(--muted); }
.qd-icon-btn { width: 30px; height: 30px; flex: none; display: grid; place-items: center; border: 1px solid transparent; border-radius: 9px; background: transparent; color: var(--muted); cursor: pointer; }
.qd-icon-btn:hover { background: var(--panel); border-color: var(--line); color: var(--ink); }
.qd-icon-btn .ui-icon { width: 15px; height: 15px; }

.qd-thread { display: grid; gap: 10px; padding: 14px 15px; }
.qd-item { position: relative; display: grid; gap: 10px; padding: 13px 14px; border: 1px solid var(--line); border-radius: 14px; background: var(--panel); min-width: 0; }
.qd-item.is-own { border-color: #f3d9c4; }
.qd-item.is-own.is-pending { border-style: dashed; background: #fffcf9; }
.qd-item.is-edu { border-color: #d7ccf3; background: linear-gradient(180deg, #faf8ff 0, var(--panel) 70px); }
.qd-ask, .qd-reply { display: grid; gap: 8px; min-width: 0; }
.qd-meta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; min-width: 0; }
.qd-meta-end { margin-inline-start: auto; display: inline-flex; gap: 6px; flex-wrap: wrap; }
.qd-time { font-size: 10.5px; color: var(--muted); white-space: nowrap; }
.qd-text { margin: 0; font-size: 12.5px; line-height: 2; color: var(--ink); white-space: pre-wrap; overflow-wrap: anywhere; }
.qd-reply { margin-inline-start: 14px; padding: 11px 13px; border-radius: 12px; background: var(--teal-soft); border-inline-start: 3px solid var(--teal); }
.qd-reply .qd-text { color: #1d3d38; }
.qd-note { margin: 0; display: inline-flex; align-items: center; gap: 6px; font-size: 11px; color: var(--purple); }
.qd-note .ui-icon { width: 13px; height: 13px; }
.qd-waiting { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 9px 11px; border-radius: 10px; background: var(--orange-soft); color: #9a4d1c; font-size: 11px; line-height: 1.8; }
.qd-waiting .ui-icon { width: 15px; height: 15px; flex: none; }
.qd-waiting span { flex: 1; min-width: 180px; }
.qd-link { border: 0; background: none; padding: 2px 4px; font: inherit; font-size: 11px; font-weight: 700; color: var(--muted); cursor: pointer; border-radius: 6px; }
.qd-link.danger { color: var(--red); }
.qd-link:hover, .qd-link.is-armed { background: var(--red-soft); }

/* کسی که پرسیده یا پاسخ داده: نام + لول، و کارتِ کاملش با رفتنِ موس */
.qd-person { position: relative; display: inline-flex; align-items: center; gap: 8px; min-width: 0; max-width: 100%; border-radius: 10px; padding: 2px 2px 2px 6px; cursor: default; outline: none; }
.qd-person:focus-visible { box-shadow: 0 0 0 2px var(--orange); }
.qd-person > .qd-avatar, .qd-compose-box > .qd-avatar, .qd-asker > .qd-avatar { width: 30px; height: 30px; flex: none; border-radius: 50%; overflow: hidden; }
.qd-person-name { display: inline-flex; align-items: center; gap: 6px; min-width: 0; flex-wrap: wrap; }
.qd-person-name b { font-size: 12px; font-weight: 800; color: var(--ink); overflow-wrap: anywhere; }
.qd-badge { display: inline-flex; align-items: center; gap: 3px; padding: 1px 7px; border-radius: 999px; font-style: normal; font-size: 10px; font-weight: 800; white-space: nowrap; }
.qd-badge.is-level { background: var(--purple-soft); color: var(--purple); }
.qd-badge.is-staff { background: #dff4ef; color: #11786b; }
.qd-badge .ui-icon { width: 11px; height: 11px; }
.qd-pop { position: absolute; z-index: 60; top: calc(100% + 8px); inset-inline-start: 0; width: 248px; padding: 14px; display: grid; gap: 12px; border: 1px solid var(--line); border-radius: 16px; background: var(--panel); box-shadow: 0 18px 44px rgba(31, 26, 20, .16); opacity: 0; visibility: hidden; transform: translateY(-4px); transition: opacity .16s ease, transform .16s ease, visibility 0s linear .16s; pointer-events: none; }
.qd-person:hover > .qd-pop, .qd-person:focus > .qd-pop, .qd-person:focus-within > .qd-pop { opacity: 1; visibility: visible; transform: none; transition-delay: .12s, .12s, 0s; }
.qd-pop::before { content: ""; position: absolute; top: -6px; inset-inline-start: 18px; width: 10px; height: 10px; background: var(--panel); border-top: 1px solid var(--line); border-inline-start: 1px solid var(--line); transform: rotate(45deg); }
.qd-pop-top { display: flex; align-items: center; gap: 11px; min-width: 0; }
.qd-pop-top > .qd-pop-avatar { width: 46px; height: 46px; flex: none; border-radius: 50%; overflow: hidden; box-shadow: 0 0 0 3px var(--panel), 0 0 0 4px #f0d6c2; }
.qd-person.is-staff .qd-pop-top > .qd-pop-avatar { box-shadow: 0 0 0 3px var(--panel), 0 0 0 4px #b9e6dd; }
.qd-pop-top > span:last-child { display: grid; gap: 3px; min-width: 0; }
.qd-pop-top b { font-size: 13px; font-weight: 800; color: var(--ink); overflow-wrap: anywhere; }
.qd-pop-top small { font-size: 11px; color: var(--muted); }
.qd-pop-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(60px, 1fr)); gap: 6px; }
.qd-pop-stats > span { display: grid; justify-items: center; gap: 1px; padding: 7px 4px; border-radius: 10px; background: var(--panel-soft); border: 1px solid #f1eee7; }
.qd-pop-stats b { font-size: 15px; font-weight: 900; color: var(--ink); font-variant-numeric: tabular-nums; }
.qd-pop-stats small { font-size: 10px; color: var(--muted); }
.qd-pop-stats > span.is-level { background: var(--purple-soft); border-color: #e3d9fb; }
.qd-pop-stats > span.is-level b { color: var(--purple); }
.qd-pop-foot { font-size: 10.5px; color: var(--muted); border-top: 1px dashed var(--line); padding-top: 9px; }

.qd-status { display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; border-radius: 999px; font-size: 10px; font-weight: 800; white-space: nowrap; background: var(--panel-soft); color: var(--muted); border: 1px solid var(--line); }
.qd-status .ui-icon { width: 11px; height: 11px; }
.qd-status.is-pending { background: var(--orange-soft); color: #b4501a; border-color: #f6d7c1; }
.qd-status.is-published { background: var(--teal-soft); color: #0f7a6d; border-color: #c4ebe3; }
.qd-status.is-hidden { background: var(--purple-soft); color: var(--purple); border-color: #e3d9fb; }
.qd-status.is-edu { background: var(--yellow-soft); color: #8d6a10; border-color: #f2e2ab; }
.qd-status.is-mine { background: var(--panel-soft); color: #9a5a1f; border-color: #f0d6c2; }

.qd-gallery { display: flex; flex-wrap: wrap; gap: 8px; }
.qd-shot { width: 132px; height: 96px; padding: 0; border: 1px solid var(--line); border-radius: 11px; overflow: hidden; background: var(--panel-soft); cursor: zoom-in; }
.qd-shot img { width: 100%; height: 100%; object-fit: cover; display: block; }
.qd-shot img:not([src]) { opacity: 0; }
.qd-shot.is-broken { cursor: default; background: var(--red-soft); }
.qd-lightbox { position: fixed; inset: 0; z-index: 30000; display: grid; place-items: center; padding: 56px 18px 24px; background: rgba(12, 14, 18, .9); animation: qd-in .16s ease-out; }
.qd-lightbox img { max-width: 100%; max-height: 100%; object-fit: contain; border-radius: 10px; }
.qd-lightbox-x { position: absolute; top: 14px; inset-inline-end: 16px; width: 40px; height: 40px; display: grid; place-items: center; border: 0; border-radius: 12px; background: rgba(255, 255, 255, .14); color: #fff; cursor: pointer; }
.qd-lightbox-x .ui-icon { width: 18px; height: 18px; }

.qd-empty { display: grid; justify-items: center; gap: 4px; padding: 18px 12px; text-align: center; border: 1px dashed #ecdccc; border-radius: 14px; background: #fffcf8; }
.qd-empty .ui-icon { width: 24px; height: 24px; color: var(--orange); margin-bottom: 2px; }
.qd-empty b { font-size: 12.5px; color: var(--ink); }
.qd-empty span { font-size: 11px; color: var(--muted); line-height: 1.9; max-width: 380px; }
.qd-error { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: 14px 15px; padding: 10px 12px; border-radius: 11px; background: var(--red-soft); color: var(--red); font-size: 11.5px; line-height: 1.8; }
.qd-error .ui-icon { width: 15px; height: 15px; flex: none; }
.qd-error span { flex: 1; min-width: 160px; }
.qd-error .ghost-button { font-size: 11px; padding: 5px 9px; }
.qd-skel { border-color: #f1eee7; }

/* نوشتنِ پرسش */
.qd-compose { display: grid; gap: 9px; padding: 0 15px 15px; }
.qd-compose-box { display: flex; align-items: flex-start; gap: 10px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 14px; background: var(--panel); transition: border-color .14s ease, box-shadow .14s ease; }
.qd-compose-box:focus-within { border-color: #f3b88d; box-shadow: 0 0 0 3px rgba(255, 107, 24, .1); }
.qd-compose-box textarea { flex: 1; min-width: 0; min-height: 46px; max-height: 260px; resize: vertical; border: 0; outline: 0; background: transparent; font: inherit; font-size: 12.5px; line-height: 1.9; color: var(--ink); padding: 3px 0; }
/* حلقهٔ فوکوسِ سراسریِ textarea اینجا نه: قابِ بیرونی (focus-within) خودش رنگ می‌گیرد. */
.qd-compose-box textarea:focus, .qd-compose-box textarea:focus-visible { outline: 0; box-shadow: none; transform: none; }
.qd-compose-bar, .qd-editor-bar { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; }
.qd-compose-bar small { flex: 1; min-width: 160px; font-size: 10.5px; color: var(--muted); line-height: 1.7; }
.qd-send { padding-inline: 14px; }
.qd-send .ui-icon, .qd-editor .primary-button .ui-icon { width: 14px; height: 14px; transform: scaleX(-1); }
.qd-attach { position: relative; display: inline-flex; align-items: center; gap: 5px; padding: 6px 10px; border: 1px solid var(--line); border-radius: 9px; background: var(--panel-soft); color: var(--ink); font-size: 11px; font-weight: 700; cursor: pointer; overflow: hidden; }
.qd-attach:hover { border-color: #f0b487; }
.qd-attach.is-full { opacity: .55; cursor: default; }
.qd-attach .ui-icon { width: 14px; height: 14px; }
.qd-attach input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.qd-attach:focus-within { outline: 2px solid var(--orange); outline-offset: 2px; }
.qd-attachments { display: flex; flex-wrap: wrap; gap: 8px; }
.qd-attachment { position: relative; display: inline-flex; }
.qd-attachment .qd-shot { width: 84px; height: 64px; }
.qd-attachment.is-reading { width: 84px; height: 64px; display: grid; place-items: center; border: 1px dashed var(--line); border-radius: 11px; color: var(--muted); }
.qd-attachment.is-reading .ui-icon { width: 16px; height: 16px; animation: sx-spin .8s linear infinite; }
.qd-attachment-x { position: absolute; top: -6px; inset-inline-end: -6px; width: 22px; height: 22px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 50%; background: var(--panel); color: var(--red); cursor: pointer; box-shadow: 0 2px 6px rgba(0, 0, 0, .08); }
.qd-attachment-x .ui-icon { width: 12px; height: 12px; }

.qd-intro { display: grid; gap: 14px; }
.qd-intro-lead { margin: 0; display: flex; gap: 10px; align-items: flex-start; padding: 11px 13px; border-radius: 12px; background: var(--orange-soft); color: #7d3f14; font-size: 12px; line-height: 1.95; }
.qd-intro-lead .ui-icon { width: 20px; height: 20px; flex: none; color: var(--orange); margin-top: 3px; }
.qd-rules { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.qd-rules li { display: flex; gap: 11px; align-items: flex-start; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--panel); }
.qd-rule-icon { width: 30px; height: 30px; flex: none; display: grid; place-items: center; border-radius: 9px; background: var(--panel-soft); color: var(--orange); border: 1px solid #f1e6da; }
.qd-rule-icon .ui-icon { width: 15px; height: 15px; }
.qd-rules li > span:last-child { display: grid; gap: 2px; min-width: 0; }
.qd-rules b { font-size: 12.5px; color: var(--ink); }
.qd-rules small { font-size: 11.5px; line-height: 1.85; color: var(--muted); }
.qd-intro-foot { display: flex; align-items: center; gap: 10px; }
.qd-intro-foot .primary-button { margin-inline-start: auto; }
.qd-intro-foot .primary-button .ui-icon { width: 15px; height: 15px; }
.qd-intro-check { display: inline-flex; align-items: center; gap: 7px; font-size: 12px; color: var(--muted); cursor: pointer; user-select: none; }
.qd-intro-check input { width: 16px; height: 16px; accent-color: var(--orange); }
.qd-compose-bar small .qd-link { padding: 0 2px; color: var(--orange); text-decoration: underline; text-underline-offset: 3px; }
/* «تکراری»: پیامِ آمادهٔ خصوصی برای پرسنده و پیوند به پرسش‌وپاسخِ مرتبط */
.qd-status.is-dup { background: var(--blue-soft); color: var(--blue); border-color: #d3e0fb; }
.qd-item.is-duplicate { border-style: dashed; background: var(--panel-soft); }
.qd-item.is-duplicate .qd-reply { background: var(--blue-soft); border-inline-start-color: var(--blue); }
.qd-item.is-duplicate .qd-reply .qd-text { color: #2a3f6e; }
.qd-pop-stats > span.is-dup { background: var(--blue-soft); border-color: #d3e0fb; }
.qd-pop-stats > span.is-dup b { color: var(--blue); }
.qd-jump { justify-self: start; display: inline-flex; align-items: center; gap: 5px; padding: 5px 10px; border: 1px solid #d3e0fb; border-radius: 9px; background: var(--panel); color: var(--blue); font: inherit; font-size: 11px; font-weight: 800; cursor: pointer; }
.qd-jump:hover { border-color: var(--blue); }
.qd-jump .ui-icon { width: 13px; height: 13px; }
.qd-item.is-flash { animation: qd-flash 1.6s ease-out; }
@keyframes qd-flash { 0%, 35% { box-shadow: 0 0 0 3px rgba(255, 107, 24, .35); border-color: var(--orange); } 100% { box-shadow: 0 0 0 0 rgba(255, 107, 24, 0); } }
.qd-tools-hint.is-dup { color: var(--blue); }
.qd-dup-picker { display: grid; gap: 10px; padding: 12px; border: 1px solid #d3e0fb; border-radius: 13px; background: #f7f9ff; }
.qd-dup-picker > header { display: flex; align-items: flex-start; gap: 9px; }
.qd-dup-picker > header .ui-icon { width: 18px; height: 18px; color: var(--blue); flex: none; margin-top: 2px; }
.qd-dup-picker > header div { display: grid; gap: 2px; }
.qd-dup-picker > header b { font-size: 12.5px; color: var(--ink); }
.qd-dup-picker > header small { font-size: 10.5px; color: var(--muted); line-height: 1.8; }
.qd-dup-options { display: grid; gap: 6px; max-height: 220px; overflow: auto; }
.qd-dup-option { display: flex; align-items: flex-start; gap: 8px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--panel); cursor: pointer; }
.qd-dup-option:has(input:checked) { border-color: var(--blue); box-shadow: 0 0 0 2px rgba(70, 118, 232, .12); }
.qd-dup-option input { margin-top: 4px; accent-color: var(--blue); flex: none; }
.qd-dup-option span { display: grid; gap: 1px; min-width: 0; }
.qd-dup-option b { font-size: 11.5px; color: var(--ink); }
.qd-dup-option small { font-size: 11px; color: var(--muted); line-height: 1.8; overflow-wrap: anywhere; }
.qd-dup-empty { margin: 0; font-size: 11px; color: var(--muted); line-height: 1.9; }
.qd-dup-actions { display: flex; justify-content: flex-end; gap: 8px; }
.qd-dup-actions .ghost-button, .qd-dup-actions .primary-button { font-size: 11.5px; padding: 7px 13px; }
.qd-dup-actions .ui-icon { width: 14px; height: 14px; }
/* ===== پنلِ مدیر ===== */
#qdNewEdu { flex: none; white-space: nowrap; }
.qd-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 10px 14px; flex-wrap: wrap; padding: 0 19px 4px 19px; }
.qd-toolbar .qd-tabs { padding: 14px 0 10px; }
.qd-filters { display: flex; gap: 8px; flex-wrap: wrap; }
.qd-select { position: relative; display: inline-flex; align-items: center; }
.qd-select > .ui-icon { position: absolute; inset-inline-start: 10px; width: 14px; height: 14px; color: var(--muted); pointer-events: none; }
.qd-select select { appearance: none; -webkit-appearance: none; min-width: 150px; max-width: 240px; height: 36px; padding: 0 32px 0 12px; padding-inline-start: 30px; border: 1px solid var(--line); border-radius: 10px; background: var(--panel) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23827e75' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat left 11px center; font: inherit; font-size: 11.5px; font-weight: 700; color: var(--ink); cursor: pointer; }
.qd-select select:focus { outline: none; border-color: var(--orange); }
.qd-table { min-width: 860px; }
.qd-table td { vertical-align: middle; }
.qd-row { cursor: pointer; }
.qd-row:hover td { background: #fffaf5; }
.qd-row.has-pending td:first-child { box-shadow: inset -3px 0 0 var(--orange); }
.qd-count-bubble { display: inline-grid; justify-items: center; gap: 1px; min-width: 62px; padding: 6px 8px; border-radius: 12px; background: var(--panel-soft); border: 1px solid var(--line); }
.qd-count-bubble b { font-size: 17px; font-weight: 900; line-height: 1.2; color: var(--ink); font-variant-numeric: tabular-nums; }
.qd-count-bubble i { font-style: normal; font-size: 9.5px; font-weight: 800; color: var(--muted); white-space: nowrap; }
.qd-count-bubble.is-hot { background: var(--orange-soft); border-color: #f6d0b5; }
.qd-count-bubble.is-hot b, .qd-count-bubble.is-hot i { color: #b4501a; }
.qd-latest-cell { max-width: 340px; }
.qd-latest { display: flex; align-items: center; gap: 9px; min-width: 0; }
.qd-latest > span[dir] { min-width: 0; font-size: 11.5px; color: var(--ink); overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; line-height: 1.8; }
.qd-askers { display: inline-flex; flex: none; }
.qd-asker { display: inline-flex; border-radius: 50%; box-shadow: 0 0 0 2px var(--panel); }
.qd-asker + .qd-asker { margin-inline-start: -9px; }
.qd-asker > .qd-avatar { width: 26px; height: 26px; }
.qd-answerers { display: inline-flex; flex-wrap: wrap; gap: 4px; }
.qd-answerers b { padding: 2px 8px; border-radius: 999px; background: #dff4ef; color: #11786b; font-size: 10.5px; font-weight: 800; white-space: nowrap; }
.qd-age { font-size: 11px; color: var(--muted); white-space: nowrap; }
.qd-row-btn { font-size: 11px; padding: 7px 12px; white-space: nowrap; }
.qd-row-btn .ui-icon { width: 14px; height: 14px; }
.qd-admin-panel .table-wrap.is-refreshing { opacity: .6; transition: opacity .2s ease; }
.qd-field { display: grid; gap: 6px; font-size: 11.5px; font-weight: 800; color: var(--ink); }
.qd-field input, .qd-field textarea { width: 100%; min-width: 0; padding: 10px 12px; border: 1px solid var(--line); border-radius: 11px; background: var(--panel); font: inherit; font-size: 12.5px; font-weight: 400; line-height: 1.9; color: var(--ink); resize: vertical; }
.qd-field input:focus, .qd-field textarea:focus { outline: none; border-color: #f3b88d; box-shadow: 0 0 0 3px rgba(255, 107, 24, .1); }

.qd-modal { padding-top: 16px; }
.qd-modal-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.08fr); gap: 18px; align-items: start; }
.qd-modal-question { position: sticky; top: 0; min-width: 0; max-height: calc(100vh - 150px); overflow-y: auto; overscroll-behavior: contain; display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; align-content: start; }
.qd-modal-answer .qv-answer { margin-top: 0; }
.qd-question-skeleton { display: grid; gap: 10px; padding: 16px; border: 1px solid var(--line); border-radius: 14px; background: var(--panel); }
.qd-question-skeleton i { display: block; height: 14px; border-radius: 7px; background: linear-gradient(90deg, var(--panel-soft), var(--line), var(--panel-soft)); background-size: 200% 100%; animation: qd-skel-shine 1.2s linear infinite; }
.qd-question-skeleton i:nth-child(1) { width: 92%; } .qd-question-skeleton i:nth-child(2) { width: 78%; } .qd-question-skeleton i:nth-child(3) { width: 64%; } .qd-question-skeleton i:nth-child(4) { width: 48%; }
@keyframes qd-skel-shine { to { background-position: -200% 0; } }
.qd-head-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.qd-assign { display: grid; gap: 12px; }
.qd-assign .modal-hint { margin: 0; }
.qd-assign-bar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.qd-assign-bar .mk-search-field { flex: 1; min-width: 200px; }
.qd-assign-count { font-size: 11.5px; color: var(--muted); }
.qd-assign-list { display: grid; gap: 8px; }
.qd-assign-row { display: grid; grid-template-columns: minmax(130px, 200px) minmax(0, 1fr); gap: 10px; align-items: center; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--panel); }
.qd-assign-row.has-admins { border-color: var(--orange); background: var(--orange-soft); }
.qd-assign-lesson { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--ink); }
.qd-assign-lesson .ui-icon { width: 15px; height: 15px; color: var(--orange); flex: none; }
.qd-assign-chips { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.qd-assign-chip { display: inline-flex; align-items: center; gap: 4px; padding: 4px 6px 4px 10px; border: 1px solid var(--line); border-radius: 999px; background: var(--panel); font-size: 11.5px; font-weight: 700; color: var(--ink); }
.qd-assign-chip button { display: grid; place-items: center; width: 18px; height: 18px; padding: 0; border: 0; border-radius: 50%; background: transparent; color: var(--muted); cursor: pointer; }
.qd-assign-chip button:hover { background: var(--red-soft); color: var(--red); }
.qd-assign-chip .ui-icon { width: 12px; height: 12px; }
.qd-assign-none { font-size: 11px; color: var(--muted); }
.qd-assign-add select { font-size: 11.5px; }
@media (max-width: 640px) { .qd-assign-row { grid-template-columns: 1fr; } }
.qd-modal-thread { display: grid; gap: 12px; min-width: 0; }
.qd-modal-bar { display: flex; align-items: center; gap: 8px 10px; flex-wrap: wrap; }
.qd-modal-bar h3 { margin: 0; font-size: 14px; font-weight: 800; display: inline-flex; align-items: center; gap: 6px; }
.qd-modal-bar .secondary-button { margin-inline-start: auto; font-size: 11.5px; padding: 7px 12px; }
.qd-chips { display: inline-flex; gap: 5px; flex-wrap: wrap; }
.qd-thread.is-admin { padding: 0; }
.qd-tools { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding-top: 10px; border-top: 1px dashed var(--line); }
.qd-tools .ghost-button, .qd-tools .primary-button { font-size: 11px; padding: 6px 11px; }
.qd-tools .ui-icon { width: 14px; height: 14px; }
.qd-tools .ghost-button.danger.is-armed { background: var(--red); color: #fff; border-color: var(--red); }
.qd-tools-gap { flex: 1; }
.qd-tools-hint { display: inline-flex; align-items: center; gap: 5px; font-size: 11px; color: #b4501a; }
.qd-tools-hint .ui-icon { width: 13px; height: 13px; }
.qd-switch { display: inline-flex; align-items: center; gap: 7px; font-size: 11px; font-weight: 700; color: var(--ink); cursor: pointer; user-select: none; }
.qd-switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.qd-switch-track { position: relative; width: 32px; height: 18px; flex: none; border-radius: 999px; background: #d9d5cc; transition: background .16s ease; }
.qd-switch-track::after { content: ""; position: absolute; top: 2px; inset-inline-start: 2px; width: 14px; height: 14px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .18); transition: inset-inline-start .16s ease; }
.qd-switch input:checked + .qd-switch-track { background: var(--teal); }
.qd-switch input:checked + .qd-switch-track::after { inset-inline-start: 16px; }
.qd-switch input:focus-visible + .qd-switch-track { box-shadow: 0 0 0 3px rgba(26, 163, 146, .25); }
.qd-switch input:disabled + .qd-switch-track { opacity: .5; }
.qd-editor { display: grid; gap: 10px; padding: 12px; border: 1px solid #f3d9c4; border-radius: 13px; background: #fffbf7; }
.qd-editor.is-new { border-color: #d7ccf3; background: #faf8ff; }
.qd-editor-head { display: flex; align-items: center; gap: 10px; }
.qd-editor-head .ui-icon { width: 20px; height: 20px; color: var(--purple); flex: none; }
.qd-editor-head div { display: grid; gap: 2px; }
.qd-editor-head b { font-size: 12.5px; color: var(--ink); }
.qd-editor-head small { font-size: 10.5px; color: var(--muted); }
.qd-editor .ghost-button, .qd-editor .primary-button { font-size: 11.5px; padding: 7px 13px; }
.qd-editor .qd-error { margin: 0; }

@media (max-width: 1000px) {
  .qd-modal-grid { grid-template-columns: 1fr; }
  .qd-modal-question { position: static; max-height: none; overflow: visible; }
}
@media (max-width: 640px) {
  .qd-head, .qd-thread { padding-inline: 11px; }
  .qd-compose { padding: 0 11px 12px; }
  .qd-item { padding: 11px; }
  .qd-reply { margin-inline-start: 4px; padding: 10px; }
  .qd-pop { width: min(248px, 78vw); }
  .qd-compose-bar small { order: 3; flex-basis: 100%; }
  .qd-send { margin-inline-start: auto; }
  .qd-toolbar { padding-inline: 13px; }
  .qd-filters { width: 100%; }
  .qd-select, .qd-select select { flex: 1; min-width: 0; max-width: none; width: 100%; }
}
@media (pointer: coarse) {
  .qd-compose-box textarea, .qd-field textarea, .qd-field input { font-size: 16px; }
  .qd-attach, .qd-icon-btn { min-height: 40px; min-width: 40px; }
  .qd-attachment-x { width: 30px; height: 30px; }
}

/* ===== گزارش ایراد سؤال: صفحهٔ رسیدگی بازبین =====
   فهرست سؤال‌به‌سؤال با شمارندهٔ گزارش، و مودالِ دو ستونی که سؤال و
   گزارش‌های همان سؤال را کنار هم می‌گذارد. */
/* فاصلهٔ تب‌ها از خطِ زیرِ سربرگ پنل، هم‌ریتم با پدینگ ۱۹px خودِ سربرگ */
.qrep-tabs { display: flex; gap: 8px; padding: 16px 19px; flex-wrap: wrap; }
.qrep-tab {
  display: inline-flex; align-items: center; gap: 7px;
  border: 1px solid var(--line); background: var(--panel-soft); color: var(--muted);
  border-radius: 999px; padding: 7px 14px; font-size: 11.5px; font-weight: 700;
  cursor: pointer; transition: .15s;
}
.qrep-tab i { font-style: normal; font-size: 10px; font-weight: 800; background: #fff; border: 1px solid var(--line); border-radius: 999px; padding: 1px 7px; }
.qrep-tab:hover { border-color: var(--orange); color: var(--orange); }
.qrep-tab.on { background: var(--orange-soft); border-color: #f6c19a; color: #c04f0f; }
.qrep-tab.on i { background: #fff; border-color: #f6c19a; color: #c04f0f; }

/* این جدول هشت ستونِ کوتاه دارد و به min-width سراسریِ ۸۵۰px جدول‌های مشخصات
   نیاز ندارد؛ با آن، نوار اسکرول افقی همیشه زیر کادر می‌ماند در حالی که
   محتوا کاملاً جا شده است. */
.qrep-table { min-width: 560px; table-layout: fixed; }
.qrep-table td { vertical-align: middle; }
.qrep-table th:first-child, .qrep-table td:first-child { width: 62px; }
.qrep-table th:nth-child(2), .qrep-table td:nth-child(2) { width: 84px; }
.qrep-table th:nth-child(3), .qrep-table td:nth-child(3),
.qrep-table th:nth-child(4), .qrep-table td:nth-child(4),
.qrep-table th:nth-child(5), .qrep-table td:nth-child(5) { width: 11%; }
.qrep-table th:nth-child(7), .qrep-table td:nth-child(7) { width: 92px; }
.qrep-table th:last-child, .qrep-table td:last-child { width: 128px; }
.qrep-table td:nth-child(3), .qrep-table td:nth-child(4), .qrep-table td:nth-child(5) { overflow-wrap: anywhere; }
.qrep-table td:last-child button { width: 100%; justify-content: center; padding: 9px 10px; font-size: 11px; }
.qrep-count {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 34px; height: 26px; padding: 0 8px; border-radius: 9px;
  background: var(--red-soft); border: 1px solid #f4c9c9; color: #c2453f;
  font-size: 12.5px; font-weight: 800;
}
.qrep-count.done { background: var(--teal-soft); border-color: #bfe7e0; color: #0f7a6d; }
.qrep-reasons { display: inline-flex; flex-wrap: wrap; gap: 5px; }
.qrep-reason {
  display: inline-flex; align-items: center; gap: 4px;
  background: var(--yellow-soft); border: 1px solid #f0dfa9; color: #8d6a10;
  border-radius: 7px; padding: 2px 7px; font-size: 10.5px; font-weight: 700;
}
.qrep-reason i { font-style: normal; font-size: 9.5px; background: #fff; border-radius: 5px; padding: 0 4px; color: #b27b00; }
.qrep-more { display: block; margin-top: 4px; color: var(--muted); font-size: 10px; }
.qrep-age { font-size: 11.5px; color: var(--muted); white-space: nowrap; }

.qrep-modal-grid { display: grid; grid-template-columns: minmax(0, 1fr) 288px; gap: 16px; align-items: start; }
.qrep-modal-main { display: grid; gap: 14px; min-width: 0; }
.qrep-modal-side { display: grid; gap: 14px; position: sticky; top: 0; }
.qrep-question-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 12px; flex-wrap: wrap; }
.qrep-question-head small { color: var(--muted); font-size: 11px; }
.qrep-list-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.qrep-list-head h3 { margin: 0; font-size: 13px; display: flex; align-items: center; gap: 8px; }
.qrep-list-head .count { background: var(--panel-soft); border: 1px solid var(--line); border-radius: 999px; padding: 1px 9px; font-size: 10.5px; color: var(--muted); }
.qrep-cards { display: grid; gap: 10px; }
.qrep-card {
  border: 1px solid var(--line); border-radius: 14px; padding: 13px 14px;
  background: var(--panel); display: grid; gap: 9px;
  border-inline-start: 3px solid var(--yellow);
}
.qrep-card.fixed { border-inline-start-color: var(--teal); background: var(--panel-soft); }
.qrep-card.referred { border-inline-start-color: var(--orange); background: var(--panel-soft); }
.qrep-card.invalid { border-inline-start-color: var(--muted); background: var(--panel-soft); opacity: .85; }
.qrep-card-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.qrep-who { display: grid; gap: 2px; }
.qrep-who strong { font-size: 12.5px; }
.qrep-who small { color: var(--muted); font-size: 10.5px; }
.qrep-text { margin: 0; font-size: 12px; line-height: 1.9; color: #57534b; white-space: pre-wrap; }
.qrep-acts { display: grid; gap: 9px; padding-top: 3px; border-top: 1px dashed var(--line); }
.qrep-note-input {
  width: 100%; border: 1px solid var(--line); border-radius: 10px;
  padding: 8px 11px; font-size: 11.5px; font-family: inherit; background: var(--panel-soft);
}
.qrep-note-input:focus { outline: none; border-color: var(--orange); background: #fff; }
.qrep-buttons { display: flex; flex-wrap: wrap; gap: 8px; }
.qrep-buttons button { font-size: 11px; padding: 8px 12px; }
.qrep-verdict { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: 11px; color: var(--muted); border-top: 1px dashed var(--line); padding-top: 8px; }
.qrep-verdict b { font-weight: 600; color: #57534b; }
.qrep-verdict button { margin-inline-start: auto; font-size: 10.5px; padding: 6px 10px; }
.qrep-reason-stats { display: grid; gap: 6px; margin-top: 4px; }
.qrep-reason-stat { display: flex; justify-content: space-between; align-items: center; font-size: 11.5px; color: #57534b; }
.qrep-reason-stat b { font-size: 11px; background: var(--panel-soft); border: 1px solid var(--line); border-radius: 7px; padding: 1px 8px; }
.qrep-side-acts { display: grid; gap: 8px; }
.qrep-side-acts button { width: 100%; justify-content: center; }
/* صفرکردن آمار سؤال (مدیر اصلی) */
.qsr-card .modal-hint { margin: 0 0 10px; }
.qsr-card button { width: 100%; justify-content: center; }
.qsr-last { display: flex; align-items: center; gap: 6px; font-size: 11px; color: var(--muted); margin: 0 0 10px; }
.qsr-last svg { width: 14px; height: 14px; flex: none; }
.modal-head .qsr-step { margin-inline-start: auto; font-size: 11px; color: var(--muted); background: var(--panel-soft); border: 1px solid var(--line); border-radius: 999px; padding: 3px 10px; white-space: nowrap; }
.qsr-body { display: grid; gap: 12px; font-size: 12.5px; line-height: 1.9; }
.qsr-body p { margin: 0; }
.qsr-lead { display: flex; align-items: flex-start; gap: 8px; background: #fdf1ec; border: 1px solid #f1c7b6; color: #8a3a1d; border-radius: 12px; padding: 10px 12px; }
.qsr-lead svg { width: 18px; height: 18px; flex: none; margin-top: 3px; }
.qsr-list { margin: 0; padding-inline-start: 20px; display: grid; gap: 6px; color: #57534b; }
.qsr-code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; background: var(--panel-soft); border: 1px solid var(--line); border-radius: 7px; padding: 1px 8px; }
#qsrCode { width: 100%; border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; font-size: 14px; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; text-align: center; letter-spacing: .5px; background: var(--panel-soft); }
#qsrCode:focus { outline: none; border-color: #d3603f; background: #fff; }

@media (max-width: 900px) {
  .qrep-modal-grid { grid-template-columns: 1fr; }
  .qrep-modal-side { position: static; }
}

/* ===== سمت کاربر: وضعیت گزارشی که خودش ثبت کرده ===== */
.sq-info-act.sq-report-pending { border-color: #f0dfa9; background: var(--yellow-soft); color: #8d6a10; }
.sq-info-act.sq-report-fixed { border-color: #bfe7e0; background: var(--teal-soft); color: #0f7a6d; }
.sq-info-act.sq-report-invalid { border-color: var(--line); background: var(--panel-soft); color: var(--muted); }

.srep-history { display: grid; gap: 9px; margin-bottom: 14px; }
.srep-history h4 { margin: 0; font-size: 12px; color: var(--muted); font-weight: 700; }
.srep-item {
  border: 1px solid var(--line); border-radius: 13px; padding: 11px 13px;
  display: grid; gap: 7px; border-inline-start: 3px solid var(--yellow); background: var(--panel-soft);
}
.srep-item.fixed { border-inline-start-color: var(--teal); }
.srep-item.invalid { border-inline-start-color: var(--muted); }
.srep-item header { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.srep-state { font-size: 11.5px; font-weight: 800; color: #8d6a10; }
.srep-item.fixed .srep-state { color: #0f7a6d; }
.srep-item.invalid .srep-state { color: var(--muted); }
.srep-item header small { color: var(--muted); font-size: 10.5px; }
.srep-reasons { display: flex; flex-wrap: wrap; gap: 5px; }
.srep-reasons b {
  background: #fff; border: 1px solid var(--line); border-radius: 7px;
  padding: 2px 7px; font-size: 10.5px; font-weight: 700; color: #57534b;
}
.srep-item p { margin: 0; font-size: 11.5px; line-height: 1.9; color: #57534b; white-space: pre-wrap; }
.srep-note { color: var(--muted); font-size: 10.5px; }


/* ═══════════════════════ پشتیبانی: تیکت، ایده، اعلان ═══════════════════════
   یک پوستهٔ مشترک (sup-*) که در پنل کاربر و پنل مدیر یکسان دیده می‌شود:
   همان چیپ‌ها، همان نشان‌های وضعیت و همان قالبِ گفت‌وگو.               */

/* ---------- سه ابزار آیکونیِ نوار بالای پنل کاربر ---------- */
.topbar-tools { display: flex; align-items: center; gap: 8px; margin-inline-start: auto; }
.topbar-tools + .topbar-profile { margin-inline-start: 10px; }
.topbar-icon {
  position: relative; width: 38px; height: 38px; flex: none;
  display: inline-flex; align-items: center; justify-content: center; cursor: pointer;
  border: 1px solid var(--line); border-radius: 12px; background: #fff; color: #6f6a61;
  transition: background var(--motion-med, .2s) ease, color var(--motion-med, .2s) ease,
              border-color var(--motion-med, .2s) ease, transform var(--motion-fast, .14s) ease;
}
.topbar-icon svg { width: 18px; height: 18px; }
.topbar-icon:hover { background: var(--orange-soft); border-color: #f4c19a; color: #d4590f; transform: translateY(-1px); }
.topbar-icon.has-news { border-color: #f4c19a; color: #d4590f; }
.tb-badge {
  position: absolute; inset-block-start: -6px; inset-inline-start: -6px;
  min-width: 18px; height: 18px; padding: 0 5px;
  display: inline-grid; place-items: center;
  border-radius: 9px; background: var(--orange); color: #fff;
  font-size: 10px; font-weight: 800; font-style: normal;
  box-shadow: 0 3px 8px rgba(255, 107, 24, .35);
}
@media (max-width: 640px) {
  .topbar-icon { width: 34px; height: 34px; border-radius: 10px; }
  .topbar-tools { gap: 6px; }
}

/* ---------- اجزای مشترک ---------- */
.sup-chip {
  display: inline-flex; align-items: center; gap: 5px; flex: none;
  border: 1px solid #e7ded0; background: #fdf8f1; color: #7a6a54;
  border-radius: 8px; padding: 3px 8px; font-size: 10.5px; font-weight: 700;
}
.sup-chip.ghost { background: var(--panel-soft); border-color: var(--line); color: var(--muted); }
.sup-chip svg { width: 12px; height: 12px; }
.sup-chip small { color: var(--muted); font-size: 9.5px; font-weight: 600; }
.sup-badge {
  display: inline-grid; place-items: center; flex: none;
  border-radius: 8px; padding: 3px 9px; font-size: 10.5px; font-weight: 800; white-space: nowrap;
}
.sup-badge.tone-yellow { background: var(--yellow-soft); color: #a97d0a; }
.sup-badge.tone-blue   { background: var(--blue-soft); color: #3560c4; }
.sup-badge.tone-teal   { background: var(--teal-soft); color: #12856f; }
.sup-badge.tone-orange { background: var(--orange-soft); color: #cd5a10; }
.sup-badge.tone-purple { background: var(--purple-soft); color: #6b4bc0; }
.sup-badge.tone-red    { background: var(--red-soft); color: #c04747; }
.sup-badge.tone-grey   { background: #f1efe9; color: #7d7871; }
.sup-code { font-size: 11px; font-weight: 850; color: #b1560f; letter-spacing: .02em; }
.sup-time { font-size: 10.5px; color: var(--muted); white-space: nowrap; }
.sup-link, .sup-inline-link {
  color: #2f6fd0; font-weight: 700; text-decoration: none;
  border-bottom: 1px dashed rgba(47,111,208,.45); background: none; border-width: 0 0 1px; cursor: pointer; padding: 0;
}
.sup-link:hover, .sup-inline-link:hover { color: #1f52a5; border-bottom-style: solid; }
.sup-empty-line { margin: 12px 0; color: var(--muted); font-size: 12px; }
.sup-loading { display: flex; align-items: center; gap: 8px; padding: 30px; color: var(--muted); font-size: 12.5px; justify-content: center; }
.sup-loading svg { width: 16px; height: 16px; }

/* ---------- فرم‌ها ---------- */
.sup-form { display: grid; gap: 10px; }
.sup-label { font-size: 11.5px; font-weight: 800; color: #5f5a52; display: block; }
.sup-label .req { color: var(--red); margin-inline-start: 3px; }
.sup-input {
  width: 100%; border: 1px solid var(--line); border-radius: 11px; background: #fff;
  padding: 10px 12px; font-size: 12.5px; color: var(--ink); transition: border-color .16s ease, box-shadow .16s ease;
}
.sup-input:focus { outline: none; border-color: #f0b487; box-shadow: 0 0 0 3px rgba(255,107,24,.1); }
.sup-input.compact { width: auto; min-width: 150px; padding: 7px 10px; font-size: 11.5px; border-radius: 9px; }
.sup-textarea { resize: vertical; line-height: 1.95; min-height: 90px; }
.sup-chip-row { display: flex; flex-wrap: wrap; gap: 7px; align-items: center; }
.sup-pick {
  display: inline-flex; align-items: center; gap: 5px; cursor: pointer;
  border: 1px solid var(--line); background: #fff; color: #6b665e;
  border-radius: 10px; padding: 7px 12px; font-size: 11.5px; font-weight: 700; transition: .15s ease;
}
.sup-pick svg { width: 13px; height: 13px; }
.sup-pick:hover { border-color: #f0b487; color: #c9550d; }
.sup-pick.on { background: var(--orange-soft); border-color: #f4bd93; color: #c9550d; }
.sup-form-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-top: 2px; }
.sup-hint { color: var(--muted); font-size: 10.5px; line-height: 1.8; }
.sup-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px; }
.sup-inline-field { display: inline-flex; align-items: center; gap: 7px; font-size: 11.5px; color: #5f5a52; font-weight: 700; }
.secondary-button.block, .primary-button.block { width: 100%; justify-content: center; margin-top: 8px; }
.ghost-button.danger { color: var(--red); }

/* ---------- پاپ‌آپ‌ها ---------- */
.modal.medium { width: min(760px, 96vw); }
.modal.sup-modal-shell .modal-body { padding-bottom: 22px; }
.sup-modal { display: grid; gap: 16px; }
.sup-head-count { color: var(--orange); font-size: 11px; font-weight: 700; }

/* ---------- صندوق اعلان‌ها ---------- */
.sup-note-list { display: grid; gap: 10px; }
.sup-note {
  display: grid; grid-template-columns: 34px minmax(0, 1fr); gap: 11px; align-items: start;
  border: 1px solid var(--line); border-radius: 14px; padding: 12px 13px; background: var(--panel-soft);
  border-inline-start: 3px solid var(--line);
}
.sup-note.unread { background: #fff; border-inline-start-color: var(--orange); box-shadow: 0 6px 16px rgba(79,58,38,.05); }
.sup-note.tone-success.unread { border-inline-start-color: var(--teal); }
.sup-note.tone-warning.unread { border-inline-start-color: var(--yellow); }
.sup-note.tone-danger.unread { border-inline-start-color: var(--red); }
.sup-note-icon { width: 34px; height: 34px; display: inline-grid; place-items: center; border-radius: 11px; background: #fff; border: 1px solid var(--line); color: #8a8279; }
.sup-note-icon svg { width: 16px; height: 16px; }
.sup-note.tone-success .sup-note-icon { background: var(--teal-soft); border-color: #bfe6dc; color: #12856f; }
.sup-note.tone-warning .sup-note-icon { background: var(--yellow-soft); border-color: #ecd9a4; color: #a97d0a; }
.sup-note.tone-danger .sup-note-icon { background: var(--red-soft); border-color: #f2cccc; color: #c04747; }
.sup-note-body { display: grid; gap: 5px; min-width: 0; }
.sup-note-body header { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; }
.sup-note-body header strong { font-size: 12.5px; font-weight: 800; }
.sup-note-body p { margin: 0; font-size: 12px; line-height: 2; color: #5c574f; overflow-wrap: anywhere; }
.sup-note-body footer { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.sup-pin { background: var(--orange-soft); color: #c9550d; border-radius: 6px; padding: 1px 6px; font-size: 9.5px; font-weight: 800; }
.sup-note-link {
  display: inline-flex; align-items: center; gap: 4px; cursor: pointer;
  border: 1px solid #f0d0b4; background: #fff7f0; color: #c9550d;
  border-radius: 8px; padding: 4px 9px; font-size: 10.5px; font-weight: 800;
}
.sup-note-link svg { width: 12px; height: 12px; }
.sup-note-link:hover { background: var(--orange-soft); }

/* ---------- صندوق انتقاد و پیشنهاد ---------- */
.sup-hero {
  display: grid; grid-template-columns: 42px minmax(0, 1fr); gap: 12px; align-items: start;
  border: 1px solid #ecdfc6; background: linear-gradient(180deg, #fffaf0, #fffdf9);
  border-radius: 15px; padding: 14px;
}
.sup-hero-icon { width: 42px; height: 42px; display: inline-grid; place-items: center; border-radius: 13px; background: #fff3d6; color: #b5860e; }
.sup-hero-icon svg { width: 20px; height: 20px; }
.sup-hero strong { display: block; font-size: 13px; margin-bottom: 4px; }
.sup-hero p { margin: 0; font-size: 11.5px; line-height: 2; color: #6f6960; }
.sup-redirect {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  border: 1px dashed #d8cdbb; border-radius: 13px; padding: 11px 13px; background: var(--panel-soft);
  font-size: 11.5px; line-height: 1.9; color: #6f6960;
}
.sup-redirect > svg { width: 17px; height: 17px; color: var(--yellow); flex: none; }
.sup-redirect span { flex: 1 1 240px; }
.sup-redirect .secondary-button { flex: none; }
.sup-mine h3 { margin: 0 0 10px; font-size: 12.5px; display: flex; align-items: center; gap: 7px; }
.sup-mine .count { background: var(--panel-soft); border: 1px solid var(--line); border-radius: 7px; padding: 1px 7px; font-size: 10.5px; color: var(--muted); }
.sup-fb-card { border: 1px solid var(--line); border-radius: 14px; padding: 12px 13px; background: var(--panel-soft); display: grid; gap: 8px; }
.sup-fb-card + .sup-fb-card { margin-top: 10px; }
.sup-fb-card header { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; }
.sup-fb-card p { margin: 0; font-size: 12px; line-height: 2; color: #524d46; overflow-wrap: anywhere; }
.sup-fb-reply { border-inline-start: 3px solid var(--teal); background: #fff; border-radius: 0 11px 11px 0; padding: 9px 12px; display: grid; gap: 5px; }
.sup-fb-reply b { display: flex; align-items: center; gap: 6px; font-size: 11px; color: #12856f; }
.sup-fb-reply b svg { width: 13px; height: 13px; }
/* جوابِ خودِ کاربر در رشته: سمتِ دیگر و رنگِ دیگر تا گفت‌وگو خوانا بماند. */
.sup-fb-reply.is-user { border-inline-start-color: var(--orange); background: #fffaf5; margin-inline-start: 18px; }
.sup-fb-reply.is-user b { color: #cd5a10; }
.sup-fb-card.is-focus { border-color: #9fd9cb; box-shadow: 0 0 0 3px var(--teal-soft); }
.sup-fb-replyform { display: grid; gap: 8px; }
.sup-fb-replyform .sup-textarea { min-height: 64px; background: #fff; }
.sup-fb-replyform .secondary-button { justify-self: end; }
.sup-fb-openreply { justify-self: end; }

/* ---------- صفحهٔ تیکت (پنل کاربر) ---------- */
.sup-page-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.sup-panel { padding: 0; overflow: hidden; }
.sup-panel > .panel-header { flex-wrap: wrap; gap: 12px; }
.sup-list { display: grid; }
.sup-row {
  display: grid; grid-template-columns: 62px minmax(0, 1fr) auto auto auto 34px;
  align-items: center; gap: 12px; text-align: start; cursor: pointer;
  padding: 13px 20px; border: 0; border-top: 1px solid var(--line); background: #fff;
  transition: background .15s ease;
}
.sup-row:first-child { border-top: 0; }
.sup-row:hover { background: var(--panel-soft); }
.sup-row.has-unread { background: #fffaf5; }
.sup-row-code { font-size: 11px; font-weight: 850; color: #b1560f; }
.sup-row-main { display: grid; gap: 3px; min-width: 0; }
.sup-row-main strong { font-size: 12.5px; font-weight: 800; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sup-row-main small { font-size: 10.5px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sup-row-chips { display: flex; gap: 6px; flex-wrap: wrap; }
.sup-row-time { display: grid; gap: 2px; justify-items: end; }
.sup-row-time small { font-size: 9.5px; color: var(--muted); }
.sup-row-dot {
  min-width: 22px; height: 22px; padding: 0 6px; display: inline-grid; place-items: center;
  border-radius: 11px; background: var(--orange); color: #fff; font-size: 10px; font-weight: 800; font-style: normal;
}
.sup-row-dot.ghost { background: none; color: var(--muted); }
.sup-row-dot svg { width: 15px; height: 15px; }
@media (max-width: 900px) {
  .sup-row { grid-template-columns: minmax(0, 1fr) auto; grid-auto-rows: auto; row-gap: 7px; }
  .sup-row-code { grid-column: 1; }
  .sup-row-main { grid-column: 1 / -1; }
  .sup-row-chips, .sup-row-time { grid-column: 1 / -1; justify-items: start; }
  .sup-row-time { justify-items: start; grid-auto-flow: column; gap: 8px; }
}

.sup-guide {
  display: grid; grid-template-columns: 20px minmax(0, 1fr); gap: 10px; align-items: start;
  margin: 16px 20px; padding: 13px 15px; border-radius: 14px;
  border: 1px solid #ecdfc6; background: #fffaf0;
}
.sup-guide > svg { width: 18px; height: 18px; color: var(--yellow); }
.sup-guide b { font-size: 12px; }
.sup-guide ul { margin: 7px 0 0; padding-inline-start: 17px; display: grid; gap: 5px; }
.sup-guide li { font-size: 11.5px; line-height: 1.95; color: #6f6960; }
.sup-panel > .sup-form { padding: 0 20px 20px; }

/* ---------- گفت‌وگوی تیکت ---------- */
.sup-thread-panel { padding-bottom: 20px; }
.sup-thread-head {
  display: flex; align-items: flex-start; gap: 14px; flex-wrap: wrap;
  padding: 16px 20px; border-bottom: 1px solid var(--line); background: var(--panel-soft);
}
.sup-thread-title { flex: 1 1 260px; min-width: 0; }
.sup-thread-title h2 { margin: 0 0 8px; font-size: 15px; }
.sup-thread-meta { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; }
.sup-thread-acts { display: flex; gap: 8px; flex-wrap: wrap; }
.sup-thread { display: grid; gap: 12px; padding: 18px 20px; }
.sup-msg { border: 1px solid var(--line); border-radius: 15px; padding: 12px 14px; display: grid; gap: 8px; max-width: 88%; }
.sup-msg.from-user { background: #fff; border-inline-start: 3px solid var(--orange); justify-self: start; }
.sup-msg.from-agent { background: #f4fbf9; border-color: #cfeae2; border-inline-end: 3px solid var(--teal); justify-self: end; }
.sup-msg header { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.sup-msg-who { display: inline-flex; align-items: center; gap: 6px; font-size: 11.5px; font-weight: 800; color: #5f5a52; }
.sup-msg-who svg { width: 14px; height: 14px; color: var(--muted); }
.sup-msg.from-agent .sup-msg-who svg { color: var(--teal); }
.sup-msg-text { font-size: 12.5px; line-height: 2.05; color: #45413b; overflow-wrap: anywhere; }
.sup-sys {
  display: flex; align-items: center; gap: 8px; justify-self: center;
  font-size: 11px; color: var(--muted); background: var(--panel-soft);
  border: 1px dashed var(--line); border-radius: 20px; padding: 5px 13px;
}
.sup-sys svg { width: 13px; height: 13px; }
@media (max-width: 720px) { .sup-msg { max-width: 100%; } }

/* ---------- پیوست‌ها ---------- */
.sup-files { display: flex; flex-wrap: wrap; gap: 8px; }
.sup-file { position: relative; display: inline-flex; }
.sup-file > a {
  display: inline-flex; align-items: center; gap: 7px; text-decoration: none;
  border: 1px solid var(--line); border-radius: 10px; padding: 6px 10px; background: #fff; color: #5f5a52;
  font-size: 11px; font-weight: 700; transition: .15s ease;
}
.sup-file > a:hover { border-color: #f0b487; color: #c9550d; }
.sup-file > a svg { width: 14px; height: 14px; color: var(--muted); }
.sup-file > a small { color: var(--muted); font-size: 9.5px; font-weight: 600; }
.sup-file.is-image > a { padding: 0; border-radius: 12px; overflow: hidden; }
.sup-file.is-image img { display: block; width: 116px; height: 88px; object-fit: cover; }
.sup-file.is-image img:not([src]) { background: #f2eee8; }
.sup-file-x {
  position: absolute; inset-block-start: -6px; inset-inline-start: -6px;
  width: 20px; height: 20px; display: grid; place-items: center; cursor: pointer;
  border: 1px solid var(--line); border-radius: 50%; background: #fff; color: var(--red);
  box-shadow: 0 3px 8px rgba(0,0,0,.08);
}
.sup-file-x svg { width: 11px; height: 11px; }
.sup-composer { display: grid; gap: 9px; }
.sup-composer-foot { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.sup-attach {
  display: inline-flex; align-items: center; gap: 6px; cursor: pointer; flex: none;
  border: 1px dashed #d8cdbb; border-radius: 10px; padding: 7px 12px;
  background: var(--panel-soft); color: #6f6960; font-size: 11.5px; font-weight: 700; transition: .15s ease;
}
.sup-attach:hover { border-color: #f0b487; color: #c9550d; background: #fff7f0; }
.sup-attach svg { width: 14px; height: 14px; }
.sup-reply { padding: 0 20px; }
.sup-closed-box {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  margin: 0 20px; padding: 13px 15px; border-radius: 14px;
  border: 1px solid #cfeae2; background: #f4fbf9;
}
.sup-closed-box > svg { width: 20px; height: 20px; color: var(--teal); flex: none; }
.sup-closed-box b { display: block; font-size: 12px; }
.sup-closed-box span { font-size: 11.5px; color: #6f6960; line-height: 1.9; }
.sup-closed-box > div { flex: 1 1 220px; }
.sup-rate-form { flex: 1 1 260px; display: grid; gap: 7px; }
.sup-rate-form label { font-size: 11px; font-weight: 700; }
.sup-rate-form .sup-textarea { min-height: 56px; }
.sup-rate-form .secondary-button { justify-self: start; }
.sup-rate-saved { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; }
.sup-rate-saved p { width: 100%; margin: 0; font-size: 11px; line-height: 1.8; }
/* امتیاز ستاره‌ای — «تشکر و نظر» و رضایت از پشتیبانیِ تیکت.
   پرشدن ستاره‌ها با کلاس .on از سمت JS می‌آید، نه با سلکتور خواهرِ CSS؛ در
   چیدمان راست‌به‌چپ، `~` دقیقاً برعکسِ ترتیبِ امتیاز پر می‌کرد. */
.sup-stars { display: inline-flex; align-items: center; gap: 9px; flex-wrap: wrap; font-size: 11.5px; color: #6f6960; }
.sup-stars-label { font-weight: 700; }
.sup-stars-row { display: inline-flex; align-items: center; gap: 2px; }
.sup-star {
  cursor: pointer; border: 0; background: none; padding: 2px; line-height: 0;
  color: #dcd4c6; transition: color .12s ease, transform .12s ease;
}
.sup-star svg { width: 21px; height: 21px; }
.sup-star:hover { transform: scale(1.12); }
.sup-star.on { color: var(--yellow); }
.sup-star.on svg { fill: currentColor; }
.sup-stars-value { font-size: 10.5px; font-weight: 800; color: #a97d0a; }
/* نمایش فقط‌خواندنیِ امتیازِ ثبت‌شده روی کارت نظر */
.sup-stars-static { display: inline-flex; align-items: center; gap: 1px; }
.sup-stars-static i { line-height: 0; color: #e2dbcd; }
.sup-stars-static i.on { color: var(--yellow); }
.sup-stars-static i.on svg { fill: currentColor; }
.sup-stars-static svg { width: 13px; height: 13px; }
.sup-rate-box {
  border: 1px solid #ecdfc6; background: #fffaf0; border-radius: 13px; padding: 11px 13px;
}

/* ---------- میز پشتیبانی (پنل مدیر) ---------- */
.sup-admin-panel { padding: 0; overflow: hidden; }
.sup-admin-tabs { display: flex; gap: 4px; padding: 12px 20px 0; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.sup-tab {
  cursor: pointer; border: 0; background: none; color: var(--muted);
  padding: 9px 15px; border-radius: 11px 11px 0 0; font-size: 12px; font-weight: 800;
  border-bottom: 2px solid transparent; transition: .15s ease;
}
.sup-tab:hover { color: var(--ink); background: var(--panel-soft); }
.sup-tab.on { color: #c9550d; border-bottom-color: var(--orange); background: var(--orange-soft); }
.sup-admin-panel .panel-header { padding: 16px 20px 10px; }
.sup-admin-panel .qrep-tabs { padding-inline: 20px; }
.sup-admin-panel .table-wrap { padding: 0 8px 8px; }
.sup-panel-note { margin: 0; font-size: 11px; color: var(--muted); line-height: 1.9; flex: 1 1 260px; }
/* یادداشتی که بیرون از panel-header می‌آید پدینگِ آن را ندارد و به لبه می‌چسبید */
.sup-admin-panel > #supAdminBody > .sup-panel-note { padding: 12px 20px 0; }
.sup-admin-filters { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.sup-stat-action { font: inherit; text-align: start; cursor: pointer; width: 100%; }
.sup-stat-action:hover { border-color: var(--orange); transform: translateY(-2px); }
.sup-stat-action:focus-visible { outline: 2px solid var(--orange); outline-offset: 3px; }
.sup-ticket-pager { display: flex; align-items: center; justify-content: flex-end; gap: 6px; flex-wrap: wrap; padding: 10px 18px 16px; }
.sup-ticket-pager > span { margin-inline-end: auto; font-size: 11px; color: var(--muted); }
.sup-ticket-pager .ghost-button { min-height: 32px; padding: 0 12px; }
.sup-pager-num { min-width: 32px; height: 32px; padding: 0 8px; border: 1px solid var(--line); border-radius: 9px; background: #fff; font: inherit; font-size: 12px; color: inherit; cursor: pointer; }
.sup-pager-num:hover:not(:disabled) { border-color: var(--orange); }
.sup-pager-num.on { background: var(--orange); border-color: var(--orange); color: #fff; font-weight: 700; cursor: default; }
.sup-pager-num:disabled:not(.on) { opacity: .5; cursor: default; }
.sup-pager-gap { font-style: normal; color: var(--muted); padding: 0 2px; }
/* بارگذاریِ صفحه/فیلتر: فهرستِ قبلی سرِ جا می‌ماند و کم‌رنگ می‌شود تا صفحه نپرد. */
.sup-list, .sup-admin-table-wrap { position: relative; }
.sup-list.is-loading > :not(.sup-loading-bar), .sup-admin-table-wrap.is-loading > table { opacity: .45; pointer-events: none; transition: opacity .15s; }
.sup-loading-bar { position: sticky; top: 8px; z-index: 2; display: flex; align-items: center; justify-content: center; gap: 7px; width: max-content; margin: 10px auto -44px; padding: 7px 14px; border: 1px solid var(--line); border-radius: 999px; background: #fff; box-shadow: 0 6px 18px rgba(0, 0, 0, .08); font-size: 11.5px; color: var(--muted); }
.sup-loading-bar svg { width: 14px; height: 14px; animation: sup-spin 1.2s linear infinite; }
@keyframes sup-spin { to { transform: rotate(360deg); } }
.sup-skeleton-row td span { display: block; height: 18px; border-radius: 6px; background: linear-gradient(90deg, var(--panel-soft, #f4f1ec) 25%, #fff 50%, var(--panel-soft, #f4f1ec) 75%); background-size: 200% 100%; animation: sup-shimmer 1.3s ease-in-out infinite; }
@keyframes sup-shimmer { to { background-position: -200% 0; } }
.sup-inline-error { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: 10px 20px 0; padding: 9px 12px; border-radius: 10px; background: #fff1ee; color: #b3261e; font-size: 12px; }
.sup-inline-error svg { width: 15px; height: 15px; }
.sup-queue-note { display: flex; align-items: center; gap: 6px; padding: 10px 20px 0; }
.sup-queue-note svg { width: 14px; height: 14px; flex: none; }
.sup-thanks-tag { display: inline-flex; align-items: center; gap: 3px; margin-inline-end: 6px; padding: 1px 7px; border-radius: 999px; background: #e7f6f2; color: #0f7a66; font-size: 10.5px; font-weight: 700; }
.sup-thanks-tag svg { width: 11px; height: 11px; }
@media (prefers-reduced-motion: reduce) { .sup-loading-bar svg, .sup-skeleton-row td span { animation: none; } }
.sup-admin-table td { vertical-align: middle; }
.sup-admin-table tr.has-unread { background: #fffaf5; }
.sup-cell-subject { max-width: 280px; }
.sup-cell-subject strong { display: block; font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sup-cell-subject small { display: block; font-size: 10px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sup-user { display: inline-grid; gap: 1px; }
.sup-user b { font-size: 11.5px; }
.sup-user small { font-size: 9.5px; color: var(--muted); }
/* شناسه dir="ltr" دارد؛ بدون این، در سلولی که نام از شناسه پهن‌تر است متن
   شناسه به لبهٔ چپِ نام می‌چسبید و ستونِ شناسه‌ها هرکدام یک گوشه می‌افتاد. */
.sup-user > * { justify-self: start; }
.sup-wait { color: #cd5a10; font-size: 11px; font-weight: 800; }
.sup-admin-grid { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 18px; align-items: start; }
.sup-admin-main { min-width: 0; }
.sup-admin-subject { margin: 0 0 8px; font-size: 15px; }
.sup-admin-main .sup-thread { padding: 14px 0; }
.sup-admin-main .sup-reply { padding: 0; }
.sup-admin-side { display: grid; gap: 14px; }
.sup-admin-side .sup-label { margin-top: 9px; }
.sup-rating-comment { margin: 4px 0 0; padding: 9px 11px; border-radius: 10px; background: var(--panel-soft); font-size: 11px; line-height: 1.8; overflow-wrap: anywhere; }
@media (max-width: 980px) { .sup-admin-grid { grid-template-columns: minmax(0, 1fr); } }

.sup-fb-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 12px; padding: 14px 20px 20px; }
.sup-fb-admin { border: 1px solid var(--line); border-radius: 15px; padding: 13px 14px; background: #fff; display: grid; gap: 9px; align-content: start; }
.sup-fb-admin.is-new { border-color: #f0d0b4; background: #fffaf5; }
.sup-fb-admin header { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; }
.sup-fb-text { margin: 0; font-size: 12px; line-height: 2; color: #524d46; overflow-wrap: anywhere; }
.sup-fb-who { display: flex; align-items: center; gap: 6px; font-size: 11px; color: var(--muted); }
.sup-fb-who svg { width: 13px; height: 13px; }
.sup-fb-note { display: flex; align-items: center; gap: 7px; font-size: 11px; color: #6f6960; background: var(--panel-soft); border-radius: 10px; padding: 7px 10px; }
.sup-fb-note svg { width: 13px; height: 13px; color: var(--muted); }
.sup-fb-admin footer { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; }

/* ---------- نظرات کاربران: کارتِ تأیید و انتشار روی سایت ---------- */
.sup-voice-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(360px, 1fr)); gap: 12px; padding: 14px 20px 20px; }
.sup-voice-grid > .empty-state { grid-column: 1 / -1; }
.sup-voice { border: 1px solid var(--line); border-radius: 15px; padding: 13px 14px; background: #fff; display: grid; gap: 9px; align-content: start; }
.sup-voice.is-live { border-color: #bfe3d6; background: #f6fdfa; }
.sup-voice header { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.sup-voice-avatar { display: grid; place-items: center; width: 34px; height: 34px; flex: none; border: 1px solid var(--line); border-radius: 50%; background: var(--panel-soft); color: var(--muted); overflow: hidden; }
/* قاعدهٔ فرزندِ کادر: بدون این دو خط، عکسِ غیرمربع از قابِ گرد بیرون می‌زند */
.sup-voice-avatar img { width: 100%; height: 100%; object-fit: cover; }
.sup-voice-avatar svg { width: 16px; height: 16px; }
.sup-voice-who { display: grid; gap: 1px; flex: 1 1 140px; min-width: 0; }
.sup-voice-who b { font-size: 12px; }
.sup-voice-who small { font-size: 10px; color: var(--muted); }
.sup-voice-live { border: 1px dashed #b9dfd2; border-radius: 12px; padding: 8px 10px; background: #f2fbf7; display: grid; gap: 5px; }
.sup-voice-live b { display: flex; align-items: center; gap: 6px; font-size: 10.5px; color: #2b7a62; }
.sup-voice-live svg { width: 13px; height: 13px; }
.sup-voice-live p { margin: 0; font-size: 11.5px; line-height: 1.95; color: #524d46; overflow-wrap: anywhere; }
.sup-voice footer { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; }

.sup-ann-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 12px; padding: 14px 20px 20px; }
.sup-ann { border: 1px solid var(--line); border-radius: 15px; padding: 13px 14px; background: #fff; display: grid; gap: 9px; align-content: start; border-inline-start: 3px solid var(--blue); }
.sup-ann.tone-success { border-inline-start-color: var(--teal); }
.sup-ann.tone-warning { border-inline-start-color: var(--yellow); }
.sup-ann.tone-danger { border-inline-start-color: var(--red); }
.sup-ann.off { opacity: .6; }
.sup-ann header { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.sup-ann header strong { font-size: 12.5px; flex: 1 1 auto; }
.sup-ann p { margin: 0; font-size: 12px; line-height: 2; color: #524d46; overflow-wrap: anywhere; }
.sup-ann-meta { display: grid; gap: 5px; font-size: 10.5px; color: var(--muted); }
.sup-ann-meta span { display: flex; align-items: center; gap: 6px; }
.sup-ann-meta svg { width: 12px; height: 12px; }
.sup-ann footer { display: flex; gap: 7px; flex-wrap: wrap; }

.sup-audience { display: grid; gap: 10px; }
.sup-audience-box { border: 1px solid var(--line); border-radius: 13px; padding: 12px; background: var(--panel-soft); display: grid; gap: 9px; }
.sup-audience-box b { font-size: 11.5px; color: #5f5a52; }
.sup-user-list { display: grid; gap: 4px; max-height: 260px; overflow: auto; padding-inline-end: 4px; }
.sup-user-list .sd-check span { display: inline-flex; align-items: baseline; gap: 7px; }
.sup-user-list .sd-check small { color: var(--muted); font-size: 9.5px; }

.sup-agent-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: 12px; padding: 14px 20px 20px; }
/* حالت خالی یک سلولِ گرید می‌شد و آیکون و متن به گوشه می‌چسبید؛ باید کل عرض را بگیرد */
.sup-fb-grid > .empty-state,
.sup-ann-grid > .empty-state,
.sup-agent-list > .empty-state { grid-column: 1 / -1; }
.sup-new-agent { margin: 14px 20px 0; }
.sup-agent { border: 1px solid var(--line); border-radius: 15px; padding: 13px 14px; background: #fff; display: grid; gap: 10px; align-content: start; }
.sup-agent header { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.sup-agent-sections { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 5px; }
.sup-agent footer { display: flex; gap: 7px; flex-wrap: wrap; }

/* ===== فاصلهٔ یکدست بلوک‌های هر صفحهٔ پنل مدیریت =====
   پیش‌تر هر صفحه حاشیهٔ دلخواه خودش را روی بلوک‌های سطح‌بالا می‌گذاشت و
   بلوک‌هایی که حاشیه نداشتند به هم می‌چسبیدند. این قاعده در انتهای فایل
   می‌آید تا بر حاشیه‌های موضعی بچربد و همهٔ صفحه‌ها یک ریتم داشته باشند. */
/* ═══════════════════ داشبورد دانش‌آموز (sdash-*) ═══════════════════
   داشبورد سه لایه دارد و ترتیبشان از روی «کاربر اول چه می‌پرسد» چیده شده:
   نوار دسترسی/خرید، سه نمودار وضعیت، و دو تختهٔ کارِ نیمه‌تمام.

   رنگ‌های زیر برای نمودارِ «نوع آزمون» لازم‌اند: پالتِ پایه فقط شش رنگ دارد و
   انواعِ آزمون ده تاست. عمداً در :root تعریف می‌شوند نه روی خودِ کارت، چون
   مقدارشان به‌صورت `stroke` روی SVG می‌نشیند و باید از هر جای سند خوانده شود.

   نمودارها با `direction:ltr` روی خودِ svg کشیده می‌شوند؛ بدون آن مرورگر در
   صفحهٔ راست‌به‌چپ کمان‌ها را آینه می‌کند و ترتیبِ قطعه‌ها با راهنما نمی‌خواند. */
:root {
  --sdash-pink: #c9558b;
  --sdash-green: #2f9e6b;
  --sdash-indigo: #5566cf;
  --sdash-slate: #5d7186;
  --sdash-navy: #24407a;
}

/* گریدِ کلِ داشبورد. فاصلهٔ عمودیِ بلوک‌ها از همین `gap` می‌آید — ۱۵px به‌جای
   ۲۲pxِ قاعدهٔ سراسریِ `.content > *`، که ~۳۰٪ فشرده‌تر است. آن قاعده عمداً
   دست‌نخورده می‌ماند: پنل مدیر هم رویش حساب باز کرده. */
.sdash { display: grid; gap: 15px; min-width: 0; }
.sdash > * { min-width: 0; }
/* `.panel + .panel { margin-top: 18px }` مالِ پنل‌های روی‌همِ چیدمان‌های قدیمی
   است و اینجا روی `gap` سوار می‌شد: فاصلهٔ بینِ «آزمون‌های من» و «مجموعه‌ها»
   ۳۳px می‌شد در حالی که بقیه ۱۵px بودند. انتخابگر باید هم‌شکلِ خودش باشد وگرنه
   `.sdash > *` با ویژگیِ کمتر می‌بازد — همان کاری که `.two-column` می‌کند. */
.sdash > .panel + .panel { margin-top: 0; }

/* ───── نوار دسترسی و خرید ───── */
.sdash-access {
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
  padding: 14px 18px; border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--panel); box-shadow: var(--shadow);
}
.sdash-access-icon {
  display: grid; place-items: center; width: 42px; height: 42px; flex: none;
  border-radius: 13px; background: var(--panel-soft); color: var(--muted);
}
.sdash-access-icon .ui-icon { width: 21px; height: 21px; }
.sdash-access.ok .sdash-access-icon { background: var(--teal-soft); color: var(--teal); }
.sdash-access.warn .sdash-access-icon { background: var(--yellow-soft); color: var(--yellow); }
.sdash-access.demo .sdash-access-icon { background: var(--purple-soft); color: var(--purple); }
.sdash-access.none .sdash-access-icon { background: var(--orange-soft); color: var(--orange); }
.sdash-access-copy { display: grid; gap: 2px; min-width: 200px; flex: 1 1 260px; }
.sdash-access-copy b { font-size: 15.5px; line-height: 1.55; }
.sdash-access-copy small {
  display: flex; align-items: center; flex-wrap: wrap; gap: 6px;
  color: var(--muted); font-size: 11.5px; line-height: 1.7;
}
/* نشانِ وضعیت: جای «eyebrow»ِ خطِ سومِ قبلی. رنگش از حالتِ کارت می‌آید. */
.sdash-access-tag {
  flex: none; padding: 2px 8px; border-radius: 999px;
  background: var(--panel-soft); color: var(--muted);
  font-style: normal; font-size: 10.5px; font-weight: 800;
}
.sdash-access.ok .sdash-access-tag { background: var(--teal-soft); color: var(--teal); }
.sdash-access.warn .sdash-access-tag { background: var(--yellow-soft); color: var(--yellow); }
.sdash-access.demo .sdash-access-tag { background: var(--purple-soft); color: var(--purple); }
.sdash-access-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-inline-start: auto; }
.sdash-demo-btn { color: var(--purple); border-color: color-mix(in srgb, var(--purple) 30%, var(--line)); }
.sdash-demo-btn:hover { background: var(--purple-soft); }

/* ───── ردیف نمودارها ───── */
.sdash-charts {
  position: relative;                 /* لنگرِ تولتیپِ مشترکِ .qstat-tooltip */
  display: grid; gap: 14px;
  grid-template-columns: repeat(auto-fit, minmax(255px, 1fr));
}
.sdash-chart {
  display: grid; gap: 12px; align-content: start;
  padding: 16px 17px 14px; border: 1px solid var(--line);
  border-radius: var(--radius); background: var(--panel); box-shadow: var(--shadow);
}
.sdash-chart header { display: flex; align-items: center; gap: 10px; }
.sdash-chart header h3 { margin: 0; font-size: 13.5px; line-height: 1.7; }
.sdash-chart header small { color: var(--muted); font-size: 11px; }
.sdash-chart-icon {
  display: grid; place-items: center; width: 34px; height: 34px; flex: none;
  border-radius: 11px; background: var(--panel-soft); color: var(--muted);
}
.sdash-chart-icon .ui-icon { width: 17px; height: 17px; }
.sdash-chart.quota.ok .sdash-chart-icon { background: var(--teal-soft); color: var(--teal); }
.sdash-chart.quota.warn .sdash-chart-icon { background: var(--yellow-soft); color: var(--yellow); }
.sdash-chart.quota.danger .sdash-chart-icon { background: var(--red-soft); color: var(--red); }
.sdash-chart.kinds .sdash-chart-icon { background: var(--blue-soft); color: var(--blue); }

/* ───── حلقه ───── */
.sdash-ring { position: relative; width: 156px; margin: 2px auto 0; }
.sdash-ring svg { display: block; width: 100%; height: auto; }
.sdash-ring-track { fill: none; stroke: var(--line); stroke-width: 13; }
.sdash-ring-arc { fill: none; stroke-width: 13; stroke-linecap: round; transition: stroke-dasharray .5s ease; }
.sdash-ring-arc.ok { stroke: var(--teal); }
.sdash-ring-arc.warn { stroke: var(--yellow); }
.sdash-ring-arc.danger { stroke: var(--red); }
.sdash-kind-seg { stroke-width: 13; }
.sdash-ring-core {
  position: absolute; inset: 0; display: grid; place-content: center; gap: 1px;
  text-align: center; pointer-events: none;
}
.sdash-ring-core b { font-size: 25px; line-height: 1.2; }
.sdash-ring-core span { font-size: 10.5px; color: var(--muted); }

/* ───── راهنمای نمودار ───── */
.sdash-chart-legend { display: grid; gap: 5px; margin: 0; padding: 0; list-style: none; }
.sdash-chart-legend li {
  display: grid; grid-template-columns: 9px minmax(0, 1fr) auto; align-items: center;
  gap: 8px; font-size: 11.5px; color: var(--muted);
}
.sdash-chart-legend li span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sdash-chart-legend li b { color: var(--ink); font-size: 12px; }
.sdash-chart-legend i { width: 9px; height: 9px; border-radius: 3px; background: var(--line); }
.sdash-chart-legend i.used { background: var(--orange); }
.sdash-chart-legend i.left { background: var(--teal); }
.sdash-chart-legend i.runs { background: var(--blue); }
/* بدونِ سقفِ ارتفاع: ده نوع آزمون داخلِ کادرِ ۱۳۲پیکسلی اسکرول می‌خورد و
   کاربر نمی‌دید چند نوع دارد. کارت بلندتر می‌شود و همسایه‌هایش در گرید کوتاه‌تر
   می‌مانند — که از پنهان‌کردنِ نیمِ فهرست بهتر است. */
.sdash-chart-legend.kinds { gap: 4px; }
.sdash-chart-empty, .sdash-col-empty {
  margin: 0; padding: 14px 4px; text-align: center;
  color: var(--muted); font-size: 11.5px; line-height: 2;
}
.sdash-chart footer {
  display: flex; align-items: center; gap: 6px; padding-top: 10px;
  border-top: 1px solid var(--line); color: var(--muted); font-size: 11px;
}
.sdash-chart footer .ui-icon { width: 14px; height: 14px; flex: none; }

/* ───── تخته‌های آزمون و مجموعه ───── */
.sdash-board .panel-header p { margin: 3px 0 0; color: var(--muted); font-size: 11.5px; }
.sdash-cols {
  display: grid; gap: 14px; padding: 16px 18px;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}
.sdash-col { display: grid; gap: 9px; align-content: start; min-width: 0; }
.sdash-col > header {
  display: flex; align-items: center; gap: 7px;
  padding-bottom: 8px; border-bottom: 1px solid var(--line);
}
.sdash-col > header .ui-icon { width: 16px; height: 16px; color: var(--muted); }
.sdash-col > header h4 { margin: 0; font-size: 12.5px; }
.sdash-rows { display: grid; gap: 7px; margin: 0; padding: 0; list-style: none; }
.sdash-row {
  display: flex; align-items: center; gap: 9px; min-width: 0;
  padding: 9px 10px; border: 1px solid var(--line); border-radius: 13px; background: var(--panel-soft);
}
.sdash-row-icon {
  display: grid; place-items: center; width: 30px; height: 30px; flex: none; border-radius: 10px;
  background: color-mix(in srgb, var(--sdash-accent, var(--muted)) 12%, transparent);
  color: var(--sdash-accent, var(--muted));
}
.sdash-row-icon .ui-icon { width: 16px; height: 16px; }
.sdash-row-main { display: grid; gap: 2px; min-width: 0; flex: 1 1 auto; }
.sdash-row-main b { font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sdash-row-main small { color: var(--muted); font-size: 10.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sdash-row .primary-button, .sdash-row .ghost-button { flex: none; padding: 5px 10px; font-size: 11px; }
.sdash-row .ghost-button .ui-icon, .sdash-row .primary-button .ui-icon { width: 14px; height: 14px; }

.sdash-set-group { padding: 0 18px 16px; }
.sdash-set-group h4 {
  display: flex; align-items: center; gap: 7px; margin: 14px 0 9px; font-size: 12.5px;
}
.sdash-set-group h4 .ui-icon { width: 16px; height: 16px; color: var(--muted); }
.sdash-set-group h4 b {
  margin-inline-start: auto; padding: 1px 7px; border-radius: 999px;
  background: var(--panel-soft); color: var(--muted); font-size: 11px; font-weight: 700;
}
/* `auto-fill` نه `auto-fit`: با یک مجموعهٔ نیمه‌تمام، auto-fit کارت را به کلِ
   عرض می‌کشد و نوارِ پیشرفت به یک خطِ بی‌قواره تبدیل می‌شود. */
.sdash-sets {
  display: grid; gap: 9px; margin: 0; padding: 0; list-style: none;
  grid-template-columns: repeat(auto-fill, minmax(215px, 1fr));
}
.sdash-set {
  display: grid; gap: 7px; padding: 11px 12px; cursor: pointer;
  border: 1px solid var(--line); border-radius: 13px; background: var(--panel-soft);
  transition: border-color .16s ease, transform .16s ease, box-shadow .16s ease;
}
.sdash-set:hover, .sdash-set:focus-visible {
  transform: translateY(-2px); border-color: color-mix(in srgb, var(--orange) 34%, var(--line));
  box-shadow: 0 8px 18px rgba(79, 58, 38, .08);
}
.sdash-set-head { display: flex; align-items: center; gap: 7px; min-width: 0; }
.sdash-set-icon { width: 15px; height: 15px; flex: none; color: var(--orange); }
.sdash-set-head b { font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sdash-set-head em {
  margin-inline-start: auto; flex: none; font-style: normal; font-size: 11px; color: var(--muted);
}
.sdash-set-bar { display: block; height: 6px; border-radius: 999px; background: var(--line); overflow: hidden; }
.sdash-set-bar i { display: block; height: 100%; border-radius: 999px; background: var(--teal); }
.sdash-set small { color: var(--muted); font-size: 10.5px; }

/* ───── کارت سهمیه: دو حلقهٔ هم‌مرکز ───── */
/* هر دو حلقه هم‌ضخامت‌اند و روی ضخامتِ **کم** (۱۰، نه ۱۳ِ حلقهٔ تکیِ بقیهٔ
   کارت‌ها). دو دلیل: حلقهٔ درونیِ نازک‌تر «کم‌اهمیت‌تر» خوانده می‌شد در حالی که
   سهمیهٔ روزانه اتفاقاً همانی است که زودتر تمام می‌شود؛ و دو حلقهٔ ضخیم روی هم
   سنگین می‌شوند. با شعاع‌های ۵۴ و ۳۸، این ضخامت ۶ واحد فاصلهٔ خالی بین لبه‌ها
   می‌گذارد (به‌جای ۳) و قطرِ آزادِ وسط را هم بازتر می‌کند. */
.sdash-ring.dual { width: 168px; }
.sdash-ring.dual .sdash-ring-arc,
.sdash-ring.dual .sdash-ring-track { stroke-width: 10; }
.sdash-ring.dual .sdash-ring-core b { font-size: 21px; }
.sdash-ring.dual .sdash-ring-core span { font-size: 9.5px; max-width: 74px; line-height: 1.5; }

.sdash-quota-rows { display: grid; gap: 7px; margin: 0; padding: 0; list-style: none; }
/* flex نه grid: با grid، `em`ِ توضیح که کلِ عرض را می‌گیرد ستون‌های `auto` را
   هم پهن می‌کرد و دکمهٔ «شارژ» ۳۴۶px می‌شد. اینجا `em` با `flex-basis:100%`
   خودش می‌رود خطِ بعد و روی عرضِ چیزی اثر نمی‌گذارد. */
.sdash-quota-rows li {
  display: flex; flex-wrap: wrap; align-items: center; gap: 3px 8px; padding: 8px 10px;
  border: 1px solid var(--line); border-radius: 12px; background: var(--panel-soft);
}
.sdash-quota-rows li > span { flex: 1 1 auto; min-width: 0; font-size: 11.5px; color: var(--muted); }
.sdash-quota-rows li > b { flex: none; font-size: 12px; }
.sdash-quota-rows li > em {
  flex: 1 0 100%; padding-inline-start: 17px;
  font-style: normal; font-size: 10px; color: var(--muted);
}
.sdash-quota-dot { width: 9px; height: 9px; border-radius: 3px; flex: none; }
.sdash-quota-dot.day { background: var(--teal); }
.sdash-quota-dot.week { background: var(--blue); }
.sdash-quota-dot.credit { background: var(--purple); }
.sdash-quota-rows li.warn > b { color: var(--yellow); }
.sdash-quota-rows li.danger { border-color: color-mix(in srgb, var(--red) 28%, var(--line)); background: var(--red-soft); }
.sdash-quota-rows li.danger > b { color: var(--red); }
.sdash-quota-buy {
  flex: none; display: inline-flex; align-items: center; gap: 4px;
  padding: 4px 10px; border: 1px solid color-mix(in srgb, var(--purple) 30%, var(--line));
  border-radius: 999px; background: var(--panel); color: var(--purple);
  font: inherit; font-size: 10.5px; font-weight: 700; cursor: pointer;
}
.sdash-quota-buy:hover { background: var(--purple-soft); }
.sdash-quota-buy .ui-icon { width: 12px; height: 12px; }

/* ───── نمودار نوع آزمون: بازه، نوار، کلیک ───── */
.sdash-range {
  display: inline-flex; flex: none; gap: 2px; padding: 2px;
  border: 1px solid var(--line); border-radius: 999px; background: var(--panel-soft);
}
.sdash-range button {
  border: 0; background: none; color: var(--muted); font: inherit; font-size: 10.5px;
  font-weight: 700; padding: 4px 10px; border-radius: 999px; cursor: pointer;
}
.sdash-range button.on { background: var(--panel); color: var(--ink); box-shadow: 0 1px 3px rgba(41, 36, 29, .1); }

.sdash-kind-bars { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.sdash-kind-bars li {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center;
  gap: 4px 8px; cursor: pointer; padding: 7px 9px; border-radius: 11px;
  border: 1px solid transparent; transition: border-color .16s ease, background .16s ease;
}
.sdash-kind-bars li:hover, .sdash-kind-bars li:focus-visible {
  background: var(--panel-soft); border-color: var(--line);
}
.sdash-kind-bar-name {
  display: inline-flex; align-items: center; gap: 7px; min-width: 0;
  font-size: 11.5px; color: var(--muted);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.sdash-kind-bar-name i { width: 9px; height: 9px; border-radius: 3px; flex: none; }
.sdash-kind-bars b { font-size: 12.5px; }
.sdash-kind-bar-track {
  grid-column: 1 / -1; display: block; height: 7px;
  border-radius: 999px; background: var(--line); overflow: hidden;
}
.sdash-kind-bar-track i { display: block; height: 100%; border-radius: 999px; min-width: 4px; }

.sdash-chart-legend.kinds li[data-sdash-kind] { cursor: pointer; border-radius: 8px; }
.sdash-chart-legend.kinds li[data-sdash-kind]:hover,
.sdash-chart-legend.kinds li[data-sdash-kind]:focus-visible { color: var(--ink); }
.sdash-kind-seg { cursor: pointer; }
.sdash-kind-empty { display: grid; gap: 10px; justify-items: center; padding: 18px 6px; text-align: center; }
.sdash-kind-empty p { margin: 0; color: var(--muted); font-size: 11.5px; line-height: 2; }

/* سربرگِ کارتِ نوعِ آزمون سه بخش دارد و بخشِ میانی (عنوان) `min-width:0` نداشت،
   پس عنوان زیرِ ۱۲۰۰px به دو-سه خط می‌شکست در حالی که کلیدِ بازه کنارش چسبیده
   بود. حالا عنوان یک حداقلِ واقعی (۱۶۰px) دارد: هرجا کنارِ هم جا نشوند، کلیدِ
   بازه به خطِ خودش می‌رود و عنوان تک‌خطی می‌ماند. */
.sdash-chart.kinds header { flex-wrap: wrap; row-gap: 8px; }
/* `:not(.sdash-range)` حیاتی است — کلیدِ بازه هم یک `div` است و بدون این استثنا
   همان `flex:1` را می‌گرفت و تا آخرِ خط کش می‌آمد. */
.sdash-chart.kinds header > div:not(.sdash-range) { flex: 1 1 160px; min-width: 0; }
.sdash-chart.kinds header .sdash-range { flex: 0 0 auto; margin-inline-start: auto; }

@media (max-width: 720px) {
  .sdash-chart header { flex-wrap: wrap; }
  .sdash-range { margin-inline-start: auto; }
}

/* ───── تختهٔ عملکرد: دقت + لول و استمرار ───── */
.sdash-perf-row {
  position: relative;                 /* لنگرِ تولتیپِ نوارِ دقت */
  display: grid; gap: 14px;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}
.sdash-perf {
  display: grid; gap: 9px; align-content: start;
  padding: 13px 15px 11px; border: 1px solid var(--line);
  border-radius: var(--radius); background: var(--panel); box-shadow: var(--shadow);
}
.sdash-perf header { display: flex; align-items: center; gap: 10px; }
.sdash-perf header > div { min-width: 0; flex: 1 1 auto; }
.sdash-perf header h3 { margin: 0; font-size: 13.5px; line-height: 1.7; }
.sdash-perf header small { color: var(--muted); font-size: 11px; }
.sdash-perf-big { font-size: 24px; font-weight: 800; line-height: 1; flex: none; }
.sdash-perf.accuracy.ok .sdash-chart-icon { background: var(--teal-soft); color: var(--teal); }
.sdash-perf.accuracy.ok .sdash-perf-big { color: var(--teal); }
.sdash-perf.accuracy.warn .sdash-chart-icon { background: var(--yellow-soft); color: var(--yellow); }
.sdash-perf.accuracy.warn .sdash-perf-big { color: var(--yellow); }
.sdash-perf.accuracy.danger .sdash-chart-icon { background: var(--red-soft); color: var(--red); }
.sdash-perf.accuracy.danger .sdash-perf-big { color: var(--red); }
.sdash-perf.level .sdash-chart-icon { background: var(--purple-soft); color: var(--purple); }

.sdash-perf-bar {
  display: flex; height: 12px; border-radius: 999px; overflow: hidden;
  background: var(--line); gap: 1px;
}
.sdash-perf-bar span { display: block; height: 100%; min-width: 2px; }
.sdash-perf-bar .correct { background: var(--teal); }
.sdash-perf-bar .wrong { background: var(--red); }
.sdash-perf-bar .blank { background: #cfc9bd; }
.sdash-perf-bar .pending { background: var(--yellow); }
.sdash-chart-legend i.correct { background: var(--teal); }
.sdash-chart-legend i.wrong { background: var(--red); }
.sdash-chart-legend i.blank { background: #cfc9bd; }

/* راهنما یک ردیفِ افقی است نه سه ردیفِ روی هم: سه عددِ کوچک ارزشِ ۶۷px ارتفاع
   را نداشتند، و کارت باید هم‌قدِ کارتِ کناری‌اش بماند. */
.sdash-perf-legend {
  display: flex; flex-wrap: wrap; gap: 5px 14px; margin: 0; padding: 0; list-style: none;
}
.sdash-perf-legend li { display: inline-flex; align-items: center; gap: 5px; font-size: 11px; color: var(--muted); }
.sdash-perf-legend b { font-size: 12px; color: var(--ink); }
.sdash-perf-legend i { width: 8px; height: 8px; border-radius: 3px; background: var(--line); }
.sdash-perf-legend i.correct { background: var(--teal); }
.sdash-perf-legend i.wrong { background: var(--red); }
.sdash-perf-legend i.blank { background: #cfc9bd; }

/* دو خانهٔ «آزمونی/تمرینی» تک‌خطی‌اند: برچسب و درصد کنار هم، شمارِ پاسخ زیرش. */
.sdash-perf-modes { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; }
.sdash-perf-mode {
  display: flex; align-items: baseline; flex-wrap: wrap; gap: 2px 6px;
  padding: 6px 9px; border-radius: 11px;
  background: var(--panel-soft); border: 1px solid var(--line);
}
.sdash-perf-mode small { font-size: 10.5px; color: var(--muted); }
.sdash-perf-mode b { font-size: 13.5px; margin-inline-start: auto; }
.sdash-perf-mode em { flex: 1 0 100%; font-style: normal; font-size: 9.5px; color: var(--muted); }
.sdash-perf-mode.exam b { color: var(--blue); }
.sdash-perf-mode.practice b { color: var(--teal); }

.sdash-perf footer {
  display: flex; align-items: center; gap: 6px; padding-top: 8px;
  border-top: 1px solid var(--line); color: var(--muted); font-size: 11px;
}
.sdash-perf footer .ui-icon { width: 14px; height: 14px; flex: none; }
.sdash-perf-link {
  margin-inline-start: auto; display: inline-flex; align-items: center; gap: 3px;
  border: 0; background: none; color: var(--orange); font: inherit; font-size: 11px;
  font-weight: 700; cursor: pointer; padding: 0; flex: none;
}
.sdash-perf-link .ui-icon { width: 13px; height: 13px; }
.sdash-perf-cta { display: flex; justify-content: center; padding-bottom: 4px; }
/* «نحوهٔ محاسبه» تولتیپِ هاور/فوکوس است نه دکمهٔ پاپ‌آپ: جوابِ این سؤال سه خط
   است و باز کردنِ یک مودال برایش، کاربر را از صفحه بیرون می‌برد تا برگردد.
   `tabindex` لازم است تا با صفحه‌کلید هم باز شود. */
.sdash-perf-help {
  position: relative; flex: none; display: grid; place-items: center;
  width: 26px; height: 26px; border: 1px solid var(--line); border-radius: 9px;
  background: var(--panel); color: var(--muted); cursor: help;
}
.sdash-perf-help:hover { color: var(--purple); border-color: color-mix(in srgb, var(--purple) 32%, var(--line)); }
.sdash-perf-help:focus-visible { outline: 2px solid var(--orange); outline-offset: 2px; }
.sdash-perf-help > .ui-icon { width: 14px; height: 14px; }
.sdash-perf-tip {
  position: absolute; inset-inline-end: 0; inset-block-start: calc(100% + 7px);
  z-index: 20; width: min(240px, calc(100vw - 44px));
  display: grid; gap: 3px; padding: 9px 11px; text-align: start;
  border: 1px solid var(--line); border-radius: 11px;
  background: var(--panel); box-shadow: 0 14px 30px rgba(41, 36, 29, .16);
  opacity: 0; visibility: hidden; transform: translateY(-4px);
  transition: opacity .14s ease, transform .14s ease, visibility .14s;
}
.sdash-perf-tip b { color: var(--ink); font-size: 10.5px; font-weight: 800; }
.sdash-perf-tip > span { color: var(--purple); font-size: 11px; font-weight: 700; }
.sdash-perf-tip small { color: var(--muted); font-size: 10px; line-height: 1.9; }
.sdash-perf-help:hover .sdash-perf-tip,
.sdash-perf-help:focus-visible .sdash-perf-tip,
.sdash-perf-help:focus-within .sdash-perf-tip { opacity: 1; visibility: visible; transform: translateY(0); }

/* حلقهٔ لول با conic کشیده می‌شود نه SVG: اینجا فقط یک درصد است و ماسکِ
   radial-gradient ارزان‌تر از یک svg تازه در هر رندر است. */
.sdash-level-row { display: flex; align-items: center; gap: 12px; }
.sdash-level-ring {
  flex: none; position: relative; width: 72px; height: 72px; border-radius: 50%;
  background: conic-gradient(var(--purple) var(--sdash-ring-deg, 0deg), var(--line) 0);
}
.sdash-level-ring::after {
  content: ""; position: absolute; inset: 8px; border-radius: 50%; background: var(--panel);
}
.sdash-level-core {
  position: absolute; inset: 0; z-index: 1; display: grid; place-content: center;
  gap: 0; text-align: center;
}
.sdash-level-core b { font-size: 21px; line-height: 1.1; }
.sdash-level-core em { font-style: normal; font-size: 9.5px; color: var(--muted); }
.sdash-level-facts {
  display: grid; grid-template-columns: 1fr 1fr; gap: 6px;
  margin: 0; padding: 0; list-style: none; flex: 1 1 auto; min-width: 0;
}
.sdash-level-facts li {
  display: grid; grid-template-columns: auto minmax(0, 1fr); grid-template-rows: auto auto;
  align-items: center; column-gap: 6px;
  padding: 5px 8px; border: 1px solid var(--line); border-radius: 11px; background: var(--panel-soft);
}
.sdash-level-facts .sdash-fact-icon {
  grid-row: 1 / 3; display: grid; place-items: center; width: 23px; height: 23px;
  border-radius: 8px; background: var(--panel); color: var(--muted);
}
.sdash-level-facts .sdash-fact-icon .ui-icon { width: 13px; height: 13px; }
.sdash-level-facts small { font-size: 9.5px; color: var(--muted); }
.sdash-level-facts b { font-size: 12px; }
.sdash-level-facts li.on .sdash-fact-icon { background: var(--orange-soft); color: var(--orange); }
.sdash-level-facts li.on b { color: var(--orange); }

.sdash-skeleton { display: grid; gap: 9px; }
.sdash-skeleton i {
  display: block; height: 13px; border-radius: 7px;
  background: linear-gradient(90deg, var(--line), var(--panel-soft), var(--line));
  background-size: 200% 100%; animation: sdashShimmer 1.3s ease-in-out infinite;
}
.sdash-skeleton i:nth-child(1) { width: 100%; height: 30px; }
.sdash-skeleton i:nth-child(2) { width: 78%; }
.sdash-skeleton i:nth-child(3) { width: 52%; }
@keyframes sdashShimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }

/* ───── ستونِ سومِ ردیفِ نمودارها ─────
   سه کارتِ روی‌هم که **مجموعشان** باید هم‌قدِ کارت‌های کناری باشد، وگرنه ته
   ستون یک حفرهٔ خالی می‌ماند. فلکس (نه گرید) انتخاب شده چون تعدادِ کارت‌ها ثابت
   نیست — کارتِ کنکور بدونِ تاریخِ پلن اصلاً ساخته نمی‌شود — و این قاعده با دو
   یا سه کارت یکسان کار می‌کند: هرچه اضافه بیاید سهمِ کارتِ آخر است. */
.sdash-chart-stack { display: flex; flex-direction: column; gap: 14px; }
/* فضای اضافهٔ ستون **فقط** سهمِ نمودارِ هفته است. یک بار تقسیمش کردیم بین
   «دسترسی سریع» و نمودار، و نتیجه یک کارتِ ۲۵۰پیکسلی شد با دو دکمه وسطِ فضای
   خالی — چیزی که هیچ‌کس نمی‌خواهد ببیند. قاعده: کارتی که محتوایش با ارتفاع
   بهتر می‌شود (نمودار) کش می‌آید؛ کارتی که محتوایش ثابت است (دو دکمه، یک
   ردیفِ شمارش معکوس) قدِ خودش را نگه می‌دارد. */
.sdash-chart-stack > .week { flex: 1 1 auto; min-height: 0; }
.sdash-chart-stack > .quick,
.sdash-chart-stack > .konkur { flex: 0 0 auto; }

.sdash-chart.quick .sdash-chart-icon { background: var(--purple-soft); color: var(--purple); }
.sdash-quick-actions { display: grid; gap: 8px; }
.sdash-quick-actions button { justify-content: center; }
/* `.ghost-button` پایه `border:0` دارد، پس قابِ اینجا باید کاملِ shorthand
   باشد؛ فقط `border-color` هیچ خطی نمی‌کشد. */
.sdash-quick-smart {
  border: 1px solid color-mix(in srgb, var(--purple) 30%, var(--line));
  background: var(--purple-soft); color: var(--purple);
}
.sdash-quick-smart:hover { background: color-mix(in srgb, var(--purple) 15%, var(--panel)); border-color: var(--purple); color: var(--purple); }

/* شمارش معکوس یک ردیفِ افقی است: آیکون، عنوان و تاریخ، بعد عددِ روز در انتها. */
.sdash-chart.konkur.compact {
  grid-auto-flow: column; grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center; gap: 11px; padding: 12px 14px;
}
.sdash-chart.konkur .sdash-chart-icon { background: var(--red-soft); color: var(--red); }
.sdash-konkur-copy { min-width: 0; }
.sdash-konkur-copy h3 { margin: 0; font-size: 13px; line-height: 1.6; }
.sdash-konkur-copy small {
  display: block; color: var(--muted); font-size: 10.5px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.sdash-konkur-days {
  display: inline-flex; align-items: baseline; gap: 4px; flex: none;
  font-size: 26px; line-height: 1; font-weight: 800; color: var(--red);
  font-variant-numeric: tabular-nums;
}
.sdash-konkur-days em { font-style: normal; font-size: 11px; font-weight: 700; color: var(--muted); }
.sdash-konkur-buy {
  display: grid; place-items: center; width: 32px; height: 32px; flex: none;
  border: 1px solid color-mix(in srgb, var(--orange) 30%, var(--line)); border-radius: 10px;
  background: var(--orange-soft); color: var(--orange); cursor: pointer;
}
.sdash-konkur-buy:hover { border-color: var(--orange); }
.sdash-konkur-buy .ui-icon { width: 16px; height: 16px; }

/* ───── تمرینِ این هفته ─────
   میله‌ها از یک خطِ کف بالا می‌آیند و **کادرِ سقف ندارند**: کادرِ خالیِ پشتِ هر
   میله، روزِ کم‌کار را «ظرفِ نیمه‌خالی» نشان می‌داد، در حالی که اصلاً سقفی در
   کار نیست. مقیاس نسبیِ خودِ هفته است (بلندترین روز = کفِ کامل).

   هر هفت میله یک رنگ‌اند؛ نه جمعه فرق دارد نه امروز — رنگِ متفاوت یعنی «این
   روز فرق دارد» و اینجا ندارد. امروز فقط با پررنگ‌شدنِ نامش مشخص می‌شود.

   ستون ~۳۹px است و بلندترین نام («چهارشنبه») با فونتِ ۹px حدود ۳۳px، پس نامِ
   کاملِ روز جا می‌شود و لازم نیست به «۴ش» خلاصه شود. */
.sdash-chart.week { align-content: stretch; grid-template-rows: auto minmax(0, 1fr); }
.sdash-chart.week .sdash-chart-icon { background: var(--teal-soft); color: var(--teal); }
.sdash-chart.week .sdash-chart-icon .ui-icon { width: 20px; height: 20px; }
.sdash-week-bars {
  display: grid; grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 4px; margin: 0; padding: 0; list-style: none;
  border-bottom: 1px solid var(--line);
}
.sdash-week-day {
  display: grid; grid-template-rows: minmax(0, 1fr) auto;
  gap: 0; justify-items: center; align-items: end; min-width: 0;
}
/* ریل کلِ ارتفاعِ ردیف را می‌گیرد (ردیفِ `1fr` کارت)، پس میله‌ها هر چقدر جا
   باشد بلند می‌شوند و پایینشان روی خطِ کف، درست بالای نامِ روز می‌نشیند.
   عددِ بالای میله عمداً نیست: هفت عددِ ریز بالای هفت میله، خودِ شکلِ نمودار را
   شلوغ می‌کند در حالی که کارِ نمودار همان مقایسهٔ چشمیِ ارتفاع‌هاست. عدد دقیق
   روی هاورِ هر ستون می‌آید. */
.sdash-week-track { position: relative; display: block; width: 100%; height: 100%; min-height: 74px; }
.sdash-week-track i {
  position: absolute; inset-inline: 0; bottom: 0; min-height: 3px;
  border-radius: 6px 6px 0 0; background: var(--teal);
}
.sdash-week-day > em {
  font-style: normal; font-size: 9px; color: var(--muted); padding-top: 4px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%;
}
/* ردیفِ میله‌ها کشیده می‌شود تا کلِ فضای کارت را بگیرد. نسخهٔ قبلی
   `align-self:center` داشت و ul به ارتفاعِ محتوای خودش جمع می‌شد: میله‌ها کوتاه
   می‌ماندند و بالای کارت یک فضای خالی. */
.sdash-chart.week .sdash-week-bars { align-self: stretch; width: 100%; }
.sdash-week-day.now > em { color: var(--ink); font-weight: 700; }
/* روزِ نیامدهٔ هفته: نه میله دارد نه عدد؛ فقط نامش کم‌رنگ می‌ماند. */
.sdash-week-day.future > em { opacity: .45; }
.sdash-chart.week.is-loading .sdash-week-bars { opacity: .45; }

/* ───── قفلِ نرمِ تختهٔ عملکرد ───── */
.sdash-locked {
  display: grid; gap: 14px; padding: 18px 20px;
  border: 1px solid color-mix(in srgb, var(--orange) 26%, var(--line));
  border-radius: var(--radius); background: var(--panel); box-shadow: var(--shadow);
}
.sdash-locked-head { display: flex; align-items: flex-start; gap: 12px; }
.sdash-locked-icon {
  display: grid; place-items: center; width: 40px; height: 40px; flex: none;
  border-radius: 13px; background: var(--orange-soft); color: var(--orange);
}
.sdash-locked-icon .ui-icon { width: 20px; height: 20px; }
.sdash-locked-head b { display: block; font-size: 14px; line-height: 1.8; }
.sdash-locked-head small { color: var(--muted); font-size: 11.5px; line-height: 1.95; }
.sdash-locked-list {
  display: grid; gap: 9px; margin: 0; padding: 0; list-style: none;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}
.sdash-locked-list li {
  display: flex; align-items: flex-start; gap: 9px; min-width: 0;
  padding: 10px 11px; border: 1px solid var(--line); border-radius: 13px; background: var(--panel-soft);
}
.sdash-locked-tick {
  display: grid; place-items: center; width: 28px; height: 28px; flex: none;
  border-radius: 9px; background: var(--panel); color: var(--orange);
}
.sdash-locked-tick .ui-icon { width: 15px; height: 15px; }
.sdash-locked-list li > span:last-child { display: grid; gap: 2px; min-width: 0; }
.sdash-locked-list b { font-size: 12.5px; }
.sdash-locked-list small { color: var(--muted); font-size: 10.5px; line-height: 1.8; }
.sdash-locked-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 9px; }
.sdash-locked-note {
  display: inline-flex; align-items: center; gap: 5px;
  color: var(--muted); font-size: 11px;
}
.sdash-locked-note .ui-icon { width: 14px; height: 14px; }

@media (max-width: 720px) {
  .sdash-locked-actions button { flex: 1 1 auto; justify-content: center; }
}

/* ───── نوار یادآوری ───── */
.sdash-alerts {
  display: grid; gap: 9px;
  grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
}
.sdash-alert {
  display: flex; align-items: center; gap: 10px; text-align: start; cursor: pointer;
  padding: 11px 13px; border: 1px solid var(--line); border-radius: 14px;
  background: var(--panel); color: inherit; font: inherit; min-width: 0;
  box-shadow: var(--shadow);
  transition: border-color .16s ease, transform .16s ease;
}
.sdash-alert:hover, .sdash-alert:focus-visible { transform: translateY(-2px); }
.sdash-alert-icon {
  display: grid; place-items: center; width: 34px; height: 34px; flex: none;
  border-radius: 11px; background: var(--panel-soft); color: var(--muted);
}
.sdash-alert-icon .ui-icon { width: 17px; height: 17px; }
.sdash-alert-copy { display: grid; gap: 2px; min-width: 0; flex: 1 1 auto; }
.sdash-alert-copy b {
  font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.sdash-alert-copy small {
  color: var(--muted); font-size: 10.5px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.sdash-alert-badge {
  flex: none; padding: 3px 9px; border-radius: 999px;
  background: var(--panel-soft); color: var(--muted);
  font-size: 10.5px; font-weight: 800; white-space: nowrap;
}
.sdash-alert-go { flex: none; color: var(--muted); display: grid; place-items: center; }
.sdash-alert-go .ui-icon { width: 16px; height: 16px; }

.sdash-alert.teal .sdash-alert-icon { background: var(--teal-soft); color: var(--teal); }
.sdash-alert.teal .sdash-alert-badge { background: var(--teal-soft); color: var(--teal); }
.sdash-alert.teal:hover { border-color: color-mix(in srgb, var(--teal) 34%, var(--line)); }
.sdash-alert.pink .sdash-alert-icon { background: color-mix(in srgb, var(--sdash-pink) 12%, transparent); color: var(--sdash-pink); }
.sdash-alert.pink .sdash-alert-badge { background: color-mix(in srgb, var(--sdash-pink) 12%, transparent); color: var(--sdash-pink); }
.sdash-alert.pink:hover { border-color: color-mix(in srgb, var(--sdash-pink) 34%, var(--line)); }
.sdash-alert.orange .sdash-alert-icon { background: var(--orange-soft); color: var(--orange); }
.sdash-alert.orange .sdash-alert-badge { background: var(--orange); color: #fff; }
.sdash-alert.orange:hover { border-color: color-mix(in srgb, var(--orange) 34%, var(--line)); }

/* ───── «+N مورد دیگر» زیر ستون‌های آزمون ───── */
.sdash-col-more {
  display: inline-flex; align-items: center; gap: 4px; align-self: flex-start;
  border: 0; background: none; color: var(--orange); font: inherit;
  font-size: 11px; font-weight: 700; cursor: pointer; padding: 2px 0;
}
.sdash-col-more .ui-icon { width: 14px; height: 14px; }

/* ───── تختهٔ فعالیتِ سه ماه اخیر ─────
   سه ماه **کنارِ هم** در یک ردیف؛ هر ماه یک کارتِ دوخطی. زیرِ هم‌چیدنِ ماه‌ها
   با سه ماه دوباره همان ارتفاعی می‌شد که از اول از آن فرار کرده بودیم.
   خانه‌ها داخل هر کارت با `flex:1` عرض را مساوی تقسیم می‌کنند تا سه کارت
   ستون‌هایشان تراز بماند. */
.sdash-activity {
  display: grid; gap: 10px; padding: 14px 16px;
  border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--panel); box-shadow: var(--shadow);
}
.sdash-activity-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.sdash-activity-head > .ui-icon { width: 17px; height: 17px; color: var(--muted); }
.sdash-activity-head h3 { margin: 0; font-size: 13.5px; }
.sdash-activity-head small { color: var(--muted); font-size: 11px; }
.sdash-activity-rows {
  display: grid; gap: 8px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.sdash-activity-row {
  display: grid; gap: 7px; align-content: start; min-width: 0;
  padding: 9px 11px; border: 1px solid var(--line); border-radius: 14px; background: var(--panel-soft);
}
/* ماه جاری کمی برجسته‌تر است — همان ماهی که کاربر هنوز می‌تواند عوضش کند. */
.sdash-activity-row.now { border-color: color-mix(in srgb, var(--orange) 30%, var(--line)); background: var(--panel); }
.sdash-activity-line { display: flex; align-items: baseline; gap: 7px; min-width: 0; }
.sdash-activity-month {
  display: flex; align-items: baseline; gap: 5px; min-width: 0;
  overflow: hidden; white-space: nowrap;
}
.sdash-activity-month b { font-size: 12.5px; }
.sdash-activity-month em { font-style: normal; font-size: 9.5px; color: var(--muted); }
.sdash-activity-cells { display: flex; gap: 6px; min-width: 0; }

/* خانه تک‌ردیفه است: آیکون، برچسب، عدد — کنارِ هم. بلندترین برچسب («بلد نبودم»)
   با فونت ۱۰px حدود ۳۶px می‌خواهد، پس هر خانه ~۸۴px و هر کارتِ ماه ~۲۸۶px لازم
   دارد؛ همین عدد است که نقطهٔ شکستِ سه‌ستونی را تعیین می‌کند (پایین‌تر را ببین).
   `min-width:0` روی برچسب لازم است وگرنه flex اجازهٔ کوچک‌شدن نمی‌دهد و ردیف
   از کارت بیرون می‌زند به‌جای اینکه سه‌نقطه بخورد. */
.sdash-activity-cell {
  flex: 1 1 0; min-width: 0;
  display: flex; align-items: center; justify-content: center; gap: 4px;
  padding: 7px 5px; border: 1px solid var(--line); border-radius: 11px;
  background: var(--panel); color: var(--muted); font: inherit; font-size: 10px; cursor: pointer;
  transition: border-color .16s ease, background .16s ease;
}
.sdash-activity-cell .ui-icon { width: 13px; height: 13px; flex: none; }
.sdash-activity-cell span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sdash-activity-cell b { flex: none; font-size: 14px; color: var(--ink); font-variant-numeric: tabular-nums; }
.sdash-activity-cell.danger .ui-icon, .sdash-activity-cell.danger b { color: var(--red); }
.sdash-activity-cell.danger:hover:not(:disabled) { border-color: color-mix(in srgb, var(--red) 34%, var(--line)); background: var(--red-soft); }
.sdash-activity-cell.warn .ui-icon, .sdash-activity-cell.warn b { color: var(--yellow); }
.sdash-activity-cell.warn:hover:not(:disabled) { border-color: color-mix(in srgb, var(--yellow) 34%, var(--line)); background: var(--yellow-soft); }
.sdash-activity-cell.info .ui-icon, .sdash-activity-cell.info b { color: var(--blue); }
.sdash-activity-cell.info:hover:not(:disabled) { border-color: color-mix(in srgb, var(--blue) 34%, var(--line)); background: var(--blue-soft); }
/* خانهٔ صفر کلیک‌پذیر نیست: بردنِ کاربر به فهرستِ خالی جوابِ سؤالش نیست. */
.sdash-activity-cell.is-empty { opacity: .5; cursor: default; }
.sdash-activity-cell.is-empty b { color: var(--muted); }

.sdash-activity-total {
  flex: none; margin-inline-start: auto;
  color: var(--muted); font-size: 10.5px; white-space: nowrap;
}

/* نقطهٔ شکست از اندازه‌گیری آمده نه حدس: با نوارِ کناریِ ۲۴۴px و حاشیهٔ محتوا،
   سه ستون زیرِ این عرض خانه‌هایی کم‌تر از ~۸۴px می‌سازد و برچسب سه‌نقطه می‌خورد.
   آن‌وقت ماه‌ها زیرِ هم می‌روند و هر کارت تمامِ عرض را می‌گیرد. */
@media (max-width: 1260px) {
  .sdash-activity-rows { grid-template-columns: 1fr; }
}

@media (max-width: 720px) {
  .sdash-level-row { flex-direction: column; align-items: stretch; }
  .sdash-level-ring { margin: 0 auto; }
}

/* ───── پاپ‌آپ سهمیهٔ چاپ ─────
   عمداً بدونِ دکمهٔ خرید: سهمیه با پول باز نمی‌شود و گذاشتنِ دکمهٔ شارژ اینجا
   دقیقاً همان چیزی را می‌گوید که نیست. */
.pquota-modal { display: grid; gap: 14px; }
.pquota-hero {
  display: flex; align-items: flex-start; gap: 12px; padding: 14px;
  border-radius: 15px; background: var(--orange-soft);
}
.pquota-hero .ui-icon { width: 24px; height: 24px; flex: none; color: var(--orange); }
.pquota-hero b { display: block; font-size: 14px; line-height: 1.8; }
.pquota-hero small { color: var(--muted); font-size: 11.5px; line-height: 2; }
.pquota-breakdown { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.pquota-breakdown li {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 3px 10px;
  padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--panel-soft);
  font-size: 12px;
}
.pquota-breakdown li b { font-size: 12.5px; }
.pquota-breakdown li em { grid-column: 1 / -1; font-style: normal; font-size: 10.5px; color: var(--muted); }
.pquota-breakdown li.short { background: var(--red-soft); border-color: color-mix(in srgb, var(--red) 26%, var(--line)); }
.pquota-note { margin: 0; color: var(--muted); font-size: 11.5px; }

/* ───── پاپ‌آپ دموی ۲۴ ساعته ───── */
.demo-modal { display: grid; gap: 14px; }
.demo-hero {
  display: flex; align-items: flex-start; gap: 12px; padding: 14px;
  border-radius: 15px; background: var(--purple-soft);
}
.demo-hero .ui-icon { width: 24px; height: 24px; flex: none; color: var(--purple); }
.demo-hero b { display: block; font-size: 14px; line-height: 1.8; }
.demo-hero small { color: var(--muted); font-size: 11.5px; line-height: 2; }
.demo-rules { display: grid; gap: 7px; margin: 0; padding: 0; list-style: none; }
.demo-rules li {
  display: flex; align-items: flex-start; gap: 8px;
  color: var(--muted); font-size: 11.5px; line-height: 1.95;
}
.demo-rules li b { color: var(--ink); }
.demo-rules .ui-icon { width: 15px; height: 15px; flex: none; margin-top: 3px; color: var(--orange); }
.demo-picks {
  display: grid; gap: 9px; max-height: 320px; overflow: auto; padding-inline-end: 2px;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
}
.demo-pick {
  display: flex; align-items: center; gap: 10px; text-align: start; cursor: pointer;
  padding: 10px 11px; border: 1px solid var(--line); border-radius: 14px;
  background: var(--panel); color: inherit; font: inherit;
  transition: border-color .16s ease, background .16s ease;
}
.demo-pick:hover { border-color: color-mix(in srgb, var(--purple) 34%, var(--line)); }
.demo-pick.on { border-color: var(--purple); background: var(--purple-soft); }
.demo-pick-copy { display: grid; gap: 2px; min-width: 0; flex: 1 1 auto; }
.demo-pick-copy b { font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.demo-pick-copy small { color: var(--muted); font-size: 10.5px; }
.demo-pick-tick {
  display: grid; place-items: center; width: 22px; height: 22px; flex: none;
  border-radius: 50%; border: 1px solid var(--line); color: transparent;
}
.demo-pick-tick .ui-icon { width: 13px; height: 13px; }
.demo-pick.on .demo-pick-tick { border-color: var(--purple); background: var(--purple); color: #fff; }
.demo-actions { display: flex; justify-content: flex-end; gap: 9px; }

@media (max-width: 720px) {
  /* ستونی‌کردنِ کلِ کارت، آیکون را هم به یک ردیفِ جدا می‌بُرد و ارتفاع را
     بی‌دلیل بالا می‌برد. کارت خودش `flex-wrap` دارد: کافی است دکمه‌ها یک ردیفِ
     کامل بگیرند و آیکون کنارِ متن بماند. */
  .sdash-access-copy { min-width: 0; flex: 1 1 140px; }
  .sdash-access-actions { flex: 1 0 100%; margin-inline-start: 0; }
  .sdash-access-actions button { flex: 1 1 auto; justify-content: center; }
  .sdash-cols, .sdash-set-group { padding-inline: 14px; }
  /* در یک ستون، خانه‌ها عرض دارند پس برچسب می‌ماند و فقط کمی بزرگ‌تر می‌شود؛
     راهنمای سربرگ می‌رود تا سربرگ دو خطی نشود. */
  .sdash-activity-head small { display: none; }
  .sdash-activity-cell { gap: 6px; font-size: 11px; }
  .demo-actions { flex-direction: column-reverse; }
  .demo-actions button { justify-content: center; }
}

.content > * { margin-bottom: 22px; }
.content > *:last-child { margin-bottom: 0; }

/* ═══════════════════════════════════════════════════════════════════════
   آزمون صلاحیت مدیران
   `ax-*`  → صفحهٔ جدای داوطلب (/admin-test) که پوستهٔ پنل را ندارد
   `axm-*` → صفحهٔ «تست مدیران» داخل پنل مدیر اصلی
   ═══════════════════════════════════════════════════════════════════════ */
body.ax-body { background: radial-gradient(circle at 78% -4%, rgba(255, 184, 126, .16), transparent 30rem), var(--bg); }
#adminExamRoot[hidden] { display: none; }

.ax-page { min-height: 100vh; display: flex; flex-direction: column; }
.ax-top {
  position: sticky; top: 0; z-index: 30; display: flex; align-items: center; justify-content: space-between;
  gap: 14px; padding: 12px 26px; background: rgba(255, 255, 255, .88); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.ax-brand { display: flex; align-items: center; gap: 10px; }
.ax-brand-mark {
  width: 38px; height: 28px; flex: 0 0 38px; display: grid; place-items: center;
}
.ax-brand-mark > img, .ax-brand-mark > svg { width: 100%; height: 100%; object-fit: contain; display: block; }
.ax-brand-copy { display: grid; line-height: 1.5; }
.ax-brand-copy b { font-size: 13.5px; }
.ax-brand-copy small { font-size: 10.5px; color: var(--muted); }
.ax-who { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; }
.ax-who-name { font-size: 12.5px; font-weight: 700; }
.ax-who-role, .ax-who-progress {
  font-size: 10.5px; padding: 3px 9px; border-radius: 999px; background: var(--panel-soft);
  border: 1px solid var(--line); color: #5f5a52;
}
.ax-who-progress { background: var(--teal-soft); border-color: transparent; color: #147a6d; font-weight: 700; }

.ax-main { flex: 1 1 auto; width: min(920px, 100%); margin: 0 auto; padding: 26px 22px 60px; }
.ax-page-wide .ax-main { width: min(1500px, 100%); }

.ax-card {
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 26px 26px 28px; display: grid; gap: 14px;
}
.ax-card-narrow { max-width: 430px; margin: 40px auto 0; }
.ax-card h1 { margin: 0; font-size: 19px; }
.ax-sub { margin: 0; font-size: 12.5px; line-height: 2; color: #5f5a52; }
.ax-note {
  margin: 0; display: flex; align-items: flex-start; gap: 8px; font-size: 11.5px; line-height: 1.9;
  color: #6b6459; background: var(--panel-soft); border: 1px dashed var(--line); border-radius: 13px; padding: 10px 12px;
}
.ax-note svg { width: 15px; height: 15px; flex: none; margin-top: 2px; color: var(--yellow); }

.ax-form { display: grid; gap: 11px; }
.ax-input {
  width: 100%; border: 1px solid var(--line); border-radius: 13px; padding: 12px 14px;
  font: inherit; font-size: 13.5px; background: var(--panel-soft); color: var(--ink);
}
.ax-input:focus { outline: none; border-color: var(--orange); background: #fff; }
.ax-code { text-align: center; letter-spacing: .55em; font-size: 20px; font-weight: 700; }
.ax-primary {
  border: none; border-radius: 13px; padding: 12px 18px; font: inherit; font-size: 13.5px; font-weight: 700;
  background: var(--orange); color: #fff; cursor: pointer; transition: filter .15s ease, opacity .15s ease;
}
.ax-primary:hover:not(:disabled) { filter: brightness(1.06); }
.ax-primary:disabled { opacity: .45; cursor: not-allowed; }
.ax-primary.ax-sm { padding: 9px 16px; font-size: 12.5px; }
.ax-ghost {
  border: 1px solid var(--line); border-radius: 11px; padding: 8px 13px; font: inherit; font-size: 11.5px;
  background: #fff; color: #5f5a52; cursor: pointer; display: inline-flex; align-items: center; gap: 6px;
  justify-content: center; text-decoration: none;
}
.ax-ghost:hover { border-color: var(--orange); color: var(--orange); }
.ax-ghost svg { width: 14px; height: 14px; }
.ax-block { width: 100%; justify-content: center; }
.ax-link { border: none; background: none; font: inherit; font-size: 11.5px; color: var(--orange); cursor: pointer; padding: 0; }
.ax-devcode {
  font-size: 12px; text-align: center; padding: 8px; border-radius: 11px;
  background: var(--yellow-soft); color: #8a6712;
}

.ax-empty, .axm-empty {
  display: grid; justify-items: center; gap: 5px; text-align: center; padding: 26px 18px;
  border: 1px dashed var(--line); border-radius: 15px; background: var(--panel-soft); color: var(--muted);
}
.ax-empty svg, .axm-empty svg { width: 26px; height: 26px; color: var(--muted); }
.ax-empty b, .axm-empty b { font-size: 12.5px; color: #5f5a52; }
.ax-empty span, .axm-empty span { font-size: 11px; }
.axm-empty.small { padding: 16px; }

.ax-video, .axm-video { width: 100%; max-height: 60vh; border-radius: 15px; background: #14120f; }

/* ضریب سرعت پخش — کنترلِ خودِ مرورگر یا وجود ندارد (سافاری موبایل) یا سه کلیک
   داخل منوی کوچکش است. یک ساعت ویدیو با ۲× نصف می‌شود. */
.ax-rate {
  display: flex; align-items: center; gap: 6px; flex-wrap: wrap;
  padding: 8px 11px; border: 1px solid var(--line); border-radius: 13px; background: var(--panel-soft);
}
.ax-rate-label { font-size: 11px; color: var(--muted); margin-inline-end: 2px; }
.ax-rate-btn {
  min-width: 46px; padding: 5px 9px; border-radius: 9px; cursor: pointer;
  border: 1px solid var(--line); background: var(--panel); color: #5f5a52;
  font: inherit; font-size: 11.5px; direction: ltr;
  transition: background .15s, color .15s, border-color .15s;
}
.ax-rate-btn:hover { border-color: var(--orange); color: var(--orange); }
.ax-rate-btn.on { background: var(--orange); border-color: var(--orange); color: #fff; font-weight: 700; }
.ax-intro-text {
  font-size: 12.5px; line-height: 2.1; color: #524d46; background: var(--panel-soft);
  border: 1px solid var(--line); border-radius: 14px; padding: 13px 15px;
}
.ax-steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 9px; }
.ax-step {
  display: flex; align-items: flex-start; gap: 9px; padding: 11px 12px; border-radius: 13px;
  background: var(--panel-soft); border: 1px solid var(--line);
}
.ax-step b {
  width: 22px; height: 22px; flex: none; border-radius: 8px; display: grid; place-items: center;
  background: var(--orange-soft); color: var(--orange); font-size: 11.5px;
}
.ax-step span { font-size: 11.5px; line-height: 1.85; color: #5f5a52; }

.ax-pick-group { display: grid; gap: 9px; }
.ax-pick-group h2 { margin: 6px 0 0; font-size: 13px; color: #5f5a52; }
.ax-pick-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 10px; }
.ax-pick {
  border: 1px solid var(--line); border-radius: 15px; padding: 15px 14px; background: #fff; cursor: pointer;
  display: grid; gap: 4px; text-align: start; font: inherit; transition: border-color .15s ease, transform .15s ease;
}
.ax-pick:hover { border-color: var(--orange); transform: translateY(-2px); }
.ax-pick.busy { opacity: .5; pointer-events: none; }
.ax-pick b { font-size: 13.5px; }
.ax-pick small { font-size: 10.5px; color: var(--muted); }

.ax-done { text-align: center; justify-items: center; }
.ax-done-mark {
  width: 54px; height: 54px; border-radius: 18px; display: grid; place-items: center;
  background: var(--teal-soft); color: var(--teal);
}
.ax-done-mark svg { width: 28px; height: 28px; }

/* ── میز کار داوطلب ── */
.ax-work { display: grid; grid-template-columns: minmax(320px, 40%) 1fr; gap: 18px; align-items: start; }
.ax-paper {
  position: sticky; top: 74px; display: grid; gap: 10px; background: var(--panel);
  border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; box-shadow: var(--shadow);
}
.ax-paper-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.ax-paper-head b { font-size: 13.5px; display: block; }
.ax-paper-head small { font-size: 10.5px; color: var(--muted); }
.ax-paper-frame { width: 100%; height: calc(100vh - 220px); min-height: 380px; border: 1px solid var(--line); border-radius: 13px; background: #fff; }

.ax-questions { display: grid; gap: 14px; }
.ax-work-bar {
  position: sticky; top: 74px; z-index: 5; display: flex; align-items: center; gap: 11px; flex-wrap: wrap;
  background: var(--panel); border: 1px solid var(--line); border-radius: 15px; padding: 11px 14px; box-shadow: var(--shadow);
}
/* شمارهٔ ۱۰ سؤال به‌جای نوار پیشرفت (کلاسِ `.ax-step` مالِ صفحهٔ معرفی است). */
.ax-qnav { flex: 1 1 356px; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.ax-qnav-btn {
  width: 30px; height: 30px; border-radius: 10px; display: grid; place-items: center; cursor: pointer;
  border: 1.5px solid var(--line); background: var(--panel-soft); color: #5f5a52;
  font-size: 12.5px; font-weight: 700; font-family: inherit; padding: 0;
  transition: border-color .15s ease, background .15s ease, color .15s ease, transform .12s ease;
}
.ax-qnav-btn:hover { border-color: var(--orange); background: var(--orange-soft); color: #8a4a10; transform: translateY(-1px); }
.ax-qnav-btn.done { border-color: transparent; background: var(--teal); color: #fff; }
.ax-qnav-btn.done:hover { background: var(--teal); color: #fff; border-color: var(--orange); }
.ax-work-count { font-size: 11.5px; color: #5f5a52; }
@keyframes axFlash { from { box-shadow: 0 0 0 3px var(--orange-soft), 0 0 0 4px var(--orange); } to { box-shadow: var(--shadow); } }
.ax-q.ax-flash { animation: axFlash 1s ease; }

.ax-q {
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 15px 16px; display: grid; gap: 12px; box-shadow: var(--shadow);
}
.ax-q.done { border-color: rgba(26, 163, 146, .45); }
.ax-q.busy { opacity: .6; pointer-events: none; }
.ax-q-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.ax-q-num { font-size: 13.5px; font-weight: 700; }
.ax-q-state {
  display: inline-flex; align-items: center; gap: 5px; font-size: 10.5px; padding: 3px 9px;
  border-radius: 999px; background: var(--panel-soft); border: 1px solid var(--line); color: var(--muted);
}
.ax-q.done .ax-q-state { background: var(--teal-soft); border-color: transparent; color: #147a6d; font-weight: 700; }
.ax-q-state svg { width: 13px; height: 13px; }

/* صورت سؤال و پاسخ تشریحی زیر هم‌اند، نه هم‌ردیف: هر کدام تمام عرض کارت را دارد. */
.ax-q-slots { display: grid; grid-template-columns: 1fr; gap: 10px; }
.ax-slot {
  position: relative; min-height: 150px; border: 1.5px dashed var(--line); border-radius: 14px;
  background: var(--panel-soft); display: grid; place-items: center; padding: 26px 10px 40px; cursor: pointer;
  transition: border-color .15s ease, background .15s ease;
}
.ax-slot:hover, .ax-slot.over { border-color: var(--orange); background: var(--orange-soft); }
.ax-slot.armed { border-color: var(--orange); border-style: solid; background: var(--orange-soft); }
.ax-slot.has-img { border-style: solid; background: #fff; padding-top: 26px; }
.ax-slot-label {
  position: absolute; inset-block-start: 8px; inset-inline-start: 11px; font-size: 10.5px;
  color: var(--muted); font-weight: 700;
}
.ax-slot-hint { display: grid; justify-items: center; gap: 3px; text-align: center; color: var(--muted); }
.ax-slot-hint svg { width: 22px; height: 22px; }
.ax-slot-hint b { font-size: 11.5px; color: #5f5a52; }
.ax-slot-hint small { font-size: 10px; }
.ax-slot-img { max-width: 100%; max-height: 260px; border-radius: 9px; display: block; }
.ax-slot-x {
  position: absolute; inset-block-start: 6px; inset-inline-end: 6px; width: 24px; height: 24px;
  border-radius: 8px; border: 1px solid var(--line); background: #fff; display: grid; place-items: center; cursor: pointer;
}
.ax-slot-x svg { width: 13px; height: 13px; color: var(--red); }
/* پاسخ تشریحیِ چندبخشی: هر بخش یک کارتِ کوچک با ابزارِ روی هاور. */
.ax-slot-multi { place-items: stretch; padding: 26px 10px 44px; }
.ax-parts { display: grid; gap: 8px; width: 100%; align-content: start; }
.ax-part {
  position: relative; margin: 0; display: grid; gap: 4px; justify-items: center;
  border: 1px solid var(--line); border-radius: 11px; padding: 7px; background: var(--panel);
}
.ax-part img { max-width: 100%; max-height: 190px; border-radius: 7px; display: block; }
.ax-part figcaption { font-size: 10px; color: var(--muted); }
.ax-part-tools {
  position: absolute; inset-block-start: 6px; inset-inline-end: 6px; display: flex; gap: 4px;
  opacity: 0; transition: opacity .15s ease;
}
.ax-part:hover .ax-part-tools, .ax-part:focus-within .ax-part-tools { opacity: 1; }
.ax-part-tools button {
  width: 24px; height: 24px; border-radius: 7px; border: 1px solid var(--line); background: #fff;
  display: grid; place-items: center; cursor: pointer; font: inherit; font-size: 12px; color: #5f5a52;
}
.ax-part-tools button:hover:not(:disabled) { border-color: var(--orange); color: var(--orange); }
.ax-part-tools button:disabled { opacity: .35; cursor: default; }
.ax-part-tools button.danger svg { width: 12px; height: 12px; color: var(--red); }
.ax-slot-pick:disabled { opacity: .5; cursor: default; }

.ax-slot-tools {
  position: absolute; inset-block-end: 9px; inset-inline: 0; display: flex; justify-content: center;
  gap: 6px; flex-wrap: wrap; padding: 0 8px;
}
.ax-slot-pick {
  border: 1px solid var(--line); background: #fff; border-radius: 9px; padding: 5px 12px;
  font: inherit; font-size: 10.5px; color: #5f5a52; cursor: pointer;
}
.ax-slot-pick:hover { border-color: var(--orange); color: var(--orange); }
/* ورودیِ ماندگارِ انتخاب فایل: دیده نمی‌شود ولی داخل سند می‌ماند (display:none کلیک را در
   بعضی مرورگرها بی‌اثر می‌کند، پس فقط از دید پنهانش می‌کنیم). */
.ax-file-input {
  position: fixed; inset-block-start: 0; inset-inline-start: 0; width: 1px; height: 1px;
  opacity: 0; pointer-events: none; z-index: -1;
}
/* پاپ‌آپ ویدیوی راهنما: عنوان راست‌چین و کنارِ دکمهٔ بستن می‌نشیند
   (دکمهٔ بستن سرِ جای گوشه‌اش می‌ماند، عنوان درست بعد از آن شروع می‌شود). */
.ax-video-head { position: relative; justify-content: flex-start; }
.ax-video-head h2 { text-align: start; padding-inline-start: 42px; }
.ax-video-head .modal-close {
  position: absolute; inset-block-start: 50%; inset-inline-start: 20px; transform: translateY(-50%);
}
.ax-video-modal { display: grid; gap: 10px; justify-items: center; }
.ax-video-modal .ax-video { width: 100%; max-height: 66vh; border-radius: 13px; background: #000; }
.ax-video-modal .ax-rate { justify-content: center; }

.ax-q-field { display: grid; gap: 7px; }
.ax-q-field-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 11.5px; color: #5f5a52; font-weight: 700; }
.ax-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.ax-chip-empty { font-size: 11px; color: var(--muted); }
.ax-chip {
  display: inline-flex; align-items: baseline; gap: 6px; padding: 4px 10px; border-radius: 999px;
  background: var(--blue-soft); color: #2c4f9e; font-size: 11px; max-width: 100%;
}
.ax-chip b { font-weight: 700; }
.ax-chip small { font-size: 9.5px; opacity: .75; }

.ax-levels { display: flex; gap: 6px; flex-wrap: wrap; }
.ax-level {
  border: 1px solid var(--line); border-radius: 10px; padding: 7px 14px; font: inherit; font-size: 11.5px;
  background: #fff; color: #5f5a52; cursor: pointer; transition: all .14s ease;
}
.ax-level:hover { border-color: currentColor; }
.ax-level.lv-1.on { background: var(--teal-soft); border-color: transparent; color: #147a6d; font-weight: 700; }
.ax-level.lv-2.on { background: var(--blue-soft); border-color: transparent; color: #2c4f9e; font-weight: 700; }
.ax-level.lv-3.on { background: var(--yellow-soft); border-color: transparent; color: #8a6712; font-weight: 700; }
.ax-level.lv-4.on { background: var(--red-soft); border-color: transparent; color: #b03e3e; font-weight: 700; }

.ax-confirm-body { margin: 0; font-size: 13px; line-height: 2.1; color: #524d46; }

/* ── انتخابگر موضوع (پایهٔ دوازدهم) ── */
.ax-tp-head h2 small { display: block; font-size: 10.5px; font-weight: 400; color: var(--muted); margin-top: 3px; }
.ax-tp-search { display: flex; align-items: center; gap: 8px; padding: 12px 20px 0; }
.ax-tp-search svg { width: 16px; height: 16px; color: var(--muted); flex: none; }
.ax-tp-search input {
  flex: 1 1 auto; border: 1px solid var(--line); border-radius: 11px; padding: 9px 13px;
  font: inherit; font-size: 12.5px; background: var(--panel-soft);
}
.ax-tp-search input:focus { outline: none; border-color: var(--orange); background: #fff; }
.ax-tp-tree { max-height: min(56vh, 520px); overflow: auto; padding: 12px 20px; display: grid; gap: 2px; align-content: start; }
.ax-tp-row {
  display: flex; align-items: center; gap: 8px; padding: 7px 9px; border-radius: 10px; cursor: pointer;
  transition: background .12s ease;
}
.ax-tp-row:hover { background: var(--panel-soft); }
.ax-tp-row.lvl-1 { font-weight: 700; font-size: 12.5px; }
.ax-tp-row.lvl-2 { font-size: 12px; }
.ax-tp-row.lvl-3 { font-size: 11.5px; color: #5f5a52; }
.ax-tp-caret svg { width: 14px; height: 14px; color: var(--muted); transition: transform .16s ease; }
.ax-tp-row.open .ax-tp-caret svg { transform: rotate(180deg); }
/* بخشِ بدون زیربخش: جای فلش خالی می‌ماند تا با بخش‌های شاخه‌دار هم‌تراز بماند */
.ax-tp-caret-blank { width: 14px; height: 14px; flex: none; }
.ax-tp-row-leaf.on { background: var(--orange-soft); color: #a04a11; font-weight: 700; }
.ax-tp-label { flex: 1 1 auto; }
.ax-tp-count { font-size: 10px; color: var(--muted); }
.ax-tp-check {
  width: 17px; height: 17px; flex: none; border-radius: 6px; border: 1.5px solid var(--line);
  background: #fff; cursor: pointer; position: relative;
}
.ax-tp-check.on { background: var(--orange); border-color: var(--orange); }
.ax-tp-check.on::after {
  content: ""; position: absolute; inset-block-start: 2px; inset-inline-start: 5px; width: 4px; height: 8px;
  border: solid #fff; border-width: 0 2px 2px 0; transform: rotate(45deg);
}
.ax-tp-check.some { background: var(--orange-soft); border-color: var(--orange); }
.ax-tp-check.some::after {
  content: ""; position: absolute; inset-block-start: 6px; inset-inline-start: 3px;
  width: 8px; height: 2px; background: var(--orange); border-radius: 2px;
}
.ax-tp-kids { padding-inline-start: 18px; display: grid; gap: 2px; }
.ax-tp-leaf {
  display: flex; align-items: center; gap: 8px; padding: 6px 9px; border-radius: 9px;
  font-size: 11.5px; cursor: pointer; color: #5f5a52;
}
.ax-tp-leaf:hover { background: var(--panel-soft); }
.ax-tp-leaf.on { background: var(--orange-soft); color: #a04a11; font-weight: 700; }
.ax-tp-leaf input { accent-color: var(--orange); width: 15px; height: 15px; }
.ax-tp-empty { display: grid; justify-items: center; gap: 6px; padding: 34px; color: var(--muted); text-align: center; }
.ax-tp-empty svg { width: 26px; height: 26px; }
.ax-tp-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.ax-tp-selected { font-size: 11.5px; color: #5f5a52; }
.ax-tp-foot-actions { display: flex; gap: 8px; }

/* ── صفحهٔ مدیر اصلی ── */
.axm { display: grid; gap: 18px; }
.axm-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; flex-wrap: wrap; }
.axm-head h1 { margin: 0 0 6px; font-size: 20px; }
.axm-head p { margin: 0; max-width: 620px; font-size: 12.5px; line-height: 2; color: #5f5a52; }
.axm-link {
  display: grid; gap: 6px; justify-items: start; padding: 12px 14px; border-radius: 15px;
  background: var(--panel-soft); border: 1px solid var(--line);
}
.axm-link span { font-size: 10.5px; color: var(--muted); }
.axm-link code { font-size: 12px; direction: ltr; color: var(--orange); font-weight: 700; }
.axm-manager { gap: 10px; }
.axm-manager-row { display: flex; flex-wrap: wrap; align-items: center; gap: 9px; }
.axm-manager-row label { font-size: 12px; font-weight: 700; }
.axm-manager-row select { flex: 1 1 180px; max-width: 340px; }
.axm-manager-row button { white-space: nowrap; }

.axm-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 11px; }
.axm-stat {
  background: var(--panel); border: 1px solid var(--line); border-radius: 15px; padding: 14px 16px;
  display: grid; gap: 3px;
}
.axm-stat b { font-size: 21px; }
.axm-stat span { font-size: 11px; color: var(--muted); }

.axm-tabs { display: flex; gap: 7px; flex-wrap: wrap; border-bottom: 1px solid var(--line); padding-bottom: 10px; }
.axm-tab {
  border: 1px solid var(--line); background: #fff; border-radius: 11px; padding: 8px 15px; font: inherit;
  font-size: 12.5px; color: #5f5a52; cursor: pointer; display: inline-flex; align-items: center; gap: 7px;
}
.axm-tab.on { background: var(--orange); border-color: var(--orange); color: #fff; font-weight: 700; }
.axm-tab span {
  font-size: 10px; padding: 1px 7px; border-radius: 999px; background: var(--panel-soft); color: #5f5a52;
}
.axm-tab.on span { background: rgba(255, 255, 255, .28); color: #fff; }

.axm-body { display: grid; gap: 14px; }
.axm-add {
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 16px 18px; display: grid; gap: 11px;
}
.axm-add h2 { margin: 0; font-size: 14px; }
.axm-add > .primary-button { justify-self: start; }
.axm-add-row { display: flex; flex-wrap: wrap; gap: 10px; align-items: end; }
.axm-add-row label { flex: 1 1 180px; display: grid; gap: 5px; font-size: 11.5px; color: #5f5a52; }
.axm-add-row .primary-button { flex: 0 0 auto; height: 38px; }
.axm-hint { margin: 0; font-size: 11px; line-height: 1.95; color: var(--muted); }
.axm-input {
  width: 100%; border: 1px solid var(--line); border-radius: 11px; padding: 9px 12px;
  font: inherit; font-size: 12.5px; background: var(--panel-soft); color: var(--ink);
}
.axm-input:focus { outline: none; border-color: var(--orange); background: #fff; }
.axm-check { display: flex !important; align-items: center; gap: 8px; }
.axm-check input { accent-color: var(--orange); width: 16px; height: 16px; }

.axm-candidate-panel { display: grid; gap: 12px; }
.axm-candidate-toolbar {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  background: var(--panel); border: 1px solid var(--line); border-radius: 15px; padding: 12px 15px;
}
.axm-candidate-toolbar > div { display: grid; gap: 2px; }
.axm-candidate-toolbar h2 { margin: 0; font-size: 14px; }
.axm-candidate-toolbar span { color: var(--muted); font-size: 11px; }
.axm-candidate-toolbar .question-code-search { flex: 1 1 280px; max-width: 390px; }
.axm-candidate-panel .pagination { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; flex-wrap: wrap; }
.axm-candidate-panel .axm-empty { margin-top: 0; }

.axm-list { display: grid; gap: 9px; }
.axm-row {
  background: var(--panel); border: 1px solid var(--line); border-radius: 15px; padding: 13px 15px;
  display: grid; grid-template-columns: minmax(200px, 1.3fr) minmax(180px, 1fr) auto; gap: 12px; align-items: center;
}
.axm-row-main { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; }
.axm-row-main b { font-size: 13px; }
.axm-row-mobile { font-size: 11.5px; color: var(--muted); }
.axm-row-role { font-size: 10.5px; padding: 2px 9px; border-radius: 999px; background: var(--panel-soft); border: 1px solid var(--line); color: #5f5a52; }
.axm-row-meta { display: flex; align-items: center; gap: 11px; flex-wrap: wrap; font-size: 11px; color: #5f5a52; }
.axm-row-meta .muted { color: var(--muted); }
.axm-row-meta a { display: inline-flex; align-items: center; gap: 5px; color: var(--blue); text-decoration: none; }
.axm-row-meta svg { width: 13px; height: 13px; }
.axm-score { font-weight: 700; color: #147a6d; }
.axm-row-actions { display: flex; gap: 7px; flex-wrap: wrap; justify-content: flex-end; }
.axm-row-actions .ghost-button { padding: 7px 11px; font-size: 11px; }
.ghost-button.danger { color: var(--red); }
.ghost-button.danger:hover { border-color: var(--red); }

.axm-status { font-size: 10.5px; padding: 2px 10px; border-radius: 999px; font-weight: 700; }
.axm-status.s-invited { background: var(--panel-soft); border: 1px solid var(--line); color: var(--muted); }
.axm-status.s-started { background: var(--yellow-soft); color: #8a6712; }
.axm-status.s-submitted { background: var(--teal-soft); color: #147a6d; }
.axm-warn-inline { display: inline-flex; align-items: center; gap: 5px; color: var(--red); }
.axm-warn {
  display: flex; align-items: flex-start; gap: 8px; font-size: 11.5px; line-height: 1.9;
  background: var(--yellow-soft); color: #8a6712; border-radius: 12px; padding: 10px 12px;
}
.axm-warn svg { width: 15px; height: 15px; flex: none; margin-top: 2px; }

/* گزارش سؤال‌به‌سؤال */
.axm-detail { display: grid; gap: 12px; }
.axm-detail-stats { display: flex; gap: 11px; flex-wrap: wrap; align-items: center; }
.axm-detail-stats > div {
  display: grid; gap: 2px; padding: 10px 14px; border-radius: 13px; background: var(--panel-soft);
  border: 1px solid var(--line);
}
.axm-detail-stats b { font-size: 15px; }
.axm-detail-stats span { font-size: 10.5px; color: var(--muted); }
.axm-qrow { border: 1px solid var(--line); border-radius: 15px; padding: 13px 14px; display: grid; gap: 10px; }
.axm-qrow header { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; }
.axm-qrow header b { font-size: 12.5px; }
.axm-verdict { font-size: 10.5px; padding: 3px 10px; border-radius: 999px; font-weight: 700; }
.axm-verdict.ok { background: var(--teal-soft); color: #147a6d; }
.axm-verdict.warn { background: var(--yellow-soft); color: #8a6712; }
.axm-verdict.bad { background: var(--red-soft); color: #b03e3e; }
.axm-verdict.muted { background: var(--panel-soft); color: var(--muted); }
.axm-qimgs { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 9px; }
.axm-qimgs a { display: grid; gap: 4px; justify-items: center; text-decoration: none; }
.axm-qimgs img { max-width: 100%; max-height: 220px; border-radius: 11px; border: 1px solid var(--line); }
.axm-qimgs small { font-size: 10px; color: var(--muted); }
.axm-noimg {
  display: grid; place-items: center; font-size: 11px; color: var(--muted); min-height: 70px;
  border: 1px dashed var(--line); border-radius: 11px;
}
.axm-compare { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 9px; }
.axm-compare > div { display: grid; gap: 5px; align-content: start; }
.axm-compare-label { font-size: 10px; color: var(--muted); }
.axm-topics { display: flex; flex-wrap: wrap; gap: 5px; }
.axm-topic { font-size: 10.5px; padding: 3px 9px; border-radius: 999px; background: var(--blue-soft); color: #2c4f9e; }
.axm-topics.key .axm-topic { background: var(--teal-soft); color: #147a6d; }
.axm-none { font-size: 11px; color: var(--muted); }
.axm-level-tag { font-size: 11px; font-weight: 700; color: #2c4f9e; }
.axm-level-tag.key { color: #147a6d; }
.axm-keynote { margin: 0; display: flex; gap: 7px; font-size: 11px; color: #6b6459; }
.axm-keynote svg { width: 14px; height: 14px; flex: none; color: var(--yellow); }
.axm-review { display: grid; gap: 6px; font-size: 11.5px; color: #5f5a52; }
.axm-review-by { color: var(--muted); font-size: 10.5px; }

/* برگه و کلید */
.axm-paper { display: grid; gap: 14px; }
.axm-paper-top { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 10px; align-items: end; }
.axm-paper-top label { display: grid; gap: 5px; font-size: 11.5px; color: #5f5a52; }
.axm-paper-file {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 11px 13px;
  border: 1px dashed var(--line); border-radius: 13px; background: var(--panel-soft);
}
/* نوار پیشرفت آپلود — ویدیوی چندصد مگابایتی روی خط خانگی ده‌ها دقیقه طول
   می‌کشد؛ بدون درصد، کاربر فکر می‌کند صفحه هنگ کرده و وسطِ کار می‌بندد. */
.axm-progress { display: grid; gap: 6px; }
.axm-progress[hidden] { display: none; }
.axm-progress-bar { height: 7px; border-radius: 99px; background: var(--line); overflow: hidden; }
.axm-progress-bar i { display: block; height: 100%; background: var(--orange); border-radius: 99px; transition: width .2s ease; }
.axm-progress-note { font-size: 11px; color: var(--muted); }

.axm-file-ok, .axm-file-none { display: inline-flex; align-items: center; gap: 6px; font-size: 11.5px; }
.axm-file-ok { color: #147a6d; }
.axm-file-none { color: var(--red); }
.axm-file-ok svg, .axm-file-none svg { width: 14px; height: 14px; }
.axm-key-title { margin: 0; font-size: 13px; }
.axm-key { display: grid; gap: 8px; }
.axm-key-row {
  display: grid; grid-template-columns: 30px minmax(180px, 1fr) auto; gap: 11px; align-items: center;
  padding: 10px 12px; border: 1px solid var(--line); border-radius: 13px;
}
.axm-key-n {
  width: 26px; height: 26px; border-radius: 9px; display: grid; place-items: center;
  background: var(--panel-soft); font-size: 11.5px; font-weight: 700;
}
.axm-key-topics { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; }
.axm-key-levels .ax-level { padding: 5px 10px; font-size: 10.5px; }

@media (max-width: 1080px) {
  .ax-work { grid-template-columns: 1fr; }
  .ax-paper { position: static; }
  .ax-paper-frame { height: 55vh; }
}
@media (max-width: 720px) {
  .ax-main { padding: 18px 14px 46px; }
  .ax-top { padding: 10px 14px; }
  .ax-card { padding: 18px 16px 20px; }
  .axm-row { grid-template-columns: 1fr; }
  .axm-row-actions { justify-content: flex-start; }
  .axm-key-row { grid-template-columns: 30px 1fr; }
  .axm-key-levels { grid-column: 1 / -1; }
}
/* پلاگین PDF مرورگر در لایهٔ ترکیب‌بندیِ خودش نقاشی می‌شود و روی پشتِ مودال
   می‌افتد؛ تا وقتی پاپ‌آپی باز است، برگه را پنهان می‌کنیم. */
body:has(.modal-root:not(:empty)) .ax-paper-frame { visibility: hidden; }
/* عنوان پاپ‌آپ‌های این بخش دو خط است: تیتر + زیرعنوانِ کم‌رنگ */
.axm-detail-modal-head h2 small,
.ax-tp-head h2 small,
.modal-head h2 small.axm-sub { display: block; margin-top: 3px; font-size: 10.5px; font-weight: 400; color: var(--muted); }

/* ------------------------------------------------------------ نسخهٔ جدید
   وقتی صفحه مشغول است (آزمون، پاپ‌آپ، فرم نیمه‌کاره) رفرش خودکار انجام نمی‌شود
   و به‌جایش این نوار پیشنهاد به‌روزرسانی می‌دهد. کنار toast-stack می‌نشیند، ولی
   z-index آن باید از modal-root (100000) بالاتر باشد وگرنه دقیقاً در همان
   حالتی که نشان داده می‌شود (پاپ‌آپ باز، رانرِ آزمون) زیر لایه گم می‌شود. */
.app-update-bar {
  position: fixed;
  left: 22px;
  bottom: 22px;
  z-index: 100050;
  display: flex;
  align-items: center;
  gap: 12px;
  max-width: min(420px, calc(100vw - 44px));
  padding: 10px 12px 10px 10px;
  border-radius: 12px;
  background: #292721;
  color: #fff;
  font-size: 11px;
  box-shadow: 0 14px 35px rgba(0, 0, 0, .24);
  border-right: 4px solid var(--teal);
  animation: toast-in .22s ease;
}
.app-update-bar .app-update-text { flex: 1; line-height: 1.7; }
.app-update-bar .app-update-apply {
  flex: none;
  padding: 6px 14px;
  border: 0;
  border-radius: 9px;
  background: var(--teal);
  color: #fff;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}
.app-update-bar .app-update-apply:hover { filter: brightness(1.08); }
.app-update-bar .app-update-dismiss {
  flex: none;
  width: 26px;
  height: 26px;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: rgba(255, 255, 255, .7);
  font: inherit;
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
}
.app-update-bar .app-update-dismiss:hover { background: rgba(255, 255, 255, .12); color: #fff; }
/* نوار «نسخهٔ جدید» نباید روی toastها بیفتد */
body:has(#appUpdateBar) .toast-stack { bottom: 74px; }
@media (max-width: 720px) {
  .app-update-bar { left: 12px; right: 12px; bottom: 12px; max-width: none; }
}

/* جرقهٔ آزمون هوشمند: وقتی تب فعال است آرام نفس می‌کشد تا «زنده» به نظر برسد.
   عمداً کند و کم‌دامنه است؛ روی تبِ غیرفعال و برای کاربری که حرکت را کم کرده
   اصلاً اجرا نمی‌شود. */
@keyframes smx-twinkle {
  0%, 100% { opacity: 1; transform: rotate(0deg) scale(1); }
  50%      { opacity: .78; transform: rotate(-8deg) scale(1.08); }
}
.exam-hub-tab.on [href$="ai-spark"],
.exam-hub-tab.on svg:has([href$="ai-spark"]) { transform-origin: 45% 45%; }
.exam-hub-tab.on svg:has(use[href="#icon-ai-spark"]) { animation: smx-twinkle 3.4s ease-in-out infinite; }
@media (prefers-reduced-motion: reduce) {
  .exam-hub-tab.on svg:has(use[href="#icon-ai-spark"]) { animation: none; }
}

/* ============ آزمون هوشمند ============
   پنل انتخاب درس/مبحث، پوستهٔ اجراکنندهٔ بلوکی و تب «مسیر تطبیقی» کارنامه.
   رنگ شناسهٔ این بخش بنفش است تا از آزمون شخصی (نارنجی) و جمعی (آبی) جدا بماند. */
.smx-panel { --smx: var(--purple); --smx-soft: var(--purple-soft); }
.smx-resume {
  display: flex; align-items: center; gap: 14px; padding: 14px 16px;
  border: 1px solid #ddd0f7; border-radius: 16px;
  background: linear-gradient(180deg, var(--smx-soft), rgba(255,255,255,.6));
}
.smx-resume-icon { display: grid; place-items: center; width: 42px; height: 42px; flex: none; border-radius: 13px; background: #fff; color: var(--smx); box-shadow: 0 6px 16px rgba(134,100,216,.18); }
.smx-resume-icon .ui-icon { width: 22px; height: 22px; }
.smx-resume-main { flex: 1; display: grid; gap: 3px; min-width: 0; }
.smx-resume-main b { font-size: 13.5px; }
.smx-resume-main span { color: var(--muted); font-size: 12px; font-weight: 700; }
.smx-resume-btns { display: flex; gap: 8px; flex: none; }

.smx-how { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
@media (max-width: 1100px) { .smx-how { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 620px) { .smx-how { grid-template-columns: 1fr; } }
.smx-how-card {
  display: grid; grid-template-columns: 34px 1fr; grid-template-rows: auto auto;
  column-gap: 10px; row-gap: 2px; padding: 12px 13px;
  border: 1px solid var(--line); border-radius: 14px; background: var(--panel-soft);
}
.smx-how-card i { grid-row: 1 / span 2; display: grid; place-items: center; width: 34px; height: 34px; border-radius: 11px; background: var(--smx-soft); color: var(--smx); }
.smx-how-card i .ui-icon { width: 17px; height: 17px; }
.smx-how-card b { font-size: 12.5px; }
.smx-how-card span { color: var(--muted); font-size: 11.5px; font-weight: 700; line-height: 1.85; }

.smx-step { display: grid; gap: 12px; padding: 16px; border: 1px solid var(--line); border-radius: 16px; background: var(--panel); }
.smx-step.off { opacity: .5; pointer-events: none; }
.smx-step-head { display: flex; align-items: center; gap: 11px; }
.smx-step-num {
  display: grid; place-items: center; width: 27px; height: 27px; flex: none;
  border-radius: 9px; background: var(--smx); color: #fff; font-size: 12.5px; font-weight: 800;
}
.smx-step-head b { display: block; font-size: 13.5px; }
.smx-step-head small { display: block; margin-top: 2px; color: var(--muted); font-size: 11.5px; font-weight: 700; }
.smx-lessons { display: grid; grid-template-columns: repeat(auto-fill, minmax(168px, 1fr)); gap: 9px; }
.smx-lesson {
  display: grid; gap: 3px; padding: 11px 13px; text-align: right;
  border: 1px solid var(--line); border-radius: 13px; background: var(--panel-soft);
  font: inherit; color: inherit; cursor: pointer; transition: border-color .15s, background .15s, transform .12s;
}
.smx-lesson:hover { transform: translateY(-1px); border-color: #d8c8f5; }
.smx-lesson b { font-size: 13px; }
.smx-lesson span { color: var(--muted); font-size: 11.5px; font-weight: 700; }
.smx-lesson.on { border-color: var(--smx); background: var(--smx-soft); box-shadow: 0 8px 20px rgba(134,100,216,.14); }
.smx-lesson.on span { color: var(--smx); }
.smx-topic-btn { justify-self: start; }
.smx-chips { display: flex; flex-wrap: wrap; gap: 7px; }
.smx-chip {
  display: inline-flex; align-items: center; gap: 6px; padding: 5px 6px 5px 10px;
  border: 1px solid #ddd0f7; border-radius: 999px; background: var(--smx-soft);
  font-size: 11.5px; font-weight: 700; color: #5b4a86;
}
.smx-chip button { display: grid; place-items: center; width: 17px; height: 17px; padding: 0; border: 0; border-radius: 50%; background: rgba(134,100,216,.16); color: #5b4a86; cursor: pointer; }
.smx-chip button .ui-icon { width: 11px; height: 11px; }
.smx-empty { margin: 0; color: var(--muted); font-size: 12px; font-weight: 700; }

.smx-launch { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; }
.smx-launch-stat { display: flex; gap: 16px; flex-wrap: wrap; color: var(--muted); font-size: 12.5px; font-weight: 700; }
.smx-launch-stat span { display: inline-flex; align-items: center; gap: 6px; }
.smx-launch-stat b { color: var(--ink); font-size: 14px; }
.smx-launch-stat .ui-icon { width: 15px; height: 15px; }
.smx-start { min-width: 200px; }

.smx-history { display: grid; gap: 10px; padding-top: 4px; border-top: 1px dashed var(--line); }
.smx-history h3 { display: flex; align-items: center; gap: 7px; margin: 8px 0 0; font-size: 14px; }
.smx-history h3 .ui-icon { width: 17px; height: 17px; color: var(--smx); }
.smx-history-rows { display: grid; gap: 7px; }
.smx-history-row {
  display: grid; grid-template-columns: minmax(0,1fr) auto auto auto auto auto;
  align-items: center; gap: 12px; padding: 9px 13px;
  border: 1px solid var(--line); border-radius: 12px; background: var(--panel-soft);
}
.smx-hr-main { display: grid; gap: 2px; min-width: 0; }
.smx-hr-main b { font-size: 12.5px; }
.smx-hr-main small { color: var(--muted); font-size: 11px; font-weight: 700; }
.smx-hr-stat { color: var(--muted); font-size: 11.5px; font-weight: 700; white-space: nowrap; }
.smx-hr-pct { color: var(--ink); font-size: 13px; font-weight: 800; }
.smx-hr-delta { font-size: 11.5px; font-weight: 800; white-space: nowrap; }
.smx-hr-level { color: var(--purple); font-size: 13px; font-weight: 900; }
.smx-memory { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: 1px dashed #ddd0f7; border-radius: 13px; background: #fcfaff; color: #5b4a86; font-size: 12px; font-weight: 700; line-height: 1.9; }
.smx-memory > .ui-icon { width: 18px; height: 18px; flex: none; color: var(--purple); }
.smx-memory > span { flex: 1; min-width: 0; }
.smx-memory b { color: var(--purple); font-size: 14px; }
.smx-memory.known { border-style: solid; background: var(--purple-soft); }
.smx-memory .ghost-button { flex: none; }
.smx-hr-delta.up { color: var(--teal); }
.smx-hr-delta.down { color: var(--red); }

/* ---- اجراکننده در حالت هوشمند ---- */
.exam-runner-smart .er-title strong { display: inline-flex; align-items: center; gap: 7px; }
.exam-runner-smart .er-title strong .ui-icon { width: 18px; height: 18px; color: var(--purple); }
.smx-run-progress { display: inline-flex; align-items: center; gap: 10px; color: var(--muted); font-size: 12px; font-weight: 700; }
.smx-run-progress b { color: var(--ink); font-size: 13.5px; }
.smx-run-progress i { width: 4px; height: 4px; border-radius: 50%; background: currentColor; opacity: .45; }
.smx-info-card .er-info-row i { color: var(--purple); }
.smx-clock { display: grid; gap: 2px; justify-items: center; padding: 12px 0 6px; }
.smx-clock b { font-size: 26px; font-weight: 800; letter-spacing: .5px; font-variant-numeric: tabular-nums; }
.smx-clock span { color: var(--muted); font-size: 11px; font-weight: 700; }
.smx-clock.time-hidden b { filter: blur(9px); user-select: none; }
.smx-run-actions { display: grid; gap: 7px; padding: 12px 12px 12px; border-top: 1px solid var(--line); }
.smx-block-progress { height: 6px; border-radius: 999px; background: var(--line); overflow: hidden; }
.smx-block-progress span { display: block; height: 100%; border-radius: 999px; background: var(--purple); transition: width .25s ease; }
.smx-block-note { color: var(--muted); font-size: 11px; font-weight: 700; text-align: center; }
.smx-continue { display: inline-flex; align-items: center; justify-content: center; gap: 5px; width: 100%; background: var(--purple); }
.smx-continue:hover:not(:disabled) { filter: brightness(1.07); }
.smx-continue .ui-icon { width: 15px; height: 15px; }
.smx-finish { width: 100%; }

.smx-gate { display: grid; gap: 10px; }
.smx-gate-row { display: grid; grid-template-columns: 36px 1fr; gap: 11px; align-items: start; padding: 12px 13px; border: 1px solid var(--line); border-radius: 13px; background: var(--panel-soft); }
.smx-gate-icon { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 11px; background: var(--yellow-soft); color: var(--yellow); }
.smx-gate-spam .smx-gate-icon { background: var(--red-soft); color: var(--red); }
.smx-gate-row b { display: block; font-size: 12.5px; font-weight: 700; line-height: 2; }
.smx-gate-nums { display: block; margin-top: 5px; color: var(--muted); font-size: 11.5px; font-weight: 800; }
.smx-autofinish { display: grid; gap: 10px; justify-items: center; text-align: center; padding: 8px 0; }
.smx-autofinish-icon { display: grid; place-items: center; width: 54px; height: 54px; border-radius: 17px; background: var(--purple-soft); color: var(--purple); }
.smx-autofinish-icon .ui-icon { width: 27px; height: 27px; }
.smx-autofinish p { margin: 0; line-height: 2; font-size: 13px; }

/* ---- کارنامه: تب مسیر تطبیقی ---- */
.smx-report { display: grid; gap: 16px; }
.smx-report-stats { grid-template-columns: repeat(auto-fit, minmax(168px, 1fr)); }
.smx-stop-note { display: flex; align-items: center; gap: 9px; padding: 11px 14px; border: 1px solid #e6dcf7; border-radius: 13px; background: var(--purple-soft); color: #4f4173; font-size: 12.5px; font-weight: 700; line-height: 1.9; }
.smx-stop-note .ui-icon { width: 18px; height: 18px; flex: none; color: var(--purple); }
.smx-report-card { display: grid; gap: 12px; padding: 16px; border: 1px solid var(--line); border-radius: 16px; background: var(--panel); }
.smx-card-head b { display: block; font-size: 13.5px; }
.smx-card-head small { display: block; margin-top: 3px; color: var(--muted); font-size: 11.5px; font-weight: 700; line-height: 1.85; }
.smx-trend-wrap { display: grid; gap: 8px; }
.smx-trend { display: block; width: 100%; height: auto; }
.smx-trend-grid { stroke: var(--line); stroke-width: 1; }
.smx-trend-axis { fill: var(--muted); font-size: 11px; font-weight: 700; font-family: inherit; }
.smx-trend-bar { fill: rgba(134,100,216,.16); }
.smx-trend-line { fill: none; stroke: var(--purple); stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; }
.smx-trend-dot circle { fill: #fff; stroke: var(--purple); stroke-width: 2.5; }
.smx-trend-dot:hover circle { fill: var(--purple); }
.smx-trend-legend { display: flex; gap: 16px; justify-content: center; color: var(--muted); font-size: 11.5px; font-weight: 700; }
.smx-trend-legend span { display: inline-flex; align-items: center; gap: 6px; }
.smx-trend-legend span::before { content: ""; width: 12px; height: 3px; border-radius: 2px; background: var(--purple); }
.smx-trend-legend .pct::before { height: 10px; width: 10px; border-radius: 3px; background: rgba(134,100,216,.3); }

.smx-node-rows { display: grid; gap: 7px; }
.smx-node-row {
  display: grid; grid-template-columns: minmax(0,1.6fr) minmax(90px,1fr) 48px 76px 56px;
  align-items: center; gap: 12px; padding: 10px 13px;
  border: 1px solid var(--line); border-radius: 12px; background: var(--panel-soft);
}
.smx-node-name { display: grid; gap: 2px; min-width: 0; }
.smx-node-name b { font-size: 12.5px; }
.smx-node-name small { color: var(--muted); font-size: 11px; font-weight: 700; }
.smx-node-bar { height: 8px; border-radius: 999px; background: var(--line); overflow: hidden; }
.smx-node-bar i { display: block; height: 100%; border-radius: 999px; background: linear-gradient(90deg, var(--teal), var(--purple)); }
.smx-node-pct { font-size: 12.5px; font-weight: 800; text-align: center; }
.smx-node-level { display: grid; gap: 1px; justify-items: center; }
.smx-node-level b { font-size: 14px; font-weight: 800; color: var(--purple); }
.smx-node-level small { color: var(--muted); font-size: 10.5px; font-weight: 700; }
.smx-node-move { font-size: 12px; font-weight: 800; text-align: center; color: var(--muted); }
.smx-node-move.up { color: var(--teal); }
.smx-node-move.down { color: var(--red); }

.smx-block-table { display: grid; gap: 5px; }
.smx-block-row {
  display: grid; grid-template-columns: 62px 1.2fr 60px 60px 60px 78px 88px;
  align-items: center; gap: 8px; padding: 9px 12px;
  border: 1px solid var(--line); border-radius: 11px; background: var(--panel-soft);
  font-size: 12.5px; font-weight: 700; text-align: center;
}
.smx-block-row.head { background: transparent; border-color: transparent; color: var(--muted); font-size: 11.5px; }
.smx-block-row .ok { color: var(--teal); font-weight: 800; }
.smx-block-row .bad { color: var(--red); font-weight: 800; }
.smx-block-row .blank { color: var(--muted); font-weight: 800; }
.smx-bt-level { display: grid; gap: 1px; }
.smx-bt-level small { color: var(--muted); font-size: 10.5px; font-weight: 700; }

@media (max-width: 860px) {
  .smx-resume { flex-wrap: wrap; }
  .smx-resume-btns { width: 100%; }
  .smx-resume-btns button { flex: 1; }
  .smx-launch { flex-direction: column; align-items: stretch; }
  .smx-start { width: 100%; }
  .smx-history-row { grid-template-columns: 1fr auto; row-gap: 7px; }
  .smx-history-row button { grid-column: 1 / -1; }
  .smx-node-row { grid-template-columns: 1fr 64px 56px; row-gap: 8px; }
  .smx-node-bar { grid-column: 1 / -1; }
  .smx-block-row { grid-template-columns: 46px 1fr 40px 40px 40px 60px; font-size: 11.5px; }
  .smx-block-row span:last-child { display: none; }
  .smx-run-progress { display: none; }
}

/* ---- آزمون هوشمند نسخهٔ ۲: دقت سنجش، پردهٔ تحلیل، کارنامهٔ تشخیصی ---- */
.smx-precision-chip { display: inline-flex; align-items: center; gap: 5px; padding: 3px 9px; border-radius: 999px; background: var(--purple-soft); color: #5b4a86; font-size: 11.5px; font-weight: 800; }
.smx-precision-chip .ui-icon { width: 14px; height: 14px; color: var(--purple); }
.smx-precision-chip b { color: var(--purple); }
.smx-precision { display: grid; gap: 6px; padding: 10px 12px 12px; border-top: 1px dashed var(--line); }
.smx-precision-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 11.5px; font-weight: 800; color: #5b4a86; }
.smx-precision-head span { display: inline-flex; align-items: center; gap: 5px; }
.smx-precision-head .ui-icon { width: 15px; height: 15px; color: var(--purple); }
.smx-precision-head b { font-size: 14px; color: var(--purple); font-variant-numeric: tabular-nums; }
.smx-precision-bar { height: 7px; border-radius: 999px; background: var(--line); overflow: hidden; }
.smx-precision-bar span { display: block; height: 100%; border-radius: 999px; background: linear-gradient(90deg, #b9a4ee, var(--purple)); transition: width .6s cubic-bezier(.2,.8,.2,1); }
.smx-precision-bar.done span { background: linear-gradient(90deg, var(--teal), #13c2a8); }
.smx-precision small { color: var(--muted); font-size: 10.5px; font-weight: 700; line-height: 1.8; }

.smx-analyze {
  position: absolute; inset: 0; z-index: 60; display: grid; place-items: center; padding: 16px;
  background: rgba(247,246,242,.72); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  animation: smx-fade-in .18s ease-out;
}
.smx-analyze.out { animation: smx-fade-out .22s ease-in forwards; }
@keyframes smx-fade-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes smx-fade-out { to { opacity: 0; } }
.smx-analyze-card {
  display: grid; gap: 12px; justify-items: center; width: min(360px, 100%); padding: 22px 22px 18px;
  border: 1px solid #e3d8fa; border-radius: 22px; background: var(--panel); text-align: center;
  box-shadow: 0 24px 60px rgba(76,55,140,.18);
}
.smx-analyze-card > b { font-size: 15px; }
.smx-analyze-orb {
  display: grid; place-items: center; width: 58px; height: 58px; border-radius: 19px; color: #fff;
  background: radial-gradient(circle at 30% 25%, #b89cf6, var(--purple) 60%, #5e43b8);
  box-shadow: 0 10px 28px rgba(134,100,216,.42); animation: smx-orb 1.6s ease-in-out infinite;
}
.smx-analyze-orb .ui-icon { width: 28px; height: 28px; }
@keyframes smx-orb { 0%,100% { transform: scale(1); box-shadow: 0 10px 28px rgba(134,100,216,.42); } 50% { transform: scale(1.06); box-shadow: 0 12px 36px rgba(134,100,216,.6); } }
.smx-analyze-steps { display: grid; gap: 7px; width: 100%; margin: 2px 0 0; padding: 0; list-style: none; text-align: right; }
.smx-analyze-steps li { display: flex; align-items: center; gap: 9px; color: var(--muted); font-size: 12.5px; font-weight: 700; transition: color .2s; }
.smx-analyze-steps li i { position: relative; width: 18px; height: 18px; flex: none; border-radius: 50%; border: 2px solid var(--line); transition: border-color .2s, background .2s; }
.smx-analyze-steps li.on { color: var(--ink); }
.smx-analyze-steps li.on i { border-color: var(--purple); border-top-color: transparent; animation: smx-spin .8s linear infinite; }
.smx-analyze-steps li.done { color: var(--ink); }
.smx-analyze-steps li.done i { border-color: var(--teal); background: var(--teal); }
.smx-analyze-steps li.done i::after { content: ""; position: absolute; inset: 3px 4px 5px 4px; border: solid #fff; border-width: 0 0 2px 2px; transform: rotate(-45deg); }
@keyframes smx-spin { to { transform: rotate(360deg); } }
.smx-analyze-meter { width: 100%; height: 8px; border-radius: 999px; background: var(--line); overflow: hidden; }
.smx-analyze-meter span { display: block; height: 100%; border-radius: 999px; background: linear-gradient(90deg, #b9a4ee, var(--purple)); transition: width .5s cubic-bezier(.2,.8,.2,1); }
.smx-analyze-note { color: var(--muted); font-size: 11.5px; font-weight: 700; }
.smx-analyze-note b { color: var(--purple); }
@media (prefers-reduced-motion: reduce) {
  .smx-analyze, .smx-analyze.out, .smx-analyze-orb, .smx-analyze-steps li.on i { animation: none; }
}

.smx-v2 { gap: 14px; }
.smx-hero {
  display: grid; gap: 14px; padding: 18px; border: 1px solid #e3d8fa; border-radius: 20px;
  background: radial-gradient(120% 140% at 100% 0%, #f3eeff 0%, rgba(243,238,255,.35) 45%, var(--panel) 75%);
}
.smx-hero-top { display: flex; align-items: center; gap: 14px; }
.smx-hero-orb { display: grid; place-items: center; width: 52px; height: 52px; flex: none; border-radius: 17px; color: #fff; background: radial-gradient(circle at 30% 25%, #b89cf6, var(--purple) 60%, #5e43b8); box-shadow: 0 10px 24px rgba(134,100,216,.35); }
.smx-hero-orb .ui-icon { width: 26px; height: 26px; }
.smx-hero-main { display: grid; gap: 3px; min-width: 0; }
.smx-hero-main > small { color: var(--muted); font-size: 12px; font-weight: 700; }
.smx-hero-level { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.smx-hero-level > b { font-size: 34px; font-weight: 900; line-height: 1.1; color: #4b3a8a; font-variant-numeric: tabular-nums; }
.smx-hero-main > p { margin: 0; color: #5f5a70; font-size: 12.5px; font-weight: 700; line-height: 1.9; }
.smx-hero-main > p b { color: var(--ink); }
.smx-band-chip { padding: 3px 10px; border-radius: 999px; background: #fff; border: 1px solid #ddd0f7; color: #5b4a86; font-size: 12px; font-weight: 800; }
.smx-mastery { display: inline-flex; align-items: center; padding: 3px 10px; border-radius: 999px; font-size: 11.5px; font-weight: 800; white-space: nowrap; }
.smx-mastery.tone-teal { background: var(--teal-soft); color: #117a6c; }
.smx-mastery.tone-blue { background: var(--blue-soft); color: #2f59c2; }
.smx-mastery.tone-purple { background: var(--purple-soft); color: #5b4a86; }
.smx-mastery.tone-yellow { background: var(--yellow-soft); color: #9a7212; }
.smx-mastery.tone-red { background: var(--red-soft); color: #b43d3d; }

.smx-ruler { position: relative; padding-bottom: 22px; }
.smx-ruler.compact { padding-bottom: 0; }
.smx-ruler-track { position: relative; height: 14px; border-radius: 999px; background: #efeaf8; }
.smx-ruler.compact .smx-ruler-track { height: 9px; }
.smx-ruler-band { position: absolute; top: 0; bottom: 0; }
.smx-ruler-band.b0 { background: #efe9fb; }
.smx-ruler-band.b1 { background: #e2d7f8; }
.smx-ruler-band.b2 { background: #d1c1f3; }
.smx-ruler-band.b3 { background: #bea8ec; }
.smx-ruler-band.b4 { background: #a88de2; }
.smx-ruler-band:first-child { border-start-start-radius: 999px; border-end-start-radius: 999px; }
.smx-ruler-band:last-of-type { border-start-end-radius: 999px; border-end-end-radius: 999px; }
.smx-ruler-ci { position: absolute; top: -4px; bottom: -4px; border-radius: 999px; background: rgba(94,67,184,.2); border: 1.5px solid rgba(94,67,184,.55); }
.smx-ruler.compact .smx-ruler-ci { top: -3px; bottom: -3px; }
.smx-ruler-mark { position: absolute; top: 50%; width: 16px; height: 16px; margin-inline-start: -8px; transform: translateY(-50%); border-radius: 50%; }
.smx-ruler-mark.now { z-index: 3; background: #4b3a8a; border: 3px solid #fff; box-shadow: 0 2px 8px rgba(75,58,138,.45); }
.smx-ruler.compact .smx-ruler-mark.now { width: 13px; height: 13px; margin-inline-start: -6.5px; border-width: 2px; }
.smx-ruler-mark.start { z-index: 2; width: 12px; height: 12px; margin-inline-start: -6px; background: #fff; border: 2px dashed #8c7bb8; }
.smx-ruler-mark.prev { z-index: 2; width: 12px; height: 12px; margin-inline-start: -6px; background: #fff; border: 2.5px solid var(--teal); }
.smx-ruler-labels { position: absolute; inset: auto 0 0 0; height: 18px; }
.smx-ruler-labels span { position: absolute; transform: translateX(50%); white-space: nowrap; color: var(--muted); font-size: 10.5px; font-weight: 800; }
.smx-ruler-key { display: flex; flex-wrap: wrap; gap: 14px; color: var(--muted); font-size: 11px; font-weight: 700; }
.smx-ruler-key span { display: inline-flex; align-items: center; gap: 6px; }
.smx-ruler-key span::before { content: ""; width: 11px; height: 11px; border-radius: 50%; }
.smx-ruler-key .now::before { background: #4b3a8a; }
.smx-ruler-key .ci::before { width: 16px; border-radius: 6px; background: rgba(94,67,184,.2); border: 1.5px solid rgba(94,67,184,.55); }
.smx-ruler-key .start::before { border: 2px dashed #8c7bb8; }
.smx-ruler-key .prev::before { border: 2.5px solid var(--teal); }

.smx-hero-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 9px; }
.smx-hero-kpis article { display: grid; gap: 2px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 13px; background: rgba(255,255,255,.75); }
.smx-hero-kpis small { color: var(--muted); font-size: 11px; font-weight: 700; }
.smx-hero-kpis b { font-size: 16px; font-weight: 900; font-variant-numeric: tabular-nums; }
.smx-hero-kpis b.up { color: var(--teal); }
.smx-hero-kpis b.down { color: var(--red); }
.smx-hero-kpis span { color: var(--muted); font-size: 10.5px; font-weight: 700; }

.smx-card-head b { display: inline-flex; align-items: center; gap: 6px; }
.smx-card-head b .ui-icon { width: 16px; height: 16px; color: var(--purple); }
.smx-insights { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 9px; }
.smx-insight { display: grid; grid-template-columns: 34px 1fr; gap: 10px; align-items: start; padding: 12px 13px; border: 1px solid var(--line); border-radius: 14px; background: var(--panel-soft); }
.smx-insight.lead { grid-column: 1 / -1; border-color: #ddd0f7; background: var(--purple-soft); }
.smx-insight > i { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 11px; background: #fff; }
.smx-insight > i .ui-icon { width: 17px; height: 17px; }
.smx-insight.tone-good > i { color: var(--teal); background: var(--teal-soft); }
.smx-insight.tone-warn > i { color: #b8841a; background: var(--yellow-soft); }
.smx-insight.tone-info > i { color: var(--purple); }
.smx-insight b { display: block; font-size: 12.5px; font-weight: 800; }
.smx-insight p { margin: 3px 0 0; color: #4d4a44; font-size: 12px; font-weight: 600; line-height: 1.95; }
.smx-insight-qs { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 7px; }
.smx-q-chip { padding: 3px 9px; border: 1px solid #ddd0f7; border-radius: 999px; background: #fff; color: #5b4a86; font: inherit; font-size: 11px; font-weight: 800; cursor: pointer; transition: background .15s, border-color .15s; }
.smx-q-chip:hover { background: var(--purple-soft); border-color: var(--purple); }

.smx-traj-ci { fill: rgba(134,100,216,.16); stroke: none; }
.smx-traj-line { fill: none; stroke: #5e43b8; stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }
.smx-traj-dot circle { fill: #fff; stroke: #5e43b8; stroke-width: 2.5; }
.smx-traj-dot.start circle { stroke-dasharray: 2.5 2; }
.smx-traj-dot:hover circle { fill: #5e43b8; }
.smx-traj-served rect { fill: #f6b980; stroke: #e0873d; stroke-width: 1.2; }
.smx-traj-bar { fill: rgba(26,163,146,.2); }
.smx-traj-guide { stroke: #e7e0f6; stroke-width: 1; stroke-dasharray: 4 4; }
.smx-traj-guide-label { fill: #8c7bb8; font-size: 10.5px; font-weight: 800; font-family: inherit; }
.smx-traj-legend .ci::before { height: 10px; width: 14px; border-radius: 3px; background: rgba(134,100,216,.25); }
.smx-traj-legend .served::before { width: 9px; height: 9px; border-radius: 2px; background: #f6b980; transform: rotate(45deg); }
.smx-traj-legend .pct::before { background: rgba(26,163,146,.3); }
.smx-traj-legend .lvl::before { background: #5e43b8; }

.smx-report-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.6fr); gap: 14px; align-items: start; }
.smx-chances { display: grid; gap: 9px; }
.smx-chance { display: grid; grid-template-columns: 78px minmax(0, 1fr) 44px; align-items: center; gap: 10px; font-size: 12px; font-weight: 800; }
.smx-chance > span { color: #5f5a70; }
.smx-chance > i { height: 10px; border-radius: 999px; background: var(--line); overflow: hidden; }
.smx-chance > i em { display: block; height: 100%; border-radius: 999px; background: linear-gradient(90deg, #b9a4ee, var(--purple)); }
.smx-chance > b { text-align: left; font-variant-numeric: tabular-nums; }
.smx-node2-rows { display: grid; gap: 8px; }
.smx-node2 {
  display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(110px, 1fr) 58px auto;
  grid-template-areas: "head ruler level mastery" "tip tip tip tip";
  align-items: center; gap: 8px 12px; padding: 11px 13px; border: 1px solid var(--line); border-radius: 13px; background: var(--panel-soft);
}
.smx-node2-head { grid-area: head; display: grid; gap: 2px; min-width: 0; }
.smx-node2-head b { font-size: 12.5px; }
.smx-node2-head small { color: var(--muted); font-size: 10.5px; font-weight: 700; line-height: 1.7; }
.smx-node2 .smx-ruler { grid-area: ruler; }
.smx-node2-level { grid-area: level; display: grid; justify-items: center; gap: 1px; }
.smx-node2-level b { font-size: 16px; font-weight: 900; color: #4b3a8a; }
.smx-node2-level small { color: var(--muted); font-size: 10px; font-weight: 800; white-space: nowrap; }
.smx-node2 .smx-mastery { grid-area: mastery; justify-self: end; }
.smx-node2-tip { grid-area: tip; display: flex; align-items: center; gap: 6px; color: #5f5a70; font-size: 11px; font-weight: 700; }
.smx-node2-tip .ui-icon { width: 13px; height: 13px; flex: none; color: var(--purple); }
.smx-node2-tip:empty, .smx-node2-tip span:empty { display: none; }
.smx-block-table.v2 .smx-block-row { grid-template-columns: 56px 1fr 46px 46px 46px 62px minmax(0, 2.4fr); }
.smx-bt-why { color: #5f5a70; font-size: 11.5px; font-weight: 700; text-align: right; line-height: 1.7; }
.smx-bt-why.kind-up { color: #117a6c; }
.smx-bt-why.kind-down { color: #b8841a; }
.smx-bt-why.kind-ceiling, .smx-bt-why.kind-floor { color: var(--purple); }
.smx-partial { display: block; color: var(--muted); font-size: 9.5px; font-weight: 800; }
@media (max-width: 980px) {
  .smx-report-grid { grid-template-columns: 1fr; }
}
@media (max-width: 860px) {
  .smx-hero { padding: 14px; }
  .smx-hero-level > b { font-size: 28px; }
  .smx-node2 { grid-template-columns: minmax(0, 1fr) 58px auto; grid-template-areas: "head level mastery" "ruler ruler ruler" "tip tip tip"; }
  .smx-block-table.v2 .smx-block-row { grid-template-columns: 38px 1fr 34px 34px 34px 48px; font-size: 11px; }
  .smx-block-table.v2 .smx-block-row > span:last-child { display: block; grid-column: 1 / -1; text-align: right; }
  .smx-block-table.v2 .smx-block-row.head > span:last-child { display: none; }
  .smx-ruler-labels span { font-size: 9.5px; }
}

/* ── ویرایشگر قاب آیکون (منابع و سری‌های آزمون) ─────────────────────────── */
.modal.icon-fit-modal { width: min(620px, 96vw); }

.icon-fit {
  display: grid;
  grid-template-columns: 250px minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

.ife-stage { display: grid; gap: 9px; }

.ife-frame {
  position: relative;
  width: 250px;
  height: 250px;
  border-radius: 18px;
  border: 1px solid var(--line);
  overflow: hidden;
  touch-action: none;
  cursor: grab;
  /* شطرنجیِ ملایم تا شفافیتِ آیکون و لبهٔ قاب دیده شود */
  background-color: #fff;
  background-image:
    linear-gradient(45deg, rgba(15,23,42,.055) 25%, transparent 25%, transparent 75%, rgba(15,23,42,.055) 75%),
    linear-gradient(45deg, rgba(15,23,42,.055) 25%, transparent 25%, transparent 75%, rgba(15,23,42,.055) 75%);
  background-size: 16px 16px;
  background-position: 0 0, 8px 8px;
}
.ife-frame.is-dragging { cursor: grabbing; }
.ife-frame::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 18px;
  box-shadow: inset 0 0 0 1px rgba(15,23,42,.06);
  pointer-events: none;
}

.ife-art {
  display: block;
  width: 100%;
  height: 100%;
  transform-origin: 50% 50%;
  will-change: transform;
  pointer-events: none;
}
.ife-art > svg,
.ife-art > img { width: 100%; height: 100%; object-fit: contain; display: block; }

.ife-hint { margin: 0; color: var(--muted); font-size: 11.5px; line-height: 1.8; max-width: 250px; }

.ife-side { display: grid; gap: 14px; align-content: start; }

.ife-zoom-box {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 11px 12px;
  background: var(--panel-soft);
  display: grid;
  gap: 9px;
}
.ife-zoom-head { display: flex; align-items: center; justify-content: space-between; font-size: 12px; font-weight: 700; }
.ife-zoom-head b { font-size: 13px; }
.ife-zoom { display: flex; align-items: center; gap: 8px; }
.ife-zoom input[type="range"] { flex: 1; min-width: 0; accent-color: var(--orange); }
.ife-step {
  width: 28px; height: 28px; flex: 0 0 28px;
  border-radius: 9px; border: 1px solid var(--line); background: #fff;
  font-size: 16px; font-weight: 800; line-height: 1; cursor: pointer; color: var(--text);
}
.ife-step:hover { border-color: var(--orange); color: var(--orange); }

.ife-check { display: flex; align-items: flex-start; gap: 8px; font-size: 12.5px; font-weight: 600; cursor: pointer; line-height: 1.7; }
.ife-check input { margin-top: 3px; accent-color: var(--orange); }
.ife-check.off { color: var(--muted); cursor: default; }

.ife-preview { display: grid; gap: 9px; }
.ife-preview-title { color: var(--muted); font-size: 11.5px; font-weight: 700; }
.ife-previews {
  display: flex; align-items: center; gap: 14px;
  border: 1px solid var(--line); border-radius: 14px; padding: 12px; background: #fff;
}
.ife-pv { display: inline-flex; overflow: hidden; border-radius: 6px; }
.ife-pv.sm { width: 20px; height: 20px; flex: 0 0 20px; }
.ife-pv.md { width: 30px; height: 30px; flex: 0 0 30px; }
.ife-pv.lg { width: 46px; height: 46px; flex: 0 0 46px; border-radius: 12px; }

.ife-reset { justify-content: center; }

@media (max-width: 720px) {
  .icon-fit { grid-template-columns: minmax(0, 1fr); }
  /* قابِ تمام‌عرض روی موبایل کلِ صفحه را می‌گیرد و کنترل‌ها زیرِ خطِ دید می‌افتند */
  .ife-frame { width: min(100%, 260px); height: auto; aspect-ratio: 1 / 1; }
  .ife-hint { max-width: none; }
}

/* ═══════════════════════════════════════════════════════════════════════════
   فرمول ریاضی (KaTeX) و ویرایشگر متن سؤال
   ───────────────────────────────────────────────────────────────────────────
   جزیرهٔ فرمول (.mkm) سه کار هم‌زمان می‌کند و هر سه لازم‌اند:

   ۱) direction: ltr — ریاضی همه‌جای دنیا چپ‌به‌راست است. بدون این، جهتِ rtlِ
      صفحه به داخل فرمول نشت می‌کند و «x = ۵» را «۵ = x» نشان می‌دهد (خودِ
      KaTeX جهت را تثبیت نمی‌کند چون فرضش صفحهٔ چپ‌به‌راست است).
   ۲) unicode-bidi: isolate — فرمول یک جزیرهٔ بستهٔ bidi می‌شود، پس عبارتِ
      لاتینِ داخلش نمی‌تواند ترتیبِ کلمه‌های فارسیِ قبل و بعد را جابه‌جا کند.
   ۳) وزیرمتن ته زنجیرهٔ فونت — گلیف فارسی و ارقام فارسی در فونت‌های KaTeX
      نیست؛ بدون این، مرورگر به فونت پیش‌فرضِ سیستم می‌افتد و متنِ داخل
      \text{} با بقیهٔ صفحه ناهماهنگ می‌شود.
   ═════════════════════════════════════════════════════════════════════════ */

/* خطِ کرسی مشترک: فرمولِ درون‌خطی روی همان خطِ پایهٔ متنِ فارسی می‌نشیند.
   قبلاً vertical-align: middle بود، یعنی «وسطِ جعبه» روی وسطِ متن؛ برای فرمولِ
   نامتقارن (ریشهٔ سوم با کسرِ زیرش: ارتفاعِ بالای خط خیلی بیشتر از عمقِ زیرش)
   کلِ فرمول ~۵px پایین می‌افتاد و «۳x+۱» پایین‌تر از ویرگولِ بعدش دیده می‌شد.
   KaTeX خطِ پایهٔ خودش را دارد و inline-block همان را به بیرون می‌دهد؛ padding
   فاصلهٔ عمودی (پایین‌تر) روی این هم‌ترازی اثری ندارد. */
.mkm {
  direction: ltr;
  unicode-bidi: isolate;
  display: inline-block;
  vertical-align: baseline;
  max-width: 100%;
}
/* فاصلهٔ عمودیِ خودکار. کسرِ \dfrac، رادیکال، حدِ بالا/پایینِ Σ و ماتریس
   بلندتر از خطِ متن‌اند و جوهرشان ۲ تا ۴ پیکسل از جعبهٔ خط بیرون می‌زند؛ نتیجه
   این بود که مخرجِ یک خط به صورتِ خطِ بعد، کسرِ آخرِ صورتِ سؤال به گزینهٔ اول،
   و کسرِ یک گزینه به گزینهٔ زیرش می‌چسبید (کارت، «نوشتن روی سؤال»، پیش‌نمایش و
   PDF). padding روی جزیرهٔ inline-block خودِ جعبهٔ خط را بلند می‌کند — فقط
   خطی که واقعاً چنین فرمولی دارد جا می‌گیرد و متنِ ساده همان تراکمِ قبلی را دارد. */
.mkm:not(.is-display):has(.mfrac, .sqrt, .op-limits, .mtable) { padding-block: .4em; }
/* فرمولِ نمایشی: خطِ مستقل. جای پیش‌فرضش لبهٔ چپ است — همان‌جایی که معادله‌های
   کتاب‌های درسیِ فارسی می‌نشینند — و با data-mk-align قابل تغییر است. */
.mkm.is-display {
  display: block;
  margin: 10px 0;
  text-align: left;
}
.mkm.is-display[data-mk-align="center"] { text-align: center; }
.mkm.is-display[data-mk-align="right"] { text-align: right; }
.mkm.is-display[data-mk-align="left"] { text-align: left; }
/* KaTeX دو جا تراز را قفل می‌کند: روی خودِ `.katex-display` و — که فراموش شده
   بود — روی فرزندِ مستقیمش `.katex-display > .katex`. تا وقتی فرزند هم آزاد
   نشود، دکمه‌های راست/وسط/چپِ نوارِ فرمول هیچ اثری ندارند و هر فرمولِ خط‌مستقل
   وسط‌چین دیده می‌شود. هر دو از ترازِ جزیره ارث می‌برند. */
.mkm.is-display .katex-display,
.mkm.is-display .katex-display > .katex { text-align: inherit; }

/* معادلهٔ بلندتر از عرضِ ستون (موبایل، ستونِ باریکِ چاپ) باید خودش اسکرول بگیرد،
   نه اینکه از کادر بیرون بزند یا بی‌صدا بریده شود. جعبهٔ اسکرول باید خودِ
   `.katex-display` باشد: KaTeX فرزندش را `display:block; white-space:nowrap`
   می‌کند، پس عرضِ `.katex` همیشه برابر ظرف است و گذاشتنِ overflow روی `.mkm`
   هرگز سرریز را نمی‌بیند. */
.mkm.is-display .katex-display {
  overflow-x: auto;
  overflow-y: hidden;
  /* Persian glyphs and substituted math fonts extend beyond KaTeX's Latin
     struts. The horizontal scrollport clips both axes, so reserve ink space
     above and below it at every font size (including option cards). */
  padding: .75em 0;
  margin: 0;
}

.mkm .katex {
  /* KaTeX معادله را سرِ عملگرهای رابطه‌ای/دوتایی به چند span (.base) می‌شکند تا
     بتواند بپیچد، ولی برای معادلهٔ نمایشی nowrap می‌گذارد. روی ستون باریکِ
     موبایل، پیچیدنِ سرِ «=» یا «+» از نوارِ اسکرولِ افقی خیلی خواناتر است، پس
     اجازهٔ پیچیدن داده می‌شود؛ معادله‌ای که هیچ نقطهٔ شکستی ندارد (یک کسرِ بلند)
     همچنان با قاعدهٔ زیر داخل کادر خودش اسکرول می‌گیرد. */
  white-space: normal;
}
/* فونتِ داخلِ فرمول یک‌جا و فقط یک‌جا تعریف می‌شود — بخشِ «فونت متنِ سؤال» پایین‌تر.
   قبلاً اینجا هم یک نسخهٔ قدیمی بود و تنها به‌خاطرِ ترتیبِ فایل بازنویسی می‌شد؛
   هر جابه‌جاییِ بی‌ربطی در styles.css می‌توانست بی‌صدا برشان گرداند. */

/* اندازهٔ پایهٔ کلِ فرمول پایین‌تر به ۱em نرمال می‌شود؛ بنابراین گلیفِ فارسی
   دیگر به ضریبِ جبرانیِ ۰٫۸۲۶ نیاز ندارد و هم‌قدِ متنِ اطراف می‌ماند. */
.mkm .mkm-fa {
  font-size: 1em;
  font-family: "Vazirmatn", Tahoma, sans-serif;
  font-feature-settings: "ss01";
  direction: rtl;
  unicode-bidi: isolate;
}

/* فرمولِ خراب: به‌جای صفحهٔ سفید یا متنِ قرمزِ KaTeX، یک چیپِ قابل‌کلیک که
   خودِ TeX را نشان می‌دهد تا مدیر بفهمد کجا را باید درست کند. */
.mkm-error {
  direction: ltr;
  unicode-bidi: isolate;
  display: inline-block;
  padding: 1px 7px;
  border: 1px dashed var(--red);
  border-radius: 7px;
  background: var(--red-soft);
  color: #a63b3b;
  font-family: ui-monospace, Menlo, monospace;
  font-size: 11.5px;
  white-space: pre-wrap;
}

/* ─────────────────────────── ویرایشگر متن سؤال ─────────────────────────── */

.rte {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  overflow: hidden;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.rte-bar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 2px;
  padding: 5px 7px;
  background: var(--panel-soft);
  border-bottom: 1px solid var(--line);
}
.rte-sep { width: 1px; align-self: stretch; margin: 3px 4px; background: var(--line); }
.rte-spacer { flex: 1 1 auto; }

.rte-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  min-width: 28px;
  height: 28px;
  padding: 0 6px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-size: 12.5px;
  cursor: pointer;
}
.rte-btn:hover { background: #fff; border-color: var(--line); }
.rte-btn.on { background: var(--orange-soft); border-color: #ffd0b4; color: #c2470a; }
.rte-btn:disabled { opacity: 0.4; cursor: default; }
.rte-btn .ui-icon { width: 15px; height: 15px; }
.rte-btn-f {
  background: var(--teal-soft);
  border-color: #b9e8e0;
  color: #10796c;
  font-weight: 700;
  padding: 0 9px;
}
.rte-btn-f:hover { background: #d6f4ef; border-color: #8fdccf; }
.rte-btn-ltr { font-family: ui-monospace, Menlo, monospace; font-size: 11px; }
.rte-font-trigger { min-width: 76px; justify-content: space-between; }
.rte-font-trigger .ui-icon { width: 12px; height: 12px; }
.rte-font-label { max-width: 64px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 750; }
.rte-font-pop { width: 226px; }
.rte-size-trigger { min-width: 52px; justify-content: space-between; }
.rte-size-trigger .ui-icon { width: 12px; height: 12px; }
.rte-size-label { min-width: 18px; font-weight: 750; text-align: center; }
.rte-size-pop { width: 212px; }
.rte-size-choices { display: grid; grid-template-columns: repeat(5, 1fr); gap: 4px; }
.rte-size-choice {
  min-height: 30px; padding: 0; border: 1px solid var(--line); border-radius: 7px;
  background: #fff; color: var(--ink); font: 750 12px "Vazirmatn", Tahoma, sans-serif; cursor: pointer;
}
.rte-size-choice.is-default { border-style: dashed; }
.rte-size-choice:hover,
.rte-size-choice.on { border-color: var(--teal); background: var(--teal-soft); }
.rte-size-choice:focus-visible { outline: 2px solid #178575; outline-offset: 2px; }
.rte-size-steps { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; margin-top: 6px; }
.rte-size-steps button {
  min-height: 28px; border: 1px solid var(--line); border-radius: 7px; background: #fafcfc;
  color: var(--ink); font: 700 11px "Vazirmatn", Tahoma, sans-serif; cursor: pointer;
}
.rte-size-steps button:hover { border-color: var(--teal); background: var(--teal-soft); }
.rte-size-hint { display: block; margin-top: 6px; color: var(--muted); font-size: 10px; line-height: 1.6; }
.rte-font-choices { display: grid; gap: 5px; }
.rte-font-choice {
  display: flex;
  align-items: center;
  min-height: 34px;
  padding: 6px 10px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #fff;
  color: var(--ink);
  font: inherit;
  text-align: start;
  cursor: pointer;
}
.rte-font-choice:hover,
.rte-font-choice.on { border-color: var(--teal); background: var(--teal-soft); }
.rte-font-choice span { color: var(--ink); font-size: 12px; font-weight: 750; white-space: nowrap; }
/* کلیدِ g کلِ سؤال: خودِ گلیف شکلِ فعلی را نشان می‌دهد (با .mkg1 تک‌طبقه). */
.rte-g-trigger { min-width: 34px; padding-inline: 7px; }
.rte-g-trigger b { font-family: var(--q-font); font-size: 19px; font-weight: 400; line-height: 1; }

.rte-area {
  min-height: var(--rte-min, 150px);
  max-height: var(--rte-max, 460px);
  overflow-y: auto;
  padding: 12px 14px;
  outline: none;
  line-height: 2.05;
  font-size: 14.5px;
  overflow-wrap: anywhere;
}
/* هنگام تایپ فقط کِرسر دیده شود. جلوهٔ عمومیِ inputها (حرکت یک‌پیکسلی و هالهٔ
   نارنجی) برای یک سطحِ بزرگِ ویرایش متن مزاحم است و هیچ وضعیت تازه‌ای نمی‌گوید. */
.rte-area:focus,
.rte-area:focus-visible {
  transform: none;
  box-shadow: none;
}
.rte-area:empty::before {
  content: attr(data-placeholder);
  color: var(--muted);
  pointer-events: none;
}
.rte-area > *:first-child { margin-top: 0; }
.rte-area > *:last-child { margin-bottom: 0; }
.rte-area p { margin: 0 0 6px; }
.rte-area ul, .rte-area ol { margin: 6px 0; padding-inline-start: 22px; }
/* گوشهٔ تصویر گرد نمی‌شود: شکل‌های کنکور اغلب خودشان کادرِ مستطیلی دارند و
   گردکردنِ گوشه، لبهٔ همان کادر را می‌خورد. */
.rte-area img { max-width: 100%; height: auto; border-radius: 0; }
.rte-area table { border-collapse: collapse; margin: 8px 0; }
.rte-area td, .rte-area th { border: 1px solid var(--line); padding: 4px 8px; }

/* ویرایشگرِ تک‌خطیِ گزینه‌ها: همان موتور، بدون نوار ابزارِ کامل */
.rte.is-compact { border-radius: 11px; }
.rte.is-compact .rte-bar { padding: 3px 5px; }
.rte.is-compact .rte-area { --rte-min: 40px; padding: 7px 10px; line-height: 1.9; }

/* Question studio: one writing surface for prose, tables, formulae and image options. */
.rte-studio { min-width: 0; border-color: #d5dfdf; border-radius: 14px; background: #fff; }
.rte-studio > .rte-bar { display: block; padding: 0; background: #f6f9f9; border-radius: 14px 14px 0 0; }
.rte-studio-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 12px; border-bottom: 1px solid #e2e9e9; }
.rte-studio-head > span { display: flex; align-items: baseline; flex-wrap: wrap; gap: 10px; }
.rte-studio-head strong { font-size: 12px; color: #244e4b; }
.rte-studio-head small { color: #647775; font-size: 10px; }
.rte-studio-head > div { display: flex; flex-wrap: wrap; gap: 4px; }
.rte-studio .rte-tool-row, .rte-studio .rte-advanced { display: flex; align-items: center; flex-wrap: wrap; gap: 3px; padding: 7px 9px; }
.rte-studio .rte-advanced[hidden] { display: none; }
.rte-studio .rte-structure-row, .rte-studio .rte-advanced { border-top: 1px solid #e2e9e9; background: #fafcfc; }
.rte-studio .rte-btn { min-height: 30px; height: auto; padding-block: 4px; font-size: 11px; border-radius: 6px; }
.rte-studio .rte-btn:focus-visible, .rte-template-pop button:focus-visible { outline: 2px solid #178575; outline-offset: 2px; }
.rte-studio .rte-area { padding: 18px; font-size: var(--q-text-size); line-height: 1.9; }
.rte-studio .rte-area:focus { outline: none; }
.rte-studio.is-compact > .rte-bar { padding: 0; }
.rte-studio.is-compact .rte-studio-head { padding: 7px 10px; }
.rte-studio.is-compact .rte-area { padding: 12px 14px; font-size: var(--q-text-size); }
.rte-studio.is-expanded .rte-area { min-height: min(55vh, 500px); max-height: 75vh; }
.rte-studio .rte-hint { padding: 7px 12px; border-radius: 0 0 14px 14px; font-size: 10px; }
.rte-template-pop { min-width: 220px; }
.rte-template-pop > button { display: block; width: 100%; padding: 8px 10px; background: #fff; border: 0; border-radius: 6px; color: #244e4b; font: inherit; font-size: 12px; text-align: start; cursor: pointer; }
.rte-template-pop > button:hover { background: #edf5f3; }
.qw-options-heading { display: flex; align-items: baseline; flex-wrap: wrap; gap: 12px; margin-top: 12px; padding: 10px 2px; }
.qw-options-heading strong { color: #244e4b; font-size: 13px; }
.qw-options-heading span { color: var(--muted); font-size: 10px; }
.qw-opt-row > .rte-studio { border-inline-start: 3px solid #dce5e3; }
.qw-opt-row:has(.qw-opt-pick.on) > .rte-studio { border-inline-start-color: #198474; }
.rte-studio .rte-area[data-rte-key^="option:"] .mkfig img { max-height: 260px; object-fit: contain; }
.rte-preview { min-height: 150px; padding: 20px; background: #fff; color: #1d2927; font-family: "MK Question", Tahoma, sans-serif; font-size: 19px; line-height: 2.1; }
:is(.rte-area, .sq-rich-text, .qai-render, .pq-body, .pq-explanation) :is(h2, h3, h4) { line-height: 1.8; margin: .8em 0 .3em; color: inherit; }
:is(.rte-area, .sq-rich-text, .qai-render, .pq-body, .pq-explanation) h2 { font-size: 1.3em; }
:is(.rte-area, .sq-rich-text, .qai-render, .pq-body, .pq-explanation) h3 { font-size: 1.15em; }
:is(.rte-area, .sq-rich-text, .qai-render, .pq-body, .pq-explanation) h4 { font-size: 1.05em; }
@media (max-width: 640px) {
  .rte-studio-head { align-items: flex-start; flex-direction: column; gap: 5px; }
  .rte-studio .rte-area { padding: 12px; }
  .rte-studio .rte-btn { min-height: 34px; }
  .rte-studio .rte-pop { max-width: min(280px, 74vw); }
  .qw-opt-row { gap: 5px; }
  .qw-options-heading span { line-height: 1.8; }
}

/* چیپ فرمول داخل ویرایشگر: کلیک = ویرایش، یک واحدِ تقسیم‌ناپذیر برای کِرسر */
.rte-area .mkm {
  border-radius: 6px;
  padding: 0 2px;
  cursor: pointer;
  transition: background 0.12s ease, box-shadow 0.12s ease;
}
.rte-area .mkm:hover { background: var(--teal-soft); box-shadow: 0 0 0 2px #cdeee8; }
.rte-area .mkm.is-selected { background: #cdeee8; box-shadow: 0 0 0 2px var(--teal); }
.rte-area .mkm.is-display { cursor: pointer; padding: 4px 0; }

.rte-hint {
  padding: 5px 12px;
  border-top: 1px solid var(--line);
  background: var(--panel-soft);
  color: var(--muted);
  font-size: 11px;
}
.rte-hint b { color: var(--ink); font-weight: 600; }
.rte-hint kbd {
  display: inline-block;
  padding: 0 4px;
  border: 1px solid var(--line);
  border-bottom-width: 2px;
  border-radius: 4px;
  background: #fff;
  font-family: ui-monospace, Menlo, monospace;
  font-size: 10px;
}

/* ───────────────────────── پاپ‌آپ فرمول (LaTeX) ───────────────────────── */

.modal.fml-modal { width: min(700px, 96vw); }

.fml {
  display: grid;
  gap: 12px;
  width: 100%;
  min-width: 0;
}

.fml-modes { display: flex; gap: 6px; }
.fml-mode {
  flex: 1 1 0;
  display: grid;
  gap: 2px;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  color: var(--ink);
  font: inherit;
  text-align: start;
  cursor: pointer;
}
.fml-mode strong { font-size: 12.5px; }
.fml-mode small { color: var(--muted); font-size: 11px; }
.fml-mode.on { border-color: var(--teal); background: var(--teal-soft); }
.fml-mode.on small { color: #10796c; }

.fml-input {
  width: 100%;
  min-height: 84px;
  resize: vertical;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fbfaf7;
  color: var(--ink);
  direction: ltr;
  text-align: left;
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  font-size: 13.5px;
  line-height: 1.7;
  outline: none;
}
.fml-input:focus { border-color: #ffc6a3; box-shadow: 0 0 0 3px rgba(255, 107, 24, 0.09); }

/* نوارِ عنوانِ کادرِ کد: دکمه‌های جهت نباید به لبهٔ بالای textarea بچسبند —
   یک پلهٔ کوچک بالاتر می‌نشینند و زیرشان فاصله می‌ماند. */
.fml-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-block: 2px 9px;
  color: var(--muted);
  font-size: 11.5px;
  font-weight: 700;
}
.fml-label a { color: var(--teal); text-decoration: none; cursor: pointer; font-weight: 600; }

.fml-label-tools { display: inline-flex; align-items: center; gap: 8px; }

.fml-fa-entry {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: 7px; margin-top: 7px;
}
.fml-fa-entry label { display: grid; gap: 3px; color: var(--muted); font-size: 10.5px; font-weight: 700; }
.fml-fa-entry input {
  width: 100%; min-width: 0; height: 34px; padding: 5px 9px;
  border: 1px solid var(--line); border-radius: 9px; background: #fff;
  color: var(--ink); font-family: var(--q-font); font-size: 13px; outline: none;
}
.fml-fa-entry input:focus { border-color: var(--teal); box-shadow: 0 0 0 2px rgba(26, 163, 146, .1); }
.fml-fa-entry button {
  height: 34px; padding: 0 11px; border: 1px solid #b9e8e0; border-radius: 9px;
  background: var(--teal-soft); color: #10796c; font: inherit; font-size: 11px; font-weight: 700; cursor: pointer;
}
.fml-fa-hint { display: block; margin-top: 4px; color: var(--muted); font-size: 10px; }
.fml-fa-hint code { direction: ltr; unicode-bidi: isolate; display: inline-block; }

/* کادر پیش‌نمایش: ارتفاعش ثابت است تا با هر بار تایپ، پاپ‌آپ بالا و پایین نپرد */
.fml-out {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 96px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  overflow-x: auto;
}
.fml-out .mkm { font-size: 1em; }
.fml-out.is-empty { color: var(--muted); font-size: 12.5px; }

.fml-err {
  display: none;
  padding: 7px 11px;
  border-radius: 10px;
  background: var(--red-soft);
  color: #a63b3b;
  font-size: 12px;
}
.fml-err.on { display: block; }
.fml-err code {
  direction: ltr;
  display: inline-block;
  font-family: ui-monospace, Menlo, monospace;
  font-size: 11px;
}

/* پالت نمادها: تبِ دسته + شبکهٔ دکمه‌ها، همه با برچسب فارسی */
.fml-pal { display: grid; gap: 7px; }
/* جست‌وجوی نماد: با پانزده گروه و صدها نماد، پیدا کردنِ «انتگرال» با تب‌گردی
   کندتر از تایپ‌کردنِ خودِ کلمه است. */
.fml-pal-search { display: flex; align-items: center; gap: 8px; }
.fml-pal-search input {
  flex: 1 1 auto;
  min-width: 0;
  padding: 6px 11px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  font: inherit;
  font-size: 12px;
}
.fml-pal-search input:focus { outline: 0; border-color: var(--teal); }
.fml-pal-count { font-size: 11px; color: var(--muted); white-space: nowrap; }
.fml-pal-empty { grid-column: 1 / -1; padding: 12px; font-size: 12px; color: var(--muted); text-align: center; }
/* عنوانِ بخش داخلِ یک گروه (فصل‌های فیزیک). `flex-basis: 100%` ردیف را می‌شکند،
   وگرنه عنوان کنارِ نمادها می‌نشیند و مرزِ بخش دیده نمی‌شود. */
.fml-pal-sec {
  /* حاشیهٔ افقی روی یک آیتمِ `flex-basis: 100%` عرض را از جعبه بیرون می‌زند و
     کلِ شبکه اسکرولِ افقی می‌گیرد؛ فاصله باید padding باشد نه margin. */
  flex: 0 0 100%;
  margin: 8px 0 1px;
  padding: 6px 4px 0;
  border-top: 1px solid var(--line);
  font-size: 11px;
  font-weight: 700;
  color: var(--muted);
}
.fml-pal-sec:first-child { margin-top: 0; padding-top: 0; border-top: 0; }
/* نوارِ گروه‌ها بلند شده؛ به‌جای رشدِ بی‌پایانِ ارتفاع، خودش اسکرول می‌شود */
.fml-pal-tabs { display: flex; flex-wrap: wrap; gap: 4px; max-height: 62px; overflow-y: auto; }
.fml-pal-tab {
  padding: 4px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--muted);
  font: inherit;
  font-size: 11.5px;
  cursor: pointer;
}
.fml-pal-tab.on { border-color: var(--teal); background: var(--teal-soft); color: #10796c; font-weight: 700; }
/* چرا flex و نه grid با ستونِ ثابت: کنارِ نمادهای تک‌حرفی (\pi) حالا فرمول‌های
   آمادهٔ کامل هم هست (فرمولِ ریشهٔ معادلهٔ درجه دو). ستونِ ۶۲ پیکسلی آن‌ها را
   می‌بُرید؛ با flex هر دکمه به‌اندازهٔ محتوای خودش می‌شود و ردیف‌ها می‌شکنند. */
.fml-pal-grid {
  display: flex;
  flex-wrap: wrap;
  align-content: flex-start;
  gap: 4px;
  max-height: 188px;
  overflow-y: auto;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel-soft);
}
.fml-sym {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  min-width: 58px;
  max-width: 100%;
  min-height: 44px;
  padding: 5px 8px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: #fff;
  cursor: pointer;
  font-size: 18px;
  overflow: hidden;
}
.fml-sym:hover { border-color: var(--teal); background: var(--teal-soft); }
.fml-sym .mkm { font-size: 1em; pointer-events: none; }
/* فرمولِ آمادهٔ کامل در همان دکمه جا شود: از یک طولی به بعد کمی ریزتر می‌شود
   به‌جای اینکه از دکمه بزند بیرون. */
.fml-sym.is-wide { font-size: 13.5px; }

@media (max-width: 720px) {
  .fml-modes { flex-direction: column; }
  .fml-pal-grid { max-height: 108px; }
  .fml-fa-entry { grid-template-columns: minmax(0, 1fr); }
  /* نوار ابزار روی ستون باریک سه ردیف می‌شد و نصف ارتفاعِ ویرایشگر را می‌گرفت */
  .rte-bar { gap: 1px; padding: 4px 5px; }
  .rte-btn { min-width: 26px; height: 26px; padding: 0 4px; font-size: 12px; }
  .rte-sep { display: none; }
  .rte-hint { font-size: 10.5px; }
}

/* ───────────── تعویض حالتِ «تصویر / متن» در میز کار سؤال ───────────── */

.qw-mode {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}
.qw-mode > span { color: var(--muted); font-size: 12px; font-weight: 700; }
.qw-mode-note { color: var(--muted); font-size: 11.5px; }

.qw-text-zone { display: grid; gap: 12px; }
.qw-ai-reference {
  overflow: hidden;
  border: 1px solid #efc894;
  border-radius: 14px;
  background: #fffaf2;
}
.qw-ai-reference > header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 12px;
  border-bottom: 1px solid #f1dcc0;
  background: #fff6e9;
}
.qw-ai-reference > header > span { display: grid; gap: 2px; }
.qw-ai-reference > header strong { color: #8f541d; font-size: 11.5px; }
.qw-ai-reference > header small { color: #8b765f; font-size: 9px; line-height: 1.7; }
.qw-ai-reference > header button {
  display: grid; place-items: center; flex: none; width: 28px; height: 28px;
  border: 1px solid #e7c79f; border-radius: 8px; background: #fff; color: #85684c; cursor: pointer;
}
.qw-ai-reference > header button .ui-icon { width: 14px; height: 14px; }
.qw-ai-reference > div {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  overflow-x: auto;
  padding: 10px;
}
.qw-ai-reference figure { flex: 0 0 auto; margin: 0; max-width: min(100%, 760px); }
.qw-ai-reference img {
  display: block; width: auto; max-width: 100%; max-height: 52vh; object-fit: contain;
  border: 1px solid #e7d7c3; border-radius: 10px; background: #fff;
}
.qw-ai-reference figcaption { margin-top: 4px; color: var(--muted); font-size: 8.5px; }
.qw-ai-reference.is-stored { margin-bottom: 12px; }
.qw-legacy-image-mode { padding: 8px 11px; border: 1px solid #f0d3ad; border-radius: 11px; background: #fff9ef; }
.qw-opts-editor { display: grid; gap: 8px; }
.qw-opt-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: start;
  gap: 8px;
}
.qw-opt-pick {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  margin-top: 3px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  color: var(--muted);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}
.qw-opt-pick:hover { border-color: var(--teal); color: var(--teal); }
.qw-opt-pick.on { border-color: var(--teal); background: var(--teal); color: #fff; }

/* متن گزینه از ابتدای جهت خودش شروع می‌شود؛ تراز وسطِ OCR یا داده‌های قدیمی
   نباید کارت گزینه را وسط‌چین کند. */
.rte-area[data-rte-key^="option:"],
.qai-option > div,
.sq-ans-opt > span:last-child,
.qv-opts > span > span,
.er-opt > span,
.draw-question-options > div > span { text-align: start; }
/* «start» کافی نبود: OCR گزینهٔ تک‌عدد/فرمول را «خطِ لاتین» می‌خواند و
   <p dir="ltr" style="text-align:left"> می‌ساخت؛ آنجا start یعنی چپ و متنِ
   گزینه تا لبهٔ دیگرِ کارت، دور از شمارهٔ گزینه، می‌رفت (Q8106). شمارهٔ گزینه
   در صفحهٔ راست‌به‌چپ همیشه سمتِ راست است، پس متن هم از راست شروع می‌شود —
   dir خودِ بند دست نمی‌خورد تا ترتیبِ واژه‌های یک گزینهٔ انگلیسی درست بماند. */
.rte-area[data-rte-key^="option:"] > *,
.qai-option > div > *,
.sq-ans-opt > span:last-child > *,
.qv-opts > span > span > *,
.er-opt > span > *,
.pq-option > span > *,
.draw-question-options > div > span > * { text-align: right !important; }

/* فرمولِ «خط مستقل» داخل کارت گزینه: خودِ کارت یک خط است، پس بلوکِ تمام‌عرضِ
   حاشیه‌دار فقط کارت را بی‌دلیل بلند و پهن می‌کند و فرمول را — با ترازِ چپِ
   پیش‌فرضش — از شمارهٔ گزینه دور می‌اندازد. اینجا مثل فرمول درون‌خطی رفتار
   می‌کند: جمع، بدون حاشیه، و چسبیده به ابتدای گزینه. ترازِ data-mk-align
   مالِ متنِ سؤال است، نه کارت گزینه. */
.rte-area[data-rte-key^="option:"] .mkm.is-display,
.qai-option > div .mkm.is-display,
.sq-ans-opt .mkm.is-display,
.qv-opts .mkm.is-display,
.er-opt .mkm.is-display,
.pq-option .mkm.is-display,
.draw-question-options .mkm.is-display {
  display: inline-block;
  margin: 0;
  text-align: start;
}

/* متنِ سؤال در پنل دانش‌آموز و چاپ: فاصلهٔ سطرِ کافی برای فرمولِ دوطبقه */
.sq-rich-text { line-height: 2.05; }
.sq-rich-text > *:first-child { margin-top: 0; }
.sq-rich-text > *:last-child { margin-bottom: 0; }
.sq-rich-text p { margin: 0 0 6px; }
.sq-rich-text ul, .sq-rich-text ol { margin: 6px 0; padding-inline-start: 22px; }
.sq-rich-text img { max-width: 100%; height: auto; }
.sq-rich-text table { border-collapse: collapse; margin: 8px 0; }
.sq-rich-text td, .sq-rich-text th { border: 1px solid var(--line); padding: 4px 8px; }

/* ── هایلایتِ متن ────────────────────────────────────────────────────────────
   هایلایت از مسیرِ execCommand("hiliteColor") می‌آید، پس همیشه یک span با
   `background-color`ِ درون‌خطی است — و همین تنها چیزی است که این ویژگی را
   درون‌خطی می‌گیرد (بقیهٔ رنگ‌ها `data-mk-*` دارند)، پس انتخابگر امن است.

   بی این قاعده، هایلایت دقیقاً به اندازهٔ جعبهٔ حروف است و مثل یک نوارِ نازکِ
   چسبیده به متن دیده می‌شود. یک‌دهمِ اندازهٔ قلم از هر طرف بیرون‌زدگی + گوشهٔ گرد،
   همان ظاهرِ ماژیکِ کتاب‌های کمک‌درسی را می‌دهد. `box-decoration-break: clone`
   لازم است تا هایلایتِ چندسطری، در هر سطر گوشهٔ گردِ خودش را داشته باشد.
   نکته: padding عمودیِ یک عنصرِ درون‌خطی ارتفاعِ سطر را جابه‌جا نمی‌کند، پس
   بلندترشدنِ نوار، خطوطِ متن را از هم باز نمی‌کند.

   فهرستِ تگ‌ها صریح است و فقط تگ‌های درون‌خطی را می‌گیرد: خانهٔ جدول یا کادر،
   اگر روزی پس‌زمینهٔ درون‌خطی بگیرد، نباید حاشیه و گوشه‌اش از اینجا عوض شود. */
span[style*="background-color"],
b[style*="background-color"],
strong[style*="background-color"],
i[style*="background-color"],
em[style*="background-color"],
u[style*="background-color"],
s[style*="background-color"],
sub[style*="background-color"],
sup[style*="background-color"],
mark[style*="background-color"],
a[style*="background-color"],
font[style*="background-color"] {
  padding: 0.14em 0.1em;
  border-radius: 0.3em;
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
}

/* ── خطِ زیرِ متن ─────────────────────────────────────────────────────────────
   زیرخط از `execCommand("underline")` می‌آید و همیشه تگِ `<u>` است (سانیتایزر
   `text-decoration` را در style درون‌خطی نگه نمی‌دارد).

   پیش‌فرضِ مرورگر خط را دقیقاً روی خطِ کرسی می‌کشد و در فارسی به کاسهٔ «ر»، «س»
   و «ن» می‌چسبد — همان چیزی که در «نادرست» دیده می‌شود. سه‌دهمِ اندازهٔ قلم
   فاصله، خط را زیرِ همهٔ کشیدگی‌ها می‌برد و ضخامتِ نسبی هم می‌گذارد در بزرگ‌نمایی
   و در چاپ همان نسبت بماند (پیش‌فرضِ مرورگر همیشه ۱px است و در PDF محو می‌شود).

   چرا ۰٫۳ و نه ۰٫۲ (مقدارِ اول): عمقِ کشیدگیِ ب نازنین در وزنِ ۷۰۰ اندازه‌گیری شد
   (canvas، `actualBoundingBoxDescent` روی «کدام گزینه درست نیست؟») و ۰٫۲۷em
   درآمد؛ با ۰٫۲ خط به کاسهٔ «ی» و «ع» می‌سایید. حالا یک نفسِ کوچک زیرِ عمیق‌ترین
   کشیدگی می‌ماند.

   `skip-ink: none` عمدی است: با auto، خط سرِ هر کشیدگیِ فارسی می‌شکند و به‌جای
   یک خطِ تمیز، چند تکه‌خطِ بریده دیده می‌شود. حالا که خط پایین‌تر از کشیدگی‌هاست،
   بریدن هیچ سودی ندارد. */
u {
  text-decoration-thickness: 0.062em;
  text-underline-offset: 0.3em;
  text-decoration-skip-ink: none;
}
/* `<u>` هرجای دیگری که خطِ واقعی ندارد (مثلاً جداکنندهٔ «|» در فهرست فصل‌ها)
   دست‌نخورده می‌ماند، چون خودش `text-decoration: none` دارد. */

/* ═══════════ تصویر و جدولِ داخلِ متنِ سؤال ═══════════════════════════════════
   یک ظاهرِ مشترک برای هر سه جا: ویرایشگر مدیر (.rte-area)، نمایشِ سؤال در پنل‌ها
   (.sq-rich-text) و صفحهٔ چاپ/PDF. عرض همیشه درصدی است تا همان سؤال روی موبایل،
   کارتِ پنل و A4 یک نسبت داشته باشد.
   ═════════════════════════════════════════════════════════════════════════ */

.mkfig {
  display: block;
  position: relative;
  width: 55%;
  max-width: 100%;
  margin: 12px 0;
}
.mkfig[data-align="center"] { margin-inline: auto; }
.mkfig[data-align="left"] { margin-inline-end: auto; margin-inline-start: 0; }
.mkfig[data-align="right"] { margin-inline-start: auto; margin-inline-end: 0; }
/* در جریانِ راست‌به‌چپ، «راست» یعنی همان لبهٔ شروع؛ صریح نوشتنش از وابسته‌شدن
   نتیجه به جهتِ ظرف جلوگیری می‌کند (سؤال هم در کادر rtl و هم در ستون ltr می‌آید). */
[dir="rtl"] .mkfig[data-align="right"] { margin-inline-start: 0; margin-inline-end: auto; }
[dir="rtl"] .mkfig[data-align="left"] { margin-inline-start: auto; margin-inline-end: 0; }

.mkfig img {
  display: block;
  width: 100%;
  height: auto;
  /* بدون گوشهٔ گرد — همان دلیلِ `.rte-area img` */
  border-radius: 0;
}

.mktable {
  border-collapse: collapse;
  width: 100%;
  margin: 12px 0;
  font-size: 0.95em;
  /* جدولِ عریض‌تر از ستون نباید صفحه را بکشد */
  max-width: 100%;
}
.mktable[data-align="center"] { margin-inline: auto; }
.mktable[data-align="left"] { margin-inline-end: auto; margin-inline-start: 0; }
.mktable[data-align="right"] { margin-inline-start: auto; margin-inline-end: 0; }
[dir="rtl"] .mktable[data-align="right"] { margin-inline-start: 0; margin-inline-end: auto; }
[dir="rtl"] .mktable[data-align="left"] { margin-inline-start: auto; margin-inline-end: 0; }

.mktable th,
.mktable td {
  border: 1px solid var(--line);
  padding: 6px 9px;
  text-align: center;
  vertical-align: middle;
  /* یک کلمهٔ بلندِ لاتین نباید ستون را از عرضِ تعیین‌شده بیرون بزند.
     عمداً break-word و نه anywhere: anywhere عرضِ min-content ستون را هم آزاد
     می‌کند و مرورگر اجازه می‌گیرد «جیوه» را وسطِ کلمه بشکند. */
  overflow-wrap: break-word;
}
.mktable th { background: var(--panel-soft); font-weight: 700; }
/* جدولِ تو در تو نباید حاشیهٔ دوبل و فاصلهٔ بیرونی بگیرد */
.mktable .mktable { margin: 0; font-size: 1em; }

/* ── پالتِ واحدِ محتوای سؤال ───────────────────────────────────────────────
   همان جدولی که در app.js (RTE_PALETTE) تعریف شده، اینجا به‌صورت متغیر می‌آید.
   هر خانواده چهار شدت دارد: line (حاشیهٔ بیرونی)، head (سربرگ)، fill (تهِ
   کم‌رنگ) و ink (متن). چون رنگ‌ها در `data-mk-*` ذخیره می‌شوند نه در هگزِ
   درون‌خطی، عوض کردنِ یک سایه در همین بلوک، همهٔ سؤال‌های ثبت‌شده را با هم
   به‌روز می‌کند — و در پنل کاربر، چاپ و PDF هم همین فایل بارگذاری می‌شود. */
.sq-rich-text, .rte-area, .pq-block, .qai-render, .draw-question-card {
  --mk-teal-line: #2f9b8c; --mk-teal-head: #d7ece8; --mk-teal-fill: #e9f5f3; --mk-teal-ink: #0f6f63;
  --mk-green-line: #4a9d57; --mk-green-head: #d8eddc; --mk-green-fill: #eaf6ec; --mk-green-ink: #2f7d3a;
  --mk-blue-line: #3c7fc9; --mk-blue-head: #d7e6f6; --mk-blue-fill: #eaf1fa; --mk-blue-ink: #1f5fa8;
  --mk-purple-line: #7c5fc4; --mk-purple-head: #e3dcf6; --mk-purple-fill: #f1edfb; --mk-purple-ink: #5b3fa0;
  --mk-red-line: #d0635c; --mk-red-head: #f8dedb; --mk-red-fill: #fdeeec; --mk-red-ink: #b03a35;
  --mk-amber-line: #d2a03c; --mk-amber-head: #f8ead0; --mk-amber-fill: #fdf5e3; --mk-amber-ink: #9a6a12;
  --mk-gray-line: #8b97a3; --mk-gray-head: #e3e7eb; --mk-gray-fill: #f1f3f5; --mk-gray-ink: #4a5560;
}

/* ── رنگِ کادرِ جدول: بیرون پررنگ، داخل کم‌رنگ ─────────────────────────────
   دقیقاً همان کاری که جدول‌های کتاب درسی می‌کنند — قابِ بیرونی سیر، خطوطِ
   داخلی محو، سربرگ هم‌خانواده. `--mk-frame-*` یک بار روی جدول ست می‌شود و
   بقیهٔ قاعده‌ها از همان می‌خوانند، پس افزودنِ رنگِ تازه یک خط است. */
.mktable[data-mk-frame="teal"] { --mk-frame-line: var(--mk-teal-line); --mk-frame-head: var(--mk-teal-head); --mk-frame-soft: var(--mk-teal-fill); --mk-frame-ink: var(--mk-teal-ink); }
.mktable[data-mk-frame="green"] { --mk-frame-line: var(--mk-green-line); --mk-frame-head: var(--mk-green-head); --mk-frame-soft: var(--mk-green-fill); --mk-frame-ink: var(--mk-green-ink); }
.mktable[data-mk-frame="blue"] { --mk-frame-line: var(--mk-blue-line); --mk-frame-head: var(--mk-blue-head); --mk-frame-soft: var(--mk-blue-fill); --mk-frame-ink: var(--mk-blue-ink); }
.mktable[data-mk-frame="purple"] { --mk-frame-line: var(--mk-purple-line); --mk-frame-head: var(--mk-purple-head); --mk-frame-soft: var(--mk-purple-fill); --mk-frame-ink: var(--mk-purple-ink); }
.mktable[data-mk-frame="red"] { --mk-frame-line: var(--mk-red-line); --mk-frame-head: var(--mk-red-head); --mk-frame-soft: var(--mk-red-fill); --mk-frame-ink: var(--mk-red-ink); }
.mktable[data-mk-frame="amber"] { --mk-frame-line: var(--mk-amber-line); --mk-frame-head: var(--mk-amber-head); --mk-frame-soft: var(--mk-amber-fill); --mk-frame-ink: var(--mk-amber-ink); }
.mktable[data-mk-frame="gray"] { --mk-frame-line: var(--mk-gray-line); --mk-frame-head: var(--mk-gray-head); --mk-frame-soft: var(--mk-gray-fill); --mk-frame-ink: var(--mk-gray-ink); }

/* رنگِ کادر فقط **رنگ** می‌دهد، نه ساختارِ خطوط: ساختار مالِ «طرح» است. با این
   تقسیم، هر طرح × هر رنگ کار می‌کند و لازم نیست ۳۵ ترکیب جدا نوشته شود.

   قابِ بیرونیِ ضخیم‌تر روی خطوطِ نازکِ داخلی، خودبه‌خود از `border-collapse:
   collapse` درمی‌آید: در تلاقیِ لبه، مرورگر پهن‌ترین حاشیه را برنده می‌کند. پس
   هیچ قاعدهٔ «صفر کردنِ لبه‌ها» لازم نیست. */
.mktable[data-mk-frame] {
  border: 2px solid var(--mk-frame-line);
}
.mktable[data-mk-frame] th,
.mktable[data-mk-frame] td {
  border-color: var(--mk-frame-head);
}
.mktable[data-mk-frame] th {
  background: var(--mk-frame-head);
  color: var(--mk-frame-ink);
}
/* گوشهٔ گرد ناچار به border-collapse: separate است (شعاع با collapse بی‌اثر
   می‌ماند)، و آنجا دیگر ادغامِ خودکارِ لبه‌ها وجود ندارد؛ پس فقط در همین حالت،
   قابِ بیرونی روی خودِ جدول و خطوطِ داخلی روی لبه‌های شروعِ خانه‌ها می‌نشینند. */
.mktable[data-mk-frame][data-mk-round="1"] {
  border-radius: 12px;
  overflow: hidden;
}
.mktable[data-mk-frame][data-mk-round="1"] th,
.mktable[data-mk-frame][data-mk-round="1"] td {
  border: 0;
  border-block-start: 1px solid var(--mk-frame-head);
  border-inline-start: 1px solid var(--mk-frame-head);
}
.mktable[data-mk-frame][data-mk-round="1"]:not([data-mk-skin="textbook"]) tr:first-child > * { border-block-start: 0; }
.mktable[data-mk-frame][data-mk-round="1"]:not([data-mk-skin="textbook"]) tr > *:first-child { border-inline-start: 0; }

/* رنگِ صریحِ خانه و متنِ خانه. عمداً **بعد از** قاعده‌های قاب و با نامِ عنصر
   (th/td) نوشته شده‌اند: رنگی که مدیر روی یک خانه گذاشته باید بر رنگِ خانوادگیِ
   جدول برنده شود، حتی وقتی آن خانه سربرگ است. */
.mktable th[data-mk-tint="teal"], .mktable td[data-mk-tint="teal"] { background: var(--mk-teal-fill); }
.mktable th[data-mk-tint="green"], .mktable td[data-mk-tint="green"] { background: var(--mk-green-fill); }
.mktable th[data-mk-tint="blue"], .mktable td[data-mk-tint="blue"] { background: var(--mk-blue-fill); }
.mktable th[data-mk-tint="purple"], .mktable td[data-mk-tint="purple"] { background: var(--mk-purple-fill); }
.mktable th[data-mk-tint="red"], .mktable td[data-mk-tint="red"] { background: var(--mk-red-fill); }
.mktable th[data-mk-tint="amber"], .mktable td[data-mk-tint="amber"] { background: var(--mk-amber-fill); }
.mktable th[data-mk-tint="gray"], .mktable td[data-mk-tint="gray"] { background: var(--mk-gray-fill); }
.mktable th[data-mk-ink="teal"], .mktable td[data-mk-ink="teal"] { color: var(--mk-teal-ink); }
.mktable th[data-mk-ink="green"], .mktable td[data-mk-ink="green"] { color: var(--mk-green-ink); }
.mktable th[data-mk-ink="blue"], .mktable td[data-mk-ink="blue"] { color: var(--mk-blue-ink); }
.mktable th[data-mk-ink="purple"], .mktable td[data-mk-ink="purple"] { color: var(--mk-purple-ink); }
.mktable th[data-mk-ink="red"], .mktable td[data-mk-ink="red"] { color: var(--mk-red-ink); }
.mktable th[data-mk-ink="amber"], .mktable td[data-mk-ink="amber"] { color: var(--mk-amber-ink); }
.mktable th[data-mk-ink="gray"], .mktable td[data-mk-ink="gray"] { color: var(--mk-gray-ink); }

/* ── شکل/جدولِ شناور کنار متن ──────────────────────────────────────────────
   متن دورِ بلوک می‌پیچد، پس یک شکلِ نیم‌عرض به‌جای اینکه یک نوارِ خالی کنار خودش
   جا بگذارد، کنارِ پاراگراف می‌نشیند. در چاپ یعنی صفحهٔ کمتر — همان کاری که
   کتاب‌های کمک‌درسی با شکلِ کنارِ «بررسی سایر گزینه‌ها» می‌کنند.
   float فیزیکی است (نه inline-start/end) چون data-align هم فیزیکی است. */
.mkfig[data-align="float-right"], .mktable[data-align="float-right"] {
  float: right;
  margin: 4px 0 10px 14px;
}
.mkfig[data-align="float-left"], .mktable[data-align="float-left"] {
  float: left;
  margin: 4px 14px 10px 0;
}
/* ظرفِ متن باید ارتفاعِ بلوکِ شناور را ببیند، وگرنه شکل از ته کارت بیرون می‌زند */
.sq-rich-text::after, .rte-area::after, .pq-body::after, .mkbox-body::after {
  content: "";
  display: block;
  clear: both;
}
/* روی موبایل، متنِ کنارِ یک شکلِ باریک خوانا نیست: شناور برداشته می‌شود */
@media (max-width: 640px) {
  .mkfig[data-align^="float-"], .mktable[data-align^="float-"] {
    float: none;
    margin-inline: auto;
    width: min(100%, 78%) !important;
  }
}

/* ── کادرِ متن (callout) ───────────────────────────────────────────────────
   تهِ کم‌رنگ + حاشیهٔ پررنگِ هم‌خانواده + نوارِ عنوانِ اختیاری. همان الگوی
   «ترجمهٔ صورت سؤال» و «تعبیر» در جزوه‌ها. */
.mkbox {
  --mk-box-line: var(--mk-gray-line);
  --mk-box-head: var(--mk-gray-head);
  --mk-box-fill: var(--mk-gray-fill);
  --mk-box-ink: var(--mk-gray-ink);
  margin: 12px 0;
  border: 1.5px solid var(--mk-box-line);
  border-radius: 10px;
  background: var(--mk-box-fill);
  overflow: hidden;
}
.mkbox[data-mk-tone="teal"] { --mk-box-line: var(--mk-teal-line); --mk-box-head: var(--mk-teal-head); --mk-box-fill: var(--mk-teal-fill); --mk-box-ink: var(--mk-teal-ink); }
.mkbox[data-mk-tone="green"] { --mk-box-line: var(--mk-green-line); --mk-box-head: var(--mk-green-head); --mk-box-fill: var(--mk-green-fill); --mk-box-ink: var(--mk-green-ink); }
.mkbox[data-mk-tone="blue"] { --mk-box-line: var(--mk-blue-line); --mk-box-head: var(--mk-blue-head); --mk-box-fill: var(--mk-blue-fill); --mk-box-ink: var(--mk-blue-ink); }
.mkbox[data-mk-tone="purple"] { --mk-box-line: var(--mk-purple-line); --mk-box-head: var(--mk-purple-head); --mk-box-fill: var(--mk-purple-fill); --mk-box-ink: var(--mk-purple-ink); }
.mkbox[data-mk-tone="red"] { --mk-box-line: var(--mk-red-line); --mk-box-head: var(--mk-red-head); --mk-box-fill: var(--mk-red-fill); --mk-box-ink: var(--mk-red-ink); }
.mkbox[data-mk-tone="amber"] { --mk-box-line: var(--mk-amber-line); --mk-box-head: var(--mk-amber-head); --mk-box-fill: var(--mk-amber-fill); --mk-box-ink: var(--mk-amber-ink); }
.mkbox[data-mk-tone="gray"] { --mk-box-line: var(--mk-gray-line); --mk-box-head: var(--mk-gray-head); --mk-box-fill: var(--mk-gray-fill); --mk-box-ink: var(--mk-gray-ink); }
.mkbox-title {
  padding: 6px 12px;
  border-bottom: 1.5px solid var(--mk-box-line);
  background: var(--mk-box-line);
  color: #fff;
  font-weight: 800;
  font-size: 0.95em;
}
.mkbox-body { padding: 9px 12px; color: var(--q-ink); }
.mkbox-body > *:first-child { margin-top: 0; }
.mkbox-body > *:last-child { margin-bottom: 0; }
/* کادرِ تو در تو ظاهرِ دوبل نگیرد */
.mkbox .mkbox { margin: 8px 0; }
/* در حالت ویرایش، مرزِ کادر باید دیده شود حتی وقتی رنگِ تهِ آن روشن است */
.rte-area .mkbox { position: relative; }
.rte-area .mkbox-title:empty::before {
  content: "عنوان کادر";
  opacity: .65;
}

/* عرضِ ستونیِ صریح فقط با table-layout: fixed واقعاً رعایت می‌شود؛ در حالت auto
   مرورگر آن را یک «پیشنهاد» می‌گیرد و با تایپ کردن دوباره جابه‌جا می‌کند. تا وقتی
   مدیر ستونی را تنظیم نکرده، جدول در همان حالتِ خودکارِ راحت‌تر می‌ماند. */
.mktable[data-mk-cols="1"] { table-layout: fixed; }
/* ارتفاعِ صریحِ سطر روی خانه می‌نشیند، نه روی <tr>: مرورگر height را روی tr فقط
   «کمینه» می‌گیرد و بدون این، کشیدنِ ارتفاع به پایین هیچ اثری ندارد. */
.mktable tr[style*="height"] > th,
.mktable tr[style*="height"] > td { height: inherit; }

/* ── طرح‌های آمادهٔ جدول ───────────────────────────────────────────────────
   هر طرح فقط یک data-attribute است، پس عوض کردنِ ظاهرِ یک طرح همهٔ سؤال‌های
   موجود را با هم به‌روز می‌کند و چیزی در دادهٔ سؤال دوباره نوشته نمی‌شود. */
/* «طرح» شکلِ خطوط را تعیین می‌کند و «رنگ کادر» رنگشان را — دو محورِ مستقل.
   پس هیچ طرحی هگزِ ثابت نمی‌نویسد؛ همه از همان `--mk-frame-*` می‌خوانند که
   پیش‌فرضش خاکستری است و با `data-mk-frame` عوض می‌شود. قبلاً طرح‌ها رنگِ خودشان
   را داشتند و «جدولِ بنفش با طرحِ رنگی ملایم» سربرگش سبزآبی درمی‌آمد. */
.mktable[data-mk-skin="plain"] th,
.mktable[data-mk-skin="plain"] td { border: 0; }
.mktable[data-mk-skin="plain"] th { background: transparent; }

/* جدولِ هم‌ستونِ OCR (مثل واکنش ↔ ΔH) جدول معنایی است اما در تصویر خط ندارد.
   جهت LTR ترتیبِ چپ‌به‌راستِ دو ستون را ثابت می‌کند و آغازِ هر خانه یک محور
   مشترک می‌سازد؛ بنابراین مقدارهای ΔH دقیقاً زیر هم می‌نشینند. */
.mktable[data-mk-layout="alignment"] { direction: ltr; table-layout: auto; }
.mktable[data-mk-layout="alignment"] th,
.mktable[data-mk-layout="alignment"] td {
  border: 0;
  padding: 2px 10px;
  text-align: left;
  vertical-align: baseline;
}
.mktable[data-mk-layout="alignment"] th:first-child,
.mktable[data-mk-layout="alignment"] td:first-child { padding-left: 0; }
.mktable[data-mk-layout="alignment"] th:last-child,
.mktable[data-mk-layout="alignment"] td:last-child { padding-right: 0; }

.mktable[data-mk-skin="striped"] th,
.mktable[data-mk-skin="striped"] td { border: 0; border-bottom: 1px solid var(--mk-frame-head, var(--line)); }
.mktable[data-mk-skin="striped"] tbody tr:nth-child(even) > td { background: var(--mk-frame-soft, #f7f9fb); }
.mktable[data-mk-skin="striped"] th { background: transparent; border-bottom-width: 2px; border-bottom-color: var(--mk-frame-line, var(--line)); }

.mktable[data-mk-skin="soft"] { border: 1px solid var(--mk-frame-line, #dce9e6); }
.mktable[data-mk-skin="soft"] th,
.mktable[data-mk-skin="soft"] td { border: 1px solid var(--mk-frame-head, #e6f0ee); }
.mktable[data-mk-skin="soft"] th { background: var(--mk-frame-head, #eef6f5); color: var(--mk-frame-ink, #12796d); }

.mktable[data-mk-skin="bold"] th,
.mktable[data-mk-skin="bold"] td { border: 1px solid var(--mk-frame-head, #cfd8e3); }
/* سربرگِ «پررنگ» تنها جایی است که رنگِ سیرِ خانواده تهِ خانه می‌شود، پس متنش سفید است */
.mktable[data-mk-skin="bold"] th { background: var(--mk-frame-line, #33544f); color: #fff; }

/* گوشهٔ گرد. `border-collapse: collapse` حاشیه‌ها را یکی می‌کند ولی border-radius
   را هم بی‌اثر می‌کند، پس اینجا به `separate` سوئیچ می‌شود. برای اینکه حاشیه‌ها
   دوبل نشوند، هر خانه فقط لبهٔ «شروع» خودش را می‌کشد و لبهٔ پایانیِ سطر/جدول
   جداگانه اضافه می‌شود — همه با ویژگی‌های منطقی، تا در کادر rtl و ltr یکی باشد. */
.mktable[data-mk-round="1"] {
  border-collapse: separate;
  border-spacing: 0;
  border-radius: 10px;
}
.mktable[data-mk-round="1"] th,
.mktable[data-mk-round="1"] td {
  border: 0;
  border-block-start: 1px solid var(--line);
  border-inline-start: 1px solid var(--line);
}
.mktable[data-mk-round="1"] tr > *:last-child { border-inline-end: 1px solid var(--line); }
.mktable[data-mk-round="1"] tr:last-child > * { border-block-end: 1px solid var(--line); }
.mktable[data-mk-round="1"]:not([data-mk-skin="textbook"]) tr:first-child > *:first-child { border-start-start-radius: 10px; }
.mktable[data-mk-round="1"]:not([data-mk-skin="textbook"]) tr:first-child > *:last-child { border-start-end-radius: 10px; }
.mktable[data-mk-round="1"]:not([data-mk-skin="textbook"]) tr:last-child > *:first-child { border-end-start-radius: 10px; }
.mktable[data-mk-round="1"]:not([data-mk-skin="textbook"]) tr:last-child > *:last-child { border-end-end-radius: 10px; }
/* طرحِ «بدون خط» با گوشهٔ گرد یعنی فقط قابِ بیرونی؛ خطوط داخلی برنمی‌گردند */
.mktable[data-mk-skin="plain"][data-mk-round="1"] th,
.mktable[data-mk-skin="plain"][data-mk-round="1"] td { border: 0; }

/* Editable textbook presets: the same semantic markup is used in cards and print. */
.rte-template-pop { max-height: min(440px, 65vh); overflow-y: auto; }
.rte-box-style-choices { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 5px; margin-bottom: 10px; min-width: 230px; }
.rte-box-style-choices button { border: 1px solid #dce6e2; border-radius: 8px; padding: 7px 9px; background: #fff; color: #244e4b; font: inherit; font-size: 12px; cursor: pointer; }
.rte-box-style-choices button[data-rte-box-style="topic"] { background: #fde9d0; color: #9d288f; }
.rte-box-style-choices button[data-rte-box-style="note"] { background: #f7f1f5; color: #232323; }
.rte-box-style-choices button[data-rte-box-style="mint"] { background: #e5f3f0; color: #232323; }
.rte-box-style-choices button.on { outline: 2px solid #178575; outline-offset: 1px; }
.rte-box-style-choices button:focus-visible { outline: 2px solid #178575; outline-offset: 2px; }

.mkbox[data-mk-box-style] { border: 0; border-radius: 18px; margin: 10px 0; color: var(--q-ink); }
.mkbox[data-mk-box-style] > .mkbox-title { border: 0; background: transparent; color: inherit; padding: 10px 16px 0; font-size: 1em; }
.mkbox[data-mk-box-style] > .mkbox-body { color: inherit; padding: 10px 16px; }
.mkbox[data-mk-box-style] > .mkbox-body > p { margin-block: 0 8px; }
.mkbox[data-mk-box-style] > .mkbox-body > p:last-child { margin-bottom: 0; }
.mkbox[data-mk-box-style="topic"] > .mkbox-body { color: var(--mk-box-ink); font-style: italic; padding-block: 8px; }
.mkbox[data-mk-box-style="topic"][data-mk-tone="amber"] { --mk-box-fill: #fde9d0; --mk-box-ink: #9d288f; }
.mkbox[data-mk-box-style="note"][data-mk-tone="gray"] { --mk-box-fill: #f7f1f5; }
.mkbox[data-mk-box-style="mint"][data-mk-tone="teal"] { --mk-box-fill: #e5f3f0; }
.mkbox[data-mk-box-style="mint"] > .mkbox-body { padding: 12px 14px; }
.mkbox[data-mk-box-style="mint"] > .mkbox-body > .mktable { margin-block: 0 10px; }
.mkbox[data-mk-box-style="mint"] > .mkbox-body > .mktable:last-child { margin-bottom: 0; }

.mktable[data-mk-skin="textbook"] { border: 2px solid var(--mk-frame-line, #169e49); background: #fff; font-size: 1em; color: var(--q-ink); }
.mktable[data-mk-skin="textbook"][data-mk-round="1"] { border-collapse: separate; border-spacing: 0; border-radius: 7px; overflow: hidden; }
/* Every physical cell owns its edges, including rowspan/colspan cells. No
   first-child shortcut: the first DOM cell can be in the middle of a merged row. */
.mktable[data-mk-skin="textbook"] :is(th, td),
.mktable[data-mk-skin="textbook"][data-mk-round="1"] :is(th, td) {
  border: .5px solid #c5c7c6;
  border-radius: 0;
  padding: 7px 10px;
  line-height: 1.8;
  vertical-align: middle;
}
.mktable[data-mk-skin="textbook"] td:not([data-mk-tint]) { background: #fff; }
.mktable[data-mk-skin="textbook"] th:not([data-mk-tint]) { background: var(--mk-frame-head, #edf4e1); font-weight: 800; }
.mktable[data-mk-skin="textbook"] :is(th, td):not([data-mk-ink]) { color: var(--q-ink); }
@media (max-width: 640px) {
  .mkbox[data-mk-box-style] { border-radius: 13px; }
  .mkbox[data-mk-box-style] > .mkbox-body,
  .mkbox[data-mk-box-style] > .mkbox-title { padding-inline: 10px; }
  .mktable[data-mk-skin="textbook"] :is(th, td),
  .mktable[data-mk-skin="textbook"][data-mk-round="1"] :is(th, td) { padding: 5px; }
}
@media print {
  .mkbox[data-mk-box-style], .mktable[data-mk-skin="textbook"],
  .mktable[data-mk-skin="textbook"] :is(th, td) { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}

/* Explicit custom colors are shared by the editor, saved questions and print.
   Cell-level colors still override whole-table colors. Direct-child selectors
   prevent an outer table or box from recoloring a nested one. */
.mkbox[style*="--mk-custom-box-fill"] { background-color: var(--mk-custom-box-fill); }
.mkbox[style*="--mk-custom-box-line"] { border: 1.5px solid var(--mk-custom-box-line); }
.mkbox[style*="--mk-custom-box-line"] > .mkbox-title { border-color: var(--mk-custom-box-line); }
.mkbox[style*="--mk-custom-box-ink"] > .mkbox-body { color: var(--mk-custom-box-ink); }
.mkbox[style*="--mk-custom-box-head:"] > .mkbox-title { background-color: var(--mk-custom-box-head); }
.mkbox[style*="--mk-custom-box-head-ink"] > .mkbox-title { color: var(--mk-custom-box-head-ink); }
.mktable[style*="--mk-custom-table-line"] { border: 2px solid var(--mk-custom-table-line); }
.mktable.mktable[style*="--mk-custom-table-grid"] > :is(thead, tbody, tfoot) > tr > :is(th, td) { border-color: var(--mk-custom-table-grid); }
.mktable[style*="--mk-custom-table-fill"] > :is(thead, tbody, tfoot) > tr > td:not([data-mk-tint]) { background-color: var(--mk-custom-table-fill); }
.mktable[style*="--mk-custom-table-ink"] > :is(thead, tbody, tfoot) > tr > td:not([data-mk-ink]) { color: var(--mk-custom-table-ink); }
.mktable[style*="--mk-custom-table-head:"] > :is(thead, tbody, tfoot) > tr > th:not([data-mk-tint]) { background-color: var(--mk-custom-table-head); }
.mktable[style*="--mk-custom-table-head-ink"] > :is(thead, tbody, tfoot) > tr > th:not([data-mk-ink]) { color: var(--mk-custom-table-head-ink); }
/* Print studio's default border contrast must not replace explicit author colors. */
body:is(.pdf-export, .pstudio-printing) .pstudio-page.is-simple:not(.is-key) .pq-body .mktable[style*="--mk-custom-table-line"] { border-color: var(--mk-custom-table-line) !important; }
body:is(.pdf-export, .pstudio-printing) .pstudio-page.is-simple:not(.is-key) .pq-body .mktable[style*="--mk-custom-table-grid"] > :is(thead, tbody, tfoot) > tr > :is(th, td) { border-color: var(--mk-custom-table-grid) !important; }
.rte-custom-color { display: grid; grid-template-columns: minmax(74px, 1fr) 28px 78px auto 26px; gap: 5px; align-items: center; padding-block: 5px; max-width: 100%; }
.rte-custom-color-label { font-size: 11px; color: #355b55; font-weight: 600; }
.rte-custom-color input[data-rte-color-picker] { appearance: auto; width: 28px; height: 28px; min-height: 0; padding: 1px; border: 1px solid #cbd9d4; border-radius: 5px; cursor: pointer; background: white; }
.rte-custom-color input[data-rte-color-hex] { width: 78px; height: 28px; min-height: 0; padding: 3px 5px; border: 1px solid #cbd9d4; border-radius: 5px; font: 11px ui-monospace, monospace; text-align: left; background: white; color: #213e37; }
.rte-custom-color button { height: 28px; min-width: 0; padding: 2px 6px; border: 1px solid #cbd9d4; border-radius: 5px; background: #fff; color: #28584d; font: inherit; font-size: 11px; cursor: pointer; }
.rte-custom-color button:hover { background: #edf7f3; }
.rte-custom-color.has-color input[data-rte-color-picker] { border-color: #178575; }
.rte-custom-color-grid { display: grid; gap: 3px 18px; }
.rte-pop[data-rte-pop="box"] { width: min(342px, calc(100vw - 42px)); max-height: min(520px, 65vh); overflow: auto; }
.rte-table-colors { width: 100%; padding: 3px 0; }
.rte-table-colors > summary { color: #245c51; font-size: 12px; cursor: pointer; padding: 4px; }
.rte-table-colors .rte-custom-color-grid { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); padding: 7px 3px; }
.rte-ctx .rte-custom-color { margin-inline: 3px; }
@media (max-width: 480px) {
  .rte-custom-color { grid-template-columns: minmax(62px, 1fr) 25px 72px auto 24px; gap: 3px; }
  .rte-custom-color input[data-rte-color-hex] { width: 72px; }
  .rte-table-colors .rte-custom-color-grid { grid-template-columns: minmax(0, 1fr); }
}
@media print {
  .sq-rich-text, .pq-block, .qai-render, .draw-question-card, .mkbox, .mktable, .mktable :is(td, th) { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}

/* ─────────────────── حالتِ ویرایش: دستگیره‌ها و انتخاب ─────────────────── */

.rte-area .mkfig { cursor: grab; }
.rte-area .mkfig:active { cursor: grabbing; }
.rte-area .mkfig.is-dragging { opacity: .42; }
.rte-area .mkfig::after {
  content: "";
  position: absolute;
  inset: -3px;
  border: 1px dashed transparent;
  border-radius: 10px;
  pointer-events: none;
}
.rte-area .mkfig:hover::after { border-color: #cdd9e8; }
.rte-area .mkfig.is-selected::after { border: 2px solid var(--teal); border-style: solid; }

/* دستگیره روی لبه‌ای می‌نشیند که با تغییرِ عرض واقعاً حرکت می‌کند، وگرنه کاربر
   لبهٔ ثابت را می‌کشد و تصویر از سرِ دیگر باز می‌شود — همان چیزی که «برعکس» حس
   می‌شد. قابِ چسبیده به راست از چپ باز می‌شود، پس دستگیره‌اش چپ است و برعکس.
   این‌ها عمداً left/right فیزیکی‌اند نه inline-start/end: خودِ data-align هم
   فیزیکی است (در کادر rtl و ltr یک معنا دارد). */
.mkfig-grip {
  position: absolute;
  left: -7px;
  bottom: -7px;
  width: 16px;
  height: 16px;
  border: 2px solid #fff;
  border-radius: 50%;
  background: var(--teal);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.25);
  cursor: nwse-resize;
  opacity: 0;
  transition: opacity 0.12s ease;
  touch-action: none;
}
.mkfig[data-align="left"] .mkfig-grip { left: auto; right: -7px; }
.rte-area .mkfig:hover .mkfig-grip,
.rte-area .mkfig.is-selected .mkfig-grip { opacity: 1; }
.rte-area .is-fig-drop-before { box-shadow: 0 -3px 0 var(--teal); }
.rte-area .is-fig-drop-after { box-shadow: 0 3px 0 var(--teal); }
.rte.is-inline-drop .rte-area { box-shadow: inset 0 0 0 2px rgba(26, 163, 146, .28); }
/* بیرون از ویرایشگر (پنل کاربر، چاپ) دستگیره اصلاً وجود ندارد؛ این فقط تور ایمنی است */
.sq-rich-text .mkfig-grip { display: none; }

.rte-area .mktable { cursor: text; }
.rte-area .mktable th.is-col-grip,
.rte-area .mktable td.is-col-grip { cursor: col-resize; box-shadow: inset 2px 0 0 var(--teal); }
/* لبهٔ پایینیِ خانه = دستگیرهٔ ارتفاعِ سطر؛ همان الگوی بصریِ ستون، در محورِ عمود */
.rte-area .mktable th.is-row-grip,
.rte-area .mktable td.is-row-grip { cursor: row-resize; box-shadow: inset 0 -2px 0 var(--teal); }

.rte.is-drop { border-color: var(--teal); box-shadow: 0 0 0 3px rgba(26, 163, 146, 0.15); }

/* ───────────────── نوار ابزارِ وابسته به متن (تصویر / جدول) ───────────────── */

.rte-ctx {
  border-bottom: 1px solid var(--line);
  background: #f2f8f7;
}
.rte-ctx-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 2px;
  padding: 5px 7px;
}
.rte-ctx-row + .rte-ctx-row { border-top: 1px dashed var(--line); }
.rte-ctx-label {
  margin-inline-end: 4px;
  color: #10796c;
  font-size: 11.5px;
  font-weight: 700;
}
.rte-ctx .rte-btn { font-size: 11.5px; height: 26px; min-width: 26px; }
.rte-ctx .rte-btn:disabled { opacity: .4; cursor: not-allowed; }
/* ردیفِ دومِ جدول (چیدمان و طرح) کمی فروتن‌تر است تا ردیفِ عملیات همچنان اول خوانده شود */
.rte-ctx-subrow { background: rgba(255, 255, 255, .55); }
.rte-tint-row { display: inline-flex; align-items: center; gap: 3px; }
.rte-tint {
  width: 20px;
  height: 20px;
  padding: 0;
  border: 1px solid #cfd8e3;
  border-radius: 6px;
  background: #fff;
  cursor: pointer;
}
.rte-tint:hover { border-color: var(--teal); }
.rte-tint.on { border: 2px solid var(--teal); box-shadow: 0 0 0 2px rgba(26, 163, 146, .2); }
/* «بدون رنگ» با یک خطِ اریب نشان داده می‌شود، وگرنه از یک خانهٔ سفید جدا نیست */
.rte-tint.is-none {
  background: linear-gradient(to top left, transparent calc(50% - 1px), #c2554c calc(50% - 1px), #c2554c calc(50% + 1px), transparent calc(50% + 1px));
}

/* ── آیکون‌های جدول (سبک اکسل) ───────────────────────────────────────────── */
.rte-tico { width: 19px; height: 19px; display: block; }
/* ناحیهٔ هدف (سطر/ستونی که عمل رویش انجام می‌شود) کم‌رنگ پر می‌شود تا شکل در یک
   نگاه بگوید «این سطر» یا «این ستون»، نه فقط «جدول» */
.rte-tico-fill { opacity: .26; }
/* نوارِ توپُرِ «خانهٔ عنوان» و قابِ خط‌چینِ «انتخاب»: بدون این دو، هر دو گروه در
   ۱۹ پیکسل فقط «یک نوارِ پررنگ» بودند و از هم تشخیص داده نمی‌شدند. */
.rte-tico-solid { opacity: .62; }
.rte-tico-pick { opacity: .85; }
.rte-btn-ico.on .rte-tico-solid { opacity: .78; }
.rte-btn-ico { padding: 2px 4px; min-width: 28px; }
.rte-btn-ico.on .rte-tico-fill { opacity: .46; }
/* حلقهٔ سفیدِ زیرِ نشانِ گوشه باید هم‌رنگِ زمینهٔ دکمه باشد؛ روی دکمهٔ روشن‌شده
   زمینه عوض می‌شود و نشان بدون این، یک لکهٔ سفید روی آن می‌ماند. */
.rte-btn-ico.on .rte-tico-badge circle:first-child { fill: var(--teal-soft, #eaf5f3); }
.rte-btn-danger .rte-tico-badge circle:nth-child(2) { fill: #a63b3b; }
.rte-btn-ico:disabled { opacity: .42; cursor: default; }

/* ── پاپ‌آورِ پالت (رنگ متن، هایلایت، کادر) ──────────────────────────────── */
.rte-pop {
  position: absolute;
  inset-inline-start: 0;
  top: calc(100% + 5px);
  z-index: 40;
  display: none;
  min-width: 210px;
  padding: 8px 9px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: #fff;
  box-shadow: 0 10px 26px rgba(20, 30, 40, .16);
}
.rte-pop.on { display: block; }
.rte-pop-title { display: block; margin-bottom: 6px; color: #10796c; font-size: 11px; font-weight: 800; }
.rte-pop .rte-tint-row { flex-wrap: wrap; gap: 4px; }
.rte-pop-check {
  display: flex;
  align-items: center;
  gap: 5px;
  margin-top: 8px;
  color: #6b7681;
  font-size: 10.5px;
  font-weight: 700;
}
/* حرفِ نمونهٔ دکمهٔ رنگ متن/هایلایت */
.rte-ink-glyph { border-bottom: 3px solid #c2554c; line-height: 1.1; font-weight: 900; }
.rte-mark-glyph { padding: 0 3px; border-radius: 3px; background: #fdeaa8; font-weight: 900; }
.rte-btn-float { font-size: 10.5px; }

/* ── خانه‌های انتخاب‌شدهٔ جدول ─────────────────────────────────────────────
   انتخابِ بازه باید از انتخابِ متنِ مرورگر جدا دیده شود، وگرنه معلوم نیست رنگ
   قرار است روی کدام بنشیند. */
.rte-area .mktable th.is-cell-picked,
.rte-area .mktable td.is-cell-picked {
  outline: 2px solid var(--teal);
  outline-offset: -2px;
  background-image: linear-gradient(rgba(26, 163, 146, .14), rgba(26, 163, 146, .14));
}
/* شمارندهٔ انتخاب: تنها بازخوردی است که می‌گوید رنگِ بعدی روی چند خانه می‌نشیند */
.rte-ctx-note { font-size: 11px; color: var(--teal); font-weight: 700; white-space: nowrap; }
.rte-ctx-note[hidden] { display: none; }
.rte-formula-align-tools { display: inline-flex; align-items: center; gap: 2px; }
.rte-formula-align-tools[hidden] { display: none; }
.rte-btn-danger { color: #a63b3b; }
.rte-btn-danger:hover { background: var(--red-soft); border-color: #f0c4c4; }
.rte-btn-m { font-weight: 600; }
.rte-btn-m .ui-icon { width: 14px; height: 14px; }

/* ───────────────────── انتخابگرِ ابعادِ جدول ───────────────────── */

.rte-drop-host { position: relative; display: inline-flex; }
.rte-grid {
  position: absolute;
  top: calc(100% + 6px);
  inset-inline-end: 0;
  z-index: 40;
  display: none;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 14px 34px rgba(41, 36, 29, 0.16);
}
.rte-grid.on { display: block; }
.rte-grid-cells { display: grid; gap: 3px; direction: rtl; }
.rte-grid-cells i {
  width: 17px;
  height: 17px;
  border: 1px solid var(--line);
  border-radius: 3px;
  background: #fff;
  cursor: pointer;
}
.rte-grid-cells i.on { border-color: var(--teal); background: var(--teal-soft); }
.rte-grid-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 7px;
  color: var(--muted);
  font-size: 11px;
  white-space: nowrap;
}
.rte-grid-foot label { display: inline-flex; align-items: center; gap: 4px; cursor: pointer; }

/* ─────────────── چیدمانِ فرمولِ نمایشی داخل پاپ‌آپ فرمول ─────────────── */

.fml-align { display: flex; align-items: center; gap: 4px; }
.fml-align[hidden] { display: none; }
.fml-align-label { margin-inline-end: 4px; color: var(--muted); font-size: 11.5px; font-weight: 700; }

/* ══════════════ صورتِ سؤال درشت‌تر از بقیهٔ متن‌ها ══════════════════════════
   قراردادِ کتاب‌های کمک‌درسی: صورتِ سؤال درشت (bold) و پاسخ تشریحی/درسنامه با
   وزنِ عادی. با وزنِ بلوکی، سوپراسکریپت و فرمولِ داخلش هم خودبه‌خود همراه می‌شوند. */
.sq-rich-body { font-weight: 700; }
/* صورتِ سؤال یک وزنِ واحد دارد: فرمول هم از فیس‌های ۷۰۰ خانوادهٔ ترکیبی/KaTeX
   استفاده می‌کند تا وسط جمله از متنِ بولد باریک‌تر نیفتد. */
.sq-rich-body .katex { font-weight: 700; }
.sq-rich-body .katex .mkm-fa { font-weight: 700; }
/* جدولِ داخلِ صورتِ سؤال نباید همه‌اش درشت شود؛ فقط سطرِ عنوان */
.sq-rich-body .mktable td { font-weight: normal; }

.rte-area[data-rte-key="body"] { font-weight: 700; }
.rte-area[data-rte-key="body"] .katex { font-weight: 700; }
.rte-area[data-rte-key="body"] .katex .mkm-fa { font-weight: 700; }
.rte-area[data-rte-key="body"] .mktable td { font-weight: normal; }

/* گزینه‌ها، پاسخ تشریحی و درسنامه در حالت پایه عادی‌اند. <b>/<strong> داخلشان
   همچنان وزن ۷۰۰ می‌گیرد، پس دکمهٔ B فقط همان انتخابِ کاربر را درشت می‌کند. */
.sq-rich-explanation,
.sq-rich-lesson,
.qai-option > div,
.qv-opts > span > span,
.sq-ans-opt > span:last-child,
.er-opt > span,
.pq-option > span,
.draw-question-options > div > span,
.rte-area[data-rte-key="explanation"],
.rte-area[data-rte-key="lesson"],
.rte-area[data-rte-key^="option:"] {
  font-weight: 400;
}

/* ══════════════ مودال پاداش گروهی ═══════════════════════════════════════════
   بازه هیچ پیش‌فرضی ندارد؛ تا انتخاب نشدنش، بخش‌های ۲ و ۳ خاموش (.off) می‌مانند
   و دکمهٔ ثبت غیرفعال است. تقویم درون‌خطی است تا در بدنهٔ اسکرول‌شونده بریده نشود. */

/* چک‌باکس/رادیو داخل .field نباید قواعدِ ورودی‌های تمام‌عرض را بگیرد؛
   وگرنه به یک کادرِ ۴۲پیکسلیِ تمام‌عرض تبدیل می‌شود و متنِ کنارش له می‌شود. */
.field input[type="checkbox"],
.field input[type="radio"] { width: auto; min-height: 0; padding: 0; }

.modal-head.brw-head { align-items: flex-start; }
.brw-head h2 { margin: 0; }
.brw-head p { margin: 4px 0 0; color: var(--muted); font-size: 11.5px; font-weight: 600; line-height: 1.7; }

.brw { display: grid; gap: 14px; }
.brw-card { border: 1px solid var(--line); border-radius: 16px; background: var(--panel); padding: 14px; transition: opacity .18s ease, filter .18s ease; }
.brw-card.off { opacity: .45; filter: grayscale(.35); pointer-events: none; }
.brw-card > header { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 11px; }
.brw-card > header > b { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 800; }
.brw-card > header em { font-style: normal; font-size: 11px; font-weight: 700; color: var(--muted); }
.brw-step { display: grid; place-items: center; width: 22px; height: 22px; border-radius: 8px; background: var(--orange-soft); color: var(--orange); font-size: 11px; font-weight: 900; font-style: normal; }
.brw-req { color: var(--orange) !important; }

.brw-modes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
.brw-mode { display: flex; align-items: center; gap: 9px; text-align: start; padding: 11px 12px; border: 1px solid var(--line); border-radius: 13px; background: #fff; color: var(--ink); font: inherit; cursor: pointer; transition: border-color .15s ease, box-shadow .15s ease, background .15s ease; }
.brw-mode:hover { border-color: #f2a562; }
.brw-mode.on { border-color: var(--orange); background: var(--orange-soft); box-shadow: 0 0 0 3px rgba(255, 107, 24, .1); }
.brw-mode svg { width: 18px; height: 18px; flex: none; color: var(--orange); }
.brw-mode > span { display: grid; gap: 2px; min-width: 0; }
.brw-mode b { font-size: 12.5px; font-weight: 800; }
.brw-mode small { color: var(--muted); font-size: 10.5px; font-weight: 600; }

.brw-panel { margin-top: 11px; padding: 11px; border: 1px dashed #e6d7c3; border-radius: 13px; background: #fffdf9; }
.brw-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.brw-chip { padding: 7px 12px; border: 1px solid var(--line); border-radius: 999px; background: #fff; color: var(--ink); font: inherit; font-size: 11.5px; font-weight: 700; cursor: pointer; transition: border-color .14s ease, background .14s ease, color .14s ease; }
.brw-chip:hover { border-color: #f0b487; color: #c25710; }
.brw-chip.on { border-color: var(--orange); background: var(--orange); color: #fff; }
.brw-num { display: flex; align-items: center; gap: 8px; margin-top: 9px; }
.brw-num input { width: 96px; min-height: 40px; border: 1px solid var(--line); border-radius: 11px; background: #fff; padding: 8px 11px; font: inherit; font-weight: 800; text-align: center; outline: 0; }
.brw-num input:focus { border-color: var(--orange); box-shadow: 0 0 0 3px rgba(255, 107, 24, .1); }
.brw-num span { color: var(--muted); font-size: 11.5px; font-weight: 700; }

.brw-dates { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
.brw-dt { min-height: 48px; }
.brw-dt > span { text-align: start; }
.brw-cal { width: 100%; max-width: none; margin: 11px 0 0; }
.brw-cal .audit-cal-cell.inrange { background: var(--orange-soft); border-color: #f6d3b6; color: #c25710; }
.brw-cal-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 8px; padding-top: 8px; border-top: 1px solid #f0e3d2; }
.brw-cal-foot span { color: var(--muted); font-size: 11px; font-weight: 700; }

.brw-note { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; margin: 11px 0 0; padding: 9px 11px; border-radius: 11px; font-size: 11.5px; font-weight: 700; line-height: 1.8; }
.brw-note svg { width: 15px; height: 15px; flex: none; }
.brw-note.warn { background: #fff7ed; color: #b4560f; }
.brw-note.ok { background: var(--teal-soft, #eaf7f3); color: #15706a; }
.brw-note span { color: var(--muted); font-weight: 600; }

.brw-pct { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px; }
.brw-pct .brw-num { margin-top: 0; }
.brw-reason { display: grid; gap: 6px; margin-top: 12px; }
.brw-reason label { font-size: 11px; font-weight: 800; }
.brw-reason input { width: 100%; min-height: 42px; border: 1px solid var(--line); border-radius: 11px; background: #fff; padding: 9px 11px; font: inherit; outline: 0; }
.brw-reason input:focus { border-color: var(--orange); box-shadow: 0 0 0 3px rgba(255, 107, 24, .1); }

.brw-tools { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.brw-search { display: flex; align-items: center; gap: 7px; flex: 1; min-width: 0; padding: 0 11px; border: 1px solid var(--line); border-radius: 11px; background: #fff; }
.brw-search svg { width: 15px; height: 15px; flex: none; color: var(--muted); }
.brw-search input { flex: 1; min-width: 0; min-height: 40px; border: 0; outline: 0; background: transparent; font: inherit; }
.brw-linkbtn { border: 0; background: none; color: var(--orange); font: inherit; font-size: 11.5px; font-weight: 800; cursor: pointer; padding: 4px 2px; }
.brw-linkbtn:hover { text-decoration: underline; }

.brw-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; max-height: 254px; overflow-y: auto; padding-inline-end: 2px; }
.brw-admin { display: flex; align-items: center; gap: 9px; padding: 9px 11px; border: 1px solid var(--line); border-radius: 12px; background: #fff; cursor: pointer; transition: border-color .14s ease, background .14s ease; }
.brw-admin:hover { border-color: #f0b487; }
.brw-admin.on { border-color: var(--teal); background: var(--teal-soft); }
.brw-admin.zero { opacity: .62; }
.brw-admin input[type="checkbox"] { width: 16px; height: 16px; min-height: 0; flex: none; margin: 0; padding: 0; accent-color: var(--orange); cursor: pointer; }
.brw-admin .avatar { width: 26px; height: 26px; flex: none; }
.brw-admin-who { display: flex; align-items: center; gap: 7px; min-width: 0; flex: 1; }
.brw-admin-who b { font-size: 12px; font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.brw-admin-num { display: grid; gap: 1px; text-align: start; flex: none; }
.brw-admin-num b { font-size: 11.5px; font-weight: 800; white-space: nowrap; }
.brw-admin-num small { color: var(--muted); font-size: 10px; font-weight: 600; white-space: nowrap; }
.brw-empty { grid-column: 1 / -1; margin: 0; padding: 14px; text-align: center; color: var(--muted); font-size: 12px; font-weight: 700; }

.modal-footer.brw-footer { justify-content: space-between; gap: 12px; }
.brw-sum { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; min-width: 0; }
.brw-sum > span { color: var(--muted); font-size: 11.5px; font-weight: 700; }
.brw-sum > b { font-size: 15px; font-weight: 900; color: var(--muted); }
.brw-sum.on > b { color: var(--teal, #15706a); }
.brw-sum em { font-style: normal; color: var(--muted); font-size: 10.5px; font-weight: 600; }
.brw-actions { display: flex; align-items: center; gap: 8px; flex: none; }
.brw-actions .primary-button[disabled] { opacity: .45; cursor: not-allowed; box-shadow: none; }

@media (max-width: 720px) {
  .brw-modes, .brw-dates, .brw-list { grid-template-columns: 1fr; }
  .brw-list { max-height: 46vh; }
  .modal-footer.brw-footer { flex-direction: column; align-items: stretch; }
  .brw-actions { justify-content: flex-end; }
}

/* ══════════════ فونت «ب نازنین» روی متنِ سؤال ═════════════════════════════
   دامنه عمداً باریک است: فقط جایی که متنِ خودِ سؤال دیده می‌شود — پنل مدیر،
   پنل کاربر، رانرِ آزمون، استودیوی چاپ و PDF سرور — و ویرایشگری که همان متن
   در آن نوشته می‌شود. نوار ابزار، منو، دکمه، فرم و جدول‌های مدیریتی وزیرمتن
   می‌مانند؛ اینجا هیچ قاعدهٔ سراسری‌ای روی body یا * گذاشته نمی‌شود.

   اندازهٔ نمایش مستقل از متنِ ریزِ کارت و پنل است. چاپ و اندازه‌گیرِ صفحه‌بندی
   همچنان ضریب --q-scale را دقیقاً یک بار روی اندازهٔ انتخابیِ قالب می‌گیرند.
   ═════════════════════════════════════════════════════════════════════════ */

.pstudio-page,
.pstudio-measure,
.pq-block,
body.pdf-export,
body.pstudio-printing {
  --q-text-size: calc(1em * var(--q-scale));
}
@media print {
  :root { --q-text-size: calc(1em * var(--q-scale)); }
}

.sq-rich-text,
.qai-option > div,
.qv-opts > span,
.sq-ans-opt > span:not(.sq-ans-no),
.er-opt > span,
.pq-option > span,
.draw-question-options > div,
.rte-area,
.fml-out {
  font-family: var(--q-font);
  font-size: var(--q-text-size);
  color: var(--q-ink);
  letter-spacing: 0;
  /* ب نازنین بدنهٔ کوتاه‌تری دارد، پس با همان line-height قبلی سطرها زیادی از
     هم باز می‌افتند؛ کمی جمع‌تر، همان فشردگیِ کتاب درسی را می‌دهد. */
  line-height: 1.9;
}
.sq-rich-text .sq-rich-text { font-size: inherit; }
.draw-print-question .pq-option > b { font-size: var(--q-text-size); }

/* گزینهٔ تک‌خطی مثل یک ردیف پاسخ جمع‌وجور می‌ماند؛ با چندخطی‌شدن متن، ارتفاع
   همچنان طبیعی و بدون برش زیاد می‌شود. */
.sq-ans-opt > span:not(.sq-ans-no) { line-height: 1.55; }

/* شمارهٔ گزینه روی صفحه از فونتِ پوسته (وزیرمتن) می‌آید، نه از فونتِ سؤال:
   رقمِ ب نازنین داخلِ کادرِ کوچکِ شماره ریز و کم‌جان دیده می‌شد و با بقیهٔ
   عددهای رابط یکدست نبود. متنِ گزینه بالاتر خودش خانواده را می‌گیرد؛ اینجا
   فقط ارثِ رسیده به خودِ شماره خنثی می‌شود. برگهٔ چاپ (.pq-option) استثناست
   و فونتِ سؤال را نگه می‌دارد، چون آنجا کلِ صفحه باید مثل کتاب دیده شود. */
.qv-opts > span > b,
.draw-question-options > div > b { font-family: "Vazirmatn", Tahoma, sans-serif; }
/* شمارهٔ گزینه هم‌قدِ متنِ گزینه است: ضریب --q-scale روی متن اعمال می‌شود و اگر
   به خودِ شماره نرسد، «۱)» کنارِ متن ریز و کم‌جان دیده می‌شود. */
.pq-option > b { font-family: var(--q-font); font-size: calc(1em * var(--q-scale)); }

/* قلمِ انتخابی فقط روی همان span ذخیره‌شده اعمال می‌شود؛ پوستهٔ سایت و نوار
   ابزار همچنان وزیرمتن‌اند. وزیرمتن بدنهٔ بلندتری از ب‌نازنین دارد، پس ضریب
   بزرگ‌نماییِ سراسریِ سؤال روی آن خنثی می‌شود. */
[data-mk-font="nazanin"] { font-family: var(--q-font); }
[data-mk-font="nazanin"] { --mk-font-k: 1; }
[data-mk-font="vazir"] {
  font-family: "Vazirmatn", Tahoma, sans-serif;
  font-size: calc(1em / var(--q-scale));
  --mk-font-k: calc(1 / var(--q-scale));
}

/* اندازهٔ قلمِ انتخابیِ نویسنده، مثل Word: عددِ ذخیره‌شده پوینت است و ۱۴ همان
   اندازهٔ پیش‌فرضِ متن. پایه (--mk-base) یک بار روی خودِ سطحِ نمایش به طولِ
   مطلق حساب می‌شود و همان به ارث می‌رسد؛ پس «۱۲ داخلِ ۲۰» دوازده می‌ماند و
   ضرب در هم نمی‌شود — و در چاپ هم چون پایه همان اندازهٔ قالب است، نسبت حفظ
   می‌شود. ب نازنین ریزبدنه است و وزیرمتن نه؛ ضریبِ --mk-font-k همان جبرانِ
   [data-mk-font="vazir"] را به اندازهٔ دلخواهِ داخلش هم می‌رساند. */
@property --mk-base { syntax: "<length>"; inherits: true; initial-value: 16px; }
.sq-rich-text,
.qai-option > div,
.qv-opts > span,
.sq-ans-opt > span:not(.sq-ans-no),
.er-opt > span,
.pq-option > span,
.draw-question-options > div,
.rte-area,
.fml-out { --mk-base: 1em; --mk-font-k: 1; }
[data-mk-size] { font-size: calc(var(--mk-base) * var(--mk-size, 14) / 14 * var(--mk-font-k, 1)); }
[data-mk-size="8"] { --mk-size: 8; }
[data-mk-size="9"] { --mk-size: 9; }
[data-mk-size="10"] { --mk-size: 10; }
[data-mk-size="11"] { --mk-size: 11; }
[data-mk-size="12"] { --mk-size: 12; }
[data-mk-size="13"] { --mk-size: 13; }
[data-mk-size="14"] { --mk-size: 14; }
[data-mk-size="16"] { --mk-size: 16; }
[data-mk-size="18"] { --mk-size: 18; }
[data-mk-size="20"] { --mk-size: 20; }
[data-mk-size="22"] { --mk-size: 22; }
[data-mk-size="24"] { --mk-size: 24; }
[data-mk-size="28"] { --mk-size: 28; }
[data-mk-size="32"] { --mk-size: 32; }
[data-mk-size="36"] { --mk-size: 36; }

/* فرمول هم همان قرارداد را می‌گیرد: حرف و عددِ لاتینِ داخل فرمول XITS (Times)
   می‌شود — دقیقاً مثل دفترچهٔ کنکور — و متنِ فارسیِ \text{} و ارقامِ فارسی‌شده
   از ب نازنین/وزیرمتن می‌آیند. همه از یک خانوادهٔ ترکیبی، پس تفکیک خودکار است.

   KaTeX_Main بعد از آن در زنجیره می‌ماند و همین نگهش می‌دارد: نشانه‌هایی که در
   XITS نیستند (∑ ∏ ∫ ∈ و …) از فونتِ خودِ KaTeX می‌آیند. کلاس‌های ساختاری
   (delimsizing، size1..4، AMS، Caligraphic، Script) هم font-family صریحِ خودشان
   را دارند و دست‌نخورده می‌مانند — بدون آن‌ها پرانتزِ بلند و رادیکال می‌شکند. */
.mkm .katex { font-family: var(--mk-g1,) "MK Question", KaTeX_Main, "Times New Roman", serif; font-size: 1em; }
/* بولدِ مصنوعی روی گلیف‌های KaTeX ممنوع.
   صورتِ سؤال وزنِ ۷۰۰ می‌گیرد و فرمول هم با آن همراه می‌شود؛ ولی فونت‌های
   KaTeX_Size1..4 (آکولاد و پرانتزِ بلند، رادیکالِ کشیده) و KaTeX_AMS اصلاً
   نسخهٔ بولد ندارند، پس مرورگر خودش گلیف را چاق می‌کرد. نتیجه‌اش همان آکولادِ
   ضخیم و لکه‌مانندِ تابعِ چندضابطه‌ای بود. با خاموش‌کردنِ ساختِ مصنوعی، هر گلیف
   با ضخامتِ طراحی‌شدهٔ خودش رسم می‌شود؛ حرف و رقم دست‌نخورده بولد می‌مانند
   چون «MK Question» فیسِ واقعیِ ۷۰۰ دارد. */
.mkm .katex { font-synthesis-weight: none; }
/* فرمولِ خط‌مستقل یک واحدِ خواندنِ جداست، نه کلمه‌ای وسطِ جمله: در پاسخِ تشریحی
   خواننده باید مرحله‌به‌مرحله دنبالش کند و همان چیزی است که کاربر گفت «چشم برای
   دیدنش باید تلاش کند». ۱٫۱ برابر، بدون آنکه با متنِ اطراف ناجور شود — فرمولِ
   درون‌خطی عمداً ۱em می‌ماند، وگرنه وسطِ جمله از کلمه‌های کنارش بلندتر می‌زند. */
.mkm.is-display .katex { font-size: 1.1em; }
/* خودِ KaTeX کل فرمول را ۱٫۲۱em می‌گیرد. XITS با همان اندازهٔ متن خواناست و
   بزرگ‌نماییِ اضافه باعث می‌شد x/H/… از ضریب و عددِ کنارش درشت‌تر بیفتد؛ ۱em
   اندازهٔ پایه را با متن و ارقام یکسان می‌کند.

   در جهتِ مقابل، KaTeX توان، اندیس و اجزای کسرِ inline را ۰٫۷em و اندیسِ
   رادیکال/اندازهٔ tiny را حتی ۰٫۵em می‌کند — همان چیزی که خواندنِ پاسخِ تشریحیِ
   فرمول‌دار را برای چشم سخت می‌کند. نگاشتِ ما بزرگ‌ترین نسخهٔ هر سطح را
   می‌گیرد: ۰٫۷۵ برای کوچک‌ترین سطح (درجهٔ رادیکال)، ۰٫۸ برای سطح میانی و
   ۰٫۸۵ برای توان/اندیسِ عادی. لایهٔ تو‌در‌توی توان/اندیس هم ۰٫۸۵ِ مرحلهٔ اول
   (در مجموع ۰٫۷۲ اندازهٔ پایه) می‌شود. سمتِ منبع هم همین جهت را دارد:
   mkMathReadableTex کسر را \dfrac می‌کند تا صورت و مخرج اصلاً کوچک نشوند. */
.mkm .katex .fontsize-ensurer.reset-size6.size1,
.mkm .katex .sizing.reset-size6.size1 { font-size: 0.75em; }
.mkm .katex .fontsize-ensurer.reset-size6.size2,
.mkm .katex .sizing.reset-size6.size2 { font-size: 0.8em; }
.mkm .katex .fontsize-ensurer.reset-size6.size3,
.mkm .katex .sizing.reset-size6.size3 { font-size: 0.85em; }
.mkm .katex .fontsize-ensurer.reset-size3.size1,
.mkm .katex .sizing.reset-size3.size1 { font-size: 0.85em; }
/* KaTeX متغیرِ ساده‌ای مثل `x` را .mathnormal و به‌طور پیش‌فرض italic می‌کند.
   در خروجیِ کنکورِ مرجع و متنِ انگلیسیِ سؤال، همان حرف upright است؛ بنابراین
   علاوه بر خانواده، style هم باید اینجا صریحاً همسان شود. حالت‌های درخواستیِ
   \mathit/\textit پایین‌تر همچنان italic می‌مانند. */
.mkm .katex .mathnormal {
  font-family: var(--mk-g1,) "MK Question", KaTeX_Math, serif;
  font-style: normal;
}
.mkm .katex .mathrm,
.mkm .katex .textrm,
.mkm .katex .mathbf,
.mkm .katex .textbf,
.mkm .katex .mathit,
.mkm .katex .textit { font-family: var(--mk-g1,) "MK Question", KaTeX_Main, serif; }
.mkm .katex .mathsf,
.mkm .katex .textsf { font-family: KaTeX_SansSerif, "MK Question", sans-serif; }
.mkm .katex .mathtt,
.mkm .katex .texttt { font-family: KaTeX_Typewriter, monospace; }
/* اندازهٔ این گلیف‌ها بالاتر ۱em شده و اینجا فقط خانوادهٔ نهاییِ متنِ سؤال را
   می‌گیرد تا ویرایشگر، نمایش سایت و PDF دقیقاً یک خروجی داشته باشند. */
.mkm .mkm-fa { font-family: var(--q-font); }

/* ── شکلِ g در کلِ یک سؤال ──────────────────────────────────────────────────
   .mkg1 روی تکه‌های سطحِ اولِ متنِ سؤالی می‌نشیند که gForm = "single" دارد (و
   روی کادرهای ویرایشگرِ همان سؤال). دو مسیر لازم است چون فونت دو جور می‌رسد:
   - متن: --q-font همین‌جا بازتعریف می‌شود تا [data-mk-font="nazanin"] و هر
     قاعدهٔ var(--q-font) زیرِ آن هم g تک‌طبقه بگیرد؛ font-family خودِ تکه هم لازم
     است چون ارث، مقدارِ حل‌شدهٔ والد را می‌برد نه var را.
   - فرمول: قاعده‌های .katex با var(--mk-g1,) شروع می‌شوند؛ بیرونِ .mkg1 خالی است.
   span.mkg-alt / span.mkg-single نسخهٔ قدیمیِ انتخابِ حرف‌به‌حرف‌اند و حالا
   خنثی‌اند — g فقط از تنظیمِ سؤال پیروی می‌کند. */
.mkg1 { --q-font: var(--q-font-g1); --mk-g1: "MK Question Single G",; }
.mkg1:not(.mkm):not([data-mk-font="vazir"]) { font-family: var(--q-font); }
.mkg-alt,
.mkg-single { font-style: normal; }

/* ── استثنای اکسان: فقط خودِ گلیفِ اکسان به فونت KaTeX برمی‌گردد ─────────────
   قبلاً کلِ `.accent` — یعنی حرفِ پایه هم — به فونت‌های KaTeX برمی‌گشت، چون
   گمان می‌رفت جای کلاهک/تیلده/بردار به عرضِ گلیفِ پایه در فونت‌های خودِ KaTeX
   گره خورده. نتیجه‌اش این بود که در `(-\tfrac{1}{3}\,\mathrm{m})\vec{i}` حرفِ
   `m` با فونتِ سؤال و `i` با فونتِ KaTeX (و مورب) دیده می‌شد — دو فونت در یک
   فرمول.

   اندازه‌گیری (هارنسِ سه‌ستونه، فاصلهٔ مرکزِ اکسان تا مرکزِ پایه) نشان داد فرض
   غلط بوده: KaTeX اکسان را داخل یک `inline-table` با `text-align: center`
   می‌گذارد، پس مرکزش را از عرضِ *واقعیِ* پایه می‌گیرد و با عوض‌شدن فونت هم
   دقیقاً همان‌جا می‌ماند (اختلافِ سنجیده‌شده صفر بود). تنها چیزی که واقعاً
   ازپیش‌حساب‌شده است، `left` درون‌خطیِ خودِ `.accent-body` است؛ صفرکردنش اکسان
   را ۴٫۷px به راست می‌برد، پس دست‌نخورده می‌ماند.

   بنابراین پایه فونتِ سؤال را نگه می‌دارد و فقط گلیفِ اکسان — که در XITS ممکن
   است اصلاً نباشد یا شکلِ دیگری داشته باشد — از KaTeX_Main می‌آید.
   `\overline{}`/`\underline{}` همچنان هیچ استثنایی لازم ندارند. */
.mkm .katex .accent .accent-body,
.mkm .katex .accent .accent-body .mord { font-family: KaTeX_Main, serif; font-style: normal; }

/* ── فلشِ بردار (\vec) ───────────────────────────────────────────────────────
   ساختِ این جعبه در app.js (`mkMathVectorArrows`) توضیح داده شده. اینجا فقط
   قوارهٔ فلش است:

     --vec-t   ضخامتِ میله      کفِ ۰٫۷۵px دارد تا در ۱۳px هم یک خطِ سیاهِ
                               تمام‌قد بماند، نه یک نوارِ خاکستریِ نیم‌پیکسلی.
     --vec-hw  درازای نوک       ثابت است و با عرضِ پایه کش نمی‌آید.
     --vec-h   بلندای نوک
     min-width کفِ عرضِ فلش      برای پایهٔ باریک مثل \vec{i}.

   `top` فلش را طوری می‌نشاند که کفِ جوهرش دقیقاً روی کفِ جوهرِ فلشِ اصلیِ
   KaTeX (۰٫۱۹۸em پایین‌ترِ سقفِ جعبه) بیفتد، پس فاصله‌اش تا حرف همان می‌ماند
   که KaTeX حساب کرده بود. `position:absolute` هم لازم است: اگر فلش در جریانِ
   عادی بنشیند، خطِ پایهٔ جعبهٔ اکسان از کفِ خودش گرفته می‌شود و کلِ فلش نزدیکِ
   نیم‌em پایین می‌افتد و روی حرف می‌نشیند. */
.mkm .katex .accent .accent-body.mkm-vec-body { width: 100%; height: 0.714em; }
.mkm-vec {
  --vec-t: 0.05em; --vec-hw: 0.32em; --vec-h: 0.25em;
  position: absolute; top: calc(0.198em - var(--vec-h)); left: 50%;
  transform: translateX(-50%);
  width: 100%; min-width: 0.64em; height: var(--vec-h);
  display: flex; align-items: center;
}
.mkm-vec .mkm-vec-bar {
  flex: 1 1 auto; height: var(--vec-t); min-height: 0.75px;
  margin-right: calc(-1 * var(--vec-t)); /* میله زیرِ کفِ نوک می‌رود تا درزی نماند */
}
.mkm-vec .mkm-vec-tip { flex: none; width: var(--vec-hw); height: var(--vec-h); }
/* KaTeX همهٔ svgهایش را `position:absolute; height:inherit` می‌کند؛ بدون این
   بازنشانی، میله و نوک کلِ جعبه را پر می‌کنند و روی حرف سیاهی می‌اندازند. */
.mkm .katex .mkm-vec svg { position: static; display: block; width: 100%; height: 100%; stroke: none; }

/* ── نوار پیشرفت آپلود فایل پوشه ────────────────────────────────────────────
   کنار توست‌ها می‌نشیند ولی خودش توست نیست: سرِ جایش به‌روز می‌شود و تا پایان
   کار می‌ماند، به‌جای اینکه هر ۱۰٪ یک پیام تازه روی هم تلنبار شود. */
.upload-progress {
  min-width: 280px;
  max-width: 390px;
  background: #292721;
  color: white;
  border-radius: 12px;
  padding: 12px 14px;
  box-shadow: 0 14px 35px rgba(0,0,0,.2);
  border-right: 4px solid var(--teal);
  animation: toast-in .22s ease;
}
.upload-progress .up-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 9px; }
.upload-progress .up-head strong {
  font-size: 11px; font-weight: 800; min-width: 0;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.upload-progress .up-head span { flex: none; font-size: 12px; font-weight: 900; color: #7fd6c3; }
.upload-progress .up-bar { height: 7px; border-radius: 999px; background: rgba(255,255,255,.14); overflow: hidden; }
.upload-progress .up-bar i {
  display: block; height: 100%; border-radius: inherit;
  background: linear-gradient(90deg, #3fa38c, var(--teal));
  transition: width .2s ease;
}
/* پیشرفت نامعلوم (آپلود محلی): نوار راه‌راهِ متحرک به‌جای عدد */
.upload-progress .up-bar.unknown i {
  background-image: linear-gradient(115deg, rgba(255,255,255,.32) 25%, transparent 25%, transparent 50%, rgba(255,255,255,.32) 50%, rgba(255,255,255,.32) 75%, transparent 75%);
  background-size: 18px 18px;
  animation: up-stripes .7s linear infinite;
}
.upload-progress small { display: block; margin-top: 7px; font-size: 10px; color: rgba(255,255,255,.55); }
@keyframes up-stripes { from { background-position: 0 0; } to { background-position: 18px 0; } }
@media (prefers-reduced-motion: reduce) {
  .upload-progress .up-bar i { transition: none; animation: none; }
}

/* ═══════════════════════════════════════════════════════════════════════
   فروشگاه و اشتراک
   `shop-*`  → صفحهٔ فروشگاه (پنل کاربر و صفحهٔ عمومی /store)
   `store-*` → پوستهٔ صفحهٔ عمومی که پنل ندارد
   هر کارت رنگ محصول را از `--shop-accent` می‌گیرد؛ رنگ فقط یک بار روی
   ریشهٔ کارت ست می‌شود و بقیه از آن مشتق می‌شوند.
   ═══════════════════════════════════════════════════════════════════════ */
.shop-page { --shop-accent: var(--blue); }
.shop-loading {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  padding: 70px 20px; color: var(--muted); font-size: 13px;
}
.shop-loading .ui-icon { width: 18px; height: 18px; animation: shop-spin 1s linear infinite; }
@keyframes shop-spin { to { transform: rotate(360deg); } }

/* ───────────────────────────── سرصفحه ───────────────────────────── */
.shop-hero {
  position: relative; overflow: hidden;
  display: grid; grid-template-columns: minmax(0, 1fr) 220px; gap: 24px; align-items: center;
  padding: 30px 32px; border-radius: var(--radius);
  background: linear-gradient(115deg, #1d2740 0%, #2b3d66 52%, #33538c 100%);
  color: #fff; box-shadow: var(--shadow);
}
.shop-hero .eyebrow { color: #ffbe93; }
.shop-hero h1 { margin: 8px 0 10px; font-size: 24px; font-weight: 900; line-height: 1.5; }
.shop-hero p { margin: 0; font-size: 13px; line-height: 2; color: rgba(255,255,255,.82); max-width: 62ch; }
.shop-hero-points { list-style: none; display: flex; flex-wrap: wrap; gap: 8px 18px; margin: 18px 0 0; padding: 0; }
.shop-hero-points li { display: flex; align-items: center; gap: 7px; font-size: 12px; font-weight: 700; color: rgba(255,255,255,.9); }
.shop-hero-points .ui-icon { width: 16px; height: 16px; color: #7fd6c3; }
.shop-hero-art { position: relative; height: 150px; }
.shop-hero-art span {
  position: absolute; border-radius: 26px; border: 1.5px solid rgba(255,255,255,.22);
  background: linear-gradient(140deg, rgba(255,255,255,.16), rgba(255,255,255,.02));
  backdrop-filter: blur(2px);
}
.shop-hero-art span:nth-child(1) { inset: 12% 30% 40% 8%; transform: rotate(-8deg); }
.shop-hero-art span:nth-child(2) { inset: 30% 12% 18% 28%; transform: rotate(6deg); background: linear-gradient(140deg, rgba(255,190,147,.3), rgba(255,190,147,.05)); }
.shop-hero-art span:nth-child(3) { inset: 55% 46% 6% 16%; transform: rotate(-3deg); }

/* ───────────────────────────── چیدمان ───────────────────────────── */
.shop-layout { display: grid; grid-template-columns: 234px minmax(0, 1fr); gap: 20px; align-items: start; }
.shop-filters {
  position: sticky; top: 16px;
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 16px; box-shadow: var(--shadow); display: grid; gap: 16px;
}
.shop-filter-search { position: relative; }
.shop-filter-search input {
  width: 100%; padding: 9px 34px 9px 12px; font: inherit; font-size: 12px;
  border: 1px solid var(--line); border-radius: 11px; background: var(--panel-soft); color: inherit;
}
.shop-filter-search .search-glyph { position: absolute; inset-inline-start: 11px; top: 50%; transform: translateY(-50%); width: 15px; height: 15px; color: var(--muted); }
.shop-filters h4 { margin: 0 0 8px; font-size: 11px; font-weight: 800; color: var(--muted); }
.shop-filter-row { display: flex; flex-wrap: wrap; gap: 6px; }
.shop-filter-chip {
  border: 1px solid var(--line); background: var(--panel-soft); color: var(--ink);
  border-radius: 999px; padding: 5px 11px; font: inherit; font-size: 11px; font-weight: 700;
  cursor: pointer; transition: background .15s ease, border-color .15s ease, color .15s ease;
}
.shop-filter-chip:hover { border-color: var(--blue); color: var(--blue); }
.shop-filter-chip.on { background: var(--ink); border-color: var(--ink); color: #fff; }
.shop-filter-reset { justify-self: start; font-size: 11px; }

.shop-results { display: grid; gap: 14px; min-width: 0; }
.shop-results-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.shop-results-head h2 { margin: 0; font-size: 15px; font-weight: 900; display: flex; align-items: center; gap: 8px; }
.shop-results-head .count {
  font-size: 11px; font-weight: 800; color: var(--muted);
  background: var(--panel-soft); border: 1px solid var(--line); border-radius: 999px; padding: 2px 9px;
}
.shop-cart-button { position: relative; }
.shop-cart-count {
  display: inline-flex; align-items: center; justify-content: center; min-width: 18px; height: 18px;
  padding: 0 5px; margin-inline-start: 6px; border-radius: 999px;
  background: var(--orange); color: #fff; font-size: 10px; font-weight: 900;
}
.shop-cart-count[hidden] { display: none; }

.shop-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(272px, 1fr)); gap: 16px; }

/* ───────────────────────────── کارت محصول ───────────────────────────── */
.shop-card {
  position: relative; overflow: hidden; display: flex; flex-direction: column; gap: 12px;
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 18px; box-shadow: var(--shadow);
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.shop-card::before {
  content: ""; position: absolute; inset: 0 0 auto; height: 3px;
  background: linear-gradient(90deg, var(--shop-accent), color-mix(in srgb, var(--shop-accent) 35%, transparent));
}
.shop-card:hover { transform: translateY(-3px); box-shadow: 0 18px 40px rgba(41, 36, 29, .1); border-color: color-mix(in srgb, var(--shop-accent) 35%, var(--line)); }

/* ریبونِ تخفیف — مورب روی گوشهٔ کارت */
/* ریبونِ گوشه: نوار به عرضِ ۱۹۰ و مرکزِ (۲۵٫±) روی قطر می‌نشیند و دو سرش را
   overflow: hidden کارت می‌بُرد. عرضِ کمتر از این، نوار را قبل از رسیدن به
   لبه‌ها تمام می‌کند و مثلثِ ناقص می‌سازد. */
.shop-ribbon {
  position: absolute; top: 25px; inset-inline-end: -58px;
  display: grid; place-items: center; gap: 0;
  width: 190px; padding: 4px 0; transform: rotate(-45deg); transform-origin: center;
  background: linear-gradient(135deg, var(--orange), #ff8f4d);
  color: #fff; text-align: center; box-shadow: 0 6px 16px rgba(255, 107, 24, .35); z-index: 2;
}
.shop-ribbon b { font-size: 12px; font-weight: 900; line-height: 1.15; }
.shop-ribbon small { font-size: 8.5px; font-weight: 700; opacity: .9; line-height: 1; }
/* گوشهٔ ریبون همیشه سمتِ «دورتر» از جلد محصول است: در RTL بالا-چپ، در LTR بالا-راست. */
[dir="ltr"] .shop-ribbon { transform: rotate(45deg); }

.shop-card-head { display: flex; align-items: flex-start; gap: 12px; cursor: pointer; }
.shop-card-title { min-width: 0; }
.shop-card-audience {
  display: inline-block; font-size: 10px; font-weight: 800; letter-spacing: .01em;
  color: var(--shop-accent); background: color-mix(in srgb, var(--shop-accent) 12%, transparent);
  border-radius: 999px; padding: 2px 8px; margin-bottom: 6px;
}
.shop-card-title h3 { margin: 0 0 4px; font-size: 15px; font-weight: 900; line-height: 1.5; }
.shop-card-title p { margin: 0; font-size: 11.5px; color: var(--muted); line-height: 1.8; }

/* جلد محصول */
.shop-cover { position: relative; flex: none; width: 62px; height: 62px; display: block; }
.shop-cover.sm { width: 44px; height: 44px; }
.shop-cover.lg { width: 118px; height: 118px; }
.shop-cover img { width: 100%; height: 100%; object-fit: cover; border-radius: 16px; border: 1px solid var(--line); }
.shop-cover-art {
  position: relative; display: grid; place-items: center; width: 100%; height: 100%;
  border-radius: 18px; overflow: hidden;
  background: linear-gradient(145deg, color-mix(in srgb, var(--shop-accent) 92%, #000), var(--shop-accent));
  box-shadow: inset 0 1px 0 rgba(255,255,255,.25);
}
.shop-cover-blob { position: absolute; border-radius: 50%; background: rgba(255,255,255,.16); }
.shop-cover-blob { inset: -30% 55% 40% -20%; }
.shop-cover-blob.two { inset: 52% -22% -30% 48%; background: rgba(255,255,255,.1); }
.shop-cover-glyph { position: relative; display: grid; place-items: center; width: 58%; color: #fff; }
.shop-cover-glyph svg { width: 100%; height: auto; }

.shop-card-scope { display: flex; flex-wrap: wrap; gap: 5px; }
/* در صفحهٔ جزئیات چیپ‌ها بیشترند (درس‌ها هم می‌آیند) و با فاصلهٔ کارت به هم
   می‌چسبیدند؛ اینجا جا دارند، پس جا می‌گیرند. */
.shop-card-scope.detail { flex-direction: column; align-items: stretch; gap: 7px; margin-block: 4px 10px; }
.shop-card-scope.detail .shop-scope-line { display: flex; flex-wrap: wrap; gap: 7px 8px; }
.shop-card-scope.detail .shop-chip { padding: 5px 11px; border-radius: 9px; line-height: 1.7; }
.shop-chip {
  font-size: 10.5px; font-weight: 700; border-radius: 7px; padding: 3px 8px;
  border: 1px solid var(--line); background: var(--panel-soft); color: var(--muted);
}
.shop-chip.grade { color: var(--blue); border-color: color-mix(in srgb, var(--blue) 26%, var(--line)); background: var(--blue-soft); }
.shop-chip.field { color: var(--teal); border-color: color-mix(in srgb, var(--teal) 26%, var(--line)); background: var(--teal-soft); }
.shop-chip.lesson { color: var(--purple); border-color: color-mix(in srgb, var(--purple) 26%, var(--line)); background: var(--purple-soft); }

.shop-card-stats { list-style: none; display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 0; padding: 10px 0; border-block: 1px solid var(--line); }
.shop-card-stats li { display: grid; gap: 2px; text-align: center; }
.shop-card-stats b { font-size: 14px; font-weight: 900; }
.shop-card-stats small { font-size: 10px; color: var(--muted); }

/* پنج مدت در سه ستون می‌نشیند (۳+۲)؛ کشیدنِ ردیفِ دومی که فقط یک دکمه دارد
   کارت را نامتقارن می‌کرد. */
.shop-card-durations { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.shop-buybox-durations { display: grid; gap: 6px; }
.shop-duration {
  position: relative; display: grid; gap: 1px; justify-items: center; min-width: 0;
  border: 1px solid var(--line); background: var(--panel-soft); color: var(--ink);
  border-radius: 11px; padding: 7px 6px; font: inherit; font-size: 11px; font-weight: 800;
  cursor: pointer; transition: border-color .15s ease, background .15s ease, color .15s ease;
}
.shop-duration em { font-style: normal; font-size: 8.5px; font-weight: 800; color: var(--orange); }
.shop-duration small { font-size: 10px; font-weight: 700; color: var(--muted); }
.shop-duration:hover { border-color: var(--shop-accent); }
.shop-duration.on { background: color-mix(in srgb, var(--shop-accent) 12%, transparent); border-color: var(--shop-accent); color: var(--shop-accent); }
.shop-duration.on small { color: inherit; }

.shop-card-price { display: flex; align-items: baseline; flex-wrap: wrap; gap: 8px; }
.shop-card-price del { font-size: 11.5px; color: var(--muted); text-decoration-thickness: 1.5px; }
.shop-card-price strong { font-size: 19px; font-weight: 900; color: var(--ink); }
.shop-card-price strong span { font-size: 11px; font-weight: 700; color: var(--muted); margin-inline-start: 4px; }
.shop-card-price small { flex-basis: 100%; font-size: 10.5px; color: var(--muted); }

.shop-owned {
  display: inline-flex; align-items: center; gap: 6px; font-size: 11px; font-weight: 800;
  color: var(--teal); background: var(--teal-soft); border: 1px solid color-mix(in srgb, var(--teal) 24%, var(--line));
  border-radius: 9px; padding: 5px 9px; width: fit-content;
}
.shop-owned .ui-icon { width: 14px; height: 14px; }
.shop-card-actions { display: flex; gap: 8px; margin-top: auto; }
.shop-card-actions .primary-button { flex: 1; justify-content: center; }

/* ───────────────────────── اشتراک‌های من ─────────────────────────
   هر تعداد اشتراک در یک ردیف افقی می‌ماند. اگر عرض برای خوانا ماندنِ همهٔ
   کارت‌ها کافی نباشد، خودِ ردیف اسکرول می‌خورد و کارت‌ها به سطر دوم نمی‌روند. */
.shop-mine .shop-mine-rows {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(min(400px, 88vw), 1fr);
  gap: 9px;
  min-width: 0;
  overflow-x: auto;
  overscroll-behavior-inline: contain;
  scrollbar-width: thin;
}
.shop-mine-row {
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto auto;
  align-items: center; gap: 12px; padding: 11px 13px;
  border: 1px solid var(--line); border-radius: 14px; background: var(--panel-soft);
  border-inline-start: 3px solid var(--shop-accent);
}
.shop-mine-row.warn { background: var(--yellow-soft); border-color: color-mix(in srgb, var(--yellow) 30%, var(--line)); }
.shop-mine-row.off { opacity: .62; }
.shop-mine-dot {
  display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px;
  background: color-mix(in srgb, var(--shop-accent) 12%, #fff); color: var(--shop-accent);
}
.shop-mine-dot .ui-icon { width: 20px; height: 20px; }
.shop-mine-info { min-width: 0; display: grid; gap: 5px; }
.shop-mine-info b { font-size: 15px; font-weight: 900; }
.shop-mine-meta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.shop-mine-meta small { font-size: 12.5px; color: var(--muted); font-weight: 700; }
.shop-mine-chip {
  padding: 3px 9px; border-radius: 999px; font-size: 11px; font-weight: 900;
  background: color-mix(in srgb, var(--teal) 14%, #fff); color: #157b6c;
}
.shop-mine-row.warn .shop-mine-chip { background: color-mix(in srgb, var(--yellow) 22%, #fff); color: #9a6a11; }
.shop-mine-row.off .shop-mine-chip { background: var(--line); color: var(--muted); }
.shop-mine-left { display: grid; justify-items: center; gap: 1px; padding-inline: 4px; }
.shop-mine-left b { font-size: 19px; font-weight: 950; line-height: 1.1; }
.shop-mine-left small { font-size: 11px; color: var(--muted); font-weight: 700; white-space: nowrap; }
.shop-mine-cta { white-space: nowrap; }

/* ───────────────────────── صفحهٔ جزئیات محصول ───────────────────────── */
.shop-detail { display: grid; gap: 18px; }
.shop-breadcrumb { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--muted); }
.shop-breadcrumb button {
  display: inline-flex; align-items: center; gap: 4px; border: 0; background: none;
  font: inherit; font-weight: 700; color: var(--blue); cursor: pointer; padding: 0;
}
.shop-breadcrumb button .ui-icon { width: 14px; height: 14px; }

.shop-detail-hero {
  display: grid; grid-template-columns: 140px minmax(0, 1fr) 300px; gap: 22px; align-items: start;
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 24px; box-shadow: var(--shadow);
}
.shop-detail-media { position: relative; }
.shop-detail-intro h1 { margin: 6px 0 8px; font-size: 21px; font-weight: 900; line-height: 1.5; }
.shop-detail-intro > p { margin: 0 0 12px; font-size: 13px; line-height: 2; color: var(--muted); }
.shop-detail-counts { list-style: none; display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 10px; margin: 14px 0; padding: 0; }
.shop-detail-counts li {
  display: grid; gap: 2px; text-align: center; padding: 9px 6px;
  border: 1px solid var(--line); border-radius: 12px; background: var(--panel-soft);
}
.shop-detail-counts b { font-size: 16px; font-weight: 900; }
.shop-detail-counts small { font-size: 10px; color: var(--muted); }

.shop-buybox {
  position: sticky; top: 16px; display: grid; gap: 12px;
  border: 1px solid color-mix(in srgb, var(--shop-accent) 24%, var(--line));
  border-radius: 16px; padding: 16px; background: var(--panel-soft);
}
.shop-buybox h3 { display: flex; align-items: center; gap: 7px; margin: 0; font-size: 12.5px; font-weight: 900; }
.shop-buybox h3 .ui-icon { width: 16px; height: 16px; color: var(--shop-accent); }
.shop-buybox-durations { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.shop-buybox-price { display: grid; gap: 6px; padding: 12px 0; border-block: 1px solid var(--line); }
.shop-buybox-row { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; font-size: 12px; }
.shop-buybox-row strong { font-size: 17px; font-weight: 900; }
.shop-buybox-row.saving { color: var(--teal); font-weight: 800; }
.shop-buybox-row.muted { color: var(--muted); font-size: 11px; }
.shop-buybox .primary-button, .shop-buybox .secondary-button { width: 100%; justify-content: center; }

/* ───── نوارِ چسبانِ بخش‌ها + ورقِ پیوستهٔ پایین صفحهٔ محصول ─────
   پنج کارتِ جدا (هر کدام با حاشیه، سایه و padding خودش) صفحه را دراز و
   ناخوانا می‌کرد و راهی هم برای پریدن بین بخش‌ها نبود. */
.shop-secnav {
  position: sticky; top: 72px; z-index: 5;
  display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none;
  margin-bottom: -6px; padding: 6px; border-radius: 14px;
  border: 1px solid var(--line);
  background: color-mix(in srgb, var(--panel) 86%, transparent);
  backdrop-filter: blur(14px);
}
.shop-secnav::-webkit-scrollbar { display: none; }
.shop-secnav-item {
  flex: none; border: 0; cursor: pointer; white-space: nowrap;
  padding: 8px 15px; border-radius: 10px; background: transparent;
  font: inherit; font-size: 12.5px; font-weight: 800; color: var(--muted);
  transition: background .15s, color .15s;
}
.shop-secnav-item:hover { color: var(--ink); background: var(--panel-soft); }
.shop-secnav-item.on { color: #fff; background: var(--shop-accent, var(--blue)); }

.shop-sheet { padding: 0 24px; }
.shop-sec { padding: 22px 0; border-bottom: 1px solid var(--line); scroll-margin-top: 130px; }
.shop-sec:last-child { border-bottom: 0; }
.shop-sec-head {
  display: flex; align-items: center; gap: 8px; margin: 0 0 14px;
  font-size: 14px; font-weight: 900;
}
.shop-sec-head .ui-icon { width: 17px; height: 17px; color: var(--shop-accent, var(--blue)); }
.shop-sec-head span { position: relative; padding-bottom: 7px; }
.shop-sec-head span::after {
  content: ""; position: absolute; inset-inline-start: 0; bottom: 0;
  width: 100%; height: 2px; border-radius: 2px;
  background: var(--shop-accent, var(--blue));
}

/* ───── جمع‌کردن بلوک بلند ───── */
.shop-clamp { position: relative; }
.shop-clamp .shop-clamp-body { max-height: var(--shop-clamp, 320px); overflow: hidden; }
.shop-clamp.open .shop-clamp-body { max-height: none; }
.shop-clamp:not(.open)::before {
  content: ""; position: absolute; inset-inline: 0; bottom: 34px; height: 56px;
  pointer-events: none;
  background: linear-gradient(to bottom, transparent, var(--panel));
}
.shop-clamp-more {
  display: flex; align-items: center; gap: 5px; margin: 8px 0 0; padding: 0;
  border: 0; background: none; cursor: pointer;
  font: inherit; font-size: 12.5px; font-weight: 800; color: var(--shop-accent, var(--blue));
}
.shop-clamp-more .ui-icon { width: 15px; height: 15px; transition: transform .18s; }
.shop-clamp.open .shop-clamp-more .ui-icon { transform: rotate(180deg); }

/* ───── فهرست جزئیات محصول ───── */
.shop-spec { margin: 0; font-size: 12.5px; column-gap: 46px; }
@media (min-width: 1080px) { .shop-spec { columns: 2; } }
.shop-spec-row {
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
  padding: 10px 2px; border-bottom: 1px solid var(--line); break-inside: avoid;
}
.shop-spec dt { font-weight: 700; color: var(--muted); }
.shop-spec dd { margin: 0; font-weight: 900; white-space: nowrap; }
.shop-spec-yes, .shop-spec-no { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; }
.shop-spec-yes { color: var(--teal); }
.shop-spec-no { color: var(--muted); font-weight: 700; }
.shop-spec-mark {
  display: grid; place-items: center; flex: none; width: 24px; height: 24px;
  border-radius: 50%; background: var(--teal); color: #fff;
  box-shadow: 0 2px 6px color-mix(in srgb, var(--teal) 32%, transparent);
}
.shop-spec-no .shop-spec-mark { background: var(--panel-soft); color: var(--muted); border: 1px solid var(--line); box-shadow: none; }
.shop-spec-mark .ui-icon { width: 15px; height: 15px; stroke-width: 2.6; }

/* ───── تعداد سؤال هر کتاب ───── */
.shop-books-note { margin: -6px 0 12px; font-size: 11.5px; color: var(--muted); }
.shop-book-groups { display: grid; gap: 10px; }
.shop-book-group { border: 1px solid var(--line); border-radius: 12px; background: var(--panel-soft); }
.shop-book-group > summary {
  display: flex; align-items: center; gap: 10px; cursor: pointer; list-style: none;
  padding: 11px 13px; font-size: 12.5px; font-weight: 900;
}
.shop-book-group > summary::-webkit-details-marker { display: none; }
.shop-book-grade { flex: 1; }
.shop-book-sum { font-weight: 700; font-size: 11.5px; color: var(--muted); }
.shop-book-sum b { font-weight: 900; color: var(--ink); }
.shop-book-group > summary .ui-icon { width: 15px; height: 15px; color: var(--muted); transition: transform .18s; }
.shop-book-group[open] > summary .ui-icon { transform: rotate(180deg); }
.shop-books {
  list-style: none; margin: 0; padding: 0 13px 11px;
  display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 7px;
}
.shop-books li {
  display: flex; align-items: center; gap: 10px; padding: 9px 11px;
  border: 1px solid var(--line); border-radius: 10px; background: var(--panel);
}
.shop-book-name { flex: 1; display: grid; gap: 1px; font-size: 12px; font-weight: 800; min-width: 0; }
.shop-book-name small { font-size: 10px; font-weight: 700; color: var(--muted); }
.shop-book-count { display: flex; align-items: baseline; gap: 4px; }
.shop-book-count b { font-size: 14px; font-weight: 900; }
.shop-book-count small { font-size: 10px; color: var(--muted); }

.shop-block { padding: 20px 22px; }
.shop-block-head { display: flex; align-items: center; gap: 9px; margin-bottom: 14px; padding-bottom: 10px; border-bottom: 1px solid var(--line); }
.shop-block-head .ui-icon { width: 18px; height: 18px; color: var(--shop-accent, var(--blue)); }
.shop-block-head h2 { margin: 0; font-size: 14px; font-weight: 900; }
.shop-prose { font-size: 13px; line-height: 2.1; color: var(--ink); }

.shop-highlights { list-style: none; display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 9px; margin: 0; padding: 0; }
.shop-highlights li { display: flex; align-items: flex-start; gap: 8px; font-size: 12.5px; line-height: 1.9; }
.shop-highlights .ui-icon { flex: none; width: 16px; height: 16px; margin-top: 3px; color: var(--teal); }

.shop-features { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px; }
.shop-feature { display: flex; gap: 12px; padding: 14px; border: 1px solid var(--line); border-radius: 14px; background: var(--panel-soft); }
.shop-feature-icon {
  flex: none; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px;
  background: color-mix(in srgb, var(--shop-accent, var(--blue)) 12%, transparent);
  color: var(--shop-accent, var(--blue));
}
.shop-feature-icon svg { width: 21px; height: 21px; }
.shop-feature h4 { margin: 0 0 4px; font-size: 12.5px; font-weight: 800; }
.shop-feature p { margin: 0; font-size: 11.5px; line-height: 1.9; color: var(--muted); }

.shop-capabilities { display: flex; flex-wrap: wrap; gap: 8px; }
.shop-capability {
  display: inline-flex; align-items: center; gap: 7px; padding: 7px 11px;
  border: 1px solid var(--line); border-radius: 10px; background: var(--panel-soft);
  font-size: 11.5px; font-weight: 700;
}
.shop-capability svg { width: 16px; height: 16px; color: var(--shop-accent, var(--blue)); }

.shop-price-table tr.on { background: color-mix(in srgb, var(--shop-accent, var(--blue)) 7%, transparent); }
.shop-price-table del { color: var(--muted); }
.shop-mini-badge { font-size: 9.5px; font-weight: 800; color: var(--orange); background: var(--orange-soft); border-radius: 6px; padding: 1px 6px; }

.shop-faq { display: grid; gap: 8px; }
.shop-faq details { border: 1px solid var(--line); border-radius: 12px; background: var(--panel-soft); overflow: hidden; }
.shop-faq summary {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 12px 14px; font-size: 12.5px; font-weight: 800; cursor: pointer; list-style: none;
}
.shop-faq summary::-webkit-details-marker { display: none; }
.shop-faq summary .ui-icon { width: 16px; height: 16px; color: var(--muted); transition: transform .18s ease; }
.shop-faq details[open] summary .ui-icon { transform: rotate(180deg); }
.shop-faq p { margin: 0; padding: 0 14px 14px; font-size: 12px; line-height: 2; color: var(--muted); }

/* ───────────────────────────── سبد خرید ───────────────────────────── */
.shop-cart-body { display: grid; gap: 10px; }
.shop-cart-row {
  display: flex; align-items: center; gap: 12px; padding: 10px;
  border: 1px solid var(--line); border-radius: 13px; background: var(--panel-soft);
  border-inline-start: 3px solid var(--shop-accent);
}
.shop-cart-info { flex: 1; min-width: 0; display: grid; gap: 2px; }
.shop-cart-info b { font-size: 12.5px; font-weight: 800; }
.shop-cart-info small { font-size: 10.5px; color: var(--muted); }
.shop-cart-price { display: grid; justify-items: end; gap: 1px; }
.shop-cart-price del { font-size: 10.5px; color: var(--muted); }
.shop-cart-price b { font-size: 13px; font-weight: 900; }
.shop-cart-total { display: grid; gap: 6px; padding-top: 12px; border-top: 1px dashed var(--line); }
.shop-cart-total-row { display: flex; align-items: baseline; justify-content: space-between; font-size: 12px; }
.shop-cart-total-row.saving { color: var(--teal); font-weight: 800; }
.shop-cart-total-row.grand strong { font-size: 17px; font-weight: 900; }
.shop-login-note { display: flex; align-items: center; gap: 7px; font-size: 11.5px; color: var(--orange); margin: 0; }
.shop-login-note .ui-icon { width: 15px; height: 15px; }

.shop-order-done { text-align: center; display: grid; gap: 10px; justify-items: center; }
.shop-order-check { display: grid; place-items: center; width: 58px; height: 58px; border-radius: 50%; background: var(--teal-soft); color: var(--teal); }
.shop-order-check .ui-icon { width: 30px; height: 30px; }
.shop-order-done h3 { margin: 0; font-size: 18px; font-weight: 900; }
.shop-buybox-tax, .shop-buybox-final { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; font-size: 12.5px; color: var(--muted); }
.shop-buybox-final { padding-top: 8px; border-top: 1px dashed #eadfd4; color: var(--text, #3d2a1c); font-weight: 800; }
.shop-buybox-final b { font-size: 16px; }
.shop-buybox-final small { font-size: 11px; font-weight: 600; }
.shop-order-items li.shop-order-tax { color: var(--muted); }
.shop-change p { margin: 0 0 12px; line-height: 1.9; font-size: 13px; }
.shop-change select { width: 100%; }
.shop-change-quote ul { list-style: none; margin: 12px 0 0; padding: 10px 12px; border: 1px solid #eadfd4; border-radius: 12px; display: grid; gap: 6px; }
.shop-change-quote li { display: flex; justify-content: space-between; gap: 10px; font-size: 12.5px; color: var(--muted); }
.shop-change-quote li b { color: var(--text, #3d2a1c); }
.shop-change-quote li.is-total { padding-top: 6px; border-top: 1px dashed #eadfd4; font-weight: 800; }
.shop-change-quote small { display: block; margin-top: 6px; color: var(--muted); font-size: 11.5px; }
.shop-order-refs { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 14px; font-size: 12px; color: var(--muted); }
.shop-order-refs bdi { font-weight: 800; color: var(--text, #3d2a1c); letter-spacing: .3px; }
.shop-order-done p { margin: 0; font-size: 12px; color: var(--muted); line-height: 1.9; }
.shop-order-items { list-style: none; margin: 6px 0 0; padding: 0; display: grid; gap: 6px; width: 100%; }
.shop-order-items li { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 11px; border: 1px solid var(--line); border-radius: 10px; font-size: 11.5px; }
.shop-order-items em { font-style: normal; font-weight: 800; }

/* ───────────────────── صفحهٔ عمومی (بدون پوستهٔ پنل) ───────────────────── */
.store-public { min-height: 100vh; display: grid; grid-template-rows: auto 1fr auto; }
.store-public-bar {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 14px 26px; background: var(--panel); border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 20;
}
.store-public-brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: inherit; }
.store-public-brand .brand-mark { display: grid; place-items: center; width: 40px; height: 30px; flex: 0 0 40px; }
.store-public-brand .brand-type { height: 20px; margin-bottom: 1px; }
.store-public-brand strong { display: block; font-size: 14px; font-weight: 900; }
.store-public-brand small { font-size: 10.5px; color: var(--muted); }
.store-public-actions { display: flex; align-items: center; gap: 8px; }
.store-public .content { padding: 24px 26px 40px; max-width: 1280px; width: 100%; margin: 0 auto; }
.store-public-foot { padding: 16px 26px; border-top: 1px solid var(--line); font-size: 11px; color: var(--muted); text-align: center; }

/* ───────────────────────── کارت «نیاز به اشتراک» ───────────────────────── */
.shop-lock {
  display: grid; justify-items: center; text-align: center; gap: 12px;
  padding: 54px 28px; background: var(--panel); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow);
}
.shop-lock-art { display: grid; place-items: center; width: 68px; height: 68px; border-radius: 22px; background: var(--orange-soft); color: var(--orange); }
.shop-lock-art .ui-icon { width: 34px; height: 34px; }

/* ── نمایش بخش‌ها برای کاربران (پرچمِ عرضه) ─────────────────────────────── */
.feature-flag-panel .ffl-list { display: grid; gap: 10px; padding: 14px 16px; }
.ffl-row {
  display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 12px;
  padding: 12px 14px; border: 1px solid var(--line); border-radius: 14px;
  background: #fbf8f4; cursor: pointer; transition: 0.15s ease;
}
.ffl-row:hover { border-color: #e2d5c4; }
.ffl-row.on { background: #f4faf6; border-color: #cfe7d8; }
.ffl-row > input { width: 17px; height: 17px; margin: 0; accent-color: var(--orange); }
.ffl-copy { display: grid; gap: 3px; min-width: 0; }
.ffl-copy b { font-size: 12.5px; font-weight: 800; color: var(--ink); }
.ffl-copy small { font-size: 10.5px; line-height: 1.85; color: var(--muted); }
.ffl-state {
  flex: 0 0 auto; font-size: 10.5px; font-weight: 800; padding: 5px 11px; border-radius: 999px;
  background: #f0e8de; color: #8b7d6d;
}
.ffl-row.on .ffl-state { background: #d9efe1; color: #2f7a52; }
/* همان کلید، فشرده، برای نوار ابزارِ صفحهٔ خودِ بخش */
.ffl-chip {
  display: inline-flex; align-items: center; gap: 7px; cursor: pointer;
  padding: 7px 12px; border-radius: 999px; border: 1px solid var(--line);
  background: #f7f1e9; color: #8b7d6d; font-size: 11.5px; font-weight: 800;
}
.ffl-chip.on { background: #e7f5ec; border-color: #cfe7d8; color: #2f7a52; }
.ffl-chip > input { width: 15px; height: 15px; margin: 0; accent-color: var(--orange); }

/* شرط لول جزئی از خودِ نقشهٔ منابع است: دو ورودیِ ثابت در انتهای هر ردیف و
   کلید/راهنمای فشرده در سرِ همان درخت؛ دیگر کارت و جدول موازی نداریم. */
.slg-inline-tools {
  margin: -10px -10px 8px;
  border-bottom: 1px solid #ece6dd;
  background: #fffaf6;
}
.slg-inline-main {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 54px;
  padding: 8px 12px;
}
.slg-switch { display: flex; align-items: center; gap: 8px; flex: 0 0 auto; cursor: pointer; }
.slg-switch > input { width: 16px; height: 16px; margin: 0; accent-color: var(--orange); }
.slg-switch > span { display: grid; gap: 1px; }
.slg-switch b { font-size: 11px; font-weight: 800; color: var(--ink); }
.slg-switch small { font-size: 9px; color: var(--muted); }
.slg-inline-main > p { flex: 1; margin: 0; font-size: 9.5px; line-height: 1.8; color: var(--muted); }
.slg-inline-main > .stx-tool { flex: 0 0 auto; }
.slg-column-head {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 5px 9px 6px;
  border-top: 1px solid #f2e9df;
  color: #918578;
  font-size: 9px;
  font-weight: 750;
}
.slg-column-head > span:first-child { padding-inline-start: 23px; }
.slg-fields {
  display: grid;
  grid-template-columns: repeat(2, 76px);
  gap: 6px;
  flex: 0 0 auto;
}
.slg-column-head > .slg-fields { margin-inline-start: auto; }
.slg-column-head .slg-fields b { text-align: center; font-size: 9px; font-weight: 750; }
.stx-row-source > .slg-fields,
.stx-row-source-type > .slg-fields { margin-inline-start: 0; }
.slg-fields input {
  box-sizing: border-box;
  width: 76px;
  height: 28px;
  padding: 3px 6px;
  border: 1px solid #ded6ca;
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  font: inherit;
  font-size: 10.5px;
  text-align: center;
  user-select: text;
}
.slg-fields input:hover { border-color: #cfc3b6; }
.slg-fields input:focus { outline: none; border-color: var(--orange); box-shadow: 0 0 0 3px rgba(255, 107, 24, .1); }
.slg-fields.is-set input { border-color: #edbd99; background: #fff8f0; }
.stx-row-source:has(> .slg-fields.is-set) > .stx-lbl,
.stx-row-source-type:has(> .slg-fields.is-set) > .stx-lbl { color: #b45118; }

@media (max-width: 720px) {
  .slg-inline-main { align-items: flex-start; flex-wrap: wrap; gap: 7px 10px; }
  .slg-inline-main > p { order: 3; flex-basis: 100%; }
  .slg-inline-main > .stx-tool { margin-inline-start: auto; }
  .slg-fields { grid-template-columns: repeat(2, 62px); }
  .slg-fields input { width: 62px; }
  .stx-row-source:has(> .slg-fields),
  .stx-row-source-type:has(> .slg-fields) { flex-wrap: wrap; }
  .stx-row-source > .slg-fields,
  .stx-row-source-type > .slg-fields { width: 100%; justify-content: end; }
}
.shop-lock h2 { margin: 0; font-size: 17px; font-weight: 900; }
.shop-lock p { margin: 0; max-width: 56ch; font-size: 12.5px; line-height: 2; color: var(--muted); }
.shop-lock-cap, .shop-lock-expired { display: flex; align-items: center; gap: 6px; font-weight: 700; }
.shop-lock-cap { color: var(--orange); }
.shop-lock-expired { color: var(--yellow); }
.shop-lock-cap .ui-icon, .shop-lock-expired .ui-icon { width: 15px; height: 15px; }
.shop-lock-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 6px; }


/* ═══════════════════════ پنل مدیر: فروشگاه و اشتراک ═══════════════════════ */
.sx-tabs { display: flex; flex-wrap: wrap; gap: 6px; padding: 14px 18px 0; border-bottom: 1px solid var(--line); }
.sx-tab {
  display: inline-flex; align-items: center; gap: 7px; padding: 9px 14px;
  border: 1px solid transparent; border-bottom: 0; border-radius: 12px 12px 0 0;
  background: none; color: var(--muted); font: inherit; font-size: 12px; font-weight: 800; cursor: pointer;
  transition: color .15s ease, background .15s ease;
}
.sx-tab .ui-icon { width: 16px; height: 16px; }
.sx-tab b { font-size: 10px; background: var(--panel-soft); border-radius: 999px; padding: 1px 7px; }
.sx-tab:hover { color: var(--ink); }
.sx-tab.on { color: var(--orange); background: var(--orange-soft); border-color: color-mix(in srgb, var(--orange) 22%, var(--line)); }
.sx-tab.on b { background: rgba(255,255,255,.7); }
#shopAdminBody { padding: 18px; }

/* نرخ کاهشی بلک فرایدی در پوستۀ معمول فروشگاهِ مدیر. */
.bf-admin { --stack-gap: var(--space-4); max-inline-size: 60rem; margin-inline: auto; }
.bf-admin-head, .bf-admin-head-actions, .bf-admin-footer, .bf-admin-save-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--space-2);
}
.bf-admin-head, .bf-admin-footer { justify-content: space-between; gap: var(--space-3); }
.bf-admin-head > div:first-child { --stack-gap: var(--space-1); }
.bf-admin-head h2 { font-size: 1.15rem; }
.bf-admin-head p, .bf-admin-form > p { color: var(--muted); font-size: .85rem; }
.bf-admin-policy, .bf-admin-error, .bf-admin-summary {
  padding: var(--space-3) var(--space-4);
  border: 1px solid var(--line);
  border-radius: var(--space-3);
  background: var(--panel-soft);
  line-height: 1.9;
  font-size: .85rem;
}
.bf-admin-policy { --stack-gap: var(--space-1); }
.bf-admin-policy [data-bf-admin-lock] { display: flex; align-items: baseline; gap: var(--space-2); }
.bf-admin-policy .ui-icon { flex: none; inline-size: 16px; block-size: 16px; align-self: center; }
.bf-admin-error { border-color: var(--red); }
.bf-admin-summary { --stack-gap: var(--space-2); }
.bf-admin-summary h3 { font-size: .9rem; margin: 0; }
.bf-admin-form { --stack-gap: var(--space-3); }
.bf-admin-tiers {
  display: grid;
  gap: var(--space-2);
  margin: 0;
  padding: 0;
  list-style: none;
  min-inline-size: 0;
}
.bf-admin-tier {
  display: grid;
  grid-template-columns: minmax(4.75rem, .65fr) minmax(0, 1.5fr) minmax(8rem, 1fr);
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3);
  border: 1px solid var(--line);
  border-radius: var(--space-3);
  background: var(--panel);
  min-inline-size: 0;
}
.bf-admin-form .bf-admin-tier { grid-template-columns: minmax(4.75rem, .65fr) minmax(0, 2fr) minmax(8rem, 1fr) 44px; }
.bf-admin-tier h3, .bf-admin-band-description p, .bf-admin-band-counts, .bf-admin-band-counts dd,
.bf-admin-summary-values, .bf-admin-summary-values dd { margin: 0; }
.bf-admin-tier h3 { font-size: .9rem; }
.bf-admin-band-description { font-size: .85rem; line-height: 1.6; }
.bf-admin-band-description .muted, .bf-admin-band-counts dt, .bf-admin-summary-values dt {
  color: var(--muted);
  font-size: .78rem;
}
.bf-admin-tier-inputs, .bf-admin-band-counts, .bf-admin-summary-values {
  display: grid;
  gap: var(--space-2);
  min-inline-size: 0;
}
.bf-admin-tier-inputs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.bf-admin-band-counts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.bf-admin-summary-values { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.bf-admin-summary-registered { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.bf-admin-summary-values > div, .bf-admin-band-counts > div {
  min-inline-size: 0;
  border-inline-start: 1px solid var(--line);
  padding-inline-start: var(--space-2);
}
.bf-admin-summary-values dd, .bf-admin-band-counts dd { font-weight: 800; font-variant-numeric: tabular-nums; }
.bf-admin-summary-values dd { font-size: 1.08rem; }
.bf-admin-band-counts dd { font-size: .91rem; }
.bf-admin-rate-inputs { max-inline-size: 32rem; }
.bf-admin-tier-inputs > label { display: grid; min-inline-size: 0; gap: var(--space-1); font-size: .8rem; }
.bf-admin-field { display: flex; align-items: center; gap: var(--space-1); }
.bf-admin-field > span { color: var(--muted); flex: none; }
.bf-admin-tier-inputs input {
  inline-size: 100%;
  min-inline-size: 0;
  min-block-size: 44px;
  padding: var(--space-2);
  border: 1px solid var(--line);
  border-radius: var(--space-2);
  background: var(--panel-soft);
  color: var(--ink);
  text-align: center;
  font: inherit;
  font-variant-numeric: tabular-nums;
}
.bf-admin-tier-inputs [aria-invalid="true"] { border-color: var(--red); }
.bf-admin-tier-inputs input[readonly] { background: var(--panel); }
.bf-admin button { min-block-size: 44px; }
.bf-admin-remove { inline-size: 44px; padding: var(--space-2); align-self: end; justify-content: center; }
.bf-admin :is(input, button):focus-visible { outline: 2px solid var(--orange); outline-offset: 2px; }
@media (max-width: 840px) {
  .bf-admin-tier, .bf-admin-form .bf-admin-tier { grid-template-columns: minmax(0, 1fr) auto; gap: var(--space-2); }
  .bf-admin-tier > div { grid-column: 1 / -1; }
  .bf-admin-tier h3 { grid-row: 1; }
  .bf-admin-remove { grid-column: 2; grid-row: 1; }
  .bf-admin-head-actions .badge { white-space: normal; }
}
@media (max-width: 500px) {
  .bf-admin-summary-registered { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 380px) {
  .bf-admin-footer > *, .bf-admin-save-actions > * { inline-size: 100%; }
  .bf-admin-summary-values > div, .bf-admin-band-counts > div { padding-inline-start: var(--space-1); }
}

.shop-admin-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; margin-top: 14px; }
.shop-admin-card {
  display: grid; gap: 11px; padding: 15px; border: 1px solid var(--line); border-radius: 15px;
  background: var(--panel); border-inline-start: 3px solid var(--shop-accent);
}
.shop-admin-card.off { opacity: .58; }
.shop-admin-card header { display: flex; align-items: flex-start; gap: 10px; }
.shop-admin-card header div { flex: 1; min-width: 0; }
.shop-admin-card h4 { margin: 0 0 3px; font-size: 13px; font-weight: 900; }
.shop-admin-card header small { font-size: 10.5px; color: var(--muted); }
.shop-admin-scope { display: flex; flex-wrap: wrap; gap: 5px; }
.shop-admin-prices { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; padding: 10px 0; border-block: 1px solid var(--line); }
.shop-admin-prices span { display: grid; gap: 2px; text-align: center; }
.shop-admin-prices small { font-size: 9.5px; color: var(--muted); }
.shop-admin-prices b { font-size: 12px; font-weight: 900; }
.shop-admin-card footer { display: flex; align-items: center; gap: 7px; }
.shop-admin-card footer .secondary-button, .shop-admin-card footer .ghost-button { font-size: 11px; padding: 6px 10px; }
.shop-admin-card footer .row-action { margin-inline-start: auto; }

/* ویرایشگر محصول */
.shop-editor { display: grid; gap: 16px; }
.shop-editor-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 12px; }
.shop-editor-block { display: grid; gap: 11px; padding: 15px; border: 1px solid var(--line); border-radius: 14px; background: var(--panel-soft); }
.shop-editor-block > h3 { display: flex; align-items: center; gap: 7px; margin: 0; font-size: 12.5px; font-weight: 900; }
.shop-editor-block > h3 .ui-icon { width: 16px; height: 16px; color: var(--orange); }
.shop-editor-hint { margin: 0; font-size: 11px; line-height: 1.9; color: var(--muted); }
.shop-editor-axis { display: grid; gap: 7px; }
.shop-editor-axis label { display: flex; align-items: baseline; gap: 8px; font-size: 11.5px; font-weight: 800; }
.shop-editor-axis label small { font-weight: 600; color: var(--muted); }
.shop-editor-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.shop-chip-toggle {
  border: 1px solid var(--line); background: var(--panel); color: var(--ink);
  border-radius: 9px; padding: 5px 10px; font: inherit; font-size: 11px; font-weight: 700; cursor: pointer;
  transition: border-color .15s ease, background .15s ease, color .15s ease;
}
.shop-chip-toggle:hover { border-color: var(--blue); }
.shop-chip-toggle.on { background: var(--teal); border-color: var(--teal); color: #fff; }
.shop-editor-icons { display: flex; flex-wrap: wrap; gap: 6px; }
.shop-icon-pick {
  display: grid; place-items: center; width: 38px; height: 38px; border-radius: 11px;
  border: 1px solid var(--line); background: var(--panel); color: var(--muted); cursor: pointer;
}
.shop-icon-pick svg { width: 20px; height: 20px; }
.shop-icon-pick.on { border-color: var(--orange); color: var(--orange); background: var(--orange-soft); }
.shop-editor-colors { display: flex; flex-wrap: wrap; gap: 6px; }
.shop-color-pick {
  width: 30px; height: 30px; border-radius: 10px; cursor: pointer;
  border: 2px solid transparent; background: var(--shop-accent); box-shadow: inset 0 1px 0 rgba(255,255,255,.3);
}
.shop-color-pick.on { border-color: var(--ink); }
.shop-editor-image { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; }
.shop-editor-image input { flex: 1; min-width: 180px; }
.shop-editor-preview { flex: none; }
.shop-editor-mode { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 9px; }
.shop-radio { display: flex; align-items: flex-start; gap: 8px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--panel); cursor: pointer; }
.shop-radio span { display: grid; gap: 2px; font-size: 12px; font-weight: 800; }
.shop-radio small { font-weight: 600; font-size: 10.5px; color: var(--muted); }
.shop-radio:has(input:checked) { border-color: var(--orange); background: var(--orange-soft); }
.shop-price-input { width: 100%; max-width: 118px; }
.shop-editor-monthly { display: block; font-size: 9.5px; color: var(--muted); }
/* `.data-table` سراسری min-width: 850px دارد (برای جدول‌های مدیریتیِ پرستون)؛
   جدول کوچکِ داخل پاپ‌آپ نباید آن را به ارث ببرد و افقی اسکرول شود. */
.shop-editor-table { min-width: 0; width: 100%; }
.shop-editor-table td { vertical-align: middle; }
.shop-price-table { min-width: 0; width: 100%; }
.shop-editor-list { display: grid; gap: 8px; }
.shop-editor-row { display: flex; align-items: center; gap: 7px; }
.shop-editor-row input { flex: 1; }
.shop-editor-feature { display: grid; grid-template-columns: 130px minmax(0, 1fr) minmax(0, 1.4fr) auto; gap: 7px; align-items: center; }
.shop-editor-faq { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 7px; align-items: start; }
.shop-editor-faq textarea { grid-column: 1; }
.shop-editor-faq .row-action { grid-row: 1 / span 2; }
.shop-switch { display: flex; align-items: center; gap: 9px; font-size: 12px; font-weight: 700; cursor: pointer; }
.shop-switch input { width: 16px; height: 16px; accent-color: var(--teal); }
.shop-confirm-text { margin: 0; font-size: 13px; line-height: 2; }

/* تب قیمت‌گذاری */
/* آیتم‌های grid پیش‌فرض min-width:auto دارند؛ جدولِ پیش‌نمایشِ تورم (که
   min-width سراسریِ ۸۵۰ را از `.data-table` می‌گیرد) کلِ ستون را کش می‌آورد و
   نردبان تخفیف از پنل بیرون می‌زد. */
.shop-pricing { display: grid; gap: 16px; min-width: 0; }
.shop-pricing > *, .shop-pricing-block > * { min-width: 0; }
.shop-pricing-block { display: grid; gap: 11px; padding: 16px; border: 1px solid var(--line); border-radius: 15px; background: var(--panel-soft); min-width: 0; }
#shopInflationPreviewBox .table-wrap { overflow-x: auto; }
.shop-pricing-block h3 { display: flex; align-items: center; gap: 7px; margin: 0; font-size: 13px; font-weight: 900; }
.shop-pricing-block h3 .ui-icon { width: 17px; height: 17px; color: var(--orange); }
.shop-pricing-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; }
.shop-ladder { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 10px; }
.shop-ladder-cell { display: grid; gap: 5px; padding: 11px; border: 1px solid var(--line); border-radius: 12px; background: var(--panel); }
.shop-ladder-cell span { font-size: 12px; font-weight: 900; }
.shop-ladder-cell small { font-size: 9.5px; color: var(--muted); }
.shop-ladder-cell input { width: 100%; }
.shop-inflation-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.shop-inflation-row input { width: 110px; }
.shop-inflation-row span { font-size: 12px; font-weight: 700; color: var(--muted); }
.shop-inflation-log { margin-top: 6px; }
.shop-inflation-log h4 { margin: 0 0 6px; font-size: 11px; font-weight: 800; color: var(--muted); }
.shop-pricing-actions { display: flex; justify-content: flex-end; }

/* تب اشتراک و سفارش */
.shop-subs-head { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 12px; }
.shop-subs-head .question-code-search { flex: 1; min-width: 210px; }
.shop-row-actions { display: flex; align-items: center; gap: 4px; }
.shop-order-cell { display: grid; gap: 3px; font-size: 11px; }
.shop-refid { display: block; font-size: 9.5px; color: var(--muted); }
/* مودالِ اعطای اشتراک: `.modal-body` خودش فاصلهٔ عمودی ندارد و برچسبِ هر
   فیلد به کادرِ بالایی می‌چسبید. */
.shop-grant { display: grid; gap: 16px; }
.shop-grant .field label { font-size: 12px; font-weight: 800; }
.shop-grant .field label small { font-size: 11px; font-weight: 700; color: var(--muted); }
.shop-grant-products { display: grid; gap: 8px; max-height: 300px; overflow-y: auto; padding: 3px; margin: -3px; }
.shop-grant-product { display: flex; align-items: center; gap: 12px; width: 100%; padding: 9px 12px; border: 1px solid var(--line); border-radius: 14px; background: #fff; font: inherit; color: inherit; text-align: start; cursor: pointer; transition: border-color .15s, background .15s, box-shadow .15s; }
.shop-grant-product:hover { border-color: rgba(242, 162, 93, 0.6); }
.shop-grant-product.on { border-color: var(--orange); background: #fff8f1; box-shadow: 0 0 0 3px rgba(255, 122, 26, 0.12); }
.shop-grant-check { flex: none; display: grid; place-items: center; width: 22px; height: 22px; border: 1.5px solid var(--line); border-radius: 50%; color: transparent; }
.shop-grant-check svg { width: 13px; height: 13px; }
.shop-grant-product.on .shop-grant-check { border-color: var(--orange); background: var(--orange); color: #fff; }
.shop-grant-empty { margin: 0; padding: 14px; border: 1px dashed var(--line); border-radius: 12px; font-size: 11px; line-height: 1.8; color: var(--muted); text-align: center; }
.shop-grant-durations { display: grid; grid-template-columns: repeat(auto-fit, minmax(78px, 1fr)); gap: 8px; }
.shop-grant-durations button { display: grid; justify-items: center; gap: 2px; padding: 8px 6px; border: 1px solid var(--line); border-radius: 12px; background: #fff; font: inherit; color: inherit; cursor: pointer; }
.shop-grant-durations b { font-size: 12px; font-weight: 800; }
.shop-grant-durations small { min-height: 1.6em; font-size: 10px; color: var(--muted); }
.shop-grant-durations button.on { border-color: var(--orange); background: #fff8f1; color: #a65c1f; box-shadow: 0 0 0 3px rgba(255, 122, 26, 0.12); }
.shop-grant-hint { margin: -8px 0 0; font-size: 10.5px; line-height: 1.8; color: var(--muted); }

/* ── ویرایشِ اشتراک (فعال‌سازیِ دوباره + تاریخ‌های شمسی) ── */
.modal.shop-subedit-modal { width: min(620px, calc(100vw - 32px)); }
.shop-subedit { display: grid; gap: 14px; }
.shop-sub-date { white-space: nowrap; font-variant-numeric: tabular-nums; }
.row-action.shop-sub-restore { color: #168878; }
.row-action.shop-sub-restore:hover { background: var(--teal-soft); }
.row-action.shop-sub-upgrade { color: #2f6df6; }
.row-action.shop-sub-upgrade:hover { background: #edf3ff; }

/* ارتقای مدت با پرداخت مابه‌التفاوت */
.modal.shop-subupgrade-modal { width: min(590px, calc(100vw - 32px)); }
.shop-subupgrade { display: grid; gap: 16px; }
.shop-upgrade-quote { display: grid; gap: 12px; }
.shop-upgrade-dates { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.shop-upgrade-dates > span { display: grid; gap: 4px; padding: 11px 13px; border: 1px solid var(--line); border-radius: 12px; background: var(--panel-soft); }
.shop-upgrade-dates small { font-size: 10.5px; color: var(--muted); }
.shop-upgrade-dates b { font-size: 13px; font-weight: 850; }
.shop-upgrade-amounts { display: grid; gap: 9px; margin: 0; padding: 14px; border: 1px solid var(--line); border-radius: 14px; }
.shop-upgrade-amounts > div { display: flex; align-items: center; justify-content: space-between; gap: 12px; font-size: 12px; }
.shop-upgrade-amounts dt { color: var(--muted); }
.shop-upgrade-amounts dd { margin: 0; font-weight: 800; }
.shop-upgrade-amounts .shop-upgrade-total { padding-top: 11px; border-top: 1px solid var(--line); font-size: 14px; }
.shop-upgrade-total dt, .shop-upgrade-total dd { color: var(--ink); font-weight: 900; }
.shop-upgrade-note, .shop-upgrade-loading, .shop-upgrade-error { margin: 0; font-size: 12px; line-height: 1.9; color: var(--muted); }
.shop-upgrade-error { color: var(--red); }
.shop-upgrade-result { display: grid; gap: 8px; padding: 13px; border: 1px solid #bfe8e0; border-radius: 14px; background: var(--teal-soft); }
.shop-upgrade-result[hidden] { display: none; }
.shop-upgrade-result > label { font-size: 12px; font-weight: 850; color: #11695d; }
.shop-upgrade-link { display: flex; gap: 8px; align-items: center; }
.shop-upgrade-link input { min-width: 0; width: 100%; padding: 9px 10px; border: 1px solid var(--line); border-radius: 9px; background: #fff; font: inherit; font-size: 12px; }
.shop-upgrade-link button { flex: none; }
.shop-upgrade-cancel { justify-self: start; color: var(--red); }
.shop-upgrade-success { display: flex; gap: 8px; align-items: center; margin: 0; color: #11695d; font-size: 13px; font-weight: 850; }
.shop-upgrade-success svg { width: 18px; height: 18px; }

.modal.shop-account-conversion-modal { width: min(760px, calc(100vw - 32px)); }
.shop-account-conversion { min-width: 0; }
.shop-conversion-intro { margin: 0; font-size: 12px; line-height: 1.9; color: var(--muted); }
.shop-account-conversion #shopConversionSelected { margin-top: 8px; }
.shop-account-conversion #shopConversionSelected[hidden] { display: none; }
.shop-account-conversion #shopConversionRole { width: 100%; }
.shop-conversion-items, .shop-conversion-quote, .shop-conversion-quote-items { display: grid; gap: 12px; min-width: 0; }
.shop-conversion-item { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: center; gap: 14px; padding: 14px; border: 1px solid var(--line); border-radius: 14px; background: #fff; }
.shop-conversion-check { display: flex; align-items: flex-start; gap: 9px; cursor: pointer; min-width: 0; }
.shop-conversion-check input { flex: none; width: 17px; height: 17px; margin-top: 3px; accent-color: var(--orange); }
.shop-conversion-check > span { display: grid; gap: 5px; min-width: 0; }
.shop-conversion-check b { font-size: 12px; line-height: 1.8; overflow-wrap: anywhere; }
.shop-conversion-check small { color: var(--muted); font-size: 10.5px; line-height: 1.8; }
.shop-conversion-destination { display: grid; gap: 6px; min-width: 0; margin: 0; }
.shop-conversion-destination > span { font-size: 10.5px; color: var(--muted); }
.shop-conversion-destination select { width: 100%; min-width: 0; }
.shop-conversion-item.is-ineligible { background: var(--panel-soft); }
.shop-conversion-item.is-ineligible .shop-conversion-check { cursor: default; }
.shop-conversion-ineligible { margin: 0; color: var(--muted); font-size: 11px; line-height: 1.9; }
.shop-conversion-role-summary { display: flex; align-items: center; justify-content: center; gap: 14px; padding: 12px; background: var(--orange-soft, #fff3e8); border-radius: 12px; font-size: 12px; }
.shop-conversion-role-summary svg { width: 18px; height: 18px; }
.shop-conversion-quote-item { display: grid; gap: 10px; padding: 14px; border: 1px solid var(--line); border-radius: 14px; }
.shop-conversion-quote-item h4 { margin: 0; font-size: 12px; line-height: 1.9; overflow-wrap: anywhere; }
.shop-conversion-total { background: var(--teal-soft); border-color: #bfe8e0; }
.shop-conversion-footer { flex-wrap: wrap; }
.shop-conversion-source { display: grid; gap: 4px; min-width: 0; }
.shop-conversion-source b { font-size: 12px; line-height: 1.8; overflow-wrap: anywhere; }
.shop-conversion-source small { color: var(--muted); font-size: 10.5px; line-height: 1.8; }
.shop-conversion-source small b { font-size: inherit; color: var(--ink); }
.shop-conversion-lines { display: grid; gap: 10px; min-width: 0; }
.shop-conversion-line { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); align-items: center; gap: 8px 14px; padding: 12px 14px; border: 1px solid #f3d3b6; border-radius: 14px; background: #fffaf5; }
.shop-conversion-line-head { display: grid; gap: 3px; min-width: 0; }
.shop-conversion-line-head b { font-size: 12px; line-height: 1.8; overflow-wrap: anywhere; }
.shop-conversion-line-head small { color: var(--muted); font-size: 10.5px; line-height: 1.8; overflow-wrap: anywhere; }
.shop-conversion-line-end { grid-column: 1 / -1; color: var(--muted); font-size: 11px; }
.shop-conversion-line-end b { color: var(--ink); }
.shop-conversion-blocker { padding: 11px 13px; border: 1px solid #f2c4c4; border-radius: 12px; background: #fff5f5; }
.shop-conversion-blocker[hidden] { display: none; }
.shop-conversion-blocker p { display: flex; gap: 8px; align-items: flex-start; }
.shop-conversion-blocker svg { flex: none; width: 16px; height: 16px; margin-top: 3px; }
.shop-conversion-warnings { margin: 0; padding: 10px 28px 10px 12px; border-radius: 12px; background: var(--panel-soft); color: var(--muted); font-size: 11px; line-height: 1.9; }
@media (max-width: 600px) {
  .shop-conversion-item { grid-template-columns: 1fr; gap: 10px; }
  .shop-conversion-line { grid-template-columns: 1fr; }
  .shop-conversion-quote-item { padding: 11px; }
  .shop-conversion-footer > .primary-button, .shop-conversion-footer > .secondary-button { flex: 1 1 100%; justify-content: center; }
  .shop-account-conversion .shop-upgrade-dates { grid-template-columns: 1fr; }
  .shop-account-conversion .shop-upgrade-amounts > div { align-items: flex-start; }
  .shop-account-conversion .shop-upgrade-amounts dd { text-align: end; }
}
.shop-order-check.is-review { color: #b25b12; background: #fff3df; }
@media (max-width: 460px) {
  .shop-upgrade-dates { grid-template-columns: 1fr; }
  .shop-upgrade-link { flex-direction: column; align-items: stretch; }
}

.sse-hero {
  display: grid; grid-template-columns: auto 1fr; gap: 12px 12px; align-items: center;
  padding: 14px; border: 1px solid #f0dcc6; border-radius: 16px;
  background: linear-gradient(135deg, #fff8f1 0%, #fffdf9 60%, #fff 100%);
}
.sse-avatar {
  width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center;
  background: var(--orange); color: #fff; box-shadow: 0 8px 18px rgba(255, 107, 24, .22);
}
.sse-avatar svg { width: 22px; height: 22px; }
.sse-who { display: grid; gap: 2px; min-width: 0; }
.sse-who strong { font-size: 15px; font-weight: 900; color: var(--ink); }
.sse-who small { font-size: 11.5px; color: var(--muted); }
.sse-facts { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.sse-facts > span {
  display: grid; gap: 3px; align-content: start; padding: 8px 10px; border-radius: 12px;
  background: rgba(255, 255, 255, .8); border: 1px solid var(--line); min-width: 0;
}
.sse-facts small { font-size: 10.5px; color: var(--muted); font-weight: 700; }
.sse-facts b { font-size: 12.5px; font-weight: 850; color: var(--ink); overflow-wrap: anywhere; }
.sse-facts b.badge { justify-self: start; font-size: 11px; }

.sse-banner {
  display: flex; gap: 10px; align-items: flex-start; padding: 11px 13px; border-radius: 14px;
  background: var(--red-soft); color: #a33c3c; border: 1px solid #f5d0d0;
}
.sse-banner.on { background: var(--teal-soft); color: #11695d; border-color: #bfe8e0; }
.sse-banner svg { width: 18px; height: 18px; flex: none; margin-top: 2px; }
.sse-banner p { margin: 0; font-size: 12px; line-height: 1.9; }

.sse-section { display: grid; gap: 9px; }
.sse-section h3 { margin: 0; font-size: 12.5px; font-weight: 900; color: var(--ink); display: flex; gap: 8px; align-items: baseline; }
.sse-section h3 small { font-size: 10.5px; font-weight: 700; color: var(--muted); }
.sse-hint { margin: -2px 0 0; font-size: 10.5px; line-height: 1.8; color: var(--muted); }
.sse-hint.warn { color: #b25b12; }

.sse-seg { display: inline-grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 4px; border-radius: 13px; background: var(--panel-soft); border: 1px solid var(--line); justify-self: start; }
.sse-seg button {
  display: inline-flex; align-items: center; gap: 6px; padding: 7px 16px; border: 0; border-radius: 10px;
  background: transparent; font: inherit; font-size: 12px; font-weight: 800; color: var(--muted); cursor: pointer;
}
.sse-seg button svg { width: 15px; height: 15px; }
.sse-seg button.on { background: #fff; box-shadow: 0 2px 8px rgba(41, 36, 29, .08); }
.sse-seg button.on.ok { color: #168878; }
.sse-seg button.on.bad { color: var(--red); }

.sse-durations { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; }
.sse-durations button {
  display: grid; justify-items: center; gap: 2px; padding: 8px 4px; border: 1px solid var(--line);
  border-radius: 12px; background: #fff; font: inherit; color: inherit; cursor: pointer;
  transition: border-color .14s ease, background .14s ease, transform .14s var(--ease-soft);
}
.sse-durations button:hover { transform: translateY(-1px); border-color: #f0b487; }
.sse-durations b { font-size: 12px; font-weight: 850; }
.sse-durations small { font-size: 10px; color: var(--muted); }
.sse-durations button.on { border-color: var(--orange); background: #fff8f1; color: #a65c1f; box-shadow: 0 0 0 3px rgba(255, 122, 26, .12); }

.sse-dates { display: grid; grid-template-columns: 1fr auto 1fr; gap: 8px; align-items: center; }
.sse-arrow { color: var(--muted); display: grid; place-items: center; }
.sse-arrow svg { width: 16px; height: 16px; }
.sse-date {
  display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: 1px solid var(--line);
  border-radius: 14px; background: #fff; font: inherit; color: inherit; cursor: pointer; text-align: start; min-width: 0;
  transition: border-color .14s ease, box-shadow .14s ease;
}
.sse-date:hover { border-color: #f0b487; }
.sse-date.open { border-color: var(--orange); box-shadow: 0 0 0 3px rgba(255, 122, 26, .12); }
.sse-date-icon { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: var(--orange-soft); color: #c25710; flex: none; }
.sse-date-icon svg { width: 17px; height: 17px; }
.sse-date-text { display: grid; gap: 1px; min-width: 0; flex: 1; }
.sse-date-text small { font-size: 10.5px; color: var(--muted); font-weight: 700; }
.sse-date-text b { font-size: 14px; font-weight: 900; color: var(--ink); font-variant-numeric: tabular-nums; }
.sse-date-text em { font-style: normal; font-size: 10.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sse-date-caret { width: 14px; height: 14px; color: var(--muted); flex: none; }

.sse-cal {
  border: 1px solid #f0d3b4; border-radius: 15px; background: #fffdf9;
  box-shadow: 0 14px 30px rgba(65, 47, 29, .10); padding: 10px;
}
.sse-cal-title { display: flex; gap: 6px; }
.sse-cal-title select {
  width: auto; min-height: 32px; padding: 4px 10px; border: 1px solid var(--line); border-radius: 10px;
  background: #fff; font: inherit; font-size: 12.5px; font-weight: 850; color: var(--ink);
}
.sse-cal .audit-cal-cell.inrange { background: var(--orange-soft); border-color: #f6d3b6; color: #c25710; }
.sse-cal .audit-cal-cell.sse-anchor { border-color: var(--orange); color: #c25710; }
.sse-cal-foot { display: flex; align-items: center; gap: 8px; margin-top: 8px; flex-wrap: wrap; }
.sse-cal-foot .ghost-button { min-height: 30px; padding: 4px 12px; font-size: 11.5px; }
.sse-cal-foot span { margin-inline-start: auto; font-size: 10.5px; color: var(--muted); }

.sse-timeline { display: grid; gap: 7px; padding: 10px 12px; border-radius: 13px; background: var(--panel-soft); border: 1px solid var(--line); }
.sse-timeline-open span { font-size: 11.5px; color: var(--muted); }
.sse-bar { position: relative; height: 8px; border-radius: 99px; background: #ece7de; overflow: visible; }
.sse-bar i { position: absolute; inset-block: 0; inset-inline-start: 0; border-radius: 99px; background: linear-gradient(90deg, #ffb27a, var(--orange)); }
.sse-timeline.ended .sse-bar i { background: #c9c3b8; }
.sse-now {
  position: absolute; top: 50%; width: 14px; height: 14px; border-radius: 50%; background: #fff;
  border: 3px solid var(--orange); transform: translate(50%, -50%); box-shadow: 0 2px 6px rgba(0, 0, 0, .12);
}
.sse-timeline-meta { display: flex; justify-content: space-between; gap: 8px; flex-wrap: wrap; font-size: 11px; color: var(--muted); }
.sse-timeline-meta b { color: var(--ink); font-weight: 850; }
.sse-timeline-meta em { font-style: normal; color: #b25b12; font-weight: 800; }
.sse-left { font-weight: 850; color: #168878; }
.sse-timeline.ended .sse-left { color: var(--red); }
.shop-subedit select#shopSubProduct, .shop-subedit #shopSubNote { width: 100%; }

@media (max-width: 560px) {
  .sse-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sse-durations { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .sse-dates { grid-template-columns: 1fr; }
  .sse-arrow { display: none; }
}
.shop-grant-search { position: relative; }
.shop-grant-search .search-glyph { position: absolute; inset-inline-start: 12px; top: 50%; width: 16px; height: 16px; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
.shop-grant .shop-grant-search input { padding-inline-start: 36px; }
.shop-grant-results { display: grid; gap: 2px; margin-top: 6px; padding: 4px; max-height: 280px; overflow-y: auto; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
.shop-grant-results[hidden], .shop-grant-picked[hidden] { display: none; }
.shop-grant-user { display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px 10px; border: 0; border-radius: 9px; background: transparent; font: inherit; color: inherit; text-align: start; cursor: pointer; }
.shop-grant-user:hover, .shop-grant-user:focus-visible { background: var(--orange-soft, #fff3e8); outline: 0; }
.shop-grant-text { display: grid; gap: 2px; min-width: 0; flex: 1; }
.shop-grant-user strong, .shop-grant-picked strong { font-size: 12.5px; font-weight: 800; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.shop-grant-user small, .shop-grant-picked small { font-size: 10.5px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.shop-grant-more { margin: 0; padding: 10px; font-size: 11px; color: var(--muted); text-align: center; }
.shop-grant-picked { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border: 1px solid rgba(242, 162, 93, 0.45); border-radius: 12px; background: #fff8f1; }
.shop-grant-picked em { font-style: normal; font-size: 10.5px; font-weight: 700; color: #1f7a55; }
.shop-grant-picked .ghost-button { flex: none; min-height: 34px; }
@media (max-width: 480px) { .shop-grant-row { grid-template-columns: 1fr; } }

@media (max-width: 1080px) {
  .shop-detail-hero { grid-template-columns: 110px minmax(0, 1fr); }
  .shop-buybox { grid-column: 1 / -1; position: static; }
}
@media (max-width: 900px) {
  .shop-layout { grid-template-columns: 1fr; }
  .shop-filters { position: static; }
  .shop-hero { grid-template-columns: 1fr; padding: 22px; }
  .shop-hero-art { display: none; }
  .shop-detail-counts { grid-template-columns: repeat(2, 1fr); }
  .shop-editor-feature { grid-template-columns: 1fr auto; }
  .shop-admin-prices { grid-template-columns: repeat(2, 1fr); }
  .store-public .content { padding: 18px 14px 32px; }
  .store-public-bar { padding: 12px 14px; }
}
@media (max-width: 560px) {
  .shop-detail-hero { grid-template-columns: 1fr; }
  .shop-card-stats { grid-template-columns: repeat(3, 1fr); }
  .shop-buybox-durations { grid-template-columns: repeat(2, 1fr); }
}
@media (prefers-reduced-motion: reduce) {
  .shop-card { transition: none; }
  .shop-card:hover { transform: none; }
  .shop-loading .ui-icon { animation: none; }
}

/* ═══════════════════════════════════════════════════════════════════════
   کارت فشردهٔ فروشگاه — پنج مدت در یک ردیف، badge روی خود جلد
   این لایه جای رزرو نوارهای مورب قدیمی را صفر می‌کند و ارتفاع کارت را برای
   نمایش دو ردیف کامل در لپ‌تاپ پایین نگه می‌دارد، بدون کوچک‌کردن hit-area.
   ═══════════════════════════════════════════════════════════════════════ */
.shop-grid { gap: 13px; }
.shop-card {
  gap: 8px;
  height: 100%;
  padding: 14px;
  border-radius: 17px;
}
.shop-card-head {
  align-items: center;
  gap: 10px;
  min-height: 56px;
  padding-inline-end: 0;
}
.shop-card-title h3 {
  margin-bottom: 1px;
  font-size: 13.25px;
  line-height: 1.5;
}
.shop-card-title p {
  -webkit-line-clamp: 1;
  font-size: 9.75px;
  line-height: 1.55;
}
.shop-card-audience {
  margin-bottom: 2px;
  padding: 2px 7px;
  font-size: 8.75px;
  line-height: 1.45;
}

/* جلد و badge تخفیف: badge جزئی از جلد است و هیچ فضایی از متن کارت نمی‌گیرد. */
.shop-cover-wrap {
  position: relative;
  display: block;
  flex: 0 0 auto;
  min-width: 0;
  overflow: visible;
}
.shop-card .shop-cover-wrap {
  width: 54px;
  height: 54px;
}
.shop-card .shop-cover-wrap > .shop-cover,
.shop-card .shop-cover-wrap .shop-cover {
  width: 100%;
  height: 100%;
}
.shop-cover-discount {
  position: absolute;
  top: -5px;
  right: -5px;
  z-index: 5;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 2px;
  min-width: 34px;
  min-height: 21px;
  padding: 2px 6px;
  border: 1px solid rgba(255, 255, 255, .78);
  border-radius: 5px;
  background: #ff6817;
  color: #fff;
  box-shadow: 0 5px 12px rgba(226, 79, 0, .22);
  font-size: 8.75px;
  font-weight: 900;
  line-height: 1;
  pointer-events: none;
  white-space: nowrap;
}
.shop-cover-discount b { font-size: 9.5px; font-weight: 950; line-height: 1; }
.shop-cover-discount small { font-size: 7px; font-weight: 750; line-height: 1; }

.shop-card .shop-card-scope { gap: 3px; }
.shop-card .shop-chip {
  padding: 2px 6px;
  border-radius: 6px;
  font-size: 8.5px;
  line-height: 1.4;
}
.shop-card-stats {
  min-height: 34px;
  padding: 5px 0;
}
.shop-card-stats b { font-size: 11.75px; line-height: 1.25; }
.shop-card-stats small { font-size: 7.75px; line-height: 1.35; }
.shop-card-value {
  min-height: 34px;
  padding: 5px 8px;
  border-radius: 9px;
  font-size: 9px;
  line-height: 1.5;
}
.shop-card-value .ui-icon { width: 14px; height: 14px; }

/* پنج انتخاب ۱/۳/۶/۹/۱۲ در یک ردیف؛ عرض کم می‌شود، سطح لمس نه. */
.shop-plan-grid {
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 4px;
}
.shop-card .shop-plan-picker legend {
  margin-bottom: 4px;
  font-size: 9.25px;
  line-height: 1.45;
}
.shop-card .shop-plan-option {
  min-height: 44px;
  padding: 4px 1px;
  border-radius: 9px;
}
.shop-card .shop-plan-option > span {
  font-size: 9px;
  line-height: 1.2;
}
.shop-card .shop-real-choice { font-size: 6.25px; line-height: 1.15; }
.shop-card .shop-exam-choice {
  grid-template-columns: minmax(0, 1fr) 26px;
  gap: 5px;
  min-height: 44px;
  margin-top: 4px;
  padding: 4px 6px 4px 8px;
  border-radius: 9px;
}
.shop-card .shop-exam-choice > label { gap: 6px; }
.shop-card .shop-exam-choice > label > span { gap: 2px 7px; }
.shop-card .shop-exam-choice b { font-size: 9.5px; }
.shop-card .shop-exam-choice small { font-size: 8px; }
.shop-card .shop-exam-help { width: 24px; height: 24px; }

/* قیمت نهایی و قیمت خط‌خورده یک خط واقعی‌اند؛ container خالی ارتفاع نمی‌گیرد. */
.shop-card-price {
  display: block;
  min-height: 0;
  padding: 0;
}
.shop-card-price:empty { display: none; }
.shop-card-price-line {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 3px 8px;
  min-width: 0;
  min-height: 30px;
}
.shop-card-price-line strong {
  display: inline-flex;
  align-items: baseline;
  gap: 3px;
  color: var(--ink);
  font-size: 18.5px;
  font-weight: 950;
  line-height: 1.3;
  font-variant-numeric: tabular-nums;
  letter-spacing: -.015em;
  white-space: nowrap;
}
.shop-card-price-line strong span {
  color: var(--muted);
  font-size: 8.75px;
  font-weight: 750;
}
.shop-card-price-line del {
  color: var(--muted);
  font-size: 9px;
  line-height: 1.3;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.shop-card .shop-price-caption { margin-bottom: 1px; font-size: 8px; line-height: 1.3; }
.shop-card .shop-price-off { min-height: 17px; padding: 1px 5px; font-size: 7.5px; }

.shop-card-actions {
  grid-template-columns: minmax(0, 1.32fr) minmax(92px, .68fr);
  gap: 6px;
  margin-top: auto;
}
.shop-card-actions .primary-button,
.shop-card-actions .ghost-button {
  min-height: 44px;
  padding-inline: 8px;
  border-radius: 10px;
  font-size: 9.75px;
}

/* جزئیات هم از همان wrapper و badge استفاده می‌کند؛ دیگر clipping مورب لازم نیست. */
.shop-detail-main { overflow: visible; }
.shop-detail-summary { padding-inline-end: 0; }
.shop-detail-media {
  overflow: visible;
  border-radius: 18px;
}
.shop-detail-media .shop-cover-wrap {
  width: 136px;
  height: 136px;
}
.shop-detail-media .shop-cover-wrap > .shop-cover,
.shop-detail-media .shop-cover-wrap .shop-cover {
  width: 100%;
  height: 100%;
}
.shop-detail-media .shop-cover-discount {
  top: -7px;
  right: -7px;
  min-width: 42px;
  min-height: 25px;
  padding-inline: 7px;
  font-size: 10px;
}
.shop-detail-media .shop-cover-discount b { font-size: 10.5px; }
.shop-buybox .shop-plan-option { min-height: 48px; padding-inline: 1px; }
.shop-buybox .shop-plan-option > span { font-size: 9.5px; }

@media (max-width: 1440px) {
  .shop-grid { gap: 11px; }
  .shop-card { gap: 7px; padding: 13px; }
  .shop-card-head { min-height: 54px; }
  .shop-card .shop-cover-wrap { width: 52px; height: 52px; }
  .shop-card-title h3 { font-size: 12.75px; }
  .shop-card .shop-plan-option { min-height: 44px; }
  .shop-card-actions .primary-button,
  .shop-card-actions .ghost-button { min-height: 44px; }
}

@media (max-width: 1024px) {
  .shop-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .shop-card { padding: 14px; }
  .shop-card-title h3 { font-size: 13.25px; }
  .shop-card .shop-cover-wrap { width: 54px; height: 54px; }
  .shop-plan-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); }
}

@media (max-width: 720px) {
  .shop-grid { grid-template-columns: minmax(0, 1fr); gap: 10px; }
  .shop-card { gap: 7px; padding: 13px; }
  .shop-card-head { min-height: 54px; padding-inline-end: 0; }
  .shop-plan-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 4px; }
  .shop-plan-option,
  .shop-card .shop-plan-option,
  .shop-buybox .shop-plan-option { min-height: 44px; }
  .shop-detail-media .shop-cover-wrap { width: 108px; height: 108px; }
  .shop-card-actions .primary-button,
  .shop-card-actions .ghost-button { min-height: 44px; }
}

@media (max-width: 390px) {
  .store-public .content { padding-inline: 9px; }
  .shop-card { gap: 6px; padding: 11px; }
  .shop-card-head { gap: 8px; min-height: 50px; }
  .shop-card .shop-cover-wrap { width: 49px; height: 49px; }
  .shop-cover-discount {
    top: -4px;
    right: -4px;
    min-width: 31px;
    min-height: 19px;
    padding-inline: 5px;
    font-size: 8px;
  }
  .shop-card-title h3 { font-size: 12px; }
  .shop-card-title p { font-size: 9px; }
  .shop-card .shop-card-scope { gap: 2px; }
  .shop-card .shop-chip { padding-inline: 5px; font-size: 8px; }
  .shop-plan-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 3px; }
  .shop-card .shop-plan-option,
  .shop-buybox .shop-plan-option {
    min-width: 0;
    min-height: 44px;
    padding-inline: 0;
  }
  .shop-card .shop-plan-option > span,
  .shop-buybox .shop-plan-option > span { font-size: 8.25px; }
  .shop-card-price-line { gap: 2px 6px; min-height: 28px; }
  .shop-card-price-line strong { font-size: 17px; }
  .shop-card-actions { grid-template-columns: minmax(0, 1.2fr) minmax(86px, .8fr); gap: 5px; }
  .shop-card-actions .primary-button,
  .shop-card-actions .ghost-button { min-height: 44px; padding-inline: 5px; font-size: 9px; }
}

/* همان زبان بصری در مدیریت فروشگاه: آمار واقعی و تنظیم تاریخ کنکور خوانا می‌ماند. */
.shop-admin-stats {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 20px;
}
.shop-admin-stats .stat-card {
  min-width: 0;
  padding: 15px 16px;
  border-color: color-mix(in srgb, var(--line) 82%, #bdc7d8);
  border-radius: 16px;
  background: var(--panel);
  box-shadow: 0 8px 22px rgba(24, 36, 60, .045);
}
.shop-admin-stats .stat-copy { min-width: 0; }
.shop-admin-stats .stat-copy small { white-space: normal; }
.shop-admin-stats .stat-copy strong { font-variant-numeric: tabular-nums; }
.shop-exam-admin {
  border-color: color-mix(in srgb, var(--yellow) 25%, var(--line));
  background:
    radial-gradient(circle at 4% 0, rgba(217, 165, 43, .08), transparent 18rem),
    var(--panel-soft);
}
.shop-exam-admin .shop-switch {
  width: fit-content;
  min-height: 38px;
  padding: 7px 11px;
  border: 1px solid color-mix(in srgb, var(--yellow) 25%, var(--line));
  border-radius: 11px;
  background: var(--panel);
}
.shop-exam-admin-note {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 13px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel);
}
.shop-exam-admin-note > .ui-icon { flex: none; width: 19px; height: 19px; margin-top: 1px; }
.shop-exam-admin-note > div { display: grid; gap: 3px; min-width: 0; }
.shop-exam-admin-note b { font-size: 11.5px; }
.shop-exam-admin-note small { color: var(--muted); font-size: 10.5px; line-height: 1.8; }
.shop-exam-admin-note.estimated { border-color: color-mix(in srgb, var(--yellow) 30%, var(--line)); background: var(--yellow-soft); }
.shop-exam-admin-note.estimated > .ui-icon { color: #a87500; }
.shop-exam-admin-note.official { border-color: color-mix(in srgb, var(--teal) 27%, var(--line)); background: var(--teal-soft); }
.shop-exam-admin-note.official > .ui-icon { color: var(--teal); }
.shop-real-sales-admin {
  border-color: color-mix(in srgb, var(--teal) 20%, var(--line));
  background: color-mix(in srgb, var(--teal-soft) 30%, var(--panel-soft));
}
.shop-mix-grid { grid-template-columns: repeat(5, minmax(110px, 1fr)); }
.shop-mix-grid .shop-ladder-cell { align-content: start; }
.shop-mix-grid .shop-ladder-cell b { font-size: 12px; font-variant-numeric: tabular-nums; }

@media (max-width: 900px) {
  .shop-admin-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .shop-mix-grid { grid-template-columns: repeat(3, minmax(110px, 1fr)); }
}
@media (max-width: 520px) {
  .shop-admin-stats { grid-template-columns: minmax(0, 1fr); }
  .shop-mix-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .shop-exam-admin-note { padding: 11px; }
}

.shop-discount-pill {
  display: inline-flex; align-items: baseline; gap: 5px; padding: 5px 11px; border-radius: 999px;
  background: linear-gradient(135deg, var(--orange), #ff8f4d); color: #fff;
  box-shadow: 0 6px 16px rgba(255, 107, 24, .3);
}
.shop-discount-pill b { font-size: 13px; font-weight: 900; }
.shop-discount-pill small { font-size: 10px; font-weight: 700; opacity: .92; }
.shop-detail-media { display: grid; justify-items: center; gap: 10px; }

/* ═══════════════════════════════════════════════════════════════════════
   فروشگاه اشتراک — بازطراحی پریمیوم ۱۴۰۵
   این بلوک عمداً در انتهای فایل قرار گرفته است: DOM جدید فروشگاه را بدون
   دست‌زدن به پوسته و کامپوننت‌های قدیمی، با یک لایهٔ override ایزوله می‌سازد.
   ═══════════════════════════════════════════════════════════════════════ */
.shop-page {
  --shop-navy: #18243c;
  --shop-navy-2: #263b62;
  --shop-surface: var(--panel);
  --shop-soft: color-mix(in srgb, var(--panel-soft) 88%, #f2f5fb);
  --shop-border: color-mix(in srgb, var(--line) 82%, #b9c3d5);
  --shop-shadow-sm: 0 8px 24px rgba(24, 36, 60, .055);
  --shop-shadow-lg: 0 22px 64px rgba(24, 36, 60, .11);
  direction: rtl;
  text-align: right;
  display: grid;
  gap: 26px;
  min-width: 0;
}
.shop-page > * { min-width: 0; }

/* پوستهٔ عمومی فروشگاه */
.store-public {
  background:
    radial-gradient(circle at 86% 1%, rgba(70, 118, 232, .08), transparent 31rem),
    var(--bg);
}
.store-public-bar {
  position: sticky;
  inset-block-start: 0;
  z-index: 40;
  min-height: 68px;
  padding: 12px max(24px, calc((100vw - 1400px) / 2));
  border-bottom-color: color-mix(in srgb, var(--line) 78%, transparent);
  background: color-mix(in srgb, var(--panel) 88%, transparent);
  box-shadow: 0 1px 0 rgba(24, 36, 60, .025);
  backdrop-filter: blur(18px) saturate(1.15);
  -webkit-backdrop-filter: blur(18px) saturate(1.15);
}
.store-public-brand .brand-mark {
  border-radius: 0;
  background: none;
}
.store-public-actions .primary-button { min-height: 42px; }
.store-public .content {
  width: 100%;
  max-width: 1440px;
  padding: 28px 24px 54px;
}
.store-public-foot { background: color-mix(in srgb, var(--panel) 70%, transparent); }

/* قهرمان صفحه: تیره، خلوت و مطمئن */
.shop-hero {
  isolation: isolate;
  min-height: 264px;
  grid-template-columns: minmax(0, 1fr) minmax(220px, 300px);
  gap: 44px;
  padding: 40px 46px;
  border: 1px solid rgba(255, 255, 255, .09);
  border-radius: 26px;
  background:
    linear-gradient(118deg, rgba(255, 255, 255, .025), transparent 46%),
    linear-gradient(128deg, #131e34 0%, #1d2d4d 58%, #304b77 100%);
  color: #fff;
  box-shadow: 0 24px 60px rgba(24, 36, 60, .18);
}
.shop-hero::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: -60% auto auto -10%;
  width: 520px;
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 126, 51, .18), transparent 67%);
  pointer-events: none;
}
.shop-hero-copy { position: relative; z-index: 2; }
.shop-hero .eyebrow {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 3px 11px;
  border: 1px solid rgba(255, 184, 128, .2);
  border-radius: 999px;
  background: rgba(255, 127, 48, .1);
  color: #ffc49f;
  font-size: 10.5px;
  font-weight: 800;
}
.shop-hero h1 {
  max-width: 18ch;
  margin: 12px 0 10px;
  font-size: clamp(27px, 3vw, 39px);
  font-weight: 950;
  line-height: 1.45;
  letter-spacing: -.025em;
}
.shop-hero p {
  max-width: 65ch;
  font-size: 13.5px;
  line-height: 2.05;
  color: rgba(255, 255, 255, .73);
}
.shop-hero-points {
  display: grid;
  grid-template-columns: repeat(3, max-content);
  gap: 10px 24px;
  margin-top: 22px;
}
.shop-hero-points li {
  gap: 8px;
  font-size: 11.5px;
  color: rgba(255, 255, 255, .88);
}
.shop-hero-points .ui-icon { color: #83d8c7; stroke-width: 2; }
.shop-hero-art {
  display: block;
  position: relative;
  min-width: 0;
  height: 184px;
}
.shop-hero-art > span { transform: none; backdrop-filter: none; }
.shop-hero-art > .orbit {
  position: absolute;
  inset: 50% auto auto 50%;
  border: 1px solid rgba(255, 255, 255, .15);
  border-radius: 50%;
  background: transparent;
}
.shop-hero-art > .orbit.one {
  width: 182px;
  height: 182px;
  transform: translate(-50%, -50%);
}
.shop-hero-art > .orbit.two {
  width: 132px;
  height: 132px;
  transform: translate(-50%, -50%);
  border-color: rgba(255, 184, 128, .28);
  background: rgba(255, 255, 255, .015);
}
.shop-hero-art > .hero-mark {
  position: absolute;
  inset: 50% auto auto 50%;
  display: grid;
  place-items: center;
  width: 88px;
  height: 88px;
  transform: translate(-50%, -50%);
  border: 1px solid rgba(255, 255, 255, .2);
  border-radius: 28px;
  background: linear-gradient(145deg, rgba(255, 255, 255, .16), rgba(255, 255, 255, .05));
  box-shadow: 0 18px 45px rgba(4, 12, 27, .25), inset 0 1px 0 rgba(255, 255, 255, .24);
}
.shop-hero-art > i {
  position: absolute;
  inset: 18px 18px auto auto;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: #ff8a48;
  box-shadow: 0 0 0 7px rgba(255, 138, 72, .12);
}
.shop-hero-art .shop-vector-icon {
  width: 46px;
  height: 46px;
  filter: brightness(0) invert(1);
}

/* فیلتر افقی: دو ردیف کوتاه، بدون sidebar و با اسکرول داخلی برای گزینه‌های زیاد */
.shop-filters {
  position: sticky;
  inset-block-start: 82px;
  z-index: 16;
  display: grid;
  gap: 12px;
  padding: 14px 16px;
  border: 1px solid color-mix(in srgb, var(--shop-border) 86%, transparent);
  border-radius: 20px;
  background: color-mix(in srgb, var(--panel) 91%, transparent);
  box-shadow: 0 12px 34px rgba(24, 36, 60, .075);
  backdrop-filter: blur(18px) saturate(1.1);
  -webkit-backdrop-filter: blur(18px) saturate(1.1);
}
.shop-filter-top {
  display: grid;
  grid-template-columns: minmax(250px, .78fr) minmax(0, 1.7fr) auto;
  align-items: end;
  gap: 12px;
  min-width: 0;
}
.shop-filter-search {
  display: flex;
  align-items: center;
  min-width: 0;
  min-height: 44px;
  border: 1px solid var(--shop-border);
  border-radius: 13px;
  background: var(--shop-soft);
  transition: border-color .16s ease, box-shadow .16s ease, background .16s ease;
}
.shop-filter-search:focus-within {
  border-color: var(--blue);
  background: var(--panel);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--blue) 14%, transparent);
}
.shop-filter-search input {
  min-width: 0;
  height: 42px;
  padding: 0 38px 0 12px;
  border: 0;
  outline: 0;
  background: transparent;
  font-size: 11.5px;
}
.shop-filter-search .search-glyph { inset-inline-start: 13px; }
.shop-filter-primary,
.shop-filter-group {
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr);
  align-items: center;
  gap: 9px;
  min-width: 0;
}
.shop-filter-primary > span,
.shop-filter-group > span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 850;
  white-space: nowrap;
}
.shop-filter-groups {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px 18px;
  min-width: 0;
  padding-top: 11px;
  border-top: 1px solid color-mix(in srgb, var(--shop-border) 72%, transparent);
}
.shop-filter-row {
  flex-wrap: wrap;
  gap: 5px;
  min-width: 0;
  overflow: visible;
  padding: 2px;
}
.shop-filter-chip {
  flex: 0 0 auto;
  max-width: 100%;
  min-height: 34px;
  padding: 5px 12px;
  border-color: color-mix(in srgb, var(--shop-border) 90%, transparent);
  border-radius: 10px;
  background: var(--panel);
  font-size: 10.5px;
  font-weight: 760;
  overflow-wrap: anywhere;
  text-align: center;
  white-space: normal;
}
.shop-filter-chip:hover {
  border-color: color-mix(in srgb, var(--blue) 48%, var(--shop-border));
  background: var(--blue-soft);
}
.shop-filter-chip.on {
  border-color: var(--shop-navy);
  background: var(--shop-navy);
  color: #fff;
  box-shadow: 0 5px 12px rgba(24, 36, 60, .13);
}
.shop-filter-reset {
  align-self: end;
  min-height: 40px;
  padding-inline: 11px;
  border: 1px solid var(--shop-border);
  border-radius: 11px;
  background: var(--panel);
  font-size: 10.5px;
  white-space: nowrap;
}

/* عنوان نتایج و شبکهٔ سه‌ستونه */
.shop-results { gap: 17px; }
.shop-results-head { align-items: end; }
.shop-results-head .eyebrow { font-size: 10px; }
.shop-results-head h2 {
  margin-top: 3px;
  font-size: 19px;
  letter-spacing: -.015em;
}
.shop-result-count {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 3px 10px;
  border: 1px solid var(--shop-border);
  border-radius: 999px;
  background: var(--panel);
  color: var(--muted);
  font-size: 10.5px;
  font-weight: 800;
  white-space: nowrap;
}
.shop-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  align-items: stretch;
}

/* کارت محصول */
.shop-card {
  gap: 14px;
  min-width: 0;
  padding: 20px;
  border-color: var(--shop-border);
  border-radius: 20px;
  background: var(--shop-surface);
  box-shadow: var(--shop-shadow-sm);
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.shop-card::before {
  height: 2px;
  opacity: .68;
  background: linear-gradient(90deg, transparent, var(--shop-accent), transparent);
}
.shop-card:hover {
  transform: translateY(-3px);
  border-color: color-mix(in srgb, var(--shop-accent) 32%, var(--shop-border));
  box-shadow: var(--shop-shadow-lg);
}
.shop-ribbon {
  top: 25px;
  right: auto;
  bottom: auto;
  left: auto;
  inset-inline-start: auto;
  inset-inline-end: -58px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  width: 190px;
  min-height: 31px;
  padding: 4px 0;
  transform: rotate(-45deg);
  transform-origin: center;
  border: 0;
  border-radius: 0;
  background: linear-gradient(135deg, #f45f0b, #ff8640);
  color: #fff;
  box-shadow: 0 8px 18px rgba(220, 79, 0, .24);
}
[dir="ltr"] .shop-ribbon { transform: rotate(45deg); }
.shop-ribbon b { font-size: 11px; font-weight: 950; line-height: 1; }
.shop-ribbon small { font-size: 8px; font-weight: 750; line-height: 1; opacity: .9; }
.shop-card-head {
  align-items: center;
  gap: 13px;
  min-height: 74px;
  padding-inline-end: 74px;
}
.shop-card-title { flex: 1; }
.shop-card-audience {
  margin-bottom: 5px;
  padding: 3px 8px;
  font-size: 9.5px;
  font-weight: 850;
}
.shop-card-title h3 {
  margin-bottom: 3px;
  font-size: 14px;
  line-height: 1.65;
  letter-spacing: -.01em;
}
.shop-card-title p {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  font-size: 10.75px;
  line-height: 1.75;
}
.shop-cover { width: 66px; height: 66px; }
.shop-cover.sm { width: 46px; height: 46px; }
.shop-cover.lg { width: 136px; height: 136px; }
.shop-cover-art {
  border-radius: 18px;
  background:
    radial-gradient(circle at 22% 17%, rgba(255, 255, 255, .25), transparent 32%),
    linear-gradient(145deg, color-mix(in srgb, var(--shop-accent) 86%, #14213a), var(--shop-accent));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .28), 0 8px 18px color-mix(in srgb, var(--shop-accent) 16%, transparent);
}
.shop-cover-glyph { width: 48%; }
.shop-cover-glyph .shop-vector-icon {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
  border-radius: 0;
  object-fit: contain;
  filter: brightness(0) invert(1);
}
/* جلدهای پیش‌فرض با تصویرهای سه‌بعدیِ مسیر لندینگ هم‌خانواده‌اند. */
.shop-cover-art.shop-cover-art-3d {
  border: 1px solid #e2e6d9;
  background: #f8f9ee;
  box-shadow: 0 6px 16px rgba(38, 62, 44, .11);
}
.shop-cover .shop-cover-art-3d .shop-cover-3d {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
  border-radius: inherit;
  object-fit: cover;
}
.shop-cover.sm .shop-cover-art-3d { border-radius: 12px; }
.shop-cover.lg .shop-cover-art-3d { border-radius: 24px; }
.shop-icon-pick .shop-cover-3d {
  display: block;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  object-fit: cover;
}
.shop-card-scope {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  min-width: 0;
  overflow: visible;
}
.shop-chip {
  flex: 0 1 auto;
  max-width: 100%;
  padding: 3px 8px;
  border-radius: 8px;
  font-size: 9.5px;
  font-weight: 750;
  line-height: 1.55;
  overflow-wrap: anywhere;
  text-align: center;
  white-space: normal;
}
.shop-card-stats {
  gap: 0;
  padding: 10px 0;
  border-color: color-mix(in srgb, var(--shop-border) 76%, transparent);
}
.shop-card-stats li + li { border-inline-start: 1px solid var(--shop-border); }
.shop-card-stats b { font-size: 13.5px; font-variant-numeric: tabular-nums; }
.shop-card-stats small { font-size: 9px; }
.shop-card-value {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 46px;
  padding: 9px 11px;
  border: 1px solid color-mix(in srgb, var(--shop-accent) 15%, var(--shop-border));
  border-radius: 12px;
  background: color-mix(in srgb, var(--shop-accent) 5%, var(--shop-soft));
  color: var(--muted);
  font-size: 10.5px;
  line-height: 1.75;
}
.shop-card-value .ui-icon {
  flex: none;
  width: 17px;
  height: 17px;
  color: var(--shop-accent);
}

/* انتخاب پلن: همیشه ۱، ۳، ۶ و ۱۲ ماه در یک ردیف */
.shop-plan-picker {
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}
.shop-plan-picker legend {
  width: 100%;
  margin: 0 0 8px;
  padding: 0;
  color: var(--ink);
  font-size: 10.5px;
  font-weight: 850;
}
.shop-plan-picker > p {
  margin: -3px 0 10px;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.7;
}
.shop-plan-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
  min-width: 0;
}
.shop-plan-option {
  position: relative;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 2px;
  min-width: 0;
  min-height: 52px;
  padding: 7px 3px;
  border: 1px solid var(--shop-border);
  border-radius: 11px;
  background: var(--shop-soft);
  color: var(--ink);
  cursor: pointer;
  text-align: center;
  transition: border-color .16s ease, background .16s ease, box-shadow .16s ease, color .16s ease;
}
.shop-plan-option:hover {
  border-color: color-mix(in srgb, var(--shop-accent) 50%, var(--shop-border));
  background: color-mix(in srgb, var(--shop-accent) 5%, var(--panel));
}
.shop-plan-option.on,
.shop-plan-option:has(input:checked) {
  border-color: var(--shop-accent);
  background: color-mix(in srgb, var(--shop-accent) 9%, var(--panel));
  color: color-mix(in srgb, var(--shop-accent) 84%, var(--ink));
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--shop-accent) 22%, transparent);
}
.shop-plan-option input,
.shop-exam-choice input {
  position: absolute;
  inline-size: 1px;
  block-size: 1px;
  margin: -1px;
  opacity: 0;
  pointer-events: none;
}
.shop-plan-option > span {
  font-size: 10.75px;
  font-weight: 900;
  white-space: nowrap;
}
.shop-real-choice {
  display: block;
  max-width: 100%;
  overflow: hidden;
  color: var(--teal);
  font-size: 7.75px;
  font-style: normal;
  font-weight: 850;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.shop-exam-choice {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 28px;
  align-items: center;
  gap: 8px;
  min-height: 56px;
  margin-top: 7px;
  padding: 6px 7px 6px 11px;
  border: 1px solid color-mix(in srgb, var(--yellow) 35%, var(--shop-border));
  border-radius: 12px;
  background: color-mix(in srgb, var(--yellow-soft) 62%, var(--panel));
  transition: border-color .16s ease, box-shadow .16s ease, background .16s ease;
}
.shop-exam-choice.on,
.shop-exam-choice:has(input:checked) {
  border-color: var(--shop-accent);
  background: color-mix(in srgb, var(--shop-accent) 8%, var(--panel));
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--shop-accent) 20%, transparent);
}
.shop-exam-choice > label {
  position: relative;
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
  cursor: pointer;
}
.shop-exam-choice > label > span {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 3px 9px;
  min-width: 0;
}
.shop-exam-choice b { font-size: 10.75px; font-weight: 900; }
.shop-exam-choice small { color: var(--muted); font-size: 9.25px; font-weight: 750; white-space: nowrap; }
.shop-exam-choice .shop-real-choice { margin-inline-start: auto; }
.shop-exam-help {
  position: relative;
  z-index: 28;
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: #a87500;
  cursor: pointer;
  transition: color .16s ease, background .16s ease, transform .16s ease;
}
.shop-exam-help:hover,
.shop-exam-help:focus-visible {
  transform: translateY(-1px);
  background: color-mix(in srgb, var(--yellow) 12%, transparent);
  color: #805d00;
}
.shop-exam-help .ui-icon,
.shop-exam-help-icon {
  display: block;
  width: 15px;
  height: 15px;
  stroke-width: 2;
}
.shop-exam-help::before,
.shop-exam-help::after {
  position: absolute;
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
  transition: opacity .16s ease, visibility .16s ease, transform .16s ease;
}
.shop-exam-help::before {
  content: "";
  top: calc(100% + 3px);
  left: 50%;
  z-index: 31;
  border: 6px solid transparent;
  border-bottom-color: #17233a;
  transform: translate(-50%, -4px);
}
.shop-exam-help::after {
  content: attr(title);
  top: calc(100% + 14px);
  inset-inline-end: 0;
  z-index: 30;
  width: min(270px, calc(100vw - 54px));
  padding: 10px 12px;
  border: 1px solid rgba(255, 255, 255, .1);
  border-radius: 11px;
  direction: rtl;
  background: #17233a;
  color: rgba(255, 255, 255, .94);
  box-shadow: 0 16px 36px rgba(15, 26, 47, .24);
  font-size: 9.75px;
  font-weight: 650;
  line-height: 1.9;
  text-align: right;
  white-space: normal;
  transform: translateY(-4px);
}
.shop-exam-help:hover::before,
.shop-exam-help:focus-visible::before {
  visibility: visible;
  opacity: 1;
  transform: translate(-50%, 0);
}
.shop-exam-help:hover::after,
.shop-exam-help:focus-visible::after {
  visibility: visible;
  opacity: 1;
  transform: translateY(0);
}

/* قیمت و اقدام مستقیم */
.shop-card-price {
  display: grid;
  align-items: initial;
  gap: 4px;
  padding-top: 2px;
}
.shop-price-caption { color: var(--muted); font-size: 9.5px; font-weight: 750; }
.shop-card-price > div {
  display: flex;
  align-items: center;
  gap: 7px;
  min-height: 17px;
}
.shop-card-price del {
  font-size: 10.5px;
  font-variant-numeric: tabular-nums;
}
.shop-price-off {
  display: inline-flex;
  align-items: center;
  min-height: 20px;
  padding: 1px 7px;
  border-radius: 999px;
  background: var(--orange-soft);
  color: #d9550b;
  font-size: 9px;
  font-weight: 850;
}
.shop-card-price strong {
  display: flex;
  align-items: baseline;
  gap: 3px;
  font-size: 22px;
  font-variant-numeric: tabular-nums;
  letter-spacing: -.015em;
}
.shop-card-price strong span { font-size: 10px; }
.shop-card-actions {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(100px, .7fr);
  gap: 8px;
}
.shop-card-actions .primary-button,
.shop-card-actions .ghost-button {
  width: 100%;
  min-height: 44px;
  height: auto;
  padding-inline: 10px;
  border-radius: 12px;
  font-size: 10.75px;
  white-space: nowrap;
}
.shop-card-actions .primary-button {
  background: var(--shop-navy);
  box-shadow: 0 9px 18px rgba(24, 36, 60, .14);
}
.shop-card-actions .primary-button:hover { background: #233552; }
.shop-card-actions .ghost-button {
  border: 1px solid var(--shop-border);
  background: var(--panel);
  color: var(--ink);
}

/* جزئیات محصول: محتوای اصلی + buybox مستقل، بدون overlay */
.shop-detail { gap: 20px; }
.shop-breadcrumb { min-height: 30px; }
.shop-breadcrumb button { min-height: 30px; padding: 2px 0; }
.shop-detail-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(350px, 400px);
  gap: 22px;
  align-items: start;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  overflow: visible;
}
.shop-detail-main {
  min-width: 0;
  padding: 28px;
  border: 1px solid var(--shop-border);
  border-radius: 22px;
  background: var(--panel);
  box-shadow: var(--shop-shadow-sm);
}
.shop-detail-summary {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  gap: 24px;
  align-items: center;
}
.shop-detail-media {
  position: relative;
  display: grid;
  place-items: center;
  width: 136px;
  height: 136px;
  overflow: hidden;
  border-radius: 18px;
}
.shop-detail-media .shop-discount-pill {
  position: absolute;
  top: 20px;
  inset-inline-start: auto;
  inset-inline-end: -39px;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  width: 140px;
  min-height: 27px;
  padding: 3px 0;
  transform: rotate(-45deg);
  border-radius: 0;
  background: linear-gradient(135deg, #f45f0b, #ff8640);
  color: #fff;
  box-shadow: 0 7px 16px rgba(220, 79, 0, .23);
}
[dir="ltr"] .shop-detail-media .shop-discount-pill { transform: rotate(45deg); }
.shop-detail-media .shop-discount-pill b { font-size: 9.5px; line-height: 1; }
.shop-detail-media .shop-discount-pill small { font-size: 7px; line-height: 1; }
.shop-detail-intro h1 {
  margin: 7px 0 8px;
  font-size: clamp(22px, 2.4vw, 30px);
  line-height: 1.5;
  letter-spacing: -.02em;
}
.shop-detail-intro > p { max-width: 70ch; font-size: 12.5px; line-height: 2; }
.shop-detail-counts {
  gap: 9px;
  margin: 22px 0 0;
}
.shop-detail-counts li {
  min-width: 0;
  padding: 12px 7px;
  border-color: var(--shop-border);
  background: var(--shop-soft);
}
.shop-detail-counts b { font-size: 17px; font-variant-numeric: tabular-nums; }
.shop-buybox {
  position: sticky;
  inset-block-start: 88px;
  z-index: 4;
  display: grid;
  gap: 15px;
  width: 100%;
  min-width: 0;
  padding: 20px;
  border: 1px solid color-mix(in srgb, var(--shop-accent) 21%, var(--shop-border));
  border-radius: 22px;
  background: var(--panel);
  box-shadow: var(--shop-shadow-lg);
}
.shop-buybox .shop-plan-picker legend { font-size: 11.5px; }
.shop-buybox .shop-plan-option { min-height: 56px; }
.shop-buybox-price {
  gap: 9px;
  padding: 14px 0 0;
  border-block-start: 1px solid var(--shop-border);
  border-block-end: 0;
}
.shop-buybox-label,
.shop-buybox-total,
.shop-buybox-saving {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
}
.shop-buybox-label { color: var(--muted); font-size: 10.5px; }
.shop-buybox-label b { color: var(--ink); font-size: 10.5px; }
.shop-buybox-total strong {
  display: flex;
  align-items: baseline;
  gap: 4px;
  color: var(--ink);
  font-size: 25px;
  font-weight: 950;
  font-variant-numeric: tabular-nums;
  letter-spacing: -.02em;
}
.shop-buybox-total strong small { color: var(--muted); font-size: 10px; font-weight: 750; }
.shop-buybox-total del { color: var(--muted); font-size: 10.5px; }
.shop-buybox-saving {
  padding: 8px 10px;
  border-radius: 10px;
  background: var(--teal-soft);
  color: color-mix(in srgb, var(--teal) 78%, #16483f);
  font-size: 9.5px;
  font-weight: 800;
}
.shop-exam-end {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 8px 10px;
  border-radius: 10px;
  background: var(--yellow-soft);
  color: #8d6800;
  font-size: 10px;
  font-weight: 800;
}
.shop-exam-end .ui-icon { width: 15px; height: 15px; }
.shop-buy {
  width: 100%;
  min-height: 50px;
  height: auto;
  padding: 8px 14px;
  border-radius: 13px;
  background: var(--orange);
  font-size: 11.5px;
  line-height: 1.7;
  box-shadow: 0 12px 25px rgba(255, 107, 24, .21);
}
/* بلوک‌های پایین جزئیات */
.shop-block {
  padding: 22px 24px;
  border-color: var(--shop-border);
  border-radius: 20px;
  box-shadow: var(--shop-shadow-sm);
}
.shop-block-head { margin-bottom: 16px; }
.shop-feature {
  border-color: var(--shop-border);
  border-radius: 13px;
  background: var(--shop-soft);
}
.shop-feature-icon { width: 42px; height: 42px; }
.shop-feature-icon .shop-vector-icon {
  width: 21px;
  height: 21px;
  opacity: .8;
}
.shop-capabilities {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(210px, 100%), 1fr));
  gap: 8px;
  min-width: 0;
  overflow: visible;
}
.shop-capability {
  min-width: 0;
  max-width: 100%;
  border-color: var(--shop-border);
  background: var(--shop-soft);
  line-height: 1.7;
  overflow-wrap: anywhere;
  white-space: normal;
}
.shop-capability .shop-vector-icon {
  width: 16px;
  height: 16px;
  opacity: .72;
}
.shop-capability .shop-panel-icon {
  display: block;
  flex: 0 0 auto;
  width: 17px;
  height: 17px;
  color: var(--shop-accent, var(--blue));
}
.shop-detail .shop-price-table-wrap,
.shop-detail .table-wrap:has(> .shop-price-table) {
  width: 100%;
  max-width: 100%;
  overflow: visible;
}
.shop-detail .shop-price-table {
  width: 100%;
  min-width: 0;
  table-layout: fixed;
}
.shop-detail .shop-price-table th,
.shop-detail .shop-price-table td {
  min-width: 0;
  padding-inline: 10px;
  overflow-wrap: anywhere;
  white-space: normal;
}
.shop-price-table tr.on { background: color-mix(in srgb, var(--shop-accent) 8%, var(--panel)); }
.shop-price-table .shop-real-choice {
  display: inline-block;
  max-width: 100%;
  margin-inline-start: 7px;
  white-space: normal;
}

/* FAQ: app.js ارتفاع پنل را با grid کنترل می‌کند؛ CSS ظاهر و easing را کامل می‌کند. */
.shop-faq { min-width: 0; }
.shop-faq details {
  border-color: var(--shop-border);
  background: var(--shop-soft);
  transition: border-color .2s ease, background .2s ease, box-shadow .2s ease;
}
.shop-faq details[open] {
  border-color: color-mix(in srgb, var(--shop-accent) 24%, var(--shop-border));
  background: var(--panel);
  box-shadow: 0 8px 20px rgba(24, 36, 60, .05);
}
.shop-faq summary { transition: color .2s ease, background .2s ease; }
.shop-faq summary:hover { background: color-mix(in srgb, var(--shop-accent) 4%, transparent); }
.shop-faq-panel {
  min-width: 0;
  opacity: 0;
  transform: translateY(-4px);
  will-change: grid-template-rows, opacity, transform;
  transition:
    grid-template-rows .28s cubic-bezier(.22, .61, .36, 1),
    opacity .2s ease,
    transform .28s cubic-bezier(.22, .61, .36, 1) !important;
}
.shop-faq-panel[aria-hidden="false"] {
  opacity: 1;
  transform: translateY(0);
}
.shop-faq-panel p {
  margin: 0;
  padding: 0 14px 14px;
  line-height: 2;
}
.shop-exam-dialog {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 14px;
  border: 1px solid color-mix(in srgb, var(--yellow) 32%, var(--shop-border));
  border-radius: 13px;
  background: var(--yellow-soft);
}
.shop-exam-dialog .ui-icon { flex: none; width: 20px; height: 20px; color: #9b7100; }
.shop-exam-dialog p { margin: 0; color: var(--ink); font-size: 12px; line-height: 2; }

/* ریبون صفحهٔ جزئیات مستقیماً روی کارت hero می‌نشیند و با فاصلهٔ امن، متن را نمی‌پوشاند. */
.shop-detail-main { position: relative; overflow: hidden; }
.shop-detail-main:has(> .shop-detail-ribbon) .shop-detail-summary { padding-inline-end: 72px; }
.shop-detail-ribbon {
  position: absolute;
  top: 29px;
  right: auto;
  bottom: auto;
  left: auto;
  inset-inline-start: auto;
  inset-inline-end: -64px;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  width: 210px;
  min-height: 33px;
  padding: 4px 0;
  transform: rotate(-45deg);
  transform-origin: center;
  background: linear-gradient(135deg, #f45f0b, #ff8640);
  color: #fff;
  box-shadow: 0 9px 20px rgba(220, 79, 0, .25);
  text-align: center;
}
[dir="ltr"] .shop-detail-ribbon { transform: rotate(45deg); }
.shop-detail-ribbon b { font-size: 11.5px; font-weight: 950; line-height: 1; }
.shop-detail-ribbon small { font-size: 8.25px; font-weight: 750; line-height: 1; opacity: .92; }

/* نسخهٔ DOMدار tooltip؛ pseudo قبلی تا همگام‌شدن کش کلاینت fallback باقی می‌ماند. */
.shop-exam-help:has(> .shop-exam-tooltip)::before,
.shop-exam-help:has(> .shop-exam-tooltip)::after { content: none; }
.shop-exam-tooltip {
  position: absolute;
  top: calc(100% + 14px);
  inset-inline-end: 0;
  z-index: 30;
  visibility: hidden;
  width: min(270px, calc(100vw - 54px));
  padding: 10px 12px;
  border: 1px solid rgba(255, 255, 255, .1);
  border-radius: 11px;
  direction: rtl;
  background: #17233a;
  color: rgba(255, 255, 255, .94);
  box-shadow: 0 16px 36px rgba(15, 26, 47, .24);
  font-size: 9.75px;
  font-weight: 650;
  line-height: 1.9;
  opacity: 0;
  pointer-events: none;
  text-align: right;
  white-space: normal;
  transform: translateY(-4px);
  transition: opacity .16s ease, visibility .16s ease, transform .16s ease;
}
.shop-exam-tooltip::before {
  content: "";
  position: absolute;
  inset-block-end: 100%;
  inset-inline-end: 7px;
  border: 6px solid transparent;
  border-bottom-color: #17233a;
}
.shop-exam-tooltip > b {
  display: block;
  margin-bottom: 3px;
  color: #fff;
  font-size: 10.25px;
  font-weight: 900;
  line-height: 1.65;
}
.shop-exam-tooltip > span {
  display: block;
  color: rgba(255, 255, 255, .76);
  font-size: 9.5px;
  font-weight: 600;
  line-height: 1.9;
}
.shop-exam-help:hover > .shop-exam-tooltip,
.shop-exam-help:focus-visible > .shop-exam-tooltip,
.shop-exam-help:focus-within > .shop-exam-tooltip {
  visibility: visible;
  opacity: 1;
  transform: translateY(0);
}
.shop-card .shop-exam-tooltip {
  top: auto;
  bottom: calc(100% + 14px);
}
.shop-card .shop-exam-tooltip::before {
  inset-block-start: 100%;
  inset-block-end: auto;
  border-top-color: #17233a;
  border-bottom-color: transparent;
}

/* دسترس‌پذیری ورودی‌ها و کنترل‌ها */
.shop-filter-chip:focus-visible,
.shop-filter-reset:focus-visible,
.shop-card-actions button:focus-visible,
.shop-exam-help:focus-visible,
.shop-buy:focus-visible,
.shop-breadcrumb button:focus-visible,
.store-public a:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--blue) 38%, transparent);
  outline-offset: 2px;
}
.shop-plan-option:has(input:focus-visible),
.shop-exam-choice:has(input:focus-visible) {
  outline: 3px solid color-mix(in srgb, var(--blue) 34%, transparent);
  outline-offset: 2px;
}

/* لپ‌تاپ و تبلت افقی */
@media (max-width: 1024px) {
  .shop-page { gap: 22px; }
  .shop-hero { grid-template-columns: minmax(0, 1fr) 220px; gap: 24px; padding: 34px; }
  .shop-hero-points { grid-template-columns: repeat(2, max-content); }
  .shop-filter-top { grid-template-columns: minmax(230px, .8fr) minmax(0, 1.5fr); }
  .shop-filter-reset { grid-column: 1 / -1; justify-self: start; min-height: 34px; }
  .shop-filter-groups { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .shop-filter-group.lesson { grid-column: 1 / -1; }
  .shop-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .shop-detail-hero { grid-template-columns: minmax(0, 1fr); }
  .shop-buybox { position: static; }
}

/* موبایل و تبلت عمودی */
@media (max-width: 720px) {
  .shop-page { gap: 17px; }
  .store-public-bar { min-height: 62px; padding: 10px 14px; }
  .store-public-brand small { display: none; }
  .store-public-actions .primary-button { min-height: 40px; padding-inline: 12px; font-size: 11px; }
  .store-public .content { padding: 16px 14px 36px; }
  .shop-hero {
    min-height: 0;
    grid-template-columns: 1fr;
    padding: 28px 24px;
    border-radius: 21px;
  }
  .shop-hero-art { display: none; }
  .shop-hero h1 { max-width: 20ch; font-size: 28px; }
  .shop-hero-points { grid-template-columns: 1fr; gap: 8px; margin-top: 18px; }
  .shop-filters {
    position: static;
    gap: 10px;
    padding: 13px;
    border-radius: 17px;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }
  .shop-filter-top,
  .shop-filter-groups { grid-template-columns: 1fr; }
  .shop-filter-reset { grid-column: auto; }
  .shop-filter-group.lesson { grid-column: auto; }
  .shop-filter-primary,
  .shop-filter-group { grid-template-columns: 52px minmax(0, 1fr); }
  .shop-filter-chip { min-height: 38px; }
  .shop-results-head h2 { font-size: 16px; }
  .shop-grid { grid-template-columns: minmax(0, 1fr); gap: 14px; }
  .shop-card { border-radius: 18px; }
  .shop-detail-main { padding: 22px; }
  .shop-detail-main:has(> .shop-detail-ribbon) .shop-detail-summary { padding-inline-end: 58px; }
  .shop-detail-ribbon {
    top: 25px;
    inset-inline-end: -59px;
    width: 188px;
    min-height: 31px;
  }
  .shop-detail-summary { grid-template-columns: 116px minmax(0, 1fr); gap: 18px; }
  .shop-detail-media { width: 108px; height: 108px; }
  .shop-cover.lg { width: 108px; height: 108px; }
  .shop-detail-media .shop-discount-pill {
    top: 16px;
    inset-inline-end: -37px;
    width: 122px;
    min-height: 25px;
  }
  .shop-detail-counts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .shop-buybox { padding: 18px; border-radius: 19px; }
  .shop-block { padding: 19px; }
  .shop-highlights,
  .shop-features { grid-template-columns: minmax(0, 1fr); }
  .shop-detail .table-wrap:has(> .shop-price-table) { overflow: visible; }
  .shop-detail .shop-price-table,
  .shop-detail .shop-price-table tbody { display: block; width: 100%; min-width: 0; }
  .shop-detail .shop-price-table thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    clip-path: inset(50%);
    white-space: nowrap;
  }
  .shop-detail .shop-price-table tbody { display: grid; gap: 9px; }
  .shop-detail .shop-price-table tbody tr {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0;
    padding: 7px;
    border: 1px solid var(--shop-border);
    border-radius: 12px;
    background: var(--shop-soft);
  }
  .shop-detail .shop-price-table tbody tr.on {
    border-color: color-mix(in srgb, var(--shop-accent) 30%, var(--shop-border));
    background: color-mix(in srgb, var(--shop-accent) 7%, var(--panel));
  }
  .shop-detail .shop-price-table tbody td {
    display: grid;
    align-content: start;
    gap: 3px;
    min-width: 0;
    min-height: 54px;
    padding: 7px 8px;
    border: 0;
    background: transparent;
    font-size: 10.5px;
    line-height: 1.65;
    overflow-wrap: anywhere;
    white-space: normal;
  }
  .shop-detail .shop-price-table tbody td::before {
    color: var(--muted);
    font-size: 8.5px;
    font-weight: 750;
  }
  .shop-detail .shop-price-table tbody td:nth-child(1)::before { content: "مدت دسترسی"; }
  .shop-detail .shop-price-table tbody td:nth-child(2)::before { content: "قیمت مرجع"; }
  .shop-detail .shop-price-table tbody td:nth-child(3)::before { content: "مبلغ نهایی"; }
  .shop-detail .shop-price-table tbody td:nth-child(4)::before { content: "تخفیف"; }
}

/* گوشی باریک: اندازه‌های لمسی حفظ می‌شوند و چهار مدت همچنان یک ردیف‌اند */
@media (max-width: 420px) {
  .store-public .content { padding-inline: 11px; }
  .store-public-brand strong { font-size: 12.5px; }
  .shop-hero { padding: 24px 19px; }
  .shop-hero h1 { font-size: 24px; }
  .shop-hero p { font-size: 12px; }
  .shop-card { gap: 12px; padding: 15px; }
  .shop-card-head { min-height: 66px; gap: 10px; padding-inline-end: 66px; }
  .shop-cover { width: 58px; height: 58px; }
  .shop-card-title h3 { font-size: 13px; }
  .shop-plan-grid { gap: 4px; }
  .shop-plan-option { min-height: 50px; padding-inline: 2px; border-radius: 10px; }
  .shop-plan-option > span { font-size: 9.75px; }
  .shop-real-choice { font-size: 7px; }
  .shop-exam-choice { min-height: 54px; }
  .shop-card-actions { grid-template-columns: minmax(0, 1.2fr) minmax(92px, .8fr); gap: 6px; }
  .shop-card-actions .primary-button,
  .shop-card-actions .ghost-button { min-height: 46px; padding-inline: 7px; font-size: 10px; }
  .shop-detail-main { padding: 18px; }
  .shop-detail-main:has(> .shop-detail-ribbon) .shop-detail-summary {
    padding-block-start: 30px;
    padding-inline-end: 0;
  }
  .shop-detail-ribbon {
    top: 22px;
    inset-inline-end: -61px;
    width: 184px;
  }
  .shop-detail-summary { grid-template-columns: 1fr; justify-items: start; }
  .shop-detail-media { justify-self: center; }
  .shop-detail-intro h1 { font-size: 22px; }
  .shop-buybox { padding: 15px; }
  .shop-buybox-total strong { font-size: 22px; }
  .shop-buy { min-height: 52px; }
  /* چهار ستون در پهنای کم جا نمی‌شود: جلد + متن بالا، شمار و دکمه پایین. */
  .shop-mine-row { grid-template-columns: auto minmax(0, 1fr); row-gap: 12px; }
  .shop-mine-left { grid-column: 1 / -1; display: flex; align-items: baseline; gap: 6px; padding-inline: 0; }
  .shop-mine-cta { grid-column: 1 / -1; justify-content: center; }
}

@media (prefers-reduced-motion: reduce) {
  .shop-card,
  .shop-filter-search,
  .shop-filter-chip,
  .shop-plan-option,
  .shop-exam-choice,
  .shop-exam-help,
  .shop-exam-tooltip,
  .shop-faq details,
  .shop-faq summary,
  .shop-card-actions button,
  .shop-buy { transition: none; }
  .shop-faq-panel { transition: none !important; }
  .shop-card:hover,
  .shop-exam-help:hover,
  .shop-card-actions button:hover,
  .shop-buy:hover { transform: none; }
  .shop-loading .ui-icon { animation: none; }
}

/* ═══════════════════════════════════════════════════════════════════════
   FINAL CASCADE — کارت فشردهٔ فروشگاه
   باید آخرین لایهٔ فایل بماند تا قواعد قدیمی چهارپلنه/ریبون روی آن برنگردند.
   ═══════════════════════════════════════════════════════════════════════ */
.shop-grid { gap: 13px; }
.shop-card {
  gap: 8px;
  height: 100%;
  padding: 14px;
  border-radius: 17px;
}
.shop-card-head {
  align-items: center;
  gap: 10px;
  min-height: 56px;
  padding-inline-end: 0;
}
.shop-card-title h3 { margin-bottom: 1px; font-size: 13.25px; line-height: 1.5; }
.shop-card-title p { -webkit-line-clamp: 1; font-size: 9.75px; line-height: 1.55; }
.shop-card-audience { margin-bottom: 2px; padding: 2px 7px; font-size: 8.75px; line-height: 1.45; }
.shop-card .shop-card-scope { gap: 3px; }
.shop-card .shop-chip { padding: 2px 6px; border-radius: 6px; font-size: 8.5px; line-height: 1.4; }

.shop-plan-grid {
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 4px;
}
.shop-card .shop-plan-picker legend { margin-bottom: 4px; font-size: 9.25px; line-height: 1.45; }
.shop-card .shop-plan-option {
  min-width: 0;
  min-height: 44px;
  padding: 4px 1px;
  border-radius: 9px;
}
.shop-card .shop-plan-option > span { font-size: 9px; line-height: 1.2; }
.shop-card .shop-real-choice { font-size: 6.25px; line-height: 1.15; }
.shop-card .shop-exam-choice {
  grid-template-columns: minmax(0, 1fr) 26px;
  gap: 5px;
  min-height: 44px;
  margin-top: 4px;
  padding: 4px 6px 4px 8px;
  border-radius: 9px;
}
.shop-card .shop-exam-choice > label { gap: 6px; }
.shop-card .shop-exam-choice > label > span { gap: 2px 7px; }
.shop-card .shop-exam-choice b { font-size: 9.5px; }
.shop-card .shop-exam-choice small { font-size: 8px; }
.shop-card .shop-exam-help { width: 24px; height: 24px; }

.shop-card-price { display: block; min-height: 0; gap: 0; padding: 0; }
.shop-card-price:empty { display: none; }
.shop-card .shop-price-caption { display: block; margin-bottom: 1px; font-size: 8px; line-height: 1.3; }
.shop-card-price > .shop-card-price-line,
.shop-card-price-line {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 3px 8px;
  min-width: 0;
  min-height: 30px;
}
.shop-card-price-line strong {
  display: inline-flex;
  align-items: baseline;
  gap: 3px;
  color: var(--ink);
  font-size: 18.5px;
  font-weight: 950;
  line-height: 1.3;
  font-variant-numeric: tabular-nums;
  letter-spacing: -.015em;
  white-space: nowrap;
}
.shop-card-price-line strong span { color: var(--muted); font-size: 8.75px; font-weight: 750; }
.shop-card-price-line del {
  color: var(--muted);
  font-size: 9px;
  line-height: 1.3;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.shop-card-actions {
  grid-template-columns: minmax(0, 1.32fr) minmax(92px, .68fr);
  gap: 6px;
  margin-top: auto;
}
.shop-card-actions .primary-button,
.shop-card-actions .ghost-button {
  min-height: 44px;
  padding-inline: 8px;
  border-radius: 10px;
  font-size: 9.75px;
}

/* wrapper جدید badge؛ هیچ فضای رزروشده‌ای در header یا detail ندارد. */
.shop-card .shop-cover-wrap { width: 54px; height: 54px; }
.shop-detail-main { overflow: visible; }
.shop-detail-summary { padding-inline-end: 0; }
.shop-detail-media { overflow: visible; }
.shop-detail-media .shop-cover-wrap { width: 136px; height: 136px; }
.shop-buybox .shop-plan-option { min-width: 0; min-height: 48px; padding-inline: 1px; }
.shop-buybox .shop-plan-option > span { font-size: 9.5px; }

@media (max-width: 1440px) {
  .shop-grid { gap: 11px; }
  .shop-card { gap: 7px; padding: 13px; }
  .shop-card-head { min-height: 54px; padding-inline-end: 0; }
  .shop-card .shop-cover-wrap { width: 52px; height: 52px; }
  .shop-card-title h3 { font-size: 12.75px; }
  .shop-plan-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); }
}

@media (max-width: 1024px) {
  .shop-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .shop-card { padding: 14px; }
  .shop-card-head { padding-inline-end: 0; }
  .shop-card-title h3 { font-size: 13.25px; }
  .shop-card .shop-cover-wrap { width: 54px; height: 54px; }
  .shop-plan-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); }
}

@media (max-width: 720px) {
  .shop-grid { grid-template-columns: minmax(0, 1fr); gap: 10px; }
  .shop-card { gap: 7px; padding: 13px; }
  .shop-card-head { min-height: 54px; padding-inline-end: 0; }
  .shop-plan-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 4px; }
  .shop-plan-option,
  .shop-card .shop-plan-option,
  .shop-buybox .shop-plan-option { min-width: 0; min-height: 44px; }
  .shop-detail-summary { padding-inline-end: 0; }
  .shop-detail-media .shop-cover-wrap { width: 108px; height: 108px; }
  .shop-card-actions .primary-button,
  .shop-card-actions .ghost-button { min-height: 44px; }
}

@media (max-width: 390px) {
  .store-public .content { padding-inline: 9px; }
  .shop-card { gap: 6px; padding: 11px; }
  .shop-card-head { gap: 8px; min-height: 50px; padding-inline-end: 0; }
  .shop-card .shop-cover-wrap { width: 49px; height: 49px; }
  .shop-card-title h3 { font-size: 12px; }
  .shop-card-title p { font-size: 9px; }
  .shop-card .shop-card-scope { gap: 2px; }
  .shop-card .shop-chip { padding-inline: 5px; font-size: 8px; }
  .shop-plan-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 3px; }
  .shop-card .shop-plan-option,
  .shop-buybox .shop-plan-option { min-width: 0; min-height: 44px; padding-inline: 0; }
  .shop-card .shop-plan-option > span,
  .shop-buybox .shop-plan-option > span { font-size: 8.25px; }
  .shop-card-price-line { gap: 2px 6px; min-height: 28px; }
  .shop-card-price-line strong { font-size: 17px; }
  .shop-card-actions { grid-template-columns: minmax(0, 1.2fr) minmax(86px, .8fr); gap: 5px; }
  .shop-card-actions .primary-button,
  .shop-card-actions .ghost-button { min-height: 44px; padding-inline: 5px; font-size: 9px; }
  .shop-detail-summary { padding-inline-end: 0; }
}

/* ═══════════════════════════════════════════════════════════════════════
   FINAL CASCADE — نوار مخاطب و مقیاس خواناترِ فروشگاه
   این لایه باید در انتهای فایل بماند: هم‌زمان فشردگی کارت، پنج پلن در یک
   ردیف و اندازه‌های خوانا را در پوستهٔ عمومی و پنل دانش‌آموز تثبیت می‌کند.
   ═══════════════════════════════════════════════════════════════════════ */
.shop-page {
  gap: 12px;
  min-width: 0;
}

/* انتخاب مخاطب: پنل عمداً با مختصات فیزیکی به راست تراز شده است. */
.shop-audience-tabs {
  direction: rtl;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 5px;
  box-sizing: border-box;
  width: min(100%, 920px);
  min-width: 0;
  min-height: 74px;
  margin-right: 0;
  margin-left: auto;
  padding: 5px;
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--shop-border) 88%, #eadfce);
  border-radius: 18px;
  background: color-mix(in srgb, var(--panel) 91%, #fff6e9);
  box-shadow: 0 9px 28px rgba(24, 36, 60, .065);
}
.shop-audience-tab {
  appearance: none;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 9px;
  box-sizing: border-box;
  min-width: 0;
  min-height: 64px;
  padding: 8px 18px;
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--shop-border) 76%, transparent);
  border-radius: 13px;
  background: color-mix(in srgb, var(--panel) 95%, #fffaf3);
  color: var(--muted);
  font: inherit;
  font-size: 15px;
  font-weight: 850;
  line-height: 1.45;
  text-align: right;
  cursor: pointer;
  transition: border-color .16s ease, background .16s ease, color .16s ease, box-shadow .16s ease, transform .16s ease;
}
.shop-audience-tab > svg {
  display: block;
  flex: 0 0 auto;
  width: 21px;
  height: 21px;
  color: currentColor;
}
.shop-audience-tab > span {
  min-width: 0;
  overflow-wrap: anywhere;
}
.shop-audience-tab:hover {
  border-color: color-mix(in srgb, var(--orange) 35%, var(--shop-border));
  background: color-mix(in srgb, var(--orange-soft) 44%, var(--panel));
  color: color-mix(in srgb, var(--orange) 74%, var(--ink));
}
.shop-audience-tab.on,
.shop-audience-tab[aria-pressed="true"] {
  border-color: #9a3412;
  background: linear-gradient(135deg, #c2410c 0%, #ad370e 52%, #9a3412 100%);
  color: #fff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .24), 0 7px 18px rgba(221, 74, 0, .22);
}
.shop-audience-tab:active { transform: translateY(1px); }
.shop-audience-tab:focus-visible {
  position: relative;
  z-index: 2;
  outline: 3px solid color-mix(in srgb, var(--orange) 32%, transparent);
  outline-offset: -1px;
}

/* ردیف بالای فیلتر بعد از انتقال مخاطب، فقط برای جست‌وجو و پاک‌سازی است. */
.shop-filter-top {
  grid-template-columns: minmax(260px, 520px) auto;
  align-items: center;
  justify-content: start;
}
.shop-filter-search {
  width: min(100%, 520px);
  margin-right: 0;
  margin-left: auto;
}
.shop-filter-search input { font-size: 13px; }
.shop-filter-primary > span,
.shop-filter-group > span { font-size: 11.5px; }
.shop-filter-chip { font-size: 11.5px; line-height: 1.35; }
.shop-filter-reset { margin-right: 0; margin-left: auto; font-size: 11.5px; }

/* عنوان نتایج و تایپوگرافی کارت‌ها؛ ارتفاع‌ها عمداً دست‌نخورده/فشرده‌اند. */
.shop-results { gap: 14px; }
.shop-results-head .eyebrow { font-size: 11px; }
.shop-results-head h1,
.shop-results-head h2 {
  margin: 3px 0 0;
  font-size: 21px;
  font-weight: 900;
  line-height: 1.45;
  letter-spacing: -.015em;
}
.shop-result-count { font-size: 11.5px; }
.shop-grid { gap: 12px; }
.shop-card {
  gap: 7px;
  padding: 13px;
}
.shop-card-head {
  gap: 10px;
  min-height: 56px;
  padding-inline-end: 0;
}
.shop-card-title h3 {
  margin-bottom: 0;
  font-size: 15px;
  line-height: 1.35;
}
.shop-card-title p {
  -webkit-line-clamp: 1;
  font-size: 11.5px;
  line-height: 1.4;
}
.shop-card-audience {
  margin-bottom: 1px;
  padding: 1px 7px;
  font-size: 10.5px;
  line-height: 1.3;
}
.shop-card .shop-card-scope { gap: 3px; }
.shop-card .shop-chip {
  padding: 2px 6px;
  font-size: 10.5px;
  line-height: 1.35;
}
.shop-card .shop-plan-picker legend {
  margin-bottom: 3px;
  font-size: 11px;
  line-height: 1.35;
}
.shop-plan-grid,
.shop-card .shop-plan-grid,
.shop-buybox .shop-plan-grid {
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 4px;
  min-width: 0;
  overflow: visible;
}
.shop-card .shop-plan-option {
  min-width: 0;
  min-height: 44px;
  padding: 3px 1px;
}
.shop-card .shop-plan-option > span,
.shop-buybox .shop-plan-option > span {
  max-width: 100%;
  font-size: 10.75px;
  line-height: 1.12;
  white-space: nowrap;
}
.shop-card .shop-real-choice {
  max-width: 100%;
  font-size: 7.25px;
  line-height: 1.1;
}
.shop-card .shop-exam-choice {
  min-height: 44px;
  margin-top: 4px;
}
.shop-card .shop-exam-choice b { font-size: 11px; line-height: 1.25; }
.shop-card .shop-exam-choice small { font-size: 9.75px; line-height: 1.3; }
.shop-card .shop-price-caption { margin-bottom: 0; font-size: 9.75px; line-height: 1.25; }
.shop-card-price > .shop-card-price-line,
.shop-card-price-line {
  gap: 2px 8px;
  min-height: 30px;
}
.shop-card-price-line strong {
  gap: 3px;
  font-size: 22px;
  line-height: 1.2;
}
.shop-card-price-line strong span,
.shop-card-price-line del {
  font-size: 10.75px;
  line-height: 1.25;
}
.shop-card-actions .primary-button,
.shop-card-actions .ghost-button {
  min-height: 44px;
  font-size: 11.5px;
  line-height: 1.3;
}

@media (max-width: 1440px) {
  .shop-grid { gap: 11px; }
  .shop-card { gap: 7px; padding: 13px; }
  .shop-card-title h3 { font-size: 15px; }
}

@media (max-width: 1024px) {
  .shop-page { gap: 12px; }
  .shop-audience-tabs { width: min(100%, 860px); }
  .shop-filter-groups { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .shop-filter-group.lesson { grid-column: 1 / -1; }
  .shop-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .shop-plan-grid,
  .shop-card .shop-plan-grid,
  .shop-buybox .shop-plan-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); }
}

@media (max-width: 720px) {
  .shop-page { gap: 10px; }
  .shop-audience-tabs {
    width: 100%;
    min-height: 60px;
    margin-right: 0;
    margin-left: 0;
    padding: 4px;
    gap: 4px;
    border-radius: 15px;
  }
  .shop-audience-tab {
    min-height: 52px;
    padding: 6px 8px;
    gap: 6px;
    border-radius: 11px;
    font-size: 10.25px;
    line-height: 1.35;
  }
  .shop-audience-tab > svg { width: 17px; height: 17px; }
  .shop-filter-top,
  .shop-filter-groups { grid-template-columns: minmax(0, 1fr); }
  .shop-filter-search { width: 100%; margin-left: 0; }
  .shop-filter-search input { font-size: 12.5px; }
  .shop-filter-reset { min-height: 44px; }
  .shop-filter-group.lesson { grid-column: auto; }
  .shop-filter-primary,
  .shop-filter-group { grid-template-columns: 56px minmax(0, 1fr); }
  .shop-filter-primary > span,
  .shop-filter-group > span { font-size: 11px; }
  .shop-filter-chip { min-height: 44px; font-size: 11px; }
  .shop-results-head .eyebrow { font-size: 10.5px; }
  .shop-results-head h1,
  .shop-results-head h2 { font-size: 18px; }
  .shop-result-count { font-size: 10.5px; }
  .shop-grid { grid-template-columns: minmax(0, 1fr); gap: 10px; }
  .shop-card { gap: 7px; padding: 12px; }
  .shop-card-title h3 { font-size: 14.5px; }
  .shop-card-title p { font-size: 10.5px; }
  .shop-card-audience,
  .shop-card .shop-chip { font-size: 10px; }
  .shop-card .shop-plan-picker legend { font-size: 10.5px; }
  .shop-plan-grid,
  .shop-card .shop-plan-grid,
  .shop-buybox .shop-plan-grid {
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 3px;
  }
  .shop-card .shop-plan-option,
  .shop-buybox .shop-plan-option { min-width: 0; min-height: 44px; padding-inline: 0; }
  .shop-card .shop-plan-option > span,
  .shop-buybox .shop-plan-option > span { font-size: 10px; }
  .shop-card-price-line strong { font-size: 20px; }
  .shop-card-price-line strong span,
  .shop-card-price-line del { font-size: 10px; }
  .shop-card-actions .primary-button,
  .shop-card-actions .ghost-button { min-height: 44px; font-size: 10.75px; }
}

@media (max-width: 420px) {
  .shop-audience-tabs { min-height: 68px; gap: 3px; }
  .shop-audience-tab {
    flex-direction: column;
    justify-content: center;
    gap: 3px;
    min-height: 60px;
    padding: 5px 3px;
    font-size: 10px;
    line-height: 1.3;
    text-align: center;
  }
  .shop-audience-tab > svg { width: 17px; height: 17px; }
  .shop-audience-tab > span { max-width: 100%; }
  .shop-card-title h3 { font-size: 14px; }
  .shop-card-title p { font-size: 10px; }
  .shop-card .shop-plan-option > span,
  .shop-buybox .shop-plan-option > span { font-size: 10px; }
  .shop-card-price-line strong { font-size: 20px; }
  .shop-card-actions .primary-button,
  .shop-card-actions .ghost-button { font-size: 10.5px; }
}

@media (max-width: 390px) {
  .store-public .content { padding-inline: 9px; }
  .shop-card { gap: 6px; padding: 11px; }
  .shop-card-head { gap: 8px; min-height: 52px; padding-inline-end: 0; }
  .shop-card-title h3 { font-size: 14px; }
  .shop-card-title p { font-size: 10px; }
  .shop-card .shop-chip { font-size: 10px; }
  .shop-plan-grid,
  .shop-card .shop-plan-grid,
  .shop-buybox .shop-plan-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 3px; }
  .shop-card .shop-plan-option,
  .shop-buybox .shop-plan-option { min-height: 44px; }
  .shop-card .shop-plan-option > span,
  .shop-buybox .shop-plan-option > span { font-size: 10px; }
  .shop-card-price-line strong { font-size: 20px; }
  .shop-card-price-line strong span,
  .shop-card-price-line del { font-size: 10px; }
}

@media (prefers-reduced-motion: reduce) {
  .shop-audience-tab { transition: none; }
  .shop-audience-tab:active { transform: none; }
}

/* ═══════════════════════════════════════════════════════════════════════
   فروشگاه — ستون فیلترِ کناری، سگمنت مخاطب و مقیاس خوانا
   این لایه آخرین حرف را می‌زند: نوار فیلتر افقی به ستون راست رفت، سه کارت
   بلندِ مخاطب جای خود را به یک سگمنت متنی داد و اندازه‌های ریزِ لایه‌های
   «کارت فشرده» روی قیمت، تخفیف و متن کارت بازنویسی شد.
   ═══════════════════════════════════════════════════════════════════════ */
.shop-layout {
  display: grid;
  grid-template-columns: 262px minmax(0, 1fr);
  gap: 18px;
  align-items: start;
  min-width: 0;
}
.shop-main {
  display: grid;
  gap: 16px;
  min-width: 0;
}

/* ستون فیلتر (سمت راست، چسبان) */
.shop-side {
  position: sticky;
  inset-block-start: 88px;
  display: grid;
  gap: 15px;
  box-sizing: border-box;
  min-width: 0;
  max-height: calc(100vh - 108px);
  overflow: auto;
  padding: 16px;
  border: 1px solid var(--shop-border);
  border-radius: 18px;
  background: var(--panel);
  box-shadow: 0 10px 30px rgba(24, 36, 60, .06);
  scrollbar-width: thin;
}
.shop-side-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-width: 0;
}
.shop-side-head h2 {
  margin: 0;
  font-size: 15.5px;
  font-weight: 900;
  letter-spacing: -.01em;
}
.shop-side-reset {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-height: 30px;
  padding: 3px 9px;
  border: 1px solid var(--shop-border);
  border-radius: 9px;
  background: var(--panel);
  color: var(--muted);
  font: inherit;
  font-size: 11.5px;
  font-weight: 750;
  cursor: pointer;
  white-space: nowrap;
  transition: border-color .16s ease, color .16s ease, background .16s ease;
}
.shop-side-reset:hover { border-color: var(--orange); background: var(--orange-soft); color: #b8480a; }
.shop-side-reset .ui-icon { width: 13px; height: 13px; }
.shop-side-search {
  position: relative;
  display: flex;
  align-items: center;
  min-width: 0;
  min-height: 44px;
  border: 1px solid var(--shop-border);
  border-radius: 12px;
  background: var(--shop-soft);
  transition: border-color .16s ease, box-shadow .16s ease, background .16s ease;
}
.shop-side-search:focus-within {
  border-color: var(--blue);
  background: var(--panel);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--blue) 14%, transparent);
}
.shop-side-search input {
  width: 100%;
  min-width: 0;
  height: 42px;
  padding: 0 38px 0 12px;
  border: 0;
  outline: 0;
  background: transparent;
  font: inherit;
  font-size: 12.5px;
}
.shop-side-search .search-glyph {
  position: absolute;
  inset-inline-start: 13px;
  top: 50%;
  width: 16px;
  height: 16px;
  transform: translateY(-50%);
  color: var(--muted);
}
.shop-side-group {
  display: grid;
  gap: 8px;
  min-width: 0;
  padding-top: 13px;
  border-top: 1px solid color-mix(in srgb, var(--shop-border) 70%, transparent);
}
.shop-side-group h3 {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
}
.shop-side-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  min-width: 0;
}
.shop-side-chip {
  flex: 0 1 auto;
  max-width: 100%;
  min-height: 34px;
  padding: 5px 11px;
  border: 1px solid color-mix(in srgb, var(--shop-border) 90%, transparent);
  border-radius: 10px;
  background: var(--panel);
  color: var(--ink);
  font: inherit;
  font-size: 12.5px;
  font-weight: 750;
  line-height: 1.4;
  cursor: pointer;
  overflow-wrap: anywhere;
  text-align: center;
  transition: border-color .16s ease, background .16s ease, color .16s ease, box-shadow .16s ease;
}
.shop-side-chip:hover {
  border-color: color-mix(in srgb, var(--blue) 48%, var(--shop-border));
  background: var(--blue-soft);
}
.shop-side-chip.on {
  border-color: var(--shop-navy);
  background: var(--shop-navy);
  color: #fff;
  box-shadow: 0 5px 12px rgba(24, 36, 60, .14);
}
.shop-side-chip:focus-visible,
.shop-side-reset:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--blue) 30%, transparent);
  outline-offset: 1px;
}

/* عنوان نتایج فقط برای صفحه‌خوان می‌ماند: ردیفِ دیداری‌اش (عنوان + شمار نتیجه)
   برداشته شد چون بالای صفحه را می‌گرفت و چیزی به انتخاب کاربر اضافه نمی‌کرد. */
.shop-results-title {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

/* سگمنت مخاطب: متن‌محور، هم‌عرض، بدون آیکون */
.shop-aud {
  display: inline-flex;
  gap: 4px;
  box-sizing: border-box;
  width: fit-content;
  max-width: 100%;
  margin-inline: auto;
  margin-block: 0;
  padding: 4px;
  border: 1px solid var(--shop-border);
  border-radius: 14px;
  background: var(--shop-soft);
}
.shop-aud-item {
  display: grid;
  place-items: center;
  align-content: center;
  gap: 1px;
  min-width: 0;
  min-height: 48px;
  padding: 6px 22px;
  border: 1px solid transparent;
  border-radius: 11px;
  background: transparent;
  color: var(--muted);
  font: inherit;
  cursor: pointer;
  text-align: center;
  transition: background .16s ease, color .16s ease, border-color .16s ease, box-shadow .16s ease;
}
.shop-aud-item b {
  font-size: 14.5px;
  font-weight: 900;
  line-height: 1.35;
  white-space: nowrap;
}
.shop-aud-item small {
  font-size: 10.75px;
  font-weight: 750;
  line-height: 1.2;
  opacity: .78;
  white-space: nowrap;
}
.shop-aud-item:hover { background: var(--panel); color: var(--ink); }
.shop-aud-item.on {
  border-color: var(--shop-navy);
  background: var(--shop-navy);
  color: #fff;
  box-shadow: 0 7px 18px rgba(24, 36, 60, .18);
}
.shop-aud-item.on small { opacity: .82; }
.shop-aud-item:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--blue) 32%, transparent);
  outline-offset: -1px;
}

/* جایگزینِ سگمنت برای حسابِ واردشده: نوعِ اشتراک انتخابی نیست، پس به‌جای سه
   تبِ کلیک‌شدنی فقط گفته می‌شود این فهرست برای چه نوع حسابی است. */
.shop-aud-locked {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  box-sizing: border-box;
  width: fit-content;
  max-width: 100%;
  margin-inline: auto;
  margin-block: 0;
  padding: 9px 14px;
  border: 1px solid var(--shop-border);
  border-radius: 14px;
  background: var(--shop-soft);
  color: var(--muted);
  font-size: 13px;
  font-weight: 750;
  line-height: 1.5;
}
.shop-aud-locked b { color: var(--ink); font-weight: 900; }
.shop-aud-locked svg {
  flex: none;
  width: 17px;
  height: 17px;
  opacity: .8;
}

/* سربرگ نتایج و مقیاس متنِ کارت */
.shop-results-head h1,
.shop-results-head h2 { font-size: 23px; }
.shop-results-head .eyebrow { font-size: 11.5px; }
.shop-result-count { min-height: 32px; font-size: 12.5px; }
.shop-grid { grid-template-columns: repeat(auto-fill, minmax(322px, 1fr)); gap: 14px; }
.shop-card { gap: 9px; padding: 15px; }
.shop-card-head { gap: 11px; min-height: 58px; }
.shop-card-title h3 { font-size: 16.5px; line-height: 1.4; }
.shop-card-title p { font-size: 12.25px; line-height: 1.5; }
.shop-card-audience { padding: 2px 8px; font-size: 11px; line-height: 1.4; }
.shop-card .shop-chip { padding: 3px 8px; font-size: 11.5px; line-height: 1.45; }
.shop-card .shop-plan-picker legend { margin-bottom: 5px; font-size: 12.25px; }
.shop-card .shop-plan-option { min-height: 46px; padding: 4px 2px; }
.shop-card .shop-plan-option > span { font-size: 12px; line-height: 1.2; }
.shop-card .shop-real-choice { font-size: 8.5px; }
.shop-card .shop-exam-choice { min-height: 48px; }
.shop-card .shop-exam-choice b { font-size: 12.25px; }
.shop-card .shop-exam-choice small { font-size: 11px; }
.shop-card-actions .primary-button,
.shop-card-actions .ghost-button { min-height: 46px; font-size: 12.5px; }

/* قیمت: خط‌خوردهٔ سمت راست، قیمت نهایی سمت چپِ آن، نشانِ تخفیف بالای ردیف */
.shop-price-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-width: 0;
}
.shop-card .shop-price-caption { margin-bottom: 0; font-size: 11.25px; line-height: 1.35; }
.shop-card-price > .shop-card-price-line,
.shop-card-price-line {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 4px 10px;
  min-height: 36px;
}
.shop-card-price-line del,
.shop-buybox-total del {
  color: #8b96a9;
  font-size: 14px;
  font-weight: 750;
  line-height: 1.3;
  font-variant-numeric: tabular-nums;
  text-decoration: line-through;
  text-decoration-color: #e2542a;
  text-decoration-thickness: 2px;
  text-underline-offset: 0;
  white-space: nowrap;
}
.shop-card-price-line strong { font-size: 25px; line-height: 1.22; }
.shop-card-price-line strong span { font-size: 12.25px; font-weight: 800; }
.shop-card .shop-price-off,
.shop-buybox .shop-price-off {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 2px 11px;
  border-radius: 999px;
  background: linear-gradient(135deg, #ff6817, #ff9245);
  color: #fff;
  box-shadow: 0 6px 14px rgba(226, 79, 0, .22);
  font-size: 12.5px;
  font-weight: 900;
  line-height: 1;
  white-space: nowrap;
}

/* جعبهٔ خرید در صفحهٔ جزئیات با همان ترتیب و مقیاس */
.shop-detail-media .shop-cover-discount {
  top: -9px;
  right: -9px;
  min-width: 52px;
  min-height: 30px;
  padding: 3px 10px;
  border-radius: 9px;
  font-size: 14px;
  font-weight: 900;
}
.shop-buybox-label,
.shop-buybox-label b { font-size: 12px; }
.shop-buybox-total {
  flex-wrap: wrap;
  justify-content: flex-start;
  gap: 5px 11px;
}
.shop-buybox-total strong { font-size: 28px; }
.shop-buybox-total strong small { font-size: 12px; }
.shop-buybox-saving { font-size: 12px; }
.shop-buybox-saving b { font-size: 13px; font-variant-numeric: tabular-nums; }

@media (max-width: 1200px) {
  .shop-layout { grid-template-columns: 234px minmax(0, 1fr); gap: 14px; }
  .shop-grid { grid-template-columns: repeat(auto-fill, minmax(288px, 1fr)); }
}

@media (max-width: 980px) {
  /* ستون کناری در موبایل به یک بلوکِ کوتاهِ بالای فهرست تبدیل می‌شود:
     برچسبِ هر محور کنار چیپ‌ها می‌نشیند تا ارتفاع سه برابر نشود. */
  .shop-layout { grid-template-columns: minmax(0, 1fr); }
  .shop-side {
    position: static;
    gap: 10px;
    max-height: none;
    overflow: visible;
    padding: 12px 13px;
    border-radius: 16px;
  }
  .shop-side-search { min-height: 42px; }
  .shop-side-search input { height: 40px; }
  .shop-side-group {
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr);
    align-items: center;
    gap: 8px;
    padding-top: 9px;
  }
  .shop-side-group h3 { font-size: 11.5px; }
  .shop-side-chip { min-height: 36px; }
  .shop-grid { grid-template-columns: repeat(auto-fill, minmax(272px, 1fr)); }
}

@media (max-width: 720px) {
  .shop-aud { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); width: 100%; }
  .shop-aud-item { padding: 6px 6px; }
  .shop-aud-item b { font-size: 12.5px; white-space: normal; }
  .shop-aud-item small { font-size: 10px; }
  .shop-grid { grid-template-columns: minmax(0, 1fr); }
  .shop-card-price-line strong { font-size: 23px; }
  .shop-card-price-line del,
  .shop-buybox-total del { font-size: 13px; }
  .shop-card .shop-price-off { font-size: 11.5px; }
  .shop-results-head h1,
  .shop-results-head h2 { font-size: 19px; }
}

@media (max-width: 420px) {
  .shop-aud-item { min-height: 52px; }
  .shop-card-price-line strong { font-size: 22px; }
  .shop-card .shop-plan-option > span { font-size: 11px; }
}

@media (prefers-reduced-motion: reduce) {
  .shop-aud-item,
  .shop-side-chip { transition: none; }
}

/* ═══════════════════════════════════════════════════════════════════════
   فروشگاه — ردیف «تا کنکور»، آیکون امکانات و فشرده‌سازی صفحهٔ جزئیات
   ═══════════════════════════════════════════════════════════════════════ */
/* ردیف کنکور: تاریخ برگزاری کنار روزهای مانده + دکمهٔ صریحِ «انتخاب» */
.shop-exam-choice {
  min-height: 46px;
  margin-top: 6px;
  padding: 5px 8px 5px 9px;
  border-radius: 11px;
}
.shop-card .shop-exam-choice,
.shop-buybox .shop-exam-choice { min-height: 46px; margin-top: 6px; }
.shop-exam-choice > label { gap: 8px; }
.shop-exam-copy {
  display: grid;
  gap: 1px;
  min-width: 0;
}
.shop-card .shop-exam-choice b,
.shop-buybox .shop-exam-choice b { font-size: 12.25px; line-height: 1.35; }
.shop-card .shop-exam-choice small,
.shop-buybox .shop-exam-choice small {
  color: var(--muted);
  font-size: 10.75px;
  font-weight: 700;
  line-height: 1.35;
  white-space: nowrap;
}
/* دکمهٔ «انتخاب»: عرض ثابت در هر دو حالت تا با انتخاب‌شدن جابه‌جا نشود، و
   متن و تیک دقیقاً وسطِ قرص. انتخابگر عمداً از `.shop-exam-choice > label`
   شروع می‌شود: قاعدهٔ قدیمیِ `> label > span` (flex + baseline + min-width:0)
   وگرنه هم مرکزچینی و هم عرضِ کمینه را می‌خورد و متن ۸px بالاتر می‌نشست. */
.shop-exam-choice > label > .shop-exam-pick,
.shop-exam-pick {
  display: grid;
  grid-auto-flow: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  flex: 0 0 auto;
  box-sizing: border-box;
  margin-inline-start: auto;
  min-width: 92px;
  min-height: 30px;
  padding: 0 12px;
  border: 1px solid color-mix(in srgb, var(--shop-accent, var(--blue)) 40%, var(--shop-border));
  border-radius: 999px;
  background: var(--panel);
  color: color-mix(in srgb, var(--shop-accent, var(--blue)) 82%, var(--ink));
  font-size: 11.5px;
  font-weight: 900;
  line-height: 1;
  white-space: nowrap;
  transition: background .16s ease, color .16s ease, border-color .16s ease;
}
.shop-exam-pick > span {
  display: block;
  line-height: 1.15;
}
.shop-exam-pick .ui-icon,
.shop-exam-pick-icon {
  display: block;
  flex: none;
  width: 13px;
  height: 13px;
  margin: 0;
  stroke-width: 2.8;
  vertical-align: middle;
}
.shop-exam-choice:hover .shop-exam-pick {
  border-color: var(--shop-accent, var(--blue));
  background: color-mix(in srgb, var(--shop-accent, var(--blue)) 10%, var(--panel));
}
.shop-exam-choice.on .shop-exam-pick,
.shop-exam-choice:has(input:checked) .shop-exam-pick {
  border-color: var(--shop-accent, var(--blue));
  background: var(--shop-accent, var(--blue));
  color: #fff;
}

/* دکمه‌های کارت و خرید: کوتاه‌تر، ولی روی موبایل هنوز ۴۴ پیکسل لمسی */
.shop-card-actions .primary-button,
.shop-card-actions .ghost-button { min-height: 40px; }
.shop-buy { min-height: 44px; font-size: 12.5px; }

/* آیکون امکانات: خطی و هم‌خانوادهٔ جلدِ محصول */
.shop-cap-glyph {
  display: block;
  flex: 0 0 auto;
  width: 17px;
  height: 17px;
  color: var(--shop-accent, var(--blue));
}
.shop-capability { gap: 8px; padding: 8px 11px; font-size: 12px; }

/* صفحهٔ جزئیات: فاصلهٔ بلوک‌ها و پدینگ داخلی کم شد */
.shop-detail { gap: 12px; }
.shop-detail-hero { gap: 14px; }
.shop-detail-main { padding: 20px; }
.shop-buybox { gap: 12px; padding: 16px; }
.shop-block { padding: 16px 18px; }
.shop-block-head { margin-bottom: 12px; padding-bottom: 9px; }
.shop-block-head h2 { font-size: 15px; }
.shop-highlights { gap: 7px 14px; }
.shop-highlights li { font-size: 13px; line-height: 1.75; }
.shop-features { gap: 10px; }
.shop-feature { padding: 12px; }
.shop-feature h4 { font-size: 13px; }
.shop-feature p { font-size: 12px; line-height: 1.75; }
.shop-prose { font-size: 13px; line-height: 1.95; }
.shop-detail-counts { margin: 12px 0 0; gap: 8px; }

@media (max-width: 720px) {
  .shop-card-actions .primary-button,
  .shop-card-actions .ghost-button { min-height: 44px; }
  .shop-buy { min-height: 48px; }
  .shop-exam-choice { min-height: 48px; }
  .shop-exam-pick { min-height: 30px; }
  .shop-detail-main { padding: 16px; }
  .shop-block { padding: 14px 15px; }
}

/* ═══ کارگاه نمودار و شکل ═══════════════════════════════════════════════════
   دو ستون: فرمِ باریک و بومِ چسبان. بوم چسبان است چون فرم بلند می‌شود و
   مدیر باید همزمان با عوض‌کردنِ عدد، نتیجه را ببیند — پایین‌رفتنِ فرم نباید
   شکل را از صفحه بیرون ببرد.

   دستگیره‌ها روی SVGِ دومی می‌نشینند که دقیقاً روی رسم می‌افتد؛ هر دو یک
   viewBox دارند، پس هماهنگی‌شان کارِ CSS نیست و با هر عرضی درست می‌ماند. */
.fst-body { display: grid; gap: 12px; }
/* بوم سهمِ بزرگ‌تر را می‌گیرد: در مودالِ باریک، ستونِ فرمِ ۳۵۰پیکسلیِ ثابت
   بوم را به ۲۸۰ می‌رساند و رسم عملاً غیرقابلِ کار می‌شد. */
.fst-stage { display: grid; grid-template-columns: minmax(220px, 280px) minmax(420px, 2fr); gap: 10px; align-items: start; }
/* **یک** ناحیهٔ اسکرول، نه دو تا. ستونِ فرم قبلاً خودش اسکرول داشت و مودال هم
   اسکرول داشت با نوارِ پنهان: چرخِ ماوس بسته به اینکه اشاره‌گر کجا بود کارِ
   متفاوتی می‌کرد، و `overscroll-behavior: contain` وقتی ستون ته می‌کشید مودال را
   هم قفل می‌کرد. حالا فقط خودِ مودال اسکرول می‌شود و ستونِ بوم چسبان می‌ماند. */
.fst-side { min-width: 0; }

/* ردیفِ پرش بین بخش‌ها — چسبان بالای ستون تا در هر ارتفاعِ اسکرول در دسترس بماند */
.fst-jump {
  position: sticky; top: calc(var(--fst-head, 0px) + 6px); z-index: 3; display: flex; flex-wrap: wrap; gap: 4px;
  margin: -2px -2px 2px; padding: 6px 4px; border-radius: 10px;
  background: #faf8f4ee; backdrop-filter: blur(6px);
}
.fst-jump button {
  padding: 4px 9px; border: 1px solid var(--line); border-radius: 999px; background: #fff;
  color: #6f665a; font: inherit; font-size: 9px; font-weight: 700; cursor: pointer; white-space: nowrap;
}
.fst-jump button:hover { border-color: var(--teal); color: #0f766e; }

.fst-alignbar { display: inline-flex; gap: 2px; padding: 2px; border-radius: 9px; background: #eef6f5; }
/* دو دکمهٔ قرینه یک جفت‌اند و مثل نوارِ زوم کنار هم در یک قاب می‌نشینند */
.fst-mirrorbar { display: inline-flex; gap: 2px; padding: 2px; border: 1px solid var(--line); border-radius: 9px; background: #faf8f4; }
.fst-alignbar[hidden] { display: none; }
/* `grid-template-columns: minmax(0,1fr)` لازم است: بدونش نوارِ ابزار با
   min-content خودش ستون را پهن‌تر از سهمِ واقعی می‌کند و بوم از ستون بیرون می‌زند. */
/* بوم زیرِ سربرگِ چسبانِ مودال می‌ماند، نه پشتِ آن. ارتفاعِ سربرگ ثابت نیست
   (عنوان و توضیحش با عرضِ پنجره می‌پیچند)، پس همان لحظه اندازه گرفته می‌شود و
   در `--fst-head` می‌نشیند؛ عددِ ثابت اولین باری که متن یک خط بلندتر شود بوم را
   نصفه زیرِ سربرگ می‌بُرد. */
.fst-main { position: sticky; top: calc(var(--fst-head, 0px) + 6px); min-width: 0; display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; align-self: start; }

.fst-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; min-width: 0; }
.fst-tools { display: flex; flex-wrap: wrap; gap: 4px; padding: 3px; border: 1px solid var(--line); border-radius: 11px; background: #faf8f4; }
.fst-toolbar-right { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-inline-start: auto; }
.fst-tool {
  display: grid; place-items: center; width: 30px; height: 30px; padding: 0;
  border: 1px solid transparent; border-radius: 8px; background: transparent; color: #6d6455; cursor: pointer;
}
.fst-tool:hover { background: #fff; border-color: var(--line); }
.fst-tool.is-on { background: var(--teal); border-color: var(--teal); color: #fff; }
.fst-tool .ui-icon { width: 15px; height: 15px; }
.fst-snap { display: inline-flex; align-items: center; gap: 5px; color: var(--muted); font-size: 9.5px; cursor: pointer; }
.fst-restart { font-size: 10px; }

/* ارتفاعِ بوم از JS می‌آید (`figureCanvasStyle`) چون به نسبتِ ابعادِ همان شکل
   گره خورده؛ این فقط سقفِ محافظ است تا اگر style خالی بود بوم از صفحه نزند. */
.fst-canvas {
  position: relative; width: 100%; max-height: calc(100vh - var(--fst-head, 0px) - 150px); margin-inline: auto;
  border: 0; border-radius: 0; background: transparent; overflow: hidden;
  touch-action: none;
}
.fst-canvas.is-drawing { cursor: crosshair; }
.fst-canvas.is-panning,
.fst-canvas.is-panning .fst-handle { cursor: grab; }
/* پوستهٔ بزرگ‌نمایی: تبدیل روی این می‌نشیند و هر دو لایه با هم می‌روند، پس
   دستگیره‌ها هیچ‌وقت از رسم جدا نمی‌افتند. */
.fst-zoom { position: absolute; inset: 0; }
.fst-art { position: absolute; inset: 0; display: grid; place-items: center; }
.fst-art svg { display: block; width: 100%; height: 100%; }
.fst-layer { position: absolute; inset: 0; width: 100%; height: 100%; }
.fst-handle { fill: #14b8a6; fill-opacity: 0.22; stroke: #0f766e; stroke-width: 1.2; cursor: grab; }
.fst-handle:hover { fill-opacity: 0.42; }
.fst-handle.is-on { fill: #f59e0b; fill-opacity: 0.5; stroke: #b45309; }
.fst-handle.is-pending { fill: #dc2626; fill-opacity: 0.45; stroke: #991b1b; }
.fst-handle.is-node { fill: #2563eb; fill-opacity: 0.24; stroke: #1d4ed8; }
.fst-handle.is-control { fill: #7c3aed; fill-opacity: 0.3; stroke: #6d28d9; stroke-dasharray: 2 2; }
.fst-tether { stroke: #7c3aed; stroke-width: 1; stroke-dasharray: 3 3; opacity: 0.55; }
.fst-pending { fill: #dc2626; fill-opacity: 0.7; }
/* ردِ ابزارِ چندنقطه‌ای و قلمِ آزاد: بدونش سه کلیکِ چندضلعی فقط سه نقطهٔ جداست
   و کسی نمی‌فهمد شکل دارد ساخته می‌شود. */
.fst-trace { fill: none; stroke: #dc2626; stroke-width: 1.3; stroke-dasharray: 5 4; opacity: 0.75; }
.fst-trace.is-live { stroke: #0f766e; stroke-dasharray: none; stroke-width: 1.8; opacity: 0.9; }
.fst-marquee { fill: #14b8a6; fill-opacity: 0.09; stroke: #0f766e; stroke-width: 1; stroke-dasharray: 4 3; }
.fst-align { stroke: #f59e0b; stroke-width: 0.9; stroke-dasharray: 4 4; opacity: 0.8; }
/* نشانهٔ چفت باید دیده شود: چفتِ نامرئی یعنی نقطه جای دیگری می‌افتد و کسی
   نمی‌فهمد چرا. شکل هر نوع چفت فرق دارد تا از هم تشخیص داده شوند. */
.fst-snap { fill: #fff; stroke: #0f766e; stroke-width: 1.6; }
.fst-snap.is-mid { stroke: #7c3aed; transform-box: fill-box; transform-origin: center; transform: rotate(45deg); }
.fst-snap.is-cross { fill: #f59e0b; stroke: #b45309; transform-box: fill-box; transform-origin: center; transform: rotate(45deg); }
/* چفت روی خودِ منحنی — دایره، تا از نشانِ لوزیِ «وسطِ ضلع» و «تقاطع» جدا باشد */
.fst-snap.is-curve { fill: #2e7cb8; stroke: #1d5b8c; rx: 5; ry: 5; }
.fst-snap.is-align { fill: none; stroke: #f59e0b; }
.fst-canvas.is-drawing .fst-handle { cursor: crosshair; }
.fst-zoombar { display: inline-flex; align-items: center; gap: 2px; padding: 2px; border: 1px solid var(--line); border-radius: 9px; background: #faf8f4; }
.fst-zoomlevel {
  min-width: 40px; padding: 3px 4px; border: 0; border-radius: 6px; background: transparent;
  color: #6d6455; font: inherit; font-size: 8.5px; cursor: pointer;
}
.fst-zoomlevel:hover { background: #fff; }
/* منو روی body می‌نشیند نه داخلِ بوم: بوم overflow:hidden دارد و منو را می‌بُرد. */
/* منوی راست‌کلیک و کادرِ ویرایشِ درجا هر دو به <body> منتقل می‌شوند، ولی خودِ
   کارگاه داخلِ `.modal-root` است که z-index 100000 دارد. با عددِ کوچک، هر دو
   *پشتِ* مودال رسم می‌شدند: کلیک روی عدد چیزی باز می‌کرد که هیچ‌وقت دیده نمی‌شد.
   بالای مودال ولی زیرِ توست‌های سیستم (100060) — همان قراردادِ برشِ آواتار. */
.fst-menu {
  position: fixed; z-index: 100040; min-width: 168px; padding: 4px;
  border: 1px solid var(--line); border-radius: 11px; background: #fff;
  box-shadow: 0 6px 22px #0000001f;
}
.fst-menu button {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  width: 100%; padding: 6px 9px; border: 0; border-radius: 8px; background: transparent;
  color: #554d42; font: inherit; font-size: 9.5px; text-align: start; cursor: pointer;
}
.fst-menu button:hover:not(:disabled) { background: #f3f0e9; }
.fst-menu button:disabled { opacity: 0.4; cursor: default; }
.fst-menu small { color: var(--muted); font-size: 8px; }
/* مستطیلِ برچسب: تا وقتی ماوس رویش نرفته تقریباً نامرئی است — بوم باید شکل را
   نشان بدهد نه داربستِ ویرایش. */
.fst-labelbox { fill: #14b8a6; fill-opacity: 0; stroke: #0f766e; stroke-opacity: 0; stroke-width: 1; cursor: move; }
.fst-labelbox:hover { fill-opacity: 0.12; stroke-opacity: 0.6; }
.fst-labelbox.is-on { fill-opacity: 0.16; stroke-opacity: 0.9; stroke: #b45309; fill: #f59e0b; }
.fst-labelbox.is-tick { cursor: text; }
.fst-canvas.is-drawing .fst-labelbox { pointer-events: none; }
/* ویرایشگرِ درجا روی body می‌نشیند، مثل منو: بوم overflow:hidden دارد. */
.fst-inline {
  position: fixed; z-index: 100040; display: grid; gap: 4px; padding: 7px;
  border: 1px solid var(--teal); border-radius: 10px; background: #fff;
  box-shadow: 0 8px 26px #0000002e;
}
.fst-inline input {
  width: 200px; padding: 6px 9px; border: 1px solid var(--line); border-radius: 7px;
  background: #fff; color: #3c352c; font: inherit; font-size: 13px; font-weight: 700;
}
.fst-inline input:focus { border-color: var(--teal); outline: none; }
.fst-inline small { color: var(--muted); font-size: 8.5px; text-align: center; }
.fst-blank { color: var(--muted); font-size: 10.5px; }
.fst-toolhint { margin: 0; color: var(--muted); font-size: 9.5px; line-height: 1.8; }
.fst-readout { display: flex; justify-content: flex-end; }
.fst-readout small { display: inline-flex; align-items: center; gap: 8px; color: var(--muted); font-size: 8.5px; }

/* ── گالریِ قالب‌ها ───────────────────────────────────────────────────────
   تصویرِ هر کارت با همان موتورِ اصلی ساخته می‌شود، پس قالبِ خراب همان‌جا
   خراب دیده می‌شود. */
.fst-gallery { display: grid; gap: 14px; }
.fst-gallery-lead { margin: 0; color: var(--muted); font-size: 10px; line-height: 1.85; }
.fst-ai-start {
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 12px;
  padding: 14px; border: 1px solid color-mix(in srgb, var(--teal) 42%, var(--line)); border-radius: 14px;
  background: linear-gradient(135deg, #f4fbfa, #fffdfa); box-shadow: 0 5px 18px #1b716510;
}
.fst-ai-start.is-busy { opacity: .78; }
.fst-ai-icon { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 11px; background: var(--teal); color: #fff; }
.fst-ai-icon .ui-icon { width: 21px; height: 21px; }
.fst-ai-start h4 { margin: 0 0 4px; color: #3d514d; font-size: 13px; }
.fst-ai-start p { margin: 0; color: var(--muted); font-size: 10px; line-height: 1.8; }
.fst-ai-start .primary-button { white-space: nowrap; }
.fst-ai-result {
  display: grid; grid-template-columns: 110px minmax(0, 1fr); align-items: center; gap: 10px; margin-bottom: 12px; padding: 10px 12px; border: 1px solid #b9ded6;
  border-radius: 12px; background: #f3fbf9; color: #3d514d; font-size: 10px; line-height: 1.8;
}
.fst-ai-result > img { display: block; width: 110px; height: 74px; object-fit: contain; border: 1px solid #dfeae7; border-radius: 8px; background: #fff; }
.fst-ai-result > div { display: grid; gap: 5px; min-width: 0; }
.fst-ai-result strong { display: flex; align-items: center; gap: 6px; font-size: 11px; }
.fst-ai-result .ui-icon { width: 15px; height: 15px; color: var(--teal); }
.fst-ai-result ul { margin: 0; padding-inline-start: 18px; color: #8a6131; }
.fst-gallery-group h4 { margin: 0 0 8px; color: #554d42; font-size: 10.5px; font-weight: 850; }
.fst-gallery-note { margin: -4px 0 9px; color: var(--muted); font-size: 9px; line-height: 1.85; }
.fst-gallery-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(168px, 1fr)); gap: 10px; }
.fst-card {
  display: grid; gap: 5px; padding: 9px; text-align: start;
  border: 1px solid var(--line); border-radius: 12px; background: #fff; cursor: pointer;
}
.fst-card:hover { border-color: var(--teal); box-shadow: 0 1px 7px #0000000f; }
/* `max-width/max-height` روی SVGِ درون‌خطی نسبت را نگه نمی‌دارد: پهنا محدود
   می‌شود ولی بلندا از viewBox می‌آید و کارت را از پایین می‌بُرد — نتیجه‌اش کارتی
   بود که نیمهٔ بالایش سفید می‌ماند و نمودار ته آن له می‌شد. با `width/height:100%`
   خودِ `preserveAspectRatio` (پیش‌فرضِ meet) کادر را درست پر می‌کند. */
.fst-card-art { display: block; height: 112px; overflow: hidden; border-radius: 8px; background: #fbfaf7; }
.fst-card-art svg { display: block; width: 100%; height: 100%; }
.fst-card b { color: #554d42; font-size: 10px; }
.fst-card small { color: var(--muted); font-size: 8.5px; line-height: 1.75; }

/* ── فرم ─────────────────────────────────────────────────────────────────── */
.fst-editor { display: grid; gap: 9px; }
.fst-block { padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
.fst-block > summary { display: flex; align-items: center; gap: 8px; cursor: pointer; list-style: none; }
.fst-block > summary::-webkit-details-marker { display: none; }
.fst-block > summary::before {
  content: ""; flex: none; width: 6px; height: 6px; border-inline-end: 1.6px solid #b7ad9d; border-block-end: 1.6px solid #b7ad9d;
  transform: rotate(-45deg); transition: transform 0.14s ease;
}
.fst-block[open] > summary::before { transform: rotate(45deg); }
.fst-block > summary h4 { margin: 0; }
.fst-block h4 { margin: 0 0 8px; color: #554d42; font-size: 10.5px; font-weight: 850; }
.fst-block.is-plain h4 { margin-bottom: 8px; }
.fst-block[open] > summary { margin-bottom: 8px; }
.fst-count { margin-inline-start: auto; padding: 2px 7px; border-radius: 7px; background: #f3f0e9; color: #6d6455; font-size: 8.5px; }
.fst-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 8px; }
.fst-field { display: grid; gap: 4px; min-width: 0; }
.fst-field.wide { grid-column: span 2; }
.fst-field > span { color: var(--muted); font-size: 8.5px; }
.fst-field input,
.fst-field select {
  width: 100%; padding: 6px 8px; border: 1px solid var(--line); border-radius: 8px;
  background: #fffdfa; color: inherit; font: inherit; font-size: 10.5px;
}
.fst-field input:focus,
.fst-field select:focus { border-color: var(--teal); outline: none; }
.fst-check { grid-auto-flow: column; justify-content: start; align-items: center; gap: 6px; cursor: pointer; }
.fst-check input { width: auto; }
.fst-check > span { color: #6d6455; font-size: 9.5px; }
.fst-row { margin-bottom: 8px; padding: 9px 10px; border: 1px solid #ece6dc; border-radius: 10px; background: #fdfcfa; }
.fst-row.is-on { border-color: var(--teal); background: #f7fcfb; }
.fst-row-head { display: flex; align-items: center; gap: 4px; margin-bottom: 7px; }
.fst-row-head b { flex: 1; min-width: 0; color: #554d42; font-size: 9.5px; }
.fst-pieces { grid-column: 1 / -1; display: grid; gap: 7px; }
.fst-piece { padding: 8px; border: 1px dashed #dcd3c6; border-radius: 9px; background: #fff; }
.fst-piece-head { display: flex; align-items: center; gap: 6px; margin-bottom: 6px; }
.fst-piece-head b { flex: 1; color: #62594c; font-size: 9px; }
.fst-del { display: grid; place-items: center; width: 22px; height: 22px; padding: 0; border: 0; border-radius: 7px; background: #f6efef; color: #b34141; cursor: pointer; }
.fst-del:hover { background: #f2e0e0; }
.fst-del .ui-icon { width: 12px; height: 12px; }
/* دو دکمهٔ ترتیبِ لایه کنارِ حذف می‌نشینند ولی هشدارِ قرمز نیستند — رنگِ خنثی
   تا «یک لایه جلوتر» با «حذف» اشتباه گرفته نشود. */
.fst-del[data-fst-order] { background: #f1efe9; color: #6d6455; }
.fst-del[data-fst-order]:hover { background: #e7e3d9; }
.fst-empty { margin: 0 0 8px; color: var(--muted); font-size: 9.5px; }
.fst-add { width: 100%; font-size: 10px; }
.fst-hint { margin: 0 0 9px; color: var(--muted); font-size: 9.5px; line-height: 1.85; }
.fst-hint code { padding: 1px 5px; border-radius: 5px; background: #f3f0e9; font-family: ui-monospace, Menlo, monospace; font-size: 9px; }
.fst-solve { display: inline-flex; align-items: center; gap: 5px; font-size: 8.5px; }
.fst-solve.is-ok { color: #256b5c; }
.fst-solve.is-warn { color: #aa621d; }
.fst-solve .ui-icon { width: 11px; height: 11px; }
.fst-footer span { color: var(--muted); font-size: 9px; }
.fst-footer .left { margin-inline-start: auto; }

@media (max-width: 900px) {
  .fst-ai-start { grid-template-columns: auto minmax(0, 1fr); }
  .fst-ai-start .primary-button { grid-column: 1 / -1; width: 100%; }
  .fst-ai-result { grid-template-columns: minmax(0, 1fr); }
  .fst-ai-result > img { width: 100%; height: 120px; }
  .fst-stage { grid-template-columns: minmax(0, 1fr); }
  /* تک‌ستونه که شد، بوم باید *بالا* بیفتد: فرم بلند است و اگر اول بیاید، شکل
     چند صفحه پایین‌تر می‌ماند و رابطهٔ «عدد را عوض کن، نتیجه را ببین» می‌شکند. */
  .fst-main { position: static; order: -1; }
  .fst-field.wide { grid-column: span 1; }
}

/* ═══════════════════════ اعتبار چاپ ═══════════════════════
   واحدش «یک سؤال یکتا»ست، پس همه‌جا عدد بزرگ و واحد کوچک کنارش می‌آید؛
   رنگِ کمبود هشدار است نه خطا، چون راهِ حل همان‌جا (دکمهٔ شارژ) هست. */

/* نشانِ موجودی در نوار استودیوی چاپ */
.pstudio-credit {
  display: inline-flex; align-items: center; gap: 6px;
  border: 1px solid var(--line); background: var(--panel); color: var(--ink);
  border-radius: 999px; padding: 5px 12px 5px 9px; font: inherit; cursor: pointer;
  transition: border-color .15s ease, background .15s ease;
}
.pstudio-credit:hover { border-color: var(--orange); background: var(--panel-soft); }
.pstudio-credit .ui-icon { width: 15px; height: 15px; color: var(--orange); }
.pstudio-credit span { font-size: 12.5px; font-weight: 900; }
.pstudio-credit em { font-style: normal; font-size: 10px; font-weight: 700; color: var(--muted); }

/* پاپ‌آپِ کمبود اعتبار و کیف */
.pcredit-modal { display: grid; gap: 14px; }
.pcredit-hero {
  display: flex; align-items: center; gap: 12px; padding: 13px 14px;
  border: 1px solid var(--line); border-radius: 14px; background: var(--panel-soft);
}
.pcredit-hero .ui-icon { width: 26px; height: 26px; flex: none; color: var(--orange); }
.pcredit-hero b { display: block; font-size: 16px; font-weight: 900; }
.pcredit-hero.big b { font-size: 20px; }
.pcredit-hero small { display: block; margin-top: 4px; font-size: 12.5px; line-height: 1.95; color: var(--muted); }

.pcredit-breakdown { display: grid; gap: 0; margin: 0; padding: 0; list-style: none;
  border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.pcredit-breakdown li {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 11px 13px; font-size: 13px; background: var(--panel);
}
.pcredit-breakdown li + li { border-top: 1px solid var(--line); }
.pcredit-breakdown li span { color: var(--muted); }
.pcredit-breakdown li b { font-weight: 900; }
.pcredit-breakdown li.ok b { color: #1f7a5f; }
.pcredit-breakdown li.short { background: #fff6ec; }
.pcredit-breakdown li.short b { color: #b4600f; }

.pcredit-buy { display: grid; gap: 10px; padding: 13px 14px; border: 1px solid var(--line); border-radius: 14px; }
.pcredit-buy h4 { display: flex; align-items: center; gap: 6px; margin: 0; font-size: 13.5px; font-weight: 900; }
.pcredit-buy h4 .ui-icon { width: 15px; height: 15px; color: var(--teal); }
.pcredit-packs { display: grid; grid-template-columns: repeat(auto-fit, minmax(96px, 1fr)); gap: 8px; }
.pcredit-pack {
  display: grid; gap: 1px; justify-items: center; padding: 9px 6px;
  border: 1px solid var(--line); border-radius: 12px; background: var(--panel);
  font: inherit; color: var(--ink); cursor: pointer;
  transition: border-color .15s ease, background .15s ease, box-shadow .15s ease;
}
.pcredit-pack:hover { border-color: var(--teal); }
.pcredit-pack.on { border-color: var(--teal); background: rgba(31, 157, 118, .09); box-shadow: inset 0 0 0 1px var(--teal); }
.pcredit-pack b { font-size: 16px; font-weight: 900; }
.pcredit-pack span { font-size: 11px; color: var(--muted); }
.pcredit-pack em { font-style: normal; font-size: 11.5px; font-weight: 700; color: var(--muted); }
/* «یا تعداد دلخواه» — یک کادرِ جمع‌وجور با دو دکمهٔ کم/زیاد.
   فلشِ بومیِ input[type=number] در راست‌به‌چپ سمتِ غلط می‌افتد و ارتفاعش با
   بقیهٔ فرم نمی‌خواند، پس خاموش شده و جایش دکمهٔ واقعی آمده. فوکوس عمداً
   بی‌رنگ است: این کادر انتخابِ عدد است، نه چیزی که باید توجه بگیرد. */
.pcredit-custom {
  display: flex; align-items: center; justify-content: space-between;
  gap: 10px; flex-wrap: wrap;
}
.pcredit-custom > label { font-size: 12.5px; font-weight: 800; color: var(--muted); }
.pcredit-amount {
  display: inline-flex; align-items: center;
  border: 1px solid var(--line); border-radius: 10px; background: var(--panel);
  overflow: hidden; transition: border-color .15s ease;
}
/* این کادر عمداً هیچ رنگی نمی‌گیرد — نه در هاور، نه در فوکوس، نه هنگام انتخابِ
   متن. یک ورودیِ عدد است، نه چیزی که باید توجه بگیرد؛ حلقهٔ نارنجیِ سراسریِ
   `input:focus-visible` هم بالاتر برایش خاموش شده. */
.pcredit-amount,
.pcredit-amount:hover,
.pcredit-amount:focus-within { border-color: var(--line); }
.pcredit-amount input,
.pcredit-amount input:hover,
.pcredit-amount input:focus { background: transparent; box-shadow: none; }
.pcredit-amount input::selection { background: rgba(37, 35, 31, .1); }
.pcredit-amount input {
  width: 94px; min-height: 40px; padding: 0 8px;
  border: 0; outline: 0; background: transparent; color: var(--ink);
  font: inherit; font-size: 15px; font-weight: 900; text-align: center;
}
.pcredit-amount input::-webkit-outer-spin-button,
.pcredit-amount input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.pcredit-amount input[type="number"] { -moz-appearance: textfield; appearance: textfield; }
.pcredit-step {
  width: 34px; min-height: 40px; border: 0; background: var(--panel-soft);
  color: var(--muted); font: inherit; font-size: 17px; font-weight: 900;
  line-height: 1; cursor: pointer; transition: background .15s ease, color .15s ease;
}
.pcredit-step:hover { background: #f1eee8; color: var(--ink); }
.pcredit-step:focus-visible { box-shadow: none; background: #f1eee8; }
.pcredit-min-note { margin: 0; font-size: 12px; font-weight: 700; color: #b4600f; }
.pcredit-total { margin: 0; font-size: 13px; }
.pcredit-total b { font-size: 16px; font-weight: 900; }
.pcredit-total small { color: var(--muted); font-size: 11.5px; }
.pcredit-modal .primary-button[disabled] { opacity: .45; cursor: not-allowed; }
.pcredit-note {
  display: flex; align-items: flex-start; gap: 7px; margin: 0;
  font-size: 12.5px; line-height: 1.95; color: var(--muted);
}
.pcredit-note .ui-icon { width: 17px; height: 17px; flex: none; margin-top: 1px; color: var(--orange); }

/* گردش اعتبار */
.pcredit-history h4 { display: flex; align-items: center; gap: 6px; margin: 0 0 8px; font-size: 13.5px; font-weight: 900; }
.pcredit-history h4 .ui-icon { width: 15px; height: 15px; color: var(--muted); }
.pcredit-ledger { display: grid; gap: 0; margin: 0; padding: 0; list-style: none;
  border: 1px solid var(--line); border-radius: 12px; overflow: hidden; max-height: 240px; overflow-y: auto; }
.pcredit-ledger li {
  display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; gap: 10px;
  padding: 10px 12px; font-size: 12.5px; background: var(--panel);
}
.pcredit-ledger li + li { border-top: 1px solid var(--line); }
.pcredit-ledger-kind { font-weight: 800; }
.pcredit-ledger-kind small { display: block; font-weight: 600; font-size: 11px; color: var(--muted); }
.pcredit-ledger-when { font-size: 11px; color: var(--muted); }
.pcredit-ledger li b { font-weight: 900; }
.pcredit-ledger li.in b { color: #1f7a5f; }
.pcredit-ledger li.out b { color: #b4600f; }
.pcredit-empty { padding: 18px 0; }

/* کارت فروشگاه */
.pcredit-block-body { display: grid; gap: 11px; }
.pcredit-block-actions { display: flex; gap: 8px; flex-wrap: wrap; }

/* هدیهٔ خرید در مودال پرداخت موفق */
.shop-order-reward {
  display: flex; align-items: center; gap: 8px; margin: 10px 0 0; padding: 10px 12px;
  border-radius: 12px; background: rgba(31, 157, 118, .1); font-size: 13px; line-height: 1.95;
}
.shop-order-reward .ui-icon { width: 17px; height: 17px; flex: none; color: #1f7a5f; }

/* تب اعتبار چاپ در پنل مدیر
   کارتِ نرخ عرضِ ثابت می‌گیرد و فهرستِ کیف‌ها باقیِ فضا را. */
.pcredit-admin-grid { grid-template-columns: minmax(0, 340px) minmax(0, 1fr); align-items: start; }
@media (max-width: 1080px) { .pcredit-admin-grid { grid-template-columns: minmax(0, 1fr); } }

/* کیف کاربران: ردیفِ کارتی به‌جای جدول — هیچ اسکرول افقی و هیچ نامِ بریده. */
.pcredit-wallets { align-content: start; }
.pcw-tools { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 12px; }
.pcw-search { position: relative; display: flex; align-items: center; flex: 1 1 220px; }
.pcw-search > .ui-icon {
  position: absolute; inset-inline-start: 12px; width: 15px; height: 15px;
  color: var(--muted); pointer-events: none;
}
.pcw-search input {
  width: 100%; box-sizing: border-box; padding: 10px 12px; padding-inline-start: 33px;
  border: 1px solid var(--line); border-radius: 11px; background: var(--panel);
  font: inherit; font-size: 12px; color: var(--ink);
}
.pcw-search input::-webkit-search-cancel-button { -webkit-appearance: none; }
.pcw-search input:focus-visible { outline: none; border-color: var(--orange); box-shadow: 0 0 0 3px var(--orange-soft); }

/* ترتیب: چیپِ کوچک کنارِ جست‌وجو. رندرِ فهرست دست به این نمی‌زند، پس فوکوسِ
   صفحه‌کلید روی دکمه‌ای که تازه زده شده می‌ماند. */
.pcw-sort { display: flex; align-items: center; gap: 4px; flex: none; }
.pcw-sort > span { font-size: 10px; color: var(--muted); margin-inline-end: 2px; }
.pcw-sort button {
  padding: 6px 10px; border: 1px solid var(--line); border-radius: 9px;
  background: var(--panel); font: inherit; font-size: 11px; font-weight: 700;
  color: var(--muted); cursor: pointer; transition: .15s ease;
}
.pcw-sort button:hover { color: var(--ink); border-color: #e3d7c6; }
.pcw-sort button.on { background: var(--ink); border-color: var(--ink); color: #fff; }

.pcw-list {
  display: grid; gap: 8px; max-height: 520px; overflow-y: auto;
  padding-inline-end: 2px; margin-block-start: 2px;
}
.pcw-row {
  display: flex; align-items: center; flex-wrap: wrap; gap: 10px 14px;
  padding: 10px 12px; border: 1px solid var(--line); border-radius: 13px;
  background: var(--panel); transition: .15s ease;
}
.pcw-row:hover { border-color: #e3d7c6; box-shadow: 0 4px 12px rgba(67, 52, 35, .06); }

.pcw-user { display: flex; align-items: center; gap: 9px; min-width: 0; flex: 1 1 190px; }
.pcw-avatar { width: 32px; height: 32px; border-radius: 10px; }
.pcw-id { display: grid; gap: 2px; min-width: 0; }
.pcw-id strong { font-size: 12.5px; font-weight: 800; color: var(--ink); overflow-wrap: anywhere; }
.pcw-id small { display: flex; align-items: center; gap: 6px; font-size: 10.5px; color: var(--muted); }
.pcw-id small i { font-style: normal; unicode-bidi: isolate; }
.pcw-role {
  display: inline-flex; align-items: center; gap: 4px; flex: none;
  padding: 2px 7px; border-radius: 7px; background: var(--panel-soft);
  border: 1px solid var(--line); font-size: 9.5px; font-weight: 700; color: #6f6a60;
}
.pcw-role svg { width: 11px; height: 11px; flex: none; }

.pcw-metrics { display: flex; align-items: stretch; gap: 6px; flex: 0 1 auto; }
.pcw-metric {
  display: grid; gap: 2px; justify-items: center; align-content: center;
  min-width: 74px; padding: 5px 9px; border-radius: 10px; background: var(--panel-soft);
}
.pcw-metric i { font-style: normal; font-size: 9.5px; font-weight: 600; color: var(--muted); white-space: nowrap; }
.pcw-metric b { font-size: 13px; font-weight: 900; color: var(--ink); font-variant-numeric: tabular-nums; }
.pcw-metric.is-balance { background: var(--teal-soft); }
.pcw-metric.is-balance b { color: #12796c; }
/* ستونی که فهرست بر اساسش چیده شده، تا نگاه بداند کدام عدد ترتیب را ساخته.
   حلقه عمداً کم‌رنگ است: روی «موجودی» کنارِ پس‌زمینهٔ فیروزه‌ای می‌نشیند. */
.pcw-metric.is-sorted { box-shadow: inset 0 0 0 1.5px rgba(255, 107, 24, .5); }
.pcw-metric.is-sorted i { color: #c05212; }

.pcw-charge {
  display: inline-flex; align-items: center; gap: 5px; flex: none;
  margin-inline-start: auto; padding: 7px 12px; border-radius: 10px;
  border: 1px solid var(--line); background: var(--panel);
  font: inherit; font-size: 11.5px; font-weight: 800; color: var(--ink);
  cursor: pointer; transition: .15s ease;
}
.pcw-charge .ui-icon { width: 14px; height: 14px; color: var(--orange); }
.pcw-charge:hover { border-color: #efb58b; background: var(--orange-soft); color: #c05212; }
.pcw-charge:hover .ui-icon { color: #c05212; }
/* دکمه‌های ردیف: «سهمیه» (سقفِ دستیِ همین حساب) کنارِ «شارژ». */
.pcw-actions { display: inline-flex; align-items: center; gap: 6px; flex: none; margin-inline-start: auto; }
.pcw-actions .pcw-charge { margin-inline-start: 0; }
.pcw-quota {
  display: inline-flex; align-items: center; gap: 5px; flex: none;
  padding: 7px 11px; border-radius: 10px;
  border: 1px solid var(--line); background: var(--panel);
  font: inherit; font-size: 11.5px; font-weight: 800; color: var(--muted);
  cursor: pointer; transition: .15s ease;
}
.pcw-quota .ui-icon { width: 14px; height: 14px; color: var(--muted); }
.pcw-quota:hover { border-color: #e3d7c6; color: var(--ink); }
.pcw-quota.is-custom { background: var(--teal-soft); border-color: transparent; color: #12796c; }
.pcw-quota.is-custom .ui-icon { color: #12796c; }

.pcw-foot {
  display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px;
  font-size: 10.5px; color: var(--muted);
}
.pcw-foot .secondary-button { font-size: 11px; padding: 6px 11px; }

.pcw-empty {
  display: grid; justify-items: center; gap: 4px; text-align: center;
  padding: 26px 16px; border: 1px dashed var(--line); border-radius: 13px; background: var(--panel);
}
.pcw-empty-icon {
  display: grid; place-items: center; width: 40px; height: 40px; margin-bottom: 4px;
  border-radius: 13px; background: var(--orange-soft); color: var(--orange);
}
.pcw-empty-icon .ui-icon { width: 20px; height: 20px; }
.pcw-empty b { font-size: 12.5px; font-weight: 900; color: var(--ink); }
.pcw-empty-note { font-size: 10.5px; line-height: 1.9; color: var(--muted); max-width: 320px; }

@media (max-width: 620px) {
  /* اسکرولِ تودرتو روی موبایل آزاردهنده است؛ فهرست همان‌جا باز می‌شود. */
  .pcw-list { max-height: none; overflow: visible; }
  .pcw-metrics { flex: 1 1 100%; }
  .pcw-metric { flex: 1 1 0; min-width: 0; }
  .pcw-charge { margin-inline-start: 0; flex: 1 1 100%; justify-content: center; }
  .pcw-actions { flex: 1 1 100%; margin-inline-start: 0; }
  .pcw-actions .pcw-charge, .pcw-actions .pcw-quota { flex: 1 1 0; justify-content: center; }
}
.pcredit-two { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 10px; }
.pcredit-admin-actions { display: flex; justify-content: flex-end; }
.pcredit-admin-preview {
  margin: 0; padding: 9px 11px; border-radius: 11px; background: var(--panel);
  border: 1px dashed var(--line); font-size: 10.5px; line-height: 2; color: var(--muted);
}
.pcredit-admin-preview b { color: var(--ink); font-weight: 900; }

@media (prefers-color-scheme: dark) {
  .pcredit-breakdown li.short { background: rgba(180, 96, 15, .16); }
}

@media (max-width: 640px) {
  .pcredit-ledger li { grid-template-columns: minmax(0, 1fr) auto; }
  .pcredit-ledger-when { grid-column: 1 / -1; }
}

/* ═══════════════════ گزارش و تحلیل فروشگاه (srep-*) ═══════════════════
   پوستهٔ یکسان برای هر هشت بلوکِ گزارش: سربرگ + نمودار + نوار عددهای ریز.
   نمودارها با `direction:ltr` کشیده می‌شوند (زمان از چپ به راست، همان قرارِ
   بقیهٔ نمودارهای پنل) ولی متنِ اطرافشان راست‌به‌چپ می‌ماند. */
.srep { display: grid; gap: 18px; min-width: 0; }
.srep > * { min-width: 0; }

/* ───── نوار بازه ───── */
.srep-toolbar {
  display: grid; gap: 11px; padding: 14px 15px;
  border: 1px solid var(--line); border-radius: 15px; background: var(--panel-soft);
}
.srep-toolbar-row { display: flex; flex-wrap: wrap; align-items: center; gap: 9px; }
.srep-toolbar-label {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 11px; font-weight: 800; color: var(--muted); white-space: nowrap;
}
.srep-toolbar-label .ui-icon { width: 15px; height: 15px; }
.srep-chips, .srep-grains { display: flex; flex-wrap: wrap; gap: 6px; }
.srep-chip, .srep-grain {
  border: 1px solid var(--line); background: var(--panel); color: var(--muted);
  border-radius: 999px; padding: 6px 13px; font: inherit; font-size: 11.5px;
  font-weight: 700; cursor: pointer; transition: background .15s ease, color .15s ease, border-color .15s ease;
}
.srep-chip:hover, .srep-grain:hover { color: var(--ink); }
.srep-chip.on, .srep-grain.on {
  color: var(--orange); background: var(--orange-soft);
  border-color: color-mix(in srgb, var(--orange) 26%, var(--line));
}
.srep-grains { border-radius: 999px; }
.srep-switch { display: inline-flex; align-items: center; gap: 7px; font-size: 11.5px; color: var(--muted); cursor: pointer; }
.srep-switch input { accent-color: var(--orange); width: 15px; height: 15px; }
.srep-toolbar-actions { display: flex; gap: 7px; margin-inline-start: auto; }
.srep-toolbar-actions button { padding: 6px 12px; font-size: 11.5px; }
.srep-range-picker {
  display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px;
  padding: 11px; border: 1px dashed var(--line); border-radius: 13px; background: var(--panel);
}
.srep-range-col { display: flex; align-items: center; gap: 6px; }
.srep-range-col small { font-size: 11px; font-weight: 800; color: var(--muted); }
.srep-range-col select {
  border: 1px solid var(--line); border-radius: 9px; background: var(--panel-soft);
  padding: 6px 9px; font: inherit; font-size: 11.5px; color: var(--ink);
}
.srep-range-note {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px;
  font-size: 11px; color: var(--muted); padding-top: 3px;
}
.srep-range-note .ui-icon { width: 14px; height: 14px; }
.srep-range-note b { color: var(--ink); font-weight: 800; }
.srep-warn {
  font-style: normal; color: var(--red); background: var(--red-soft);
  border-radius: 8px; padding: 3px 9px; font-size: 10.5px; font-weight: 700;
}

/* ───── کارت‌های سرشاخه ───── */
.srep-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(215px, 1fr)); gap: 11px; }
.srep-kpi {
  position: relative; display: flex; align-items: flex-start; gap: 11px;
  padding: 14px 15px; border: 1px solid var(--line); border-radius: 15px;
  background: var(--panel); box-shadow: var(--shadow); min-width: 0;
}
.srep-kpi-icon {
  flex: 0 0 auto; display: grid; place-items: center; width: 36px; height: 36px;
  border-radius: 11px; background: var(--panel-soft); color: var(--muted);
}
.srep-kpi-icon .ui-icon { width: 18px; height: 18px; }
.srep-kpi.tone-blue .srep-kpi-icon { background: var(--blue-soft); color: var(--blue); }
.srep-kpi.tone-teal .srep-kpi-icon { background: var(--teal-soft); color: var(--teal); }
.srep-kpi.tone-purple .srep-kpi-icon { background: var(--purple-soft); color: var(--purple); }
.srep-kpi.tone-orange .srep-kpi-icon { background: var(--orange-soft); color: var(--orange); }
.srep-kpi-body { display: grid; gap: 3px; min-width: 0; }
.srep-kpi-body small { font-size: 11px; color: var(--muted); font-weight: 700; }
.srep-kpi-body strong { font-size: 17px; font-weight: 900; color: var(--ink); line-height: 1.35; }
.srep-kpi-body em { font-style: normal; font-size: 10.5px; color: var(--muted); line-height: 1.7; }
.srep-kpi-delta {
  position: absolute; inset-inline-end: 12px; top: 12px;
  display: inline-flex; align-items: center; gap: 2px;
  font-size: 11px; font-weight: 800; border-radius: 999px; padding: 2px 7px;
  background: var(--panel-soft); color: var(--muted);
}
.srep-kpi-delta .ui-icon { width: 12px; height: 12px; }
.srep-kpi-delta.up { background: var(--teal-soft); color: var(--teal); }
.srep-kpi-delta.down { background: var(--red-soft); color: var(--red); }

/* ───── بلوک نمودار ───── */
.srep-block {
  display: grid; gap: 12px; padding: 16px; min-width: 0;
  border: 1px solid var(--line); border-radius: 16px; background: var(--panel);
}
.srep-block-head { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 12px; }
.srep-block-head > div:first-child { flex: 1 1 260px; min-width: 0; }
.srep-block-head h3 {
  display: flex; align-items: center; gap: 7px; margin: 0 0 4px;
  font-size: 14px; font-weight: 900; color: var(--ink);
}
.srep-block-head h3 .ui-icon { width: 17px; height: 17px; color: var(--orange); }
.srep-block-head p { margin: 0; font-size: 11px; line-height: 1.9; color: var(--muted); }
.srep-tagline {
  display: inline-flex; align-items: center; gap: 6px; font-size: 11px; font-weight: 700;
  color: var(--muted); background: var(--panel-soft); border: 1px solid var(--line);
  border-radius: 999px; padding: 5px 11px; white-space: nowrap;
}
.srep-tagline .ui-icon { width: 14px; height: 14px; }
.srep-seg {
  display: inline-flex; gap: 2px; padding: 3px; border-radius: 11px;
  background: var(--panel-soft); border: 1px solid var(--line); flex: 0 0 auto;
}
.srep-seg button {
  border: 0; background: transparent; color: var(--muted); cursor: pointer;
  border-radius: 8px; padding: 5px 11px; font: inherit; font-size: 11px; font-weight: 700;
}
.srep-seg button:hover { color: var(--ink); }
.srep-seg button.on { background: var(--panel); color: var(--orange); box-shadow: 0 1px 3px rgba(41,36,29,.08); }

/* ───── خودِ نمودار ───── */
.srep-chart-wrap { position: relative; width: 100%; min-width: 0; }
.srep-chart { width: 100%; height: auto; display: block; overflow: visible; }
.srep-chart .srep-grid { stroke: var(--line); stroke-width: 1; fill: none; }
.srep-chart .srep-ytick, .srep-chart .srep-xtick { fill: var(--muted); font-size: 11px; font-family: inherit; }
.srep-chart .srep-ytick { text-anchor: end; }
.srep-chart .srep-xtick { text-anchor: middle; }
.srep-chart .srep-bar { transition: opacity .15s ease; }
.srep-chart .srep-compare {
  stroke: color-mix(in srgb, var(--ink) 45%, transparent);
  stroke-width: 1.8; stroke-dasharray: 5 4; stroke-linejoin: round; stroke-linecap: round;
}
.srep-chart .srep-cursor-band { fill: color-mix(in srgb, var(--orange) 9%, transparent); }
.srep-chart .srep-hit { cursor: crosshair; }
.srep-legend { display: flex; flex-wrap: wrap; gap: 5px 14px; }
.srep-legend-item {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 10.5px; font-weight: 700; color: var(--muted);
}
.srep-legend-item i { width: 10px; height: 10px; border-radius: 3px; flex: 0 0 auto; }
.srep-legend-item.compare i {
  background: none; border-top: 2px dashed color-mix(in srgb, var(--ink) 45%, transparent);
  height: 0; border-radius: 0; width: 16px;
}
.srep-tip {
  position: absolute; top: 4px; z-index: 40; min-width: 210px; max-width: 320px;
  background: var(--panel); border: 1px solid var(--line); border-radius: 13px;
  box-shadow: 0 12px 30px rgba(41, 36, 29, .16); padding: 10px 12px;
  pointer-events: none; opacity: 0; transform: translateY(-4px);
  transition: opacity .13s ease, transform .13s ease;
}
.srep-tip.on { opacity: 1; transform: translateY(0); }
.srep-tip-title {
  display: block; font-size: 12.5px; font-weight: 900; color: var(--ink);
  padding-bottom: 6px; border-bottom: 1px solid var(--line);
}
.srep-tip-total {
  display: flex; justify-content: space-between; align-items: baseline; gap: 10px;
  padding: 7px 0 5px; font-size: 11px; color: var(--muted);
}
.srep-tip-total b { font-size: 13px; font-weight: 900; color: var(--ink); }
.srep-tip-rows { display: grid; gap: 3px; max-height: 232px; overflow: auto; }
.srep-tip-row {
  display: grid; grid-template-columns: 10px minmax(0, 1fr) auto auto;
  gap: 7px; align-items: center; font-size: 11px;
}
.srep-tip-row i { width: 10px; height: 10px; border-radius: 3px; }
.srep-tip-name { color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.srep-tip-row b { font-weight: 800; color: var(--ink); white-space: nowrap; }
.srep-tip-row small { color: var(--muted); font-size: 10px; min-width: 34px; text-align: end; }
.srep-tip-empty { display: block; font-size: 11px; color: var(--muted); padding: 4px 0; }
.srep-tip-compare {
  display: flex; align-items: baseline; gap: 7px; margin-top: 7px; padding-top: 7px;
  border-top: 1px solid var(--line); font-size: 10.5px; color: var(--muted);
}
.srep-tip-compare b { color: var(--ink); font-weight: 800; }
.srep-tip-compare.up { color: var(--teal); }
.srep-tip-compare.down { color: var(--red); }
.srep-empty {
  display: grid; place-items: center; gap: 8px; padding: 38px 16px;
  border: 1px dashed var(--line); border-radius: 13px; color: var(--muted); font-size: 11.5px;
}
.srep-empty .ui-icon { width: 26px; height: 26px; opacity: .55; }

/* ───── نوار عددهای ریز ───── */
.srep-mini-row { display: flex; flex-wrap: wrap; gap: 8px; }
.srep-mini {
  display: grid; gap: 2px; flex: 1 1 130px; min-width: 0; padding: 9px 11px;
  border: 1px solid var(--line); border-radius: 11px; background: var(--panel-soft);
}
.srep-mini small { font-size: 10px; color: var(--muted); font-weight: 700; }
.srep-mini b { font-size: 13px; font-weight: 900; color: var(--ink); }
.srep-mini em { font-style: normal; font-size: 10px; color: var(--muted); }
.srep-mini.big b { font-size: 20px; color: var(--orange); }
.srep-hint { margin: 0; font-size: 11px; color: var(--muted); line-height: 1.9; }

/* ───── ترکیب مدت ───── */
.srep-mix-bar { display: flex; width: 100%; min-width: 120px; height: 11px; border-radius: 999px; overflow: hidden; background: var(--panel-soft); }
.srep-mix-seg { display: block; height: 100%; }
.srep-mix-col { min-width: 150px; }
.srep-mix-table td b { display: block; font-weight: 900; color: var(--ink); }
.srep-mix-table td small { display: block; font-size: 10px; color: var(--muted); }
.srep-mix-table td.muted { color: var(--muted); }
.srep-mix-total td { background: var(--panel-soft); }
.srep-aud { display: block; font-size: 10px; color: var(--muted); }
.srep-uid { color: var(--muted); font-size: 10px; }

/* ───── کنکور ───── */
.srep-konkur-grid { display: grid; grid-template-columns: minmax(0, 300px) minmax(0, 1fr); gap: 14px; align-items: start; }
.srep-konkur-stats { display: grid; gap: 8px; }
.srep-konkur-hist { display: grid; gap: 6px; padding: 13px; border: 1px solid var(--line); border-radius: 13px; background: var(--panel-soft); }
.srep-konkur-hist h4 { margin: 0 0 4px; font-size: 12px; font-weight: 800; color: var(--ink); }
.srep-hist-row { display: grid; grid-template-columns: 88px minmax(0, 1fr) 34px 40px; gap: 8px; align-items: center; font-size: 11px; }
.srep-hist-label { color: var(--muted); white-space: nowrap; }
.srep-hist-track { height: 9px; border-radius: 999px; background: var(--panel); border: 1px solid var(--line); overflow: hidden; }
.srep-hist-fill { display: block; height: 100%; background: linear-gradient(90deg, var(--orange), color-mix(in srgb, var(--orange) 55%, var(--yellow))); }
.srep-hist-row b { font-weight: 900; color: var(--ink); text-align: end; }
.srep-hist-row small { color: var(--muted); font-size: 10px; text-align: end; }

/* ───── جدول‌ها ───── */
.srep-subtable { display: grid; gap: 8px; }
.srep-subtable h4 { display: flex; align-items: center; gap: 6px; margin: 0; font-size: 12px; font-weight: 800; color: var(--ink); }
.srep-subtable h4 .ui-icon { width: 15px; height: 15px; color: var(--muted); }
.srep-dot { display: inline-block; width: 9px; height: 9px; border-radius: 3px; margin-inline-end: 6px; vertical-align: baseline; }
.srep-inline-delta { font-size: 10.5px; font-weight: 800; color: var(--muted); }
.srep-inline-delta.up { color: var(--teal); }
.srep-inline-delta.down { color: var(--red); }
.srep-matrix td { text-align: center; }
.srep-matrix td:first-child { text-align: start; white-space: nowrap; }
.srep-heat { background: color-mix(in srgb, var(--orange) calc(var(--heat) * 26%), transparent); font-weight: 700; }
.srep-foot {
  display: flex; align-items: flex-start; gap: 7px; margin: 0; padding: 11px 13px;
  border: 1px dashed var(--line); border-radius: 12px; background: var(--panel-soft);
  font-size: 11px; line-height: 1.9; color: var(--muted);
}
.srep-foot .ui-icon { width: 15px; height: 15px; flex: 0 0 auto; margin-top: 2px; }

@media (max-width: 980px) {
  .srep-konkur-grid { grid-template-columns: minmax(0, 1fr); }
  .srep-toolbar-actions { margin-inline-start: 0; width: 100%; }
}
@media (max-width: 640px) {
  .srep-block { padding: 13px; }
  .srep-hist-row { grid-template-columns: 74px minmax(0, 1fr) 30px 36px; }
  .srep-tip { min-width: 170px; max-width: 240px; }
}

/* کنترل‌های چندتاییِ سربرگ بلوک + فهرست رتبه‌ایِ زیر نمودارِ «مجموع» */
.srep-controls { display: flex; flex-wrap: wrap; gap: 7px; }
.srep-rank { display: flex; flex-wrap: wrap; gap: 6px 14px; padding-top: 2px; }
.srep-rank-item {
  display: inline-flex; align-items: baseline; gap: 6px;
  font-size: 11px; color: var(--muted);
}
.srep-rank-item i { width: 9px; height: 9px; border-radius: 3px; align-self: center; flex: 0 0 auto; }
.srep-rank-item b { font-weight: 900; color: var(--ink); }
.srep-rank-item small { font-size: 10px; }
.srep-chart .srep-bar-stack { stroke: var(--panel); stroke-width: .9; }
.srep-chart .srep-area { stroke: var(--panel); stroke-width: 1; }
.srep-chart .srep-axis-unit { fill: var(--muted); font-size: 10px; font-family: inherit; text-anchor: end; opacity: .85; }
.srep-switch.off { opacity: .5; cursor: not-allowed; }
.srep-switch.off input { cursor: not-allowed; }

/* ─────────── کارت‌های خلوتِ سرصفحهٔ فروشگاه + توضیح روی نشانگر ───────────
   قرار: روی کارت فقط «چه چیزی» و «چقدر» نوشته می‌شود. هر توضیحی که کارت را
   بلند می‌کند — سهم، درصد، مبنای مقایسه — زیر نشانگر می‌آید. هشت کارت عمداً
   چهارتا در ردیف می‌نشیند تا هیچ ردیفی نیمه‌خالی نماند؛ سه‌ستونه حذف شده
   چون ۸ بر ۳ بخش‌پذیر نیست و ردیف آخر لنگ می‌ماند. */
.shop-head-stats {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  overflow: visible;                 /* تولتیپ باید از کادر بیرون بزند */
}
/* چهار کارت در یک ردیفِ ~۸۸۰ پیکسلی یعنی هر کارت ~۲۱۵ پیکسل. با آیکون و
   نشانِ درصد، ستونِ متن چیزی حدود ۱۰۰ پیکسل می‌ماند — پس اندازه‌ها اینجا
   عمداً جمع‌وجورند تا «۱۳٫۷ میلیون» بریده نشود. */
.srep-kpi.compact {
  align-items: center;
  gap: 8px;
  padding: 11px 12px;
  overflow: visible;
}
.srep-kpi.compact .srep-kpi-icon { width: 28px; height: 28px; border-radius: 9px; }
.srep-kpi.compact .srep-kpi-icon .ui-icon { width: 15px; height: 15px; }
.srep-kpi.compact .srep-kpi-body { gap: 1px; }
.srep-kpi.compact .srep-kpi-body small { font-size: 10px; line-height: 1.5; }
.srep-kpi.compact .srep-kpi-body strong { font-size: 15px; line-height: 1.35; }
.srep-kpi.compact .srep-kpi-delta {
  position: static; align-self: center; margin-inline-start: auto; flex: 0 0 auto;
  font-size: 10px; padding: 2px 5px; gap: 1px;
}
.srep-kpi.compact .srep-kpi-delta .ui-icon { width: 10px; height: 10px; }
.srep-kpi.compact:hover, .srep-kpi.compact:focus-visible {
  border-color: color-mix(in srgb, var(--orange) 30%, var(--line));
  outline: none;
}

.kpi-tip {
  position: absolute; z-index: 60; top: calc(100% + 8px);
  inset-inline-start: 50%; transform: translate(50%, -4px);
  width: max-content; min-width: 210px; max-width: 300px;
  display: grid; gap: 3px; padding: 11px 13px; text-align: start;
  background: var(--panel); border: 1px solid var(--line); border-radius: 13px;
  box-shadow: 0 14px 34px rgba(41, 36, 29, .18);
  opacity: 0; pointer-events: none;
  transition: opacity .13s ease, transform .13s ease;
}
/* کارت‌های ستون آخر: تولتیپ به لبهٔ خودشان بچسبد تا از پنل بیرون نزند. */
.shop-head-stats > .srep-kpi:nth-child(4n + 1) .kpi-tip { inset-inline-start: 0; transform: translate(0, -4px); }
.shop-head-stats > .srep-kpi:nth-child(4n) .kpi-tip { inset-inline-start: 100%; transform: translate(100%, -4px); }
.srep-kpi.compact:hover .kpi-tip,
.srep-kpi.compact:focus-visible .kpi-tip { opacity: 1; transform: translate(50%, 0); }
.shop-head-stats > .srep-kpi:nth-child(4n + 1):hover .kpi-tip,
.shop-head-stats > .srep-kpi:nth-child(4n + 1):focus-visible .kpi-tip { transform: translate(0, 0); }
.shop-head-stats > .srep-kpi:nth-child(4n):hover .kpi-tip,
.shop-head-stats > .srep-kpi:nth-child(4n):focus-visible .kpi-tip { transform: translate(100%, 0); }

.kpi-tip-title {
  font-size: 12px; font-weight: 900; color: var(--ink);
  padding-bottom: 6px; margin-bottom: 3px; border-bottom: 1px solid var(--line);
}
.kpi-tip-row {
  display: grid; grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: baseline; gap: 4px 10px; font-size: 11px; color: var(--muted);
}
.kpi-tip-row > span { min-width: 0; }
.kpi-tip-row b { font-weight: 800; color: var(--ink); white-space: nowrap; }
.kpi-tip-row small { font-size: 10px; color: var(--muted); white-space: nowrap; min-width: 40px; text-align: end; }
.kpi-tip-note {
  margin-top: 5px; padding-top: 6px; border-top: 1px solid var(--line);
  font-style: normal; font-size: 10px; line-height: 1.8; color: var(--muted);
}

@media (max-width: 1180px) {
  .shop-head-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .shop-head-stats > .srep-kpi:nth-child(4n + 1) .kpi-tip,
  .shop-head-stats > .srep-kpi:nth-child(4n) .kpi-tip { inset-inline-start: 50%; transform: translate(50%, -4px); }
  .shop-head-stats > .srep-kpi:nth-child(odd) .kpi-tip { inset-inline-start: 0; transform: translate(0, -4px); }
  .shop-head-stats > .srep-kpi:nth-child(even) .kpi-tip { inset-inline-start: 100%; transform: translate(100%, -4px); }
  .shop-head-stats > .srep-kpi:nth-child(odd):hover .kpi-tip,
  .shop-head-stats > .srep-kpi:nth-child(odd):focus-visible .kpi-tip { transform: translate(0, 0); }
  .shop-head-stats > .srep-kpi:nth-child(even):hover .kpi-tip,
  .shop-head-stats > .srep-kpi:nth-child(even):focus-visible .kpi-tip { transform: translate(100%, 0); }
}
@media (max-width: 620px) {
  .shop-head-stats { grid-template-columns: minmax(0, 1fr); }
  .shop-head-stats > .srep-kpi .kpi-tip { inset-inline-start: 0; transform: translate(0, -4px); max-width: 100%; }
  .shop-head-stats > .srep-kpi:hover .kpi-tip,
  .shop-head-stats > .srep-kpi:focus-visible .kpi-tip { transform: translate(0, 0); }
}
/* عددِ کارت همیشه یک خط می‌ماند؛ عددِ غیرمنتظره‌بلند ردیف را بلند نمی‌کند و
   مقدارِ کاملش در توضیحِ زیر نشانگر هست. */
.srep-kpi.compact .srep-kpi-body { min-width: 0; }
.srep-kpi.compact .srep-kpi-body strong,
.srep-kpi.compact .srep-kpi-body small {
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

/* ═══════════════════════════════════════════════════════════════════════
   آزمون راهبردی (rb-) — فهرست برنامه‌ها، ویزارد و میز کارِ جدولی
   ═══════════════════════════════════════════════════════════════════════ */
.rb-panel {
  gap: 20px;
}

/* ── فهرست برنامه‌ها ── */
.rb-kicker {
  display: inline-flex; align-items: center; min-height: 27px; padding: 4px 10px; border-radius: 999px;
  background: var(--orange-soft); color: #b94d11; font-size: 11px; font-weight: 900;
}
.rb-list-head { display: flex; align-items: end; justify-content: space-between; gap: 14px; padding: 2px 2px 0; }
.rb-list-head > div { display: grid; gap: 2px; }
.rb-list-head b { color: var(--rb-navy); font-size: 15px; font-weight: 950; }
.rb-list-head span { color: var(--muted); font-size: 11.5px; font-weight: 700; }
.rb-list-head > small { flex: none; padding: 4px 9px; border-radius: 999px; background: #f2eee7; color: #776f64; font-size: 10.5px; font-weight: 850; }
.rb-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: 14px; }
.rb-card {
  position: relative; display: grid; gap: 13px; align-content: start; width: 100%;
  padding: 17px; border: 1px solid var(--rb-border); border-radius: 19px;
  background: #fff; box-shadow: 0 10px 26px rgba(48,42,34,.045);
  font: inherit; color: inherit; text-align: start; cursor: pointer; overflow: hidden;
  transition: transform .18s var(--ease-soft, ease), box-shadow .18s ease, border-color .18s ease;
}
.rb-card:hover { transform: translateY(-2px); border-color: #d9d0c2; box-shadow: 0 17px 38px rgba(48,42,34,.09); }
.rb-card:focus-visible { outline: 3px solid rgba(255,107,24,.2); outline-offset: 2px; border-color: var(--orange); }
.rb-card-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.rb-card-mark { display: inline-flex; align-items: center; justify-content: center; width: 38px; height: 38px; border-radius: 12px; background: var(--rb-navy-soft); color: var(--rb-navy); }
.rb-card-mark svg { width: 19px; height: 19px; }
.rb-card-title { display: grid; gap: 3px; min-width: 0; }
.rb-card-title b { color: var(--rb-navy); font-size: 15px; font-weight: 950; line-height: 1.7; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rb-card-title small { color: var(--muted); font-size: 11.5px; font-weight: 700; }
.rb-lock-chip, .rb-self-chip {
  flex: none; display: inline-flex; align-items: center; gap: 5px;
  padding: 4px 9px; border-radius: 999px; font-size: 10.5px; font-weight: 800; white-space: nowrap;
}
.rb-lock-chip { background: #fff3e6; color: #b06a20; }
.rb-self-chip { background: #f1f3f4; color: #5b6873; }
.rb-lock-chip svg, .rb-self-chip svg { width: 12px; height: 12px; }
.rb-card-stats { display: grid; grid-template-columns: .75fr .75fr 1.5fr; gap: 7px; }
.rb-card-stats span { display: grid; gap: 1px; padding: 9px 10px; border-radius: 11px; background: var(--rb-paper); }
.rb-card-stats b { color: var(--rb-navy); font-size: 14px; font-weight: 950; }
.rb-card-stats small { color: var(--muted); font-size: 9.5px; font-weight: 750; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rb-card-progress-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: -6px; color: var(--muted); font-size: 10.5px; font-weight: 750; }
.rb-card-progress-row b { color: var(--rb-navy); font-size: 11px; font-weight: 950; }
.rb-card-progress { height: 5px; border-radius: 999px; background: #f2ede4; overflow: hidden; }
.rb-card-progress i { display: block; height: 100%; border-radius: 999px; background: var(--orange); transition: width .3s ease; }
.rb-card-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding-top: 11px; border-top: 1px solid #f0ebe4; }
.rb-card-next, .rb-card-go { display: inline-flex; align-items: center; gap: 5px; font-size: 11.5px; font-weight: 800; }
.rb-card-next { min-width: 0; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rb-card-go { color: var(--orange); }
.rb-card-next svg, .rb-card-go svg { width: 13px; height: 13px; }
/* کارتِ «برنامهٔ تازه» — آخرین خانهٔ همان شبکه، هم‌قوارهٔ کارت‌های واقعی */
.rb-card-new {
  align-content: center; justify-items: center; gap: 9px;
  border-style: dashed; border-color: #ded5c6; background: #fcfaf6; box-shadow: none; text-align: center;
}
.rb-card-new-mark {
  display: inline-flex; align-items: center; justify-content: center; width: 46px; height: 46px;
  border-radius: 15px; background: var(--orange-soft); color: var(--orange);
  transition: background .16s ease, color .16s ease;
}
.rb-card-new-mark svg { width: 22px; height: 22px; }
.rb-card-new b { color: var(--rb-navy); font-size: 14.5px; font-weight: 950; }
.rb-card-new small { max-width: 32ch; color: var(--muted); font-size: 11px; font-weight: 700; line-height: 1.9; }
.rb-card-new:hover { border-style: solid; border-color: var(--orange); background: #fffaf5; box-shadow: 0 14px 30px rgba(255,107,24,.1); }
.rb-card-new:hover .rb-card-new-mark { background: var(--orange); color: #fff; }

.rb-empty-art svg { width: 100%; height: auto; filter: drop-shadow(0 12px 24px rgba(90,70,40,.09)); }

/* ── ویزارد ── */
.exam-panel.exam-wizard.rb-wizard { max-width: 1180px; padding: clamp(17px, 2.2vw, 26px); }
.rb-wizard-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; margin-bottom: 20px; }
.rb-wizard-head > div { display: grid; justify-items: start; gap: 5px; }
.rb-wizard-head h2 { margin: 0; color: var(--rb-navy); font-size: 21px; font-weight: 950; }
.rb-wizard-layout { display: grid; grid-template-columns: minmax(0, 1fr) 264px; align-items: start; gap: 18px; }
.rb-wizard-main { min-width: 0; }
.rb-wizard-main .exam-stepper { margin: 0 0 13px; padding-inline: 4px; }
.rb-wizard-main .exam-wizard-body { padding: clamp(16px, 2vw, 22px); background: #fff; border-color: var(--rb-border); }
/* ── کلیاتِ برنامه (باکس کناریِ ویزارد) ───────────────────────────────────
   یک ستونِ آرام: سرِ کارت، دو عددِ اصلی، دو شمارنده، و بدنهٔ دفترچه‌محور.
   همه‌چیز روی یک شبکهٔ تک‌ستونه می‌نشیند تا هیچ ردیفی از قاب بیرون نزند. */
.rb-sum {
  position: sticky; top: 18px; display: grid; align-content: start; gap: 13px; padding: 16px;
  border: 1px solid var(--rb-border); border-radius: 18px; background: var(--rb-paper);
}
.rb-sum-head { display: grid; grid-template-columns: 38px minmax(0, 1fr); align-items: center; gap: 10px; }
.rb-sum-mark { display: inline-flex; align-items: center; justify-content: center; width: 38px; height: 38px; border-radius: 12px; background: var(--rb-navy); color: #fff; }
.rb-sum-mark svg { width: 20px; height: 20px; }
.rb-sum-head > div { display: grid; gap: 1px; min-width: 0; }
.rb-sum-head small { color: var(--orange); font-size: 10px; font-weight: 900; letter-spacing: .2px; }
.rb-sum-head b { color: var(--rb-navy); font-size: 13.5px; font-weight: 950; line-height: 1.6; overflow-wrap: anywhere; }
.rb-sum-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.rb-sum-tags span { padding: 4px 9px; border-radius: 999px; background: #fff; border: 1px solid #eae2d6; color: #6d6458; font-size: 10.5px; font-weight: 850; }
.rb-sum-kpis { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.rb-sum-kpis > div { display: grid; gap: 1px; padding: 10px; border: 1px solid #eae2d6; border-radius: 13px; background: #fff; text-align: center; }
.rb-sum-kpis b { color: var(--rb-navy); font-size: 19px; font-weight: 950; line-height: 1.25; }
.rb-sum-kpis small { color: var(--muted); font-size: 9.5px; font-weight: 800; }
.rb-sum-meta { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.rb-sum-meta span { display: inline-flex; align-items: center; gap: 5px; min-width: 0; color: var(--muted); font-size: 10.5px; font-weight: 800; }
.rb-sum-meta svg { flex: none; width: 13px; height: 13px; color: var(--rb-navy); opacity: .75; }
.rb-sum-meta b { color: var(--ink); font-size: 12px; font-weight: 950; }
.rb-sum-body { display: grid; gap: 9px; }
.rb-sum-group { display: grid; gap: 6px; padding: 10px 11px; border: 1px solid #eae2d6; border-radius: 13px; background: #fff; }
.rb-sum-group-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; padding-bottom: 6px; border-bottom: 1px dashed #efe8dd; }
.rb-sum-group-head b { min-width: 0; color: var(--rb-navy); font-size: 11.5px; font-weight: 950; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rb-sum-group-head span { flex: none; color: var(--muted); font-size: 9.5px; font-weight: 800; }
.rb-sum-group ul { display: grid; gap: 7px; margin: 0; padding: 0; list-style: none; }
.rb-sum-group li { display: grid; grid-template-columns: 6px minmax(0, 1fr); align-items: center; gap: 8px; }
.rb-sum-group li > i { width: 6px; height: 22px; border-radius: 4px; }
.rb-sum-group li > div { display: grid; gap: 1px; min-width: 0; }
.rb-sum-group li b { color: #4c4740; font-size: 11px; font-weight: 900; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rb-sum-group li small { color: var(--muted); font-size: 9.5px; font-weight: 750; }
.rb-sum-empty { display: flex; align-items: flex-start; gap: 7px; margin: 0; padding: 11px; border: 1px dashed #e3dacd; border-radius: 13px; color: var(--muted); font-size: 10.5px; font-weight: 750; line-height: 1.9; }
.rb-sum-empty svg { flex: none; width: 14px; height: 14px; margin-top: 3px; }
.rb-sum-note { display: flex; align-items: flex-start; gap: 6px; margin: 0; padding-top: 11px; border-top: 1px solid #e9e3da; color: var(--muted); font-size: 10px; font-weight: 750; line-height: 1.85; }
.rb-sum-note svg { flex: none; width: 12px; height: 12px; margin-top: 3px; }
.rb-form-section { display: grid; gap: 13px; padding: 16px; border: 1px solid var(--rb-border); border-radius: 15px; background: #fff; }
.rb-form-section-head { display: flex; align-items: flex-start; gap: 10px; padding-bottom: 11px; border-bottom: 1px solid #f0ece5; }
.rb-form-section-head > span { flex: none; display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: 12px; background: var(--rb-navy-soft); color: var(--rb-navy); }
.rb-form-section-head svg { width: 21px; height: 21px; }
.rb-form-section-head > div { display: grid; gap: 2px; min-width: 0; }
.rb-form-section-head b { color: var(--rb-navy); font-size: 13px; font-weight: 950; }
.rb-form-section-head small { color: var(--muted); font-size: 11px; font-weight: 700; line-height: 1.75; }
.rb-inline-note { display: flex; align-items: flex-start; gap: 9px; padding: 11px 13px; border-radius: 12px; background: #f5f2ec; color: var(--muted); font-size: 11px; font-weight: 700; line-height: 1.9; }
.rb-inline-note svg { flex: none; width: 15px; height: 15px; margin-top: 2px; color: #7f7568; }
.rb-inline-note b { color: var(--ink); font-weight: 900; }
.rb-ctx-picker { gap: 12px; }
/* مرحلهٔ ۱: نام + پایه + رشته در یک کارت، بدون سرِ بخش و بدون توضیح */
.rb-setup { gap: 16px; padding: 18px; }
.rb-setup .field { margin: 0; }
.rb-setup .ctx-choice-grid { grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); }
.rb-hint { display: block; margin-top: 6px; color: var(--muted); font-size: 11.5px; font-weight: 700; line-height: 1.9; }
.rb-seg { width: fit-content; }
.rb-seg .seg { display: inline-flex; align-items: center; gap: 6px; }
.rb-seg .seg svg { width: 15px; height: 15px; }

.rb-lesson-pick { display: flex; flex-wrap: wrap; gap: 8px; }
/* نام درس و «+»ِ بخشِ دوم یک قابِ واحدند: قاب و رنگ روی خودِ `.rb-lesson-choice`
   می‌نشیند و دکمه‌های داخلش فقط دو ناحیهٔ کلیک‌اند با یک خطِ جداکننده. */
.rb-lesson-choice {
  display: inline-flex; align-items: stretch; overflow: hidden;
  border: 1px solid #e7ddcd; border-radius: 11px; background: #fff;
  transition: border-color .15s ease, background .15s ease, box-shadow .15s ease;
}
.rb-lesson-choice:hover { border-color: var(--orange); }
.rb-lesson-choice.on { background: var(--orange-soft); border-color: #ffc39c; }
.rb-lesson-chip {
  display: inline-flex; align-items: center; gap: 7px;
  min-height: 42px; padding: 8px 13px; border: 0; background: transparent;
  font: inherit; font-size: 12.5px; font-weight: 800; color: #6a6154; cursor: pointer;
  transition: color .15s ease;
}
.rb-lesson-chip svg { width: 14px; height: 14px; opacity: .6; }
.rb-lesson-choice:hover .rb-lesson-chip { color: var(--orange); }
.rb-lesson-choice:hover .rb-lesson-chip svg { opacity: 1; }
.rb-lesson-choice.on .rb-lesson-chip { color: #b8480e; }
.rb-lesson-choice.on .rb-lesson-chip svg { opacity: 1; color: var(--orange); }
.rb-lesson-chip i { font-style: normal; min-width: 19px; padding: 2px 6px; border-radius: 999px; background: #fff; font-size: 10px; font-weight: 900; text-align: center; }
.rb-lesson-more {
  display: inline-flex; align-items: center; justify-content: center; width: 34px;
  padding: 0; border: 0; border-inline-start: 1px solid #f0c9a9; background: transparent; color: #b8480e; cursor: pointer;
  transition: background .15s ease, color .15s ease;
}
.rb-lesson-more:hover { background: var(--orange); color: #fff; }
.rb-lesson-more svg { width: 13px; height: 13px; }
/* دکمهٔ چیدمانِ کنکوری، هم‌قوارهٔ چیپ‌ها ولی با لحنِ «عمل» نه «انتخاب» */
.rb-konkur-chip {
  display: inline-flex; align-items: center;
  min-height: 44px; padding: 8px 15px; border: 1px dashed var(--rb-navy); border-radius: 11px;
  background: var(--rb-navy-soft); color: var(--rb-navy);
  font: inherit; font-size: 12.5px; font-weight: 900; cursor: pointer;
  transition: background .15s ease, color .15s ease;
}
.rb-konkur-chip:hover { background: var(--rb-navy); color: #fff; }

.rb-bk-blocks { display: grid; gap: 12px; }
.rb-bk-block { border: 1px solid #ece4d7; border-radius: 16px; background: rgba(255,255,255,.7); overflow: hidden; }
.rb-bk-block-head {
  display: grid; grid-template-columns: 44px minmax(220px, 1fr) max-content 44px;
  grid-template-areas: "index name stat delete"; align-items: end; gap: 10px;
  padding: 12px; border-bottom: 1px solid #f1e9dc; background: #fbf7f0;
}
.rb-bk-index { grid-area: index; display: grid; place-items: center; width: 44px; height: 44px; box-sizing: border-box; border-radius: 13px; background: var(--orange); color: #fff; font-size: 15px; font-weight: 950; }
.rb-bk-name-field { grid-area: name; display: grid; gap: 4px; min-width: 0; }
.rb-bk-name-field > span { margin-inline-start: 4px; color: #938878; font-size: 10.5px; font-weight: 800; }
.rb-bk-name-field input { width: 100%; height: 44px; min-width: 0; box-sizing: border-box; padding: 0 13px; border: 1px solid #e7ddcd; border-radius: 13px; background: #fff; color: var(--ink); font: inherit; font-size: 13px; font-weight: 750; }
.rb-bk-name-field input:focus { outline: 0; border-color: var(--orange); box-shadow: 0 0 0 3px rgba(255,107,24,.1); }
.rb-bk-stat { grid-area: stat; display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 44px; box-sizing: border-box; padding: 0 13px; border: 1px solid #e7ddcd; border-radius: 13px; background: #fff; color: var(--muted); font-size: 11px; font-weight: 800; white-space: nowrap; }
.rb-bk-stat svg { width: 14px; height: 14px; color: #978b7b; }
.rb-bk-stat b { color: var(--rb-navy); font-weight: 950; }
.rb-bk-delete, .rb-bk-delete-spacer { grid-area: delete; width: 44px; height: 44px; box-sizing: border-box; }
.rb-bk-delete { display: grid; place-items: center; padding: 0; border: 1px solid #e7ddcd; border-radius: 13px; background: #fff; color: #918779; cursor: pointer; }
.rb-bk-delete:hover { border-color: #efc9c2; background: var(--red-soft); color: var(--red); }
.rb-bk-delete svg { width: 16px; height: 16px; }
.rb-track-rows { display: grid; gap: 8px; padding: 10px 12px 12px; }
.rb-track-row {
  position: relative; display: grid; align-items: end; gap: 10px;
  grid-template-columns: minmax(220px, 1fr) minmax(150px, .58fr) 44px;
  grid-template-areas: "main booklet delete" "books books books";
  padding: 11px; border: 1px solid #eee8df;
  border-radius: 12px; background: #fff;
}
.rb-track-row.focus { border-color: var(--orange); box-shadow: 0 0 0 3px rgba(255,107,24,.1); }
/* کشیدن برای تغییر ترتیب: دستهٔ کنار ردیف + خطِ راهنمای بالا/پایینِ مقصد */
.rb-track-row.dragging { opacity: .45; }
.rb-track-row.drop-before { box-shadow: inset 0 3px 0 var(--orange); }
.rb-track-row.drop-after { box-shadow: inset 0 -3px 0 var(--orange); }
.rb-track-main { grid-area: main; display: flex; align-items: center; gap: 10px; min-width: 0; min-height: 44px; }
.rb-track-grip {
  flex: none; display: inline-flex; align-items: center; justify-content: center; width: 30px; height: 38px;
  border-radius: 9px; color: #b5aca0; cursor: grab;
}
.rb-track-grip:active { cursor: grabbing; }
.rb-track-row:hover .rb-track-grip { color: var(--orange); background: var(--orange-soft); }
.rb-track-grip svg { width: 16px; height: 16px; }
.rb-track-lesson-icon { flex: none; display: inline-flex; align-items: center; justify-content: center; width: 38px; height: 38px; border-radius: 11px; background: var(--rb-navy-soft); color: var(--rb-navy); }
.rb-track-lesson-icon svg { width: 16px; height: 16px; }
.rb-track-identity { display: grid; gap: 1px; min-width: 0; }
.rb-track-identity b { color: var(--rb-navy); font-size: 12.5px; font-weight: 950; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rb-track-identity small { color: var(--muted); font-size: 10px; font-weight: 700; }
.rb-tf { display: grid; gap: 4px; min-width: 0; }
.rb-tf > span { color: var(--muted); font-size: 10.5px; font-weight: 800; }
.rb-tf input, .rb-tf select {
  width: 100%; height: 44px; min-width: 0; box-sizing: border-box; padding: 0 10px; border: 1px solid #e7ddcd; border-radius: 11px;
  background: #fffdfa; font: inherit; font-size: 12px; font-weight: 700; color: var(--ink);
}
.rb-tf input:focus, .rb-tf select:focus { outline: none; border-color: var(--orange); box-shadow: 0 0 0 3px rgba(255,107,24,.12); }
.rb-tf-num input { text-align: center; }
.rb-track-row > .rb-tf-bk { grid-area: booklet; }
.rb-track-row > .rb-icon-btn { grid-area: delete; width: 44px; height: 44px; align-self: end; border: 1px solid #e7ddcd; border-radius: 11px; background: #fff; }
.rb-track-books { grid-area: books; display: grid; gap: 7px; min-width: 0; margin: 0; padding: 9px 11px 10px; border: 1px solid #ece4d8; border-radius: 11px; background: #fbfaf7; }
.rb-track-books.needs-choice { border-color: #e7c77a; background: #fffaf0; }
.rb-track-books legend { padding: 0 5px; color: #746b5f; font-size: 10.5px; font-weight: 900; }
.rb-track-books > small { color: var(--muted); font-size: 9.5px; font-weight: 700; }
.rb-track-books.needs-choice > small { color: #916b13; }
.rb-book-checks { display: flex; flex-wrap: wrap; gap: 7px; }
.rb-book-check { position: relative; display: inline-flex; cursor: pointer; }
.rb-book-check input { position: absolute; opacity: 0; pointer-events: none; }
.rb-book-check span { display: inline-flex; align-items: center; gap: 6px; min-height: 34px; box-sizing: border-box; padding: 6px 11px; border: 1px solid #e4dccf; border-radius: 10px; background: #fff; color: #756d61; font-size: 11px; font-weight: 800; transition: border-color .14s ease, background .14s ease, color .14s ease; }
.rb-book-check span:hover { border-color: #c9bdaa; color: var(--rb-navy); }
.rb-book-check.on span { border-color: #d5c7b5; background: #f3efe8; color: var(--rb-navy); }
.rb-book-check svg { width: 13px; height: 13px; color: var(--orange); }
.rb-book-check input:focus-visible + span { outline: 2px solid var(--orange); outline-offset: 2px; }
.rb-track-books-empty { grid-area: books; display: flex; align-items: center; gap: 7px; min-height: 38px; margin: 0; padding: 8px 11px; border-radius: 10px; background: #f7f5f1; color: var(--muted); font-size: 10.5px; font-weight: 700; }
.rb-track-books-empty svg { width: 14px; height: 14px; }

/* بودجهٔ هر بخش = یک جدولِ ساده: نامِ بخش، تعداد سؤال، زمان. سرستون یک بار
   بالا نوشته می‌شود تا هر ردیف برچسبِ تکراری نداشته باشد و ردیف‌ها کوتاه بمانند. */
.rb-budget { display: grid; gap: 0; border: 1px solid #eae2d6; border-radius: 13px; background: #fff; overflow: hidden; }
.rb-budget-row { display: grid; grid-template-columns: minmax(0, 1fr) 86px 86px; align-items: center; gap: 10px; padding: 9px 12px; border-top: 1px solid #f2ede4; }
.rb-budget-row:first-child { border-top: 0; }
.rb-budget-head { padding-block: 8px; background: #faf7f2; }
.rb-budget-head span { color: var(--muted); font-size: 10.5px; font-weight: 850; }
.rb-budget-head span + span, .rb-budget-total b { text-align: center; }
.rb-budget-name { display: grid; gap: 1px; min-width: 0; }
.rb-budget-name b { color: var(--rb-navy); font-size: 12px; font-weight: 900; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rb-budget-name small { color: var(--muted); font-size: 9.5px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* برچسبِ هر خانه فقط در موبایل دیده می‌شود؛ در دسکتاپ سرستونِ بالا کارش را می‌کند. */
.rb-budget-cell { display: grid; gap: 3px; min-width: 0; }
.rb-budget-cell > span { display: none; color: var(--muted); font-size: 9.5px; font-weight: 800; }
.rb-budget-input {
  width: 100%; min-height: 36px; padding: 6px 8px; border: 1px solid #e5dccd; border-radius: 9px;
  background: #fff; color: var(--ink); font: inherit; font-size: 12.5px; font-weight: 900; text-align: center;
}
.rb-budget-input:focus { outline: none; border-color: var(--orange); box-shadow: 0 0 0 3px rgba(255,107,24,.12); }
.rb-budget-total { background: #faf7f2; }
.rb-budget-total span { color: var(--muted); font-size: 10.5px; font-weight: 850; }
.rb-budget-total b { color: var(--rb-navy); font-size: 13px; font-weight: 950; }
.rb-review-card { padding: 14px 16px; border: 1px solid #d8e8e4; border-radius: 15px; background: #f3faf8; }
.rb-review-title { display: flex; align-items: center; gap: 9px; }
.rb-review-title > span { display: inline-flex; color: var(--teal); }
.rb-review-title svg { width: 20px; height: 20px; }
.rb-review-title > div { display: grid; gap: 2px; }
.rb-review-title b { color: #235b53; font-size: 13px; font-weight: 950; }
.rb-review-title small { color: #64847e; font-size: 10.5px; font-weight: 750; }
.rb-review-card > p { margin: 8px 29px 0 0; color: #64847e; font-size: 11px; font-weight: 700; line-height: 1.85; }
.rb-review-tracks { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.rb-review-track {
  display: grid; gap: 2px; padding: 8px 11px; border-radius: 11px;
  border: 1px solid #e7e1d8;
  background: #fff;
}
.rb-review-track b { font-size: 12px; font-weight: 900; color: var(--rb-navy); }
.rb-review-track i, .rb-review-track em { font-style: normal; font-size: 10.5px; font-weight: 800; color: var(--muted); }
.rb-review-track em { color: var(--muted); }

/* ── میز کار: سربرگ ── */
.rb-board-panel { gap: 14px; }
/* نوارِ فشردهٔ سربرگ: بازگشت + نام + مشخصات یک ستون، دکمه‌ها ستون دیگر، و
   همهٔ عددها در یک نوارِ تک‌خطیِ زیرشان. */
.rb-board-hero { display: grid; gap: 12px; padding: 14px 16px; border: 1px solid var(--rb-border); border-radius: 18px; background: #fff; }
.rb-board-head { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: start; gap: 16px; }
.rb-back {
  display: inline-flex; align-items: center; gap: 5px; min-height: 40px; padding: 8px 12px 8px 14px;
  border: 1px solid #e7ddcd; border-radius: 11px; background: #fff;
  font: inherit; font-size: 12px; font-weight: 800; color: #6a6154; cursor: pointer;
  transition: border-color .15s ease, color .15s ease;
}
/* داخلِ سربرگ، «بازگشت» یک لینکِ کوچک است نه یک دکمهٔ کادردار */
.rb-board-title > .rb-back { min-height: 22px; padding: 0; border: 0; background: none; color: var(--orange); font-size: 11.5px; font-weight: 850; }
.rb-board-title > .rb-back:hover { color: #c9520c; text-decoration: underline; }
.rb-board-title > .rb-back svg { width: 13px; height: 13px; }
.rb-back:hover { border-color: var(--orange); color: var(--orange); }
.rb-back svg { width: 15px; height: 15px; }
.rb-wizard-back { margin-bottom: 4px; justify-self: start; width: fit-content; }
.rb-board-title { display: grid; justify-items: start; gap: 4px; min-width: 0; }
.rb-board-title h2 { margin: 0; color: var(--rb-navy); font-size: 20px; font-weight: 950; line-height: 1.5; }
.rb-board-meta { display: flex; flex-wrap: wrap; gap: 5px 14px; }
.rb-board-meta i { display: inline-flex; align-items: center; gap: 5px; font-style: normal; color: var(--muted); font-size: 11.5px; font-weight: 800; }
.rb-board-meta svg { width: 13px; height: 13px; opacity: .55; }
.rb-board-actions { display: flex; align-items: center; gap: 8px; }
.rb-board-actions button:disabled { opacity: .5; cursor: not-allowed; }
.rb-icon-btn {
  display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px;
  border: 1px solid transparent; border-radius: 9px; background: transparent;
  color: #8a8175; cursor: pointer; transition: background .14s ease, color .14s ease, border-color .14s ease;
}
.rb-icon-btn svg { width: 15px; height: 15px; }
.rb-icon-btn:hover { background: #fff3e8; color: var(--orange); }
.rb-icon-btn.danger:hover { background: var(--red-soft); color: var(--red); }
.rb-icon-btn.lg { width: 42px; height: 42px; border-color: #e7ddcd; background: #fff; }
.rb-icon-btn.lg svg { width: 17px; height: 17px; }
/* یک نوار، نه پنج کارت: هر عدد کنارِ برچسبش، با خطِ جداکنندهٔ نازک */
.rb-board-strip {
  display: flex; flex-wrap: wrap; align-items: center; gap: 0 22px;
  padding: 10px 14px; border: 1px solid #ebe6de; border-radius: 13px; background: #fbf9f5;
}
.rb-board-strip > span { display: inline-flex; align-items: baseline; gap: 7px; min-height: 26px; }
.rb-board-strip > span + span { padding-inline-start: 22px; border-inline-start: 1px solid #e8e2d8; }
.rb-board-strip small { color: var(--muted); font-size: 10.5px; font-weight: 750; }
.rb-board-strip b { color: var(--rb-navy); font-size: 15px; font-weight: 950; }
.rb-board-strip-progress { flex: 1 1 190px; min-width: 170px; align-items: center !important; }
.rb-board-strip-progress > span { flex: 1 1 auto; height: 6px; border-radius: 999px; background: #ece6dc; overflow: hidden; }
.rb-board-strip-progress > span i { display: block; height: 100%; border-radius: inherit; background: var(--orange); }
.rb-board-strip-progress b { font-size: 13px; }

.rb-board-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.rb-board-tabs { display: inline-flex; gap: 4px; padding: 4px; border: 1px solid #eee5da; border-radius: 13px; background: #fffdfa; width: fit-content; }
.rb-board-tab {
  display: inline-flex; align-items: center; gap: 6px; padding: 8px 15px;
  border: 0; border-radius: 9px; background: transparent;
  font: inherit; font-size: 12px; font-weight: 800; color: #6a6154; cursor: pointer;
  transition: background .15s ease, color .15s ease;
}
.rb-board-tab svg { width: 14px; height: 14px; opacity: .65; }
.rb-board-tab:hover { background: #fff5eb; color: var(--orange); }
.rb-board-tab.on { background: var(--orange); color: #fff; }
.rb-board-tab.on svg { opacity: 1; }
.rb-board-tab:disabled { cursor: default; opacity: .58; }
.rb-board-tab:disabled:hover { background: transparent; color: #6a6154; }
.rb-board-tab small { padding: 1px 5px; border-radius: 999px; background: #ece7de; color: #80776b; font-size: 8.5px; font-weight: 850; }
.rb-board-guide { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-size: 10.5px; font-weight: 700; }
.rb-board-guide svg { width: 13px; height: 13px; }

/* ── میز کار: خودِ جدول ──────────────────────────────────────────────────
   دو ستون اول چسبان‌اند و دو سطر سربرگ به بالای کادر می‌چسبند، پس جدولِ
   بلند و پهن هم همیشه خوانا می‌ماند. */
/* جدول باید کامل داخلِ همین صفحه جا شود — نه نوارِ افقی، نه اسکرولِ داخلی.
   ستون‌های درسی سهمِ مساوی از عرضِ باقی‌مانده می‌گیرند و محتوای هر خانه خودش
   کوتاه می‌شود؛ جزئیاتِ بلند در پاپ‌آپِ هاور می‌آید. */
.rb-grid-wrap {
  overflow: visible;
  border: 1px solid #c6bdae; border-radius: 17px; background: #c6bdae;
  box-shadow: 0 12px 28px rgba(48,42,34,.055);
}
.rb-grid {
  /* ستونِ اول به‌اندازهٔ محتوایش است، نه یک عرضِ ثابتِ نیمه‌خالی */
  --rb-w1: fit-content(190px); --rb-gap: 1px; --rb-h1: 44px;
  display: grid; gap: var(--rb-gap); padding: var(--rb-gap);
  width: 100%; align-items: stretch;
}
/* قاب دیگر محتوا را نمی‌بُرد (پاپ‌آپ باید از آن بیرون بزند)، پس خودِ خانه‌های
   چهار گوشه باید گرد شوند وگرنه از گوشهٔ گردِ قاب بیرون می‌زنند. */
.rb-grid > .rb-corner { border-start-start-radius: 16px; }
.rb-grid > .rb-edge-end { border-start-end-radius: 16px; }
.rb-grid > .rb-edge-bottom { border-end-start-radius: 16px; }
.rb-grid > .rb-cell:last-child { border-end-end-radius: 16px; }
.rb-cell { border-radius: 0; min-width: 0; }

.rb-corner {
  display: flex; align-items: center; justify-content: center;
  padding: 12px 8px; background: #e9e3d8; color: var(--rb-navy); text-align: center;
}
.rb-corner span { font-size: 11.5px; font-weight: 900; line-height: 1.6; }

.rb-bk-head {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  min-height: var(--rb-h1); min-width: 0;
  padding: 8px 10px; background: #f3f0ea; border: 0; text-align: center;
}
.rb-bk-head b, .rb-bk-head small { max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rb-bk-head b { font-size: 12.5px; font-weight: 900; color: #3c3730; }
.rb-bk-head small { color: var(--muted); font-size: 10.5px; font-weight: 700; }

.rb-track-head {
  position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
  min-width: 0; padding-block: 10px; padding-inline: 8px 32px; border-top: 3px solid var(--c); text-align: center;
  background: color-mix(in srgb, var(--c) 7%, #fff);
  color: color-mix(in srgb, var(--c) 72%, #16181c);
}
.rb-track-head b { max-width: 100%; font-size: 12.5px; font-weight: 900; line-height: 1.55; overflow-wrap: anywhere; }
.rb-track-badge {
  padding: 2px 9px; border-radius: 999px;
  background: #f1eee8; color: #756d62; font-size: 10px; font-weight: 850; white-space: nowrap;
}
/* چرخ‌دندهٔ ستون تا وقتی لازم نشده دیده نمی‌شود؛ سه‌نقطه‌های همیشه‌روشن جدول را شلوغ می‌کرد */
.rb-track-cog {
  position: absolute; inset-block-start: 5px; inset-inline-end: 5px;
  display: inline-flex; align-items: center; justify-content: center; width: 30px; height: 30px;
  border: 0; border-radius: 8px; background: transparent; color: color-mix(in srgb, var(--c) 55%, #7a736a);
  cursor: pointer; opacity: 0; transition: opacity .14s ease, background .14s ease;
}
.rb-track-head:hover .rb-track-cog, .rb-track-head:focus-within .rb-track-cog { opacity: 1; }
.rb-track-cog:hover { background: color-mix(in srgb, var(--c) 14%, #fff); }
.rb-track-cog:focus-visible { opacity: 1; }
.rb-track-cog svg { width: 14px; height: 14px; }

/* ستونِ مرحله: دو سطر، چهار خانه — عنوان|وضعیت روی سطر اول، تاریخ و جمع|دکمه
   روی سطر دوم. ادغامِ ستونِ وضعیت نباید ارتفاعِ ردیف را بالا ببرد. */
.rb-stage {
  position: relative; display: grid; grid-template-columns: minmax(0, 1fr) auto; align-content: center;
  gap: 2px 7px; padding: 9px 10px; background: #fcfbf8; border: 0;
}
.rb-stage-head { grid-area: 1 / 1 / 2 / 3; position: relative; display: flex; align-items: center; min-width: 0; padding-inline-end: 76px; }
.rb-stage-name { flex: 1 1 auto; min-width: 0; max-width: 100%; font-size: 13.5px; font-weight: 950; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rb-stage > .rb-status-chip { position: absolute; inset-block-start: 9px; inset-inline-end: 10px; z-index: 1; }
.rb-stage-date { grid-area: 2 / 1; min-width: 0; color: #b8480e; font-size: 11px; font-weight: 850; line-height: 1.8; overflow-wrap: anywhere; }
.rb-stage-date.muted { color: var(--muted); font-weight: 700; }
.rb-stage-sub {
  grid-area: 3 / 1; min-width: 0; color: var(--muted); font-size: 10px; font-weight: 750; line-height: 1.75;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
/* اقدام و ویرایش کنار هم‌اند؛ دیگر منوی شناور روی متنِ مرحله باز نمی‌شود. */
.rb-stage-actions { grid-area: 2 / 2 / 4 / 3; display: flex; align-items: center; justify-self: end; align-self: center; gap: 4px; }
.rb-stage-edit-trigger {
  display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 30px; padding: 0;
  border: 1px solid #e7ddcd; border-radius: 8px; background: #fff; color: #81786c; cursor: pointer;
  transition: border-color .14s ease, background .14s ease, color .14s ease;
}
.rb-stage-edit-trigger:hover { border-color: #efb88f; background: var(--orange-soft); color: var(--orange); }
.rb-stage-edit-trigger svg { width: 13px; height: 13px; }

/* ستونِ روند پیشرفت */
.rb-status-chip {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 8px; border-radius: 999px; background: #fff; color: #8a7c66;
  font-size: 10px; font-weight: 900; white-space: nowrap;
}
.rb-st-done .rb-status-chip { background: var(--teal-soft); color: #157e70; }
.rb-st-running .rb-status-chip { background: #eef3ff; color: #3f63b8; }
.rb-st-built .rb-status-chip { background: var(--rb-navy-soft); color: var(--rb-navy); }
.rb-st-ready .rb-status-chip { background: var(--orange-soft); color: #b8480e; }
.rb-st-empty .rb-status-chip { background: #f1eee8; color: #81786c; }
.rb-st-draft .rb-status-chip { background: #fff7df; color: #9a7413; }
.rb-st-closed .rb-status-chip, .rb-st-upcoming .rb-status-chip { background: #f7efe3; color: #97764a; }
.rb-status-btns { display: flex; flex-wrap: wrap; gap: 4px; justify-content: flex-end; }
.rb-mini {
  display: inline-flex; align-items: center; justify-content: center; gap: 4px; min-height: 30px; padding: 5px 10px;
  border: 1px solid #e7ddcd; border-radius: 8px; background: #fff;
  font: inherit; font-size: 10.5px; font-weight: 800; color: #6a6154; cursor: pointer;
  transition: border-color .14s ease, background .14s ease, color .14s ease;
}
.rb-mini:hover:not(:disabled) { border-color: var(--orange); color: var(--orange); }
.rb-mini:disabled { opacity: .45; cursor: not-allowed; }
.rb-mini.go { background: var(--orange); border-color: var(--orange); color: #fff; }
.rb-mini.go:hover:not(:disabled) { background: #ec5b0c; color: #fff; }
.rb-mini.ghost { border-style: dashed; background: transparent; }

/* خانه‌های بودجه‌بندی */
.rb-cell-on, .rb-cell-off, .rb-cell-pending {
  display: flex; flex-direction: column; gap: 3px; align-items: stretch; justify-content: center;
  padding: 8px 10px; border: 0;
  font: inherit; text-align: start; cursor: pointer;
  transition: background .15s ease, box-shadow .15s ease;
}
/* پررنگیِ خانه = حجمِ مطالبِ آن مرحله از همان درس. پنج پله، همه از خانوادهٔ
   رنگِ ستون و همه آن‌قدر روشن که متنِ تیره رویشان خوانا بماند (هرگز متنِ سفید). */
.rb-cell-on {
  --rb-tint: 5%;
  background: color-mix(in srgb, var(--c) var(--rb-tint), #fff);
  color: var(--ink);
}
.rb-cell-on[data-rb-mass="1"] { --rb-tint: 9%; }
.rb-cell-on[data-rb-mass="2"] { --rb-tint: 14%; }
.rb-cell-on[data-rb-mass="3"] { --rb-tint: 20%; }
.rb-cell-on[data-rb-mass="4"] { --rb-tint: 27%; }
.rb-cell-on .rb-cell-title { color: color-mix(in srgb, var(--c) 68%, #16181c); }
.rb-cell-on:hover {
  background: color-mix(in srgb, var(--c) calc(var(--rb-tint) + 7%), #fff);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--c) 42%, #fff);
}
/* خلاصهٔ کتاب‌محور تا دو خط جا دارد؛ ردیف به‌خاطر متن بلند قد نمی‌کشد و ریزِ
   کاملِ فصل‌ها همچنان در پاپ‌آپِ هاور در دسترس است. */
.rb-cell-title {
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2;
  min-width: 0; overflow: hidden; overflow-wrap: anywhere;
  font-size: 12px; font-weight: 900; line-height: 1.7;
}
.rb-cell-title > i {
  float: inline-end; margin-inline-start: 5px; font-style: normal;
  padding: 1px 5px; border-radius: 999px;
  background: color-mix(in srgb, #fff 70%, transparent); font-size: 9.5px; font-weight: 900;
}
.rb-cell-note { font-size: 10px; font-weight: 800; opacity: .72; }
.rb-cell-foot { display: flex; flex-wrap: wrap; gap: 3px; margin-top: 2px; }
.rb-cell-foot i {
  font-style: normal; padding: 2px 7px; border-radius: 999px;
  background: color-mix(in srgb, #fff 78%, transparent); color: #5f5951; font-size: 9.5px; font-weight: 850;
}
/* نشانِ سطح، رنگِ خودش را ندارد؛ در خانوادهٔ رنگِ همان ستون می‌ماند تا جدول
   چندرنگیِ بی‌معنی نشود. */
.rb-cell-level { background: color-mix(in srgb, var(--c) 13%, #fff) !important; color: color-mix(in srgb, var(--c) 66%, #16181c); }
.rb-cell-booklet { max-width: 100%; color: #526675 !important; }
.rb-cell-booklet svg { width: 10px; height: 10px; margin-inline-end: 3px; vertical-align: -2px; }
.rb-cell-off {
  align-items: center; justify-content: center; gap: 5px;
  background: #f7f5f1; color: #a09689;
}
.rb-cell-off small { font-size: 10.5px; font-weight: 800; }
.rb-cell-off-mark { display: inline-flex; }
.rb-cell-off svg { width: 15px; height: 15px; }
.rb-cell-off:hover { background: var(--orange-soft); color: var(--orange); box-shadow: inset 0 0 0 1px #efbd99; }
.rb-cell-pending { align-items: center; text-align: center; background: #fffaf0; color: #8d6d1f; }
.rb-cell-pending > span { display: inline-flex; }
.rb-cell-pending svg { width: 15px; height: 15px; }
.rb-cell-pending b { font-size: 11px; font-weight: 900; }
.rb-cell-pending small { color: #9c8753; font-size: 9.5px; font-weight: 700; }
.rb-cell-pending:hover { background: #fff4d7; box-shadow: inset 0 0 0 1px #e7cb82; }

/* پاپ‌آپِ هاور: فهرست کاملِ مسیرِ مبحث‌ها، وقتی داخلِ خانه جا نمی‌شود */
.rb-tip {
  position: absolute; z-index: 40; top: calc(100% - 6px); inset-inline-start: 0;
  display: grid; gap: 4px; width: max-content; min-width: 190px; max-width: 320px;
  max-width: min(320px, 62vw);
  padding: 10px 12px; border: 1px solid var(--line); border-radius: 13px; background: var(--panel);
  box-shadow: 0 14px 34px rgba(41,36,29,.18); text-align: start;
  opacity: 0; pointer-events: none; transform: translateY(-4px);
  transition: opacity .13s ease, transform .13s ease;
}
/* نیم‌ثانیه صبر تا باز شود؛ بستنش فوری است */
.rb-cell-on:hover .rb-tip, .rb-cell-on:focus-visible .rb-tip { opacity: 1; transform: translateY(0); transition-delay: .5s; }
.rb-tip strong { color: var(--rb-navy); font-size: 11.5px; font-weight: 950; }
.rb-tip em { display: grid; gap: 1px; font-style: normal; }
.rb-tip em b { color: var(--rb-navy); font-size: 10.5px; font-weight: 900; line-height: 1.8; }
.rb-tip em span { color: #6a635b; font-size: 10.5px; font-weight: 700; line-height: 1.85; }
.rb-tip-foot { padding-top: 6px; border-top: 1px dashed #e9e2d7; color: var(--muted); font-size: 10px; font-weight: 700; line-height: 1.8; }
/* نیمهٔ چپِ جدول و ردیفِ آخر: پاپ‌آپ رو به داخل باز شود تا از صفحه بیرون نزند */
.rb-cell-on.tip-end .rb-tip { inset-inline-start: auto; inset-inline-end: 0; }
.rb-cell-on.tip-up .rb-tip { top: auto; bottom: calc(100% - 6px); }

/* خانه‌ای که پاپ‌آپ دارد باید بالای بقیه بیاید، وگرنه خانهٔ بعدی رویش می‌افتد */
.rb-grid > .rb-cell-on:hover, .rb-grid > .rb-cell-on:focus-visible { z-index: 8; }
.rb-cell { position: relative; }

/* پایین جدول */
.rb-board-foot { display: grid; gap: 10px; }
.rb-add-stage {
  display: flex; align-items: center; gap: 11px; width: 100%; padding: 13px 16px;
  border: 1.5px dashed #ddd3c2; border-radius: 15px; background: #fffdf9;
  font: inherit; text-align: start; color: #6a6154; cursor: pointer;
  transition: border-color .15s ease, background .15s ease, color .15s ease;
}
.rb-add-stage:hover { border-color: var(--orange); background: var(--orange-soft); color: var(--orange); }
.rb-add-stage svg { width: 19px; height: 19px; }
.rb-add-stage span { display: grid; gap: 2px; }
.rb-add-stage b { font-size: 13px; font-weight: 900; }
.rb-add-stage small { color: var(--muted); font-size: 11px; font-weight: 700; }
.rb-add-stage:hover small { color: inherit; opacity: .75; }
.rb-board-note { display: flex; align-items: center; gap: 7px; margin: 0; color: var(--muted); font-size: 11.5px; font-weight: 700; line-height: 1.9; }
.rb-board-note svg { flex: none; width: 15px; height: 15px; opacity: .6; }

.rb-empty-stages {
  display: grid; justify-items: center; gap: 8px; padding: 34px 20px;
  border: 1.5px dashed #e3d9c8; border-radius: 20px; background: #fffdf9; text-align: center;
}
.rb-empty-art { width: min(280px, 70%); }
.rb-empty-stages b { font-size: 15px; font-weight: 900; }
.rb-empty-stages p { margin: 0; max-width: 56ch; color: var(--muted); font-size: 12.5px; line-height: 2; }
.rb-empty-stages .primary-button { margin-top: 6px; }
.rb-empty-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 6px; }
.rb-empty-actions .primary-button { margin-top: 0; }

/* ── مودال‌ها ── */
.rb-modal-head h2 { display: grid; gap: 3px; }
.rb-modal-head h2 small { color: var(--muted); font-size: 11.5px; font-weight: 700; }

.rb-stage-modal { display: grid; gap: 16px; }
.rb-stage-form { display: grid; gap: 12px; }
.rb-stage-date-block { display: grid; gap: 10px; padding: 12px; border: 1px solid #ece4d7; border-radius: 14px; background: #fffdfa; }
.rb-stage-date-head { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; font-size: 12px; font-weight: 800; color: var(--muted); }
.rb-stage-date-head svg { width: 15px; height: 15px; }
.rb-stage-date-head b { color: #b8480e; font-size: 13px; font-weight: 900; }
.rb-stage-date-head .rb-mini { margin-inline-start: auto; }
.rb-calendar { margin: 0 auto; }
.rb-stage-date-block .rb-hint { margin: 0; text-align: center; }
.rb-template-cards { display: grid; gap: 7px; }
.rb-template-card { display: flex; align-items: flex-start; gap: 10px; width: 100%; padding: 11px 12px; border: 1px solid #e7dfd3; border-radius: 12px; background: #fff; font: inherit; text-align: start; cursor: pointer; }
.rb-template-card > svg { flex: none; width: 17px; height: 17px; margin-top: 2px; color: #81786c; }
.rb-template-card > span { display: grid; gap: 2px; }
.rb-template-card b { font-size: 12px; font-weight: 900; }
.rb-template-card small { color: var(--muted); font-size: 10.5px; font-weight: 700; line-height: 1.7; }
.rb-template-card:hover { border-color: #efb88f; }
.rb-template-card.on { border-color: var(--orange); background: var(--orange-soft); box-shadow: 0 0 0 2px rgba(255,107,24,.08); }
.rb-template-card.on > svg { color: var(--orange); }
.rb-template-card:disabled { opacity: .45; cursor: not-allowed; }

.rb-cell-head { align-items: center; gap: 10px; }
.rb-cell-modal { display: grid; gap: 14px; }
.rb-complete-modal { display: grid; gap: 12px; }
.rb-complete-modal .modal-hint { margin: 0; }
.rb-complete-list { display: grid; gap: 8px; }
.rb-complete-track {
  position: relative; display: grid; grid-template-columns: minmax(0, 1fr) auto 16px; align-items: center; gap: 10px;
  width: 100%; padding: 12px 13px; border: 1px solid #e7dfd3; border-radius: 13px; background: #fff;
  color: var(--ink); font: inherit; text-align: start; cursor: pointer; overflow: hidden;
  transition: border-color .14s ease, background .14s ease, transform .14s ease;
}
.rb-complete-track::before { content: ""; position: absolute; inset-block: 0; inset-inline-start: 0; width: 3px; background: var(--c); opacity: .7; }
.rb-complete-track:hover { border-color: color-mix(in srgb, var(--c) 44%, #ddd3c2); background: color-mix(in srgb, var(--c) 5%, #fff); transform: translateY(-1px); }
.rb-complete-track > span { display: grid; gap: 3px; min-width: 0; }
.rb-complete-track > span b { font-size: 13px; font-weight: 900; }
.rb-complete-track > span small { color: var(--muted); font-size: 10.5px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rb-complete-track > em { padding: 3px 8px; border-radius: 999px; background: #f1eee8; color: #81786c; font-size: 9.5px; font-style: normal; font-weight: 850; white-space: nowrap; }
.rb-complete-track.pending > em { background: #fff7df; color: #9a7413; }
.rb-complete-track.ready > em { background: var(--teal-soft); color: #157e70; }
.rb-complete-track > svg { width: 14px; height: 14px; color: #a1988c; }
.rb-complete-summary { color: var(--muted); font-size: 11px; font-weight: 750; }
.rb-complete-summary b { color: var(--ink); }
.rb-stage-modal-footer { justify-content: space-between; }
.rb-stage-admin-actions { display: flex; align-items: center; gap: 7px; margin-inline-end: auto; }
.rb-stage-admin-actions .ghost-button { display: inline-flex; align-items: center; gap: 5px; }
.rb-stage-admin-actions .ghost-button svg { width: 14px; height: 14px; }
.rb-stage-admin-actions .ghost-button.danger { color: var(--red); }
.rb-cell-toggle {
  display: flex; align-items: flex-start; gap: 10px; padding: 11px 13px;
  border: 1px solid #e7ddcd; border-radius: 13px; background: #fbf8f3; cursor: pointer;
}
.rb-cell-toggle.on { border-color: #bfe3d8; background: var(--teal-soft); }
.rb-cell-toggle input { margin-top: 3px; }
.rb-cell-toggle span { display: grid; gap: 2px; }
.rb-cell-toggle b { font-size: 12.5px; font-weight: 900; }
.rb-cell-toggle small { color: var(--muted); font-size: 11px; font-weight: 700; line-height: 1.8; }
.rb-cell-fields { display: grid; gap: 14px; }
.rb-cell-fields.off { opacity: .42; pointer-events: none; }
.rb-cell-topics-block { display: grid; gap: 9px; padding: 12px; border: 1px solid #ece4d7; border-radius: 14px; background: #fffdfa; }
.rb-cell-block-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.rb-cell-block-head > span { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 900; }
.rb-cell-block-head svg { width: 15px; height: 15px; opacity: .6; }
.rb-topic-btn { padding: 7px 12px; font-size: 12px; }
.rb-scope-options { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; }
.rb-scope-option { display: flex; align-items: flex-start; gap: 8px; padding: 10px 11px; border: 1px solid #e7dfd3; border-radius: 11px; background: #fff; font: inherit; text-align: start; cursor: pointer; }
.rb-scope-option > svg { flex: none; width: 15px; height: 15px; margin-top: 2px; color: #82796d; }
.rb-scope-option > span { display: grid; gap: 1px; }
.rb-scope-option b { font-size: 11.5px; font-weight: 900; }
.rb-scope-option small { color: var(--muted); font-size: 9.5px; font-weight: 700; }
.rb-scope-option:hover { border-color: #efb88f; }
.rb-scope-option.on { border-color: var(--orange); background: var(--orange-soft); }
.rb-scope-option.on > svg { color: var(--orange); }
.rb-scope-unset { display: flex; align-items: flex-start; gap: 7px; margin: 0; padding: 9px 10px; border-radius: 9px; background: #fff5d9; color: #8c6b16; font-size: 10.5px; font-weight: 750; line-height: 1.8; }
.rb-scope-unset svg { flex: none; width: 14px; height: 14px; margin-top: 2px; }
.rb-selected-topics-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.rb-selected-topics-head > span { color: var(--muted); font-size: 10.5px; font-weight: 750; }
.rb-topic-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.rb-topic-chip {
  display: inline-flex; align-items: center; gap: 5px; padding: 5px 6px 5px 10px;
  border: 1px solid #e0d6c6; border-radius: 9px; background: #fff; font-size: 11px; font-weight: 800;
}
.rb-topic-chip button { display: inline-flex; border: 0; border-radius: 6px; background: #f4efe7; color: #8a8175; cursor: pointer; padding: 2px; }
.rb-topic-chip button:hover { background: var(--red-soft); color: var(--red); }
.rb-topic-chip svg { width: 11px; height: 11px; }
.rb-all-topics { display: flex; align-items: center; gap: 7px; margin: 0; padding: 9px 11px; border-radius: 10px; background: #f6f2ea; color: var(--muted); font-size: 11.5px; font-weight: 700; }
.rb-all-topics b { color: var(--ink); }
.rb-all-topics svg { width: 15px; height: 15px; opacity: .55; }
.rb-cell-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 10px; }
.rb-level-row { display: flex; flex-wrap: wrap; gap: 6px; }
.rb-level-pill {
  display: inline-flex; align-items: center; gap: 5px; padding: 7px 13px;
  border: 1px solid #e7ddcd; border-radius: 999px; background: #fff;
  font: inherit; font-size: 11.5px; font-weight: 800; color: #6a6154; cursor: pointer;
  transition: border-color .14s ease, background .14s ease, color .14s ease;
}
.rb-level-pill svg { width: 13px; height: 13px; }
.rb-level-pill:hover { border-color: var(--orange); color: var(--orange); }
.rb-level-pill.on { background: var(--orange); border-color: var(--orange); color: #fff; }
.rb-level-pill.ad.on { background: var(--teal); border-color: var(--teal); }
.rb-level-pill.rnd.on { background: #6b6f8c; border-color: #6b6f8c; }
/* توضیحِ زیرِ سطح‌ها: قراردادِ سطح + عددِ واقعیِ همین خانه، تا انتخاب حدسی نباشد */
.rb-level-hint { display: grid; gap: 5px; margin-top: 9px; }
.rb-level-hint > span {
  display: grid; grid-template-columns: 15px minmax(0, 1fr); align-items: start; gap: 7px;
  color: var(--muted); font-size: 11px; font-weight: 750; line-height: 1.85;
}
.rb-level-hint svg { width: 14px; height: 14px; margin-top: 3px; opacity: .7; }
.rb-level-hint em { min-width: 0; font-style: normal; }
.rb-level-hint b { color: var(--ink); font-weight: 900; }
.rb-level-hint .good { color: #2b7a68; }
.rb-level-hint .good svg { opacity: 1; }
.rb-level-hint .good b { color: #216456; }
.rb-level-hint .warn { color: #9a6414; }
.rb-level-hint .warn svg { opacity: 1; }
.rb-level-hint .warn b { color: #7d5010; }
.rb-short { color: var(--red); }
/* میانگینِ ضریبِ همان درس در پیش‌نمایشِ شرکت — سبز یعنی داخلِ محدوده نشسته */
.rb-join-fit { font-style: normal; font-weight: 850; color: #2b7a68; }
.rb-join-fit.off { color: #9a6414; }

.rb-tracks-modal { display: grid; gap: 14px; }
.rb-program-menu { display: grid; gap: 14px; }
.rb-menu-stats { display: flex; flex-wrap: wrap; gap: 8px 18px; padding: 11px 13px; border-radius: 12px; background: #f7f3ec; }
.rb-menu-stats span { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-size: 11.5px; font-weight: 800; }
.rb-menu-stats b { color: var(--ink); font-size: 13px; font-weight: 900; }
.rb-menu-stats svg { width: 14px; height: 14px; opacity: .55; }
.rb-menu-danger { display: flex; flex-wrap: wrap; gap: 8px; padding-top: 12px; border-top: 1px dashed #efe7db; }

.rb-join-modal { display: grid; gap: 14px; }
.rb-join-sheet { display: grid; gap: 10px; }
.rb-join-bk { border: 1px solid #ece4d7; border-radius: 14px; background: #fffdfa; overflow: hidden; }
.rb-join-bk-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 9px 12px; border-bottom: 1px solid #f1e9dc; background: #fbf7f0; }
.rb-join-bk-head b { font-size: 12.5px; font-weight: 900; }
.rb-join-bk-head span { color: var(--muted); font-size: 11px; font-weight: 800; }
.rb-join-row {
  display: grid; grid-template-columns: minmax(88px, 1fr) minmax(0, 2fr) 62px 46px 58px;
  align-items: center; gap: 10px; padding: 9px 12px;
  border-inline-start: 3px solid var(--orange); border-bottom: 1px solid #f0ebe4;
}
.rb-join-row:last-child { border-bottom: 0; }
.rb-join-row > b { font-size: 12px; font-weight: 900; color: var(--rb-navy, #26384a); }
.rb-join-topics { color: var(--muted); font-size: 11px; font-weight: 700; line-height: 1.8; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.rb-join-num { font-size: 14px; font-weight: 900; text-align: center; }
.rb-join-num small { color: var(--muted); font-size: 10px; font-weight: 700; margin-inline-start: 3px; }
.rb-join-time { color: var(--muted); font-size: 11.5px; font-weight: 800; text-align: center; }
.rb-join-ok { display: inline-flex; justify-content: center; color: var(--teal); }
.rb-join-ok svg { width: 15px; height: 15px; }
.rb-join-gap { font-style: normal; padding: 3px 7px; border-radius: 999px; background: var(--red-soft); color: var(--red); font-size: 10px; font-weight: 900; text-align: center; }
.rb-join-row.short > b { opacity: .9; }
.rb-short-accept { display: flex; align-items: flex-start; gap: 9px; padding: 11px 12px; border: 1px solid #efcfcc; border-radius: 12px; background: #fff8f7; cursor: pointer; }
.rb-short-accept input { margin-top: 3px; }
.rb-short-accept span { display: grid; gap: 2px; }
.rb-short-accept b { color: #a84c49; font-size: 11.5px; font-weight: 900; }
.rb-short-accept small { color: #8d6c69; font-size: 10.5px; font-weight: 700; line-height: 1.8; }
.rb-mobile-stages { display: none; }
.rb-mobile-stage { border: 1px solid var(--rb-border); border-radius: 15px; background: #fff; overflow: hidden; }
.rb-mobile-stage summary { display: grid; grid-template-columns: minmax(0, 1fr) auto 18px; align-items: center; gap: 9px; min-height: 62px; padding: 10px 12px; cursor: pointer; list-style: none; }
.rb-mobile-stage summary::-webkit-details-marker { display: none; }
.rb-mobile-stage summary > svg { width: 15px; height: 15px; color: var(--muted); transition: transform .16s ease; }
.rb-mobile-stage[open] summary > svg { transform: rotate(180deg); }
.rb-mobile-stage-title { display: grid; gap: 2px; min-width: 0; }
.rb-mobile-stage-title b { color: var(--rb-navy); font-size: 12.5px; font-weight: 900; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rb-mobile-stage-title small { color: var(--muted); font-size: 10px; font-weight: 700; }
.rb-mobile-stage summary > .rb-status-chip { font-size: 9.5px; }
.rb-mobile-stage summary > .rb-st-done { background: var(--teal-soft); color: #157e70; }
.rb-mobile-stage summary > .rb-st-ready { background: var(--orange-soft); color: #b8480e; }
.rb-mobile-stage summary > .rb-st-running { background: #eef3ff; color: #3f63b8; }
.rb-mobile-stage summary > .rb-st-built { background: var(--rb-navy-soft); color: var(--rb-navy); }
.rb-mobile-stage summary > .rb-st-draft { background: #fff7df; color: #9a7413; }
.rb-mobile-stage summary > .rb-st-empty { background: #f1eee8; color: #81786c; }
.rb-mobile-stage summary > .rb-st-closed,
.rb-mobile-stage summary > .rb-st-upcoming { background: #f7efe3; color: #97764a; }
.rb-mobile-stage-body { display: grid; gap: 11px; padding: 12px; border-top: 1px solid #eee9e1; background: #fbfaf7; }
.rb-mobile-stage-overview { display: flex; flex-wrap: wrap; align-items: center; gap: 7px 14px; }
.rb-mobile-stage-overview > span:not(.rb-status-btns) { display: inline-flex; align-items: center; gap: 4px; color: var(--muted); font-size: 10.5px; font-weight: 700; }
.rb-mobile-stage-overview > span svg { width: 13px; height: 13px; }
.rb-mobile-stage-overview > span b { color: var(--ink); font-weight: 900; }
.rb-mobile-stage-overview .rb-status-btns { margin-inline-start: auto; }
.rb-mobile-stage-note { display: flex; align-items: flex-start; gap: 6px; margin: 0; color: var(--muted); font-size: 10.5px; font-weight: 700; line-height: 1.8; }
.rb-mobile-stage-note svg { flex: none; width: 13px; height: 13px; margin-top: 2px; }
.rb-mobile-lessons { display: grid; gap: 6px; }
/* موبایل ستون ندارد، پس همان رنگِ درس روی نوارِ کنارِ ردیف و ته‌رنگِ حجم می‌نشیند */
.rb-mobile-lesson { --rb-tint: 5%; display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 8px; width: 100%; min-height: 52px; padding: 9px 11px; border: 1px solid color-mix(in srgb, var(--c) 20%, #e8e2d9); border-inline-start: 4px solid var(--c); border-radius: 11px; background: color-mix(in srgb, var(--c) var(--rb-tint), #fff); font: inherit; text-align: start; cursor: pointer; }
.rb-mobile-lesson[data-rb-mass="1"] { --rb-tint: 8%; }
.rb-mobile-lesson[data-rb-mass="2"] { --rb-tint: 12%; }
.rb-mobile-lesson[data-rb-mass="3"] { --rb-tint: 17%; }
.rb-mobile-lesson[data-rb-mass="4"] { --rb-tint: 23%; }
.rb-mobile-lesson > span { display: grid; gap: 2px; min-width: 0; }
.rb-mobile-lesson b { color: color-mix(in srgb, var(--c) 70%, #16181c); font-size: 11.5px; font-weight: 900; }
.rb-mobile-lesson small { color: var(--muted); font-size: 9.5px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rb-mobile-lesson em { color: #6f685e; font-size: 9.5px; font-style: normal; font-weight: 800; }
.rb-mobile-lesson > svg { width: 15px; height: 15px; color: #9b9285; }
.rb-mobile-lesson.off { border-color: #e2dbd1; border-inline-start-color: #ded7cc; border-style: dashed; background: #f7f5f1; }
.rb-mobile-lesson.off b { color: #978e81; }
.rb-mobile-lesson.pending { border-color: #ead59d; border-inline-start-color: #dcb75a; background: #fffaf0; }
.rb-mobile-lesson.pending b { color: #8d6d1f; }
.rb-mobile-lesson.pending > svg { color: #a17b1c; }
.rb-mobile-stage-tools { display: flex; align-items: center; gap: 7px; padding-top: 3px; }
.rb-mobile-stage-tools .secondary-button { min-height: 40px; }

/* ── نمودار پیشرفت: روند درصد + نقشهٔ خانه‌ای پوشش کتاب‌ها ── */
.rbp-dashboard { display: grid; gap: 14px; }
.rbp-chart-card, .rbp-coverage-card {
  position: relative; display: grid; gap: 14px; padding: 17px;
  border: 1px solid var(--rb-border); border-radius: 18px; background: #fff;
  box-shadow: 0 10px 26px rgba(48,42,34,.045); overflow: visible;
}
.rbp-section-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.rbp-section-head > div { display: flex; align-items: flex-start; gap: 10px; min-width: 0; }
.rbp-section-head > div > span:last-child { display: grid; gap: 3px; min-width: 0; }
.rbp-section-head b { color: var(--rb-navy); font-size: 14px; font-weight: 950; }
.rbp-section-head small { max-width: 76ch; color: var(--muted); font-size: 10.5px; font-weight: 700; line-height: 1.85; }
.rbp-section-head > em { flex: none; padding: 5px 9px; border-radius: 999px; background: #f3efe8; color: #776e62; font-size: 10px; font-style: normal; font-weight: 850; white-space: nowrap; }
.rbp-section-icon { flex: none; display: inline-flex; align-items: center; justify-content: center; width: 34px; height: 34px; border-radius: 10px; background: color-mix(in srgb, var(--rbp-color, var(--teal)) 11%, #fff); color: var(--rbp-color, var(--teal)); }
.rbp-section-icon svg { width: 17px; height: 17px; }
.rbp-filters { display: flex; flex-wrap: wrap; gap: 6px; }
.rbp-filters button {
  display: inline-flex; align-items: center; gap: 6px; min-height: 34px; padding: 6px 11px;
  border: 1px solid #e8e0d4; border-radius: 999px; background: #fff; color: #71695f;
  font: inherit; font-size: 10.5px; font-weight: 850; cursor: pointer;
  transition: border-color .14s ease, background .14s ease, color .14s ease;
}
.rbp-filters button > i { width: 8px; height: 8px; border-radius: 3px; background: var(--c); }
.rbp-filters button > svg { width: 13px; height: 13px; }
.rbp-filters button:hover { border-color: var(--rbp-color); color: var(--rbp-color); }
.rbp-filters button.on { border-color: var(--rbp-color); background: color-mix(in srgb, var(--rbp-color) 10%, #fff); color: color-mix(in srgb, var(--rbp-color) 78%, #1b1a18); }
.rbp-kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 7px; }
.rbp-kpis > span { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 42px; padding: 8px 11px; border-radius: 11px; background: #faf7f2; }
.rbp-kpis small { color: var(--muted); font-size: 10.5px; font-weight: 800; line-height: 1.5; }
.rbp-kpis b { flex: none; color: var(--rb-navy); font-size: 15.5px; font-weight: 950; }
.rbp-chart { direction: ltr; display: grid; grid-template-columns: 42px minmax(0, 1fr); gap: 7px; padding: 4px 2px 38px; }
.rbp-y-axis, .rbp-plot { position: relative; height: 260px; }
.rbp-y-axis span { position: absolute; inset-inline: 0; transform: translateY(-50%); color: #766e63; font-size: 11px; font-weight: 850; text-align: end; white-space: nowrap; }
.rbp-plot { direction: ltr; border-inline-start: 1px solid #e9e3da; }
.rbp-plot > svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.rbp-grid-line { stroke: #eee9e2; stroke-width: 1; vector-effect: non-scaling-stroke; }
.rbp-grid-line.zero { stroke: #cfc7bc; stroke-dasharray: 4 4; }
.rbp-trend-line { fill: none; stroke: var(--rbp-color); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; vector-effect: non-scaling-stroke; filter: drop-shadow(0 3px 5px color-mix(in srgb, var(--rbp-color) 22%, transparent)); }
.rbp-point { position: absolute; z-index: 3; width: 0; height: 0; outline: none; }
.rbp-point > i {
  position: absolute; left: 50%; top: 50%; width: 14px; height: 14px; border: 3px solid #fff; border-radius: 50%;
  background: var(--rbp-color); box-shadow: 0 0 0 2px var(--rbp-color), 0 5px 12px rgba(45,40,34,.18);
  transform: translate(-50%, -50%); transition: width .13s ease, height .13s ease;
}
.rbp-point:hover, .rbp-point:focus-visible { z-index: 30; }
.rbp-point:hover > i, .rbp-point:focus-visible > i { width: 18px; height: 18px; }
.rbp-x-label { position: absolute; top: calc(100% + 11px); width: 104px; transform: translateX(-50%); color: #665f56; direction: rtl; font-size: 10.5px; font-weight: 850; line-height: 1.55; text-align: center; }
.rbp-point-tip {
  position: absolute; z-index: 45; left: 50%; top: 18px; display: grid; gap: 9px;
  width: min(390px, 72vw); max-height: 390px; padding: 12px; overflow: auto;
  border: 1px solid #dcd4c9; border-radius: 15px; background: #fff; color: var(--ink); direction: rtl; text-align: start;
  box-shadow: 0 18px 42px rgba(42,37,30,.2); opacity: 0; pointer-events: none;
  transform: translateX(-50%) translateY(-5px); transition: opacity .12s ease, transform .12s ease;
}
.rbp-point.tip-start .rbp-point-tip { left: -4px; transform: translateY(-5px); }
.rbp-point.tip-end .rbp-point-tip { left: auto; right: -4px; transform: translateY(-5px); }
.rbp-point.tip-low .rbp-point-tip { top: auto; bottom: 18px; }
.rbp-point:hover .rbp-point-tip, .rbp-point:focus-visible .rbp-point-tip { opacity: 1; pointer-events: auto; transform: translateX(-50%) translateY(0); transition-delay: .18s; }
.rbp-point.tip-start:hover .rbp-point-tip, .rbp-point.tip-start:focus-visible .rbp-point-tip,
.rbp-point.tip-end:hover .rbp-point-tip, .rbp-point.tip-end:focus-visible .rbp-point-tip { transform: translateY(0); }
.rbp-point-tip-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-bottom: 9px; border-bottom: 1px solid #eee8df; }
.rbp-point-tip-head > span { display: grid; gap: 1px; }
.rbp-point-tip-head small { color: var(--muted); font-size: 9.5px; font-weight: 750; }
.rbp-point-tip-head b { color: var(--rb-navy); font-size: 12.5px; font-weight: 950; }
.rbp-point-tip-head > strong { color: var(--rbp-color); font-size: 18px; font-weight: 950; }
.rbp-point-summary, .rbp-tip-lesson header > span, .rbp-tip-book-head > span { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 9px; }
.rbp-point-summary span, .rbp-tip-lesson header > span span, .rbp-tip-book-head > span span { color: #736b61; font-size: 9.5px; font-weight: 750; }
.rbp-point-summary b, .rbp-tip-lesson header > span b, .rbp-tip-book-head > span b { color: var(--ink); font-weight: 900; }
.rbp-point-summary .ok, .rbp-tip-lesson .ok, .rbp-tip-book .ok { color: #27806a; }
.rbp-point-summary .bad, .rbp-tip-lesson .bad, .rbp-tip-book .bad { color: #b6504d; }
.rbp-point-summary .blank, .rbp-tip-lesson .blank, .rbp-tip-book .blank { color: #8b8378; }
.rbp-point-summary > strong, .rbp-tip-lesson header > span > strong, .rbp-tip-book-head > span > strong { color: var(--rbp-color); font-size: 10.5px; font-weight: 950; }
.rbp-point-breakdown { display: grid; gap: 10px; }
.rbp-tip-lesson { display: grid; gap: 6px; }
.rbp-tip-lesson > header { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.rbp-tip-lesson > header > b { color: var(--rb-navy); font-size: 11.5px; font-weight: 950; }
.rbp-tip-books { display: grid; gap: 6px; }
.rbp-tip-book { display: grid; gap: 6px; padding: 8px; border: 1px solid #eee7dc; border-radius: 11px; background: #fcfaf7; }
.rbp-tip-book-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.rbp-tip-book-head > b { color: #403b35; font-size: 10.5px; font-weight: 900; }
.rbp-tip-chapters { display: grid; gap: 3px; }
.rbp-tip-chapters > div { display: grid; grid-template-columns: minmax(80px, 1fr) auto; align-items: center; gap: 10px; padding-top: 5px; border-top: 1px dashed #e9e2d8; }
.rbp-tip-chapters span { color: #4f4942; font-size: 9.5px; font-weight: 850; }
.rbp-tip-chapters small { color: var(--muted); font-size: 8.8px; font-weight: 700; }
.rbp-tip-chapters b { color: var(--rbp-color); font-size: 10px; font-weight: 950; }
.rbp-tip-chapter-stats { display: inline-flex; align-items: center; gap: 10px; white-space: nowrap; }
.rbp-tip-empty { margin: 0; color: var(--muted); font-size: 10.5px; line-height: 1.8; }
.modal.rbp-progress-modal { width: min(560px, calc(100vw - 32px)); display: grid; grid-template-rows: auto minmax(0, 1fr); overflow: hidden; direction: ltr; }
.rbp-progress-modal .modal-head { position: static; direction: rtl; }
.rbp-point-modal { min-height: 0; display: grid; gap: 12px; padding: 14px 16px 16px; overflow: auto; direction: ltr; scrollbar-width: thin; scrollbar-color: #cfc8ba transparent; }
.rbp-point-modal::-webkit-scrollbar { display: block; width: 10px; }
.rbp-point-modal::-webkit-scrollbar-thumb { border: 3px solid transparent; border-radius: 10px; background: #cfc8ba; background-clip: content-box; }
.rbp-point-modal > * { direction: rtl; }
.rbp-point-modal .rbp-point-tip-head { padding: 0 0 9px; }
.rbp-point-modal .rbp-point-tip-head b { font-size: 15px; }
.rbp-point-modal .rbp-point-tip-head > strong { font-size: 24px; }
.rbp-point-modal .rbp-point-summary { padding: 9px 11px; border-radius: 11px; background: #faf7f2; }
.rbp-point-modal .rbp-point-breakdown { grid-template-columns: minmax(0, 1fr); align-items: start; gap: 9px; }
.rbp-point-modal .rbp-tip-lesson { padding: 10px; border: 1px solid #ece5da; border-radius: 14px; }
.rbp-point-modal .rbp-tip-lesson > header, .rbp-point-modal .rbp-tip-book-head { display: grid; grid-template-columns: minmax(90px, 1fr) auto; align-items: center; }
.rbp-point-modal .rbp-tip-books { grid-template-columns: minmax(0, 1fr); align-items: start; gap: 7px; }
.rbp-point-modal .rbp-tip-book { padding: 9px; }
.rbp-point-modal .rbp-tip-chapters { gap: 5px; }
.rbp-point-modal .rbp-tip-chapters > div { min-height: 36px; }
.rbp-point-modal .rbp-point-summary span, .rbp-point-modal .rbp-tip-lesson header > span span, .rbp-point-modal .rbp-tip-book-head > span span { font-size: 11px; }
.rbp-point-modal .rbp-point-summary > strong, .rbp-point-modal .rbp-tip-lesson header > span > strong, .rbp-point-modal .rbp-tip-book-head > span > strong { font-size: 12px; }
.rbp-point-modal .rbp-tip-lesson > header > b { font-size: 13px; }
.rbp-point-modal .rbp-tip-book-head > b { font-size: 12px; }
.rbp-point-modal .rbp-tip-chapters > div > span:first-child { font-size: 11px; }
.rbp-point-modal .rbp-tip-chapter-stats small { font-size: 10.5px; }
.rbp-point-modal .rbp-tip-chapter-stats b { font-size: 11.5px; }
.rbp-chart-empty { position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; gap: 5px; color: #968d81; text-align: center; direction: rtl; }
.rbp-chart-empty svg { width: 24px; height: 24px; opacity: .5; }
.rbp-chart-empty b { color: #665f56; font-size: 12px; font-weight: 900; }
.rbp-chart-empty span { font-size: 10px; font-weight: 700; }

.rbp-heat-legend { display: flex; flex-wrap: wrap; align-items: center; gap: 5px; color: #786f64; font-size: 9.5px; font-weight: 800; }
.rbp-heat-legend i { width: 17px; height: 17px; border: 1px solid color-mix(in srgb, var(--teal) 38%, #d9d2c8); border-radius: 5px; }
.rbp-heat-legend i[data-level="1"] { background: color-mix(in srgb, var(--teal) 18%, #fff); }
.rbp-heat-legend i[data-level="2"] { background: color-mix(in srgb, var(--teal) 32%, #fff); }
.rbp-heat-legend i[data-level="3"] { background: color-mix(in srgb, var(--teal) 48%, #fff); }
.rbp-heat-legend i[data-level="4"] { background: color-mix(in srgb, var(--teal) 66%, #fff); }
.rbp-heat-legend i[data-level="5"] { background: color-mix(in srgb, var(--teal) 84%, #fff); }
.rbp-heat-legend small { margin-inline-start: auto; color: var(--muted); font-size: 9px; font-weight: 700; }
.rbp-coverage-note { margin: 0; padding: 9px 11px; border-radius: 10px; background: #f7f4ee; color: #7d7469; font-size: 10.5px; font-weight: 750; line-height: 1.8; }
.rbp-book-list { display: grid; gap: 8px; }
.rbp-book-row { position: relative; display: grid; grid-template-columns: 170px minmax(0, 1fr); align-items: center; gap: 13px; padding: 12px; border: 1px solid #ebe4da; border-radius: 14px; background: #fdfcf9; overflow: visible; }
.rbp-book-row > header { display: grid; gap: 5px; min-width: 0; padding-inline-start: 10px; border-inline-start: 4px solid var(--rbp-book-color); }
.rbp-book-row > header > span { display: grid; gap: 1px; min-width: 0; }
.rbp-book-row > header small { color: var(--muted); font-size: 10.5px; font-weight: 800; }
.rbp-book-row > header b { color: color-mix(in srgb, var(--rbp-book-color) 68%, #1b1a18); font-size: 13px; font-weight: 950; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rbp-book-row > header > em { color: #6f675d; font-size: 10.5px; font-style: normal; font-weight: 800; }
.rbp-book-row > header > em b { color: var(--ink); font-size: 11px; }
.rbp-book-scroll { min-width: 0; overflow: visible; }
.rbp-chapter-groups { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 9px 12px; }
.rbp-chapter-group { display: grid; gap: 5px; min-width: 0; }
.rbp-chapter-group > b { max-width: 150px; color: #6f675d; font-size: 10px; font-weight: 850; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rbp-chapter-group > div { display: flex; flex-wrap: wrap; gap: 5px; }
.rbp-heat-wrap { position: relative; display: inline-flex; }
.rbp-heat-cell {
  display: inline-flex; align-items: center; justify-content: center; width: 34px; height: 34px; padding: 0;
  border: 2px solid color-mix(in srgb, var(--rbp-book-color) 48%, #aaa397); border-radius: 9px;
  background: #f7f5f0; color: #756d62; font: inherit; cursor: default;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.45); transition: transform .13s ease, filter .13s ease;
}
.rbp-heat-cell > i { font-size: 12px; font-style: normal; font-weight: 950; line-height: 1; opacity: .88; }
.rbp-heat-cell[data-level="1"] { background: color-mix(in srgb, var(--rbp-book-color) 18%, #fff); }
.rbp-heat-cell[data-level="2"] { background: color-mix(in srgb, var(--rbp-book-color) 32%, #fff); }
.rbp-heat-cell[data-level="3"] { background: color-mix(in srgb, var(--rbp-book-color) 48%, #fff); }
.rbp-heat-cell[data-level="4"] { background: color-mix(in srgb, var(--rbp-book-color) 66%, #fff); color: #fff; }
.rbp-heat-cell[data-level="5"] { background: color-mix(in srgb, var(--rbp-book-color) 84%, #fff); color: #fff; }
.rbp-heat-cell:hover, .rbp-heat-cell:focus-visible { position: relative; z-index: 31; transform: translateY(-2px); filter: saturate(1.12); outline: 3px solid color-mix(in srgb, var(--rbp-book-color) 18%, transparent); outline-offset: 2px; }
.rbp-heat-tip {
  position: absolute; z-index: 48; left: 50%; bottom: calc(100% + 9px); display: grid; gap: 4px;
  width: min(250px, 70vw); padding: 10px 11px; border: 1px solid #dcd4c9; border-radius: 13px;
  background: #fff; color: var(--ink); direction: rtl; text-align: start; box-shadow: 0 16px 34px rgba(42,37,30,.19);
  opacity: 0; pointer-events: none; transform: translateX(-50%) translateY(5px); transition: opacity .12s ease, transform .12s ease;
}
.rbp-heat-wrap:hover, .rbp-heat-wrap:focus-within { z-index: 40; }
.rbp-heat-wrap:hover .rbp-heat-tip, .rbp-heat-wrap:focus-within .rbp-heat-tip { opacity: 1; transform: translateX(-50%) translateY(0); transition-delay: .15s; }
.rbp-heat-tip > small { color: var(--muted); font-size: 8.8px; font-weight: 750; }
.rbp-heat-tip > b { color: color-mix(in srgb, var(--rbp-book-color) 70%, #1b1a18); font-size: 11.5px; font-weight: 950; }
.rbp-heat-tip > span { color: #70685e; font-size: 9.5px; font-weight: 750; }
.rbp-heat-tip > span > em { color: var(--ink); font-style: normal; font-weight: 950; }
.rbp-heat-score { display: flex; flex-wrap: wrap; gap: 4px 8px; padding-top: 4px; border-top: 1px dashed #e8e1d7; }
.rbp-heat-score i { font-size: 9px; font-style: normal; }
.rbp-heat-score i:first-child { color: #27806a; }
.rbp-heat-score i:nth-child(2) { color: #b6504d; }
.rbp-heat-score i:last-child { color: #81796e; }
.rbp-heat-tip > strong { color: var(--rbp-book-color); font-size: 11px; font-weight: 950; }
.rbp-no-books { display: grid; justify-items: center; gap: 4px; padding: 28px; color: var(--muted); text-align: center; }
.rbp-no-books svg { width: 26px; height: 26px; opacity: .5; }
.rbp-no-books b { color: var(--ink); font-size: 12px; font-weight: 900; }
.rbp-no-books span { font-size: 10px; font-weight: 700; }

/* ── همگام‌سازی با برنامهٔ مؤسسه‌ها (قلم‌چی / ماز) ──
   کارتِ مؤسسه، فهرستِ آزمون‌های تقویمِ رسمی و نشانِ مرحله‌های همگام‌شده. */
.rb-sync-chip {
  flex: none; display: inline-flex; align-items: center; gap: 5px;
  padding: 3px 9px; border-radius: 999px; background: #eaf4ef; color: #1f7a5c;
  font-size: 10.5px; font-weight: 800; white-space: nowrap;
}
.rb-board-meta .rb-sync-chip svg { width: 12px; height: 12px; opacity: 1; }
.rb-sync-modal { display: grid; gap: 13px; }
.rb-sync-brands { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.rb-sync-brand {
  display: grid; grid-template-columns: 46px minmax(0, 1fr) auto; align-items: center; gap: 11px;
  padding: 12px; border: 1.5px solid var(--rb-border); border-radius: 15px; background: #fff;
  font: inherit; text-align: start; cursor: pointer; transition: border-color .15s ease, background .15s ease;
}
.rb-sync-brand:hover:not(:disabled) { border-color: #d6cbb8; background: var(--rb-paper); }
.rb-sync-brand.on { border-color: var(--orange); background: #fff8f3; }
.rb-sync-brand:disabled { opacity: .55; cursor: not-allowed; }
.rb-sync-brand > span { display: grid; gap: 3px; min-width: 0; }
.rb-sync-brand b { color: var(--rb-navy); font-size: 13px; font-weight: 900; }
.rb-sync-brand small { color: var(--muted); font-size: 10.5px; font-weight: 700; line-height: 1.7; }
.rb-sync-brand > svg { width: 18px; height: 18px; color: var(--orange); }
/* لوگوی مؤسسه باید داخلِ قابِ خودش قیچی شود، نه اینکه کارت را بکشد */
.rb-sync-logo {
  flex: none; display: inline-flex; align-items: center; justify-content: center;
  width: 46px; height: 46px; padding: 4px; border-radius: 13px; background: #fff;
  border: 1px solid #eee7dc; overflow: hidden;
}
.rb-sync-logo > svg, .rb-sync-logo > img { width: 100%; height: 100%; object-fit: contain; }
.rb-sync-opts { display: grid; gap: 10px; }
.rb-sync-modes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
.rb-sync-mode {
  display: grid; grid-template-columns: 20px minmax(0, 1fr); align-items: start; gap: 9px;
  padding: 11px; border: 1.5px solid var(--rb-border); border-radius: 14px; background: #fff;
  font: inherit; text-align: start; cursor: pointer;
}
.rb-sync-mode.on { border-color: var(--rb-navy); background: var(--rb-navy-soft); }
.rb-sync-mode > svg { width: 17px; height: 17px; margin-top: 1px; color: var(--rb-navy); }
.rb-sync-mode span { display: grid; gap: 3px; min-width: 0; }
.rb-sync-mode b { color: var(--rb-navy); font-size: 12px; font-weight: 900; }
.rb-sync-mode small { color: var(--muted); font-size: 10.5px; font-weight: 700; line-height: 1.75; }
.rb-sync-picks { display: flex; flex-wrap: wrap; align-items: center; gap: 7px; }
.rb-sync-picks > span { margin-inline-end: auto; color: var(--muted); font-size: 11px; font-weight: 800; }
.rb-sync-list { display: grid; gap: 6px; max-height: 320px; overflow-y: auto; padding-inline-end: 2px; }
.rb-sync-row {
  display: grid; grid-template-columns: 20px 66px minmax(0, 1fr) auto; align-items: center; gap: 10px;
  padding: 9px 11px; border: 1px solid var(--rb-border); border-radius: 12px; background: #fff; cursor: pointer;
}
.rb-sync-row.on { border-color: #cfe3d8; background: #fbfefc; }
.rb-sync-row.past { opacity: .72; }
.rb-sync-row input { width: 17px; height: 17px; accent-color: var(--orange); }
.rb-sync-date { display: grid; gap: 1px; text-align: center; }
.rb-sync-date b { color: var(--rb-navy); font-size: 11.5px; font-weight: 900; white-space: nowrap; }
.rb-sync-date small { color: var(--muted); font-size: 9.5px; font-weight: 700; }
.rb-sync-main { display: grid; gap: 2px; min-width: 0; }
.rb-sync-main b { color: var(--ink); font-size: 12px; font-weight: 850; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rb-sync-main small { color: var(--muted); font-size: 10px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rb-sync-tag { min-width: 62px; padding: 3px 8px; border-radius: 999px; font-size: 9.5px; font-weight: 800; text-align: center; }
.rb-sync-tag.new { background: var(--teal-soft); color: #157e70; }
.rb-sync-tag.upd { background: #fff3e6; color: #b06a20; }
.rb-sync-tag.keep { background: #f1eee8; color: #81786c; }
.rb-sync-tag.lock { background: #f6eaea; color: #a3524c; }
.rb-sync-warn {
  display: flex; align-items: flex-start; gap: 7px; margin: 0; padding: 10px 12px;
  border: 1px solid #ead59d; border-radius: 12px; background: #fffaf0;
  color: #8d6d1f; font-size: 11px; font-weight: 750; line-height: 1.9;
}
.rb-sync-warn svg { flex: none; width: 14px; height: 14px; margin-top: 3px; }
.ew-lock.disabled { opacity: .6; }

.rb-track-row-wide {
  grid-template-columns: minmax(200px, 1fr) minmax(140px, .62fr) 84px 84px 44px;
  grid-template-areas: "main booklet count time delete" "books books books books books";
}
.rb-track-row-wide > .rb-tf-count { grid-area: count; }
.rb-track-row-wide > .rb-tf-time { grid-area: time; }

@media (pointer: coarse) {
  .rb-track-cog, .rb-stage-edit-trigger { width: 40px; height: 40px; }
  .rb-mini { min-height: 40px; }
  .rbp-heat-cell { width: 40px; height: 40px; }
}

@media (max-width: 1024px) {
  .rb-track-row { grid-template-columns: minmax(190px, 1fr) minmax(140px, .62fr) 44px; }
  .rb-track-row-wide { grid-template-columns: minmax(180px, 1fr) minmax(125px, .62fr) 78px 78px 44px; }
}
@media (max-width: 900px) {
  .rb-wizard-layout { grid-template-columns: minmax(0, 1fr); }
  .rb-sum { position: static; }
  .rb-sum-body { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
  .rb-track-row-wide { grid-template-columns: minmax(170px, 1fr) minmax(120px, .62fr) 74px 74px 44px; }
  .rbp-book-row { grid-template-columns: minmax(0, 1fr); }
  .rbp-book-row > header { grid-template-columns: minmax(0, 1fr) auto; align-items: end; }
}
@media (max-width: 720px) {
  .rb-list-head { align-items: flex-start; }
  .rb-list-head span { display: none; }
  .rb-cards { grid-template-columns: minmax(0, 1fr); }
  .rb-card-stats { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .rb-wizard-head { align-items: center; }
  .rb-wizard-head h2 { font-size: 18px; }
  .rb-board-hero { padding: 14px; }
  .rb-board-head { grid-template-columns: minmax(0, 1fr); }
  /* دکمه‌ها یک ردیفِ پُر می‌شوند تا دکمهٔ آیکونیِ منو تنها به خط بعد نیفتد */
  .rb-board-actions { width: 100%; flex-wrap: wrap; }
  .rb-board-actions .secondary-button,
  .rb-board-actions .primary-button { flex: 1 1 140px; min-width: 0; justify-content: center; white-space: normal; line-height: 1.6; text-align: center; }
  .rb-board-strip { gap: 6px 14px; padding: 10px 12px; }
  .rb-board-strip > span + span { padding-inline-start: 14px; }
  .rb-board-strip-progress { flex: 1 1 100%; }
  .rb-board-toolbar { align-items: flex-start; }
  .rb-board-guide { display: none; }
  .rb-board-tab { padding: 8px 10px; }
  .rb-grid-wrap { display: none; }
  .rb-mobile-stages { display: grid; gap: 9px; }
  .rb-bk-block-head { grid-template-columns: 44px minmax(0, 1fr) 44px; grid-template-areas: "index name delete" ". stat ."; }
  .rb-bk-stat { justify-self: start; }
  .rb-track-row, .rb-track-row-wide {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-areas: "main main" "booklet booklet" "books books";
    align-items: end; padding-top: 12px;
  }
  .rb-track-row-wide { grid-template-areas: "main main" "booklet booklet" "count time" "books books"; }
  .rb-track-row > .rb-icon-btn { position: absolute; inset-inline-end: 11px; top: 11px; }
  .rb-track-main { padding-inline-end: 52px; }
  .rb-budget-row { grid-template-columns: minmax(0, 1fr) 74px 74px; gap: 8px; padding-inline: 10px; }
  .rb-join-row { grid-template-columns: minmax(0, 1fr) 58px 52px; }
  .rb-join-topics { grid-column: 1 / -1; }
  .rb-sync-brands, .rb-sync-modes { grid-template-columns: minmax(0, 1fr); }
  .rb-sync-row { grid-template-columns: 20px 62px minmax(0, 1fr); }
  .rb-sync-tag { grid-column: 2 / -1; justify-self: start; }
  .rbp-chart-card, .rbp-coverage-card { padding: 13px; }
  .rbp-section-head { align-items: flex-start; }
  .rbp-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .rbp-y-axis, .rbp-plot { height: 230px; }
  .rbp-point-tip { width: min(340px, 78vw); max-height: 330px; }
  .rbp-tip-chapters > div { grid-template-columns: minmax(72px, 1fr) auto; }
}
@media (max-width: 520px) {
  .exam-hub-tabs { justify-content: flex-start; width: 100%; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
  .exam-hub-tabs::-webkit-scrollbar { display: none; }
  .exam-hub-tab { flex: none; padding: 9px 13px; font-size: 11.5px; }
  .rb-card { padding: 14px; }
  .rb-card-stats small { font-size: 8.7px; }
  .rb-card-foot { align-items: flex-start; }
  .rb-card-go { flex: none; }
  .rb-sum { padding: 13px; }
  .rb-sum-body { grid-template-columns: minmax(0, 1fr); }
  .rb-form-section { padding: 13px; }
  .rb-budget-head { display: none; }
  .rb-budget-row { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 10px; padding: 11px 12px; }
  .rb-budget-name { grid-column: 1 / -1; }
  .rb-budget-name b, .rb-budget-name small { white-space: normal; }
  .rb-budget-cell > span { display: block; }
  .rb-budget-total { grid-template-columns: minmax(0, 1fr) 1fr 1fr; }
  .rb-scope-options { grid-template-columns: minmax(0,1fr); }
  .rb-book-check { flex: 1 1 calc(50% - 4px); }
  .rb-book-check span { width: 100%; justify-content: center; }
  .rb-board-tabs { width: 100%; overflow-x: auto; }
  .rb-board-tab { flex: none; }
  .rbp-section-head > em { display: none; }
  .rbp-filters { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 3px; scrollbar-width: none; }
  .rbp-filters::-webkit-scrollbar { display: none; }
  .rbp-filters button { flex: none; }
  .rbp-chart { grid-template-columns: 34px minmax(0, 1fr); gap: 4px; }
  .rbp-y-axis, .rbp-plot { height: 210px; }
  .rbp-x-label { width: 70px; font-size: 8px; }
  .rbp-point-tip { width: min(300px, 82vw); }
  .modal.rbp-progress-modal { width: 100vw; }
  .rbp-point-modal .rbp-point-breakdown, .rbp-point-modal .rbp-tip-books { grid-template-columns: minmax(0, 1fr); }
  .rbp-tip-chapters > div { grid-template-columns: minmax(0, 1fr) auto; }
  .rbp-tip-chapters small { grid-column: 1 / -1; grid-row: 2; }
  .rbp-heat-legend small { flex-basis: 100%; margin-inline-start: 0; }
  .rbp-chapter-groups { gap: 11px 9px; }
}

/* ═══════════ تابلوی پروژه‌ها (واگذاری کار به مدیران) ═══════════
   کارتِ پروژه عمداً کارتِ ددلاین را در دلِ خودش جا می‌دهد (`.prj-card .dl-card`)
   به‌جای اینکه نوار پیشرفتِ تازه‌ای بسازد: نوارِ زمان، باندها و دکمه‌های «تأیید
   تکمیل / بازگردانی دسترسی» همان‌هایی‌اند که مدیر اصلی در «نمای کلی» می‌بیند و
   دو زبانِ بصریِ متفاوت برای یک مفهوم، خودش منبع خطاست. */
.prj-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 14px;
  padding: 14px 16px;
}
.prj-card {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 14px;
  background: var(--panel-soft);
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 0;
}
.prj-card.prj-open { border-color: #f3cba4; }
.prj-card.prj-closed, .prj-card.prj-archived { opacity: .74; }
.prj-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; }
.prj-title { display: flex; gap: 8px; align-items: flex-start; min-width: 0; }
.prj-title svg { width: 18px; height: 18px; color: var(--muted); flex-shrink: 0; margin-top: 2px; }
.prj-title b { display: block; font-size: 13.5px; }
.prj-title small { display: block; color: var(--muted); font-size: 11px; margin-top: 2px; overflow: hidden; text-overflow: ellipsis; }
.prj-badge {
  flex: none; padding: 4px 10px; border-radius: 999px; border: 1px solid var(--line);
  background: var(--panel); font-size: 10.5px; font-weight: 900;
}
.prj-badge.dl-timec-ok { background: var(--teal-soft); border-color: transparent; }
.prj-badge.dl-done { background: var(--blue-soft); border-color: transparent; }

.prj-meta { display: flex; flex-wrap: wrap; gap: 6px 12px; align-items: center; }
.prj-meta-item { display: inline-flex; align-items: center; gap: 5px; color: var(--muted); font-size: 11px; font-weight: 800; }
.prj-meta-item svg { width: 13px; height: 13px; }
.prj-meta-ident { flex-wrap: wrap; gap: 5px; }
.prj-chip { display: inline-flex; align-items: center; gap: 5px; padding: 2px 8px; border-radius: 999px; background: var(--panel); border: 1px solid var(--line); color: var(--ink); font-size: 10px; font-weight: 850; }
.prj-chip-any { color: var(--muted); }
.prj-chip-scope { background: var(--panel-soft); color: var(--muted); }
.prj-chip-source { padding-inline-start: 4px; }
/* لوگوی منبع باید داخل قابِ ۱۶پیکسلی قیچی شود؛ بدون قانونِ فرزند، SVG/تصویرِ
   آپلودی ابعادِ خودش را تحمیل می‌کند و ردیفِ چیپ‌ها را می‌کشد. */
.prj-src-logo { width: 16px; height: 16px; flex: none; display: inline-flex; align-items: center; justify-content: center; overflow: hidden; border-radius: 4px; }
.prj-src-logo > * { width: 100%; height: 100%; object-fit: contain; }
.prj-src-logo svg { width: 100%; height: 100%; }
.prj-src-logo.src-icon-fallback { color: var(--muted); }
.prj-src-logo.src-icon-fallback > svg { width: 72%; height: 72%; }
.prj-auto { color: var(--teal); }
.prj-note { margin: 0; color: var(--ink); font-size: 12px; line-height: 1.9; white-space: pre-wrap; }
.prj-warn { padding: 8px 10px; border-radius: 10px; background: var(--red-soft); color: var(--red); font-size: 11.5px; font-weight: 850; }
.prj-card .dl-card { background: var(--panel); }

.prj-assignee { display: flex; align-items: center; gap: 9px; padding: 9px 10px; border-radius: 11px; background: var(--panel); border: 1px solid var(--line); }
.prj-assignee b { font-size: 12.5px; }
.prj-assignee small { display: block; color: var(--muted); font-size: 11px; }

.prj-reqs { display: grid; gap: 8px; }
.prj-reqs-head { color: var(--muted); font-size: 11px; font-weight: 900; }
.prj-reqs-page { padding: 12px 16px 16px; }
.prj-req-wrap { display: grid; gap: 5px; }
.prj-req-project { color: var(--muted); font-size: 11px; font-weight: 900; }
.prj-req-project small { color: var(--muted); font-weight: 700; opacity: .82; }
.prj-req {
  display: flex; align-items: center; gap: 9px; flex-wrap: wrap;
  padding: 9px 10px; border-radius: 11px; background: var(--panel); border: 1px solid var(--line);
}
.prj-req .avatar { flex: none; }
.prj-req-copy { flex: 1 1 160px; min-width: 0; }
.prj-req-copy b { display: block; font-size: 12.5px; }
.prj-req-copy small { display: block; color: var(--muted); font-size: 11px; margin-top: 2px; }
.prj-req-actions { display: flex; gap: 6px; flex-wrap: wrap; margin-inline-start: auto; }
.prj-req-state { margin-inline-start: auto; color: var(--muted); font-size: 11px; font-weight: 900; }
.prj-req-approved .prj-req-state { color: var(--teal); }
.prj-req-rejected .prj-req-state, .prj-req-passed .prj-req-state { color: var(--red); }

.prj-history { border-top: 1px dashed var(--line); padding-top: 8px; }
.prj-history summary { cursor: pointer; color: var(--muted); font-size: 11px; font-weight: 900; }
.prj-history > .prj-req { margin-top: 7px; }

.prj-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 7px; margin-top: auto; }
.prj-actions button.small { padding: 6px 11px; font-size: 11px; border-radius: 9px; }
.prj-actions button.small svg { width: 13px; height: 13px; }
.prj-actions .row-action { margin-inline-start: auto; }
.prj-pending-note { display: inline-flex; align-items: center; gap: 5px; color: var(--muted); font-size: 11.5px; font-weight: 850; }
.prj-pending-note svg { width: 13px; height: 13px; }
.prj-pending-note.prj-rejected { color: var(--red); }

.prj-filters { display: flex; flex-wrap: wrap; gap: 6px; }
.prj-filter {
  border: 1px solid var(--line); border-radius: 999px; background: var(--panel);
  color: var(--muted); font: inherit; font-size: 11px; font-weight: 850; padding: 5px 12px; cursor: pointer;
}
.prj-filter.on { background: var(--orange-soft); border-color: transparent; color: #a85b1b; }
.prj-busy-hint { color: #9a7a2a; }
/* دکمهٔ سرصفحه نباید زیر فشارِ فلکس دوخطه شود؛ `.page-head` با
   `justify-content: space-between` متن را تا آخر باز می‌کند و دکمه له می‌شد. */
.prj-head-actions { flex: none; }
.prj-head-actions > button { white-space: nowrap; }

/* ——— انتخابگرِ تو‌در‌توی پوشه در مودال پروژه ——— */
.prjt-nav {
  grid-column: 1 / -1;
  display: flex; align-items: center; flex-wrap: wrap; gap: 2px;
  padding: 8px 10px; border: 1px solid var(--line); border-bottom: 0;
  border-radius: 12px 12px 0 0; background: var(--panel-soft);
}
.prjt-nav[hidden] { display: none; }
.prjt-crumb {
  border: 0; background: transparent; color: var(--muted); font: inherit;
  font-size: 11.5px; font-weight: 850; padding: 3px 6px; border-radius: 7px; cursor: pointer;
}
.prjt-crumb:hover { background: var(--panel); color: var(--ink); }
.prjt-crumb.is-here { color: var(--ink); cursor: default; padding: 3px 6px; }
.prjt-sep { display: inline-flex; color: var(--muted); opacity: .55; }
.prjt-sep svg { width: 12px; height: 12px; }

.prjt-list {
  grid-column: 1 / -1;
  max-height: 268px; overflow: auto;
  border: 1px solid var(--line); border-radius: 0 0 12px 12px; background: var(--panel);
}
.prjt-nav[hidden] + .prjt-list { border-radius: 12px; }
.prjt-list > .modal-hint { margin: 0; padding: 18px 14px; text-align: center; }
.prjt-row { display: flex; align-items: stretch; border-top: 1px solid var(--line); }
.prjt-row:first-child { border-top: 0; }
.prjt-row.on { background: var(--orange-soft); }
.prjt-row.is-busy { opacity: .55; }
.prjt-pick { display: flex; align-items: center; padding: 0 12px; cursor: pointer; }
.prjt-row.is-busy .prjt-pick { cursor: not-allowed; }
.prjt-pick input { position: absolute; opacity: 0; width: 0; height: 0; }
.prjt-box {
  width: 17px; height: 17px; display: grid; place-items: center; flex: none;
  border: 1.6px solid #d6cab8; border-radius: 5px; background: var(--panel);
}
.prjt-pick input:checked + .prjt-box { background: var(--orange); border-color: var(--orange); }
/* تیک با «ضلعِ پایین + ضلعِ چپ» ساخته می‌شود و بعد ۴۵ درجه می‌چرخد. این دو ضلع
   باید فیزیکی بمانند: `border-inline-end` در صفحهٔ راست‌به‌چپ ضلعِ چپ را برمی‌دارد،
   پس شکل آینه می‌شود و به‌جای ✓ یک «❯» رسم می‌شود. */
.prjt-pick input:checked + .prjt-box::after {
  content: ""; width: 7px; height: 4px;
  border: 1.7px solid #fff; border-width: 0 0 1.7px 1.7px;
  transform: rotate(-45deg) translateY(-1px);
}
.prjt-open {
  flex: 1; min-width: 0; display: flex; align-items: center; gap: 9px;
  padding: 10px 12px 10px 0; border: 0; background: transparent; color: var(--ink);
  font: inherit; text-align: start; cursor: pointer;
}
.prjt-open:hover { background: var(--panel-soft); }
.prjt-dot { width: 9px; height: 9px; flex: none; border-radius: 50%; background: var(--folder-color, #999); }
.prjt-copy { flex: 1; min-width: 0; display: grid; }
.prjt-copy b { font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.prjt-copy small { color: var(--muted); font-size: 10.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.prjt-state {
  flex: none; padding: 3px 9px; border-radius: 999px;
  font-size: 10px; font-weight: 900; white-space: nowrap;
  background: var(--panel-soft); border: 1px solid var(--line); color: var(--muted);
}
.prjt-st-running { background: var(--orange-soft); border-color: transparent; color: #a85b1b; }
.prjt-st-owned { background: var(--red-soft); border-color: transparent; color: var(--red); }
.prjt-st-done { background: var(--teal-soft); border-color: transparent; color: var(--teal); }
.prjt-chev { display: inline-flex; flex: none; color: var(--muted); }
.prjt-chev svg { width: 15px; height: 15px; }

.prjt-selection { grid-column: 1 / -1; }
.prjt-empty { margin: 0; color: var(--muted); font-size: 11.5px; }
.prjt-chips { display: flex; flex-wrap: wrap; gap: 7px; }
.prjt-chip {
  display: inline-flex; align-items: center; gap: 8px; padding: 6px 10px;
  border: 1px solid transparent; border-radius: 11px; background: var(--orange-soft);
}
.prjt-chip.no-lesson { background: var(--panel-soft); border-color: var(--line); }
.prjt-chip b { font-size: 12px; }
.prjt-chip small { color: var(--muted); font-size: 10px; }
.prjt-chip-x {
  display: inline-grid; place-items: center; width: 18px; height: 18px; flex: none;
  border: 0; border-radius: 6px; background: transparent; color: var(--muted); cursor: pointer;
}
.prjt-chip-x:hover { background: var(--panel); color: var(--red); }
.prjt-chip-x svg { width: 11px; height: 11px; }

/* قفلِ تابلو تا تکمیلِ اولین پروژه، و فهرست واگذاری دستی */
.prj-lock-chip {
  display: inline-flex; align-items: center; gap: 5px; padding: 4px 11px; border-radius: 999px;
  border: 1px solid var(--line); background: var(--panel); color: var(--muted); font-size: 11px; font-weight: 900;
}
.prj-lock-chip svg { width: 13px; height: 13px; }
.prj-rookie-state .prj-rookie-hint { margin-top: 8px; color: var(--muted); font-size: 12px; line-height: 1.9; }
.prj-assign-list { max-height: 300px; overflow: auto; }
/* ردیفِ `.bmove-row` برای [تیک][نقطهٔ رنگِ پوشه][متن][شمارش] ساخته شده و ستونِ دومش
   ۱۲ پیکسل است؛ آواتارِ ۳۰ پیکسلیِ مدیر از آن بیرون می‌زد و روی نام می‌افتاد.
   این ردیف ستونِ آواتارِ خودش را دارد. */
.prj-assign-row {
  grid-template-columns: 18px 30px minmax(0, 1fr) auto;
  align-items: center;
}
.prj-assign-row .avatar { flex: none; width: 30px; height: 30px; border-radius: 9px; }
.prj-assign-row.is-blocked { opacity: .55; cursor: not-allowed; }
.prj-assign-tags { display: flex; flex-wrap: wrap; gap: 5px; margin-inline-start: auto; }
.prj-chip-rookie { background: var(--teal-soft); border-color: transparent; color: var(--teal); }
.prj-chip-warn { background: var(--orange-soft); border-color: transparent; color: #a85b1b; }

/* ═════ «درخواست پروژه»: جدول فشرده، هر درخواست در یک ردیف ═════ */
.wrq-page { display: grid; gap: 12px; min-width: 0; }
.wrq-page > .page-head { margin: 0; align-items: center; flex-direction: row; gap: 12px; }
.wrq-page > .page-head h1 { margin: 0; font-size: 22px; }
.wrq-page > .page-head p { margin-top: 4px; max-width: 800px; font-size: 12px; line-height: 1.7; }
.wrq-page > .panel, .wrq-page > .panel + .panel { min-width: 0; margin: 0; border-radius: 9px; box-shadow: none; }
.wrq-page .wrq-stats { grid-template-columns: repeat(4, minmax(0, 1fr)); margin: 0; gap: 0; border: 1px solid var(--line); border-radius: 8px; background: var(--panel); overflow: hidden; }
.wrq-page .wrq-stats .stat-card { min-width: 0; min-height: 42px; padding: 8px 14px; gap: 8px; background: transparent; border: 0; border-radius: 0; box-shadow: none; }
.wrq-page .wrq-stats .stat-card + .stat-card { border-inline-start: 1px solid var(--line); }
.wrq-page .wrq-stats .stat-card::after, .wrq-page .wrq-stats .stat-delta { display: none; }
.wrq-page .wrq-stats .stat-icon { flex: none; width: 22px; height: 22px; border-radius: 5px; background: transparent; }
.wrq-page .wrq-stats .stat-icon svg { width: 16px; height: 16px; }
.wrq-page .wrq-stats .stat-copy { display: flex; align-items: center; gap: 8px; min-width: 0; flex: 1; }
.wrq-page .wrq-stats .stat-copy small { min-width: 0; font-size: 11px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wrq-page .wrq-stats .stat-copy strong { flex: none; margin: 0; font-size: 17px; line-height: 1.3; font-variant-numeric: tabular-nums; }
.wrq-page .panel-header, .wrq-panel .panel-header { min-height: 46px; flex-wrap: wrap; gap: 8px; padding: 10px 14px; }
.wrq-page .panel-title { flex-wrap: wrap; gap: 8px; }
.wrq-page .panel-title h2 { font-size: 13px; }
.wrq-page .prj-filter { padding: 4px 10px; border-radius: 6px; font-size: 11px; }
.wrq-body { padding: 12px 14px; min-width: 0; }
.wrq-body > :last-child { margin-bottom: 0; }
.wrq-body .prj-grid, .wrq-body .prj-reqs-page { padding: 0; }
.wrq-sync { display: inline-flex; align-items: center; gap: 5px; color: var(--muted); font-size: 11px; font-weight: 800; }
.wrq-sync svg { width: 13px; height: 13px; animation: amx-spin 1s linear infinite; }
.wrq-toolbar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 10px; min-width: 0; }
.wrq-toolbar .acg-search.mk-search-field:not([hidden]) { flex: 1 1 300px; max-width: 400px; margin: 0; min-height: 34px; min-block-size: 34px; min-width: 0; border-radius: 7px; padding: 0 9px; }
.wrq-page .wrq-toolbar .acg-search.mk-search-field > input { flex: 1; min-width: 0; border: 0; background: transparent; outline: 0; font: inherit; font-size: 12px; color: var(--ink); padding: 5px 0; }
.wrq-select { height: 34px; min-height: 34px; width: 140px; min-width: 0; border: 1px solid var(--line); border-radius: 7px; background: var(--panel); color: var(--ink); font: inherit; font-size: 11px; padding: 0 9px; }
.wrq-hint { margin: 0 0 8px; color: var(--muted); font-size: 11px; line-height: 1.7; }
.wrq-hint b { color: var(--ink); }
.wrq-busy { display: flex; gap: 6px; align-items: flex-start; padding: 8px 10px; border-radius: 7px; background: var(--yellow-soft); color: #7a5a12; }
.wrq-busy svg { flex: none; width: 14px; height: 14px; margin-top: 2px; }
.wrq-subhead { display: flex; flex-wrap: wrap; gap: 8px; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.wrq-filter-row { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; margin-bottom: 10px; }
.wrq-filter-row > .wrq-toolbar { flex: 1 1 400px; margin: 0; }
.wrq-status-filters { margin-bottom: 10px; gap: 5px; }
.wrq-filter-row > .wrq-status-filters { margin: 0; flex: none; }

/* جدول در موبایل هم تک‌ردیفی می‌ماند و فقط داخل کادر پیمایش می‌شود. */
.wrq-table-wrap {
  width: 100%; max-width: 100%; min-width: 0; overflow: auto;
  border: 1px solid var(--line); border-radius: 8px; background: var(--panel);
  scrollbar-width: thin; scrollbar-color: color-mix(in srgb, var(--muted) 35%, transparent) transparent;
  overscroll-behavior-inline: contain; -webkit-overflow-scrolling: touch;
}
.wrq-table-wrap:focus-visible { outline: 2px solid var(--orange); outline-offset: 2px; }
.wrq-table { width: 100%; min-width: 880px; table-layout: fixed; border-collapse: separate; border-spacing: 0; text-align: center; font-size: 12px; line-height: 1.5; }
.wrq-table > caption.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); clip-path: inset(50%); white-space: nowrap; border: 0; }
.wrq-table th, .wrq-table td { padding: 7px 10px; text-align: center; vertical-align: middle; white-space: nowrap; }
.wrq-table :is(th, td):not(:last-child) { border-inline-end: 1px solid var(--line); }
.wrq-table th { height: 35px; background: var(--panel-soft); border-bottom: 1px solid var(--line); color: var(--muted); font-size: 10.5px; font-weight: 800; }
.wrq-table td { height: 44px; border-bottom: 1px solid var(--line); background: var(--panel); }
.wrq-table tbody tr:last-child td { border-bottom: 0; }
.wrq-table tbody tr:hover td { background: color-mix(in srgb, var(--panel-soft) 65%, var(--panel)); }
.wrq-table tr.is-top td { background: color-mix(in srgb, var(--orange-soft) 20%, var(--panel)); }
.wrq-table tr.is-top:hover td { background: color-mix(in srgb, var(--orange-soft) 35%, var(--panel)); }
.wrq-queue-table th:nth-child(1) { width: 44px; }
.wrq-queue-table th:nth-child(2) { width: 164px; }
.wrq-queue-table th:nth-child(3) { width: auto; }
.wrq-queue-table th:nth-child(4) { width: 96px; }
.wrq-queue-table th:nth-child(5) { width: 128px; }
.wrq-queue-table th:nth-child(6) { width: 156px; }
.wrq-queue-table th:nth-child(7) { width: 140px; }
.wrq-person { display: grid; grid-template-columns: 24px minmax(0, 1fr) 5px; align-items: center; gap: 7px; width: 100%; min-width: 0; padding: 1px 0; border-radius: 5px; cursor: pointer; outline: 0; direction: rtl; text-align: right; }
.wrq-person:hover { color: var(--orange); }
.wrq-person:focus-visible { outline: 2px solid var(--orange); outline-offset: 2px; }
.wrq-person .avatar { flex: none; width: 24px; height: 24px; border-radius: 6px; font-size: 10px; }
.wrq-person-copy { display: block; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; direction: rtl; unicode-bidi: plaintext; text-align: right; }
.wrq-person-copy b { font-size: 12px; font-weight: 750; white-space: nowrap; }
.wrq-person-copy small { color: var(--muted); font-size: 10px; }
.wrq-inactive-dot { flex: none; width: 5px; height: 5px; border-radius: 50%; background: var(--red); }
.wrq-lessons { display: flex; flex-wrap: wrap; gap: 5px; align-items: center; }
.wrq-table .wrq-lessons { justify-content: center; }
.wrq-lessons > small { color: var(--muted); font-size: 11px; font-weight: 800; }
.wrq-lesson-text { display: block; max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 11.5px; }
.wrq-table .wrq-status { max-width: 100%; padding: 2px 7px; white-space: nowrap; font-size: 10px; border-radius: 5px; }
.wrq-rank-number { display: inline-flex; align-items: center; justify-content: center; min-width: 23px; height: 23px; border-radius: 5px; color: var(--muted); font-size: 11.5px; font-weight: 800; font-variant-numeric: tabular-nums; }
.is-top .wrq-rank-number { background: var(--orange-soft); color: var(--orange); }
.wrq-created-count { display: inline-block; color: var(--ink); font-size: 13px; font-weight: 800; font-variant-numeric: tabular-nums; }
.wrq-work-summary, .wrq-date { display: inline-flex; align-items: center; justify-content: center; gap: 5px; max-width: 100%; white-space: nowrap; font-size: 11px; }
.wrq-work-summary b, .wrq-date b { font-size: inherit; font-weight: 650; white-space: nowrap; }
.wrq-work-summary small, .wrq-date small { color: var(--muted); font-size: 10px; }
.wrq-cell-separator { color: var(--muted); }
.wrq-table-actions { display: flex; align-items: center; justify-content: center; gap: 5px; white-space: nowrap; }
.wrq-table-actions .small, .wrq-result-summary .small { height: 28px; min-height: 28px; padding: 0 8px; border-radius: 6px; font-size: 10.5px; white-space: nowrap; box-shadow: none; transform: none; }
.wrq-table-actions .small svg, .wrq-result-summary .small svg { width: 12px; height: 12px; }
.wrq-table-actions .primary-button, .wrq-table-actions .secondary-button { border: 1px solid color-mix(in srgb, var(--orange) 40%, var(--line)); background: var(--panel); color: var(--orange); box-shadow: none; }
.wrq-table-actions .primary-button:hover, .wrq-table-actions .secondary-button:hover { background: var(--orange-soft); box-shadow: none; transform: none; }
.wrq-table-actions button::before, .wrq-table-actions button::after { display: none; }
.wrq-table-actions [data-wrq-reject] { color: var(--red); }
.wrq-table-actions [data-wrq-reject]:hover { background: var(--red-soft); }
.wrq-table-footer { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 12px; padding-top: 8px; color: var(--muted); font-size: 10.5px; line-height: 1.6; }
.wrq-sort-note { display: flex; align-items: center; gap: 5px; margin: 0; color: var(--muted); font-size: 10.5px; line-height: 1.6; }
.wrq-sort-note > svg { flex: none; width: 13px; height: 13px; color: var(--muted); }
.wrq-sort-note b { color: var(--ink); font-weight: 700; }
.wrq-toolbar > .wrq-sort-note { margin-inline-start: auto; }
.wrq-history-table { min-width: 900px; }
.wrq-history-table th:first-child { width: 160px; }
.wrq-history-table th:nth-child(2) { width: 115px; }
.wrq-history-table th:nth-child(3) { width: 100px; }
.wrq-history-table th:nth-child(4) { width: 156px; }
.wrq-history-table th:last-child { width: 135px; }
.wrq-history-table:has(th:nth-child(4):last-child) { min-width: 680px; }
.wrq-history-table:has(th:nth-child(4):last-child) th:nth-child(1) { width: 140px; }
.wrq-history-table:has(th:nth-child(4):last-child) th:nth-child(2) { width: 110px; }
.wrq-history-table:has(th:nth-child(4):last-child) th:nth-child(3) { width: 156px; }
.wrq-history-table:has(th:nth-child(4):last-child) th:nth-child(4) { width: auto; }
.wrq-legacy-table { min-width: 800px; }
.wrq-legacy-table th:first-child { width: 160px; }
.wrq-legacy-table th:nth-child(3) { width: 156px; }
.wrq-legacy-table th:nth-child(4) { width: 100px; }
.wrq-legacy-table th:last-child { width: 180px; }
.wrq-legacy-table:has(th:nth-child(4):last-child) { min-width: 600px; }
.wrq-legacy-table:has(th:nth-child(4):last-child) th:nth-child(1) { width: auto; }
.wrq-legacy-table:has(th:nth-child(4):last-child) th:nth-child(2) { width: 156px; }
.wrq-legacy-table:has(th:nth-child(4):last-child) th:nth-child(3) { width: 100px; }
.wrq-legacy-table:has(th:nth-child(4):last-child) th:nth-child(4) { width: 100px; }
.wrq-result { display: block; min-width: 0; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted); font-size: 11px; }
.wrq-result-summary { display: flex; align-items: center; justify-content: center; gap: 6px; min-width: 0; max-width: 100%; white-space: nowrap; }
.wrq-result-text { display: block; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 11px; }
.wrq-result-summary > .wrq-result-text { flex: 0 1 auto; }
.wrq-result-summary > button { flex: none; }
.wrq-own-table { min-width: 770px; }
.wrq-own-table th:nth-child(1) { width: 90px; }
.wrq-own-table th:nth-child(2) { width: auto; }
.wrq-own-table th:nth-child(3) { width: 100px; }
.wrq-own-table th:nth-child(4) { width: 156px; }
.wrq-own-table th:nth-child(5) { width: 90px; }
.wrq-own-table th:nth-child(6) { width: 170px; }
.wrq-team { min-width: 0; }
.wrq-team .wrq-table { min-width: 880px; }
.wrq-flag { display: inline-flex; align-items: center; padding: 1px 5px; border-radius: 4px; background: var(--panel); border: 1px solid var(--line); color: var(--muted); font-size: 9px; font-weight: 750; }
.wrq-flag.is-off { background: var(--red-soft); border-color: transparent; color: var(--red); }
.wrq-chip-match { background: var(--teal-soft); border-color: transparent; color: var(--teal); }
.wrq-chip-known { background: var(--blue-soft); border-color: transparent; color: var(--blue); }
.wrq-legacy { margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--line); }
.wrq-legacy h3 { display: flex; align-items: center; gap: 6px; margin: 0 0 8px; font-size: 12px; }
.wrq-legacy h3 svg { width: 14px; height: 14px; }

.wrq-status { display: inline-flex; align-items: center; padding: 3px 9px; border-radius: 6px; font-size: 10.5px; font-weight: 800; background: var(--panel); border: 1px solid var(--line); }
.wrq-status.is-pending { background: var(--yellow-soft); border-color: transparent; color: #8a6510; }
.wrq-status.is-done { background: var(--teal-soft); border-color: transparent; color: var(--teal); }
.wrq-status.is-rejected { background: var(--red-soft); border-color: transparent; color: var(--red); }
.wrq-status.is-off { color: var(--muted); }
.wrq-given-row { display: flex; align-items: center; gap: 8px; padding: 7px 9px; border-radius: 7px; background: var(--panel); border: 1px solid var(--line); }
.wrq-given-row > svg { width: 15px; height: 15px; flex: none; color: var(--teal); }
.wrq-given-row > span:first-of-type { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.wrq-given-row b { font-size: 12px; }
.wrq-given-row small { color: var(--muted); font-size: 10.5px; overflow-wrap: anywhere; }
.wrq-note { display: flex; gap: 6px; align-items: flex-start; margin: 0; font-size: 12px; line-height: 1.8; color: var(--ink); }
.wrq-note svg { width: 14px; height: 14px; flex: none; margin-top: 3px; color: var(--muted); }

/* فرم کوتاه ثبت و ویرایش؛ جزئیات هر درخواست در پنجرهٔ خودش باز می‌شود. */
.wrq-form { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.wrq-field-hint { display: block; color: var(--muted); font-size: 11px; margin: 0 0 10px; line-height: 1.7; }
.wrq-lesson-fieldset { min-inline-size: 0; margin: 0; padding: 0; border: 0; }
.wrq-lesson-fieldset legend { padding: 0; margin: 0 0 5px; font-size: 12px; font-weight: 800; color: var(--ink); }
.wrq-form .lesson-allow-grid { gap: 7px; }
.wrq-form .lesson-allow-choice { min-height: 36px; padding: 6px 11px; gap: 7px; background: var(--panel); color: var(--ink); font-size: 11.5px; border-radius: 7px; }
.wrq-form .lesson-allow-choice.on { background: var(--teal-soft); color: var(--teal); border-color: var(--teal); }
.wrq-form .lesson-allow-choice:focus-within { outline: 2px solid var(--teal); outline-offset: 2px; }
.wrq-form .lesson-allow-choice.is-mine { border-style: solid; font-weight: 800; }
.wrq-form-actions { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; }
.wrq-form > .wrq-form-actions { padding-top: 12px; border-top: 1px solid var(--line); }
.wrq-form-actions button { height: 34px; min-height: 34px; border-radius: 7px; font-size: 11.5px; box-shadow: none; }
.wrq-edit-context { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 0; padding: 8px 10px; background: var(--panel-soft); border: 1px solid var(--line); border-radius: 7px; font-size: 11px; color: var(--muted); line-height: 1.7; }
.wrq-edit-context svg { width: 14px; height: 14px; flex: none; color: var(--muted); }
.wrq-edit-context b { color: var(--ink); }
.wrq-mine { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.wrq-request-details { display: grid; gap: 12px; min-width: 0; overflow-wrap: anywhere; white-space: normal; }
.wrq-request-details .info-row { gap: 14px; margin: 0; align-items: flex-start; }
.wrq-request-details .info-row > span:first-child { flex: none; }
.wrq-request-details .info-row > strong { min-width: 0; white-space: normal; text-align: end; line-height: 1.8; }
.wrq-detail-project { display: flex; flex-wrap: wrap; align-items: center; gap: 7px 12px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 7px; background: var(--panel-soft); }
.wrq-detail-project > b { flex-basis: 100%; font-size: 12.5px; line-height: 1.8; }
.wrq-detail-project > p { flex-basis: 100%; margin: 0; color: var(--muted); font-size: 11.5px; line-height: 1.9; }
.wrq-detail-project > span { color: var(--muted); font-size: 11px; }
.wrq-detail-project > button { margin-inline-start: auto; box-shadow: none; }
.wrq-detail-note { margin: 0; padding: 10px 12px; border-inline-start: 2px solid var(--line); color: var(--ink); font-size: 12px; line-height: 1.9; white-space: pre-wrap; }

/* مودالِ «اعطای پروژه»: فاصلهٔ بخش‌ها با gap، بدون حاشیهٔ انباشته یا فضای پنل پنهان. */
.wrq-give-body { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; }
.wrq-pane-stack:not([hidden]) { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; min-width: 0; }
.wrq-give-body > .modal-hint, .wrq-pane-stack > :is(.wrq-field-hint, .modal-hint) { margin: 0; }
.wrq-pane-stack > .question-code-search.bmove-search { width: 100%; margin: 0; }
.wrq-pane-stack > .prjt-nav { border-bottom: 1px solid var(--line); border-radius: 9px; }
.wrq-pane-stack > .prjt-list { border-radius: 9px; }
.wrq-give-summary { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; margin: 0; border-radius: 12px; background: var(--panel-soft); border: 1px solid var(--line); }
.wrq-give-summary .avatar { flex: none; width: 38px; height: 38px; border-radius: 11px; }
.wrq-give-summary > div { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.wrq-give-summary small { color: var(--muted); font-size: 11px; }
.wrq-give-tabs { margin: 0; }
.wrq-ready-list { display: flex; flex-direction: column; gap: 8px; max-height: 340px; overflow: auto; margin: 0; padding: 2px; }
.wrq-ready-list > .modal-hint { margin: 0; }
.wrq-ready-row { display: flex; align-items: center; gap: 9px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 11px; background: var(--panel); cursor: pointer; }
.wrq-ready-row.on { border-color: var(--orange); background: var(--orange-soft); }
.wrq-ready-row.is-blocked { opacity: .55; cursor: not-allowed; }
.wrq-ready-row input { flex: none; width: 16px; height: 16px; accent-color: var(--orange); }
.wrq-ready-copy { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.wrq-ready-copy b { font-size: 12.5px; }
.wrq-ready-copy small { color: var(--muted); font-size: 10.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wrq-ready-meta { display: flex; flex-wrap: wrap; gap: 4px; justify-content: flex-end; max-width: 45%; }
.wrq-give-picked { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 0; }
.wrq-give-picked:not(:has(.prjt-chip)) { display: none; }
.wrq-give-picked > small { color: var(--muted); font-size: 11px; font-weight: 800; }
#wrqNewPane .form-grid { margin: 0; }

/* کارتِ «روی نام بایست» */
.wrq-card {
  position: fixed; z-index: 1200; width: min(340px, calc(100vw - 16px)); max-height: min(520px, calc(100vh - 16px)); overflow: auto;
  padding: 12px; border-radius: 14px; background: var(--panel); border: 1px solid var(--line);
  box-shadow: 0 18px 40px rgba(37, 35, 31, .18); opacity: 0; visibility: hidden; transform: translateY(4px);
  transition: opacity .12s ease, transform .12s ease, visibility 0s linear .12s; display: flex; flex-direction: column; gap: 10px;
}
.wrq-card.on { opacity: 1; visibility: visible; transform: none; transition-delay: 0s; }
.wrq-card-head { display: flex; gap: 9px; align-items: center; }
.wrq-card-head .avatar { flex: none; width: 40px; height: 40px; border-radius: 12px; }
.wrq-card-head b { display: block; font-size: 14px; }
.wrq-card-head small { color: var(--muted); font-size: 11px; }
.wrq-card-stats { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 4px; }
.wrq-card-stats span { display: flex; flex-direction: column; align-items: center; padding: 6px 2px; border-radius: 10px; background: var(--panel-soft); border: 1px solid var(--line); text-align: center; }
.wrq-card-stats b { font-size: 14px; }
.wrq-card-stats small { color: var(--muted); font-size: 9.5px; font-weight: 800; line-height: 1.4; }
.wrq-card-sec { display: flex; flex-direction: column; gap: 5px; }
.wrq-card-sec h4 { margin: 0; font-size: 11.5px; color: var(--muted); }
.wrq-card-sec h4 small { font-weight: 700; }
.wrq-card-lesson { display: grid; grid-template-columns: 82px minmax(0, 1fr) auto; gap: 7px; align-items: center; font-size: 11.5px; }
.wrq-card-lesson span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 800; }
.wrq-card-lesson i { display: block; height: 7px; border-radius: 999px; background: var(--line); overflow: hidden; }
.wrq-card-lesson em { display: block; height: 100%; background: var(--orange); border-radius: inherit; }
.wrq-card-lesson b { font-size: 11px; min-width: 28px; text-align: left; }
.wrq-card-prj { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 1px 8px; padding: 6px 8px; border-radius: 9px; background: var(--panel-soft); border: 1px solid var(--line); }
.wrq-card-prj > span:first-child { display: flex; flex-direction: column; min-width: 0; }
.wrq-card-prj b { font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wrq-card-prj small { color: var(--muted); font-size: 10.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wrq-card-prj-st { align-self: start; padding: 1px 7px; border-radius: 999px; font-size: 10px; font-weight: 900; background: var(--panel); border: 1px solid var(--line); color: var(--muted); }
.wrq-card-prj-st.is-completed { background: var(--teal-soft); border-color: transparent; color: var(--teal); }
.wrq-card-prj-st.is-active, .wrq-card-prj-st.is-notstarted { background: var(--blue-soft); border-color: transparent; color: var(--blue); }
.wrq-card-prj-st.is-submitted { background: var(--yellow-soft); border-color: transparent; color: #8a6510; }
.wrq-card-prj-st.is-blocked, .wrq-card-prj-st.is-activation_expired { background: var(--red-soft); border-color: transparent; color: var(--red); }
.wrq-card-prj-date { grid-column: 2; text-align: left; }
.wrq-card-req > div { display: flex; justify-content: space-between; gap: 10px; font-size: 11.5px; }
.wrq-card-req > div span { color: var(--muted); }
.wrq-card-empty { margin: 0; color: var(--muted); font-size: 11.5px; }

@media (max-width: 760px) {
  .wrq-page { gap: 10px; }
  .wrq-page > .page-head h1 { font-size: 20px; }
  .wrq-page .wrq-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .wrq-page .wrq-stats .stat-card { padding: 7px 10px; min-height: 36px; gap: 6px; }
  .wrq-page .wrq-stats .stat-card:nth-child(odd) { border-inline-start: 0; }
  .wrq-page .wrq-stats .stat-card:nth-child(n+3) { border-top: 1px solid var(--line); }
  .wrq-page .wrq-stats .stat-icon { display: none; }
  .wrq-page .wrq-stats .stat-copy { gap: 6px; justify-content: space-between; }
  .wrq-page .wrq-stats .stat-copy small { font-size: 10px; }
  .wrq-page .wrq-stats .stat-copy strong { font-size: 15px; }
  .wrq-body { padding: 10px; }
  .wrq-page .panel-header, .wrq-panel .panel-header { min-height: 42px; padding: 8px 10px; }
  .wrq-toolbar .acg-search.mk-search-field:not([hidden]) { flex-basis: 160px; max-width: none; }
  .wrq-select { width: 115px; }
  .wrq-toolbar > .wrq-sort-note { flex-basis: 100%; margin: 0; }
  .wrq-filter-row > .wrq-toolbar { flex-basis: 100%; }
  .wrq-table-footer { align-items: flex-start; font-size: 10px; }
  .wrq-ready-row { flex-wrap: wrap; }
  .wrq-ready-meta { max-width: none; justify-content: flex-start; }
  .wrq-card-stats { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 420px) {
  .wrq-form .lesson-allow-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .wrq-form .lesson-allow-choice { padding-inline: 9px; }
  .wrq-form-actions button { padding-inline: 10px; }
}

/* روی گوشی، دو نشانِ کنارِ هم نام را تا ۶۰ پیکسل جمع می‌کرد؛ آن‌جا نشان‌ها زیر
   نام می‌روند تا هر دو خوانا بمانند. */
@media (max-width: 560px) {
  .prj-assign-row { grid-template-columns: 18px 30px minmax(0, 1fr); row-gap: 6px; }
  .prj-assign-row .prj-assign-tags { grid-column: 3; margin-inline-start: 0; }
}

@media (max-width: 720px) {
  .prj-grid { grid-template-columns: 1fr; padding: 12px; }
  .prj-req { align-items: flex-start; }
  .prj-req-actions, .prj-req-state { margin-inline-start: 0; width: 100%; }
}

/* ═══════════════════════════════════════════════════════════════════════════
   زیرمجموعه‌گیری و کیف پول

   سه سطح: چیپِ کیف در نوار بالا، صفحهٔ «دعوت دوستان» در پنل کاربر، و صفحهٔ
   ورود با لینک. همه از همان توکن‌های پوسته (var(--panel)/var(--line)/…) رد
   می‌شوند تا در کنار بقیهٔ پنل غریبه نباشند.
   ═══════════════════════════════════════════════════════════════════════════ */

/* ── چیپ کیف پول در نوار بالا ── */
.topbar-wallet {
  display: inline-flex; align-items: center; gap: 6px; flex: none;
  height: 38px; padding: 0 12px; cursor: pointer;
  border: 1px solid color-mix(in srgb, var(--teal) 26%, var(--line));
  border-radius: 12px; background: var(--teal-soft); color: #0f7365;
  font-weight: 900; font-size: 12.5px; white-space: nowrap;
  transition: background var(--motion-med, .2s) ease, transform var(--motion-fast, .14s) ease,
              border-color var(--motion-med, .2s) ease;
}
.topbar-wallet svg { width: 17px; height: 17px; flex: none; }
.topbar-wallet small { font-size: 10.5px; font-weight: 700; opacity: .75; }
.topbar-wallet:hover {
  background: color-mix(in srgb, var(--teal) 14%, #fff);
  border-color: color-mix(in srgb, var(--teal) 40%, var(--line));
  transform: translateY(-1px);
}
/* دوقلوی اعتبار چاپ: همان قواره، رنگِ نارنجیِ چاپ تا در یک نگاه از کیف پول جدا شود. */
.topbar-wallet.topbar-pcredit {
  border-color: color-mix(in srgb, var(--orange) 30%, var(--line));
  background: var(--orange-soft);
  color: #b8430b;
}
.topbar-wallet.topbar-pcredit:hover {
  background: color-mix(in srgb, var(--orange) 13%, #fff);
  border-color: color-mix(in srgb, var(--orange) 44%, var(--line));
}
@media (max-width: 640px) {
  .topbar-wallet { height: 34px; padding: 0 9px; border-radius: 10px; font-size: 11.5px; }
  .topbar-wallet small { display: none; }
}

/* ── نشانِ لایوِ هدر: «N نفر در حال آزمون» با یک چشمک کوتاه هر ۱۰ ثانیه ──
   هم در پنل کاربر (اولِ topbar-tools) و هم در پنل مدیر (پیش از کارتِ پروفایل).
   صفر = پنهان؛ عدد را app.js هر ۴۵ ثانیه از /api/exams/live می‌گیرد. */
.live-chip {
  --live-red: #e5383b;
  display: inline-flex; align-items: center; gap: 6px; flex: none;
  height: 38px; padding: 0 12px; cursor: pointer; font: inherit;
  border: 1px solid color-mix(in srgb, var(--live-red) 30%, var(--line));
  border-radius: 12px; background: color-mix(in srgb, var(--live-red) 7%, var(--panel, #fff)); color: #b4232a;
  font-weight: 900; font-size: 12.5px; white-space: nowrap;
  transition: background var(--motion-med, .2s) ease, transform var(--motion-fast, .14s) ease;
}
.live-chip[hidden] { display: none; }
.live-chip:hover { background: color-mix(in srgb, var(--live-red) 13%, var(--panel, #fff)); transform: translateY(-1px); }
.live-chip .live-dot {
  width: 9px; height: 9px; flex: none;
  border-radius: 50%; background: var(--live-red);
  animation: live-dot-blink 10s ease-in-out infinite;
}
.live-chip .live-num { font-size: 13px; font-weight: 950; }
.live-chip .live-cap { font-size: 10.5px; font-weight: 700; opacity: .8; }
.live-chip.is-bump .live-num { animation: live-num-bump .5s ease; }
@keyframes live-dot-blink { 0%, 90%, 100% { opacity: 1; } 95% { opacity: .35; } }
@keyframes live-num-bump { 0% { transform: scale(1); } 40% { transform: scale(1.3); } 100% { transform: scale(1); } }
/* پنل مدیر: کارتِ پروفایل خودش margin-inline-start:auto دارد؛ نشان جای آن را می‌گیرد. */
.topbar > .live-chip { margin-inline-start: auto; }
.topbar > .live-chip:not([hidden]) + .topbar-profile { margin-inline-start: 10px; }
/* نوارِ پنل کاربر کیف پول و اعتبار چاپ را هم دارد؛ زیرِ ۱۲۰۰ فقط نقطه و عدد (جملهٔ کامل در title). */
@media (max-width: 1200px) {
  .student-shell .live-chip .live-cap { display: none; }
}
@media (max-width: 640px) {
  .live-chip { height: 34px; padding: 0 9px; gap: 5px; border-radius: 10px; font-size: 11.5px; }
  .live-chip .live-cap { display: none; }
}
@media (max-width: 820px) {
  .student-shell .live-chip { height: 36px; border-radius: 11px; }
  .student-shell .live-chip .live-cap { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .live-chip .live-dot, .live-chip.is-bump .live-num { animation: none; }
}

/* ── جا شدنِ نوار بالای پنل کاربر روی موبایل ──
   با آمدنِ چیپ دومِ (اعتبار چاپ) نوار روی گوشی ۳۷۵px حدود ۸۰px سرریز می‌کرد و
   کارتِ پروفایل از لبه بیرون می‌افتاد (اندازه‌گیری‌شده، نه تخمینی). سه کار:
     • دو چیپ و سه دکمهٔ آیکونی یک درجه جمع‌تر می‌شوند،
     • نامِ کاربر در کارت پروفایل کنار می‌رود و آواتار می‌ماند (خودش دکمه است)،
     • و اگر باز هم جا کم آمد (گوشی‌های ۳۲۰px) به‌جای بریده‌شدن، فقط ردیفِ
       ابزارها افقی اسکرول می‌شود؛ پروفایل همیشه سرِ جایش می‌ماند.
   عمداً به `.student-shell` محدود است تا نوار پنل مدیر دست‌نخورده بماند. */
@media (max-width: 640px) {
  .student-shell .topbar { gap: 8px; padding: 0 12px; min-width: 0; }
  .student-shell .topbar-tools { gap: 5px; min-width: 0; overflow-x: auto; scrollbar-width: none; }
  .student-shell .topbar-tools::-webkit-scrollbar { display: none; }
  .student-shell .topbar-icon { width: 32px; height: 32px; }
  .student-shell .topbar-wallet { height: 32px; padding: 0 7px; gap: 4px; font-size: 11px; }
  .student-shell .topbar-profile { flex: none; max-width: none; padding: 3px; gap: 0; }
  .student-shell .topbar-profile strong,
  .student-shell .topbar-profile .chevron { display: none; }
  .student-shell .topbar-profile .avatar { width: 30px; height: 30px; }
}

/* ── صفحهٔ دعوت دوستان: دو ستون (کیف / لینک) ── */
.rfx-hero {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: 14px;
}
.rfx-local-preview {
  display: flex; align-items: center; gap: 8px; margin-bottom: 12px; padding: 10px 13px;
  border: 1px dashed color-mix(in srgb, var(--blue) 34%, var(--line));
  border-radius: 12px; background: var(--blue-soft); color: #2c4a99;
  font-size: 11.5px; line-height: 1.8;
}
.rfx-local-preview svg { width: 15px; height: 15px; flex: none; }
.rfx-local-preview b { font-weight: 900; }
.rfx-wallet, .rfx-invite {
  display: grid; align-content: start; gap: 12px; padding: 20px;
  border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel);
  box-shadow: var(--shadow);
}
.rfx-wallet {
  background: linear-gradient(150deg, var(--teal-soft), var(--panel) 62%);
  border-color: color-mix(in srgb, var(--teal) 22%, var(--line));
}
.rfx-wallet-label, .rfx-invite-label {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: 12px; font-weight: 800; color: var(--muted);
}
.rfx-wallet-label svg, .rfx-invite-label svg { width: 16px; height: 16px; color: var(--teal); }
.rfx-negative { color: var(--red); }
.rfx-debt-note { display: flex; gap: 6px; align-items: flex-start; margin: 6px 0 0; font-size: 12px; line-height: 1.8; color: var(--red); }
.rfx-debt-note .ui-icon { flex: none; width: 14px; height: 14px; margin-top: 4px; }
.rfx-invite-label svg { color: var(--orange); }
.rfx-invite--start {
  place-items: center;
  align-content: center;
}
.rfx-invite-start {
  width: 100%;
  display: grid;
  place-items: center;
  gap: 12px;
  padding: 14px;
  text-align: center;
}
.rfx-invite-start-icon {
  width: 48px;
  height: 48px;
  display: inline-grid;
  place-items: center;
  border-radius: 15px;
  color: var(--orange);
  background: var(--orange-soft);
}
.rfx-invite-start-icon svg { width: 24px; height: 24px; }
.rfx-invite-start h3 { margin: 0; color: var(--ink); font-size: 15px; font-weight: 900; }
.rfx-invite-start .primary-button { justify-self: center; }
.rfx-wallet > strong {
  display: flex; align-items: baseline; gap: 6px;
  font-size: 32px; font-weight: 900; color: #0f7365; line-height: 1;
}
.rfx-wallet > strong small { font-size: 13px; font-weight: 700; color: var(--muted); }
.rfx-wallet-meta { display: flex; flex-wrap: wrap; gap: 8px; }
.rfx-wallet-meta span {
  display: grid; gap: 2px; padding: 7px 12px; min-width: 92px;
  border: 1px solid var(--line); border-radius: 12px; background: var(--panel);
}
.rfx-wallet-meta b { font-size: 13px; font-weight: 900; }
.rfx-wallet-meta small { font-size: 10.5px; color: var(--muted); }
.rfx-wallet-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.rfx-wallet-note, .rfx-withdraw-note {
  display: flex; align-items: flex-start; gap: 7px; margin: 0;
  font-size: 11.5px; line-height: 1.9; color: var(--muted);
}
.rfx-wallet-note svg, .rfx-withdraw-note svg { width: 14px; height: 14px; flex: none; margin-top: 3px; }

.rfx-link-box { display: flex; gap: 8px; }
.rfx-link-box input {
  flex: 1; min-width: 0; height: 42px; padding: 0 12px;
  border: 1px solid var(--line); border-radius: 12px; background: var(--panel-soft);
  font-size: 12.5px; font-family: inherit; color: var(--ink);
}
/* کادر خودش حاشیه دارد؛ هالهٔ سراسریِ focus اینجا دو مستطیل تودرتو می‌سازد. */
.rfx-link-box input:focus-visible { outline: none; box-shadow: none; border-color: var(--orange); }
.rfx-link-box .primary-button { flex: none; }
.rfx-code-row {
  display: flex; align-items: center; gap: 9px; flex-wrap: wrap;
  font-size: 12px; color: var(--muted);
}
.rfx-code-row b {
  padding: 4px 12px; border-radius: 999px; letter-spacing: 2px;
  background: var(--orange-soft); color: #a85b1b; font-size: 13px; font-weight: 900;
}
.rfx-code-row .ghost-button { margin-inline-start: auto; }
.rfx-steps { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.rfx-steps li {
  display: flex; align-items: center; gap: 9px;
  font-size: 12px; color: var(--ink); line-height: 1.8;
}
.rfx-steps li span {
  flex: none; width: 22px; height: 22px; display: inline-grid; place-items: center;
  border-radius: 50%; background: var(--orange-soft); color: #a85b1b;
  font-size: 11px; font-weight: 900;
}
.rfx-educator, .rfx-invited-by {
  display: flex; align-items: flex-start; gap: 8px; padding: 11px 13px;
  border: 1px solid color-mix(in srgb, var(--blue) 24%, var(--line));
  border-radius: 12px; background: var(--blue-soft); color: #2c4a99;
  font-size: 12px; line-height: 1.9;
}
.rfx-educator svg, .rfx-invited-by svg { width: 15px; height: 15px; flex: none; margin-top: 3px; }
.rfx-invited-by {
  border-color: color-mix(in srgb, var(--teal) 24%, var(--line));
  background: var(--teal-soft); color: #0f7365;
}

/* ── سه تب: گرید اختصاصی تا سرستون و داده دقیقاً روی یک محور بمانند ── */
.rfx-tabs-panel { margin-top: 16px; overflow: hidden; }
.rfx-tabs-panel .sx-tabs { padding: 14px 18px 0; background: color-mix(in srgb, var(--panel-soft) 55%, transparent); }
#rfxBody { padding: 16px 18px 18px; }
.rfx-records {
  overflow: hidden; border: 1px solid var(--line); border-radius: 15px;
  background: var(--panel); box-shadow: 0 8px 22px rgba(39, 34, 28, .035);
}
.rfx-invitee-grid {
  display: grid;
  grid-template-columns: minmax(180px, 1.45fr) minmax(100px, .7fr) minmax(130px, .9fr) minmax(140px, 1fr) minmax(120px, .9fr);
  align-items: center; column-gap: 18px;
}
.rfx-withdraw-grid {
  display: grid;
  grid-template-columns: minmax(130px, .8fr) minmax(210px, 1.35fr) minmax(145px, .9fr) minmax(190px, 1.15fr);
  align-items: center; column-gap: 18px;
}
.rfx-withdraw-grid > :nth-child(4) { text-align: center; }
.rfx-record-head {
  min-height: 45px; padding: 0 16px; background: var(--panel-soft); color: var(--muted);
  border-bottom: 1px solid var(--line); font-size: 10.5px; font-weight: 850;
}
.rfx-record-row {
  min-height: 70px; padding: 11px 16px; border-bottom: 1px solid var(--line);
  transition: background .16s ease, box-shadow .16s ease;
}
.rfx-record-row:last-child { border-bottom: 0; }
.rfx-record-row:hover { background: color-mix(in srgb, var(--orange-soft) 34%, var(--panel)); }
.rfx-cell { min-width: 0; font-size: 12px; color: var(--ink); }
.rfx-cell::before { display: none; }
.rfx-person { display: flex; align-items: center; gap: 10px; min-width: 0; }
.rfx-person-avatar {
  width: 36px; height: 36px; flex: none; display: inline-grid; place-items: center;
  border: 1px solid color-mix(in srgb, var(--teal) 18%, var(--line)); border-radius: 12px;
  background: var(--teal-soft); color: #0f7365; font-size: 13px; font-weight: 900;
}
.rfx-person-copy { display: grid; gap: 2px; min-width: 0; }
.rfx-person-copy b { overflow: hidden; font-size: 12.5px; font-weight: 850; text-overflow: ellipsis; white-space: nowrap; }
.rfx-person-copy small { color: var(--muted); font-size: 10.5px; }
.rfx-role-chip, .rfx-status {
  display: inline-flex; align-items: center; width: fit-content; gap: 6px; padding: 5px 10px;
  border-radius: 999px; background: var(--blue-soft); color: #2c4a99;
  font-size: 10.5px; font-weight: 850; white-space: nowrap;
}
.rfx-role-chip::before, .rfx-status::before {
  content: ""; width: 5px; height: 5px; flex: none; border-radius: 50%; background: currentColor;
}
.rfx-status.yellow { background: var(--yellow-soft); color: #936a00; }
.rfx-status.teal { background: var(--teal-soft); color: #0f7365; }
.rfx-status.red { background: var(--red-soft); color: #b94e45; }
.rfx-status.grey { background: #f1efe9; color: #706a62; }
.rfx-date { display: grid; gap: 3px; color: var(--muted); font-size: 11.5px; white-space: nowrap; }
.rfx-date > span { color: var(--ink); font-size: 11.5px; font-weight: 750; }
.rfx-date > small { color: var(--muted); font-size: 9.5px; font-weight: 650; }
.rfx-money { display: inline-flex; align-items: baseline; gap: 4px; white-space: nowrap; }
.rfx-money b { font-size: 13px; font-weight: 900; }
.rfx-money small { color: var(--muted); font-size: 9.5px; }
.rfx-money.in b { color: #0f7365; }
.rfx-empty-value { color: var(--muted); font-size: 11px; }
.rfx-withdraw-state { display: grid; justify-items: start; gap: 5px; }
.rfx-note { display: block; max-width: 260px; color: var(--muted); font-size: 10.5px; line-height: 1.65; }
.rfx-sheba { overflow: hidden; color: var(--muted); font-size: 10.5px; text-overflow: ellipsis; white-space: nowrap; }
.rfx-sheba > span { display: block; direction: ltr; text-align: center; unicode-bidi: isolate; }
.rfx-cancel { min-height: 28px; padding: 4px 9px; font-size: 10px; }

/* شمارندهٔ زیرمجموعه‌ها، ورودیِ فهرست مشخصات و پنل‌ها است. */
.rfx-invitee-count {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  min-width: 78px; min-height: 40px; padding: 7px 10px;
  border: 1px solid color-mix(in srgb, var(--teal) 22%, var(--line)); border-radius: 11px;
  background: var(--teal-soft); color: #0f7365; font: inherit; cursor: pointer;
}
.rfx-invitee-count:hover { border-color: var(--teal); }
.rfx-invitee-count:focus-visible { outline: 2px solid var(--teal); outline-offset: 3px; }
.rfx-invitee-count svg { width: 15px; height: 15px; flex: none; }
.rfx-invitee-count b { font-size: 13px; font-weight: 900; }
.rfx-invitees-modal { direction: rtl; }
.rfx-invitees-modal .modal-head h2 { min-width: 0; overflow-wrap: anywhere; }
.rfx-invitees-modal .modal-head h2 small { display: block; margin-top: 4px; color: var(--muted); font-size: 11px; font-weight: 650; }
.rfx-invitees-modal .modal-close { flex: none; }
.rfx-invitees-modal-body { min-width: 0; }
.rfx-invitees-summary { margin: 0 0 14px; color: var(--muted); font-size: 12px; }
.rfx-invitee-cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.rfx-invitee-card { min-width: 0; padding: 16px; border: 1px solid var(--line); border-radius: 16px; background: var(--panel); }
.rfx-invitee-card .rfx-person { align-items: start; padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.rfx-invitee-card .rfx-person-copy { flex: 1; }
.rfx-invitee-card .rfx-person-copy b { overflow: visible; white-space: normal; overflow-wrap: anywhere; line-height: 1.7; }
.rfx-invitee-card .rfx-role-chip { padding: 4px 7px; font-size: 9px; }
.rfx-invitee-panels { display: grid; gap: 7px; padding-block: 12px; }
.rfx-invitee-label { color: var(--muted); font-size: 10.5px; font-weight: 750; }
.rfx-invitee-panels ul { display: grid; gap: 7px; margin: 0; padding: 0; list-style: none; }
.rfx-invitee-panels li { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 7px; padding: 8px 10px; border-radius: 10px; background: var(--panel-soft); }
.rfx-invitee-panels li b { flex: 1; min-width: 0; font-size: 11.5px; line-height: 1.8; overflow-wrap: anywhere; }
.rfx-panel-status { color: var(--muted); font-size: 9.5px; white-space: nowrap; }
.rfx-panel-status.active { color: #0f7365; }
.rfx-invitee-panels li small { flex-basis: 100%; color: var(--muted); font-size: 10px; }
.rfx-invitee-facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px 8px; margin: 0; padding-top: 12px; border-top: 1px solid var(--line); }
.rfx-invitee-facts > div { min-width: 0; }
.rfx-invitee-facts dt { margin-bottom: 5px; color: var(--muted); font-size: 9.5px; }
.rfx-invitee-facts dd { margin: 0; font-size: 11.5px; font-weight: 800; line-height: 1.7; }
.rfx-invitee-facts dd small { color: var(--muted); font-size: 9px; font-weight: 500; }
.rfx-invitee-facts dd > .rfx-invitee-orders { display: block; }
.rfx-invitee-facts .rfx-date { white-space: normal; }
.rfx-invitees-error { margin: 14px 0; color: #b94e45; font-size: 12px; line-height: 1.8; }
.rfx-invitees-modal-body > .rfx-more { display: flex; justify-content: center; width: 100%; margin-top: 14px; }

/* ── گردش کیف پول ── */
.rfx-ledger-shell { overflow: hidden; border: 1px solid var(--line); border-radius: 15px; background: var(--panel); }
.rfx-ledger-head {
  display: grid; grid-template-columns: 38px minmax(0, 1fr) minmax(130px, .34fr) minmax(130px, .32fr);
  align-items: center; gap: 12px; min-height: 45px; padding: 0 14px;
  border-bottom: 1px solid var(--line); background: var(--panel-soft); color: var(--muted);
  font-size: 10.5px; font-weight: 850;
}
.rfx-ledger { display: grid; margin: 0; padding: 0; list-style: none; }
.rfx-ledger-row {
  display: grid; grid-template-columns: 38px minmax(0, 1fr) minmax(130px, .34fr) minmax(130px, .32fr);
  align-items: center; gap: 12px; min-height: 68px; padding: 10px 14px;
  border-bottom: 1px solid var(--line); background: var(--panel);
  transition: background .16s ease;
}
.rfx-ledger-row:last-child { border-bottom: 0; }
.rfx-ledger-row:hover { background: color-mix(in srgb, var(--orange-soft) 30%, var(--panel)); }
.rfx-ledger-icon {
  width: 34px; height: 34px; display: inline-grid; place-items: center;
  border-radius: 11px; background: var(--panel-soft); color: var(--muted);
}
.rfx-ledger-icon svg { width: 15px; height: 15px; }
.rfx-ledger-row div { display: grid; gap: 2px; min-width: 0; }
.rfx-ledger-row b { font-size: 12.5px; font-weight: 850; }
.rfx-ledger-row small { font-size: 10.5px; color: var(--muted); }
.rfx-ledger-row time { font-size: 11px; color: var(--muted); white-space: nowrap; }
.rfx-ledger-amount {
  justify-self: start; min-width: 92px; padding: 7px 10px; border-radius: 10px;
  background: var(--panel-soft); font-style: normal; font-size: 13px; font-weight: 900;
  text-align: center; white-space: nowrap;
}
.rfx-ledger-row.in .rfx-ledger-icon { background: var(--teal-soft); color: var(--teal); }
.rfx-ledger-row.in .rfx-ledger-amount { background: var(--teal-soft); color: #0f7365; }
.rfx-ledger-row.out .rfx-ledger-icon { background: var(--orange-soft); color: #d4590f; }
.rfx-ledger-row.out .rfx-ledger-amount { background: var(--orange-soft); color: #a85b1b; }

/* ── پاپ‌آپ برداشت و پیوستن ── */
.rfx-withdraw { display: grid; gap: 12px; }
.rfx-withdraw-balance {
  display: flex; align-items: center; gap: 8px; padding: 11px 13px;
  border-radius: 12px; background: var(--teal-soft); color: #0f7365;
  font-size: 12.5px; font-weight: 700;
}
.rfx-withdraw-balance svg { width: 17px; height: 17px; }
.rfx-withdraw-balance b { margin-inline-start: auto; font-size: 15px; font-weight: 900; }
.rfx-join { display: grid; justify-items: center; gap: 8px; text-align: center; }
.rfx-join-icon {
  width: 54px; height: 54px; display: inline-grid; place-items: center;
  border-radius: 18px; background: var(--blue-soft); color: var(--blue);
}
.rfx-join-icon svg { width: 26px; height: 26px; }
.rfx-join h3 { margin: 0; font-size: 16px; font-weight: 900; }
.rfx-join p { margin: 0; font-size: 12.5px; line-height: 1.9; color: var(--ink); }
.rfx-join small { font-size: 11px; color: var(--muted); line-height: 1.9; }

/* ── فروشگاه: ردیف تخفیف دعوت و پرداخت با کیف ── */
.shop-buybox-referral {
  display: flex; align-items: center; gap: 7px; margin-top: 6px;
  font-size: 12px; font-weight: 700; color: #a85b1b;
}
.shop-buybox-referral svg { width: 15px; height: 15px; flex: none; }
.shop-buybox-referral b { margin-inline-start: auto; font-weight: 900; }
.shop-wallet-pay {
  display: flex; align-items: flex-start; gap: 9px; margin: 10px 0; padding: 11px 13px;
  border: 1px solid var(--line); border-radius: 12px; background: var(--panel-soft);
  cursor: pointer; transition: border-color var(--motion-med, .2s) ease, background var(--motion-med, .2s) ease;
}
.shop-wallet-pay.on {
  border-color: color-mix(in srgb, var(--teal) 30%, var(--line)); background: var(--teal-soft);
}
.shop-wallet-pay input { margin-top: 3px; accent-color: var(--teal); }
.shop-wallet-copy { display: grid; gap: 2px; min-width: 0; }
.shop-wallet-copy svg { width: 15px; height: 15px; color: var(--teal); }
.shop-wallet-copy b { font-size: 12.5px; font-weight: 800; }
.shop-wallet-copy small { font-size: 11px; color: var(--muted); line-height: 1.8; }
/* عنوانِ «مبلغ دلخواه» نباید به کادرِ تیک بچسبد. */
#pcreditWalletBox .shop-wallet-pay { margin-bottom: 12px; }
#pcreditWalletBox.off .shop-wallet-pay { opacity: .7; }

/* ── صفحهٔ ورود با لینک دعوت ── */
.auth-invite-hero { display: grid; gap: 11px; margin-bottom: 4px; }
.auth-invite-hero h1 { margin: 0; font-size: 20px; line-height: 1.7; font-weight: 800; }
/* سبزِ خودِ لوگو (assets/logo.svg)، نه یک سبزِ نزدیک. */
.auth-invite-name { color: #127c44; font-weight: 900; }
.auth-invite-roles {
  display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; margin-top: 6px;
}
.invite-role { grid-column: span 2; }
.invite-role:nth-child(4):nth-last-child(2),
.invite-role:nth-child(5):nth-last-child(1) { grid-column: span 3; }
.invite-role {
  position: relative; display: flex; align-items: center; justify-content: center;
  gap: 6px; padding: 9px 10px; cursor: pointer; min-width: 0;
  border: 1px solid var(--line); border-radius: 12px; background: var(--panel);
  font-family: inherit; font-size: 12px; font-weight: 700; color: var(--ink);
  white-space: nowrap;
  transition: border-color var(--motion-med, .2s) ease, background var(--motion-med, .2s) ease;
}
.invite-role span { display: inline-grid; place-items: center; width: 17px; height: 17px; flex: none; color: var(--muted); }
.invite-role span svg { width: 17px; height: 17px; }
.invite-role:hover { border-color: #d9d3c8; background: var(--panel-soft); }
.invite-role.on {
  border-color: var(--orange); background: var(--orange); color: #fff; font-weight: 900;
  box-shadow: 0 4px 12px rgba(255, 107, 24, .28);
}
.invite-role.on:hover { border-color: var(--orange); background: var(--orange); }
.invite-role.on span { color: #fff; }
.invite-role.on::after {
  content: ""; position: absolute; inset-inline-start: 9px; top: 50%; margin-top: -3px;
  width: 6px; height: 6px; border-radius: 50%; background: #fff; opacity: .9;
}
.invite-role.on { padding-inline-start: 20px; }

/* ── تب مدیر ── */
.rfa-stats {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; margin-bottom: 16px;
}
.rfa-stats > div {
  display: grid; gap: 3px; padding: 13px 15px;
  border: 1px solid var(--line); border-radius: 14px; background: var(--panel-soft);
}
.rfa-stats span { font-size: 11px; color: var(--muted); }
.rfa-stats b { font-size: 17px; font-weight: 900; }
.rfa-stats small { font-size: 10.5px; color: var(--muted); }
.rfa-settings {
  display: grid; gap: 11px; padding: 16px; margin-bottom: 16px;
  border: 1px solid var(--line); border-radius: 14px; background: var(--panel);
}
.rfa-settings h4 { display: flex; align-items: center; gap: 7px; margin: 0; font-size: 13px; font-weight: 900; }
.rfa-settings h4 svg { width: 16px; height: 16px; color: var(--orange); }
.rfa-settings-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 10px; }
.rfa-settings-switches { display: flex; flex-wrap: wrap; gap: 14px; }
.rfa-settings-switches label {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: 12px; font-weight: 700; color: var(--ink); cursor: pointer;
}
.rfa-settings .primary-button { justify-self: start; }
.rfa-guard {
  display: flex; align-items: flex-start; gap: 8px; margin: 0; padding: 11px 13px;
  border: 1px solid color-mix(in srgb, var(--blue) 22%, var(--line));
  border-radius: 12px; background: var(--blue-soft); color: #2c4a99;
  font-size: 11.5px; line-height: 1.95;
}
.rfa-guard svg { width: 15px; height: 15px; flex: none; margin-top: 3px; }
.rfa-filter { margin-bottom: 12px; }
.rfa-bank { display: grid; gap: 2px; font-size: 11px; }
.rfa-bank small { color: var(--muted); }
.rfa-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.rfa-actions .primary-button, .rfa-actions .ghost-button { padding: 6px 12px; font-size: 11.5px; }
.rfa-sub {
  display: flex; align-items: center; gap: 7px; margin: 20px 0 10px;
  font-size: 13px; font-weight: 900;
}
.rfa-sub svg { width: 16px; height: 16px; color: var(--yellow); }

/* هشدارِ تغییرِ نوع حساب در پروفایل کاربر (مدیر) */
.user-role-note { display: block; margin-top: 7px; padding: 8px 10px; border-radius: 10px; background: #fff6e8; color: #8a4b00; font-size: 11.5px; line-height: 1.9; }

/* تاریخچهٔ خرید (مدیر) */
.sho-filters { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 12px; }
.sho-filters .sho-search { flex: 1 1 280px; min-width: 0; margin: 0; }
.sho-filters select { min-height: 40px; padding: 6px 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--panel); color: var(--ink); font: inherit; font-size: 12.5px; }
.sho-status { margin-bottom: 14px; }
.sho-stats b small { font-size: 11px; font-weight: 700; }
.sho-table-wrap { max-width: 100%; overflow-x: auto; }
.sho-table { min-width: 1080px; }
.sho-table td { vertical-align: top; }
.sho-table td > small, .sho-table .sho-muted { display: block; margin-top: 3px; color: var(--muted); font-size: 10.5px; line-height: 1.7; }
.sho-table .rfx-person { display: grid; gap: 2px; padding: 0; border: 0; }
.sho-items { display: grid; gap: 4px; margin: 0; padding: 0; list-style: none; }
.sho-items li { display: flex; flex-wrap: wrap; align-items: center; gap: 3px 7px; font-size: 12px; }
.sho-items small { color: var(--muted); font-size: 11px; }
.sho-discount { display: inline-flex; align-items: baseline; gap: 5px; margin: 0 0 4px 4px; padding: 3px 8px; border-radius: 8px; background: var(--panel-soft); font-size: 11.5px; }
.sho-discount b { font-weight: 850; white-space: nowrap; }
.sho-discount small { white-space: nowrap; }
.sho-discount small { color: var(--red, #c2410c); font-weight: 800; direction: ltr; unicode-bidi: isolate; }
.sho-discount-wheel { background: #f3ecff; }
.sho-discount-referral { background: #e8f6ef; }
.sho-discount-launch, .sho-discount-personal { background: #fff1e4; }
.sho-amount b { font-size: 14px; font-weight: 900; }
.sho-pager { display: flex; align-items: center; justify-content: center; gap: 14px; margin-top: 14px; font-size: 12px; color: var(--muted); }
@media (max-width: 560px) { .sho-filters select, .sho-filters .secondary-button { flex: 1 1 45%; } }

/* جدولِ زیرمجموعه‌های یک کاربر (مدیر) */
.rfx-admin-filters { margin: 0 0 10px; }
.rfx-admin-sum { margin: 0 0 12px; font-size: 12px; color: var(--muted); }
.rfx-admin-sum b { color: var(--ink); font-weight: 900; }
.rfx-invitee-table { min-width: 860px; }
.rfx-invitee-table td { vertical-align: top; }
.rfx-invitee-table .rfx-person { display: grid; gap: 2px; padding: 0; border: 0; }
.rfx-person-link {
  padding: 0; border: 0; background: none; color: var(--ink); font: inherit; font-weight: 850;
  text-align: start; cursor: pointer; text-decoration: underline dotted color-mix(in srgb, var(--ink) 35%, transparent);
  text-underline-offset: 4px;
}
.rfx-person-link:hover, .rfx-person-link:focus-visible { color: var(--orange); }
.rfx-sub-list { display: grid; gap: 6px; margin: 0; padding: 0; list-style: none; }
.rfx-sub-list li { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 7px; font-size: 12px; }
.rfx-sub-list small { color: var(--muted); font-size: 10.5px; }
.rfx-sub-list .badge { font-size: 10.5px; }
.rfx-invitee-table .rfx-invitee-orders { display: block; color: var(--muted); font-size: 10.5px; }
.rfx-wallet-cell { display: flex; align-items: center; gap: 6px; white-space: nowrap; }
.rfx-wallet-cell small { color: var(--muted); font-size: 10.5px; }

/* جست‌وجوی کاربر برای تعدیل کیف (مدیر) */
.rfx-invitee-search, .rfa-user-search { max-width: 520px; margin: 0 0 12px; }
.rfa-user-table { min-width: 620px; }
.rfa-user-table .rfx-person { display: grid; gap: 2px; padding: 0; border: 0; }
.rfa-user-more { margin: 8px 0 0; font-size: 11.5px; color: var(--muted); }

@media (max-width: 860px) {
  .rfx-hero { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .rfx-invitee-cards { grid-template-columns: minmax(0, 1fr); }
  .rfx-invitees-modal-body { padding: 14px; }
  .rfx-invitee-card { padding: 13px; }
  .rfx-invitee-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .rfx-tabs-panel .sx-tabs { padding-inline: 10px; }
  .rfx-tabs-panel .sx-tab { flex: 1; justify-content: center; min-width: 0; padding-inline: 8px; }
  .rfx-tabs-panel .sx-tab .ui-icon { display: none; }
  #rfxBody { padding: 12px; }
  .rfx-record-head, .rfx-ledger-head { display: none; }
  .rfx-records, .rfx-ledger-shell { overflow: visible; border: 0; background: transparent; box-shadow: none; }
  .rfx-record-body, .rfx-ledger { display: grid; gap: 10px; }
  .rfx-invitee-grid, .rfx-withdraw-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 14px;
  }
  .rfx-record-row {
    padding: 14px; border: 1px solid var(--line) !important; border-radius: 14px;
    background: var(--panel); box-shadow: 0 7px 18px rgba(39, 34, 28, .035);
  }
  .rfx-person { grid-column: 1 / -1; padding-bottom: 10px; border-bottom: 1px solid var(--line); }
  .rfx-cell { display: grid; justify-items: start; gap: 5px; }
  .rfx-cell::before { content: attr(data-rfx-label); display: block; color: var(--muted); font-size: 9.5px; font-weight: 750; }
  .rfx-withdraw-state { grid-column: span 1; }
  .rfx-withdraw-grid > :nth-child(4) { text-align: start; }
  .rfx-sheba { white-space: normal; overflow-wrap: anywhere; }
  .rfx-sheba > span { text-align: start; }
  .rfx-ledger-row {
    grid-template-columns: 36px minmax(0, 1fr) auto; gap: 10px; min-height: 0;
    padding: 13px; border: 1px solid var(--line) !important; border-radius: 14px;
    box-shadow: 0 7px 18px rgba(39, 34, 28, .035);
  }
  .rfx-ledger-row time { grid-column: 2; grid-row: 2; font-size: 10px; }
  .rfx-ledger-amount { grid-column: 3; grid-row: 1 / span 2; min-width: 78px; padding-inline: 7px; }
  .rfx-wallet > strong { font-size: 26px; }
  .rfx-link-box { flex-direction: column; }
  .rfx-link-box .primary-button { width: 100%; justify-content: center; }
}

/* ═════════ مدیریت سازمانی (orgm-*): دانش‌آموز، کلاس، همکار، آزمون اشتراکی ═════
   یک پوستهٔ تب‌دار مثل بقیهٔ صفحه‌های چندبخشی پنل (همان sx-tabs)، با یک جدولِ
   شبکه‌ای که در موبایل به کارت تبدیل می‌شود. ستون‌ها با grid تعریف شده‌اند نه
   با <table>، چون ردیف‌ها انتخاب‌شونده‌اند و باید کل ردیف حالت picked بگیرد. */
/* بدون قابِ بیرونی: کاشی‌ها و جدول هرکدام کادرِ خودشان را دارند و اگر داخل یک
   قابِ سومی هم بنشینند، جعبه‌تو‌جعبه می‌شود و همه‌چیز به لبه‌ها می‌چسبد. نوارِ
   تب‌ها روی خطِ خودش می‌ایستد و بقیهٔ صفحه زیرِ آن نفس می‌کشد. */
.orgm-shell { border: 0; border-radius: 0; background: transparent; box-shadow: none; overflow: visible; }
.orgm-shell > .sx-tabs { padding: 0 2px; margin-bottom: 22px; }
.orgm-body { padding: 0; }
.orgm-page-head { align-items: flex-start; margin-bottom: 18px; }
.orgm-page-head h1 { font-size: clamp(24px, 2.2vw, 34px); letter-spacing: -.6px; }
.orgm-page-head .head-actions { align-self: center; }
.orgm-page-head .primary-button { box-shadow: 0 8px 18px rgba(240, 96, 0, .18); }

/* خلاصهٔ قابل‌اقدام: کارت‌ها فقط آمار تزئینی نیستند و همان وضعیت را روی فهرست
   اعمال می‌کنند؛ مدیر بدون بازکردن چند select مستقیماً به کار عقب‌مانده می‌رسد. */
.orgm-summary {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(158px, 1fr));
  gap: 16px; margin-bottom: 22px;
}
.orgm-summary-card {
  --orgm-card-color: var(--orange); --orgm-card-soft: var(--orange-soft);
  min-width: 0; min-height: 88px; display: flex; align-items: center; gap: 14px; padding: 15px 18px;
  text-align: start; color: var(--ink); font: inherit; cursor: pointer;
  border: 1px solid #dedede; border-radius: 13px; background: var(--panel);
  box-shadow: 0 4px 13px rgba(37, 39, 43, .055);
  transition: transform .15s ease, border-color .15s ease, box-shadow .15s ease, background .15s ease;
}
.orgm-summary-card.teal { --orgm-card-color: #11877f; --orgm-card-soft: #e5f5f3; }
.orgm-summary-card.amber { --orgm-card-color: #ed7b00; --orgm-card-soft: #fff2df; }
.orgm-summary-card.purple { --orgm-card-color: #793b9e; --orgm-card-soft: #f1e8f7; }
.orgm-summary-card.rose { --orgm-card-color: #c62f5c; --orgm-card-soft: #fae8ee; }
.orgm-summary-card:hover { transform: translateY(-2px); border-color: color-mix(in srgb, var(--orgm-card-color) 34%, var(--line)); box-shadow: 0 10px 26px rgba(48, 39, 28, .09); }
.orgm-summary-card.on { border-color: color-mix(in srgb, var(--orgm-card-color) 52%, var(--line)); background: color-mix(in srgb, var(--orgm-card-soft) 45%, white); box-shadow: inset 0 -3px 0 var(--orgm-card-color), 0 6px 18px rgba(48, 39, 28, .06); }
.orgm-summary-icon {
  display: inline-flex; align-items: center; justify-content: center; flex: none;
  width: 43px; height: 43px; border-radius: 12px; color: var(--orgm-card-color); background: var(--orgm-card-soft);
}
.orgm-summary-icon .ui-icon { width: 24px; height: 24px; }
.orgm-summary-card > span:last-child { min-width: 0; display: grid; gap: 4px; }
.orgm-summary-card b { font-size: 22px; font-weight: 950; line-height: 1; font-variant-numeric: tabular-nums; }
.orgm-summary-card strong { font-size: 12px; font-weight: 800; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.orgm-directory {
  display: block; position: relative; border: 1px solid #dedede; border-radius: 14px;
  background: var(--panel); box-shadow: 0 5px 16px rgba(37, 39, 43, .045); overflow: visible;
}

.orgm-toolbar {
  display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 0;
  padding: 14px 16px; border: 0; border-block-end: 1px solid var(--line); border-radius: 14px 14px 0 0; background: #fff;
}
/* فیلترها همیشه در یک ردیف: سهمِ مساوی از عرض و کفِ ۹۶px که با برچسب‌های
   کوتاه‌شده جا می‌شود. جست‌وجو و ردیفِ فیلترها هرکدام یک خطِ کامل می‌گیرند
   (`flex-basis: 100%`) چون در نوارِ ~۶۷۰px هیچ ترکیبی از «جست‌وجو + شش فیلتر»
   در یک خط جا نمی‌شد — ولی نوارِ همکاران که فیلتر ندارد، همان چیدمانِ
   کنارِهمِ خودش را نگه می‌دارد. */
.orgm-filters { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; flex: 1 1 100%; }
.orgm-search { position: relative; flex: 1 1 100%; }
.orgm-search input {
  inline-size: 100%; min-height: 41px; padding: 10px 38px 10px 13px;
  border: 1px solid #dfe1e4; border-radius: 10px; background: #fbfbfb;
  font: inherit; font-size: 12.5px; color: var(--ink);
}
.orgm-search input:focus { outline: none; border-color: color-mix(in srgb, var(--orange) 45%, var(--line)); background: var(--panel); }
.orgm-search input::-webkit-search-cancel-button { display: none; }
.orgm-search-icon {
  position: absolute; inset-inline-start: 11px; inset-block-start: 50%; translate: 0 -50%;
  width: 16px; height: 16px; color: var(--muted); pointer-events: none;
}
.orgm-search.in-modal { flex: none; margin-bottom: 4px; }
/* همهٔ فیلترها در یک ردیف و بدون آیکون. `flex:1 1 0` یعنی سهمِ مساوی از عرضِ
   باقی‌مانده، و کفِ ۱۱۶px تضمین می‌کند بلندترین برچسب («سال تحصیلی: همه») هم
   بریده نشود؛ روی صفحهٔ باریک همان flex-wrapِ نوار ردیف دوم می‌سازد. */
.orgm-field { position: relative; display: block; flex: 1 1 0; min-width: 96px; }
.orgm-field select {
  width: 100%; min-height: 41px; padding: 9px 13px 9px 30px; border: 1px solid #dfe1e4; border-radius: 10px;
  background: #fbfbfb; font: inherit; font-size: 11.5px; color: var(--ink); cursor: pointer;
}
.orgm-field select:focus { outline: none; border-color: color-mix(in srgb, var(--orange) 50%, var(--line)); background: #fff; }
/* کارت‌های «پروفایل کاربران» */
.orgm-profile-note {
  display: flex; align-items: flex-start; gap: 6px; margin: 0; padding: 0 16px 12px;
  font-size: 11px; line-height: 1.8; color: var(--muted);
}
.orgm-profile-note .ui-icon { width: 13px; height: 13px; flex: none; margin-block-start: 4px; }
.orgm-profile-grid {
  display: grid; gap: 10px; padding: 0 16px 16px;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
}
.orgm-profile-card {
  display: flex; align-items: center; gap: 10px; padding: 11px 13px; text-align: start;
  border: 1px solid var(--line); border-radius: 14px; background: var(--panel-soft); cursor: pointer;
  font: inherit; color: inherit; transition: border-color .15s ease, background .15s ease;
}
.orgm-profile-card:hover { border-color: color-mix(in srgb, var(--orange) 45%, var(--line)); background: var(--orange-soft); }
.orgm-profile-avatar { width: 38px; height: 38px; border-radius: 999px; flex: none; }
.orgm-profile-copy { display: grid; gap: 3px; min-width: 0; }
.orgm-profile-copy b { font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.orgm-profile-copy small { font-size: 10.5px; color: var(--muted); }
/* نوارِ «پروفایلِ فلانی — فقط خواندنی» بالای صفحهٔ پروفایل */
.sp-subject-bar {
  display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-block-end: 12px;
  padding: 9px 14px; border: 1px solid var(--line); border-radius: 13px; background: var(--panel-soft);
  font-size: 11.5px; color: var(--muted);
}
.sp-subject-bar b { color: var(--ink); }
.sp-scope-chip {
  display: inline-flex; align-items: center; gap: 5px; margin-inline-start: auto;
  padding: 5px 10px; border-radius: 999px; font-size: 10.5px; font-weight: 750;
  background: var(--orange-soft); color: #b74d0e;
}
.sp-scope-chip .ui-icon { width: 13px; height: 13px; }

.orgm-promote-list { display: grid; gap: 6px; }
.orgm-promote-row {
  display: flex; align-items: center; gap: 8px; padding: 8px 12px; font-size: 11.5px;
  border: 1px solid var(--line); border-radius: 11px; background: var(--panel-soft);
}
.orgm-promote-row b { font-size: 12px; margin-inline-end: auto; }
.orgm-promote-arrow { font-style: normal; color: var(--muted); font-size: 13px; }
.orgm-clear-filters {
  display: inline-flex; align-items: center; gap: 5px; min-height: 38px; padding: 8px 10px;
  border: 0; border-radius: 10px; background: transparent; color: #b65318;
  font: inherit; font-size: 10.5px; font-weight: 800; cursor: pointer;
}
.orgm-clear-filters:hover { background: var(--orange-soft); }
.orgm-clear-filters .ui-icon { width: 14px; height: 14px; }

.orgm-bulkbar {
  display: none; align-items: center; flex-wrap: wrap; gap: 8px;
  margin-bottom: 12px; padding: 10px 13px; border-radius: 13px;
  border: 1px solid color-mix(in srgb, var(--orange) 26%, var(--line));
  background: var(--orange-soft);
}
.orgm-bulkbar.on { display: flex; }
.orgm-bulkbar strong { font-size: 12.5px; margin-inline-end: 4px; }
.orgm-bulkbar .secondary-button, .orgm-bulkbar .ghost-button { padding: 6px 11px; font-size: 11.5px; }
.orgm-bulkbar .ghost-button.danger { color: var(--red); }

.orgm-directory > .orgm-bulkbar { margin: 12px 14px 0; }
.orgm-result-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin: 0; padding: 10px 16px; }
.orgm-result-head > small { color: var(--muted); font-size: 9.5px; }
.orgm-found { font-size: 11px; color: var(--muted); font-weight: 700; }
.orgm-found b { color: var(--ink); font-size: 12.5px; }
.orgm-table { border: 0; border-block-start: 1px solid var(--line); border-radius: 0; overflow: auto; }
.orgm-row {
  /* «کد کاربری» ستونِ مستقلِ خودش را دارد؛ وقتی زیرِ نام می‌نشست، طولِ متفاوتِ
     نام‌ها کدها را پله‌پله می‌کرد و ستون خوانا نبود. */
  /* وزنِ هر ستون به‌اندازهٔ چیزی است که در آن می‌نشیند. با ستون‌های ثابت و یک
     `fr`ِ بزرگ روی نام، تمامِ فضای اضافه به نام می‌رسید: روی ۱۴۴۰ پیکسل ستونِ
     نام ۲۸۷ می‌شد و «پایه / رشته» ۱۱۶ — عنوانش به‌زور جا می‌شد. */
  display: grid;
  grid-template-columns:
    34px minmax(140px, 1.3fr) minmax(88px, .65fr) minmax(108px, .85fr)
    minmax(110px, 1.05fr) minmax(112px, 1fr) minmax(120px, 1.15fr) minmax(104px, .8fr) 56px;
  align-items: center; gap: 8px; padding: 11px 14px;
  min-width: 940px; min-height: 58px; border-block-end: 1px solid var(--line); font-size: 12px;
  transition: background .12s ease;
}
.orgm-name {
  font-size: 13px; font-weight: 850; min-width: 0;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
/* هر جدول ستون‌های خودش را دارد ولی همان پوستهٔ `.orgm-row` را می‌پوشد، پس
   ارتفاع ردیف، هاور، سرستونِ چسبان و نمای کارتیِ موبایل یک‌بار تعریف شده‌اند. */
.orgm-row-class {
  grid-template-columns:
    minmax(150px, 1.4fr) minmax(120px, 1fr) minmax(116px, .95fr)
    minmax(96px, .75fr) minmax(140px, 1.25fr) 60px;
  min-width: 730px;
}
/* حساب تک‌نفره (دبیر یا مشاورِ مستقل) همکاری ندارد که کسی را به او بسپارد، پس
   ستون «مسئول» برایش همیشه خالی است و اصلاً رندر نمی‌شود. */
/* حسابِ تک‌نفره فقط ستون «مسئول» ندارد؛ کلاس‌های شخصیِ خودش همچنان دیده می‌شوند. */
.orgm-row.orgm-row-solo {
  grid-template-columns:
    34px minmax(140px, 1.3fr) minmax(88px, .65fr) minmax(108px, .85fr)
    minmax(110px, 1.05fr) minmax(112px, 1fr) minmax(104px, .8fr) 56px;
  min-width: 820px;
}
.orgm-row.orgm-row-class.orgm-row-solo {
  grid-template-columns:
    minmax(150px, 1.4fr) minmax(120px, 1fr) minmax(116px, .95fr) minmax(96px, .75fr) 60px;
  min-width: 580px;
}
.orgm-row-member {
  grid-template-columns:
    minmax(140px, 1.35fr) minmax(88px, .7fr) minmax(108px, .85fr) minmax(76px, .6fr)
    minmax(96px, .75fr) minmax(140px, 1.05fr) minmax(112px, .85fr) minmax(108px, .85fr) 60px;
  min-width: 1000px;
}
/* ظرفیتی که مجموعه از اعتبار چاپش به همکار داده؛ چیپ خودش دکمهٔ ویرایش است. */
.orgm-quota-chip {
  display: inline-flex; align-items: center; padding: 4px 9px; border-radius: 8px;
  border: 1px solid transparent; background: var(--teal-soft); color: #12796c;
  font: inherit; font-size: 11px; font-weight: 800; cursor: pointer; white-space: nowrap;
}
.orgm-quota-chip.off { background: var(--panel-soft); border-color: var(--line); color: var(--muted); font-weight: 700; }
.orgm-quota-chip.full { background: var(--orange-soft); color: #a45a0c; }
.orgm-quota-chip:hover { border-color: currentColor; }
.orgm-quota-pool {
  display: flex; align-items: flex-start; gap: 7px; margin: 10px 0 0; padding: 9px 12px;
  border-radius: 12px; background: var(--panel-soft); border: 1px solid var(--line);
  font-size: 11.5px; line-height: 1.9; color: var(--muted);
}
.orgm-quota-pool .ui-icon { width: 15px; height: 15px; flex: none; margin-block-start: 3px; color: var(--teal); }
.orgm-quota-pool b { color: var(--ink); font-weight: 900; }
/* دعوت‌های در انتظارِ حساب‌های موجود، زیرِ فهرستِ همکاران */
.orgm-invites { margin-block-start: 16px; }
.orgm-invites .orgm-found { display: inline-flex; align-items: center; gap: 6px; }
.orgm-invites .orgm-found .ui-icon { width: 15px; height: 15px; }
.orgm-row-invite {
  grid-template-columns:
    minmax(140px, 1.35fr) minmax(108px, .85fr) minmax(76px, .6fr)
    minmax(108px, .85fr) minmax(120px, .9fr) minmax(110px, auto);
  min-width: 700px;
}
.orgm-row-invite .ghost-button { min-height: 32px; padding: 0 12px; font-size: 11.5px; }
.orgm-leave-link {
  display: inline; margin: 0; padding: 0; border: 0; background: none; cursor: pointer;
  color: var(--red, #c0392b); font: inherit; font-weight: 800; text-decoration: underline; text-underline-offset: 3px;
}
.orgm-count-pill {
  display: inline-flex; align-items: center; padding: 4px 10px; border-radius: 999px;
  background: var(--panel-soft); border: 1px solid var(--line);
  font-size: 10.5px; font-weight: 800; color: var(--ink); font-variant-numeric: tabular-nums;
}
.orgm-count-pill.zero { color: var(--muted); }
/* دو دکمهٔ ریز به‌جای seg-group کامل: در یک سلولِ ۱۴۸ پیکسلی باید هم انتخابِ
   فعلی خوانده شود و هم عوض‌کردنش یک کلیک بماند. */
.orgm-scope-seg { display: inline-flex; border: 1px solid #dfe1e4; border-radius: 9px; overflow: hidden; background: #fbfbfb; }
.orgm-scope-seg button {
  padding: 5px 11px; border: 0; background: transparent; font: inherit; font-size: 10.5px;
  font-weight: 800; color: #6b7280; cursor: pointer;
}
.orgm-scope-seg button + button { border-inline-start: 1px solid #dfe1e4; }
.orgm-scope-seg button:hover { color: var(--orange); }
.orgm-scope-seg button.on { background: var(--orange-soft); color: #c25710; }
.orgm-summary-card.static { cursor: default; }
.orgm-summary-card.static:hover { transform: none; border-color: #dedede; box-shadow: 0 4px 13px rgba(37, 39, 43, .055); }
.orgm-seatline { display: flex; align-items: center; gap: 12px; flex: 0 1 360px; min-width: 240px; font-size: 12px; font-weight: 750; }
.orgm-seatnote { font-size: 11px; font-weight: 750; color: var(--muted); }
.orgm-readonly { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-size: 11px; font-weight: 750; }
.orgm-readonly .ui-icon { width: 15px; height: 15px; }
.orgm-seatline b { font-size: 14px; font-weight: 900; }
.orgm-uid {
  font-size: 11px; font-weight: 750; letter-spacing: .2px;
  color: #6b7280; font-variant-numeric: tabular-nums;
}
.orgm-cell { min-width: 0; color: #4b5158; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.orgm-row:last-child { border-block-end: 0; }
.orgm-row:not(.orgm-head):hover { background: #fffcf8; }
.orgm-row.orgm-head {
  min-height: 45px; background: #f7f7f8; font-size: 10px; font-weight: 800; color: #59616b;
  position: sticky; inset-block-start: 0; z-index: 1;
}
.orgm-row.picked { background: color-mix(in srgb, var(--orange-soft) 70%, var(--panel)); }
.orgm-row.picked:hover { background: var(--orange-soft); }
/* ظرفِ چک‌باکس عمداً <span> است نه <label>: متنی برای برچسب ندارد (نامِ
   دسترس‌پذیری روی خودِ input است) و label اینجا فقط یک لایهٔ فعال‌سازیِ
   اضافه روی مسیر کلیک می‌گذاشت. */
.orgm-check { display: flex; align-items: center; justify-content: center; }
.orgm-check input { width: 16px; height: 16px; accent-color: var(--orange); cursor: pointer; }
.orgm-mobile { font-size: 11.5px; color: var(--muted); }
.orgm-dim { color: var(--muted); font-style: normal; }
.orgm-chip {
  display: inline-flex; align-items: center; padding: 2px 8px; border-radius: 999px;
  background: var(--panel-soft); border: 1px solid var(--line);
  font-size: 10px; font-weight: 750; color: var(--ink); max-width: 140px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.orgm-chip.own { background: var(--orange-soft); border-color: color-mix(in srgb, var(--orange) 25%, var(--line)); color: #a4460c; }
.orgm-chip.ready { background: var(--teal-soft); border-color: color-mix(in srgb, var(--teal) 25%, var(--line)); color: #0e7466; }
.orgm-chip.collecting { background: var(--yellow-soft); border-color: color-mix(in srgb, var(--yellow) 30%, var(--line)); color: #8a6a10; }
.orgm-chip.published { background: var(--blue-soft); border-color: color-mix(in srgb, var(--blue) 25%, var(--line)); color: #2c4a99; }
.orgm-chip.pick { cursor: pointer; transition: background .15s ease, border-color .15s ease; }
.orgm-chip.pick:hover { border-color: color-mix(in srgb, var(--orange) 40%, var(--line)); }
.orgm-chip.pick.on { background: var(--orange); border-color: var(--orange); color: #fff; }
/* نشانِ وضعیت: نقطهٔ رنگی + متن، در یک قرص. رنگِ نقطه و متن یکی است تا سه
   حالت از یک نگاه از هم جدا شوند، بی‌آنکه سه آیکون متفاوت لازم باشد. */
.orgm-state { display: inline-flex; align-items: center; gap: 6px; width: max-content; padding: 5px 10px; border-radius: 999px; font-size: 10.5px; font-weight: 800; }
.orgm-state .ui-icon { width: 13px; height: 13px; }
.orgm-state > i { width: 6px; height: 6px; border-radius: 999px; background: currentColor; flex: none; }
.orgm-state.ok { color: #08766e; background: #e8f5f3; }
.orgm-state.wait { color: #bd6200; background: #fff1df; }
.orgm-state.idle { color: #6f3a92; background: #f3ecf9; }
/* سرستونِ «عملیات» از ابتدای ستون شروع می‌شود؛ اگر دکمه به انتهای ستون
   بچسبد، عنوان و دکمه زیر هم نمی‌افتند و ستون شکسته دیده می‌شود. */
.orgm-rowacts { display: flex; align-items: center; gap: 3px; justify-content: flex-start; }
.orgm-action-menu { position: relative; }
.orgm-action-menu > summary {
  width: 34px; height: 34px; display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid #dfe1e4; border-radius: 9px; background: #fff; cursor: pointer; list-style: none;
  color: #505761; font-size: 22px; line-height: 1;
}
.orgm-action-menu > summary::-webkit-details-marker { display: none; }
.orgm-action-menu[open] > summary { border-color: var(--orange); color: var(--orange); background: var(--orange-soft); }
/* `position: fixed` نه absolute: جدول برای اسکرولِ افقی `overflow: auto` دارد و
   منوی absolute داخلش بریده می‌شد — به‌ویژه روی ردیف اول که جای بازشدن رو به
   پایین داشت ولی قابِ جدول بالایش را قیچی می‌کرد. مختصات را JS می‌گذارد
   (`openOrgActionMenu`) و همان‌جا هم تصمیم می‌گیرد بالا باز شود یا پایین. */
.orgm-action-popover {
  position: fixed; z-index: 40; top: 0; left: 0; right: auto;
  width: 172px; display: grid; padding: 5px; border: 1px solid var(--line); border-radius: 10px;
  background: #fff; box-shadow: 0 12px 28px rgba(33, 37, 44, .16);
  visibility: hidden;
}
.orgm-action-menu[open] > .orgm-action-popover { visibility: visible; }
.orgm-action-popover button {
  display: flex; align-items: center; gap: 8px; padding: 8px 9px; border: 0; border-radius: 7px;
  background: transparent; color: var(--ink); font: inherit; font-size: 11.5px; font-weight: 750; cursor: pointer;
}
.orgm-action-popover button:hover { background: var(--panel-soft); }
.orgm-action-popover button.danger { color: var(--red); }
.orgm-action-popover .ui-icon { width: 14px; height: 14px; }
.orgm-row:has(.orgm-action-menu[open]) { background: #fffcf8; }
.orgm-none { margin: 0; padding: 26px 14px; text-align: center; color: var(--muted); font-size: 12px; }
.orgm-none.slim { padding: 8px 0; text-align: start; font-size: 11.5px; }
.orgm-filter-empty {
  min-width: 0; display: grid; justify-items: center; gap: 5px; padding: 36px 16px;
  color: var(--muted); text-align: center;
}
.orgm-filter-empty > .ui-icon { width: 28px; height: 28px; margin-bottom: 3px; color: #bbb3a8; }
.orgm-filter-empty b { color: var(--ink); font-size: 13px; }
.orgm-filter-empty small { font-size: 10.5px; }
.orgm-filter-empty button { margin-top: 5px; }
.orgm-pager { display: flex; align-items: center; justify-content: center; gap: 12px; margin: 0; padding: 13px; border-block-start: 1px solid var(--line); font-size: 11.5px; font-weight: 750; }
.orgm-pager .ghost-button { padding: 6px 12px; font-size: 11.5px; }
.orgm-pager-nav { display: flex; align-items: center; gap: 5px; }
.orgm-page {
  min-width: 32px; height: 32px; display: inline-flex; align-items: center; justify-content: center;
  padding: 0 8px; border: 1px solid #dfe1e4; border-radius: 9px; background: #fff;
  font: inherit; font-size: 11.5px; font-weight: 800; color: #4b5158; cursor: pointer;
  font-variant-numeric: tabular-nums;
}
.orgm-page:hover:not(:disabled) { border-color: color-mix(in srgb, var(--orange) 40%, var(--line)); color: var(--orange); }
.orgm-page.on { border-color: var(--orange); background: var(--orange-soft); color: #c25710; }
.orgm-page:disabled { opacity: .45; cursor: default; }
.orgm-page.nav .ui-icon { width: 15px; height: 15px; }
.orgm-page-gap { padding: 0 2px; color: var(--muted); }
/* ⋮ به‌جای ⋯: نشانِ مشترکِ سه‌نقطه افقی است و در ستونِ باریکِ عملیات، عمودی
   خوانده می‌شود. چرخشِ ۹۰ درجه یعنی لازم نیست نشانِ دومی نگه داریم. */
.orgm-more-glyph { rotate: 90deg; }
.orgm-excel { color: #1d7c4d; }

.orgm-empty { padding: 46px 20px; text-align: center; }
.orgm-empty h3 { margin: 12px 0 6px; font-size: 15px; }
.orgm-empty p { margin: 0 auto; max-width: 520px; color: var(--muted); font-size: 12px; line-height: 2; }
.orgm-empty-actions { display: flex; justify-content: center; flex-wrap: wrap; gap: 9px; margin-top: 16px; }
.orgm-hint {
  display: flex; align-items: flex-start; gap: 7px; margin: 0 0 12px; padding: 10px 12px;
  border: 1px solid color-mix(in srgb, var(--blue) 20%, var(--line));
  border-radius: 12px; background: var(--blue-soft); color: #2c4a99;
  font-size: 11.5px; line-height: 1.95;
}
.orgm-hint .ui-icon { width: 15px; height: 15px; flex: none; margin-block-start: 3px; }
.orgm-hint.slim { margin: 0; padding: 8px 11px; font-size: 11px; line-height: 1.8; }

/* کلاس‌ها */
/* چیدمانِ کارتیِ قدیمیِ کلاس‌ها و همکاران برداشته شد؛ هر دو حالا همان جدولِ
   ستون‌دارِ دانش‌آموزان را می‌پوشند (.orgm-row-class / .orgm-row-member). */
.orgm-seats {
  display: flex; align-items: center; flex-wrap: wrap; gap: 12px; margin-bottom: 12px;
  padding: 13px 15px; border: 1px solid var(--line); border-radius: 14px; background: var(--panel-soft);
  font-size: 12px; font-weight: 700;
}
.orgm-seats > div:first-child { flex: 1 1 200px; }
.orgm-seats b { font-size: 14px; font-weight: 900; }
.orgm-seatbar { flex: 1 1 140px; height: 7px; border-radius: 999px; background: var(--line); overflow: hidden; }
.orgm-seatbar i { display: block; block-size: 100%; background: var(--orange); border-radius: 999px; }

/* آزمون اشتراکی */
.orgm-coop-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 13px; }
.orgm-coop-card {
  display: grid; gap: 8px; padding: 15px; border: 1px solid var(--line); border-radius: 15px;
  background: var(--panel); cursor: pointer; transition: border-color .15s ease, box-shadow .15s ease;
}
.orgm-coop-card:hover { border-color: color-mix(in srgb, var(--orange) 35%, var(--line)); box-shadow: var(--shadow); }
.orgm-coop-card.mine { border-inline-start: 3px solid var(--orange); }
.orgm-coop-card header { display: flex; align-items: flex-start; gap: 8px; }
.orgm-coop-card h4 { margin: 0; flex: 1; font-size: 13.5px; font-weight: 900; }
.orgm-coop-card > small { font-size: 10.5px; color: var(--muted); }
.orgm-coop-card footer { display: flex; flex-wrap: wrap; gap: 8px; font-size: 10.5px; color: var(--muted); font-weight: 700; }
.orgm-coop-progress { display: block; block-size: 6px; border-radius: 999px; background: var(--line); overflow: hidden; }
.orgm-coop-progress.big { block-size: 8px; }
.orgm-coop-progress i { display: block; block-size: 100%; background: var(--teal); border-radius: 999px; }
.orgm-coop-detail { display: block; }
.orgm-coop-head {
  display: flex; align-items: center; flex-wrap: wrap; gap: 12px; margin-bottom: 14px;
  padding-bottom: 12px; border-block-end: 1px solid var(--line);
}
.orgm-coop-head > div { flex: 1 1 200px; }
.orgm-coop-head h3 { margin: 0 0 3px; font-size: 15px; font-weight: 900; }
.orgm-coop-head small { font-size: 10.5px; color: var(--muted); }
.orgm-coop-total { display: grid; justify-items: center; }
.orgm-coop-total b { font-size: 18px; font-weight: 900; }
.orgm-coop-total small { font-size: 9.5px; color: var(--muted); }
.orgm-coop-booklet { margin-bottom: 14px; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.orgm-coop-booklet > header {
  display: flex; align-items: center; gap: 8px; padding: 10px 14px;
  background: var(--panel-soft); border-block-end: 1px solid var(--line); font-size: 12.5px;
}
.orgm-coop-booklet > header small { color: var(--muted); font-size: 10.5px; }
.orgm-coop-lesson {
  /* ستون آخر عرضِ ثابت دارد نه auto: با auto هر ردیف به‌اندازهٔ دکمه‌های خودش
     پهن می‌شد و نوارهای پیشرفت پله‌پله جابه‌جا می‌شدند. */
  display: grid; grid-template-columns: minmax(150px, 1.3fr) minmax(80px, 1fr) 78px 92px 216px;
  align-items: center; gap: 11px; padding: 11px 14px; border-block-end: 1px solid var(--line);
}
.orgm-coop-lesson:last-child { border-block-end: 0; }
.orgm-coop-lesson.done { background: color-mix(in srgb, var(--teal-soft) 45%, var(--panel)); }
.orgm-coop-name { display: grid; gap: 4px; min-width: 0; }
.orgm-coop-name b { font-size: 12.5px; font-weight: 800; }
.orgm-coop-name small { display: flex; flex-wrap: wrap; gap: 4px; }
.orgm-coop-count { font-size: 12px; font-weight: 750; color: var(--muted); }
.orgm-coop-count b { font-size: 14px; font-weight: 900; color: var(--ink); }
.orgm-coop-lesson .secondary-button, .orgm-coop-lesson .primary-button, .orgm-coop-lesson .ghost-button {
  padding: 6px 10px; font-size: 11px;
}

/* سازندهٔ اسکلت آزمون اشتراکی (داخل مودال) */
.orgm-coop-builder { display: grid; gap: 12px; }
.orgm-coop-bk { border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.orgm-coop-bk > header {
  display: flex; align-items: center; gap: 8px; padding: 9px 12px;
  background: var(--panel-soft); border-block-end: 1px solid var(--line);
}
.orgm-coop-bktitle {
  flex: 1; padding: 7px 10px; border: 1px solid var(--line); border-radius: 10px;
  background: var(--panel); font: inherit; font-size: 12.5px; font-weight: 800; color: var(--ink);
}
.orgm-coop-min { display: inline-flex; align-items: center; gap: 5px; font-size: 10.5px; color: var(--muted); }
.orgm-coop-min input {
  width: 62px; padding: 7px 8px; border: 1px solid var(--line); border-radius: 10px;
  background: var(--panel); font: inherit; font-size: 12px; text-align: center; color: var(--ink);
}
.orgm-coop-lsrow {
  display: grid; grid-template-columns: minmax(130px, 1fr) auto minmax(150px, 1.4fr) 32px;
  align-items: center; gap: 9px; padding: 10px 12px; border-block-end: 1px solid var(--line);
}
.orgm-coop-lsrow > input {
  padding: 8px 10px; border: 1px solid var(--line); border-radius: 10px;
  background: var(--panel); font: inherit; font-size: 12px; color: var(--ink);
}
.orgm-coop-assign { display: flex; flex-wrap: wrap; gap: 4px; }
.orgm-coop-bk > .ghost-button { margin: 9px 12px; padding: 6px 11px; font-size: 11.5px; }

/* فرم‌های مودال این صفحه */
/* نوارِ اسکرولِ اختصاصی عمداً ندارد: بقیهٔ مودال‌های سایت نوار پنهان دارند و
   یک نوارِ خاکستری کنارِ این یکی، مثل یک ستونِ اضافه دیده می‌شد. */
.modal.org-student-modal { width: min(640px, calc(100vw - 32px)); border-radius: 19px; box-shadow: 0 22px 60px rgba(26, 30, 36, .22); }
.orgm-student-modal-head { padding: 18px 22px 13px; border-block-end: 0; }
.orgm-modal-title { display: flex; align-items: center; gap: 11px; min-width: 0; }
.orgm-modal-title > span {
  display: inline-flex; align-items: center; justify-content: center; flex: none;
  width: 44px; height: 44px; color: var(--orange); background: transparent;
}
.orgm-modal-title > span .ui-icon { width: 31px; height: 31px; }
.orgm-modal-title > div { min-width: 0; }
.orgm-modal-title h2 { font-size: 20px; }
.orgm-modal-title p { margin: 4px 0 0; color: var(--muted); font-size: 10px; line-height: 1.7; }
.org-student-modal .modal-body { padding: 8px 22px 18px; }
.orgm-form { display: grid; gap: 14px; }
.orgm-form.tight { gap: 12px; }
.orgm-form.tight .field input,
.orgm-form.tight .field select { padding-block: 8px; }
/* ردیفِ «برچسب کنارِ کنترل»: برای انتخاب‌های چیپی که عنوانِ بالای کادر، ارتفاع
   بی‌دلیل به فرم اضافه می‌کرد و مودال را خالی و کشیده نشان می‌داد. */
/* دو ستونِ ثابت در فرمِ فشرده: با auto-fit، ردیفی که سه کادر داشت و ردیفی که
   یکی، دو چیدمانِ متفاوت می‌ساختند و فرم نامرتب و «خالی» دیده می‌شد. */
.orgm-form.tight .orgm-form-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.orgm-form-section {
  display: grid; gap: 12px; padding: 14px 15px;
  border: 1px solid #dfe1e4; border-radius: 13px; background: #fff;
}
.orgm-form-section > header { display: flex; align-items: center; gap: 9px; }
.orgm-form-section > header > span {
  display: inline-flex; align-items: center; justify-content: center; flex: none;
  width: 23px; height: 23px; border-radius: 999px; background: var(--orange); color: #fff;
  font-size: 10px; font-weight: 900; box-shadow: 0 4px 10px rgba(240, 96, 0, .2);
}
.orgm-form-section > header > div { display: grid; gap: 1px; }
.orgm-form-section > header b { font-size: 13px; font-weight: 900; }
.orgm-form-section > header small { display: none; }
.orgm-form-row { display: grid; grid-template-columns: 84px minmax(0, 1fr); align-items: center; gap: 10px; }
/* دو انتخابِ کوتاه در یک ردیف: هرکدام سه چیپ دارند و ردیفِ جداگانه فقط ارتفاعِ
   بی‌دلیل به فرم اضافه می‌کرد. */
.orgm-form-row.split { grid-template-columns: auto minmax(0, 1fr) auto minmax(0, 1fr); column-gap: 12px; }
.orgm-form-row.split .orgm-form-label { white-space: nowrap; }
.orgm-form-row > select {
  padding: 9px 11px; border: 1px solid var(--line); border-radius: 11px;
  background: #fff; font: inherit; font-size: 12.5px; color: var(--ink);
}
.orgm-form-label { font-size: 11px; font-weight: 750; color: var(--muted); }
.orgm-pills { display: flex; flex-wrap: wrap; gap: 6px; }
.orgm-pill {
  padding: 7px 14px; border: 1px solid var(--line); border-radius: 11px;
  background: #fff; font: inherit; font-size: 12px; font-weight: 800;
  color: #5f5a51; cursor: pointer;
  transition: border-color .15s ease, background .15s ease, color .15s ease;
}
.orgm-pill:hover { border-color: color-mix(in srgb, var(--orange) 38%, var(--line)); background: #fffaf5; }
.orgm-pill.on { border-color: var(--orange); background: var(--orange-soft); color: #c25710; }
/* جفتِ پایه/رشته‌ای که در اشتراکِ این حساب نیست: دیده می‌شود ولی زده نمی‌شود —
   پنهان‌کردنش فقط سؤال می‌سازد که «پس بقیه کجا رفتند؟» */
.orgm-pill:disabled, .orgm-pill.off {
  opacity: .42; cursor: not-allowed;
  border-style: dashed; background: #fbfaf8; color: var(--muted);
}
.orgm-pill:disabled:hover, .orgm-pill.off:hover { border-color: var(--line); background: #fbfaf8; }
.orgm-form .field > span { font-size: 11px; font-weight: 750; }
.orgm-form .req { color: var(--red); font-style: normal; }
.orgm-field-help { display: none; margin-top: 4px; color: var(--muted); font-size: 9.5px; line-height: 1.6; }
.field:focus-within > .orgm-field-help { display: block; }
.orgm-form [aria-invalid="true"] { border-color: var(--red) !important; background: var(--red-soft) !important; }
.orgm-form [data-org-field].invalid > span { color: var(--red); }
.orgm-form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 12px 14px; }
.orgm-form-block { display: grid; gap: 9px; }
.orgm-form-block h4 { margin: 0; font-size: 12px; font-weight: 900; }
.orgm-picker { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 8px; }
.orgm-picker.compact { display: flex; flex-wrap: wrap; gap: 6px; }
.orgm-picker.compact label { padding: 5px 11px 5px 8px; border-radius: 11px; gap: 7px; }
.orgm-picker.compact input { width: 14px; height: 14px; }
.orgm-picker.compact .avatar { width: 24px; height: 24px; border-radius: 8px; font-size: 9px; }
.orgm-picker.compact b { font-size: 11.5px; }
.orgm-picker.compact small { font-size: 9.5px; }
.orgm-picker.tall { max-height: 46vh; overflow-y: auto; padding-inline-end: 4px; }
.orgm-picker.one { grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); }
/* انتخابِ چند کلاس (فرمِ دانش‌آموز و «افزودن به کلاس‌ها») */
.orgm-field-wide { grid-column: 1 / -1; }
.orgm-cls-multi { display: grid; gap: 8px; }
.orgm-cls-multi .orgm-cls-list { max-height: 30vh; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); }
.orgm-cls-multi .orgm-cls-count { color: var(--muted); font-size: 11px; }
.orgm-picker label {
  display: flex; align-items: center; gap: 9px; padding: 9px 11px; cursor: pointer;
  border: 1px solid var(--line); border-radius: 12px; background: #fff;
  transition: border-color .15s ease, background .15s ease;
}
.orgm-picker label:hover { border-color: color-mix(in srgb, var(--orange) 30%, var(--line)); }
.orgm-picker label.on { background: var(--orange-soft); border-color: color-mix(in srgb, var(--orange) 40%, var(--line)); }
.orgm-picker input { width: 16px; height: 16px; accent-color: var(--orange); flex: none; }
.orgm-picker label > span { display: grid; gap: 1px; min-width: 0; }
.orgm-picker b { font-size: 12px; font-weight: 800; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.orgm-picker small { font-size: 10px; color: var(--muted); }
.orgm-roles { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 9px; }
.orgm-roles label {
  display: flex; align-items: center; gap: 10px; padding: 11px 13px; cursor: pointer;
  border: 1px solid var(--line); border-radius: 13px; background: var(--panel-soft);
}
.orgm-roles label.on { background: var(--orange-soft); border-color: color-mix(in srgb, var(--orange) 40%, var(--line)); }
.orgm-roles input { width: 16px; height: 16px; accent-color: var(--orange); flex: none; }
.orgm-roles svg { width: 22px; height: 22px; color: var(--orange); flex: none; }
.orgm-roles span { display: grid; gap: 2px; }
.orgm-roles b { font-size: 12.5px; font-weight: 850; }
.orgm-roles small { font-size: 10.5px; color: var(--muted); }
.orgm-switch { display: inline-flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 700; cursor: pointer; }
.orgm-switch input { width: 16px; height: 16px; accent-color: var(--orange); }
.orgm-form-error {
  margin: 0; padding: 9px 11px; border: 1px solid color-mix(in srgb, var(--red) 30%, var(--line));
  border-radius: 11px; background: var(--red-soft); color: #9c3535; font-size: 11px; font-weight: 750;
}
.orgm-form-error[hidden] { display: none; }
.orgm-student-footer { justify-content: space-between; padding: 14px 22px 18px; background: #fafafa; }
.orgm-submit-group { display: flex; align-items: center; gap: 8px; margin-inline-start: auto; }

/* ورود گروهی با اکسل — مودالِ جمع‌وجور: مرحلهٔ فایل باریک، مرحلهٔ پیش‌نمایش
   کمی پهن‌تر چون جدول دارد. عرض روی خودِ .modal بسته می‌شود تا با max-height
   و اسکرولِ پیش‌فرضِ مودال نجنگد. */
.modal.orgm-import-modal { width: min(560px, 94vw); }
.modal.orgm-import-modal:has(.orgm-import-table) { width: min(660px, 96vw); }
.orgm-import-body { display: grid; gap: 12px; padding: 16px 20px 18px; }
.orgm-import-drop {
  display: grid; justify-items: center; gap: 6px; padding: 22px 16px; text-align: center;
  border: 2px dashed var(--line); border-radius: 14px; background: var(--panel-soft);
  transition: border-color .15s ease, background .15s ease;
}
.orgm-import-drop.over { border-color: var(--orange); background: var(--orange-soft); }
.orgm-import-drop b { font-size: 12.5px; }
.orgm-import-drop small { font-size: 10.5px; color: var(--muted); }
.orgm-import-icon { width: 26px; height: 26px; color: var(--orange); }
.orgm-import-note {
  display: flex; align-items: flex-start; gap: 6px; margin: 0;
  font-size: 10.5px; line-height: 1.75; color: var(--muted);
}
.orgm-import-note .ui-icon { width: 13px; height: 13px; flex: none; margin-block-start: 3px; }
.orgm-import-tpl { justify-self: center; }
.orgm-import-summary { display: flex; flex-wrap: wrap; gap: 8px; }
.orgm-import-summary span {
  display: grid; gap: 1px; padding: 7px 12px; border-radius: 11px; flex: 1 1 0;
  border: 1px solid var(--line); background: var(--panel-soft); font-size: 10px; color: var(--muted); font-weight: 700;
}
.orgm-import-summary b { font-size: 15px; font-weight: 900; color: var(--ink); }
.orgm-import-summary .ok { border-color: color-mix(in srgb, var(--teal) 30%, var(--line)); background: var(--teal-soft); }
.orgm-import-summary .bad { border-color: color-mix(in srgb, var(--red) 30%, var(--line)); background: var(--red-soft); }
.orgm-import-table { max-height: 38vh; overflow: auto; border: 1px solid var(--line); border-radius: 12px; }
.orgm-import-row {
  /* ستونِ وضعیت ۱۴۰px کف دارد چون بلندترین پیامِ تک‌خطی («این شماره حساب
     آموزشی است») ۱۳۵px اندازه‌گیری شد؛ با کفِ قبلی (۸۴px) پیامِ خطا به خط دوم
     می‌رفت و ارتفاع ردیف از ۳۳ به ۴۹ می‌پرید. */
  display: grid; grid-template-columns: 28px minmax(90px, 1.1fr) 104px minmax(78px, .8fr) minmax(70px, .8fr) minmax(140px, 1fr);
  gap: 6px; padding: 7px 10px; border-block-end: 1px solid var(--line); font-size: 11px;
}
.orgm-import-table.no-class .orgm-import-row {
  grid-template-columns: 28px minmax(100px, 1.2fr) 104px minmax(84px, .9fr) minmax(140px, 1fr);
}
/* هیچ سلولی نباید بشکند: ردیف‌ها هم‌ارتفاع می‌مانند و چشم ستون را گم نمی‌کند.
   متنِ نادرِ بلندتر (چند خطا با هم) با «…» کوتاه می‌شود و کاملش در title است. */
.orgm-import-row > span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* شمارهٔ موبایل برای ترتیبِ درستِ رقم‌ها dir="ltr" دارد، ولی همین باعث می‌شد
   متن به لبهٔ **چپِ** سلولِ خودش بچسبد در حالی که عنوانِ ستون (RTL) روی لبهٔ
   راست بود؛ عدد زیر ستونِ بغلی به نظر می‌آمد. جهت می‌ماند، تراز برمی‌گردد. */
.orgm-import-row > [dir="ltr"] { text-align: right; }
.orgm-import-row:last-child { border-block-end: 0; }
.orgm-import-row.head { position: sticky; inset-block-start: 0; background: var(--panel-soft); font-size: 9.5px; font-weight: 800; color: var(--muted); }
.orgm-import-row.bad { background: var(--red-soft); color: #9c3535; }

@media (max-width: 1080px) {
}
@media (max-height: 780px) and (min-width: 521px) {
  .modal.org-student-modal { max-height: calc(100dvh - 20px); }
  .orgm-student-modal-head { padding-block: 11px 7px; }
  .orgm-modal-title > span { width: 36px; height: 36px; }
  .orgm-modal-title > span .ui-icon { width: 27px; height: 27px; }
  .orgm-modal-title h2 { font-size: 18px; }
  .org-student-modal .modal-body { padding-block: 5px 10px; }
  .orgm-form.tight { gap: 8px; }
  .orgm-form-section { gap: 8px; padding: 10px 12px; }
  .orgm-form.tight .field input,
  .orgm-form.tight .field select { padding-block: 6px; }
  .orgm-form-grid { gap: 8px 12px; }
  .orgm-form-row { gap: 7px; }
  .orgm-pill { padding-block: 5px; }
  .orgm-picker.compact label { padding-block: 4px; }
  .orgm-student-footer { padding-block: 10px 12px; }
}
@media (max-width: 860px) {
  .orgm-body { padding: 0; }
  .orgm-shell > .sx-tabs { margin-bottom: 16px; }
  .orgm-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .orgm-summary-card { padding: 9px; }
  .orgm-summary-card small { display: none; }
  .orgm-toolbar { padding: 10px; }
  .orgm-search { flex-basis: 100%; }
  .orgm-result-head > small { display: none; }
  .orgm-row.orgm-head { display: none; }
  .orgm-table { border: 0; border-radius: 0; overflow: visible; }
  .orgm-row {
    grid-template-columns: 30px minmax(0, 1fr) auto; gap: 8px 10px; margin-bottom: 9px;
    min-width: 0; padding: 12px; border: 1px solid var(--line) !important; border-radius: 14px;
    background: var(--panel); box-shadow: 0 7px 18px rgba(39, 34, 28, .035);
  }
  .orgm-check { grid-column: 1; grid-row: 1; }
  .orgm-name { grid-column: 2; grid-row: 1; }
  .orgm-rowacts { grid-column: 3; grid-row: 1; }
  .orgm-row > span:not(.orgm-rowacts):not(.orgm-check):not(.orgm-name) { grid-column: 2 / -1; font-size: 11px; }
  .orgm-row > [data-org-label]:not(.orgm-name) { display: flex; align-items: flex-start; flex-wrap: wrap; gap: 4px 8px; }
  .orgm-row > [data-org-label]:not(.orgm-name)::before {
    content: attr(data-org-label); flex: 0 0 82px; color: var(--muted); font-size: 9.5px; font-weight: 750;
  }
  .orgm-form.tight .orgm-form-grid { grid-template-columns: 1fr; }
  .orgm-form-row { grid-template-columns: 1fr; gap: 5px; }
  .orgm-form-row.split { grid-template-columns: 1fr; }
  .orgm-coop-lesson { grid-template-columns: minmax(0, 1fr) auto; }
  .orgm-coop-lesson .orgm-coop-progress { grid-column: 1 / -1; }
  .orgm-coop-lsrow { grid-template-columns: minmax(0, 1fr) auto; }
  .orgm-coop-assign { grid-column: 1 / -1; }
  .orgm-import-row { grid-template-columns: 32px minmax(0, 1fr) 110px; }
  .orgm-import-row > span:nth-child(n+4) { grid-column: 2 / -1; }
  .orgm-student-footer { align-items: stretch; }
  .orgm-submit-group { flex: 1; }
  .orgm-submit-group > button { flex: 1; justify-content: center; }
}
@media (max-width: 520px) {
  .orgm-summary-icon { display: none; }
  .orgm-summary-card > span:last-child { width: 100%; }
  .orgm-student-modal-head { align-items: flex-start; }
  .orgm-modal-title p { display: none; }
  .orgm-form-section { padding: 12px; }
  .orgm-student-footer { display: grid; grid-template-columns: 1fr; }
  .orgm-student-footer > .ghost-button { order: 2; justify-content: center; }
  .orgm-submit-group { display: grid; grid-template-columns: 1fr; margin: 0; }
}

/* ══════════════════════ صفحهٔ لندینگ عمومی (`/`) ═══════════════════════════
   ساختِ نشانه‌گذاری در app.js → `renderPublicLanding`. هرچه اینجاست با
   پیشوند `lp-` است و هیچ سلکتورِ عمومیِ تازه‌ای به سند اضافه نمی‌کند.

   سه تصمیمِ ظاهری که بقیه از آن‌ها می‌آیند:
   • صفحه **روشن** است — همان کرمِ پنل با کارت‌های سفید. تنها سطح‌های تیره
     نوارِ بالای صفحه و فوتر (سبزِ برند) و نوارِ CTAی پایانی (نارنجی) هستند.
   • رنگِ عمل همیشه نارنجیِ `--orange` است؛ سبزِ برند رنگِ هویت است نه دکمه.
   • رنگِ هر کارتِ بسته از خودِ محصول (`product.color`) می‌آید و با
     `color-mix` به تُنِ ملایمِ پس‌زمینه و تُنِ خوانا برای متن تبدیل می‌شود،
     پس هر محصولِ تازه‌ای در کاتالوگ خودبه‌خود جا می‌افتد.
   ═══════════════════════════════════════════════════════════════════════ */

body.has-landing {
  /* درخشش نارنجیِ گوشهٔ بدنه با گرادیانِ خودِ هیرو دوبار می‌افتد. */
  background: var(--bg);
}

.lp-page {
  --lp-green: #127c44;
  --lp-green-deep: #0d3b26;
  --lp-green-ink: #0a2a1c;
  --lp-gold: #fbb03b;
  --lp-orange: #ff6b18;
  --lp-on-dark: #edf5f0;
  --lp-on-dark-2: rgba(237, 245, 240, 0.72);
  --lp-on-dark-3: rgba(237, 245, 240, 0.46);
  --lp-hair: rgba(237, 245, 240, 0.16);
  --lp-max: 1180px;
  --lp-r: 22px;
  --lp-r-sm: 14px;
  /* ── دستورِ «سطحِ برجسته» ──
     همان سه لایه‌ای که دکمهٔ نارنجی را فشردنی نشان می‌دهد و کلِ صفحه از آن
     می‌آید: (۱) تابشِ داخلی روی لبهٔ بالا = نور، (۲) یک لبهٔ سختِ پایین =
     ضخامتِ خودِ جسم، (۳) سایهٔ نرمِ دور = فاصله از کاغذ.
     وارونه‌اش `--lp-sink` است: شیارِ تب‌ها و مسیرِ نوارها فرورفته‌اند. */
  --lp-edge: #e7e3da;
  --lp-face: linear-gradient(180deg, #fff 0%, #fbfaf6 100%);
  --lp-card: inset 0 1px 0 #fff, 0 2px 0 var(--lp-edge), 0 10px 22px rgba(41, 36, 29, 0.07);
  --lp-card-hi: inset 0 1px 0 #fff, 0 3px 0 var(--lp-edge), 0 20px 40px rgba(41, 36, 29, 0.12);
  --lp-sink: inset 0 2px 5px rgba(41, 36, 29, 0.1), inset 0 -1px 0 rgba(255, 255, 255, 0.9);
  --lp-orange-edge: #d9540c;

  color: var(--ink);
  font-family: "Vazirmatn", Tahoma, sans-serif;
  overflow-x: clip;
}

.lp-page :where(h1, h2, h3, h4, p, ul, ol) { margin: 0; }
.lp-page :where(ul, ol) { padding: 0; list-style: none; }
/* ⚠️ `:where()` عمداً است: بدون آن، این ریست (کلاس + نوع = ۰,۱,۱) از هر
   `.lp-btn-*` (۰,۱,۰) قوی‌تر می‌شود و رنگِ همهٔ دکمه‌هایی که لینک‌اند را
   می‌خورد — یک بار متنِ سفیدِ دکمهٔ CTA روی زمینهٔ سفید ناپدید شد. */
.lp-page :where(a) { color: inherit; text-decoration: none; }
/* ⚠️ آیکون‌ها از همان اسپرایتِ درون‌خطیِ index.html می‌آیند ولی کلاسِ `ui-icon`
   را ندارند، پس قواعدِ خطیِ آن (fill:none + stroke:currentColor) اینجا تکرار
   می‌شود. بدون این، هر `<use>` با fillِ پیش‌فرضِ سیاه پر می‌شود و آیکون به یک
   لکهٔ تیره تبدیل می‌شود. نمادهایی که خودشان روی path مقدار fill/stroke دارند
   (مثل icon-konkur) دست‌نخورده می‌مانند، چون صفت روی عنصر برنده است. */
.lp-page svg[class^="lp-"],
.lp-page svg[class*=" lp-"] {
  display: inline-block;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  vertical-align: middle;
  pointer-events: none;
}
.lp-page em { font-style: normal; }

/* ─────────────────────────────── دکمه‌ها ─────────────────────────────── */

.lp-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 44px;
  padding: 0 20px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-size: 13.5px;
  font-weight: 800;
  line-height: 1;
  cursor: pointer;
  white-space: nowrap;
  transition: transform 0.18s var(--ease-pop, ease), box-shadow 0.18s ease, background 0.18s ease, border-color 0.18s ease, color 0.18s ease;
}
.lp-btn:hover { transform: translateY(-2px); }
/* فشردن: دکمه دقیقاً به‌اندازهٔ لبه‌اش پایین می‌رود و لبه صفر می‌شود. */
.lp-btn:active { transform: translateY(2px); }
.lp-btn-lg { min-height: 52px; padding: 0 26px; font-size: 15px; }
.lp-btn-icon { width: 16px; height: 16px; flex: 0 0 16px; }

.lp-btn-primary {
  background: linear-gradient(180deg, #ff8f4d 0%, var(--lp-orange) 62%, #f5610f 100%);
  color: #fff;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.45),
    inset 0 -1px 0 rgba(0, 0, 0, 0.07),
    0 3px 0 var(--lp-orange-edge),
    0 10px 22px rgba(255, 107, 24, 0.34);
}
.lp-btn-primary:hover {
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.5),
    inset 0 -1px 0 rgba(0, 0, 0, 0.07),
    0 5px 0 var(--lp-orange-edge),
    0 16px 32px rgba(255, 107, 24, 0.42);
}
.lp-btn-primary:active {
  box-shadow:
    inset 0 2px 5px rgba(0, 0, 0, 0.22),
    0 0 0 var(--lp-orange-edge),
    0 3px 8px rgba(255, 107, 24, 0.26);
}

.lp-btn-outline-dark {
  background: var(--lp-face);
  border-color: var(--line);
  color: var(--ink);
  box-shadow: inset 0 1px 0 #fff, 0 3px 0 var(--lp-edge), 0 8px 18px rgba(41, 36, 29, 0.09);
}
.lp-btn-outline-dark:hover {
  border-color: color-mix(in srgb, var(--lp-green) 42%, var(--line));
  color: var(--lp-green);
  box-shadow: inset 0 1px 0 #fff, 0 5px 0 var(--lp-edge), 0 14px 26px rgba(41, 36, 29, 0.12);
}
.lp-btn-outline-dark:active { box-shadow: inset 0 2px 5px rgba(41, 36, 29, 0.14), 0 0 0 var(--lp-edge); }

.lp-btn-white {
  background: var(--lp-face);
  color: var(--lp-orange);
  box-shadow: inset 0 1px 0 #fff, 0 3px 0 #e0d3c4, 0 12px 26px rgba(0, 0, 0, 0.16);
}
.lp-btn-white:hover { box-shadow: inset 0 1px 0 #fff, 0 5px 0 #e0d3c4, 0 18px 36px rgba(0, 0, 0, 0.22); }
.lp-btn-white:active { box-shadow: inset 0 2px 5px rgba(0, 0, 0, 0.18), 0 0 0 #e0d3c4; }

.lp-btn-outline {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.24), rgba(255, 255, 255, 0.1));
  border-color: rgba(255, 255, 255, 0.46);
  color: #fff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.4), 0 3px 0 rgba(0, 0, 0, 0.12);
}
.lp-btn-outline:hover { background: linear-gradient(180deg, rgba(255, 255, 255, 0.34), rgba(255, 255, 255, 0.18)); border-color: #fff; }
.lp-btn-outline:active { box-shadow: inset 0 2px 5px rgba(0, 0, 0, 0.18), 0 0 0 rgba(0, 0, 0, 0.12); }

.lp-btn-ghost { background: transparent; color: var(--ink); }
.lp-btn-ghost:hover { background: rgba(37, 35, 31, 0.06); }

.lp-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-top: auto;
  padding-top: 14px;
  color: var(--lp-green);
  font-size: 13px;
  font-weight: 800;
}
.lp-link:hover { color: var(--lp-orange); }

/* ─────────────────────── نوارِ بالا و هدر ─────────────────────── */

.lp-topbar {
  background: linear-gradient(180deg, #17864c, var(--lp-green-deep));
  color: var(--lp-on-dark);
  box-shadow: inset 0 -3px 8px rgba(0, 0, 0, 0.18), inset 0 1px 0 rgba(255, 255, 255, 0.1);
}
.lp-topbar-inner {
  display: flex;
  align-items: center;
  gap: 4px;
  max-width: var(--lp-max);
  margin: 0 auto;
  padding: 0 22px;
  overflow-x: auto;
  scrollbar-width: none;
}
.lp-topbar-inner::-webkit-scrollbar { display: none; }
.lp-topbar a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 13px;
  color: var(--lp-on-dark-2);
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
  border-bottom: 2px solid transparent;
  transition: color 0.16s ease, border-color 0.16s ease;
}
.lp-topbar a:hover { color: var(--lp-on-dark); }
.lp-topbar a.is-active { color: #fff; border-bottom-color: var(--lp-gold); }
.lp-topbar-icon { width: 15px; height: 15px; flex: 0 0 15px; }

.lp-head {
  position: sticky;
  top: 0;
  z-index: 60;
  background: color-mix(in srgb, #fff 92%, transparent);
  backdrop-filter: saturate(1.5) blur(14px);
  border-bottom: 1px solid var(--line);
  transition: box-shadow 0.24s ease;
}
.lp-head.is-stuck { box-shadow: 0 10px 28px rgba(41, 36, 29, 0.07); }
.lp-head-inner {
  display: flex;
  align-items: center;
  gap: 16px;
  max-width: var(--lp-max);
  margin: 0 auto;
  padding: 11px 22px;
}

.lp-brand { display: inline-flex; align-items: center; gap: 9px; flex: 0 0 auto; }
.lp-brand-mark { display: grid; place-items: center; width: 42px; height: 32px; flex: 0 0 42px; }
.lp-brand-mark img { width: 100%; height: 100%; object-fit: contain; }
.lp-type { display: block; height: 21px; width: auto; }

.lp-nav { display: flex; align-items: center; gap: 2px; margin-inline-start: 6px; }
.lp-nav a {
  padding: 8px 11px;
  border-radius: 10px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  transition: color 0.16s ease, background 0.16s ease;
}
.lp-nav a:hover { color: var(--ink); background: rgba(37, 35, 31, 0.05); }

.lp-head-actions { display: flex; align-items: center; gap: 8px; margin-inline-start: auto; }

.lp-burger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 42px;
  height: 42px;
  margin-inline-start: auto;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  cursor: pointer;
}
.lp-burger span { display: block; height: 2px; border-radius: 2px; background: var(--ink); transition: transform 0.22s ease, opacity 0.18s ease; }
.lp-burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.lp-burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.lp-burger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.lp-sheet {
  padding: 8px 22px 18px;
  background: #fff;
  border-top: 1px solid var(--line);
  animation: lp-sheet-in 0.22s var(--ease-pop, ease);
}
.lp-sheet nav { display: grid; gap: 2px; }
.lp-sheet nav a { padding: 12px 10px; border-radius: 12px; font-size: 14px; font-weight: 700; }
.lp-sheet nav a:hover { background: rgba(37, 35, 31, 0.05); }
/* یک دکمهٔ تمام‌عرض؛ ستونِ دوم از وقتی ورود و ثبت‌نام یکی شد بی‌معنی است. */
.lp-sheet-actions { display: grid; gap: 8px; margin-top: 12px; }
@keyframes lp-sheet-in { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: none; } }

/* ─────────────────────────────── هیرو ─────────────────────────────── */

.lp-hero {
  position: relative;
  isolation: isolate;
  padding: 68px 22px 78px;
  background: linear-gradient(180deg, #fff7ef 0%, #fdf6ee 38%, var(--bg) 100%);
  overflow: hidden;
}
.lp-hero-bg { position: absolute; inset: 0; z-index: -1; overflow: hidden; }

.lp-blob { position: absolute; border-radius: 50%; filter: blur(64px); will-change: transform; }
.lp-blob-a { width: 40vw; height: 40vw; max-width: 520px; max-height: 520px; top: -16%; inset-inline-start: -8%; background: radial-gradient(circle, rgba(255, 138, 61, 0.34), transparent 68%); animation: lp-drift-a 22s ease-in-out infinite; }
.lp-blob-b { width: 34vw; height: 34vw; max-width: 440px; max-height: 440px; top: 6%; inset-inline-end: -6%; background: radial-gradient(circle, rgba(26, 163, 146, 0.28), transparent 68%); animation: lp-drift-b 26s ease-in-out infinite; }
.lp-blob-c { width: 30vw; height: 30vw; max-width: 400px; max-height: 400px; bottom: -22%; inset-inline-start: 42%; background: radial-gradient(circle, rgba(134, 100, 216, 0.22), transparent 68%); animation: lp-drift-c 30s ease-in-out infinite; }
@keyframes lp-drift-a { 0%, 100% { transform: none; } 50% { transform: translate3d(5%, 7%, 0) scale(1.12); } }
@keyframes lp-drift-b { 0%, 100% { transform: none; } 50% { transform: translate3d(-6%, 6%, 0) scale(1.08); } }
@keyframes lp-drift-c { 0%, 100% { transform: none; } 50% { transform: translate3d(4%, -7%, 0) scale(1.1); } }

.lp-dots {
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(37, 35, 31, 0.07) 1px, transparent 1px);
  background-size: 24px 24px;
  mask-image: radial-gradient(120% 80% at 50% 10%, #000 6%, transparent 70%);
}

.lp-hero-inner {
  display: grid;
  grid-template-columns: minmax(0, 1.04fr) minmax(0, 1fr);
  align-items: center;
  gap: 46px;
  max-width: var(--lp-max);
  margin: 0 auto;
}
.lp-hero-copy > * { animation: lp-rise 0.7s var(--ease-soft, ease) both; }
.lp-hero-copy > *:nth-child(2) { animation-delay: 0.07s; }
.lp-hero-copy > *:nth-child(3) { animation-delay: 0.13s; }
.lp-hero-copy > *:nth-child(4) { animation-delay: 0.19s; }
.lp-hero-copy > *:nth-child(5) { animation-delay: 0.25s; }
@keyframes lp-rise { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }

.lp-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 14px 7px 12px;
  border: 1px solid color-mix(in srgb, var(--lp-green) 22%, var(--line));
  border-radius: 999px;
  background: #fff;
  color: var(--lp-green);
  font-size: 12px;
  font-weight: 800;
  box-shadow: var(--lp-card);
}
.lp-chip-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--lp-green);
  box-shadow: 0 0 0 3px rgba(18, 124, 68, 0.18);
  animation: lp-pulse 2.4s ease-in-out 3;
}
@keyframes lp-pulse { 0%, 100% { box-shadow: 0 0 0 3px rgba(18, 124, 68, 0.18); } 50% { box-shadow: 0 0 0 6px rgba(18, 124, 68, 0.04); } }

.lp-h1 {
  margin-top: 18px;
  font-size: clamp(30px, 4.5vw, 52px);
  font-weight: 900;
  line-height: 1.3;
  letter-spacing: -0.4px;
}
.lp-h1 em {
  position: relative;
  color: var(--lp-orange);
  white-space: nowrap;
}
/* زیرِ کلمهٔ کلیدی یک قلم‌خوردگیِ دست‌کشیده — همان لهجه‌ای که سایت‌های
   آموزشی برای تأکید می‌گذارند. */
.lp-h1 em::after {
  content: "";
  position: absolute;
  inset-inline: -2px;
  bottom: 0.03em;
  height: 0.2em;
  z-index: -1;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(251, 176, 59, 0.42), rgba(255, 138, 61, 0.28));
  animation: lp-underline 0.7s var(--ease-pop, ease) 0.5s both;
  transform-origin: right center;
}
@keyframes lp-underline { from { transform: scaleX(0); } to { transform: scaleX(1); } }

.lp-lead { max-width: 46ch; margin-top: 16px; color: var(--muted); font-size: clamp(14px, 1.5vw, 16px); line-height: 2.05; }
.lp-hero-cta { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 26px; }

.lp-trust { display: flex; flex-wrap: wrap; gap: 8px 18px; margin-top: 26px; padding-top: 20px; border-top: 1px solid var(--line); }
.lp-trust li { display: inline-flex; align-items: center; gap: 7px; color: var(--muted); font-size: 12px; font-weight: 700; }
.lp-trust-icon { width: 15px; height: 15px; flex: 0 0 15px; color: var(--lp-green); }

/* ───────────────────────── نمایشِ محصول در هیرو ───────────────────────── */

/* چیدمان: کارتِ کارنامه (بزرگ، سمتِ شروع) + ستونی از دو کارتِ کوچک کنارش.
   ⚠️ نسخهٔ اول این دو کارت را **روی** کارتِ اصلی شناور کرده بود؛ نتیجه این شد
   که رادار و ستونِ درصدها زیرشان دفن شدند. کارتِ دادهٔ متراکم جای هم‌پوشانی
   نیست — لایه‌بودن اینجا از سایه و شناوریِ ملایم می‌آید، نه از روی‌هم‌افتادن. */
.lp-art {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 168px;
  align-items: center;
  gap: 14px;
  animation: lp-rise 0.9s var(--ease-soft, ease) 0.16s both;
}
.lp-art-glow {
  position: absolute;
  inset: 4% -6%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 138, 61, 0.22), transparent 66%);
  filter: blur(44px);
}

.lp-art-card { position: relative; border: 1px solid var(--line); border-radius: 18px; background: #fff; box-shadow: 0 18px 44px rgba(41, 36, 29, 0.12); }
.lp-art-report { padding: 16px 16px 14px; }
.lp-art-side { display: grid; gap: 14px; }
.lp-art-side > * { padding: 12px; animation: lp-float 7s ease-in-out infinite; }
.lp-art-side > *:first-child { animation-delay: -1.4s; }
.lp-art-side > *:last-child { animation-delay: -3.8s; }
@keyframes lp-float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }

.lp-art-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 12px; }
.lp-art-title { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 800; }
.lp-art-icon { width: 14px; height: 14px; flex: 0 0 14px; color: var(--lp-orange); }
.lp-art-badge,
.lp-art-timer {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 8px;
  border-radius: 999px;
  background: var(--panel-soft);
  border: 1px solid var(--line);
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
}

.lp-art-body { display: grid; grid-template-columns: 132px minmax(0, 1fr); align-items: center; gap: 14px; }
.lp-radar-wrap { position: relative; aspect-ratio: 1; }
.lp-radar { width: 100%; height: 100%; overflow: visible; }
.lp-radar-ring { fill: none; stroke: var(--line); stroke-width: 0.6; }
.lp-radar-spoke { stroke: var(--line); stroke-width: 0.6; }
.lp-radar-cohort { fill: rgba(130, 126, 117, 0.09); stroke: #b8b3a8; stroke-width: 0.8; stroke-dasharray: 2.4 2; }
.lp-radar-mine {
  fill: rgba(255, 107, 24, 0.2);
  stroke: var(--lp-orange);
  stroke-width: 1.5;
  stroke-linejoin: round;
  transform-origin: 50% 50%;
  animation: lp-radar-in 1.1s var(--ease-pop, ease) 0.4s both;
}
.lp-radar-dot { fill: var(--lp-orange); animation: lp-radar-in 1.1s var(--ease-pop, ease) 0.55s both; transform-origin: 50% 50%; }
@keyframes lp-radar-in { from { opacity: 0; transform: scale(0.35); } to { opacity: 1; transform: scale(1); } }

.lp-art-bars { display: grid; gap: 9px; }
.lp-art-bars li { display: grid; grid-template-columns: 30px 28px minmax(0, 1fr); align-items: center; gap: 7px; font-size: 10.5px; font-weight: 700; }
.lp-bar-name { color: var(--muted); }
.lp-bar-value { color: var(--ink); }
.lp-bar-track { height: 6px; border-radius: 999px; background: #f0eee8; overflow: hidden; }
.lp-bar-track i {
  display: block;
  width: var(--lp-bar);
  height: 100%;
  border-radius: 999px;
  background: var(--lp-bar-color);
  transform-origin: right center; /* نوارها در RTL از راست پر می‌شوند */
  animation: lp-bar-grow 0.9s var(--ease-pop, ease) both;
  animation-delay: calc(0.5s + var(--lp-bar-i) * 0.09s);
}
@keyframes lp-bar-grow { from { transform: scaleX(0); } to { transform: scaleX(1); } }

.lp-art-foot { display: flex; align-items: center; gap: 16px; margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line); }
.lp-art-kpi { display: grid; gap: 1px; }
.lp-art-kpi b { font-size: 17px; font-weight: 900; }
.lp-art-kpi b i { margin-inline-start: 3px; font-size: 10px; font-style: normal; font-weight: 700; color: var(--muted); }
.lp-art-kpi small { color: var(--muted); font-size: 9.5px; }
.lp-art-delta {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-inline-start: auto;
  padding: 5px 9px;
  border-radius: 999px;
  background: var(--teal-soft);
  color: #0f7a6d;
  font-size: 10px;
  font-weight: 800;
}
.lp-delta-icon { width: 12px; height: 12px; flex: 0 0 12px; }

.lp-heat { display: grid; grid-template-columns: repeat(9, 1fr); gap: 3px; }
.lp-heat-cell { aspect-ratio: 1; border-radius: 3px; animation: lp-cell-in 0.5s ease both; animation-delay: calc(0.35s + var(--lp-cell-i) * 0.016s); }
@keyframes lp-cell-in { from { opacity: 0; transform: scale(0.5); } to { opacity: 1; transform: none; } }
.lp-heat-1 { background: #f3b4b4; }
.lp-heat-2 { background: #f7cf86; }
.lp-heat-3 { background: #86d6c9; }
.lp-heat-4 { background: #3fb87f; }
.lp-heat-legend { display: flex; align-items: center; gap: 6px; margin-top: 10px; color: var(--muted); font-size: 9.5px; }
.lp-heat-scale { flex: 1; height: 5px; border-radius: 999px; background: linear-gradient(to left, #f3b4b4, #f7cf86, #3fb87f); }

.lp-q-lines { display: grid; gap: 5px; }
.lp-q-lines i { height: 6px; border-radius: 999px; background: #f0eee8; }
.lp-q-options { display: grid; gap: 5px; margin-top: 10px; }
.lp-q-options li { display: flex; align-items: center; gap: 6px; padding: 5px 7px; border: 1px solid var(--line); border-radius: 8px; }
.lp-q-options li b {
  display: grid;
  place-items: center;
  width: 15px;
  height: 15px;
  flex: 0 0 15px;
  border-radius: 50%;
  background: #f0eee8;
  font-size: 8.5px;
  font-weight: 800;
}
.lp-q-options li i { height: 5px; border-radius: 999px; background: #f0eee8; }
.lp-q-options li.is-picked { border-color: color-mix(in srgb, var(--teal) 46%, var(--line)); background: var(--teal-soft); }
.lp-q-options li.is-picked b { background: var(--teal); color: #fff; }
.lp-q-check { width: 13px; height: 13px; flex: 0 0 13px; margin-inline-start: auto; color: var(--teal); }

/* ─────────────────────────── قالبِ بخش‌ها ─────────────────────────── */

.lp-sec { max-width: var(--lp-max); margin: 0 auto; padding: 84px 22px; }
.lp-sec-head { max-width: 660px; margin: 0 auto 38px; text-align: center; }
.lp-eyebrow {
  display: inline-block;
  margin-bottom: 12px;
  padding: 5px 12px;
  border-radius: 999px;
  background: var(--orange-soft);
  color: var(--lp-orange);
  font-size: 11.5px;
  font-weight: 800;
}
.lp-sec-head h2 { font-size: clamp(23px, 3.1vw, 35px); font-weight: 900; line-height: 1.45; letter-spacing: -0.3px; }
.lp-sec-head h2 em { color: var(--lp-orange); }
.lp-sec-head p { margin-top: 12px; color: var(--muted); font-size: 14.5px; line-height: 2; }
.lp-sec-head-start { margin: 0 0 26px; text-align: start; }

[data-lp-reveal] { opacity: 0; transform: translateY(22px); transition: opacity 0.6s var(--ease-soft, ease), transform 0.6s var(--ease-soft, ease); transition-delay: var(--lp-delay, 0ms); }
[data-lp-reveal].is-in { opacity: 1; transform: none; }

/* ─────────────────────────── بسته‌ها و قیمت ─────────────────────────── */

.lp-sec-packs { padding-top: 62px; }

.lp-pack-tabs {
  display: flex;
  gap: 6px;
  margin-bottom: 22px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: linear-gradient(180deg, #efece5, #faf8f4);
  box-shadow: var(--lp-sink);
  overflow-x: auto;
  scrollbar-width: none;
}
.lp-pack-tabs::-webkit-scrollbar { display: none; }
.lp-pack-tab {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  flex: 1;
  justify-content: center;
  min-height: 40px;
  padding: 0 16px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
  white-space: nowrap;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease;
}
.lp-pack-tab span {
  min-width: 20px;
  padding: 2px 6px;
  border-radius: 999px;
  background: #f0eee8;
  color: var(--muted);
  font-size: 10.5px;
  font-weight: 800;
}
.lp-pack-tab:hover { color: var(--ink); background: var(--panel-soft); }
.lp-pack-tab.is-active {
  background: linear-gradient(180deg, #ff8f4d, var(--lp-orange));
  color: #fff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.42), 0 2px 0 var(--lp-orange-edge), 0 8px 18px rgba(255, 107, 24, 0.32);
}
.lp-pack-tab.is-active span { background: rgba(255, 255, 255, 0.26); color: #fff; }

.lp-pack-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.lp-pack-grid.is-swapped > * { animation: lp-rise 0.42s var(--ease-pop, ease) both; }

.lp-pack {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 7px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: var(--lp-r);
  background: #fff;
  box-shadow: var(--lp-card);
  overflow: hidden;
  transition: transform 0.24s var(--ease-pop, ease), box-shadow 0.24s ease, border-color 0.24s ease;
}
/* هالهٔ رنگیِ گوشه از رنگِ خودِ محصول می‌آید؛ بدون آن همهٔ کارت‌ها یکسان‌اند. */
.lp-pack::before {
  content: "";
  position: absolute;
  top: -60px;
  inset-inline-end: -50px;
  width: 170px;
  height: 170px;
  border-radius: 50%;
  background: radial-gradient(circle, color-mix(in srgb, var(--pk) 22%, transparent), transparent 70%);
  pointer-events: none;
}
.lp-pack:hover { transform: translateY(-5px); border-color: color-mix(in srgb, var(--pk) 40%, var(--line)); box-shadow: var(--lp-card-hi); }

.lp-pack-free {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  align-self: flex-start;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--orange-soft);
  color: var(--lp-orange);
  font-size: 11px;
  font-weight: 800;
}
.lp-pack-free-icon { width: 13px; height: 13px; flex: 0 0 13px; }

.lp-pack-tile {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  margin-top: 4px;
  border-radius: 16px;
  background: color-mix(in srgb, var(--pk) 17%, #fff);
  color: var(--pk);
  transition: transform 0.24s var(--ease-pop, ease);
}
.lp-pack:hover .lp-pack-tile { transform: rotate(-6deg) scale(1.06); }
/* نشانِ محصول با mask رنگ می‌گیرد (توضیحِ چرایی کنارِ `landingPackGlyphHtml`). */
.lp-pack-glyph {
  width: 27px;
  height: 27px;
  background: var(--pk);
  -webkit-mask: var(--lp-mask) center / contain no-repeat;
  mask: var(--lp-mask) center / contain no-repeat;
}

.lp-pack h3 { margin-top: 4px; font-size: 17px; font-weight: 900; }
.lp-pack p { color: var(--muted); font-size: 12.5px; line-height: 1.95; }
.lp-pack-chips { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 2px; }
.lp-pack-chips li {
  padding: 3px 9px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--pk) 10%, #fff);
  color: color-mix(in srgb, var(--pk) 78%, #000);
  font-size: 11px;
  font-weight: 700;
}

.lp-pack-foot { display: flex; align-items: flex-end; gap: 10px; margin-top: auto; padding-top: 16px; }
.lp-pack-price { display: grid; gap: 2px; min-width: 0; }
.lp-pack-price small { color: var(--muted); font-size: 11px; font-weight: 700; }
.lp-pack-price span { display: flex; align-items: baseline; gap: 5px; }
.lp-pack-price del { font-size: 11.5px; }
/* مبلغ و واحدش هرگز نباید بشکنند یا آب بروند؛ دکمهٔ گردِ کنارشان اندازهٔ ثابت دارد. */
.lp-pack-price b, .lp-pack-price i { white-space: nowrap; }
.lp-pack-price b { font-size: clamp(17px, 4.4vw, 21px); font-weight: 900; letter-spacing: -0.3px; }
.lp-pack-price i { font-size: 11px; font-style: normal; font-weight: 700; color: var(--muted); }

.lp-pack-go {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  margin-inline-start: auto;
  border-radius: 50%;
  background: linear-gradient(180deg, #ff8f4d, var(--lp-orange));
  color: #fff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.45), 0 3px 0 var(--lp-orange-edge), 0 8px 18px rgba(255, 107, 24, 0.32);
  transition: transform 0.2s var(--ease-pop, ease), box-shadow 0.2s ease;
}
.lp-pack-go:hover { transform: translateY(-2px) scale(1.06); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.5), 0 5px 0 var(--lp-orange-edge), 0 14px 26px rgba(255, 107, 24, 0.4); }
.lp-pack-go:active { transform: translateY(2px); box-shadow: inset 0 2px 5px rgba(0, 0, 0, 0.22), 0 0 0 var(--lp-orange-edge); }
.lp-pack-go-icon { width: 19px; height: 19px; }

.lp-pack-off {
  position: absolute;
  top: 20px;
  inset-inline-end: 20px;
  padding: 3px 9px;
  border-radius: 999px;
  background: var(--red-soft);
  color: var(--red);
  font-size: 11px;
  font-weight: 800;
}
.lp-pack-more { margin-top: 20px; text-align: center; }

.lp-sk { display: block; border-radius: 8px; background: linear-gradient(90deg, var(--panel-soft), #f1efe9, var(--panel-soft)); background-size: 220% 100%; animation: lp-sk 1.3s linear infinite; }
.lp-sk-tile { width: 52px; height: 52px; border-radius: 16px; }
.lp-sk-title { width: 56%; height: 19px; margin-top: 12px; }
.lp-sk-line { height: 11px; margin-top: 9px; }
.lp-sk-price { width: 48%; height: 26px; margin-top: 26px; }
@keyframes lp-sk { from { background-position: 220% 0; } to { background-position: -20% 0; } }
.lp-pack.is-loading { pointer-events: none; }

/* ─────────────────────────── نوارِ آمار ─────────────────────────── */

.lp-stats { max-width: var(--lp-max); margin: 0 auto; padding: 0 22px; }
.lp-stats-list {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  border: 1px solid var(--line);
  border-radius: var(--lp-r);
  background: var(--line);
  box-shadow: var(--lp-card);
  overflow: hidden;
}
.lp-stat { display: grid; gap: 5px; padding: 22px 18px; background: #fff; text-align: center; }
.lp-stat strong { font-size: 32px; font-weight: 900; line-height: 1; }
.lp-stat strong span { margin-inline-start: 5px; font-size: 12px; font-weight: 800; color: var(--muted); }
.lp-stat small { color: var(--muted); font-size: 11.5px; line-height: 1.8; }
.lp-stat[data-lp-tone="orange"] strong { color: var(--lp-orange); }
.lp-stat[data-lp-tone="teal"] strong { color: var(--teal); }
.lp-stat[data-lp-tone="blue"] strong { color: var(--blue); }
.lp-stat[data-lp-tone="purple"] strong { color: var(--purple); }

/* ─────────────────────────── امکانات (بنتو) ─────────────────────────── */

.lp-bento { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.lp-feature {
  display: flex;
  flex-direction: column;
  gap: 9px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: var(--lp-r);
  background: #fff;
  box-shadow: var(--lp-card);
  transition: transform 0.24s var(--ease-pop, ease), box-shadow 0.24s ease, border-color 0.24s ease;
}
.lp-feature:hover { transform: translateY(-4px); border-color: color-mix(in srgb, var(--lp-accent) 34%, var(--line)); box-shadow: var(--lp-card-hi); }
.lp-feature:active { transform: translateY(-1px); box-shadow: var(--lp-card); }
.lp-feature-wide { grid-column: span 2; }
.lp-feature-tall { grid-row: span 2; }
.lp-feature h3 { font-size: 16.5px; font-weight: 900; }
.lp-feature p { color: var(--muted); font-size: 13.5px; line-height: 2.05; }

.lp-feature[data-lp-accent="orange"] { --lp-accent: var(--lp-orange); --lp-accent-soft: var(--orange-soft); }
.lp-feature[data-lp-accent="teal"] { --lp-accent: var(--teal); --lp-accent-soft: var(--teal-soft); }
.lp-feature[data-lp-accent="blue"] { --lp-accent: var(--blue); --lp-accent-soft: var(--blue-soft); }
.lp-feature[data-lp-accent="purple"] { --lp-accent: var(--purple); --lp-accent-soft: var(--purple-soft); }
.lp-feature[data-lp-accent="gold"] { --lp-accent: #c98a10; --lp-accent-soft: var(--yellow-soft); }
.lp-feature[data-lp-accent="green"] { --lp-accent: var(--lp-green); --lp-accent-soft: #e7f6ed; }
.lp-feature[data-lp-accent="red"] { --lp-accent: var(--red); --lp-accent-soft: var(--red-soft); }

.lp-feature-icon {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  margin-bottom: 4px;
  border-radius: 15px;
  background: var(--lp-accent-soft, var(--orange-soft));
  color: var(--lp-accent, var(--lp-orange));
  transition: transform 0.24s var(--ease-pop, ease);
}
.lp-feature:hover .lp-feature-icon { transform: rotate(-6deg) scale(1.06); }
.lp-feature-glyph { width: 24px; height: 24px; }

.lp-feature-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: auto; padding-top: 12px; }
.lp-feature-tags li {
  padding: 4px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--panel-soft);
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

/* تصویرِ کارتِ امکانات: تمام‌عرضِ کفِ کارت، با همان گوشهٔ گردِ خودِ کارت.
   حاشیهٔ منفی دقیقاً برابرِ padding کارت است، پس تصویر تا لبه می‌رود. */
.lp-feature-media {
  display: block;
  margin: 16px -24px -24px;
  border-top: 1px solid var(--line);
  border-radius: 0 0 calc(var(--lp-r) - 1px) calc(var(--lp-r) - 1px);
  background: var(--panel-soft);
  overflow: hidden;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9);
}
.lp-media-push { margin-top: auto; }
.lp-feature-media img {
  display: block;
  width: 100%;
  /* نسبتِ ثابت تا کارت‌های یک ردیف هم‌قد بمانند؛ برشِ لبهٔ پایین کم‌ضررترین
     برش برای اسکرین‌شاتِ رابط است، پس لنگر بالاست. */
  aspect-ratio: 16 / 9;
  object-fit: cover;
  object-position: center top;
  transition: transform 0.4s var(--ease-soft, ease);
}
.lp-feature:hover .lp-feature-media img { transform: scale(1.03); }
.lp-feature-tall .lp-feature-media img { aspect-ratio: 4 / 3; }

/* ماکتِ کشیده‌شده: نسبتش از خودِ viewBox می‌آید، پس نه aspect-ratio لازم دارد
   نه برش. قاعدهٔ سراسریِ آیکون‌ها روی ریشه‌اش خنثی می‌شود؛ هر شکلِ داخلش
   fill/stroke صریح دارد. */
.lp-feature-art > svg { display: block; width: 100%; height: auto; }
.lp-page svg.lp-feature-svg { fill: none; stroke: none; stroke-width: 0; }
.lp-feature-wide .lp-feature-media img { aspect-ratio: 21 / 9; }

.lp-extras { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin-top: 14px; }
.lp-extras li {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 13px 14px;
  border: 1px dashed var(--line);
  border-radius: var(--lp-r-sm);
  background: var(--panel-soft);
  font-size: 12.5px;
  font-weight: 700;
}
.lp-extra-icon { width: 17px; height: 17px; flex: 0 0 17px; color: var(--lp-green); }

/* ─────────────────────────── سه قدم ─────────────────────────── */

.lp-steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; position: relative; }
/* خطِ اتصالِ بین قدم‌ها: از پشتِ کارت‌ها رد می‌شود و روی موبایل برداشته می‌شود. */
.lp-steps::before {
  content: "";
  position: absolute;
  top: 48px;
  inset-inline: 14%;
  height: 2px;
  background: repeating-linear-gradient(to left, var(--line) 0 8px, transparent 8px 16px);
}
.lp-step {
  position: relative;
  display: grid;
  gap: 8px;
  padding: 26px 22px;
  border: 1px solid var(--line);
  border-radius: var(--lp-r);
  background: #fff;
  box-shadow: var(--lp-card);
  text-align: center;
  justify-items: center;
}
.lp-step-n {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: linear-gradient(180deg, #1c9d5c, var(--lp-green));
  color: #fff;
  font-size: 13px;
  font-weight: 900;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.3), 0 2px 0 #0b5730, 0 6px 14px rgba(18, 124, 68, 0.34);
}
.lp-step-icon { display: grid; place-items: center; width: 52px; height: 52px; border-radius: 16px; background: var(--orange-soft); color: var(--lp-orange); }
.lp-step-glyph { width: 25px; height: 25px; }
.lp-step h3 { font-size: 15.5px; font-weight: 900; }
.lp-step p { color: var(--muted); font-size: 13px; line-height: 2; }

/* ─────────────────────────── نوارِ تحلیل ─────────────────────────── */

.lp-band {
  background: linear-gradient(180deg, #fff 0%, #f4f7f5 42%, #eef4f0 100%);
  border-block: 1px solid var(--line);
}
.lp-band-inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 0.92fr);
  align-items: center;
  gap: 46px;
  max-width: var(--lp-max);
  margin: 0 auto;
  padding: 84px 22px;
}
.lp-an-list { display: grid; gap: 16px; margin-bottom: 26px; }
.lp-an-list li { display: flex; gap: 13px; }
.lp-an-icon {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  flex: 0 0 40px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: #fff;
  color: var(--lp-green);
  box-shadow: var(--lp-card);
}
.lp-an-glyph { width: 20px; height: 20px; }
.lp-an-list h3 { font-size: 14.5px; font-weight: 900; }
.lp-an-list p { margin-top: 4px; color: var(--muted); font-size: 13px; line-height: 1.95; }

.lp-hive-card { padding: 18px; border: 1px solid var(--line); border-radius: var(--lp-r); background: #fff; box-shadow: var(--lp-card-hi); }
.lp-hive { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
.lp-hive-cell {
  grid-column: span var(--lp-span, 1);
  display: grid;
  align-content: center;
  gap: 2px;
  min-height: 62px;
  padding: 10px;
  border-radius: 12px;
  animation: lp-cell-in 0.5s ease both;
  animation-delay: calc(var(--lp-cell-i) * 0.05s);
}
.lp-hive-cell b { font-size: 12px; font-weight: 800; color: #123a2a; }
.lp-hive-cell small { font-size: 10.5px; font-weight: 700; color: rgba(18, 58, 42, 0.66); }
.lp-hive-cell.lp-heat-1 b, .lp-hive-cell.lp-heat-2 b { color: #4a2408; }
.lp-hive-cell.lp-heat-1 small, .lp-hive-cell.lp-heat-2 small { color: rgba(74, 36, 8, 0.68); }
.lp-hive-foot { display: flex; align-items: center; gap: 6px; margin-top: 12px; color: var(--muted); font-size: 11px; }

/* ─────────────────────────── چرا ما ─────────────────────────── */

.lp-why { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.lp-why li {
  display: grid;
  gap: 8px;
  padding: 24px 22px;
  border: 1px solid var(--line);
  border-radius: var(--lp-r);
  background: linear-gradient(180deg, #fff, var(--panel-soft));
  justify-items: start;
}
.lp-why-icon { display: grid; place-items: center; width: 46px; height: 46px; border-radius: 15px; background: #e7f6ed; color: var(--lp-green); }
.lp-why-glyph { width: 23px; height: 23px; }
.lp-why h3 { font-size: 15px; font-weight: 900; }
.lp-why p { color: var(--muted); font-size: 13px; line-height: 2; }

/* ─────────────────────────── مخاطب‌های دیگر ─────────────────────────── */

.lp-aud-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.lp-aud {
  display: flex;
  flex-direction: column;
  gap: 9px;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: var(--lp-r);
  background: #fff;
  box-shadow: var(--lp-card);
  transition: transform 0.24s var(--ease-pop, ease), box-shadow 0.24s ease;
}
.lp-aud:hover { transform: translateY(-4px); box-shadow: var(--lp-card-hi); }
.lp-aud-icon { display: grid; place-items: center; width: 52px; height: 52px; border-radius: 16px; }
.lp-aud[data-lp-tone="teal"] .lp-aud-icon { background: var(--teal-soft); color: var(--teal); }
.lp-aud[data-lp-tone="blue"] .lp-aud-icon { background: var(--blue-soft); color: var(--blue); }
.lp-aud-glyph { width: 26px; height: 26px; }
.lp-aud h3 { margin-top: 4px; font-size: 17px; font-weight: 900; }
.lp-aud p { color: var(--muted); font-size: 13.5px; line-height: 2; }
.lp-aud ul { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-top: 6px; }
.lp-aud ul li { display: flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 700; }
.lp-aud-check { width: 15px; height: 15px; flex: 0 0 15px; color: var(--lp-green); }

/* ─────────────────────────── سؤال‌های متداول ─────────────────────────── */

.lp-faq { max-width: 780px; margin: 0 auto; display: grid; gap: 10px; }
.lp-faq-item { border: 1px solid var(--line); border-radius: var(--lp-r-sm); background: #fff; overflow: hidden; transition: border-color 0.2s ease, box-shadow 0.2s ease; }
.lp-faq-item[open] { border-color: color-mix(in srgb, var(--lp-green) 32%, var(--line)); box-shadow: var(--lp-card); }
.lp-faq-item summary {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 17px 20px;
  cursor: pointer;
  font-size: 14.5px;
  font-weight: 800;
  list-style: none;
}
.lp-faq-item summary::-webkit-details-marker { display: none; }
.lp-faq-chevron { width: 18px; height: 18px; flex: 0 0 18px; margin-inline-start: auto; color: var(--muted); transition: transform 0.22s ease; }
.lp-faq-item[open] .lp-faq-chevron { transform: rotate(180deg); color: var(--lp-green); }
.lp-faq-body { padding: 0 20px 18px; }
.lp-faq-body p { color: var(--muted); font-size: 13.5px; line-height: 2.15; }

/* ─────────────────────────── CTA پایانی ─────────────────────────── */

.lp-cta { padding: 0 22px 30px; }
.lp-cta-inner {
  position: relative;
  isolation: isolate;
  max-width: var(--lp-max);
  margin: 0 auto;
  padding: 66px 26px;
  border-radius: 30px;
  background: linear-gradient(120deg, #ff6b18 0%, #ff8a3d 46%, var(--lp-gold) 100%);
  color: #fff;
  text-align: center;
  overflow: hidden;
  box-shadow: 0 24px 60px rgba(255, 107, 24, 0.24);
}
.lp-cta-glow {
  position: absolute;
  inset: -40% -10% auto;
  height: 130%;
  z-index: -1;
  background: radial-gradient(60% 60% at 26% 22%, rgba(255, 255, 255, 0.34), transparent 62%);
}
.lp-cta h2 { font-size: clamp(24px, 3.4vw, 37px); font-weight: 900; line-height: 1.4; }
.lp-cta p { margin-top: 12px; color: rgba(255, 255, 255, 0.88); font-size: 14.5px; line-height: 2; }
.lp-cta .lp-hero-cta { justify-content: center; }

/* ─────────────────────────── فوتر ─────────────────────────── */

.lp-foot { background: linear-gradient(180deg, var(--lp-green-deep), var(--lp-green-ink)); color: var(--lp-on-dark-2); }
.lp-foot-inner {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 2fr);
  gap: 40px;
  max-width: var(--lp-max);
  margin: 0 auto;
  padding: 52px 22px 32px;
}
.lp-foot-brand p { margin-top: 14px; max-width: 34ch; font-size: 12.5px; line-height: 2.1; color: var(--lp-on-dark-3); }
.lp-foot-cols { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 26px; }
.lp-foot-col h4 { margin-bottom: 12px; color: var(--lp-on-dark); font-size: 13px; font-weight: 900; }
.lp-foot-col ul { display: grid; gap: 9px; }
.lp-foot-col a { font-size: 12.5px; transition: color 0.16s ease; }
.lp-foot-col a:hover { color: var(--lp-gold); }
.lp-foot-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: space-between;
  max-width: var(--lp-max);
  margin: 0 auto;
  padding: 16px 22px 26px;
  border-top: 1px solid var(--lp-hair);
  color: var(--lp-on-dark-3);
  font-size: 11.5px;
}

/* ══════════════ سطح‌های برجسته (حسِ سه‌بعدیِ کلِ صفحه) ══════════════
   دستورش بالای فایل کنارِ `--lp-card` نوشته شده. اینجا فقط اعمال می‌شود.
   ⚠️ رنگِ رویه با `background-image` گذاشته می‌شود نه `background`: هر کارت
   قاعدهٔ رنگِ خودش را دارد و شورت‌هند آن را پاک می‌کند. */

/* رویهٔ کارت‌ها: به‌جای سفیدِ تخت، یک شیبِ خیلی ملایم که لبهٔ بالا را روشن‌تر
   نگه می‌دارد — همان چیزی که چشم آن را «برجسته» می‌خواند. */
.lp-feature,
.lp-pack,
.lp-aud,
.lp-step,
.lp-stat,
.lp-faq-item,
.lp-art-card,
.lp-hive-card { background-image: var(--lp-face); }

/* کاشیِ آیکون‌ها = کلیدِ کوچکِ برجسته. با هاورِ کارت یک پله بالاتر می‌آید. */
.lp-feature-icon,
.lp-step-icon,
.lp-why-icon,
.lp-aud-icon,
.lp-pack-tile,
.lp-an-icon {
  background-image: linear-gradient(180deg, rgba(255, 255, 255, 0.55), rgba(0, 0, 0, 0.05));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.95), 0 2px 0 rgba(41, 36, 29, 0.06), 0 7px 14px rgba(41, 36, 29, 0.1);
}
.lp-feature:hover .lp-feature-icon,
.lp-aud:hover .lp-aud-icon,
.lp-pack:hover .lp-pack-tile {
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.95), 0 3px 0 rgba(41, 36, 29, 0.06), 0 12px 22px rgba(41, 36, 29, 0.13);
}

/* پیل‌ها و برچسب‌ها: یک پخِ نازک کافی است تا روی کارت شناور دیده شوند. */
.lp-eyebrow,
.lp-pack-free,
.lp-pack-off,
.lp-pack-chips li,
.lp-feature-tags li,
.lp-art-badge,
.lp-art-timer,
.lp-art-delta,
.lp-extras li { box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.85), 0 1px 0 rgba(41, 36, 29, 0.07); }

/* «بقیهٔ امکانات» از کادرِ خط‌چین به صفحه‌های کوچکِ برجسته تبدیل شد. */
.lp-extras li {
  border-style: solid;
  background-image: var(--lp-face);
  transition: transform 0.2s var(--ease-pop, ease), box-shadow 0.2s ease;
}
.lp-extras li:hover { transform: translateY(-2px); box-shadow: inset 0 1px 0 #fff, 0 3px 0 var(--lp-edge), 0 10px 18px rgba(41, 36, 29, 0.09); }

/* سطح‌های فرورفته: مسیرِ نوارها و جای‌نگهدارهای متنِ نمونه. */
.lp-bar-track,
.lp-q-lines i,
.lp-q-options li i { box-shadow: var(--lp-sink); }
.lp-bar-track i { box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.45); }
.lp-q-options li { background-image: var(--lp-face); box-shadow: inset 0 1px 0 #fff, 0 1px 0 rgba(41, 36, 29, 0.05); }
.lp-q-options li b { box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7), 0 1px 0 rgba(41, 36, 29, 0.06); }

/* خانه‌های نقشهٔ مباحث و لانهٔ زنبوری: پخِ نازک تا از کاغذ جدا شوند. */
.lp-heat-cell,
.lp-hive-cell { box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.5), inset 0 -1px 0 rgba(0, 0, 0, 0.07); }
.lp-heat-scale { box-shadow: var(--lp-sink); }

/* نوارِ تحلیل کمی در صفحه فرو رفته تا از بخش‌های بالا و پایینش جدا شود. */
.lp-band { box-shadow: inset 0 8px 16px -12px rgba(41, 36, 29, 0.28), inset 0 -8px 16px -12px rgba(41, 36, 29, 0.28); }

/* کارتِ بازِ پرسش‌ها یک پله بالاتر می‌آید. */
.lp-faq-item[open] { box-shadow: var(--lp-card-hi); }
.lp-faq-item summary:hover { background-image: linear-gradient(180deg, rgba(41, 36, 29, 0.03), transparent); }

/* CTA پایانی = همان دکمه، در ابعادِ یک نوار. */
.lp-cta-inner {
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.45),
    inset 0 -2px 0 rgba(0, 0, 0, 0.08),
    0 4px 0 var(--lp-orange-edge),
    0 26px 58px rgba(255, 107, 24, 0.3);
}

/* هدر و فوتر: لبهٔ نورِ بالا و عمقِ داخلی. */
.lp-head { box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9); }
.lp-head.is-stuck { box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9), 0 10px 26px rgba(41, 36, 29, 0.08); }
.lp-foot { box-shadow: inset 0 4px 12px rgba(0, 0, 0, 0.24); }

/* ─────────────────────────── واکنش‌گرایی ─────────────────────────── */

@media (max-width: 1080px) {
  .lp-hero-inner { grid-template-columns: 1fr; gap: 54px; }
  .lp-hero-copy { max-width: 640px; }
  .lp-art { max-width: 520px; margin: 0 auto; }
  .lp-band-inner { grid-template-columns: 1fr; gap: 34px; }
  .lp-nav { display: none; }
  .lp-why { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 900px) {
  .lp-bento { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .lp-feature-tall { grid-row: auto; }
  .lp-extras { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .lp-stats-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .lp-pack-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .lp-steps { grid-template-columns: 1fr; }
  .lp-steps::before { display: none; }
  .lp-aud-grid { grid-template-columns: 1fr; }
  .lp-foot-inner { grid-template-columns: 1fr; gap: 30px; }
}

@media (max-width: 760px) {
  .lp-head-actions { display: none; }
  .lp-burger { display: flex; }
  .lp-hero { padding: 44px 18px 62px; }
  .lp-sec { padding: 58px 18px; }
  .lp-band-inner { padding: 58px 18px; }
  .lp-bento { grid-template-columns: 1fr; }
  .lp-feature-wide { grid-column: auto; }
  .lp-pack-grid { grid-template-columns: 1fr; }
  .lp-pack-tab { flex: 0 0 auto; }
  .lp-art { grid-template-columns: 1fr; }
  .lp-art-side { grid-template-columns: 1fr 1fr; }
  .lp-art-side > * { animation: none; }
  .lp-art-body { grid-template-columns: 1fr; }
  .lp-radar-wrap { width: min(210px, 66%); margin: 0 auto 6px; }
  .lp-stat { padding: 16px 12px; }
  .lp-stat strong { font-size: 26px; }
  .lp-why { grid-template-columns: 1fr; }
  .lp-aud ul { grid-template-columns: 1fr; }
  .lp-cta { padding: 0 14px 16px; }
  .lp-cta-inner { padding: 50px 20px; border-radius: 24px; }
  .lp-trust { gap: 8px 14px; }
}

@media (max-width: 460px) {
  .lp-stats-list { grid-template-columns: 1fr; }
  .lp-extras { grid-template-columns: 1fr; }
  .lp-hero-cta .lp-btn { flex: 1; }
}

@media (prefers-reduced-motion: reduce) {
  .lp-page *,
  .lp-page *::before,
  .lp-page *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
  [data-lp-reveal] { opacity: 1; transform: none; }
  .lp-h1 em::after { transform: none; }
}

/* ═══════════════════════════ مرکز راهنما (/راهنما) ═══════════════════════════
   پوستهٔ صفحه همان `store-public` است (نوار بالا، پانویس، پهنا) و `hdoc-*`
   فقط تفاوت‌های خودِ راهنما را می‌گیرد: سه‌ستونیِ سایدبار / متن / فهرستِ صفحه.
   ⚠️ آیکون‌ها با `icon()` ساخته می‌شوند و کلاس `ui-icon` دارند، پس قاعدهٔ
   سراسریِ `fill:none; stroke:currentColor` رویشان هست — کلاس `hdoc-*` روی
   خودِ `<svg>` نگذارید وگرنه لکهٔ سیاهِ توپر می‌شوند. */
.hdoc-public { background: radial-gradient(circle at 88% 0%, rgba(70, 118, 232, .07), transparent 30rem), var(--bg); }

.hdoc-shell {
  display: grid;
  grid-template-columns: 250px minmax(0, 1fr) 214px;
  gap: 30px;
  width: 100%;
  max-width: 1340px;
  margin: 0 auto;
  padding: 24px 26px 56px;
  align-items: start;
}
/* بدونِ ستونِ فهرست (هاب، بخش، نتیجهٔ جست‌وجو) متن پهن‌تر می‌شود، نه اینکه یک
   ستونِ خالی جا بگیرد. */
.hdoc-shell:not(:has(.hdoc-toc)) { grid-template-columns: 250px minmax(0, 1fr); }

/* ── سایدبار ─────────────────────────────────────────────────────────────── */
.hdoc-side {
  position: sticky; top: 74px;
  max-height: calc(100vh - 96px);
  overflow: auto;
  overscroll-behavior: contain;
  padding-inline-end: 4px;
}
.hdoc-search {
  display: flex; align-items: center; gap: 8px;
  padding: 0 10px; margin-bottom: 14px;
  background: var(--panel); border: 1px solid var(--line);
  border-radius: 12px; box-shadow: var(--shadow);
  position: sticky; top: 0; z-index: 2;
}
.hdoc-search .ui-icon { width: 16px; height: 16px; color: var(--muted); flex: 0 0 16px; }
.hdoc-search input {
  flex: 1 1 auto; min-width: 0; border: 0; background: none; outline: none;
  padding: 10px 0; font: inherit; font-size: 12.5px; color: var(--ink);
}
.hdoc-search input::-webkit-search-cancel-button { display: none; }

.hdoc-tree { display: grid; gap: 4px; }
.hdoc-tree-head {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 10px; border-radius: 10px;
  font-size: 12.5px; font-weight: 800; color: var(--ink); text-decoration: none;
}
.hdoc-tree-head:hover { background: var(--panel-soft); }
.hdoc-tree-head .ui-icon { width: 15px; height: 15px; color: var(--muted); flex: 0 0 15px; }
.hdoc-tree-head span { flex: 1 1 auto; min-width: 0; }
.hdoc-tree-head em {
  font-style: normal; font-size: 10px; font-weight: 800; color: var(--muted);
  background: var(--panel-soft); border: 1px solid var(--line);
  border-radius: 999px; padding: 1px 6px;
}
.hdoc-tree-group.open > .hdoc-tree-head { color: var(--orange); }
.hdoc-tree-group.open > .hdoc-tree-head .ui-icon { color: var(--orange); }
/* فقط شاخهٔ باز فهرستِ مقاله‌هایش را نشان می‌دهد؛ ۵۶ ردیفِ همیشه‌باز سایدبار را
   به یک دیوارِ متن تبدیل می‌کرد. */
.hdoc-tree-list { display: none; margin: 2px 0 8px; padding: 0 6px 0 0; list-style: none; }
.hdoc-tree-group.open .hdoc-tree-list { display: block; }
.hdoc-tree-item {
  display: block; padding: 6px 12px 6px 8px;
  border-inline-start: 2px solid var(--line);
  font-size: 12px; line-height: 1.85; color: var(--muted); text-decoration: none;
}
.hdoc-tree-item:hover { color: var(--ink); border-inline-start-color: var(--rb-border); }
.hdoc-tree-item.on {
  color: var(--orange); font-weight: 800;
  border-inline-start-color: var(--orange);
  background: var(--orange-soft);
  border-radius: 0 8px 8px 0;
}

/* ── ستون متن ────────────────────────────────────────────────────────────── */
.hdoc-main { min-width: 0; }
.hdoc-crumbs {
  display: flex; align-items: center; flex-wrap: wrap; gap: 4px;
  margin-bottom: 14px; font-size: 11px; color: var(--muted);
}
.hdoc-crumbs a { color: var(--muted); text-decoration: none; }
.hdoc-crumbs a:hover { color: var(--orange); }
.hdoc-crumbs .ui-icon { width: 12px; height: 12px; opacity: .6; }
.hdoc-crumbs span[aria-current] { color: var(--ink); font-weight: 800; }

.hdoc-hero {
  background: var(--panel); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 26px 24px; margin-bottom: 20px;
}
.hdoc-hero.compact { padding: 20px 22px; }
.hdoc-hero h1 { margin: 0 0 8px; font-size: 22px; font-weight: 900; line-height: 1.7; }
.hdoc-hero.compact h1 { font-size: 19px; }
.hdoc-hero p { margin: 0; font-size: 13px; line-height: 2.1; color: var(--muted); max-width: 70ch; }
.hdoc-hero small { display: block; margin-top: 10px; font-size: 11px; color: var(--muted); }
.hdoc-hero-icon {
  display: grid; place-items: center; width: 44px; height: 44px;
  border-radius: 14px; background: var(--orange-soft); color: var(--orange); margin-bottom: 12px;
}
.hdoc-hero-icon .ui-icon { width: 22px; height: 22px; }

.hdoc-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 14px; }
.hdoc-card {
  display: grid; gap: 6px; align-content: start;
  padding: 18px 18px 16px; text-decoration: none; color: inherit;
  background: var(--panel); border: 1px solid var(--line);
  border-radius: 16px; box-shadow: var(--shadow);
  transition: transform var(--motion-fast) var(--ease-pop), border-color var(--motion-fast);
}
.hdoc-card:hover { transform: translateY(-2px); border-color: var(--orange); }
.hdoc-card-icon {
  display: grid; place-items: center; width: 38px; height: 38px;
  border-radius: 12px; background: var(--blue-soft); color: var(--blue); margin-bottom: 4px;
}
.hdoc-card-icon .ui-icon { width: 19px; height: 19px; }
.hdoc-card b { font-size: 14px; font-weight: 900; }
.hdoc-card small { font-size: 11.5px; line-height: 1.95; color: var(--muted); }
.hdoc-card em { font-style: normal; font-size: 10.5px; font-weight: 800; color: var(--orange); margin-top: 4px; }

.hdoc-list { display: grid; gap: 8px; }
.hdoc-list-row {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 16px; text-decoration: none; color: inherit;
  background: var(--panel); border: 1px solid var(--line);
  border-radius: 14px; box-shadow: var(--shadow);
}
.hdoc-list-row:hover { border-color: var(--orange); }
.hdoc-list-num {
  display: grid; place-items: center; width: 26px; height: 26px; flex: 0 0 26px;
  border-radius: 9px; background: var(--panel-soft); border: 1px solid var(--line);
  font-size: 11px; font-weight: 900; color: var(--muted);
}
.hdoc-list-main { display: grid; gap: 3px; flex: 1 1 auto; min-width: 0; }
.hdoc-list-main em { font-style: normal; font-size: 10px; font-weight: 800; color: var(--orange); }
.hdoc-list-main b { font-size: 13px; font-weight: 800; }
.hdoc-list-main small { font-size: 11.5px; line-height: 1.9; color: var(--muted); }
.hdoc-list-row > .ui-icon { width: 15px; height: 15px; color: var(--muted); flex: 0 0 15px; }

/* ── بدنهٔ مقاله ──────────────────────────────────────────────────────────── */
.hdoc-article {
  background: var(--panel); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 30px 30px 34px;
}
.hdoc-article h1 { margin: 0 0 10px; font-size: 24px; font-weight: 900; line-height: 1.7; }
.hdoc-lead {
  margin: 0 0 22px; padding-bottom: 18px; border-bottom: 1px solid var(--line);
  font-size: 13.5px; line-height: 2.15; color: var(--muted);
}
.hdoc-body { font-size: 13.5px; line-height: 2.25; color: var(--ink); }
.hdoc-body > *:first-child { margin-top: 0; }
.hdoc-body p { margin: 0 0 16px; }
/* تیترِ بخش عمداً پررنگ و رنگی است: مقالهٔ راهنما را کسی از بالا تا پایین
   نمی‌خواند، اسکن می‌کند — تیتر باید از دور دیده شود. */
.hdoc-body h2 {
  margin: 36px 0 14px; padding-top: 8px; font-size: 19px; font-weight: 900;
  color: var(--orange); line-height: 1.75; scroll-margin-top: 84px;
}
.hdoc-body h2::after {
  content: ""; display: block; width: 34px; height: 3px; margin-top: 8px;
  border-radius: 3px; background: var(--orange); opacity: .35;
}
.hdoc-body h3 { margin: 28px 0 10px; font-size: 15px; font-weight: 900; color: var(--rb-navy); scroll-margin-top: 84px; }
.hdoc-body h4 { margin: 20px 0 8px; font-size: 13px; font-weight: 800; color: var(--muted); }
.hdoc-body ul, .hdoc-body ol { margin: 0 0 16px; padding-inline-start: 22px; }
.hdoc-body li { margin-bottom: 7px; }
.hdoc-body li::marker { color: var(--orange); font-weight: 800; }
.hdoc-body a { color: var(--orange); font-weight: 700; text-decoration: none; border-bottom: 1px solid rgba(255, 107, 24, .3); }
.hdoc-body a:hover { border-bottom-color: var(--orange); }
.hdoc-body strong { font-weight: 900; }
.hdoc-body code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .88em;
  background: var(--panel-soft); border: 1px solid var(--line);
  border-radius: 6px; padding: 1px 5px; direction: ltr; display: inline-block;
}
.hdoc-body kbd {
  font-family: inherit; font-size: .85em; font-weight: 800;
  background: var(--panel-soft); border: 1px solid var(--line);
  border-bottom-width: 2px; border-radius: 6px; padding: 1px 6px; direction: ltr; display: inline-block;
}
.hdoc-body pre {
  margin: 0 0 16px; padding: 14px 16px; overflow-x: auto;
  background: var(--rb-navy); color: #eef2f6; border-radius: 12px;
  font-size: 12px; line-height: 1.9;
}
.hdoc-body pre code { background: none; border: 0; padding: 0; color: inherit; }
.hdoc-body hr { margin: 26px 0; border: 0; border-top: 1px solid var(--line); }
.hdoc-body img { max-width: 100%; border-radius: 12px; border: 1px solid var(--line); }

/* جدول عریض داخل ظرفِ خودش اسکرول می‌خورد؛ بدنهٔ صفحه هرگز افقی نمی‌شود. */
.hdoc-table-wrap { overflow-x: auto; margin: 0 0 18px; border: 1px solid var(--line); border-radius: 12px; }
.hdoc-body table { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.hdoc-body th, .hdoc-body td { padding: 9px 12px; text-align: start; border-bottom: 1px solid var(--line); }
.hdoc-body th { background: var(--panel-soft); font-weight: 900; white-space: nowrap; }
.hdoc-body tr:last-child td { border-bottom: 0; }

.hdoc-callout {
  display: grid; gap: 4px; margin: 0 0 18px; padding: 14px 16px;
  border: 1px solid var(--line); border-inline-start-width: 3px;
  border-radius: 12px; background: var(--panel-soft); font-size: 12.5px; line-height: 2.1;
}
.hdoc-callout p { margin: 0; }
.hdoc-callout-label { display: block; font-size: 11.5px; font-weight: 900; }
.hdoc-callout.tip { background: var(--teal-soft); border-color: var(--teal); }
.hdoc-callout.tip .hdoc-callout-label { color: var(--teal); }
.hdoc-callout.warn { background: var(--yellow-soft); border-color: var(--yellow); }
.hdoc-callout.warn .hdoc-callout-label { color: #a97c14; }
.hdoc-callout.important { background: var(--red-soft); border-color: var(--red); }
.hdoc-callout.important .hdoc-callout-label { color: var(--red); }
.hdoc-callout.example { background: var(--blue-soft); border-color: var(--blue); }
.hdoc-callout.example .hdoc-callout-label { color: var(--blue); }

/* ── تصویر، ویدیو و گام‌به‌گام ────────────────────────────────────────────── */
.hdoc-figure {
  margin: 0 0 20px; padding: 0;
  border: 1px solid var(--line); border-radius: 14px; overflow: hidden;
  background: var(--panel-soft); box-shadow: var(--shadow);
}
.hdoc-figure img, .hdoc-figure video { display: block; width: 100%; height: auto; border: 0; border-radius: 0; }
.hdoc-figure figcaption {
  padding: 9px 14px; border-top: 1px solid var(--line);
  background: var(--panel); font-size: 11.5px; line-height: 1.95; color: var(--muted);
}
/* تصویرِ «wide» از ستونِ متن بیرون می‌زند تا اسکرین‌شاتِ کلِ صفحه خوانا بماند. */
@media (min-width: 861px) {
  .hdoc-figure.wide { margin-inline: -14px; }
}
.hdoc-video video { background: #10161d; aspect-ratio: 16 / 9; }

.hdoc-steps {
  margin: 0 0 22px; padding: 18px 20px 8px;
  background: var(--panel-soft); border: 1px solid var(--line);
  border-radius: 14px;
}
.hdoc-steps-title { display: block; margin-bottom: 12px; font-size: 13px; font-weight: 900; color: var(--rb-navy); }
/* شمارهٔ گام یک نشانِ گرد است، نه یک عدد کنارِ متن: چشم موقع اجرای گام‌به‌گام
   باید بتواند بدون خواندن، جای خودش را پیدا کند. */
.hdoc-steps ol { margin: 0; padding: 0; list-style: none; counter-reset: hdocstep; }
.hdoc-steps ol > li {
  position: relative; margin: 0 0 14px; padding-inline-start: 38px;
  counter-increment: hdocstep;
}
.hdoc-steps ol > li::before {
  content: counter(hdocstep, persian); position: absolute; inset-inline-start: 0; top: 1px;
  display: grid; place-items: center; width: 26px; height: 26px;
  border-radius: 9px; background: var(--orange); color: #fff;
  font-size: 12px; font-weight: 900; font-variant-numeric: tabular-nums;
}
.hdoc-steps ol > li::marker { content: none; }
.hdoc-steps .hdoc-figure { margin-top: 10px; }
.hdoc-steps > *:last-child { margin-bottom: 12px; }

/* ── قبلی / بعدی ─────────────────────────────────────────────────────────── */
.hdoc-siblings { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 18px; }
.hdoc-sibling {
  display: grid; gap: 4px; padding: 14px 16px; text-decoration: none; color: inherit;
  background: var(--panel); border: 1px solid var(--line); border-radius: 14px;
}
.hdoc-sibling.ghost { background: none; border: 0; }
.hdoc-sibling:not(.ghost):hover { border-color: var(--orange); }
.hdoc-sibling small { font-size: 10.5px; font-weight: 800; color: var(--muted); }
.hdoc-sibling b { font-size: 12.5px; font-weight: 800; }
.hdoc-sibling.next { text-align: start; }
.hdoc-sibling.prev { text-align: end; }

/* ── فهرستِ داخلِ صفحه ────────────────────────────────────────────────────── */
.hdoc-toc { position: sticky; top: 74px; max-height: calc(100vh - 96px); overflow: auto; }
.hdoc-toc h2 { margin: 0 0 10px; font-size: 11px; font-weight: 900; color: var(--muted); }
.hdoc-toc ul { margin: 0; padding: 0; list-style: none; border-inline-start: 2px solid var(--line); }
.hdoc-toc li a {
  display: block; padding: 5px 12px; font-size: 11.5px; line-height: 1.85;
  color: var(--muted); text-decoration: none;
}
.hdoc-toc li.lvl-3 a { padding-inline-start: 22px; font-size: 11px; }
.hdoc-toc li a:hover { color: var(--orange); }

/* ── حالت‌های خالی و بارگذاری ─────────────────────────────────────────────── */
.hdoc-loading, .hdoc-empty {
  display: grid; justify-items: center; align-content: center; gap: 10px;
  min-height: 46vh; padding: 40px 20px; text-align: center; color: var(--muted);
}
.hdoc-loading .ui-icon, .hdoc-empty .ui-icon { width: 30px; height: 30px; }
.hdoc-loading .ui-icon { animation: hdoc-spin 1s linear infinite; }
@keyframes hdoc-spin { to { transform: rotate(360deg); } }
.hdoc-empty h2 { margin: 0; font-size: 16px; font-weight: 900; color: var(--ink); }
.hdoc-empty p { margin: 0; max-width: 46ch; font-size: 12.5px; line-height: 2; }

.hdoc-side-toggle { display: none; }

@media (max-width: 1120px) {
  /* ستونِ فهرستِ صفحه اول از دست می‌رود؛ متن مهم‌تر از میان‌بر است. */
  .hdoc-shell, .hdoc-shell:not(:has(.hdoc-toc)) { grid-template-columns: 240px minmax(0, 1fr); }
  .hdoc-toc { display: none; }
}
@media (max-width: 860px) {
  .hdoc-shell, .hdoc-shell:not(:has(.hdoc-toc)) { grid-template-columns: minmax(0, 1fr); gap: 16px; padding: 16px 14px 40px; }
  /* سایدبار روی موبایل با دکمهٔ «فهرست» باز می‌شود و در جریانِ صفحه می‌ماند
     (نه کشویی روی محتوا)، تا بستنش یک کلیک بیشتر لازم نداشته باشد. */
  .hdoc-side { display: none; position: static; max-height: none; }
  .hdoc-public.side-open .hdoc-side { display: block; }
  .hdoc-side-toggle { display: inline-flex; }
  .hdoc-hide-sm { display: none; }
  .hdoc-article { padding: 22px 18px 26px; }
  .hdoc-article h1 { font-size: 20px; }
  .hdoc-siblings { grid-template-columns: 1fr; }
}

/* ═══════════════════════ ویرایشگر راهنما (پنل مدیریت) ═══════════════════════
   دو ستون: فهرست بخش‌ها/مقاله‌ها و خودِ ویرایشگر. پیش‌نمایش عمداً کلاس
   `.hdoc-body` می‌گیرد تا **دقیقاً** همان چیزی دیده شود که روی سایت می‌نشیند —
   دو استایلِ موازی یعنی نویسنده چیزی ببیند که کاربر نمی‌بیند. */
.hda-shell {
  display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 18px; align-items: start;
}
.hda-tree {
  position: sticky; top: 84px; max-height: calc(100vh - 110px); overflow: auto;
  display: grid; gap: 10px; padding-inline-end: 4px;
}
.hda-group {
  background: var(--panel); border: 1px solid var(--line);
  border-radius: 14px; box-shadow: var(--shadow); padding: 10px 10px 8px;
}
.hda-group-head { display: flex; align-items: center; gap: 7px; margin-bottom: 6px; }
.hda-group-head .ui-icon { width: 15px; height: 15px; color: var(--muted); flex: 0 0 15px; }
.hda-group-head b { flex: 1 1 auto; min-width: 0; font-size: 12.5px; font-weight: 900; }
.hda-group-head em {
  font-style: normal; font-size: 10px; font-weight: 800; color: var(--muted);
  background: var(--panel-soft); border: 1px solid var(--line); border-radius: 999px; padding: 1px 6px;
}
/* ابزارِ ردیف فقط با هاور می‌آید: چهار دکمه روی هر ردیف، فهرست را به یک
   دیوارِ آیکون تبدیل می‌کرد. */
.hda-group-tools, .hda-article-tools { display: flex; gap: 2px; opacity: 0; transition: opacity var(--motion-fast); }
.hda-group:hover .hda-group-tools, .hda-article:hover .hda-article-tools,
.hda-group:focus-within .hda-group-tools, .hda-article:focus-within .hda-article-tools { opacity: 1; }
.hda-icon {
  display: grid; place-items: center; width: 22px; height: 22px;
  border: 0; background: none; border-radius: 7px; cursor: pointer; color: var(--muted);
}
.hda-icon:hover:not(:disabled) { background: var(--panel-soft); color: var(--ink); }
.hda-icon:disabled { opacity: .3; cursor: default; }
.hda-icon.danger:hover:not(:disabled) { background: var(--red-soft); color: var(--red); }
.hda-icon .ui-icon { width: 13px; height: 13px; }

.hda-articles { margin: 0 0 6px; padding: 0; list-style: none; }
.hda-article { display: flex; align-items: center; gap: 4px; border-radius: 8px; }
.hda-article:hover { background: var(--panel-soft); }
.hda-article.on { background: var(--orange-soft); }
.hda-article-open {
  flex: 1 1 auto; min-width: 0; display: flex; align-items: center; gap: 6px;
  border: 0; background: none; cursor: pointer; text-align: start;
  padding: 6px 8px; font: inherit; font-size: 11.5px; color: var(--ink);
}
.hda-article-open span { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hda-article.on .hda-article-open { color: var(--orange); font-weight: 800; }
.hda-article-open em {
  font-style: normal; font-size: 9.5px; font-weight: 800; color: var(--yellow);
  background: var(--yellow-soft); border-radius: 999px; padding: 1px 5px;
}
.hda-add-article {
  display: flex; align-items: center; gap: 5px; width: 100%;
  border: 1px dashed var(--line); background: none; border-radius: 9px;
  padding: 6px 8px; cursor: pointer; font: inherit; font-size: 11px; color: var(--muted);
}
.hda-add-article:hover { border-color: var(--orange); color: var(--orange); }
.hda-add-article .ui-icon { width: 12px; height: 12px; }

/* ── ویرایشگر ────────────────────────────────────────────────────────────── */
.hda-main { min-width: 0; }
.hda-editor {
  background: var(--panel); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow); padding: 18px 20px 16px;
  display: grid; gap: 12px;
}
.hda-meta { display: grid; grid-template-columns: 1.4fr 1fr 1fr auto; gap: 12px; align-items: end; }
.hda-draft-toggle { display: flex; align-items: center; gap: 6px; font-size: 11.5px; color: var(--muted); white-space: nowrap; padding-bottom: 9px; }

.hda-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; padding-top: 4px; }
.hda-toolbar-gap { flex: 1 1 auto; }
.hda-tool {
  display: inline-flex; align-items: center; gap: 5px;
  border: 1px solid var(--line); background: var(--panel-soft); border-radius: 9px;
  padding: 6px 10px; cursor: pointer; font: inherit; font-size: 11.5px; font-weight: 700; color: var(--ink);
}
.hda-tool:hover { border-color: var(--orange); color: var(--orange); }
.hda-tool.primary { background: var(--orange-soft); border-color: var(--orange-soft); color: var(--orange); }
.hda-tool .ui-icon { width: 13px; height: 13px; }

.hda-split-switch { display: inline-flex; gap: 2px; padding: 3px; background: var(--panel-soft); border: 1px solid var(--line); border-radius: 10px; justify-self: start; }
.hda-split { border: 0; background: none; border-radius: 8px; padding: 5px 12px; cursor: pointer; font: inherit; font-size: 11.5px; font-weight: 700; color: var(--muted); }
.hda-split.on { background: var(--panel); color: var(--ink); box-shadow: 0 1px 3px rgba(41, 36, 29, .12); }

.hda-panes { display: grid; gap: 14px; min-height: 460px; }
.hda-panes.edit { grid-template-columns: 1fr; }
.hda-panes.edit .hda-preview { display: none; }
.hda-panes.preview { grid-template-columns: 1fr; }
.hda-panes.preview .hda-body { display: none; }
.hda-panes.both { grid-template-columns: 1fr 1fr; }
.hda-body {
  width: 100%; min-height: 460px; resize: vertical;
  border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px;
  background: var(--panel-soft); color: var(--ink);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 12.5px; line-height: 2.1; direction: rtl; text-align: start;
}
.hda-body:focus { outline: none; border-color: var(--orange); background: var(--panel); }
.hda-preview {
  min-height: 460px; max-height: 70vh; overflow: auto;
  border: 1px solid var(--line); border-radius: 12px; padding: 16px 18px; background: var(--panel);
}
.hda-preview-error { color: var(--red); font-size: 12px; }

.hda-actions { display: flex; align-items: center; gap: 8px; padding-top: 4px; }
.hda-status { flex: 1 1 auto; font-size: 11.5px; color: var(--muted); }
.hda-empty {
  display: grid; justify-items: center; align-content: center; gap: 8px;
  min-height: 420px; text-align: center; color: var(--muted);
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
}
.hda-empty .ui-icon { width: 30px; height: 30px; }
.hda-empty h3 { margin: 0; font-size: 15px; color: var(--ink); }
.hda-empty p { margin: 0; font-size: 12px; }

@media (max-width: 1100px) {
  .hda-shell { grid-template-columns: 1fr; }
  .hda-tree { position: static; max-height: none; }
  .hda-panes.both { grid-template-columns: 1fr; }
  .hda-meta { grid-template-columns: 1fr 1fr; }
}

/* فروشگاه: یک پالت برای همهٔ محصولات، برگرفته از لوگو و تصویرهای سه‌بعدی. */
.shop-page {
  --shop-accent: #127c44;
  --shop-navy: #1e4b38;
  --shop-navy-2: #285c43;
  --shop-surface: #fffefa;
  --shop-soft: #f5f7ef;
  --shop-border: #dce5d8;
  --shop-gold: #e8b756;
  --shop-gold-soft: #fff5dc;
  --shop-shadow-sm: 0 8px 25px rgba(29, 70, 49, .06);
  --shop-shadow-lg: 0 20px 50px rgba(29, 70, 49, .1);
}
.store-public { background: radial-gradient(circle at 78% 0, #fff9e9, transparent 34rem), #f8f9f3; }
.store-public-bar { border-bottom-color: #e3e9df; background: rgba(255, 254, 249, .94); }
.store-public-actions .primary-button,
.store-public-actions .primary-button:hover { background: #1e4b38; }
.shop-page .shop-side,
.shop-page .shop-detail-main,
.shop-page .shop-buybox,
.shop-page .shop-sheet { border-color: var(--shop-border); background: var(--shop-surface); box-shadow: var(--shop-shadow-sm); }
.shop-page .shop-side-search { background: #fafbf6; }
.shop-page .shop-side-search:focus-within { border-color: #74a78b; background: #fffefa; box-shadow: 0 0 0 3px rgba(18, 124, 68, .12); }
.shop-page .shop-side-chip:hover,
.shop-page .shop-side-reset:hover { border-color: #9abea4; background: #edf5eb; color: #1e4b38; }
.shop-page .shop-side-chip.on,
.shop-page .shop-aud-item.on { border-color: #1e4b38; background: #1e4b38; color: #fff; box-shadow: 0 6px 16px rgba(30, 75, 56, .18); }
.shop-page .shop-aud { border-color: var(--shop-border); background: #eff3e9; }
.shop-page .shop-aud-item:hover:not(.on) { background: #fffefa; color: #1e4b38; }
.shop-page .shop-side-chip:focus-visible,
.shop-page .shop-aud-item:focus-visible { outline-color: rgba(18, 124, 68, .35); }

.shop-page .shop-card {
  border-color: var(--shop-border);
  background: var(--shop-surface);
  box-shadow: var(--shop-shadow-sm);
}
.shop-page .shop-card::before { display: none; }
.shop-page .shop-card:hover { border-color: #a5c4ad; box-shadow: var(--shop-shadow-lg); }
.shop-page .shop-card-title h3,
.shop-page .shop-detail-intro h1 { color: #203d2e; }
.shop-page .shop-breadcrumb button { color: #216447; }
.shop-page .shop-card-audience {
  border: 1px solid #d4e8d8;
  background: #edf6e9;
  color: #216447;
}
.shop-page .shop-chip.grade,
.shop-page .shop-chip.field,
.shop-page .shop-chip.lesson {
  border-color: #dce6d9;
  background: #f5f7ef;
  color: #405b49;
}
.shop-page .shop-chip.field { border-color: #d1e3d4; background: #edf5eb; }
.shop-page .shop-chip.lesson { border-color: #e8dfc8; background: #faf7e9; }
.shop-page .shop-card .shop-cover-wrap { width: 60px; height: 60px; }
.shop-page .shop-cover-art.shop-cover-art-3d { border-color: #e1e7d9; box-shadow: 0 6px 15px rgba(35, 72, 48, .1); }

.shop-page .shop-plan-option { border-color: #dbe4d8; background: #fcfcf8; color: #344b3a; }
.shop-page .shop-plan-option:hover { border-color: #96b59e; background: #f1f7ed; }
.shop-page .shop-plan-option.on,
.shop-page .shop-plan-option:has(input:checked) { border-color: #78a987; background: #e9f4e8; color: #1e603e; box-shadow: 0 0 0 1px rgba(18, 124, 68, .12); }
.shop-page .shop-real-choice { color: #216447; }
.shop-page .shop-exam-choice { border-color: #e4d7b5; background: var(--shop-gold-soft); }
.shop-page .shop-exam-choice.on,
.shop-page .shop-exam-choice:has(input:checked) { border-color: #78a987; background: #edf6e9; box-shadow: 0 0 0 1px rgba(18, 124, 68, .12); }
.shop-page .shop-exam-help { color: #8a681b; }
.shop-page .shop-exam-pick { border-color: #9fc2a7; background: #fffefa; color: #1e6041; }
.shop-page .shop-exam-choice:hover .shop-exam-pick { border-color: #498b62; background: #f2f8ee; }
.shop-page .shop-exam-choice.on .shop-exam-pick,
.shop-page .shop-exam-choice:has(input:checked) .shop-exam-pick { border-color: #1e4b38; background: #1e4b38; color: #fff; }

.shop-page .shop-card-price-line strong,
.shop-page .shop-buybox-total strong { color: #203d2e; }
.shop-page .shop-card-price-line del,
.shop-page .shop-buybox-total del { color: #809084; text-decoration-color: #a5b59d; }
.shop-page .shop-card .shop-price-off,
.shop-page .shop-buybox .shop-price-off,
.shop-page .shop-cover-discount {
  border-color: #f8e9be;
  background: var(--shop-gold);
  color: #29442f;
  box-shadow: 0 5px 12px rgba(138, 105, 34, .16);
}
.shop-page .shop-card-actions .primary-button,
.shop-page .shop-buybox .shop-buy { border-color: #1e4b38; background: #1e4b38; color: #fff; box-shadow: 0 8px 18px rgba(30, 75, 56, .18); }
.shop-page .shop-card-actions .primary-button:hover,
.shop-page .shop-buybox .shop-buy:hover { border-color: #127c44; background: #127c44; }
.shop-page .shop-card-actions .ghost-button { border-color: #d5e2d5; background: #fffefa; color: #254a35; }
.shop-page .shop-card-actions .ghost-button:hover { border-color: #94b69b; background: #f2f8ef; }

.shop-page .shop-detail-counts li,
.shop-page .shop-feature,
.shop-page .shop-capability { border-color: var(--shop-border); background: #f8f9f3; }
.shop-page .shop-buybox-saving,
.shop-page .shop-wallet-pay.on { border-color: #d4e7d5; background: #edf6e9; color: #22583c; }
.shop-page .shop-wallet-copy svg,
.shop-page .shop-spec-yes { color: #216447; }
.shop-page .shop-wallet-pay input { accent-color: #127c44; }
.shop-page .shop-exam-end { background: var(--shop-gold-soft); color: #715519; }
.shop-page .shop-buybox-referral { color: #715519; }
.shop-page .shop-secnav { border-color: var(--shop-border); background: rgba(255, 254, 249, .94); }
.shop-page .shop-secnav-item.on { background: #1e4b38; color: #fff; }
.shop-page .shop-sec-head span::after { background: var(--shop-gold); }
.shop-page .shop-spec-mark { background: #1e6544; box-shadow: 0 2px 6px rgba(30, 101, 68, .2); }
.shop-page .shop-feature-icon { background: #e9f2e7; color: #216447; }
.shop-page .shop-faq details { border-color: var(--shop-border); background: #f8f9f3; }
.shop-page .shop-faq details[open] { border-color: #aac8ad; background: #fffefa; }

/* امکانات محصولات آماده: هشت باکس در دو ردیف چهارتاییِ دسکتاپ. */
.shop-page .shop-detail .shop-features {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  align-items: stretch;
}
.shop-page .shop-detail .shop-feature {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  min-width: 0;
  padding: 15px;
}
.shop-page .shop-detail .shop-feature > div { min-width: 0; }
.shop-page .shop-detail .shop-feature-icon { width: 38px; height: 38px; }
.shop-page .shop-detail .shop-feature h4 { margin: 0 0 3px; line-height: 1.55; }
.shop-page .shop-detail .shop-feature p { line-height: 1.8; }

@media (max-width: 1050px) {
  .shop-page .shop-detail .shop-features { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 680px) {
  .shop-page .shop-detail .shop-features { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 720px) {
  .shop-page .shop-card .shop-cover-wrap { width: 58px; height: 58px; }
}
/* Subscription discount wheels */
.shop-wheel-banner{position:relative;isolation:isolate;display:flex;align-items:center;gap:22px;overflow:hidden;margin:0 0 28px;padding:24px 30px;border-radius:26px;color:#fff;background:radial-gradient(circle at 80% -30%,#d37cff80,transparent 40%),linear-gradient(118deg,#21124b,#5631a7 54%,#a841a8);box-shadow:0 18px 42px #36206b34}
.shop-wheel-banner:after{content:"";position:absolute;inset:auto -50px -150px auto;width:310px;height:310px;border:2px dashed #ffffff42;border-radius:50%;z-index:-1}
.shop-wheel-banner-art{display:grid;place-items:center;flex:none;width:72px;height:72px;border-radius:50%;border:6px solid #ffffff90;color:#fff;font-size:42px;background:conic-gradient(#f7b957 0 25%,#ee6caa 25% 50%,#67d8c2 50% 75%,#8da2ff 75%);box-shadow:0 0 0 5px #ffffff26,0 14px 22px #190d4940;animation:shop-wheel-pulse 5s ease-in-out infinite}
@keyframes shop-wheel-pulse{50%{transform:rotate(18deg) scale(1.06)}}
.shop-wheel-banner-copy{flex:1;min-width:0}.shop-wheel-banner-copy h2{margin:0 0 5px;color:#fff;font-size:clamp(20px,2vw,29px)}.shop-wheel-banner-copy p{margin:0;color:#f3e9ff;font-size:14px}.shop-wheel-banner-copy p b{color:#ffe193;font-size:18px}
.shop-wheel-banner-cta{display:inline-flex;align-items:center;justify-content:center;gap:10px;flex:none;min-height:47px;padding:0 22px;border:0;border-radius:15px;color:#402466;background:#fff;font-weight:900;box-shadow:0 8px 20px #1f104844;cursor:pointer;transition:transform .2s,box-shadow .2s}.shop-wheel-banner-cta:hover:not(:disabled){transform:translateY(-3px);box-shadow:0 12px 25px #1f104866}.shop-wheel-banner-cta:disabled{opacity:.65;cursor:default}
/* تخفیفِ اختصاصیِ مدیر — جای بنرهای عرضه/گردونه برای همین کاربر */
.shop-personal-banner{display:flex;align-items:center;gap:20px;margin:0 0 24px;padding:20px 26px;border-radius:24px;color:#fff;background:radial-gradient(circle at 12% -40%,#ffd28a90,transparent 45%),linear-gradient(118deg,#c2410c,#ea580c 55%,#f59e0b);box-shadow:0 16px 36px #c2410c33}
.shop-personal-badge{display:flex;align-items:baseline;justify-content:center;flex:none;min-width:92px;padding:12px 14px;border-radius:20px;background:#ffffff26;border:2px solid #ffffff66}
.shop-personal-badge b{font-size:40px;font-weight:900;line-height:1}.shop-personal-badge span{font-size:20px;font-weight:900;margin-inline-start:2px}
.shop-personal-copy{flex:1;min-width:0}.shop-personal-copy h2{margin:0 0 6px;color:#fff;font-size:clamp(18px,2vw,25px)}.shop-personal-copy p{margin:0;color:#fff6ea;font-size:14px;line-height:1.9}.shop-personal-copy p b{color:#fff}
@media (max-width:640px){.shop-personal-banner{gap:14px;padding:16px;border-radius:18px}.shop-personal-badge{min-width:70px;padding:10px}.shop-personal-badge b{font-size:30px}.shop-personal-copy p{font-size:13px}}
.shop-wheel-timer{display:inline-flex;align-items:center;flex-wrap:wrap;gap:8px 15px;direction:rtl;width:max-content;max-width:100%;margin-top:9px;padding:8px 13px;border:1px solid #e9a8ff80;border-radius:12px;background:#ffffff26;color:inherit;font-size:12px;line-height:1.6}.shop-wheel-timer svg{flex:none}.shop-wheel-timer b{font-weight:900}.shop-wheel-timer time{display:inline-block;flex:none;min-width:104px;padding:5px 9px;border-radius:7px;background:#fff;color:#4f2b82;font-family:inherit;font-weight:900;font-size:14px;direction:ltr;text-align:center;white-space:nowrap;font-variant-numeric:tabular-nums}
.shop-card>.shop-wheel-timer,.shop-buybox-price>.shop-wheel-timer{margin:4px 0 10px;color:#6f359b;border-color:#cfb8e5;background:#f8f0ff}
.shop-wheel-modal-shell{max-width:690px}.shop-wheel-modal{display:flex;flex-direction:column;align-items:center;gap:14px;padding:18px 26px 27px;text-align:center;background:radial-gradient(circle at 50% 0,#f7e9ff,transparent 58%)}.shop-wheel-lede{margin:0;color:#5e4a74;font-size:14px}.shop-wheel-lede b{color:#6c2dac;font-size:18px}
.shop-wheel-stage{position:relative;display:grid;place-items:center;width:320px;height:320px;max-width:100%;filter:drop-shadow(0 18px 17px #38207442)}.shop-wheel-pointer{position:absolute;top:-4px;left:50%;z-index:3;width:0;height:0;border-left:17px solid transparent;border-right:17px solid transparent;border-top:36px solid #fff;transform:translateX(-50%);filter:drop-shadow(0 0 1px #2a1356) drop-shadow(0 3px 3px #2b155caa)}.shop-wheel-disc{position:relative;width:314px;height:314px;border-radius:50%;will-change:transform}.shop-wheel-svg{display:block;width:100%;height:100%}.shop-wheel-rim{fill:#3d1f73;stroke:#2a1356;stroke-width:2}.shop-wheel-wedges path{stroke:#fff6e5;stroke-width:2.4;stroke-linejoin:round}.shop-wheel-shade{fill:none;stroke:#1d0b40;stroke-opacity:.13;stroke-width:9}.shop-wheel-bulbs .a{fill:#fffbe6}.shop-wheel-bulbs .b{fill:#ffdf85}.shop-wheel-prize,.shop-wheel-prize-sub{fill:#fff;text-anchor:middle;font-family:inherit;font-weight:900;paint-order:stroke;stroke:#2a1152;stroke-opacity:.3;stroke-linejoin:round}.shop-wheel-prize{stroke-width:4}.shop-wheel-prize-sub{font-weight:800;stroke-width:2.4}.shop-wheel-wedges path.is-jackpot{stroke:#fff8d6;stroke-width:3}.shop-wheel-prize.is-jackpot,.shop-wheel-prize-sub.is-jackpot{fill:#6a3a00;stroke:#fffbe6;stroke-opacity:.75}.shop-wheel-odds span.is-jackpot{border-color:#efc14e;background:linear-gradient(135deg,#fff8d8,#ffe7a0);color:#6a3a00}.shop-wheel-disc-center{position:absolute;top:50%;left:50%;z-index:4;display:grid;place-items:center;width:84px;height:84px;padding:5px;transform:translate(-50%,-50%);border:5px solid #fff;border-radius:50%;background:linear-gradient(#fff9e9,#ffe3a3);box-shadow:0 5px 16px #4923728a;cursor:help}.shop-wheel-gift{display:block;width:54px;height:54px;filter:drop-shadow(0 2px 2px #4923724d)}.shop-wheel-disc-center:focus-visible{outline:3px solid #5b34da;outline-offset:3px}.shop-wheel-center-hint{position:absolute;bottom:-3px;left:-4px;display:grid;place-items:center;width:22px;height:22px;border:2px solid #fff;border-radius:50%;color:#fff;background:#5b34da;font-size:12px;font-weight:900}
.shop-wheel-odds{position:absolute;top:50%;left:50%;z-index:5;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:5px;width:min(290px,calc(100% - 16px));max-height:calc(100% + 35px);overflow:auto;padding:12px;border:1px solid #e9d9f7;border-radius:16px;color:#523071;background:#fffdfd;box-shadow:0 18px 35px #34205a75;opacity:0;visibility:hidden;pointer-events:none;transform:translate(-50%,-50%) scale(.94);transition:opacity .18s,transform .18s,visibility .18s}.shop-wheel-odds strong{grid-column:1/-1;margin-bottom:3px;color:#432174;font-size:13px}.shop-wheel-odds span{display:flex;flex-direction:column;align-items:center;gap:1px;padding:5px 4px;border:1px solid #e9d9f7;border-radius:8px;background:#fff;font-size:12px}.shop-wheel-odds small{color:#84679b;font-size:11px}.shop-wheel-disc-center:hover~.shop-wheel-odds,.shop-wheel-disc-center:focus-visible~.shop-wheel-odds,.shop-wheel-disc-center[aria-expanded="true"]~.shop-wheel-odds{opacity:1;visibility:visible;transform:translate(-50%,-50%) scale(1)}.shop-wheel-result{display:flex;flex-direction:column;align-items:center;gap:7px;min-height:44px;color:#624876;font-size:14px}.shop-wheel-result:empty{min-height:0}.shop-wheel-result strong{color:#442178;font-size:23px}.shop-wheel-result time{padding:5px 12px;border-radius:10px;color:#fff;background:#5935a5;font-family:inherit;font-weight:900;font-size:20px;line-height:1.4}.shop-wheel-actions{display:flex;flex-wrap:wrap;justify-content:center;gap:9px}.shop-wheel-actions button{min-width:150px}
.shop-wheel-admin{display:grid;gap:20px;padding:22px}.shop-wheel-admin-panel{padding:23px;border:1px solid #e8e2f0;border-radius:21px;background:linear-gradient(160deg,#fff,#fdfaff);box-shadow:0 8px 24px #3930550c}.shop-wheel-admin-panel h3{margin:3px 0 8px;font-size:20px}.shop-wheel-admin-head{display:flex;align-items:flex-start;justify-content:space-between;gap:15px}.shop-wheel-admin-head span{color:#873fb3;font-size:12px;font-weight:800}.shop-wheel-admin-head p{margin:0 0 18px;color:#6e6477;font-size:13px}.shop-wheel-admin-live{padding:8px 12px;border-radius:10px;color:#087967;background:#e5f8f1;white-space:nowrap;font-size:12px}.shop-wheel-admin-basics{display:flex;flex-wrap:wrap;gap:12px;margin:6px 0 17px}.shop-wheel-admin-basics label{display:flex;flex-direction:column;gap:6px;flex:1;min-width:190px;font-size:12px;font-weight:800}.shop-wheel-admin-basics input,.shop-wheel-admin-row input{min-height:40px;padding:7px 10px;border:1px solid #d8cbe2;border-radius:10px;color:#3e2d4d;background:#fff;font:inherit}.shop-wheel-admin-rows{display:grid;gap:8px;margin:12px 0}.shop-wheel-admin-row{display:flex;align-items:end;gap:10px}.shop-wheel-admin-row label{display:flex;align-items:center;gap:7px;color:#5c5265;font-size:13px}.shop-wheel-admin-row input{width:95px;direction:ltr;text-align:center}.shop-wheel-admin-row .ghost-button{min-width:38px;height:40px;padding:5px}.shop-wheel-admin-help{display:block;margin:10px 0 17px;color:#73647e}.shop-wheel-admin-history{display:grid;gap:9px}.shop-wheel-admin-history>div{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:12px 15px;border:1px solid #ede7f2;border-radius:12px;background:#fff}.shop-wheel-admin-history>div>div{display:flex;flex-direction:column;gap:3px}.shop-wheel-admin-history small{color:#776b82}
.shop-wheel-admin-history .badge{align-self:flex-start;font-size:11px}.shop-wheel-admin-sync{display:block;margin-top:3px;color:#8a7f93;font-size:11px;font-weight:600}.shop-wheel-admin-meter{display:block;width:min(260px,100%);height:5px;margin-top:4px;border-radius:9px;background:#efe9f4;overflow:hidden}.shop-wheel-admin-meter i{display:block;height:100%;border-radius:inherit;background:linear-gradient(90deg,#7a43c9,#ef66ab)}
@media(max-width:700px){.shop-wheel-banner{flex-wrap:wrap;padding:21px;gap:14px}.shop-wheel-banner-art{width:56px;height:56px;font-size:33px}.shop-wheel-banner-cta{width:100%}.shop-wheel-modal{padding:15px 12px 23px}.shop-wheel-stage{width:278px;height:278px}.shop-wheel-disc{width:272px;height:272px}.shop-wheel-disc-center{width:74px;height:74px}.shop-wheel-gift{width:46px;height:46px}.shop-wheel-admin{padding:12px}.shop-wheel-admin-panel{padding:16px}.shop-wheel-admin-head{flex-direction:column}.shop-wheel-admin-row{flex-wrap:wrap}.shop-wheel-admin-row input{width:76px}.shop-wheel-admin-history>div{flex-wrap:wrap}}
@media(prefers-reduced-motion:reduce){.shop-wheel-banner-art{animation:none}.shop-wheel-banner-cta{transition:none}}

/* ── لینک عمومی آزمون (/exam/<code>) ─────────────────────────────────────────
   سه سطح: کارتِ صفحهٔ ورود (.xl-auth-*)، صفحهٔ آزمون داخل پنل (.xl-page) و
   مودالِ لینک/پوسترِ برگزارکننده. سبزِ #127c44 همان سبزِ لوگوست. */
.xl-auth-hero { display: grid; gap: 10px; margin-bottom: 6px; }
.xl-badge {
  justify-self: start; display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 11px; border-radius: 999px; background: #fff3d6; color: #9a5b00;
  font-size: 11.5px; font-weight: 800;
}
.xl-badge svg { width: 14px; height: 14px; }
.xl-auth-hero h1 { margin: 0; font-size: 20px; line-height: 1.75; font-weight: 800; }
.xl-auth-org { margin: 0; color: var(--muted); font-size: 12.5px; font-weight: 700; }
.xl-auth-facts { display: flex; flex-wrap: wrap; gap: 7px; }
.xl-auth-facts span {
  display: inline-flex; align-items: center; gap: 6px; padding: 6px 10px;
  border: 1px solid var(--line); border-radius: 10px; background: var(--panel-soft);
  font-size: 11.5px; font-weight: 700;
}
.xl-auth-facts svg { width: 14px; height: 14px; color: #127c44; }
.xl-auth-status {
  display: flex; align-items: flex-start; gap: 7px; margin: 4px 0 0;
  padding: 9px 11px; border-radius: 10px; background: #eaf6ef;
  color: #166845; font-size: 11.5px; font-weight: 700; line-height: 1.8;
}
.xl-auth-status svg { width: 15px; height: 15px; flex: none; margin-top: 2px; }
.xl-auth-status.tone-upcoming { background: #fff2da; color: #845300; }
.xl-auth-status.tone-closed { background: #f3efea; color: #675c50; }
/* دکمه سایهٔ ۳ پیکسلیِ زیرین دارد؛ راهنما با فاصله و قابِ ملایم زیرش می‌نشیند، نه چسبیده به آن.
   «p.» لازم است: landing-v2.css بعد از این فایل می‌آید و `.auth-paper :where(p)` حاشیه را صفر می‌کرد. */
p.xl-auth-hint { display: flex; align-items: flex-start; gap: 8px; margin: 18px 0 0; padding: 10px 12px; border: 1px solid #e3e8df; border-radius: 10px; background: #f6f8f3; font-size: 12px; color: var(--muted); line-height: 1.9; }
.xl-auth-hint svg { width: 15px; height: 15px; flex: none; margin-top: 4px; color: #2f7d55; }
.xl-auth-or { display: flex; align-items: center; gap: 10px; margin: 2px 0; color: var(--muted); font-size: 11px; }
.xl-auth-or::before, .xl-auth-or::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.auth-gate .auth-submit.xl-auth-alt,
.auth-submit.xl-auth-alt {
  background: var(--panel); background-image: none; color: var(--ink);
  border: 1px solid var(--line); box-shadow: none;
}

.xl-page { display: grid; gap: 14px; max-width: 1180px; margin-inline: auto; }
.xl-hero {
  display: grid; grid-template-columns: minmax(0, 1fr) 310px; gap: 18px; padding: 22px;
  border: 1px solid #ead9c2; border-radius: 20px;
  background: linear-gradient(135deg, #fffdf9 0%, #fff4e6 100%);
}
.xl-hero-loading { grid-template-columns: 1fr; min-height: 150px; }
.xl-hero-main { display: grid; align-content: start; gap: 4px; min-width: 0; }
.xl-hero h1 { margin: 8px 0 2px; font-size: 24px; font-weight: 900; line-height: 1.6; overflow-wrap: anywhere; }
.xl-org { margin: 0; font-size: 13px; font-weight: 700; color: var(--muted); }
.xl-scope { display: inline-flex; align-items: center; gap: 6px; margin: 6px 0 0; font-size: 12px; color: var(--muted); font-weight: 700; }
.xl-scope svg { width: 15px; height: 15px; }
.xl-status {
  justify-self: start; display: inline-flex; flex-wrap: wrap; align-items: center; gap: 8px;
  margin-top: 12px; padding: 7px 12px; border: 1px solid var(--line); border-radius: 12px;
  background: var(--panel); font-size: 12px;
}
.xl-status i { width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.xl-status b { font-weight: 900; }
.xl-status span { color: var(--ink); font-weight: 700; }
.xl-status.tone-open { color: #0f7a4a; }
.xl-status.tone-open i { box-shadow: 0 0 0 4px rgba(15, 122, 74, .14); }
.xl-status.tone-upcoming { color: #b86a00; }
.xl-status.tone-closed { color: var(--muted); }
.xl-cta {
  display: grid; align-content: start; gap: 9px; padding: 16px; border: 1px solid var(--line);
  border-radius: 16px; background: var(--panel); box-shadow: 0 10px 24px rgba(58, 43, 27, .06);
}
.xl-cta > .primary-button, .xl-cta > .ghost-button { width: 100%; justify-content: center; }
.xl-cta-note { display: flex; gap: 7px; margin: 0; font-size: 12px; line-height: 1.9; }
.xl-cta-note svg { width: 16px; height: 16px; flex: none; margin-top: 3px; color: #127c44; }
.xl-free { display: flex; align-items: center; justify-content: center; gap: 5px; margin: 0; font-size: 11px; color: var(--muted); }
.xl-free svg { width: 13px; height: 13px; color: var(--orange); }
.xl-share-row { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; }
.xl-share-row button { justify-content: center; padding-inline: 8px; }
.xl-facts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.xl-facts article {
  display: grid; align-content: start; gap: 4px; padding: 13px 14px;
  border: 1px solid var(--line); border-radius: 14px; background: var(--panel);
}
.xl-facts span { display: flex; align-items: center; gap: 6px; font-size: 11px; color: var(--muted); font-weight: 700; }
.xl-facts svg { width: 14px; height: 14px; color: var(--orange); }
.xl-facts b { font-size: 15px; font-weight: 900; }
.xl-facts small { font-size: 11px; color: var(--muted); }
.xl-grid { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); gap: 14px; align-items: start; }
.xl-card { min-width: 0; padding: 16px; border: 1px solid var(--line); border-radius: 16px; background: var(--panel); }
.xl-card h2 { display: flex; align-items: center; gap: 8px; margin: 0 0 12px; font-size: 14px; font-weight: 900; }
.xl-card h2 svg { width: 17px; height: 17px; color: var(--orange); }
.xl-booklet + .xl-booklet { margin-top: 14px; }
.xl-booklet-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; margin-bottom: 6px; font-size: 12.5px; }
.xl-booklet-head b { font-weight: 800; }
.xl-booklet-head small { color: var(--muted); font-weight: 700; }
.xl-table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 12px; }
.xl-table { width: 100%; border-collapse: collapse; font-size: 12px; }
.xl-table th { padding: 8px; background: var(--panel-soft); color: var(--muted); font-weight: 800; text-align: center; white-space: nowrap; }
.xl-table td { padding: 8px; border-top: 1px solid var(--line); text-align: center; font-weight: 700; }
.xl-table th:first-child, .xl-table td:first-child { text-align: start; }
.xl-topic-group + .xl-topic-group { margin-top: 12px; }
.xl-topic-group h3 { margin: 0 0 7px; font-size: 12.5px; font-weight: 800; }
.xl-topic-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.xl-topic-chips span {
  display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px; border-radius: 999px;
  border: 1px solid var(--line); background: var(--panel-soft); font-size: 11.5px; font-weight: 700;
}
.xl-topic-chips em { font-style: normal; font-size: 10.5px; color: var(--muted); }
@media (max-width: 900px) {
  .xl-hero, .xl-grid { grid-template-columns: 1fr; }
  .xl-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 560px) {
  .xl-hero { padding: 16px; }
  .xl-hero h1 { font-size: 20px; }
}

/* مودالِ برگزارکننده و پوستر */
.xl-link-points { display: grid; gap: 7px; margin: 12px 0 14px; padding: 0; list-style: none; }
.xl-link-schedule { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0; }
.xl-link-schedule span { display: inline-flex; align-items: center; gap: 5px; padding: 7px 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--panel-soft); font-size: 11.5px; }
.xl-link-schedule svg, .xl-link-expired svg { width: 14px; height: 14px; flex: none; }
.xl-link-expired { display: flex; align-items: flex-start; gap: 7px; margin: 8px 0; color: #9a5c17; font-size: 12px; line-height: 1.8; }
.xl-link-expired svg { margin-top: 3px; }
.xl-link-points li { display: flex; gap: 8px; font-size: 12.5px; line-height: 1.9; }
.xl-link-points svg { width: 16px; height: 16px; flex: none; margin-top: 4px; color: #127c44; }
.xl-link-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.xl-link-actions a { text-decoration: none; }
.xl-poster-wrap {
  display: grid; place-items: center; min-height: 320px; padding: 12px;
  border-radius: 14px; background: var(--panel-soft);
}
.xl-poster-wrap img { width: 100%; max-width: 420px; border-radius: 12px; box-shadow: 0 12px 30px rgba(0, 0, 0, .12); }
.exam-iconbtn.exam-public-link-icon.on {
  color: #127c44; border-color: color-mix(in srgb, #127c44 35%, var(--line)); background: #eaf6ef;
}
.xl-wizard-card.on { border-color: color-mix(in srgb, #127c44 40%, #ead9c2); }

/* سؤالِ مشترک با آزمون حرفه‌ایِ در جریان: کلیدش تا پایان آن آزمون مهر است */
.rr-sealed-chip {
  display: inline-flex; align-items: center; gap: 5px; margin-inline-start: auto;
  padding: 3px 9px; border-radius: 999px; font-style: normal; font-size: 11px; font-weight: 700;
  color: #7458b8; background: #f3effb; border: 1px solid #dcd1f1;
}
.rr-sealed-chip svg { width: 13px; height: 13px; }

/* ================= صفحهٔ «نتایج آزمون» برگزارکننده (pr-*) ================= */
.pr-page .pr-head { align-items: center; }
.pr-head-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; justify-content: flex-end; }
.pr-scope { display: inline-flex; padding: 3px; border-radius: 12px; background: #f6efe5; border: 1px solid #ead9c2; }
.pr-scope button { border: 0; background: transparent; padding: 6px 11px; border-radius: 9px; font: inherit; font-size: 12px; font-weight: 700; color: #7d6d58; cursor: pointer; white-space: nowrap; transition: background .18s, color .18s; }
.pr-scope button:hover { color: var(--orange); }
.pr-scope button.on { background: #fff; color: var(--orange); box-shadow: 0 2px 8px rgba(120, 80, 30, .12); }
.pr-icon-action { gap: 6px; }
.pr-icon-action svg { width: 16px; height: 16px; }
.pr-tabs { flex-wrap: wrap; }
.pr-state { display: grid; place-items: center; gap: 10px; padding: 60px 16px; text-align: center; color: #8a7a64; }
.pr-state svg { width: 38px; height: 38px; color: var(--orange); }
.pr-state.error svg { color: #c0392b; }
.pr-empty { padding: 40px 16px; }
.pr-muted { color: #a3937d; }

.pr-card { background: #fff; border: 1px solid #efe3d2; border-radius: 16px; padding: 16px; box-shadow: 0 6px 18px rgba(120, 80, 30, .05); }
.pr-card > header, .pr-card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.pr-card h3 { margin: 0; font-size: 15px; display: flex; align-items: center; gap: 7px; }
.pr-card h3 svg { width: 18px; height: 18px; color: var(--orange); }
.pr-card header p { margin: 4px 0 0; font-size: 12px; color: #8a7a64; line-height: 1.8; }
.pr-avatar { display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; flex: none; font-weight: 800; font-style: normal; color: #9a4c12; background: linear-gradient(135deg, #ffe7cf, #ffd2a8); }
.pr-avatar.sm { width: 28px; height: 28px; font-size: 12px; }
.pr-avatar.lg { width: 58px; height: 58px; font-size: 22px; }
.pr-group { display: inline-flex; padding: 1px 8px; border-radius: 999px; font-style: normal; font-size: 10.5px; font-weight: 700; background: #eef6f2; color: #1f7a57; }
.pr-group.hall { background: #eef2fb; color: #3a5ea8; }
.pr-group.public { background: #f3effb; color: #7458b8; }

.pr-ov-grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 14px; }
.pr-podium { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.pr-podium-card { position: relative; display: grid; justify-items: center; gap: 3px; padding: 16px 8px 12px; border-radius: 14px; border: 1px solid #f0e2cf; background: linear-gradient(180deg, #fffaf3, #fff); font: inherit; cursor: pointer; text-align: center; min-width: 0; transition: transform .2s, box-shadow .2s, border-color .2s; }
.pr-podium-card:hover { transform: translateY(-2px); border-color: #f6c69b; box-shadow: 0 10px 22px rgba(255, 107, 24, .12); }
.pr-podium-card b { font-size: 13px; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pr-podium-card small { font-size: 11px; color: #9a8c78; }
.pr-podium-card strong { font-size: 20px; color: #2f2418; margin-top: 4px; }
.pr-podium-card em { font-style: normal; font-size: 11px; color: #8a7a64; }
.pr-medal { position: absolute; top: 8px; inset-inline-start: 8px; width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; font-size: 12px; font-weight: 800; color: #fff; background: #c9b79c; }
.pr-podium-card.r1 { border-color: #f5c15c; background: linear-gradient(180deg, #fff6df, #fff); }
.pr-podium-card.r1 .pr-medal { background: linear-gradient(135deg, #f7b733, #e59400); }
.pr-podium-card.r2 .pr-medal { background: linear-gradient(135deg, #b8c2cc, #8d99a6); }
.pr-podium-card.r3 .pr-medal { background: linear-gradient(135deg, #e0a878, #b8744a); }
.pr-top-list { display: grid; gap: 4px; margin-top: 10px; }
.pr-top-list button { display: grid; grid-template-columns: 26px 28px minmax(0, 1fr) auto 60px; align-items: center; gap: 8px; padding: 7px 8px; border: 0; border-radius: 10px; background: transparent; font: inherit; cursor: pointer; text-align: start; }
.pr-top-list button:hover { background: #fff6ec; }
.pr-rank-no { font-weight: 800; color: #9a8c78; text-align: center; }
.pr-top-name { display: flex; align-items: center; gap: 6px; min-width: 0; }
.pr-top-name b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; }
.pr-top-val { font-size: 12px; color: #7d6d58; }
.pr-top-list strong { text-align: end; }

.pr-hist { display: grid; grid-template-columns: repeat(11, minmax(0, 1fr)); gap: 5px; align-items: end; height: 190px; padding-top: 8px; }
.pr-hist-col { display: grid; grid-template-rows: 18px 1fr 18px; height: 100%; align-items: end; text-align: center; min-width: 0; }
.pr-hist-col b { font-size: 11px; color: #5b4c3a; }
.pr-hist-col i { display: block; height: var(--h); min-height: 3px; border-radius: 7px 7px 3px 3px; background: linear-gradient(180deg, #ffb070, #ff6b18); transition: filter .2s; }
.pr-hist-col i.t0 { background: linear-gradient(180deg, #f39a8f, #d9534f); }
.pr-hist-col.empty i { background: #f1e8dc; }
.pr-hist-col:hover i { filter: brightness(1.08); }
.pr-hist-col small { font-size: 9.5px; color: #9a8c78; white-space: nowrap; overflow: hidden; }
.pr-group-split { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.pr-group-split span { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; padding: 4px 10px; border-radius: 999px; background: #faf5ee; }
.pr-group-split i { width: 8px; height: 8px; border-radius: 50%; background: #1f7a57; }
.pr-group-split .hall i { background: #3a5ea8; }
.pr-group-split .public i { background: #7458b8; }
.pr-group-split .sheet i { background: #b8862b; }
.pr-lt th, .pr-lt td { white-space: nowrap; }
.pr-absent-head { width: 100%; display: flex; justify-content: space-between; align-items: center; gap: 8px; border: 0; background: transparent; font: inherit; cursor: pointer; padding: 0; }
.pr-absent-head span { display: inline-flex; align-items: center; gap: 8px; }
.pr-absent-head svg { width: 18px; height: 18px; color: #9a8c78; }
.pr-absent-list { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.pr-absent-list > span { display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px 5px 6px; border-radius: 999px; background: #faf5ee; font-size: 12px; }
.pr-absent-list small { color: #9a8c78; }

.pr-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 12px; }
.pr-search { flex: 1 1 220px; display: flex; align-items: center; gap: 8px; padding: 0 12px; height: 40px; border-radius: 12px; border: 1px solid #ead9c2; background: #fff; transition: border-color .2s, box-shadow .2s; }
.pr-search:focus-within { border-color: var(--orange); box-shadow: 0 0 0 3px #ffe4cc; }
.pr-search svg { width: 17px; height: 17px; color: #a3937d; }
.pr-search input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; font: inherit; }
.pr-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.pr-chips button { display: inline-flex; align-items: center; gap: 6px; padding: 7px 12px; border-radius: 999px; border: 1px solid #ead9c2; background: #fff; font: inherit; font-size: 12px; font-weight: 700; cursor: pointer; color: #6b5b46; }
.pr-chips button b { font-size: 11px; padding: 0 6px; border-radius: 999px; background: #f6efe5; }
.pr-chips button.on { border-color: var(--orange); color: var(--orange); background: #fff6ec; }
.pr-sort { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: #7d6d58; }
.pr-sort select { height: 38px; border-radius: 10px; border: 1px solid #ead9c2; background: #fff; font: inherit; font-size: 12.5px; padding: 0 10px; cursor: pointer; max-width: 220px; }
.pr-sort button { width: 38px; height: 38px; border-radius: 10px; border: 1px solid #ead9c2; background: #fff; display: grid; place-items: center; cursor: pointer; }
.pr-sort button svg { width: 16px; height: 16px; }
.pr-sort select:hover, .pr-sort button:hover { border-color: var(--orange); }
.pr-count { font-size: 12px; color: #8a7a64; margin-bottom: 8px; }

.pr-table-wrap { overflow-x: auto; border: 1px solid #efe3d2; border-radius: 14px; background: #fff; }
.pr-rank-table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 12.5px; }
.pr-rank-table th, .pr-rank-table td { padding: 9px 10px; text-align: center; white-space: nowrap; border-bottom: 1px solid #f4ebdf; }
.pr-rank-table thead th { position: sticky; top: 0; z-index: 2; background: #fbf6ef; color: #7d6d58; font-size: 11.5px; font-weight: 800; }
.pr-rank-table .pr-th-groups th { border-bottom-color: #efe3d2; }
.pr-rank-table thead tr:nth-child(2) th { top: 37px; }
.pr-lesson-head { color: #5b4c3a !important; }
.pr-lesson-head small { color: var(--orange); font-weight: 800; }
.pr-lesson-head.total { background: #fff1e3 !important; }
.pr-lesson-head.val { background: #f3effb !important; color: #7458b8 !important; }
.pr-sep { border-inline-end: 1px solid #efe3d2; }
.pr-sortable { cursor: pointer; user-select: none; }
.pr-sortable svg { width: 12px; height: 12px; vertical-align: middle; margin-inline-start: 3px; color: var(--orange); }
.pr-sortable:hover, .pr-sortable.on { color: var(--orange) !important; }
.pr-rank-table tbody tr { cursor: pointer; transition: background .15s; }
.pr-rank-table tbody tr:hover td { background: #fff8f0; }
.pr-rank-table tbody tr:focus-visible td { background: #fff1e3; outline: none; }
.pr-sticky-rank, .pr-sticky-name { position: sticky; background: #fff; z-index: 1; }
.pr-sticky-rank { inset-inline-start: 0; }
.pr-sticky-name { inset-inline-start: 58px; text-align: start !important; box-shadow: inset -1px 0 0 #efe3d2; }
.pr-val-table .pr-sticky-name { inset-inline-start: 0; }
thead .pr-sticky-rank, thead .pr-sticky-name { z-index: 3; }
.pr-person { display: inline-flex; align-items: center; gap: 8px; }
.pr-person > span:last-child { display: grid; text-align: start; }
.pr-person b { font-size: 13px; }
.pr-person small { font-size: 10.5px; color: #9a8c78; }
.pr-rank-badge { display: inline-grid; place-items: center; min-width: 30px; height: 26px; padding: 0 6px; border-radius: 8px; font-weight: 800; background: #f6efe5; color: #6b5b46; }
.pr-rank-badge.r1 { background: linear-gradient(135deg, #f7b733, #e59400); color: #fff; }
.pr-rank-badge.r2 { background: linear-gradient(135deg, #b8c2cc, #8d99a6); color: #fff; }
.pr-rank-badge.r3 { background: linear-gradient(135deg, #e0a878, #b8744a); color: #fff; }
.pr-pct.high { color: #1f7a57; }
.pr-pct.mid { color: #a86a14; }
.pr-pct.low { color: #c0392b; }
.pr-rank-table td.focus { background: #fff7ee; }
.pr-lrank { display: block; font-size: 10px; color: var(--orange); font-weight: 700; }
.pr-taraz b { font-size: 13.5px; color: #2f2418; }
.pr-val b { display: block; }
.pr-val small { font-size: 10.5px; color: #7458b8; }
.pr-gap, .pr-gap-label { display: inline-flex; padding: 2px 9px; border-radius: 999px; font-weight: 800; font-size: 11.5px; background: #f3f0ea; color: #7d6d58; }
.pr-gap.ok, .pr-gap-label.ok { background: #e7f5ee; color: #1f7a57; }
.pr-gap.mid, .pr-gap-label.mid { background: #fff3dc; color: #a86a14; }
.pr-gap.bad, .pr-gap-label.bad { background: #fde9e7; color: #c0392b; }
.pr-gap-text.ok { color: #1f7a57; } .pr-gap-text.mid { color: #a86a14; } .pr-gap-text.bad { color: #c0392b; }

.pr-person-head { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; }
.pr-person-id { flex: 1 1 220px; min-width: 0; }
.pr-person-id h2 { margin: 0 0 4px; font-size: 18px; }
.pr-person-id p { margin: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: 12px; color: #8a7a64; }
.pr-via { font-style: normal; padding: 1px 8px; border-radius: 999px; background: #f6efe5; font-size: 10.5px; font-weight: 700; }
.pr-person-nav { display: flex; align-items: center; gap: 8px; font-size: 12px; color: #8a7a64; }
.pr-person-nav button { gap: 4px; }
.pr-person-nav svg { width: 15px; height: 15px; }
.pr-val-card.bad { border-color: #f3c3bd; }
.pr-val-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.pr-val-grid > div { display: grid; gap: 3px; padding: 10px 12px; border-radius: 12px; background: #faf7fd; }
.pr-val-grid small { font-size: 11px; color: #8a7a64; }
.pr-val-grid b { font-size: 16px; }
.pr-val-grid span { font-size: 11px; color: #9a8c78; }
.pr-val-items { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 12px; font-size: 12px; color: #8a7a64; }
.pr-val-items span { width: 28px; height: 28px; display: grid; place-items: center; border-radius: 8px; font-weight: 800; font-size: 12px; background: #f3f0ea; color: #7d6d58; }
.pr-val-items span.correct { background: #e7f5ee; color: #1f7a57; }
.pr-val-items span.wrong { background: #fde9e7; color: #c0392b; }
.pr-val-none { padding: 6px 2px; font-size: 13px; }

.pr-qlist { display: grid; gap: 12px; }
.pr-qcard { background: #fff; border: 1px solid #efe3d2; border-radius: 16px; padding: 14px 16px; display: grid; gap: 12px; scroll-margin-top: 90px; transition: border-color .2s, box-shadow .2s; }
.pr-qcard:hover { border-color: #f3d2b0; box-shadow: 0 8px 20px rgba(120, 80, 30, .07); }
.pr-qcard header { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.pr-qno { display: grid; place-items: center; min-width: 34px; height: 34px; padding: 0 6px; border-radius: 10px; background: var(--orange); color: #fff; font-weight: 800; }
.pr-qpath { flex: 1 1 200px; display: grid; min-width: 0; }
.pr-qpath b { font-size: 13.5px; }
.pr-qpath small { font-size: 11px; color: #9a8c78; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pr-key { padding: 4px 10px; border-radius: 999px; background: #e7f5ee; color: #1f7a57; font-size: 12px; }
.pr-disc { padding: 4px 10px; border-radius: 999px; font-size: 11.5px; font-weight: 700; background: #f3f0ea; color: #7d6d58; }
.pr-disc.ok { background: #eaf2fd; color: #2c5fa8; }
.pr-disc.mid { background: #fff3dc; color: #a86a14; }
.pr-disc.bad { background: #fde9e7; color: #c0392b; }
.pr-qmetrics { display: grid; grid-template-columns: repeat(auto-fit, minmax(118px, 1fr)); gap: 8px; }
.pr-qmetrics > span { display: grid; gap: 2px; padding: 8px 10px; border-radius: 12px; background: #fbf7f1; }
.pr-qmetrics small { font-size: 11px; color: #8a7a64; }
.pr-qmetrics b { font-size: 14px; }
.pr-qmetrics em { font-style: normal; font-size: 11px; color: #9a8c78; }
.pr-qmetrics .c { background: #eef8f3; } .pr-qmetrics .c b { color: #1f7a57; }
.pr-qmetrics .w { background: #fdf0ee; } .pr-qmetrics .w b { color: #c0392b; }
.pr-qmetrics .b { background: #fff8e3; } .pr-qmetrics .b b { color: #a97925; }
.pr-stack { display: flex; height: 8px; border-radius: 999px; overflow: hidden; background: #f1e8dc; }
.pr-stack i.c { background: #2fa36b; } .pr-stack i.w { background: #e25b4b; } .pr-stack i.b { background: #f0c75e; }
.pr-options { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 16px; }
.pr-opt { display: grid; grid-template-columns: minmax(96px, auto) minmax(0, 1fr) 30px 46px; align-items: center; gap: 8px; font-size: 12px; }
.pr-opt em { height: 10px; border-radius: 999px; background: #f4ece1; overflow: hidden; }
.pr-opt em i { display: block; height: 100%; border-radius: 999px; background: #c9b79c; transition: width .4s; }
.pr-opt b { text-align: end; }
.pr-opt small { color: #8a7a64; text-align: end; }
.pr-opt.key span { color: #1f7a57; font-weight: 800; }
.pr-opt.key em i { background: #2fa36b; }
.pr-opt.trap span { color: #c0392b; font-weight: 700; }
.pr-opt.trap em i { background: #e25b4b; }
.pr-qcard footer { display: flex; justify-content: flex-end; }
.pr-qcard footer button { gap: 6px; }
.pr-qcard footer svg { width: 15px; height: 15px; }
.pr-answer-wrap { scroll-margin-top: 90px; }
.pr-answer-ctx { flex-wrap: wrap; }
.pr-mini { display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; border-radius: 999px; font-size: 11px; font-weight: 700; background: #f6efe5; color: #6b5b46; border: 0; font-family: inherit; }
.pr-mini svg { width: 12px; height: 12px; }
.pr-mini.c { background: #e7f5ee; color: #1f7a57; } .pr-mini.w { background: #fde9e7; color: #c0392b; } .pr-mini.b { background: #fff3dc; color: #a97925; }
.pr-mini.link { cursor: pointer; background: #fff; border: 1px solid #ead9c2; margin-inline-start: auto; }
.pr-mini.link:hover { border-color: var(--orange); color: var(--orange); }

@media (max-width: 1100px) {
  .pr-ov-grid { grid-template-columns: 1fr; }
  .pr-val-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  .pr-head-actions { justify-content: flex-start; }
  .pr-scope { width: 100%; overflow-x: auto; }
  .pr-scope button { flex: 1; }
  .pr-options { grid-template-columns: 1fr; }
  .pr-podium { grid-template-columns: 1fr; }
  .pr-hist { height: 150px; gap: 3px; }
  .pr-hist-col small { font-size: 8px; }
  .pr-top-list button { grid-template-columns: 22px 28px minmax(0, 1fr) 52px; }
  .pr-top-val { display: none; }
  .pr-sticky-name { position: static; box-shadow: none; }
  .pr-person-nav { width: 100%; justify-content: space-between; }
  .pr-sort select { max-width: 160px; }
}
@media (max-width: 480px) {
  .pr-val-grid { grid-template-columns: 1fr; }
  .pr-opt { grid-template-columns: 84px minmax(0, 1fr) 26px 40px; }
}

/* سربرگ صفحهٔ نتایج: نام آزمون و بازه جا بگیرند؛ کنترل‌ها در ردیف دوم */
.pr-page .rr-report-page-head { grid-template-columns: auto minmax(0, 1fr); }
.pr-page .rr-report-title h1 { white-space: normal; overflow: visible; line-height: 1.5; }
.pr-page .rr-report-title small { line-height: 1.9; }
.pr-page .pr-head-actions { grid-column: 1 / -1; justify-content: space-between; padding-top: 10px; border-top: 1px dashed #efe3d2; }
.pr-page .pr-head-actions .pr-scope { margin-inline-end: auto; }
@media (max-width: 760px) { .pr-page .pr-head-actions > * { flex: initial; } }

/* جدول پهنِ رتبه‌بندی نباید والدِ گرید را پهن کند؛ فقط خودِ جعبهٔ جدول اسکرول بخورد */
.pr-page, .pr-page > *, .pr-content, .pr-ranking, #prRankHost, .pr-person-page, .pr-questions .rr-qmain { min-width: 0; max-width: 100%; }
.pr-table-wrap { width: 100%; max-width: 100%; }

/* ================= نتایج آزمون — دور دوم ================= */
.pr-avatar { overflow: hidden; }
.pr-avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pr-podium-card .pr-avatar { width: 58px; height: 58px; font-size: 20px; margin-bottom: 4px; box-shadow: 0 0 0 3px #fff, 0 0 0 5px #efe0cb; }
.pr-podium-card.r1 .pr-avatar { width: 66px; height: 66px; box-shadow: 0 0 0 3px #fff, 0 0 0 5px #f5c15c; }
.pr-podium-card.r2 .pr-avatar { box-shadow: 0 0 0 3px #fff, 0 0 0 5px #b8c2cc; }
.pr-podium-card.r3 .pr-avatar { box-shadow: 0 0 0 3px #fff, 0 0 0 5px #e0a878; }
.pr-person-head .pr-avatar.lg { width: 64px; height: 64px; }
.pr-hist-col { grid-template-rows: 1fr 18px; outline: none; cursor: default; }
.pr-hist-col:hover i, .pr-hist-col:focus i { filter: brightness(1.1); box-shadow: 0 0 0 2px #ffd9b8; }
.pr-tip { position: fixed; z-index: 1200; max-width: 260px; padding: 7px 11px; border-radius: 10px; background: #2f2418; color: #fff; font-size: 12px; font-weight: 700; line-height: 1.7; pointer-events: none; box-shadow: 0 8px 20px rgba(0, 0, 0, .18); }
.pr-heat { margin-top: 14px; padding-top: 12px; border-top: 1px dashed #efe3d2; }
.pr-heat-title { font-size: 12.5px; font-weight: 800; color: #5b4c3a; margin-bottom: 8px; }
.pr-heat-scroll { overflow-x: auto; }
.pr-heat-table { width: 100%; border-collapse: separate; border-spacing: 3px; font-size: 9.5px; }
.pr-heat-table thead th { color: #9a8c78; font-weight: 700; white-space: nowrap; padding: 0 1px; }
.pr-heat-table tbody th { text-align: right; font-size: 11.5px; color: #5b4c3a; white-space: nowrap; padding-inline-start: 8px; }
.pr-heat-cell { display: block; height: 24px; min-width: 20px; border-radius: 6px; background: #f6efe5; position: relative; outline: none; }
.pr-heat-cell::after { content: ""; position: absolute; inset: 0; border-radius: inherit; background: #ff6b18; opacity: var(--a, 0); }
.pr-heat-cell.neg::after { background: #d9534f; }
.pr-heat-cell:hover, .pr-heat-cell:focus { box-shadow: 0 0 0 2px #2f2418; }
.pr-coef { display: inline-flex; align-items: center; gap: 3px; padding: 2px 8px; border-radius: 999px; background: #fff1e3; color: #b25a12; font-size: 11px; font-weight: 700; white-space: nowrap; }
.pr-coef b { font-size: 12px; }
.pr-lesson-head .pr-coef { margin-inline-start: 6px; }
.pr-lesson-head.pr-sortable:hover { background: #fff1e3 !important; }
.pr-pct b { font-weight: 800; }
.pr-taraz-hi { color: #1f7a57; }
.pr-taraz-lo { color: #c0392b; }

.pr-qlegend { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 11.5px; color: #8a7a64; margin-bottom: 8px; }
.pr-qlegend span { display: inline-flex; align-items: center; gap: 5px; }
.pr-qlegend i { width: 10px; height: 10px; border-radius: 3px; }
.pr-qlegend i.key { background: #2fa36b; }
.pr-qlegend i.trap { background: #e25b4b; }
.pr-qtable { border: 1px solid #efe3d2; border-radius: 14px; background: #fff; overflow: hidden; }
.pr-qhead, .pr-qrow { display: grid; grid-template-columns: 40px minmax(110px, 1fr) minmax(130px, 1fr) minmax(190px, 1.2fr) 52px 48px; align-items: center; gap: 10px; padding: 7px 12px; }
.pr-qhead { background: #fbf6ef; color: #7d6d58; font-size: 11px; font-weight: 800; }
.pr-qrow { width: 100%; border: 0; border-top: 1px solid #f4ebdf; background: #fff; font: inherit; text-align: start; cursor: pointer; transition: background .15s; scroll-margin-top: 90px; }
.pr-qrow:hover { background: #fff8f0; }
.pr-qrow .pr-qno { min-width: 30px; height: 28px; border-radius: 8px; font-size: 12.5px; }
.pr-qrow .pr-qpath b { font-size: 12.5px; }
.pr-qres { display: grid; gap: 3px; }
.pr-qres .pr-stack { height: 6px; }
.pr-qres small { display: flex; gap: 8px; font-size: 10.5px; font-weight: 700; }
.pr-qres em { font-style: normal; }
.pr-qres em.c { color: #1f7a57; }
.pr-qres em.w { color: #c0392b; }
.pr-qres em.b { color: #a97925; }
.pr-qopts { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; direction: ltr; }
.pr-qopts i { display: flex; align-items: center; justify-content: center; gap: 3px; height: 24px; border-radius: 7px; background: #f6efe5; color: #6b5b46; font-style: normal; font-size: 10.5px; font-weight: 700; }
.pr-qopts i b { font-size: 10px; opacity: .6; }
.pr-qopts i.key { background: #e3f4ea; color: #1f7a57; box-shadow: inset 0 0 0 1px #9fd8b8; }
.pr-qopts i.trap { background: #fde9e7; color: #c0392b; box-shadow: inset 0 0 0 1px #f2b3aa; }
.pr-qtime { font-size: 12px; color: #6b5b46; text-align: center; }
.pr-qdisc { font-size: 11.5px; font-weight: 800; text-align: center; border-radius: 999px; padding: 2px 0; background: #f3f0ea; color: #7d6d58; }
.pr-qdisc.ok { background: #eaf2fd; color: #2c5fa8; }
.pr-qdisc.mid { background: #fff3dc; color: #a86a14; }
.pr-qdisc.bad { background: #fde9e7; color: #c0392b; }
.pr-qmodal { display: grid; gap: 12px; }
.pr-qmodal-path { margin: 0; font-size: 12px; color: #8a7a64; }
.pr-qmodal-stats { display: flex; flex-wrap: wrap; gap: 6px; }
.pr-qmodal-stats > span { display: inline-flex; align-items: baseline; gap: 6px; padding: 5px 10px; border-radius: 10px; background: #fbf7f1; font-size: 12px; }
.pr-qmodal-stats small { color: #8a7a64; }
.pr-qmodal-stats b { font-size: 13px; }
.pr-qmodal-stats .c b { color: #1f7a57; }
.pr-qmodal-stats .w b { color: #c0392b; }
.pr-qmodal-stats .b b { color: #a97925; }
.pr-qmodal .pr-options { padding: 10px 12px; border-radius: 12px; border: 1px solid #f1e6d7; }
@media (max-width: 900px) {
  .pr-qhead { display: none; }
  .pr-qrow { grid-template-columns: 34px minmax(0, 1fr) 48px; grid-template-areas: "no path disc" "res res res" "opts opts opts"; row-gap: 6px; }
  .pr-qrow .pr-qno { grid-area: no; }
  .pr-qrow .pr-qpath { grid-area: path; }
  .pr-qres { grid-area: res; }
  .pr-qopts { grid-area: opts; }
  .pr-qdisc { grid-area: disc; }
  .pr-qtime { display: none; }
}

/* ================= نتایج آزمون — دور سوم ================= */
.pr-podium-card em b { font-size: 13px; color: #2f2418; font-weight: 800; }
.pr-top-val b { font-weight: 800; color: #3f3224; }
.pr-mix-tile { grid-column: span 2; display: flex; align-items: center; gap: 12px; padding: 10px 12px; }
.pr-mix-ring { position: relative; flex: none; width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center; font-style: normal; outline: none; cursor: default; }
.pr-mix-ring::before { content: ""; position: absolute; inset: 11px; border-radius: 50%; background: #fff; }
.pr-mix-ring b { position: relative; font-size: 15px; color: #2f2418; }
.pr-mix-tile > div { display: grid; gap: 2px; min-width: 0; }
.pr-mix-tile small { font-size: 11px; color: #8a7a64; }
.pr-mix-tile span { display: flex; align-items: center; gap: 6px; font-size: 11.5px; color: #5b4c3a; white-space: nowrap; }
.pr-mix-tile span i { width: 8px; height: 8px; border-radius: 50%; flex: none; }
.pr-mix-tile span b { margin-inline-start: auto; padding-inline-start: 8px; font-size: 12px; }
.pr-mix-tile span.zero { opacity: .45; }
.pr-mix-tile em { font-style: normal; font-size: 10.5px; color: #a3937d; }
.pr-lesson-dist-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 8px; }
.pr-lesson-dist-head b { font-size: 12.5px; color: #5b4c3a; }
.pr-lesson-dist-head .pr-chips button { padding: 5px 11px; }
#prLessonDist .pr-hist { height: 150px; }

.pr-qhead, .pr-qrow { grid-template-columns: 38px minmax(110px, 1fr) 140px repeat(4, 54px) 50px 72px 72px; gap: 8px; }
.pr-qhead .tc { text-align: center; }
.pr-qres { justify-items: center; text-align: center; }
.pr-qres .pr-stack { width: 100%; }
.pr-qres small { justify-content: center; }
.pr-qopts { display: contents; }
.pr-qopts i { height: 28px; font-size: 11.5px; }
.pr-qdiff, .pr-qdisc { display: grid; justify-items: center; gap: 1px; padding: 3px 0; border-radius: 10px; font-size: 11.5px; font-weight: 800; background: #f3f0ea; color: #7d6d58; }
.pr-qdiff small, .pr-qdisc small { font-size: 9.5px; font-weight: 700; opacity: .85; white-space: nowrap; }
.pr-qdiff.veasy { background: #e3f4ea; color: #1f7a57; }
.pr-qdiff.easy { background: #eef8f1; color: #2f8a60; }
.pr-qdiff.medium { background: #fff6e0; color: #a86a14; }
.pr-qdiff.hard { background: #fdeee7; color: #c2552b; }
.pr-qdiff.vhard { background: #fde3e0; color: #b3261e; }
@media (max-width: 1100px) {
  .pr-mix-tile { grid-column: span 1; }
}
@media (max-width: 900px) {
  .pr-qrow { grid-template-columns: 34px minmax(0, 1fr) 66px 66px; grid-template-areas: "no path diff disc" "res res res res" "opts opts opts opts"; }
  .pr-qopts { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; }
  .pr-qdiff { grid-area: diff; }
  .pr-qdisc { grid-area: disc; }
}

/* داشبورد نتایج: نمودار ترکیب، دو نمودار هم‌قد و پوستر قابل انتشار */
.pr-ov-stats { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.pr-ov-stats .pr-mix-tile { grid-column: span 2; }
.pr-ov-stats:not(:has(.tone-ink)) .pr-mix-tile { grid-column: span 3; }
.pr-top-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 5px; }
.pr-top-actions .secondary-button { padding: 6px 10px; font-size: 11.5px; white-space: nowrap; }
.pr-top-actions svg { width: 15px; height: 15px; }
.pr-dist { min-width: 0; }
.pr-dist-block { min-height: 0; }
.pr-heat { min-width: 0; }
@media (min-width: 1101px) {
  .pr-ov-grid > .pr-card { height: 100%; min-width: 0; }
  .pr-dist { display: grid; grid-template-rows: auto minmax(170px, 1fr) minmax(170px, 1fr); }
  .pr-dist-block { display: grid; grid-template-rows: auto minmax(0, 1fr); align-items: stretch; }
  .pr-dist-block .pr-hist, #prLessonDist .pr-hist { height: 100%; }
  #prLessonDist { display: grid; grid-template-rows: auto minmax(0, 1fr); margin-top: 0; }
  .pr-dist-block .pr-lesson-dist-head, #prLessonDist .pr-lesson-dist-head { min-height: 42px; }
  #prLessonDist .pr-chips { flex-wrap: nowrap; overflow-x: auto; max-width: 100%; }
}
.pr-mix-tile { gap: 18px; padding: 12px 18px; min-height: 145px !important; }
.pr-mix-chart { position: relative; flex: none; width: 122px; height: 122px; display: grid; place-items: center; }
.pr-mix-chart svg { width: 100%; height: 100%; overflow: visible; filter: drop-shadow(0 7px 8px rgba(37,39,44,.12)); }
.pr-mix-chart path { cursor: pointer; transform-origin: 80px 80px; transition: transform .2s ease, opacity .2s ease, filter .2s ease; outline: none; }
.pr-mix-chart path:hover, .pr-mix-chart path:focus-visible, .pr-mix-chart path.active { transform: scale(1.045); filter: brightness(1.08); }
.pr-mix-tile.has-active .pr-mix-chart path:not(.active) { opacity: .36; }
.pr-mix-center { position: absolute; inset: 30%; display: grid !important; place-content: center; gap: 0 !important; text-align: center; pointer-events: none; white-space: normal !important; }
.pr-mix-center b { font-size: 20px !important; line-height: 1.1; color: #223344 !important; }
.pr-mix-center small { font-size: 9px !important; white-space: normal; color: #7a8491 !important; line-height: 1.25; }
.pr-mix-details { flex: 1; min-width: 0; display: grid; gap: 7px !important; }
.pr-mix-details > strong { font-size: 13px; color: #293849; }
.pr-mix-legend { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 5px; }
.pr-mix-part { display: grid; grid-template-columns: 9px minmax(0, 1fr); align-items: center; column-gap: 5px; row-gap: 1px; border: 1px solid #e9e4dc; border-radius: 9px; padding: 5px 7px; background: #fff; color: #52606c; font: inherit; text-align: start; cursor: pointer; min-width: 0; transition: border-color .2s, background .2s, opacity .2s; }
.pr-mix-part:hover, .pr-mix-part:focus-visible, .pr-mix-part.active { border-color: #d3b77c; background: #fff9ef; outline: none; }
.pr-mix-tile.has-active .pr-mix-part:not(.active) { opacity: .5; }
.pr-mix-part.zero { opacity: .45; cursor: default; }
.pr-mix-part i { width: 9px !important; height: 9px !important; border-radius: 50%; }
.pr-mix-part span { min-width: 0; overflow: hidden; text-overflow: ellipsis; font-size: 10px !important; white-space: nowrap; }
.pr-mix-part b { grid-column: 2; color: #203142 !important; font-size: 14px !important; line-height: 1; }
.pr-mix-part small { grid-column: 2; font-size: 9px !important; color: #84909b !important; }
.pr-mix-details em { font-size: 10px; }
.pr-poster-shell { width: min(900px, calc(100vw - 24px)); }
.pr-poster-modal { display: grid; justify-items: center; gap: 10px; background: #f5f7f2; }
.pr-poster-toolbar { display: flex; flex-wrap: wrap; width: 100%; gap: 10px; align-items: center; justify-content: space-between; }
.pr-poster-toolbar #prPosterDownload { display: inline-flex; align-items: center; gap: 6px; text-decoration: none; }
.pr-poster-choices { display: flex; flex-wrap: wrap; gap: 6px; }
.pr-poster-choices button { border: 1px solid #d9e5dc; border-radius: 999px; background: #fff; color: #17483e; padding: 7px 13px; font: inherit; font-size: 12px; font-weight: 800; cursor: pointer; }
.pr-poster-choices button.on { background: #17483e; color: #fff; border-color: #17483e; }
.pr-poster-note { width: 100%; margin: 0; font-size: 11px; color: #63756d; }
#prPosterCanvas { display: block; width: min(100%, 540px); height: auto; border-radius: 13px; box-shadow: 0 16px 34px rgba(20,48,42,.16); }
@media (max-width: 900px) {
  .pr-ov-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pr-ov-stats .pr-mix-tile, .pr-ov-stats:not(:has(.tone-ink)) .pr-mix-tile { grid-column: span 2; }
}
@media (max-width: 600px) {
  .pr-mix-tile { gap: 10px; padding: 10px; }
  .pr-mix-chart { width: 106px; height: 106px; }
  .pr-mix-legend { grid-template-columns: 1fr; }
  .pr-mix-part { grid-template-columns: 9px minmax(0, 1fr) auto auto; }
  .pr-mix-part b, .pr-mix-part small { grid-column: auto; }
  .pr-top-actions { justify-content: flex-start; }
  .pr-top > header { flex-wrap: wrap; }
}

/* ================= نتایج آزمون — ردیف فشردهٔ کاشی‌ها و نمودار ترکیب ================= */
.rr-ov-stats.pr-ov-stats { grid-template-columns: minmax(150px, 1.25fr) repeat(2, minmax(104px, 1fr)) minmax(210px, 1.55fr) repeat(2, minmax(104px, 1fr)); gap: 8px; align-items: stretch; }
.rr-ov-stats.pr-ov-stats:not(:has(.tone-ink)) { grid-template-columns: minmax(150px, 1.25fr) repeat(2, minmax(104px, 1fr)) minmax(210px, 1.55fr) minmax(104px, 1fr); }
.rr-ov-stats.pr-ov-stats > article,
.rr-ov-stats.pr-ov-stats > article.hero,
.rr-ov-stats.pr-ov-stats > .pr-mix-tile,
.rr-ov-stats.pr-ov-stats:not(:has(.tone-ink)) > .pr-mix-tile { grid-column: auto; min-height: 72px !important; padding: 9px 11px; }
.pr-ov-stats .pr-mix-tile { display: flex; align-items: center; gap: 10px; }
.pr-ov-stats .pr-mix-chart { position: relative; flex: none; width: 58px; height: 58px; display: block; }
.pr-ov-stats .pr-mix-chart svg { width: 100%; height: 100%; overflow: visible; filter: none; }
.pr-mix-track { fill: none; stroke: #f1e8dc; stroke-width: 8; }
.pr-mix-arc { fill: none; stroke-width: 8; cursor: pointer; outline: none; transition: stroke-width .18s ease, opacity .18s ease; }
.pr-mix-arc:hover, .pr-mix-arc:focus-visible, .pr-mix-arc.active { stroke-width: 10.5; }
.pr-mix-tile.has-active .pr-mix-arc:not(.active) { opacity: .3; }
.pr-ov-stats .pr-mix-center { position: absolute; inset: 0; display: grid !important; place-content: center; text-align: center; pointer-events: none; }
.pr-ov-stats .pr-mix-center b { font-size: 15px !important; line-height: 1; color: #2f2418 !important; }
.pr-ov-stats .pr-mix-center small { display: none; }
.pr-ov-stats .pr-mix-details { flex: 1; min-width: 0; display: grid; gap: 3px !important; }
.pr-ov-stats .pr-mix-title { color: var(--muted); font-size: 10.5px; font-weight: 800; }
.pr-ov-stats .pr-mix-legend { display: grid; grid-template-columns: 1fr; gap: 1px; }
.pr-mix-key { display: flex !important; align-items: center; gap: 5px; font-size: 10.5px !important; color: #5b4c3a !important; white-space: nowrap; border-radius: 6px; padding: 0 3px; transition: background .15s, opacity .15s; }
.pr-mix-key i { width: 7px; height: 7px; border-radius: 50%; flex: none; }
.pr-mix-key b { margin-inline-start: auto; font-size: 11.5px !important; color: #2f2418 !important; }
.pr-mix-tile.has-active .pr-mix-key:not(.active) { opacity: .4; }
.pr-mix-key.active { background: #fbf4ea; }
.pr-ov-stats .pr-mix-details em { font-style: normal; font-size: 9.5px; color: #a3937d; }
/* ستون‌بندی بر اساس پهنای خودِ «وضعیت کلی» (نه پنجره)، چون نوار کناری پهنای واقعی را کم می‌کند */
.pr-overview { container: pr-overview / inline-size; }
@container pr-overview (max-width: 860px) {
  .rr-ov-stats.pr-ov-stats, .rr-ov-stats.pr-ov-stats:not(:has(.tone-ink)) { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@container pr-overview (max-width: 520px) {
  .rr-ov-stats.pr-ov-stats, .rr-ov-stats.pr-ov-stats:not(:has(.tone-ink)) { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .rr-ov-stats.pr-ov-stats > .pr-mix-tile,
  .rr-ov-stats.pr-ov-stats > article.hero { grid-column: 1 / -1; }
}
\n
/* ترکیب شرکت‌کنندگان: فقط نمودار؛ نام و سهم گروه روی نشانگر کنار نمودار */
.pr-ov-stats .pr-mix-chart { width: 62px; height: 62px; }
/* ارتفاعِ ثابتِ دوخطی: متنِ هاور (نامِ بخش و درصد) کادر را بالا و پایین نمی‌برد. */
.pr-mix-hint { display: grid !important; gap: 1px; white-space: normal !important; line-height: 1.45; height: 2.9em; overflow: hidden; align-content: start; }
.pr-mix-hint b { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.pr-mix-hint b { font-size: 10.5px; font-weight: 850; color: #5b4c3a; }
.pr-mix-hint small { font-size: 9.5px; font-weight: 700; color: #a3937d; }
.pr-mix-tile.has-active .pr-mix-hint { color: #2f2418 !important; font-weight: 800; }
.pr-mix-tile.has-active .pr-mix-hint b { color: #2f2418; }
.pr-mix-tile.has-active .pr-mix-hint small { color: #7a674f; }

/* برترین‌ها در عرض کم: سه نفر در یک ردیف به شکل سکو (۲ · ۱ · ۳)، جمع‌وجور */
@container pr-overview (max-width: 620px) {
  .pr-podium { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; align-items: end; }
  .pr-podium-card { padding: 22px 4px 8px; gap: 2px; border-radius: 12px; }
  .pr-podium-card.r1 { order: 2; padding-top: 30px; }
  .pr-podium-card.r2 { order: 1; }
  .pr-podium-card.r3 { order: 3; }
  .pr-podium-card .pr-avatar { width: 40px; height: 40px; font-size: 15px; margin-bottom: 2px; box-shadow: 0 0 0 2px #fff, 0 0 0 3.5px #efe0cb; }
  .pr-podium-card.r1 .pr-avatar { width: 48px; height: 48px; box-shadow: 0 0 0 2px #fff, 0 0 0 3.5px #f5c15c; }
  .pr-podium-card.r2 .pr-avatar { box-shadow: 0 0 0 2px #fff, 0 0 0 3.5px #b8c2cc; }
  .pr-podium-card.r3 .pr-avatar { box-shadow: 0 0 0 2px #fff, 0 0 0 3.5px #e0a878; }
  .pr-podium-card > b { font-size: 11px; max-width: 100%; white-space: normal; overflow: hidden; text-overflow: clip; line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; text-align: center; }
  .pr-podium-card strong { font-size: 15px; margin-top: 2px; }
  .pr-podium-card em b { font-size: 11px; }
  .pr-medal { width: 20px; height: 20px; font-size: 10.5px; top: 5px; inset-inline-start: 5px; }
}

/* عدد وسط حلقه: پدینگِ ارث‌رسیده از `.pr-mix-tile span b` (کلید قدیمی) آن را ۴px کج می‌کرد؛
   ارقام فارسی دنباله ندارند و ۱٫۶px بالاتر از مرکز می‌نشستند — هر دو اندازه‌گیری‌شده. */
.pr-ov-stats .pr-mix-center b { padding: 0 !important; margin: 0 !important; line-height: 1 !important; transform: translateY(1.6px); }

/* ═══ پنل آموزشی: داشبورد و گزارش فعالیت (edu-*) ═══════════════════════════ */
.edash, .edu-report { display: grid; gap: 15px; min-width: 0; }
.edash > *, .edu-report > * { min-width: 0; margin-bottom: 0; }
.edu-head { margin-bottom: 0; flex-wrap: wrap; }
.edu-head p { max-width: 640px; }
.edu-head .head-actions { display: flex; flex-wrap: wrap; gap: 8px; }

.edu-card {
  display: grid; gap: 12px; align-content: start; min-width: 0;
  padding: 16px 17px; border: 1px solid var(--line);
  border-radius: var(--radius); background: var(--panel); box-shadow: var(--shadow);
}
.edu-card > header { display: flex; align-items: center; gap: 10px; min-width: 0; }
.edu-card > header > div { min-width: 0; flex: 1; }
.edu-card > header h3 { margin: 0; font-size: 13.5px; line-height: 1.7; }
.edu-card > header small { display: block; color: var(--muted); font-size: 11px; line-height: 1.6; }
.edu-card-icon {
  display: grid; place-items: center; width: 34px; height: 34px; flex: none;
  border-radius: 11px; background: var(--panel-soft); color: var(--muted);
}
.edu-card-icon .ui-icon { width: 17px; height: 17px; }
.edu-card-icon.orange { background: var(--orange-soft); color: var(--orange); }
.edu-card-icon.teal { background: var(--teal-soft); color: var(--teal); }
.edu-card-icon.blue { background: var(--blue-soft); color: var(--blue); }
.edu-card-icon.purple { background: var(--purple-soft); color: var(--purple); }
.edu-card-icon.red { background: var(--red-soft); color: var(--red); }
.edu-card-icon.yellow { background: var(--yellow-soft); color: var(--yellow); }
.edu-card-link {
  display: inline-flex; align-items: center; gap: 2px; flex: none; cursor: pointer;
  color: var(--orange); font-size: 11.5px; font-weight: 700; white-space: nowrap;
}
.edu-card-link .ui-icon { width: 14px; height: 14px; }
.edu-muted { margin: 0; color: var(--muted); font-size: 11.5px; line-height: 1.8; }
.edu-empty-chart {
  display: grid; justify-items: center; gap: 8px; padding: 22px 12px; text-align: center;
  color: var(--muted); font-size: 12px; line-height: 1.8;
}
.edu-empty-chart > .ui-icon { width: 26px; height: 26px; opacity: .55; }

/* کاشی‌های خلاصه */
.edu-kpis { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.edu-kpi {
  display: flex; align-items: center; gap: 12px; min-width: 0; padding: 14px 15px;
  border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel);
  box-shadow: var(--shadow); font: inherit; color: inherit; text-align: start; cursor: pointer;
  transition: border-color .15s ease, transform .15s ease;
}
.edu-kpi:not(.static):hover { border-color: color-mix(in srgb, var(--orange) 35%, var(--line)); transform: translateY(-1px); }
.edu-kpi.static { cursor: default; }
.edu-kpi-icon { display: grid; place-items: center; width: 42px; height: 42px; flex: none; border-radius: 13px; }
.edu-kpi-icon .ui-icon { width: 20px; height: 20px; }
.edu-kpi.orange .edu-kpi-icon { background: var(--orange-soft); color: var(--orange); }
.edu-kpi.teal .edu-kpi-icon { background: var(--teal-soft); color: var(--teal); }
.edu-kpi.blue .edu-kpi-icon { background: var(--blue-soft); color: var(--blue); }
.edu-kpi.purple .edu-kpi-icon { background: var(--purple-soft); color: var(--purple); }
.edu-kpi-copy { display: grid; min-width: 0; }
.edu-kpi-copy small { color: var(--muted); font-size: 11px; }
.edu-kpi-copy b { font-size: 21px; line-height: 1.45; }
.edu-kpi-copy em { overflow: hidden; color: var(--muted); font-size: 10.5px; font-style: normal; text-overflow: ellipsis; white-space: nowrap; }
/* روی گوشی چهار کاشیِ تمام‌عرض یک صفحهٔ کامل را می‌گرفتند؛ دوتایی و بی‌آیکون. */
@media (max-width: 560px) {
  .edu-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
  .edu-kpi { padding: 11px 12px; }
  .edu-kpi-icon { display: none; }
  .edu-kpi-copy b { font-size: 18px; }
  .edu-kpi-copy em { white-space: normal; line-height: 1.6; }
  .edu-head .head-actions { width: 100%; }
  .edu-head .head-actions > button { flex: 1 1 0; justify-content: center; }
}

/* کارهای امروز */
.edu-todo { padding: 14px 16px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); box-shadow: var(--shadow); }
.edu-todo > header { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.edu-todo > header h3 { margin: 0; font-size: 13.5px; }
.edu-todo ul { display: grid; gap: 7px; margin: 0; padding: 0; list-style: none; }
.edu-todo li {
  display: flex; align-items: center; gap: 10px; min-width: 0; padding: 8px 10px;
  border-radius: 12px; background: var(--panel-soft); border-inline-start: 3px solid var(--line);
}
.edu-todo li.orange { border-inline-start-color: var(--orange); }
.edu-todo li.teal { border-inline-start-color: var(--teal); }
.edu-todo li.blue { border-inline-start-color: var(--blue); }
.edu-todo li.purple { border-inline-start-color: var(--purple); }
.edu-todo li.red { border-inline-start-color: var(--red); }
.edu-todo-icon { display: grid; place-items: center; flex: none; color: var(--muted); }
.edu-todo-icon .ui-icon { width: 16px; height: 16px; }
.edu-todo li p { flex: 1; min-width: 0; margin: 0; font-size: 12px; line-height: 1.8; }
.edu-todo li .ghost-button { flex: none; white-space: nowrap; font-size: 11.5px; }
.edu-todo li .ghost-button .ui-icon { width: 13px; height: 13px; }
/* متنِ کار تمام‌عرض می‌ماند و دکمه زیرش می‌نشیند؛ ستونِ باریک متن را چهارخطی می‌کرد.
   ⚠️ باید **بعد از** قاعده‌های پایهٔ بالا بیاید: هم‌وزن‌اند و `flex: 1` پایه، اگر
   پایین‌تر بنشیند، flex-basis این بلوک را بی‌صدا خنثی می‌کند (یک بار همین شد). */
@media (max-width: 560px) {
  .edu-todo li { flex-wrap: wrap; align-items: flex-start; }
  .edu-todo li p { flex-basis: calc(100% - 28px); }
  .edu-todo li .ghost-button { margin-inline-start: auto; }
}

/* گریدِ داشبورد */
.edash-grid { display: grid; gap: 15px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.edash-activity { grid-column: 1 / -1; }
@media (max-width: 900px) { .edash-grid { grid-template-columns: minmax(0, 1fr); } }

/* نمودارِ ستونی فعالیت */
.edu-bars { position: relative; display: flex; align-items: stretch; gap: 3px; height: 190px; padding-top: 6px; }
/* خطِ نرمِ دانش‌آموزِ فعال: همان ناحیهٔ ستون‌ها (منهای ۶px بالا و ردیفِ ۱۸pxیِ برچسب) */
.edu-bars-line { position: absolute; top: 6px; left: 0; z-index: 1; width: 100%; height: calc(100% - 24px); overflow: visible; pointer-events: none; }
.edu-bars-line .line { fill: none; stroke: var(--orange); stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.edu-bars-line .area { fill: color-mix(in srgb, var(--orange) 9%, transparent); stroke: none; }
.edu-bars.compact { height: 150px; }
.edu-bars.mini { height: 70px; gap: 2px; }
.edu-bar-col { display: grid; grid-template-rows: minmax(0, 1fr) auto; flex: 1 1 0; min-width: 0; gap: 4px; }
.edu-bar-track { position: relative; display: flex; align-items: flex-end; justify-content: center; border-bottom: 1px solid var(--line); }
.edu-bar { display: block; width: min(100%, 22px); border-radius: 5px 5px 2px 2px; background: color-mix(in srgb, var(--blue) 70%, #fff); transition: height .4s ease; }
.edu-bar-col:hover .edu-bar { background: var(--blue); }
.edu-bar-active {
  position: absolute; inset-inline-start: 50%; width: 7px; height: 7px; margin-inline-start: -3.5px; margin-bottom: -3.5px;
  border: 2px solid var(--panel); border-radius: 50%; background: var(--orange); z-index: 2;
}
.edu-bar-col:hover .edu-bar-active { transform: scale(1.35); }
.edu-bar-col small { height: 14px; overflow: visible; color: var(--muted); font-size: 9.5px; text-align: center; white-space: nowrap; }
.edu-bars.mini .edu-bar-col { grid-template-rows: minmax(0, 1fr); }
.edu-legend { display: flex; flex-wrap: wrap; gap: 14px; color: var(--muted); font-size: 11px; }
.edu-legend span { display: inline-flex; align-items: center; gap: 6px; }
.edu-legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; }
.edu-legend i.bar { background: color-mix(in srgb, var(--blue) 70%, #fff); }
.edu-legend i.dot { border-radius: 50%; background: var(--orange); }
.edu-legend i.line { position: relative; width: 18px; height: 3px; border-radius: 2px; background: var(--orange); }
.edu-legend i.line::after { content: ""; position: absolute; top: 50%; left: 50%; width: 7px; height: 7px; margin: -3.5px 0 0 -3.5px; border-radius: 50%; background: var(--orange); }
.edu-legend i.c { background: var(--teal); }
.edu-legend i.w { background: var(--red); }
.edu-legend i.b { background: #d9d5cc; }
.edu-legend i.avg { width: 3px; height: 12px; border-radius: 2px; background: var(--ink); }

/* نوار درصد */
.edu-pbar { position: relative; display: block; height: 7px; min-width: 60px; overflow: hidden; border-radius: 99px; background: var(--line); }
.edu-pbar > i { position: absolute; inset-block: 0; inset-inline-start: 0; border-radius: inherit; background: var(--muted); }
.edu-pbar.good > i { background: var(--teal); }
.edu-pbar.mid > i { background: var(--yellow); }
.edu-pbar.low > i { background: var(--red); }
em.good, .edu-cell-bar em.good { color: var(--teal); }
em.mid, .edu-cell-bar em.mid { color: var(--yellow); }
em.low, .edu-cell-bar em.low { color: var(--red); }
em.none { color: var(--muted); }

/* فهرستِ آزمون */
.edu-exams { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.edu-exam {
  display: grid; align-items: center; gap: 12px; min-width: 0; padding: 10px 12px;
  grid-template-columns: minmax(0, 1.4fr) minmax(120px, 1fr) auto auto;
  border: 1px solid var(--line); border-radius: 13px; background: var(--panel-soft);
}
.edu-exam-main { display: grid; gap: 3px; min-width: 0; }
.edu-exam-main b { overflow: hidden; font-size: 12.5px; text-overflow: ellipsis; white-space: nowrap; }
.edu-exam-main small, .edu-exam-part small, .edu-exam-score small { color: var(--muted); font-size: 10.5px; }
.edu-exam-main small { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.edu-exam-part { display: grid; gap: 4px; min-width: 0; }
.edu-exam-score { display: grid; justify-items: center; min-width: 52px; }
.edu-exam-score b { font-size: 14px; }
.edu-chip { padding: 1px 8px; border-radius: 99px; font-size: 10px; font-style: normal; font-weight: 700; }
.edu-chip.live { background: var(--teal-soft); color: var(--teal); }
.edu-chip.upcoming { background: var(--blue-soft); color: var(--blue); }
.edu-chip.ended { background: var(--panel); color: var(--muted); border: 1px solid var(--line); }
@media (max-width: 620px) {
  .edu-exam { grid-template-columns: minmax(0, 1fr) auto; }
  .edu-exam-part { grid-column: 1 / -1; grid-row: 2; }
  .edu-exam .icon-button { grid-row: 1; grid-column: 2; }
  .edu-exam-score { display: none; }
}

/* نیازمند توجه */
.edu-two-lists { display: grid; gap: 14px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.edu-two-lists h4 { margin: 0 0 6px; color: var(--muted); font-size: 11.5px; }
@media (max-width: 520px) { .edu-two-lists { grid-template-columns: minmax(0, 1fr); } }
.edu-mini-list { display: grid; gap: 4px; margin: 0; padding: 0; list-style: none; }
.edu-mini-list button {
  display: flex; align-items: center; gap: 8px; width: 100%; min-width: 0; padding: 5px 6px;
  border: 0; border-radius: 10px; background: transparent; font: inherit; color: inherit; text-align: start; cursor: pointer;
}
.edu-mini-list button:hover { background: var(--panel-soft); }
.edu-mini-list .avatar, .edu-person .avatar { width: 30px; height: 30px; flex: none; font-size: 11px; }
.edu-mini-list span, .edu-person > span { display: grid; min-width: 0; }
.edu-mini-list b, .edu-person b { overflow: hidden; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.edu-mini-list small, .edu-person small { overflow: hidden; color: var(--muted); font-size: 10.5px; text-overflow: ellipsis; white-space: nowrap; }

/* مباحث ضعیف */
.edu-topic-list { display: grid; gap: 9px; margin: 0; padding: 0; list-style: none; }
.edu-topic-list li { display: grid; align-items: center; gap: 4px 12px; grid-template-columns: minmax(0, 1fr) 90px 44px; }
.edu-topic-list li > div { display: grid; min-width: 0; }
.edu-topic-list b { overflow: hidden; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.edu-topic-list small { overflow: hidden; color: var(--muted); font-size: 10.5px; text-overflow: ellipsis; white-space: nowrap; }
.edu-topic-list em { font-size: 12px; font-style: normal; font-weight: 800; text-align: end; }

/* درآمد */
.edu-income { display: grid; gap: 10px; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.edu-income > div { display: grid; gap: 2px; padding: 10px; border-radius: 12px; background: var(--panel-soft); }
.edu-income small { color: var(--muted); font-size: 10.5px; }
.edu-income b { font-size: 15px; }
.edu-income i { color: var(--muted); font-size: 10px; font-style: normal; font-weight: 400; }
@media (max-width: 520px) { .edu-income { grid-template-columns: minmax(0, 1fr); } }

/* صفحهٔ گزارش */
.edu-report-filters { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.edu-seg { display: inline-flex; padding: 3px; border: 1px solid var(--line); border-radius: 12px; background: var(--panel); }
.edu-seg button { padding: 6px 12px; border: 0; border-radius: 9px; background: transparent; color: var(--muted); font: inherit; font-size: 12px; cursor: pointer; }
.edu-seg button.on { background: var(--orange); color: #fff; font-weight: 700; }
.edu-select { display: inline-flex; align-items: center; gap: 6px; padding: 0 10px; border: 1px solid var(--line); border-radius: 12px; background: var(--panel); color: var(--muted); }
.edu-select .ui-icon { width: 15px; height: 15px; }
.edu-select select { min-height: 36px; border: 0; background: transparent; color: var(--ink); font: inherit; font-size: 12px; outline: 0; }
.edu-report .exam-hub-tabs { margin-bottom: 0; }
/* تبِ گزارش آیکون ندارد، پس نیازی به فاصلهٔ داخلیِ آیکون/متن نیست. */
.edu-report-tabs .exam-hub-tab { gap: 0; }
/* بدنهٔ گزارش چند بخشِ پشت‌سرهم دارد (کارت‌های عدد، شبکهٔ نمودارها، جدول‌ها).
   بدون این، ردیفِ KPI دقیقاً به کارتِ زیرش می‌چسبید — `.edu-report` فقط به
   خودِ این ظرف gap می‌دهد، نه به بچه‌هایش. */
.edu-report-body { display: grid; gap: 15px; align-content: start; min-width: 0; }
.edu-report-body > * { min-width: 0; }
/* گوشی: قاعدهٔ عمومیِ تب‌ها `auto-fit, minmax(130px)` است و سه تب را ۲+۱ می‌شکند.
   اینجا تعداد تب‌ها ثابت و سه‌تاست، پس سه ستونِ مساوی هم جا می‌شود هم نمی‌شکند.
   ویژگیِ دوتایی لازم است تا از بلوکِ ۷۶۰px که پایین‌تر می‌آید جلو بزند. */
@media (max-width: 760px) {
  .edu-report .exam-hub-tabs.edu-report-tabs { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .edu-report .exam-hub-tabs.edu-report-tabs .exam-hub-tab { padding-inline: 4px; font-size: 11.5px; }
}
.edu-report-grid { display: grid; gap: 15px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.edu-report-grid .span-2 { grid-column: 1 / -1; }
@media (max-width: 900px) { .edu-report-grid { grid-template-columns: minmax(0, 1fr); } }

.edu-stack { display: flex; height: 16px; overflow: hidden; border-radius: 99px; background: var(--line); }
.edu-stack i, .edu-stack-legend i { display: block; }
.edu-stack i + i { border-inline-start: 2px solid var(--panel); }
.edu-stack .steady, .edu-stack-legend .steady { background: var(--teal); }
.edu-stack .some, .edu-stack-legend .some { background: color-mix(in srgb, var(--teal) 45%, #fff); }
.edu-stack .idle, .edu-stack-legend .idle { background: var(--yellow); }
.edu-stack .never, .edu-stack-legend .never { background: #d9d5cc; }
.edu-stack-legend { display: grid; gap: 7px; margin: 0; padding: 0; list-style: none; }
.edu-stack-legend li { display: grid; align-items: center; gap: 8px; grid-template-columns: 10px minmax(0, 1fr) auto; }
.edu-stack-legend li i { width: 10px; height: 10px; border-radius: 3px; }
.edu-stack-legend span { display: grid; min-width: 0; }
.edu-stack-legend b { font-size: 12px; }
.edu-stack-legend small { color: var(--muted); font-size: 10.5px; }
.edu-stack-legend em { font-size: 12px; font-style: normal; font-weight: 700; }

.edu-hist { display: flex; align-items: stretch; gap: 8px; height: 170px; }
.edu-hist > div { display: grid; grid-template-rows: minmax(0, 1fr) auto; flex: 1 1 0; gap: 6px; min-width: 0; }
.edu-hist span {
  align-self: end; display: grid; place-items: start center; min-height: 2px; padding-top: 3px;
  border-radius: 7px 7px 2px 2px; background: color-mix(in srgb, var(--purple) 65%, #fff);
  color: #fff; font-size: 11px; font-weight: 700;
}
.edu-hist small { color: var(--muted); font-size: 10px; text-align: center; white-space: nowrap; }

.edu-lessons { display: grid; gap: 10px; margin: 0; padding: 0; list-style: none; }
.edu-lessons li { display: grid; align-items: center; gap: 2px 12px; grid-template-columns: 120px minmax(0, 1fr) 52px; }
.edu-lessons li b { overflow: hidden; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.edu-lessons li em { font-size: 13px; font-style: normal; font-weight: 800; text-align: end; }
.edu-lessons li small { grid-column: 2 / -1; color: var(--muted); font-size: 10.5px; }
.edu-split { display: flex; height: 12px; overflow: hidden; border-radius: 99px; background: var(--line); }
.edu-split i { display: block; }
.edu-split i.c { background: var(--teal); }
.edu-split i.w { background: var(--red); }
.edu-split i.b { background: #d9d5cc; }
@media (max-width: 520px) { .edu-lessons li { grid-template-columns: 84px minmax(0, 1fr) 46px; } }

.edu-table-wrap { overflow-x: auto; margin-inline: -4px; }
.edu-table { width: 100%; border-collapse: collapse; font-size: 12px; }
.edu-table th { padding: 8px; border-bottom: 1px solid var(--line); color: var(--muted); font-size: 11px; font-weight: 600; text-align: start; white-space: nowrap; }
.edu-table td { padding: 9px 8px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.edu-table td.num { white-space: nowrap; }
.edu-table td small { display: block; color: var(--muted); font-size: 10.5px; }
.edu-cell-bar { display: grid; align-items: center; gap: 8px; grid-template-columns: minmax(60px, 110px) 44px; }
.edu-cell-bar em { font-style: normal; font-weight: 800; }
.edu-sort { display: inline-flex; align-items: center; gap: 3px; padding: 0; border: 0; background: none; color: inherit; font: inherit; cursor: pointer; }
.edu-sort .ui-icon { width: 11px; height: 11px; opacity: 0; }
.edu-sort.on { color: var(--ink); font-weight: 700; }
.edu-sort.on .ui-icon { opacity: 1; }

.edu-students { gap: 10px; }
.edu-students-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.edu-students-bar .qset-search { flex: 1 1 240px; max-width: 360px; margin: 0; }
.edu-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.edu-chips button { padding: 5px 11px; border: 1px solid var(--line); border-radius: 99px; background: var(--panel); color: var(--muted); font: inherit; font-size: 11.5px; cursor: pointer; }
.edu-chips button.on { border-color: var(--orange); background: var(--orange-soft); color: var(--orange); font-weight: 700; }
.edu-student-table { min-width: 760px; }
.edu-student-table tbody tr[data-edu-row] { cursor: pointer; }
.edu-student-table tbody tr[data-edu-row]:hover { background: var(--panel-soft); }
.edu-student-table tbody tr.open { background: var(--orange-soft); }
.edu-person { display: flex; align-items: center; gap: 8px; min-width: 170px; }
.edu-idle { color: var(--red); font-weight: 700; }
.edu-row-toggle .ui-icon { transition: transform .2s ease; }
tr.open .edu-row-toggle .ui-icon { transform: rotate(180deg); }
.edu-spark { display: inline-flex; align-items: flex-end; gap: 1px; width: 92px; height: 24px; }
.edu-spark i { flex: 1 1 0; min-width: 1px; border-radius: 1px; background: var(--blue); }
.edu-spark i.zero { background: var(--line); }
.edu-spark.empty { border-bottom: 1px dashed var(--line); }
.edu-detail-row > td { padding: 0 !important; background: var(--panel-soft); }
.edu-detail { display: grid; gap: 16px; padding: 14px; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); }
@media (max-width: 760px) { .edu-detail { grid-template-columns: minmax(0, 1fr); } }
.edu-detail-block { display: grid; gap: 10px; align-content: start; min-width: 0; }
.edu-detail-block h4 { display: flex; align-items: center; gap: 6px; margin: 0; font-size: 12px; }
.edu-detail-block h4 .ui-icon { width: 15px; height: 15px; color: var(--muted); }
.edu-compare { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.edu-compare li { display: grid; align-items: center; gap: 2px 10px; grid-template-columns: 96px minmax(0, 1fr) 46px; }
.edu-compare li b { overflow: hidden; font-size: 11.5px; text-overflow: ellipsis; white-space: nowrap; }
.edu-compare li em { font-style: normal; font-weight: 800; text-align: end; }
.edu-compare li small { grid-column: 2 / -1; color: var(--muted); font-size: 10px; }
.edu-compare-track { position: relative; height: 10px; border-radius: 99px; background: var(--line); }
.edu-compare-track i.me { position: absolute; inset-block: 0; inset-inline-start: 0; border-radius: inherit; background: var(--muted); }
.edu-compare-track i.me.good { background: var(--teal); }
.edu-compare-track i.me.mid { background: var(--yellow); }
.edu-compare-track i.me.low { background: var(--red); }
.edu-compare-track i.avg { position: absolute; top: -3px; bottom: -3px; width: 3px; margin-inline-start: -1.5px; border-radius: 2px; background: var(--ink); }
.edu-facts { display: grid; gap: 6px; margin: 0; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.edu-facts > div { padding: 8px; border-radius: 10px; background: var(--panel); }
.edu-facts dt { color: var(--muted); font-size: 10px; }
.edu-facts dd { margin: 2px 0 0; font-size: 12px; font-weight: 700; }

.edu-exam-trend { display: flex; align-items: stretch; gap: 10px; min-height: 210px; overflow-x: auto; padding-bottom: 4px; }
.edu-exam-trend button {
  display: grid; grid-template-rows: minmax(120px, 1fr) auto auto auto; flex: 0 0 86px; gap: 3px; justify-items: center;
  padding: 0; border: 0; background: none; font: inherit; color: inherit; cursor: pointer;
}
.edu-exam-trend-track { display: flex; align-items: flex-end; width: 34px; border-bottom: 1px solid var(--line); }
.edu-exam-trend-track i { display: block; width: 100%; border-radius: 7px 7px 2px 2px; background: var(--muted); }
.edu-exam-trend-track i.good { background: var(--teal); }
.edu-exam-trend-track i.mid { background: var(--yellow); }
.edu-exam-trend-track i.low { background: var(--red); }
.edu-exam-trend b { font-size: 12px; }
.edu-exam-trend small { max-width: 86px; overflow: hidden; color: var(--ink); font-size: 10.5px; text-overflow: ellipsis; white-space: nowrap; }
.edu-exam-trend em { color: var(--muted); font-size: 10px; font-style: normal; }

/* ═══ آزمون ویژهٔ دانش‌آموز (spx-*) ═══════════════════════════════════════ */
.spx { display: grid; gap: 14px; }
.spx .exam-panel-head { align-items: flex-start; gap: 12px; flex-wrap: wrap; }
.spx-steps { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; color: var(--muted); font-size: 11.5px; }
.spx-steps span { display: inline-flex; align-items: center; gap: 6px; }
.spx-steps span b { display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: var(--line); color: var(--muted); font-size: 11px; }
.spx-steps span.on { color: var(--ink); font-weight: 700; }
.spx-steps span.on b { background: var(--orange); color: #fff; }
.spx-steps span.done b { background: var(--teal); color: #fff; }
.spx-steps i { width: 24px; height: 1px; background: var(--line); }
.spx-search { max-width: 420px; margin: 0; }
.spx-students { display: grid; gap: 8px; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); }
.spx-student {
  display: flex; align-items: center; gap: 10px; min-width: 0; padding: 10px 12px;
  border: 1px solid var(--line); border-radius: 13px; background: var(--panel); font: inherit; color: inherit; text-align: start; cursor: pointer;
  transition: border-color .15s ease, background .15s ease;
}
.spx-student:hover { border-color: color-mix(in srgb, var(--orange) 40%, var(--line)); background: var(--orange-soft); }
.spx-student .avatar { width: 36px; height: 36px; flex: none; }
.spx-student-copy { display: grid; flex: 1; min-width: 0; }
.spx-student-copy b, .spx-student-copy small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.spx-student-copy b { font-size: 12.5px; }
.spx-student-copy small { color: var(--muted); font-size: 10.5px; }
.spx-student-stat { display: grid; justify-items: end; flex: none; }
.spx-student-stat em { font-size: 13px; font-style: normal; font-weight: 800; }
.spx-student-stat small { color: var(--muted); font-size: 10px; }

.spx-profile { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 24px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 14px; background: var(--panel-soft); }
.spx-profile .avatar { width: 42px; height: 42px; }
.spx-facts { display: flex; flex-wrap: wrap; gap: 8px 22px; margin: 0; }
.spx-facts dt { color: var(--muted); font-size: 10.5px; }
.spx-facts dd { margin: 2px 0 0; font-size: 14px; font-weight: 800; }
.spx-facts dd.good { color: var(--teal); }
.spx-facts dd.mid { color: var(--yellow); }
.spx-facts dd.low { color: var(--red); }
.spx > .edu-muted .ui-icon { width: 13px; height: 13px; vertical-align: -2px; }

.spx-lessons { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: 11.5px; color: var(--muted); }
.spx-lessons button { display: inline-flex; align-items: center; gap: 6px; padding: 5px 11px; border: 1px solid var(--line); border-radius: 99px; background: var(--panel); color: var(--ink); font: inherit; font-size: 11.5px; cursor: pointer; }
.spx-lessons button em { font-style: normal; font-weight: 800; }
.spx-lessons button.on { border-color: var(--orange); background: var(--orange-soft); }
.spx-lessons button.clear { color: var(--muted); }

/* فقط داخل پنل آموزشی (.spx): تحلیل درس در پروفایل هم «.spx-grid» دارد و
   این قاعدهٔ بعدی چیدمانِ نصف‌به‌نصفِ آن را به «ستون + ۳۰۰px» تبدیل می‌کرد. */
.spx .spx-grid { display: grid; gap: 14px; grid-template-columns: minmax(0, 1fr) 300px; align-items: start; }
@media (max-width: 960px) { .spx .spx-grid { grid-template-columns: minmax(0, 1fr); } }
.spx-main { display: grid; gap: 12px; min-width: 0; }
.spx-section { display: grid; gap: 12px; padding: 14px; border: 1px solid var(--line); border-radius: 14px; background: var(--panel); }
.spx-section.on { border-color: color-mix(in srgb, var(--orange) 30%, var(--line)); }
.spx-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; }
.spx-count { display: inline-flex; align-items: center; gap: 7px; color: var(--muted); font-size: 11.5px; }
.spx-count input { width: 64px; min-height: 34px; padding: 0 8px; border: 1px solid var(--line); border-radius: 9px; background: var(--panel); color: var(--ink); font: inherit; font-size: 13px; text-align: center; }
.spx-count small { font-size: 11px; }

.spx-chapters { display: grid; gap: 6px; max-height: 420px; margin: 0; padding: 0; overflow-y: auto; list-style: none; }
.spx-chapters li {
  display: grid; align-items: center; gap: 4px 12px; padding: 8px 10px;
  grid-template-columns: minmax(0, 1fr) 90px 44px 96px; border: 1px solid var(--line); border-radius: 11px; background: var(--panel-soft);
}
.spx-chapters li.on { border-color: color-mix(in srgb, var(--orange) 40%, var(--line)); background: var(--orange-soft); }
.spx-chapters li.empty { opacity: .6; }
.spx-chapters label { display: flex; align-items: center; gap: 8px; min-width: 0; cursor: pointer; }
.spx-chapters label input { flex: none; width: 16px; height: 16px; accent-color: var(--orange); }
.spx-chapters label span { display: grid; min-width: 0; }
.spx-chapters label b, .spx-chapters label small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.spx-chapters label b { font-size: 12px; }
.spx-chapters label small { color: var(--muted); font-size: 10.5px; }
.spx-chapters li > em { font-style: normal; font-weight: 800; font-size: 12px; text-align: end; }
.spx-cand { color: var(--muted); font-size: 10.5px; text-align: end; white-space: nowrap; }
@media (max-width: 620px) {
  .spx-chapters li { grid-template-columns: minmax(0, 1fr) 44px; }
  .spx-chapters li .edu-pbar { grid-column: 1 / -1; grid-row: 2; }
  .spx-cand { grid-column: 1 / -1; text-align: start; }
}

.spx-summary {
  position: sticky; top: 84px; display: grid; gap: 12px; padding: 14px; border: 1px solid var(--line);
  border-radius: 14px; background: var(--panel); box-shadow: var(--shadow);
}
@media (max-width: 960px) { .spx-summary { position: static; } }
.spx-summary h3 { display: flex; align-items: center; gap: 6px; margin: 0; font-size: 13px; }
.spx-summary h3 .ui-icon { width: 16px; height: 16px; color: var(--orange); }
.spx-total { display: flex; align-items: baseline; gap: 6px; }
.spx-total b { font-size: 30px; line-height: 1; }
.spx-total span { color: var(--muted); font-size: 12px; }
.spx-by-lesson { display: grid; gap: 5px; margin: 0; padding: 0; list-style: none; }
.spx-by-lesson li { display: flex; justify-content: space-between; gap: 8px; font-size: 11.5px; }
.spx-by-lesson span { color: var(--muted); }
.spx-summary .field { margin: 0; }
.spx-opt { display: grid; gap: 5px; }
.spx-opt > span { color: var(--muted); font-size: 11px; }
.spx-opt .edu-seg { width: fit-content; max-width: 100%; flex-wrap: wrap; }
.spx-duration { display: flex; align-items: center; gap: 6px; margin: 0; font-size: 12px; }
.spx-duration .ui-icon { width: 15px; height: 15px; color: var(--muted); }
.spx-duration em { font-style: normal; }
.spx-build { justify-content: center; width: 100%; }
.spx-banner {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin: 0 0 14px; padding: 10px 12px;
  border: 1px solid color-mix(in srgb, var(--orange) 35%, var(--line)); border-radius: 12px; background: var(--orange-soft); font-size: 12px;
}
.spx-banner > .ui-icon { width: 18px; height: 18px; color: var(--orange); flex: none; }
.spx-banner > span { flex: 1 1 260px; line-height: 1.8; }
.spx-banner .ghost-button { margin-inline-start: auto; }
.edu-special-btn { justify-self: start; }

/* ═══ مجموعه سؤال: فرستادن برای دانش‌آموزان و سهمِ اشتراک (qgive-* / qset-scope-note) ═══ */
.qset-scope-note {
  display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin: 8px 0 0; padding: 8px 11px;
  border: 1px dashed color-mix(in srgb, var(--orange) 40%, var(--line)); border-radius: 11px;
  background: var(--orange-soft); color: var(--ink); font-size: 12px; line-height: 1.8;
}
.qset-scope-note > .ui-icon { width: 15px; height: 15px; flex: none; color: var(--orange); }
.qset-scope-note .ghost-button { padding-block: 3px; font-size: 11.5px; }
.exam-chip.shared.given { background: var(--teal-soft); color: var(--teal); }
.qgive > :is(.omr-hub-lead, .field):not([hidden]) + .field:not([hidden]) { margin-block-start: 14px; }
.qgive .pro-aud-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.qgive .pro-aud-search { margin-bottom: 8px; }
.qgive-list { max-height: 320px; overflow-y: auto; }
.qgive-list label.via-class { opacity: .75; }
.qgive-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; }

/* ═══ خرید گروهی اشتراک (sbulk-*) ═══════════════════════════════════════════ */
.modal.sbulk-modal { width: min(780px, 96vw); }
.sbulk-head { gap: 12px; }
.sbulk-head > div { display: grid; gap: 2px; min-width: 0; }
.sbulk-head small { color: var(--muted); font-size: 11.5px; }
.sbulk-offer {
  display: inline-flex; align-items: center; gap: 5px; margin-inline-start: auto; padding: 5px 11px; border-radius: 999px;
  background: var(--teal-soft); color: var(--teal); font-size: 11.5px; white-space: nowrap;
}
.sbulk-offer .ui-icon { width: 14px; height: 14px; }
.sbulk-offer b { font-weight: 800; }
.modal-body.sbulk { display: grid; gap: 18px; padding: 16px 20px; }
.sbulk-step { display: grid; gap: 10px; min-width: 0; }
.sbulk-step-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 12px; }
.sbulk-step-head small { color: var(--muted); font-size: 11.5px; }
.sbulk-step-title { display: flex; align-items: center; gap: 8px; margin: 0; font-size: 13.5px; }
.sbulk-step-title > span {
  display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%;
  background: var(--orange-soft); color: var(--orange); font-size: 11.5px; font-weight: 800;
}
.sbulk-choices { display: grid; gap: 8px; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); }
.sbulk-choice, .sbulk-plans button {
  display: grid; gap: 2px; padding: 9px 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--panel);
  color: var(--ink); font: inherit; text-align: start; cursor: pointer; transition: border-color .15s ease, background .15s ease, box-shadow .15s ease;
}
.sbulk-choice:hover, .sbulk-plans button:hover { border-color: color-mix(in srgb, var(--orange) 55%, var(--line)); }
.sbulk-choice b { font-size: 12.5px; }
.sbulk-choice small, .sbulk-plans button small { color: var(--muted); font-size: 10.5px; }
.sbulk-choice.on, .sbulk-plans button.on {
  border-color: var(--orange); background: var(--orange-soft); box-shadow: inset 0 0 0 1px var(--orange);
}
.sbulk-plans { display: grid; gap: 8px; grid-template-columns: repeat(auto-fill, minmax(128px, 1fr)); }
.sbulk-plans button span { font-size: 12.5px; font-weight: 700; }
.sbulk-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.sbulk-toolbar .pro-aud-search { flex: 1 1 220px; height: 38px; }
.sbulk-filter { flex-wrap: wrap; max-width: 100%; }
.sbulk-filter button { display: inline-flex; align-items: center; gap: 5px; }
.sbulk-filter button b { min-width: 18px; padding: 0 5px; border-radius: 99px; background: color-mix(in srgb, currentColor 13%, transparent); font-size: 10.5px; text-align: center; }
.sbulk-classes { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.sbulk-classes > span { color: var(--muted); font-size: 11.5px; }
.sbulk-classes .pro-aud-chip small { opacity: .75; }
.sbulk-listbox { overflow: hidden; border: 1px solid var(--line); border-radius: 14px; background: var(--panel); }
.sbulk-list-head {
  display: flex; align-items: center; gap: 10px; padding: 9px 14px; border-bottom: 1px solid var(--line);
  background: var(--panel-soft); color: var(--muted); font-size: 12px; cursor: pointer;
}
.sbulk-list { max-height: 320px; overflow-y: auto; scrollbar-width: thin; }
.sbulk-row {
  display: grid; grid-template-columns: 16px 34px minmax(0, 1fr) auto; align-items: center; gap: 10px;
  padding: 8px 14px; border-bottom: 1px solid var(--line); cursor: pointer;
}
.sbulk-row:last-child { border-bottom: 0; }
.sbulk-row:hover { background: #fffaf4; }
.sbulk-row.on { background: color-mix(in srgb, var(--orange) 6%, var(--panel)); }
.sbulk-row input, .sbulk-list-head input { width: 16px; height: 16px; margin: 0; accent-color: var(--orange); }
.sbulk-row .avatar { width: 34px; height: 34px; }
.sbulk-who { display: grid; gap: 1px; min-width: 0; }
.sbulk-who b { overflow: hidden; font-size: 12.5px; text-overflow: ellipsis; white-space: nowrap; }
.sbulk-who small { display: flex; flex-wrap: wrap; gap: 2px 8px; color: var(--muted); font-size: 10.5px; }
.sbulk-warn { display: inline-flex; align-items: center; gap: 3px; color: var(--red); font-style: normal; }
.sbulk-warn .ui-icon { width: 12px; height: 12px; }
.sbulk-status {
  display: inline-flex; align-items: center; gap: 4px; padding: 3px 9px; border-radius: 999px;
  font-size: 10.5px; font-style: normal; font-weight: 700; white-space: nowrap;
}
.sbulk-status .ui-icon { width: 12px; height: 12px; }
.sbulk-status.none { background: #f4f1ea; color: var(--muted); }
.sbulk-status.other { background: var(--teal-soft); color: var(--teal); }
.sbulk-status.same { background: color-mix(in srgb, var(--blue) 12%, #fff); color: var(--blue); }
.sbulk-empty { margin: 0; padding: 18px 14px; color: var(--muted); font-size: 12px; text-align: center; }
.sbulk-foot { display: grid; grid-template-columns: minmax(150px, 1fr) auto auto; gap: 10px 18px; align-items: center; }
.sbulk-foot[hidden] { display: none; }
.sbulk-meter { display: grid; gap: 6px; min-width: 0; }
.sbulk-meter-top { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 8px; }
.sbulk-meter-top b { font-size: 15px; }
.sbulk-meter-top span { display: inline-flex; align-items: center; gap: 4px; color: var(--muted); font-size: 11.5px; }
.sbulk-meter-top .ui-icon { width: 13px; height: 13px; }
.sbulk-meter.done .sbulk-meter-top span { color: var(--teal); font-weight: 700; }
.sbulk-meter-bar { position: relative; display: block; height: 6px; overflow: hidden; border-radius: 99px; background: var(--line); }
.sbulk-meter-bar > i { position: absolute; inset-block: 0; inset-inline-start: 0; border-radius: inherit; background: var(--orange); transition: width .3s ease; }
.sbulk-meter.done .sbulk-meter-bar > i { background: var(--teal); }
.sbulk-price { display: grid; justify-items: end; gap: 1px; text-align: end; }
.sbulk-price > small { color: var(--muted); font-size: 11px; white-space: nowrap; }
.sbulk-price s { opacity: .7; }
.sbulk-price > b { font-size: 19px; line-height: 1.2; white-space: nowrap; }
.sbulk-price > b small { color: var(--muted); font-size: 11px; font-weight: 400; }
.sbulk-price.stale { opacity: .55; }
.sbulk-actions { display: flex; align-items: center; gap: 10px; }
.sbulk-actions .primary-button { min-height: 42px; white-space: nowrap; }
.sbulk-wallet { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; cursor: pointer; white-space: nowrap; }
.sbulk-wallet input { accent-color: var(--orange); }
.sbulk-wallet small { color: var(--muted); }
.sbulk-notes { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 4px 14px; color: var(--muted); font-size: 11.5px; }
.sbulk-notes span { display: inline-flex; align-items: center; gap: 4px; }
.sbulk-notes .ui-icon { width: 13px; height: 13px; flex: none; }
.sbulk-notes .warn { color: var(--red); }
@media (max-width: 640px) {
  .sbulk-offer { display: none; }
  .modal-body.sbulk { padding: 14px; }
  .sbulk-choice, .sbulk-plans button { padding: 7px 10px; }
  .sbulk-foot { grid-template-columns: minmax(0, 1fr); gap: 8px; padding-block: 10px; }
  .sbulk-price { grid-template-columns: minmax(0, 1fr) auto; align-items: baseline; justify-items: start; text-align: start; }
  .sbulk-price > b { font-size: 17px; }
  .sbulk-actions { justify-content: space-between; }
  .sbulk-actions .primary-button { flex: 1 1 auto; justify-content: center; }
  .sbulk-notes span:not(.warn) { display: none; }
  .sbulk-row { grid-template-columns: 16px 30px minmax(0, 1fr); }
  .sbulk-row .avatar { width: 30px; height: 30px; }
  .sbulk-status { grid-column: 3; justify-self: start; }
}

/* ═══════════════════════ پرداخت کارت‌به‌کارت (کاربر + تأیید واریزی‌ها) ═══════════════════════ */
.badge.scp-tone-orange { color: #c75e15; background: var(--orange-soft); }
.badge.scp-tone-blue { color: var(--blue); background: var(--blue-soft); }
.badge.scp-tone-green { color: #168878; background: var(--teal-soft); }
.badge.scp-tone-red { color: var(--red); background: var(--red-soft); }
.badge.scp-tone-grey { color: var(--muted); background: var(--panel-soft); }

.scp-methods { display: grid; gap: 10px; }
.scp-method {
  display: flex; align-items: center; gap: 12px; width: 100%; text-align: right;
  padding: 14px 16px; border-radius: 14px; border: 1.5px solid var(--line);
  background: var(--panel); color: var(--ink); cursor: pointer; font: inherit;
  transition: border-color .15s, background .15s;
}
.scp-method:hover { border-color: var(--orange); background: var(--orange-soft); }
.scp-method > svg { width: 24px; height: 24px; color: var(--orange); flex: none; }
.scp-method span { display: grid; gap: 3px; }
.scp-method b { font-size: 13.5px; font-weight: 900; }
.scp-method small { font-size: 11px; color: var(--muted); line-height: 1.8; }

.scp-modal { display: grid; gap: 14px; }
.scp-order-line { margin: 0; font-size: 12px; color: var(--muted); line-height: 1.9; }
.scp-order-line b { color: var(--ink); }
.scp-submitted {
  display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: 12px;
  background: var(--blue-soft); color: var(--ink);
}
.scp-submitted > svg { width: 20px; height: 20px; color: var(--blue); flex: none; margin-top: 2px; }
.scp-submitted span { display: grid; gap: 4px; }
.scp-submitted b { font-size: 12.5px; font-weight: 900; }
.scp-submitted small { font-size: 11px; line-height: 1.9; color: var(--muted); }

.scp-step { display: grid; grid-template-columns: 30px minmax(0, 1fr); gap: 10px; align-items: start; margin: 0; }
.scp-step-no {
  width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center;
  background: var(--orange); color: #fff; font-weight: 900; font-size: 13px;
}
.scp-step-body { display: grid; gap: 9px; min-width: 0; }
.scp-step-body h4 { margin: 3px 0 0; font-size: 13.5px; font-weight: 900; }

.scp-amount {
  display: flex; align-items: baseline; flex-wrap: wrap; gap: 8px; padding: 12px 14px;
  border-radius: 14px; background: var(--orange-soft); border: 1.5px dashed var(--orange);
}
.scp-amount > b { font-size: 26px; font-weight: 900; color: var(--ink); letter-spacing: -.3px; }
.scp-amount > span { font-size: 13px; font-weight: 700; color: var(--muted); }
.scp-amount .scp-copy { margin-inline-start: auto; align-self: center; }
.scp-rial { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; font-size: 11.5px; color: var(--muted); }
.scp-rial b { color: var(--ink); }

.scp-copy {
  display: inline-flex; align-items: center; gap: 6px; padding: 7px 12px; border-radius: 10px;
  border: 0; background: var(--orange); color: #fff; font: inherit; font-size: 11.5px; font-weight: 800;
  cursor: pointer; white-space: nowrap;
}
.scp-copy svg { width: 14px; height: 14px; }
.scp-copy.ghost { background: transparent; color: var(--orange); border: 1px solid var(--line); padding: 5px 10px; }
.scp-copy.light { background: rgba(255, 255, 255, .18); color: #fff; border: 1px solid rgba(255, 255, 255, .35); }
.scp-copy:active { transform: scale(.97); }

.scp-card {
  display: grid; gap: 14px; padding: 16px 18px; border-radius: 16px; color: #fff;
  background: linear-gradient(135deg, #2b3a4d 0%, #3d5470 60%, #d9661f 140%);
  box-shadow: 0 10px 24px rgba(38, 56, 74, .22);
}
.scp-card-top { display: flex; justify-content: space-between; align-items: center; font-size: 12px; font-weight: 800; opacity: .9; }
.scp-card-top svg { width: 22px; height: 22px; }
.scp-card-number {
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; font-size: 21px; font-weight: 700;
  letter-spacing: 1.5px; text-align: center; direction: ltr; unicode-bidi: isolate; user-select: all;
}
.scp-card-foot { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; font-size: 12px; }
.scp-card-foot b { font-weight: 900; }
.scp-sheba { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 11.5px; color: var(--muted); }
.scp-sheba code { font-size: 11.5px; color: var(--ink); word-break: break-all; }

.scp-warn {
  display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: 12px;
  background: var(--red-soft); border: 1px solid color-mix(in srgb, var(--red) 35%, transparent);
}
.scp-warn > svg { width: 20px; height: 20px; color: var(--red); flex: none; margin-top: 2px; }
.scp-warn > div { display: grid; gap: 4px; font-size: 11.5px; line-height: 1.95; color: var(--ink); }
.scp-warn > div > b { font-size: 12.5px; font-weight: 900; color: var(--red); }

.scp-drop {
  position: relative; display: flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 64px; padding: 12px; border-radius: 12px; border: 1.5px dashed var(--line);
  background: var(--panel-soft); color: var(--muted); font-size: 12px; text-align: center; cursor: pointer;
}
.scp-drop:hover, .scp-drop.has-file { border-color: var(--orange); color: var(--ink); }
.scp-drop.has-file { background: var(--orange-soft); }
.scp-drop svg { width: 20px; height: 20px; color: var(--orange); flex: none; }
.scp-drop input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.scp-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.scp-fields .field { margin: 0; }
.scp-fields small { color: var(--muted); font-weight: 400; }
.scp-submit { justify-self: stretch; justify-content: center; }
.scp-foot { margin: 0; font-size: 11px; color: var(--muted); line-height: 1.9; }

.scp-strip { display: grid; gap: 8px; margin-bottom: 16px; }
.scp-strip-row {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 12px 14px; border-radius: 14px;
  background: var(--panel); border: 1px solid var(--line); box-shadow: var(--shadow);
}
.scp-strip-row.is-awaiting { border-color: var(--orange); }
.scp-strip-icon { width: 36px; height: 36px; border-radius: 11px; display: grid; place-items: center; background: var(--orange-soft); color: var(--orange); flex: none; }
.scp-strip-row.is-submitted .scp-strip-icon { background: var(--blue-soft); color: var(--blue); }
.scp-strip-row.is-paid .scp-strip-icon { background: var(--teal-soft); color: var(--teal); }
.scp-strip-row.is-rejected .scp-strip-icon { background: var(--red-soft); color: var(--red); }
.scp-strip-icon svg { width: 18px; height: 18px; }
.scp-strip-copy { display: grid; gap: 3px; flex: 1 1 220px; min-width: 0; }
.scp-strip-copy b { font-size: 12.5px; font-weight: 900; }
.scp-strip-copy small { font-size: 11px; color: var(--muted); line-height: 1.8; }
.scp-strip-copy .scp-strip-reason { color: var(--red); font-weight: 700; }

/* ─── پنل مدیر: تأیید واریزی‌ها ─── */
.cpa-cardline {
  display: flex; align-items: center; gap: 10px; margin: 0 0 14px; padding: 11px 14px; border-radius: 12px;
  background: var(--panel); border: 1px solid var(--line); font-size: 12px;
}
.cpa-cardline svg { width: 18px; height: 18px; color: var(--orange); flex: none; }
.cpa-cardline.is-off { background: var(--yellow-soft); }
.cpa-cardline.is-off svg { color: var(--yellow); }
.cpa-cardline code { font-size: 12.5px; font-weight: 700; }
/* شمارهٔ کارت/پیگیری داخلِ متنِ راست‌به‌چپ: بدون جزیرهٔ ltr گروه‌های ۴رقمی برعکس چیده می‌شوند. */
.cpa-cardline code, .cpa-meta code, .scp-sheba code { display: inline-block; direction: ltr; unicode-bidi: isolate; }
.cpa-panel { padding: 16px 18px; }
.cpa-filter { margin-bottom: 14px; flex-wrap: wrap; }
.cpa-list { display: grid; gap: 12px; }
.cpa-card {
  display: grid; grid-template-columns: 150px minmax(0, 1fr) 250px; gap: 16px; align-items: start;
  padding: 14px; border-radius: 14px; border: 1px solid var(--line); background: var(--panel);
}
.cpa-card.is-submitted { border-color: color-mix(in srgb, var(--blue) 45%, var(--line)); }
.cpa-receipt {
  display: grid; place-items: center; width: 150px; height: 190px; border-radius: 11px; overflow: hidden;
  background: var(--panel-soft); border: 1px solid var(--line); color: var(--muted); font-size: 11px; text-decoration: none;
}
.cpa-receipt img { width: 100%; height: 100%; object-fit: cover; object-position: top; }
.cpa-receipt.is-pdf, .cpa-receipt.is-empty { gap: 6px; align-content: center; text-align: center; padding: 10px; }
.cpa-receipt.is-pdf { color: var(--blue); font-weight: 800; }
.cpa-receipt svg { width: 26px; height: 26px; }
.cpa-main { display: grid; gap: 8px; min-width: 0; }
.cpa-main header { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.cpa-main header b { font-size: 14px; font-weight: 900; }
.cpa-main header small { font-size: 11px; color: var(--muted); }
.cpa-main header .badge { margin-inline-start: auto; }
.cpa-meta { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 11px; color: var(--muted); }
.cpa-meta b, .cpa-meta code { color: var(--ink); }
.cpa-items { margin: 0; padding: 0; list-style: none; display: grid; gap: 4px; font-size: 11.5px; }
.cpa-items li { display: flex; gap: 8px; align-items: baseline; padding: 6px 9px; border-radius: 8px; background: var(--panel-soft); }
.cpa-items li small { color: var(--muted); }
.cpa-items li em { margin-inline-start: auto; font-style: normal; font-weight: 800; }
.cpa-review { margin: 0; font-size: 11px; color: var(--muted); line-height: 1.9; }
.cpa-side { display: grid; gap: 9px; }
.cpa-expected { display: grid; gap: 2px; padding: 10px 12px; border-radius: 12px; background: var(--orange-soft); }
.cpa-expected span { font-size: 10.5px; color: var(--muted); font-weight: 700; }
.cpa-expected b { font-size: 22px; font-weight: 900; }
.cpa-expected small { font-size: 11px; color: var(--muted); }
.cpa-declared { color: var(--red) !important; font-weight: 800 !important; }
.cpa-seen { display: grid; gap: 5px; font-size: 11px; font-weight: 800; color: var(--muted); }
.cpa-seen input { font-size: 15px; font-weight: 800; text-align: center; }
.cpa-match { display: flex; gap: 6px; align-items: flex-start; font-size: 11px; line-height: 1.8; color: var(--muted); }
.cpa-match svg { width: 15px; height: 15px; flex: none; margin-top: 2px; }
.cpa-match.ok { color: #168878; font-weight: 800; }
.cpa-match.bad { color: var(--red); font-weight: 800; }
.cpa-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.cpa-actions .primary-button { flex: 1 1 auto; justify-content: center; }
.cpa-actions .primary-button:disabled { opacity: .45; cursor: not-allowed; }
.cpa-presets { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0; }
.cpa-settings { display: grid; gap: 12px; }
.cpa-settings-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.cpa-settings .field { margin: 0; }
.cpa-settings-sub { display: flex; align-items: center; gap: 6px; margin: 6px 0 0; font-size: 13px; font-weight: 900; }
.cpa-settings-sub svg { width: 16px; height: 16px; color: var(--orange); }
.cpa-settings-hint { margin: 0; font-size: 11px; color: var(--muted); line-height: 1.9; }
.cpa-officers { display: flex; flex-wrap: wrap; gap: 8px; }
.cpa-officer {
  display: inline-flex; align-items: center; gap: 6px; padding: 7px 11px; border-radius: 10px;
  border: 1px solid var(--line); background: var(--panel-soft); font-size: 12px; cursor: pointer;
}
.cpa-officer:has(input:checked) { border-color: var(--orange); background: var(--orange-soft); font-weight: 800; }
.cpa-officer small { color: var(--muted); font-size: 10.5px; font-weight: 400; }
.cpa-officer[hidden] { display: none; }
.cpa-officers { max-height: 220px; overflow-y: auto; }
.cpa-officer-search { width: 100%; }
.cpa-new-officer { display: grid; gap: 6px; padding: 12px; border-radius: 12px; border: 1px dashed var(--line); background: var(--panel-soft); }
.cpa-new-officer > b { display: flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 900; }
.cpa-new-officer > b svg { width: 16px; height: 16px; color: var(--orange); }
.cpa-new-officer > small { font-size: 11px; color: var(--muted); line-height: 1.9; }
.cpa-new-officer-row { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr) auto; gap: 8px; }
@media (max-width: 560px) { .cpa-new-officer-row { grid-template-columns: minmax(0, 1fr); } }

@media (max-width: 980px) {
  .cpa-card { grid-template-columns: 120px minmax(0, 1fr); }
  .cpa-receipt { width: 120px; height: 150px; }
  .cpa-side { grid-column: 1 / -1; }
}
@media (max-width: 560px) {
  .scp-fields, .cpa-settings-grid { grid-template-columns: minmax(0, 1fr); }
  .scp-amount > b { font-size: 22px; }
  .scp-card-number { font-size: 17px; letter-spacing: 1px; }
  .cpa-card { grid-template-columns: minmax(0, 1fr); }
  .cpa-receipt { width: 100%; height: 220px; }
}

/* ═══════════════════════ پوستهٔ موبایلِ اپ‌گونه (پنل کاربر) ═══════════════════════
   بیشترِ مخاطب با گوشی می‌آید. این بلوک عمداً آخرِ فایل است تا بر قاعده‌های
   پراکندهٔ قبلی غالب شود و همهٔ رفتارِ موبایل یک‌جا خوانده شود. منطقش در app.js:
   studentViewTitle / mobileTabbarHtml / bindMobileChrome / pstudioFitZoom.
   فقط `.student-shell` و بخش‌های پنل کاربر را می‌گیرد؛ پنل مدیر دست‌نخورده است. */
.m-topbar-title,
.m-tabbar,
.m-drawer-tools { display: none; }

@media (max-width: 820px) {
  :root {
    --m-bar-h: 56px;
    --m-tab-h: 60px;
    --m-safe-b: env(safe-area-inset-bottom, 0px);
  }
  /* نوار بالا: کوتاه، با عنوانِ صفحه؛ با اسکرول به پایین کنار می‌رود */
  .student-shell .topbar {
    height: var(--m-bar-h);
    padding: 0 12px;
    gap: 8px;
    background: rgba(250, 249, 245, .94);
    transition: transform .26s cubic-bezier(.22, .61, .36, 1);
  }
  html.m-chrome-hidden .student-shell .topbar { transform: translateY(-100%); }
  .student-shell #sMenuToggle { display: none; }
  .m-topbar-title {
    display: block;
    flex: 1 1 auto;
    min-width: 0;
    overflow: hidden;
    color: var(--ink);
    font-size: 15.5px;
    font-weight: 900;
    white-space: nowrap;
    text-overflow: ellipsis;
  }
  .student-shell .topbar-tools { flex: none; margin-inline-start: 0; overflow: visible; gap: 6px; }
  .student-shell .topbar-tools + .topbar-profile { margin-inline-start: 0; }
  .student-shell #stHelpDocs,
  .student-shell #stSupportTickets,
  .student-shell #stSupportIdea { display: none; }
  .student-shell .topbar-icon { width: 36px; height: 36px; border-radius: 11px; }
  .student-shell .topbar-wallet { height: 36px; border-radius: 11px; }
  .student-shell .topbar-profile .avatar { width: 34px; height: 34px; }

  /* کشوی منو: تمام‌قد و روی نوارها (نه زیرِ هدر) */
  .student-shell .sidebar {
    top: 0;
    height: 100dvh;
    width: min(290px, 84vw);
    z-index: 80;
    overflow-y: auto;
    overscroll-behavior: contain;
    padding-bottom: calc(18px + var(--m-safe-b));
  }
  .student-shell .sidebar-backdrop { inset: 0; z-index: 75; }
  .student-shell .sidebar .nav-item { min-height: 44px; }
  .m-drawer-tools { display: grid; margin-top: 4px; }

  /* نوار پایین */
  .m-tabbar {
    position: fixed;
    inset-inline: 0;
    bottom: 0;
    z-index: 50;
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: minmax(0, 1fr);
    height: calc(var(--m-tab-h) + var(--m-safe-b));
    padding: 5px 6px var(--m-safe-b);
    border-top: 1px solid rgba(229, 226, 218, .9);
    background: rgba(255, 253, 250, .95);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    box-shadow: 0 -8px 24px rgba(40, 30, 20, .06);
    transition: transform .26s cubic-bezier(.22, .61, .36, 1);
  }
  html.m-chrome-hidden .m-tabbar { transform: translateY(100%); }
  body.exam-open .m-tabbar,
  body.pstudio-open .m-tabbar { display: none; }
  .m-tab {
    min-width: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    padding: 0;
    border: 0;
    border-radius: 14px;
    background: transparent;
    color: #8a8276;
    font: inherit;
    font-size: 10.5px;
    font-weight: 800;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
  }
  .m-tab > span { max-width: 100%; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
  .m-tab .m-tab-icon {
    width: 22px;
    height: 22px;
    padding: 3px 14px;
    box-sizing: content-box;
    border-radius: 999px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.9;
    stroke-linecap: round;
    stroke-linejoin: round;
    transition: background .18s ease, color .18s ease;
  }
  .m-tab.active { color: #c2530f; }
  .m-tab.active .m-tab-icon { background: var(--orange-soft, #fff1e6); }
  .m-tab:active .m-tab-icon { transform: scale(.94); }

  /* جای نوار پایین در انتهای هر صفحه */
  .student-shell .content { padding: 14px 10px calc(var(--m-tab-h) + var(--m-safe-b) + 26px); }
  body:has(.m-tabbar) .toast-stack,
  body:has(.m-tabbar) .app-update-bar {
    left: 12px;
    bottom: calc(var(--m-tab-h) + var(--m-safe-b) + 12px);
  }

  /* نوارهای چسبانِ داخل صفحه پشتِ نوار بالا گم نشوند */
  .student-shell .sp-tabbar,
  .student-shell .exam-pick-mode { top: calc(var(--m-bar-h) + 6px); transition: top .26s cubic-bezier(.22, .61, .36, 1); }
  html.m-chrome-hidden .student-shell .sp-tabbar,
  html.m-chrome-hidden .student-shell .exam-pick-mode { top: 6px; }
  .student-shell .sq-item { scroll-margin-top: calc(var(--m-bar-h) + 10px); }
}

/* گوشیِ افقی: فضای عمودی کمیاب است؛ نوار پایین نیست، نوار بالا کوتاه‌تر است و با
   اسکرول کنار می‌رود تا سؤال کامل دیده شود. منوی همبرگری جای «بیشتر» را می‌گیرد. */
@media (max-height: 520px) and (orientation: landscape) {
  .m-tabbar { display: none !important; }
  .student-shell .topbar {
    height: 48px;
    transition: transform .26s cubic-bezier(.22, .61, .36, 1);
  }
  html.m-chrome-hidden .student-shell .topbar { transform: translateY(-100%); }
  .student-shell #sMenuToggle { display: inline-grid; place-items: center; width: 36px; height: 36px; }
  .student-shell .content { padding-top: 10px; padding-bottom: 28px; }
  body .toast-stack,
  body .app-update-bar { bottom: 12px; }
  .student-shell .sp-tabbar,
  .student-shell .exam-pick-mode { top: 54px; }
  .student-shell .sq-item { scroll-margin-top: 56px; }
}
@media (max-height: 520px) and (orientation: landscape) and (max-width: 820px) {
  .student-shell .topbar-profile strong,
  .student-shell .topbar-profile small,
  .student-shell .topbar-profile .chevron { display: none; }
}

/* ── کارت سؤال روی گوشی ───────────────────────────────────────────────────── */
@media (max-width: 760px) {
  .sq-item { border-radius: 16px; }
  .sq-main { padding: 10px 10px 12px; }
  /* دو ابزارِ یادداشت تصویری و مجموعه دیگر روی چیپِ مبحث نمی‌افتند: سرِ کارت
     جای آن‌ها را از سمتِ پایانِ خط (چپ) رزرو می‌کند. */
  .sq-card-pen {
    top: 9px;
    left: 9px;
    width: 34px;
    height: 34px;
    border-radius: 10px;
    box-shadow: none;
  }
  .sq-card-set { left: 49px; }
  .sq-card-pen svg,
  .sq-card-pen img { width: 20px; height: 20px; }
  .sq-item-head {
    flex-wrap: nowrap;
    gap: 6px;
    min-height: 34px;
    margin-bottom: 8px;
    padding-inline-end: 84px;
  }
  .sq-item-head:has(.mn-pick-action) { flex-wrap: wrap; }
  .sq-item-head > * { flex: none; }
  .sq-num { width: 30px; height: 30px; font-size: 12.5px; }
  /* چیپِ مبحث همیشه یک‌خطی: پایه + برگ؛ مسیرِ میانی فقط در راهنمای شناورش است */
  .sq-item-head > .student-topic-chip { flex: 0 1 auto; min-width: 0; padding-inline: 9px; }
  .sq-item-head .student-topic-chip .mc-mid { display: none; }
  .sq-item-head .student-topic-chip .meta-tooltip { max-width: calc(100vw - 40px); }
  .sq-item .sq-sheet { padding: 8px; border-radius: 12px; }

  /* گزینه‌ها: کوتاه‌ها و سؤال تصویری چهارتایی در یک ردیف */
  .sq-answer-options { gap: 7px; margin-top: 10px; }
  .sq-answer-options.is-row,
  .sq-answer-options.is-side[data-narrow-layout="is-row"],
  .sq-answer-options.is-image-question,
  .sq-answer-options.is-placeholder {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    grid-auto-rows: 1fr;
  }
  .sq-answer-options.is-row .sq-ans-opt { gap: 3px; padding: 4px; justify-content: center; }
  .sq-answer-options.is-row .sq-ans-no { width: 16px; height: 16px; border-radius: 5px; font-size: 9.5px; }
  .sq-answer-options.is-image-question .sq-ans-opt,
  .sq-answer-options.is-placeholder .sq-ans-opt {
    min-height: 46px;
    padding: 4px;
    justify-content: center;
    text-align: center;
    font-size: 12.5px;
    font-weight: 800;
  }
  .sq-answer-options.is-image-question .sq-ans-no,
  .sq-answer-options.is-placeholder .sq-ans-no { display: none; }
  .sq-answer-options.is-image-question .sq-ans-opt > span:last-child,
  .sq-answer-options.is-placeholder .sq-ans-opt > span:last-child { flex: 0 1 auto; white-space: nowrap; }
  .sq-ans-opt { min-height: 42px; }

  /* دو دکمهٔ اصلی هم‌عرض و انگشت‌خور */
  .sq-quick-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .sq-quick-row > * { grid-column: 1 / -1; }
  .sq-quick-row > .sq-dunno,
  .sq-quick-row > .sq-show-answer { grid-column: auto; width: 100%; min-height: 44px; justify-content: center; font-size: 13px; }
  .sq-quick-row > button:only-of-type { grid-column: 1 / -1; }

  /* نوار اطلاعات: تاریخ کوچک، چهار ابزار هم‌عرض */
  .sq-info-bar { align-items: stretch; gap: 8px; margin-top: 10px; margin-bottom: 10px; padding-top: 10px; }
  .sq-info-actions { display: flex; flex-wrap: wrap; gap: 6px; width: 100%; }
  .sq-info-act {
    flex: 1 1 0;
    justify-content: center;
    min-width: 0;
    min-height: 38px;
    margin: 0;
    padding: 6px 4px;
    border-radius: 10px;
    font-size: 11.5px;
    white-space: nowrap;
  }
  .sq-info-act.qset-add-card { flex-basis: 100%; }
  .sq-info-act svg { width: 15px; height: 15px; flex: none; }

  /* ریلِ منبع/ضریب تمیز/دشواری: نوارِ کوتاه به‌جای سه جعبهٔ بلند */
  .sq-rail-cell { min-height: 0; padding: 8px 4px; gap: 3px; }
  .sq-rail-src .sq-src-icon {
    width: 34px !important;
    height: 34px !important;
    min-width: 34px;
    min-height: 34px;
    max-width: 34px;
    max-height: 34px;
    margin: 0 auto 1px;
    border-radius: 10px;
  }
  .sq-rail-cell > svg { width: 20px; height: 20px; }
  .sq-rail-cell b { font-size: 12px; line-height: 1.35; }
  .sq-rail-diff .difficulty-gauge { width: 34px; height: 28px; }
  .sq-rail-diff .difficulty-gauge svg { width: 26px; height: 22px; }
  .sq-diff-index { flex-direction: row; gap: 4px; padding: 2px 8px; }
}

/* ── صفحه‌های پنل کاربر روی گوشی ─────────────────────────────────────────── */
@media (max-width: 760px) {
  .student-shell .page-head h1 { font-size: 24px; }

  /* تب‌های آزمون/ماهنامه: شبکهٔ دوتایی، هیچ تبی بیرون از صفحه نمی‌ماند */
  .exam-hub-tabs {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
    width: 100%;
    margin: 4px 0 14px;
    overflow: visible;
  }
  .exam-hub-tab { min-width: 0; min-height: 42px; padding: 8px 6px; font-size: 12px; white-space: nowrap; }

  /* فیلترِ کناریِ آزمون/مجموعه: جمع، با لمسِ عنوان باز می‌شود */
  .exam-filter-side { position: static; max-height: none; }
  /* فیلترِ بانک آزمون کوتاه است و دکمهٔ «فیلتر بر اساس موضوع» و حالت نمایشش اصلی‌اند؛
     جمع نمی‌شود، فقط توضیح‌های بلندش روی گوشی کنار می‌روند. */
  .exam-bank .eb-view-note,
  .exam-bank .eb-side-note { display: none; }
  .exam-filter-side:not(.exam-bank *) .exam-filter-title { cursor: pointer; user-select: none; -webkit-tap-highlight-color: transparent; }
  .exam-filter-side:not(.exam-bank *) .exam-filter-title::after {
    content: "";
    width: 8px;
    height: 8px;
    margin-inline-start: auto;
    border: solid #9a8f82;
    border-width: 0 0 2px 2px;
    transform: translateY(-2px) rotate(-45deg);
    transition: transform .2s ease;
  }
  html.m-filter-open .exam-filter-title::after { transform: translateY(2px) rotate(135deg); }
  html:not(.m-filter-open) .exam-filter-side:not(.exam-bank *) > .exam-filter-title { border-bottom: 0; margin-bottom: 0; }
  html:not(.m-filter-open) .exam-filter-side:not(.exam-bank *) > :not(.exam-filter-title):not(.emf-search):not(.qset-search) { display: none; }

  /* فهرست آزمون‌ها: هر آزمون یک کارت، نه جدولِ نُه‌ستونیِ اسکرول‌خور */
  .exam-rows { overflow: visible; border: 0; border-radius: 0; background: transparent; }
  .exam-table { display: grid; gap: 10px; }
  .exam-table .exam-thead { display: none; }
  .exam-table .exam-tr,
  .exam-table .exam-tr:nth-child(odd) {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    grid-template-areas:
      "name name status"
      "metric date org"
      "questions duration booklets"
      "actions actions actions";
    gap: 10px;
    min-height: 0;
    padding: 12px 14px;
    border: 1px solid #ece3d6;
    border-radius: 16px;
    background: #fff;
    box-shadow: 0 6px 18px rgba(65, 47, 29, .05);
  }
  .exam-table .exam-td-name { grid-area: name; }
  .exam-table .exam-td-name .exam-name-line > b { font-size: 14px; white-space: normal; }
  .exam-table .exam-td-questions { grid-area: questions; }
  .exam-table .exam-td-duration { grid-area: duration; }
  .exam-table .exam-td-booklets { grid-area: booklets; }
  .exam-table .exam-td-org { grid-area: org; }
  .exam-table .exam-td-metric { grid-area: metric; }
  .exam-table .exam-td-date { grid-area: date; }
  .exam-table .exam-td-status { grid-area: status; justify-self: end; align-self: start; }
  .exam-table .exam-td.tc {
    display: grid;
    align-content: start;
    gap: 3px;
    overflow: visible;
    text-align: start;
    white-space: normal;
  }
  .exam-table .exam-td.tc::before { content: attr(data-label); color: var(--muted); font-size: 10px; font-weight: 700; }
  .exam-table .exam-td-status::before { display: none; }
  .exam-table .exam-td .exam-cwb,
  .exam-table .exam-run-date { justify-content: flex-start; align-items: flex-start; }
  .exam-table .exam-td-actions {
    grid-area: actions;
    flex-wrap: wrap;
    justify-content: flex-start;
    gap: 6px;
    padding-top: 10px;
    border-top: 1px solid #f3ede3;
  }
  .exam-table .exam-td-actions .exam-iconbtn { width: 38px; height: 38px; border-radius: 11px; }
  .exam-table .exam-td-actions .exam-iconbtn svg { width: 17px; height: 17px; }
  .exam-table .exam-td-actions .primary-button,
  .exam-table .exam-td-actions .exam-report-btn { height: 38px; padding-inline: 14px; border-radius: 11px; font-size: 12px; }

  /* پروفایل: هیچ کارتی از صفحه بیرون نزند؛ تقویمِ فعالیت داخلِ خودش اسکرول می‌شود.
     ستونِ auto ِ خودِ صفحه در تبِ «تاریخچه» به عرضِ ردیفِ دکمه‌های فیلتر (۴۸۰px+)
     باز می‌شد و کلِ پروفایل از لبهٔ چپ بیرون می‌افتاد؛ ستون‌ها باید minmax(0,1fr) باشند. */
  .student-profile-page,
  .sp-tab-content { grid-template-columns: minmax(0, 1fr); }
  .student-profile-page > *,
  .sp-tab-content > * { min-width: 0; }
  .sp-board-main,
  .sp-board-side { grid-template-columns: minmax(0, 1fr); }
  .sp-command-card { padding: 14px; }
  .student-shell .sp-tabbar { min-height: 0; padding: 4px; gap: 6px; border-radius: 14px; }
  .sp-tabbar > div { flex: 1 1 auto; min-width: 0; overflow-x: auto; scrollbar-width: none; }
  .sp-tabbar > div::-webkit-scrollbar { display: none; }
  .sp-tabbar [role="tab"] { flex: 1 0 auto; min-height: 38px; padding: 0 12px; font-size: 12.5px; }
  .sp-refresh { flex: none; min-height: 38px; padding: 0 11px; }
  .sp-refresh span { display: none; }
}

/* ── استودیوی چاپ روی گوشی (فقط صفحه؛ خروجی PDF و چاپ دست نمی‌خورند) ── */
@media screen and (max-width: 760px) {
  .pstudio-topbar {
    flex-wrap: wrap;
    gap: 8px;
    padding: calc(8px + env(safe-area-inset-top, 0px)) 10px 8px;
  }
  .pstudio-title { flex: 1 1 100%; min-width: 0; flex-wrap: wrap; gap: 2px 8px; }
  .pstudio-title b { font-size: 15px; }
  .pstudio-title span { min-width: 0; max-width: 100%; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
  .pstudio-actions { flex: 1 1 100%; gap: 8px; }
  .pstudio-actions .primary-button { flex: 1 1 auto; min-height: 42px; justify-content: center; white-space: nowrap; }
  .pstudio-exam-tpls { order: 3; flex: 1 1 100%; flex-wrap: nowrap; margin: 0; overflow-x: auto; scrollbar-width: none; }
  .pstudio-exam-tpls::-webkit-scrollbar { display: none; }
  .pstudio-exam-tpls .pset-template { flex: none; }
  .pstudio-preview { padding: 10px 8px 40px; gap: 12px; }
  /* scale(.62) ِ قدیمیِ ≤۸۶۰ جعبهٔ صفحه را کوچک نمی‌کرد (margin منفی می‌خواست) و
     روی zoom دوبار کوچک می‌شد؛ zoom خودِ جعبه را کوچک می‌کند و آن را کنار می‌گذارد. */
  .pstudio-page { zoom: var(--ps-zoom, 1); transform: none; margin-bottom: 0; }
}

/* ── فیلترهای بانک سؤال روی گوشی: بالای فهرست، نه ته آن ─────────────────────
   پیش‌تر نوار کناری در حالت ستونی بعد از همهٔ سؤال‌ها می‌آمد و برای عوض‌کردنِ
   فیلتر باید تا ته صفحه رفت. `.sbank-main` روی عرضِ کم `display: contents`
   می‌شود تا نوار فیلتر درست بینِ نوار جست‌وجو و فهرست سؤال‌ها بنشیند. */
@media (max-width: 980px) {
  .sbank { align-items: stretch; gap: 0; }
  .sbank-main { display: contents; }
  .sbank-main > * { order: 1; min-width: 0; max-width: 100%; }
  .sbank-side { order: 2; margin: 4px 0 14px; }
  .sbank-main > .sbank-listhead,
  .sbank-main > .sbank-list { order: 3; }
  /* display:contents makes the footer a flex item too; keep it after questions. */
  .sbank-main > .sbank-bottom-pager { order: 4; }
}
@media (max-width: 760px) {
  .sbank-side { padding: 4px; }
  .sbank-side .sd-summary-head {
    min-height: 44px;
    padding: 8px 12px;
    cursor: pointer;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
  }
  .sbank-side .sd-summary-head::after {
    content: "";
    width: 8px;
    height: 8px;
    margin-inline-start: auto;
    border: solid #9a8f82;
    border-width: 0 0 2px 2px;
    transform: translateY(-2px) rotate(-45deg);
    transition: transform .2s ease;
  }
  html.m-bank-filter-open .sbank-side .sd-summary-head::after { transform: translateY(2px) rotate(135deg); }
  html:not(.m-bank-filter-open) .sbank-side > :not(.sd-summary-head):not(.sd-summary) { display: none; }
  html:not(.m-bank-filter-open) .sbank-side .sd-summary { margin-bottom: 0; border-bottom: 0; }
  html:not(.m-bank-filter-open) .sbank-side .sd-summary:has(.sd-empty-sel) { display: none; }
}

/* ── پاپ‌آپ «انتخاب موضوعات» روی گوشی ───────────────────────────────────────
   روی دسکتاپ درخت و ستونِ «انتخاب‌شده‌ها» (۲۴۰px) کنار هم‌اند؛ روی گوشی درخت
   فقط ~۹۵px می‌گرفت و نام مباحث «زیس…» می‌شد. اینجا برگهٔ تقریباً تمام‌قد است:
   جست‌وجو ردیفِ خودش را دارد، درخت تمام‌عرض با ردیف‌های انگشت‌خور، و
   انتخاب‌شده‌ها نوارِ چیپِ افقی بالای دکمهٔ تأیید. */
@media (max-width: 760px) {
  .tp-overlay { align-items: flex-end; padding: 0; }
  .tp-modal {
    height: calc(100dvh - 18px);
    max-height: none;
    border-radius: 20px 20px 0 0;
    transform: translateY(40px);
  }
  .tp-header { flex-wrap: wrap; gap: 8px 10px; padding: 12px 14px 10px; }
  .tp-title { font-size: 15px; }
  .tp-header .badge { margin-inline-end: auto; }
  .tp-close { width: 40px; height: 40px; margin-inline-start: auto; }
  .tp-search-wrap { order: 3; flex: 1 1 100%; min-height: 46px; padding: 8px 12px; border-radius: 12px; }
  .tp-search-wrap input { font-size: 16px; } /* زیرِ ۱۶px، سافاریِ آیفون صفحه را زوم می‌کند */
  .tp-body { flex-direction: column; }
  .tp-tree { padding: 6px 6px 12px; }
  .tp-tree .wt-row { min-height: 46px; gap: 8px; padding: 6px 8px; border-radius: 11px; }
  .tp-tree .wt-lbl { font-size: 14px; white-space: normal; overflow-wrap: anywhere; line-height: 1.6; }
  .tp-tree .wt-arr,
  .tp-tree .wt-arr-placeholder { width: 22px; height: 22px; font-size: 12px; }
  .tp-tree .wt-cnt { font-size: 11px; }
  .tp-tree .wt-cb { padding: 8px 4px; }
  .tp-tree .wt-cb input { width: 22px; height: 22px; }
  .tp-tree .wt-ch { margin-right: 10px; padding-right: 6px; }
  .tp-sidebar-panel {
    order: 2;
    width: auto;
    min-width: 0;
    flex: none;
    border-right: 0;
    border-top: 1px solid #ede8de;
  }
  .tp-sidebar-panel:has(.tp-empty-sel) { display: none; }
  .tp-sidebar-head { padding: 8px 14px 0; border-bottom: 0; }
  .tp-level-hint { display: none; }
  .tp-chips-list { display: flex; gap: 6px; overflow-x: auto; overflow-y: hidden; padding: 8px 14px 10px; scrollbar-width: none; }
  .tp-chips-list::-webkit-scrollbar { display: none; }
  .tp-chip { flex: none; max-width: 72vw; margin: 0; padding: 7px 10px; align-items: center; }
  .tp-chip-leaf { font-size: 12px; }
  .tp-chip-rm { width: 26px; height: 26px; display: grid; place-items: center; margin: 0; font-size: 18px; }
  .tp-footer {
    justify-content: space-between;
    gap: 12px;
    padding: 10px 14px calc(10px + env(safe-area-inset-bottom, 0px));
  }
  .tp-footer .primary-button { flex: 1 1 auto; min-height: 48px; justify-content: center; font-size: 15px; }
  .tp-count-label { flex: none; font-size: 12px; }
}

/* ── بانک آزمون روی گوشی ───────────────────────────────────────────────────── */
@media (max-width: 760px) {
  .eb-result {
    display: grid;
    grid-template-columns: 28px minmax(0, 1fr);
    grid-template-areas: "check main" "check badges" "join join";
    gap: 6px 8px;
    padding: 11px 12px;
  }
  .eb-result > .eb-check { grid-area: check; align-self: start; padding-top: 2px; }
  .eb-result > .eb-result-main { grid-area: main; }
  .eb-result > .eb-badges { grid-area: badges; justify-content: flex-start; width: auto; padding: 0; }
  .eb-result > .eb-join { grid-area: join; justify-content: center; min-height: 40px; margin: 0; font-size: 12.5px; }
  .eb-result .eb-title-line,
  .eb-row .eb-title-line { flex-wrap: wrap; row-gap: 2px; }
  .eb-title-line > small,
  .eb-title-line > .eb-path { white-space: normal; flex-wrap: wrap; }
  .eb-check input { width: 20px; height: 20px; }
  .eb-row { min-height: 48px; }
  .eb-row > .eb-join { min-height: 38px; }
  .eb-pick-row { grid-template-columns: 26px minmax(0, 1fr) 30px; }
  .eb-pick-row > .eb-pick-count { grid-column: 2; grid-row: 2; }
  .eb-pick-title { flex-direction: column; align-items: flex-start; gap: 2px; }
  .eb-pick-name { max-width: 100%; white-space: normal; }
  .eb-budget-row { grid-template-columns: minmax(0, 1fr) auto 28px; white-space: normal; }
  .eb-budget-main { flex-direction: column; align-items: flex-start; gap: 2px; }
  .eb-budget-source { max-width: 100%; }
  .eb-budget-actions { width: auto; grid-template-columns: auto 40px; flex: none; }
  .eb-budget-detail-wrap { width: auto; flex: none; }
  .eb-budget-popover { position: fixed; inset: auto 12px 12px; width: auto; max-height: 60dvh; }
  .eb-build { min-height: 48px; font-size: 14px; }
}

/* ── پاپ‌آپ «اضافه به مجموعه سؤال» روی گوشی ─────────────────────────────────
   قاعدهٔ قدیمیِ موبایل ردیف را دوستونه می‌کرد و دکمهٔ «افزودن» به سطر دوم
   می‌رفت و از پایینِ کارت بیرون می‌زد (زبانه‌ای زیرِ هر ردیف). ردیف تک‌خطی
   می‌شود، فرمِ ساخت یک سطر و فهرست دیگر اسکرولِ داخلیِ جدا ندارد. */
@media (max-width: 760px) {
  .modal.qset-modal-size { width: 100%; max-height: calc(100dvh - 16px); border-radius: 20px; }
  .qset-picker-head { min-height: 0; padding: 12px 14px; }
  .qset-picker-emblem { width: 38px; height: 38px; border-radius: 12px; }
  .qset-picker-title h2 { font-size: 16px; }
  .qset-picker-title p { font-size: 11px; line-height: 1.7; }
  .qset-picker-modal { gap: 10px; padding: 12px 14px; }
  .qset-create-modal { grid-template-columns: minmax(0, 1fr) auto; gap: 8px; padding: 8px; }
  .qset-create-modal .qset-create-icon,
  .qset-create-modal label small { display: none; }
  .qset-create-modal label { min-height: 46px; padding: 5px 10px; align-content: center; }
  .qset-create-modal input,
  .qset-picker-search input { font-size: 16px; }
  .qset-create-modal .primary-button { min-height: 46px; padding-inline: 14px; white-space: nowrap; }
  .qset-picker-list { max-height: none; overflow: visible; padding: 2px 0 4px; }
  .qset-picker-row {
    gap: 10px;
    min-height: 60px;
    padding: 8px 10px;
  }
  .qset-picker-row:hover { transform: none; }
  .qset-picker-open { grid-template-columns: 38px minmax(0, 1fr) auto; }
  .qset-picker-add { min-width: 0; height: 36px; padding: 0 12px; font-size: 11.5px; }
  .qset-picker-footer > span { display: none; }
  .qset-picker-footer .ghost-button { flex: 1 1 auto; min-height: 44px; justify-content: center; }
}

/* ── راهنمای منبعِ ریل روی گوشی ─────────────────────────────────────────────
   خانهٔ منبع ابتدای ریل (لبهٔ راست) است؛ راهنمای وسط‌چین از لبهٔ کارت بیرون
   می‌زد و نیمی از مسیر بریده می‌شد. حالا به لبهٔ راست می‌چسبد و می‌شکند. */
@media (max-width: 760px) {
  .sq-rail-src .sq-source-tooltip {
    left: auto;
    right: 6px;
    width: max-content;
    max-width: min(340px, calc(100vw - 48px));
    transform: translateY(8px);
  }
  .sq-rail-src:hover .sq-source-tooltip,
  .sq-rail-src:focus-within .sq-source-tooltip { transform: translateY(0); }
  .sq-rail-src .sq-source-tooltip::before { left: auto; right: 40px; transform: rotate(45deg); }
  .sq-rail-src .sq-source-tip-row,
  .sq-rail-src .sq-source-tip-row b { white-space: normal; overflow-wrap: anywhere; }
}

/* ── نمای تمام‌صفحهٔ سؤال: دکمه فقط روی گوشی، جای «قلم» ───────────────────── */
.sq-card-focus { display: none; }
@media (max-width: 760px), (max-height: 520px) and (orientation: landscape) {
  .sq-card-pen[data-draw] { display: none; }
  .sq-card-focus { display: flex; }
  .sq-card-focus svg { width: 21px; height: 21px; }
}
body.sqf-open { overflow: hidden; }
.sqf {
  position: fixed;
  inset: 0;
  z-index: 99000;
  overflow: hidden;
  background: #f6f1e8;
  color: var(--ink);
}
.sqf-stage { position: absolute; inset: 0; display: flex; flex-direction: column; }
/* گوشیِ عمودی که قفلِ افقی نگرفت: خودِ نما می‌چرخد تا افقی دیده شود */
@media (orientation: portrait) {
  .sqf:not(.sqf-upright) .sqf-stage {
    inset: auto;
    top: 0;
    left: 0;
    width: 100dvh;
    height: 100vw;
    transform-origin: top left;
    transform: rotate(90deg) translateY(-100%);
  }
}
.sqf-bar {
  flex: none;
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 50px;
  padding: 5px 10px;
  border-bottom: 1px solid #ece4d7;
  background: rgba(255, 255, 255, .94);
}
.sqf-title { flex: 1 1 auto; min-width: 0; display: flex; align-items: baseline; gap: 8px; overflow: hidden; }
.sqf-title b { flex: none; font-size: 14px; font-weight: 900; }
.sqf-title small { min-width: 0; overflow: hidden; color: #168878; font-size: 12px; font-weight: 800; white-space: nowrap; text-overflow: ellipsis; }
.sqf-btn {
  flex: none;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center; justify-content: center;
  border: 1px solid #e5dccb;
  border-radius: 12px;
  background: #fff;
  color: #6a6154;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.sqf-btn svg { width: 19px; height: 19px; }
/* دکمهٔ «عمودی/افقی» متن دارد تا معلوم باشد چه می‌کند */
.sqf-btn.sqf-rotate { width: auto; display: inline-flex; gap: 5px; padding: 0 11px; font: inherit; font-size: 12px; font-weight: 800; }
.sqf-btn.sqf-rotate svg { width: 17px; height: 17px; }
/* گوشیِ افقی‌ای که مرورگرش قفلِ جهت نمی‌دهد: این دکمه کاری از دستش برنمی‌آید، پس نیست */
@media (orientation: landscape) {
  .sqf:not(.sqf-can-lock) .sqf-rotate { display: none; }
}
.sqf-btn:disabled { opacity: .4; cursor: default; }
/* چیدمانِ تک‌ستونی (خواستهٔ کاربر): خودِ سؤال تمام‌عرض، زیرش چهار گزینه در یک
   ردیف و بعد «بلد نبودم / مشاهده پاسخ». ستونِ کناریِ قبلی کنارِ سؤال فضای خالیِ
   زیادی می‌گذاشت. کلِ بدنه یک اسکرول دارد. */
.sqf-body {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 8px 10px calc(12px + env(safe-area-inset-bottom, 0px));
}
.sqf-question { padding: 10px 12px; border: 1px solid #f1efe9; border-radius: 14px; background: #fff; }
/* رفتن به صفحهٔ بعدِ بانک از داخلِ تمام‌صفحه: تا رسیدنِ سؤال‌های تازه */
.sqf.sqf-paging .sqf-body { position: relative; opacity: .45; pointer-events: none; }
.sqf.sqf-paging .sqf-stage::after {
  content: "در حال رفتن به صفحهٔ بعد…";
  position: absolute;
  inset-inline: 0;
  top: 50%;
  margin-inline: auto;
  width: max-content;
  padding: 10px 16px;
  border-radius: 12px;
  background: #2b2721;
  color: #fff;
  font-size: 13px;
  font-weight: 800;
}
.sqf-question .sq-sheet { margin: 0; padding: 0; border: 0; background: transparent; }
.sqf-question .sq-side-layout { grid-template-columns: minmax(0, 1fr) !important; }
.sqf-question .sq-side-options:empty { display: none; }
.sqf-question img { max-width: 100%; height: auto; }
.sqf-side { display: flex; flex-direction: column; gap: 8px; margin-top: 8px; }
.sqf-side .sq-answer-options[class] {
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  grid-auto-rows: minmax(52px, auto) !important;
  gap: 8px;
  margin: 0;
}
.sqf-side .sq-answer-options.is-two:not(.is-placeholder):not(.is-image-question) { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
.sqf-side .sq-answer-options.is-stack:not(.is-placeholder):not(.is-image-question) { grid-template-columns: minmax(0, 1fr) !important; }
.sqf-side .sq-ans-opt { min-height: 52px; justify-content: center; font-size: 14px; }
.sqf-side .sq-answer-options.is-stack .sq-ans-opt { justify-content: flex-start; }
.sqf-side .sq-answer-options.is-placeholder .sq-ans-no { display: none; }
.sqf-side .sq-quick-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin: 0; }
.sqf-side .sq-quick-row > * { grid-column: 1 / -1; }
.sqf-side .sq-quick-row > .sq-dunno,
.sqf-side .sq-quick-row > .sq-show-answer { grid-column: auto; width: 100%; min-height: 46px; justify-content: center; font-size: 13px; }
.sqf-side .sq-quick-row > button:only-of-type { grid-column: 1 / -1; }
.sqf-side .sq-reveal-panel { margin: 0; }
/* قلمِ چرک‌نویس: بومِ شفاف روی کلِ محتوا که با آن اسکرول می‌خورد. خاموش = کلیک‌ها از
   رویش رد می‌شوند؛ روشن = همهٔ لمس‌ها نوشتن است (برای اسکرول و پاسخ، قلم را خاموش کن). */
.sqf { --sqf-ink: #1f3fbf; }
.sqf-body { position: relative; }
.sqf-ink { position: absolute; top: 0; left: 0; z-index: 3; pointer-events: none; touch-action: none; }
.sqf.sqf-pen-on .sqf-ink { pointer-events: auto; cursor: crosshair; }
.sqf.sqf-pen-on .sqf-body { -webkit-user-select: none; user-select: none; }
.sqf-btn.sqf-pen.is-on { border-color: #1f3fbf; background: #1f3fbf; color: #fff; box-shadow: 0 0 0 3px rgba(31, 63, 191, .16); }
/* آیکونِ قلمِ خودِ سایت (همان تبلت/لپ‌تاپ) تصویر است نه currentColor؛ روی پرکنِ آبی سفید شود */
.sqf-btn.sqf-pen .draw-pen-img { width: 22px; height: 22px; }
.sqf-btn.sqf-pen.is-on .draw-pen-img { filter: brightness(0) invert(1) !important; }
.qvs-pen .qvs-reveal-opt .draw-pen-img { width: 18px; height: 18px; }
/* با روشن‌شدنِ قلم، پاک‌کن/برگشت/جلو از کنارِ خودِ قلم بیرون می‌لغزند (پله‌پله، با
   کمی فنر) و با خاموش‌شدن جمع می‌شوند. نوار فقط کلاس می‌گیرد، پس ترنزیشن واقعاً دیده می‌شود. */
.sqf-pen-group { flex: none; display: inline-flex; align-items: center; }
.sqf-pen-tools {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  max-width: 0;
  padding: 4px 0;
  margin: -4px 0;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
  transition: max-width .34s cubic-bezier(.2, .8, .2, 1), padding .34s cubic-bezier(.2, .8, .2, 1), opacity .18s ease;
}
.sqf-pen-group.is-open .sqf-pen-tools { max-width: 160px; padding-inline: 7px 4px; opacity: 1; pointer-events: auto; }
.sqf-pen-group .sqf-ink-tool {
  opacity: 0;
  transform: translateX(16px) scale(.35);
  transition: transform .2s ease, opacity .14s ease, background-color .16s ease, border-color .16s ease, color .16s ease;
}
.sqf-ink-tool svg { width: 19px; height: 19px; }
.sqf-pen-group.is-open .sqf-ink-tool {
  opacity: 1;
  transform: none;
  transition: transform .42s cubic-bezier(.34, 1.56, .64, 1), opacity .22s ease, background-color .16s ease, border-color .16s ease, color .16s ease;
}
.sqf-pen-group.is-open .sqf-ink-tool:nth-child(2) { transition-delay: .05s, .05s, 0s, 0s, 0s; }
.sqf-pen-group.is-open .sqf-ink-tool:nth-child(3) { transition-delay: .1s, .1s, 0s, 0s, 0s; }
.sqf-pen-group.is-open .sqf-ink-tool:disabled { opacity: .38; }
.sqf-ink-tool.is-on { border-color: #1f3fbf; background: #1f3fbf; color: #fff; box-shadow: 0 0 0 3px rgba(31, 63, 191, .16); }
.sqf-btn.sqf-pen .draw-pen-img { transition: transform .3s cubic-bezier(.34, 1.56, .64, 1); }
.sqf-btn.sqf-pen.is-on .draw-pen-img { transform: rotate(-14deg) scale(1.06); }
/* پاک‌کن فعال است: قلم «پارک» می‌شود (قابِ آبی بی‌پرکن) تا معلوم باشد با لمسش به نوشتن برمی‌گردی */
.sqf-btn.sqf-pen.is-on.is-parked { background: #fff; color: #1f3fbf; box-shadow: none; }
.sqf-btn.sqf-pen.is-on.is-parked .draw-pen-img { filter: none !important; transform: none; }
.sqf-btn:not(:disabled):active { transform: scale(.9); }
.sqf.sqf-erasing .sqf-ink { cursor: cell; }
/* گوشیِ عمودیِ صاف (بی‌چرخش): جا برای هفت دکمه */
@media (max-width: 440px) {
  .sqf.sqf-upright .sqf-bar { gap: 5px; padding-inline: 7px; }
  .sqf.sqf-upright .sqf-btn { width: 36px; height: 36px; }
  .sqf.sqf-upright .sqf-btn.sqf-rotate { width: auto; padding: 0 8px; }
  .sqf.sqf-upright .sqf-pen-group.is-open .sqf-pen-tools { padding-inline: 5px 3px; }
  .sqf.sqf-upright .sqf-pen-tools { gap: 5px; }
}
@media (prefers-reduced-motion: reduce) {
  .sqf-pen-tools, .sqf-ink-tool, .sqf-pen-group.is-open .sqf-ink-tool, .sqf-btn.sqf-pen .draw-pen-img { transition: none; }
}
.qvs-pen .qvs-reveal-options { grid-template-columns: 1fr 1fr; }

/* ── محیط آزمون روی گوشی (عمودی و افقی) ─────────────────────────────────────
   فقط سؤال اسکرول می‌خورد؛ «قبلی/بعدی» پایینِ صفحه چسبیده است. زمان، «اتمام» و
   شبکهٔ شمارهٔ سؤال‌ها در برگهٔ پایین‌آمدنی‌اند که دکمهٔ «سؤال‌ها» در نوار بالا
   بازش می‌کند و با انتخابِ هر سؤال بسته می‌شود (erSheetToggleHtml / erGoTo). */
.er-sheet-toggle,
.er-sheet-backdrop,
.er-sheet-grab { display: none; }

@media (max-width: 860px), (max-height: 520px) {
  .exam-runner { height: 100dvh; }
  .er-top {
    flex-wrap: nowrap;
    gap: 8px;
    padding: calc(8px + env(safe-area-inset-top, 0px)) 10px 8px;
  }
  .er-title { flex: 1 1 auto; min-width: 0; }
  .er-title strong { max-width: 100%; font-size: 13.5px; }
  .er-title small { font-size: 10px; }
  .er-top .er-booklet-path,
  .er-stats,
  .smx-run-progress { display: none; }
  .er-timer-mini { display: block; flex: none; margin-inline-start: 0; padding: 6px 10px; border-radius: 10px; font-size: 13px; }
  .er-top-actions { flex: none; margin-inline-start: 0; }
  .er-top-actions .secondary-button { min-height: 36px; padding: 0 10px; font-size: 11px; white-space: nowrap; }
  .er-sheet-toggle {
    display: inline-flex;
    flex: none;
    align-items: center;
    gap: 5px;
    height: 36px;
    padding: 0 10px;
    border: 1px solid #e5dccb;
    border-radius: 11px;
    background: #fff;
    color: var(--ink);
    font: inherit;
    font-size: 12px;
    font-weight: 900;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
  }
  .er-sheet-toggle svg { width: 17px; height: 17px; color: var(--orange); }
  .er-sheet-toggle b { font-variant-numeric: tabular-nums; }

  .er-body { flex: 1; min-height: 0; display: flex; flex-direction: column; gap: 0; padding: 0; }
  /* ستونِ flex (نه گرید) تا «قبلی/بعدی» در سؤالِ کوتاه هم ته صفحه بنشیند و در
     سؤالِ بلند با اسکرول چسبان بماند */
  .er-main {
    order: 0;
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    gap: 10px;
    padding: 10px 10px 0;
  }
  .er-main > * { flex: none; }
  .er-question.detail-card { padding: 10px; border-radius: 14px; }
  .er-nav-btns {
    position: sticky;
    bottom: 0;
    z-index: 3;
    margin: auto -10px 0;
    padding: 14px 10px calc(8px + env(safe-area-inset-bottom, 0px));
    background: linear-gradient(rgba(246, 241, 232, 0), #f6f1e8 38%);
  }
  .er-nav-btns .secondary-button { flex: 1 1 0; min-height: 46px; justify-content: center; font-size: 14px; }

  /* برگهٔ پایین‌آمدنی */
  .er-sheet-backdrop {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 6;
    background: rgba(28, 22, 16, .4);
    opacity: 0;
    visibility: hidden;
    transition: opacity .25s ease, visibility .25s ease;
  }
  .exam-runner.er-sheet-open .er-sheet-backdrop { opacity: 1; visibility: visible; }
  .er-side {
    position: fixed;
    inset-inline: 0;
    bottom: 0;
    z-index: 7;
    order: initial;
    width: auto;
    max-width: 640px;
    max-height: 84dvh;
    margin-inline: auto;
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 4px 12px calc(12px + env(safe-area-inset-bottom, 0px));
    overflow-y: auto;
    overscroll-behavior: contain;
    border-radius: 22px 22px 0 0;
    background: #f6f1e8;
    box-shadow: 0 -18px 40px rgba(40, 30, 20, .2);
    transform: translateY(105%);
    visibility: hidden;
    transition: transform .3s cubic-bezier(.22, .61, .36, 1), visibility .3s;
  }
  .exam-runner.er-sheet-open .er-side { transform: none; visibility: visible; }
  .er-sheet-grab { display: grid; flex: none; place-items: center; height: 20px; cursor: pointer; }
  .er-sheet-grab span { width: 42px; height: 5px; border-radius: 999px; background: #d8cfc2; }
  .er-info-card { gap: 10px; padding: 12px; }
  .er-ring { width: 88px; height: 88px; }
  .er-nav-card { flex: none; }
  .er-grid { max-height: none; overflow: visible; }
  .er-grid-row { grid-template-columns: repeat(auto-fill, minmax(44px, 1fr)); }
  .er-cell { height: 42px; }

  /* گزینه‌ها: کوتاه‌ها و «گزینه ۱…۴» چهارتایی در یک ردیف */
  .er-options { gap: 8px; }
  .er-opt { min-height: 46px; padding: 8px 10px; }
  .er-options.is-row,
  .er-options.is-placeholder { grid-template-columns: repeat(4, minmax(0, 1fr)); grid-auto-rows: 1fr; }
  .er-options.is-row .er-opt { gap: 5px; padding: 6px; justify-content: center; }
  .er-options.is-row .er-opt b { width: 22px; height: 22px; font-size: 11px; }
  .er-options.is-placeholder .er-opt { justify-content: center; min-height: 50px; padding: 4px; }
  .er-options.is-placeholder .er-opt b { display: none; }
  .er-options.is-placeholder .er-opt span { white-space: nowrap; font-size: 13px; font-weight: 800; }
  .er-doubt-row { padding: 10px; }
}

/* گوشیِ افقی: نوار بالا یک خطِ کوتاه، سؤال تا جای ممکن پهن و بلند */
@media (max-height: 520px) and (orientation: landscape) {
  .er-top { padding: 4px 12px; }
  .er-title small { display: none; }
  .er-timer-mini { padding: 4px 10px; }
  .er-sheet-toggle,
  .er-top-actions .secondary-button { height: 32px; min-height: 32px; }
  .er-main { width: 100%; max-width: 1000px; margin-inline: auto; padding: 6px 14px 0; gap: 8px; }
  .er-qno-num { min-width: 28px; height: 28px; font-size: 13px; }
  .er-iconbtn { width: 32px; height: 32px; }
  .er-nav-btns { margin-inline: -14px; padding: 8px 14px 6px; }
  .er-nav-btns .secondary-button { min-height: 38px; }
  /* برگه در حالت افقی دوستونه است: زمان و «اتمام» کنارِ شبکهٔ سؤال‌ها */
  .er-side {
    display: grid;
    grid-template-columns: minmax(220px, .8fr) minmax(0, 1.2fr);
    align-items: start;
    max-width: 760px;
    max-height: 92dvh;
  }
  .er-sheet-grab { grid-column: 1 / -1; }
}

/* پاپ‌آپ کوچکِ «مشاهده پاسخ» بدون ثبت گزینه — بالای حالت تمام‌صفحه (.sqf = 99000) */
.reveal-confirm {
  position: fixed;
  inset: 0;
  z-index: 99500;
  display: grid;
  place-items: center;
  padding: 16px;
  background: rgba(30, 28, 24, 0.32);
  animation: backdropIn var(--motion-fast, 140ms) ease both;
}
.reveal-confirm-card {
  width: min(340px, 100%);
  background: #fff;
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: 0 18px 44px rgba(41, 36, 29, 0.18);
  padding: 16px 16px 14px;
}
.reveal-confirm-card h4 {
  margin: 0 0 6px;
  font-size: 15px;
  font-weight: 900;
}
.reveal-confirm-card p {
  margin: 0 0 10px;
  font-size: 13px;
  line-height: 1.9;
  color: var(--muted);
}
.reveal-confirm-skip {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--muted);
  cursor: pointer;
  margin-bottom: 12px;
}
.reveal-confirm-skip input { accent-color: var(--orange); margin: 0; }
.reveal-confirm-actions { display: flex; gap: 8px; }
.reveal-confirm-actions button {
  flex: 1;
  font: inherit;
  font-size: 13px;
  font-weight: 800;
  border-radius: 9px;
  padding: 8px 10px;
  cursor: pointer;
}
.reveal-confirm-ok { border: 1px solid #f0b487; background: var(--orange-soft); color: #9a5a1f; }
.reveal-confirm-cancel { border: 1px solid var(--line); background: var(--panel-soft); color: var(--ink); }

/* پاپ‌آپِ «قفلِ امتیاز مجموعه» پیش از دیدنِ کلید/پاسخنامه — بالای استودیوی چاپ (1200) */
.slock-confirm {
  position: fixed;
  inset: 0;
  z-index: 99500;
  display: grid;
  place-items: center;
  padding: 16px;
  background: rgba(30, 28, 24, 0.42);
  backdrop-filter: blur(2px);
  animation: backdropIn var(--motion-fast, 140ms) ease both;
}
.slock-confirm.closing { opacity: 0; transition: opacity 140ms ease; }
.slock-card {
  width: min(420px, 100%);
  background: #fff;
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: 0 24px 60px rgba(41, 36, 29, 0.22);
  padding: 18px 18px 16px;
  display: grid;
  gap: 12px;
  animation: slockIn 180ms var(--ease-soft, ease) both;
}
@keyframes slockIn { from { transform: translateY(8px) scale(.98); opacity: 0; } to { transform: none; opacity: 1; } }
.slock-head { display: flex; align-items: center; gap: 12px; }
.slock-emblem {
  flex: 0 0 auto;
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: linear-gradient(145deg, #fff3e6, #ffe2c7);
  color: var(--orange);
  box-shadow: inset 0 0 0 1px #f6cfa9;
}
.slock-emblem svg { width: 22px; height: 22px; }
.slock-head h3 { margin: 0; font-size: 15.5px; font-weight: 950; line-height: 1.7; }
.slock-head small { color: #b64c3b; font-size: 11.5px; font-weight: 800; }
.slock-progress {
  border: 1px solid #f1e5d6;
  background: #fffaf4;
  border-radius: 12px;
  padding: 10px 12px;
  display: grid;
  gap: 8px;
}
.slock-progress-row { display: flex; justify-content: space-between; align-items: baseline; font-size: 12px; color: var(--muted); font-weight: 800; }
.slock-progress-row b { color: var(--ink); font-size: 15px; font-weight: 950; }
.slock-progress-row em { font-style: normal; color: var(--muted); font-size: 11.5px; font-weight: 800; }
.slock-bar { height: 7px; border-radius: 99px; background: #f1e3d2; overflow: hidden; }
.slock-bar i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #ff9a52, var(--orange)); }
.slock-card p { margin: 0; font-size: 13px; line-height: 2; color: #5f574c; }
.slock-card p b { color: #b64c3b; font-weight: 900; }
.slock-card .slock-tip {
  display: flex;
  gap: 7px;
  align-items: flex-start;
  font-size: 12px;
  line-height: 1.9;
  color: #2f7a65;
  background: #f1fbf8;
  border: 1px solid #cdeee3;
  border-radius: 10px;
  padding: 7px 10px;
}
.slock-tip svg { flex: 0 0 auto; width: 15px; height: 15px; margin-top: 4px; }
.slock-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 2px; }
.slock-actions button { min-height: 42px; justify-content: center; font: inherit; font-size: 13px; font-weight: 900; border-radius: 11px; cursor: pointer; }
.slock-go { border: 1px solid #efc3bb; background: #fff; color: #b64c3b; padding: 8px 10px; }
.slock-go:hover { background: #fff5f3; }
@media (max-width: 420px) {
  .slock-actions { grid-template-columns: 1fr; }
}

/* پروفایل — «مدیریت زمان»: سؤال‌های نرسیده در آزمون آنلاین */
.sp-unreached-card { padding: 16px 17px 14px; }
.spu-lead { margin: 10px 0 12px; font-size: 12.5px; line-height: 2; color: #6f675b; }
.spu-lead b { color: #2f2a24; font-weight: 900; }
.sp-unreached-card .sp-answer-bar .pending { background: #cfc8bc; }
.spu-legend { list-style: none; margin: 10px 0 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 6px 10px; }
.spu-legend li { display: flex; align-items: center; gap: 6px; font-size: 11px; font-weight: 750; color: #7f7669; }
.spu-legend li b { margin-inline-start: auto; color: #37302a; font-weight: 900; }
.spu-legend i { width: 8px; height: 8px; border-radius: 3px; background: #cfc8bc; flex: none; }
.spu-legend .correct i { background: #26937f; }
.spu-legend .wrong i { background: #db684d; }
.spu-legend .blank i { background: #d9ac35; }
.sq-result.unreached { color: #6f675b; background: #f2eee7; }
/* کارنامه — «نرسیده» (زیرمجموعهٔ نزده؛ در نمره همان نزده) */
.rr-metric.unreached { color: #6f675b; background: #f2eee7; }
.rr-status.unreached { color: #6f675b; background: #f2eee7; }
/* اصلاح بعد از آزمون: سؤالِ «حذف‌شده» (صورتش عوض شده، در نمره نیست) و «بازتصحیح‌شده» (کلیدش اصلاح شده) */
.rr-status.removed { color: #655c7c; background: #f0edf6; }
.rr-removed-chip, .rr-regraded-chip { padding: 3px 9px; border-radius: 999px; font-size: 11px; font-style: normal; font-weight: 800; line-height: 1.7; }
.rr-removed-chip { color: #655c7c; background: #f0edf6; }
.rr-regraded-chip { color: #345f98; background: #eaf2fd; }
.rr-sheet-question.removed { background: repeating-linear-gradient(135deg, transparent 0 6px, rgba(120, 108, 150, .09) 6px 12px); }
.rr-sheet-question.removed > b { color: var(--muted); text-decoration: line-through; }
.rr-sheet-question.removed > i { opacity: .5; }
.rr-qrow.removed { box-shadow: inset -3px 0 #a597c4; color: var(--muted); }
.rr-time-bar.removed i { background: #bdb3d3; }
.rr-note.rr-correction-note { align-items: flex-start; line-height: 1.9; border-color: #d9d2ea; background: #f6f4fb; color: #4f4767; }
.rr-note.rr-correction-note svg { flex: none; margin-top: 4px; }
.rr-answer-ctx:has(.rr-removed-chip, .rr-regraded-chip) { flex-wrap: wrap; }
.rr-sheet-summary .unreached { background: #f7f4ee; border-style: dashed; }
.student-history-legend .unreached::before { background: #cfc8bc; }

/* ── ساخت آزمون روی گوشی: مرحله‌نما و پاپ‌آپ انتخاب سؤال ─────────────────────
   مرحله‌نمای چهارتایی روی گوشی دو ردیفِ شکسته با خط‌های بی‌ربط می‌شد؛ حالا یک
   ردیف ستونِ هم‌عرض است (دایره و زیرش عنوان) و خطِ رابط از خودِ هر مرحله کشیده
   می‌شود. «مرحلهٔ ۱ از ۴» و توضیح هم تکراری‌اند و روی گوشی نیستند. */
@media (max-width: 760px) {
  .exam-wizard-head { margin-bottom: 12px; }
  .exam-wizard-head p,
  .exam-wizard-progress { display: none; }
  .exam-stepper {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: minmax(0, 1fr);
    align-items: start;
    gap: 0;
    margin-bottom: 14px;
    padding: 10px 2px 8px;
    border: 1px solid #efe8dc;
    border-radius: 14px;
    background: #fbf8f3;
  }
  .exam-stepper .exam-step-line { display: none; }
  .exam-stepper .exam-step { position: relative; min-width: 0; flex-direction: column; gap: 5px; text-align: center; }
  .exam-stepper .exam-step:not(:first-child)::before {
    content: "";
    position: absolute;
    top: 13px;
    inset-inline-start: calc(-50% + 18px);
    width: calc(100% - 36px);
    height: 2px;
    border-radius: 2px;
    background: #e5dccb;
  }
  .exam-stepper .exam-step.done::before,
  .exam-stepper .exam-step.on::before { background: #9ed4c1; }
  .exam-stepper .exam-step.on .exam-step-num { transform: none; box-shadow: 0 0 0 4px rgba(249, 115, 22, .16); }
  .exam-stepper .exam-step-label { font-size: 10.5px; line-height: 1.5; }

  /* کادرِ «در حال انتخاب برای» روی گوشی یک‌چهارمِ صفحه را می‌گرفت و روی فرم می‌چسبید */
  .exam-picker-context { position: static; margin: 0 0 12px; padding: 10px; box-shadow: none; backdrop-filter: none; }
}
/* مودالِ تمام‌صفحهٔ گوشی با 100vh از نوارِ آدرس بلندتر بود و فوترِ چسبان (مثلاً
   «افزودن به …» ِ انتخاب سؤال آزمون) زیرِ لبهٔ صفحه می‌ماند. dvh ارتفاعِ واقعی است. */
@media (max-width: 560px) {
  .modal, .modal.large, .modal.xlarge { height: 100dvh; max-height: 100dvh; }
}

/* ── محیط آزمون مثل بانک سؤال ──────────────────────────────────────────────
   کارتِ سؤال سفید است (قبلاً شفاف روی زمینهٔ کرم بود و تصویرِ سفیدِ سؤال مثل
   یک عکسِ چسبانده دیده می‌شد). روی گوشی: قلم نیست، نما تمام‌صفحه و افقی است
   (erEnterPhoneScreen)، «قبلی/بعدی» در نوار بالا و دکمهٔ «عمودی/افقی» دارد. */
.er-question.detail-card { background: #fff; border-color: #f1efe9; }
@media (max-width: 760px), (max-height: 520px) and (orientation: landscape) {
  #erScratch { display: none; }
}
.er-phone-btn { display: none; }
.exam-runner.er-phone .er-phone-btn {
  flex: none;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center; justify-content: center;
  padding: 0;
  border: 1px solid #e5dccb;
  border-radius: 12px;
  background: #fff;
  color: #6a6154;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.exam-runner.er-phone .er-phone-btn svg { width: 19px; height: 19px; }
.exam-runner.er-phone .er-phone-btn:disabled { opacity: .4; cursor: default; }
.exam-runner.er-phone.er-wide .er-rotate { width: auto; display: inline-flex; align-items: center; gap: 5px; padding: 0 11px; font: inherit; font-size: 12px; font-weight: 800; }
.exam-runner.er-phone .er-rotate svg { width: 17px; height: 17px; }
.exam-runner.er-phone:not(.er-wide) .er-rotate span,
.exam-runner.er-phone:not(.er-wide) .er-top-go { display: none; }
/* گوشیِ افقی‌ای که مرورگرش قفلِ جهت نمی‌دهد: دکمهٔ چرخش کاری از دستش برنمی‌آید */
@media (orientation: landscape) {
  .exam-runner.er-phone:not(.er-can-lock) .er-rotate { display: none; }
}
.exam-runner.er-phone .er-question.detail-card { padding: 10px 12px; border-radius: 14px; box-shadow: none; }
.exam-runner.er-phone .er-options.is-row .er-opt,
.exam-runner.er-phone .er-options.is-placeholder .er-opt { min-height: 52px; }
.exam-runner.er-phone .er-options.is-placeholder .er-opt span { font-size: 14px; }

/* نمای پهن (گوشیِ افقی یا چرخیده): نوار بالا یک خط، سؤال پهن، ناوبری بالا */
.exam-runner.er-wide .er-top { min-height: 50px; gap: 8px; padding: 5px 10px; background: rgba(255, 255, 255, .94); }
.exam-runner.er-wide .er-title small { display: none; }
.exam-runner.er-wide .er-timer-mini { padding: 5px 10px; }
.exam-runner.er-wide .er-sheet-toggle,
.exam-runner.er-wide .er-top-actions .secondary-button { height: 40px; min-height: 40px; }
.exam-runner.er-wide .er-main {
  width: 100%;
  max-width: 1000px;
  margin-inline: auto;
  gap: 8px;
  padding: 8px 10px calc(12px + env(safe-area-inset-bottom, 0px));
}
.exam-runner.er-wide .er-nav-btns { display: none; }
.exam-runner.er-wide .er-qno-num { min-width: 28px; height: 28px; font-size: 13px; }
.exam-runner.er-wide .er-iconbtn { width: 34px; height: 34px; }
.exam-runner.er-wide .er-side {
  display: grid;
  grid-template-columns: minmax(220px, .8fr) minmax(0, 1.2fr);
  align-items: start;
  max-width: 760px;
  max-height: 92%;
}
.exam-runner.er-wide .er-sheet-grab { grid-column: 1 / -1; }
/* گوشیِ عمودی که قفلِ افقی نگرفت: خودِ محیط آزمون (و پاپ‌آپ‌های رویش، مثل «ثبت
   نهایی») می‌چرخد تا افقی دیده شود؛ برگهٔ fixed ِ داخلش هم با همان جعبه می‌چرخد. */
@media (orientation: portrait) {
  body.er-rotated .exam-runner,
  body.er-rotated .modal-backdrop {
    inset: auto;
    top: 0;
    left: 0;
    width: 100dvh;
    height: 100vw;
    transform-origin: top left;
    transform: rotate(90deg) translateY(-100%);
  }
  body.er-rotated .modal-backdrop { padding: 12px; }
  body.er-rotated .modal-backdrop .modal { width: min(560px, 100%); height: auto; max-height: 100%; border-radius: 18px; }
}
/* فوترِ انتخاب سؤال روی گوشی: شمارنده یک ردیفِ کامل، دکمه‌ها ردیفِ زیرش؛
   «افزودن به <درس>» جای کافی می‌گیرد و دوخطه نمی‌شود */
@media (max-width: 560px) {
  .modal-footer.ep-footer { flex-wrap: wrap; gap: 6px 8px; padding: 8px 12px calc(8px + env(safe-area-inset-bottom, 0px)); }
  .ep-footer .exam-picker-count { flex: 1 1 100%; font-size: 11.5px; line-height: 1.7; }
  .ep-footer .omr-foot-btns { flex: 1 1 100%; display: flex; gap: 8px; }
  .ep-footer .omr-foot-btns > button { min-height: 44px; justify-content: center; white-space: nowrap; }
  .ep-footer .omr-foot-btns > .primary-button { flex: 1 1 auto; min-width: 0; }
}

/* ═══════════════════ آمار استفاده (us-*) — بقیه از srep-* ═══════════════════ */
.us-kpis { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.us-span-label { margin-inline-start: 8px; }
.us-muted { margin: 0; font-size: 11px; color: var(--muted); }
.us-generated { text-align: center; }
.us-note {
  display: flex; align-items: flex-start; gap: 7px; margin: 0; padding: 9px 11px;
  border-radius: 11px; background: var(--panel-soft); font-size: 11px; line-height: 1.9; color: var(--muted);
}
.us-note .ui-icon { flex: 0 0 auto; width: 15px; height: 15px; margin-top: 3px; }
.us-note b { color: var(--ink); }
.us-breaks { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; }
.us-break { display: grid; gap: 7px; align-content: start; min-width: 0; }
.us-break h4 { margin: 0 0 2px; font-size: 12px; font-weight: 900; color: var(--ink); }
.us-break-row {
  display: grid; grid-template-columns: minmax(0, 7.5em) minmax(40px, 1fr) auto 3.4em;
  align-items: center; gap: 8px; font-size: 11px;
}
.us-break-name { color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.us-break-bar { height: 8px; border-radius: 999px; background: var(--panel-soft); overflow: hidden; }
.us-break-bar i { display: block; height: 100%; border-radius: 999px; background: var(--orange); }
.us-break-row b { color: var(--ink); font-weight: 800; }
.us-break-row small { color: var(--muted); text-align: end; }
.us-weekday { margin-top: 6px; max-width: 520px; }

/* نقشهٔ روزِ هفته × ساعت. محورِ ساعت مثل بقیهٔ نمودارهای پنل چپ‌به‌راست است. */
/* بدون min-width:0 ستونِ گریدِ بلوک به اندازهٔ حداقلِ نقشه (۵۶۰px) باز می‌شود و
   کلِ کارت در موبایل از صفحه بیرون می‌زند؛ اسکرول باید داخلِ خودِ نقشه بماند. */
.us-page .srep-block > * { min-width: 0; }
.us-heat-scroll { overflow-x: auto; padding-bottom: 4px; max-width: 100%; }
.us-heat {
  display: grid; grid-template-columns: 5.2em repeat(24, minmax(15px, 1fr)) minmax(70px, 6em);
  gap: 3px; min-width: 560px; align-items: center;
}
.us-heat-hour { font-size: 10px; color: var(--muted); text-align: center; }
.us-heat-day { font-size: 11px; font-weight: 700; color: var(--muted); direction: rtl; text-align: right; padding-inline-end: 4px; }
.us-heat-cell {
  aspect-ratio: 1; min-height: 15px; border-radius: 4px; cursor: default;
  background: color-mix(in srgb, var(--orange) var(--lv), var(--panel-soft));
  outline: none;
}
.us-heat-cell.zero { background: var(--panel-soft); }
.us-heat-cell:hover, .us-heat-cell:focus-visible { box-shadow: 0 0 0 2px var(--panel), 0 0 0 3.5px var(--ink); }
.us-heat-total { position: relative; display: flex; align-items: center; height: 15px; margin-inline-start: 6px; }
.us-heat-total i { position: absolute; inset-block: 2px; left: 0; border-radius: 3px; background: color-mix(in srgb, var(--orange) 28%, transparent); }
.us-heat-total b { position: relative; padding-inline-start: 5px; font-size: 10.5px; font-weight: 800; color: var(--ink); }
.us-heat-read { margin: 4px 0 0; min-height: 1.9em; font-size: 11.5px; line-height: 1.9; color: var(--muted); }
.us-heat-read b { color: var(--ink); }

/* جدول‌های بینش: تمرکزِ مباحث و ماندگاری */
#usageInsights { gap: 18px; }
.us-table-wrap { overflow-x: auto; max-width: 100%; border: 1px solid var(--line); border-radius: 12px; }
.us-table { width: 100%; border-collapse: collapse; font-size: 11.5px; }
.us-table th {
  position: sticky; top: 0; background: var(--panel-soft); color: var(--muted);
  font-weight: 800; font-size: 10.5px; text-align: start; padding: 8px 10px; white-space: nowrap;
}
.us-table td { padding: 7px 10px; border-top: 1px solid var(--line); vertical-align: middle; color: var(--ink); white-space: nowrap; }
.us-table tbody tr:hover td { background: color-mix(in srgb, var(--panel-soft) 60%, transparent); }
.us-table .us-num { font-variant-numeric: tabular-nums; }
.us-table .us-name { white-space: normal; min-width: 150px; }
.us-table .us-name b { font-weight: 800; }
.us-table .us-name small, .us-sub { display: block; font-size: 10.5px; color: var(--muted); margin-top: 1px; }
.us-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-inline-end: 6px; vertical-align: 1px; }
.srep-chip .us-dot { margin-inline-end: 5px; }
.us-inline-delta { position: static; display: inline-flex; }
.us-spark { display: block; fill: var(--orange); opacity: .8; }
.us-lesson-chips { margin-top: 2px; }
.us-lesson-chips .srep-chip { padding: 5px 11px; font-size: 11px; }
.us-more { justify-self: center; font-size: 11.5px; }

.us-funnel { display: grid; gap: 9px; }
.us-funnel-row {
  display: grid; grid-template-columns: minmax(0, 11em) minmax(60px, 1fr) 4em 3.8em minmax(0, 13em);
  align-items: center; gap: 10px; font-size: 11.5px;
}
.us-funnel-label { color: var(--ink); font-weight: 700; }
.us-funnel-bar { height: 14px; border-radius: 6px; background: var(--panel-soft); overflow: hidden; }
.us-funnel-bar i { display: block; height: 100%; border-radius: 6px; background: var(--blue); }
.us-funnel-row b { font-weight: 900; text-align: end; font-variant-numeric: tabular-nums; }
.us-funnel-pct { color: var(--ink); font-weight: 700; }
.us-funnel-row small { color: var(--muted); font-size: 10.5px; }

.us-ret td.us-ret-cell {
  text-align: center; font-weight: 700; font-size: 11px;
  background: color-mix(in srgb, var(--teal) var(--lv), var(--panel));
}
.us-ret td.us-ret-cell.empty { background: var(--panel); }

@media (max-width: 640px) {
  .us-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .us-kpis .srep-kpi { padding: 11px 11px 10px; gap: 0; }
  .us-kpis .srep-kpi-icon { display: none; }
  .us-kpis .srep-kpi-body { padding-top: 20px; }
  .us-kpis .srep-kpi-delta { inset-inline-end: auto; inset-inline-start: 10px; top: 9px; font-size: 10px; }
  .us-span-label { margin-inline-start: 0; }
  .us-break-row { grid-template-columns: minmax(0, 6.5em) minmax(30px, 1fr) auto 3em; }
  .us-funnel-row { grid-template-columns: minmax(0, 1fr) 3.4em 3.4em; row-gap: 3px; }
  .us-funnel-bar { grid-column: 1 / -1; grid-row: 2; }
  .us-funnel-row small { grid-column: 1 / -1; }
}

/* Trial activation and explicit split payment. */
.shop-wallet-amount { display: grid; gap: 7px; font-size: 12px; color: var(--muted); }
.shop-wallet-amount input { width: 100%; min-width: 0; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--panel); color: var(--text); font: inherit; font-size: 16px; direction: ltr; }
.shop-wallet-amount input:disabled { opacity: .55; }
.shop-payment-split { display: grid; gap: 9px; margin: 12px 0; font-size: 12px; }
.shop-payment-split > span { display: flex; justify-content: space-between; gap: 8px; }
.shop-payment-split > span:last-child { padding-top: 9px; border-top: 1px solid var(--line); }
.shop-demo-banner { display: flex; align-items: center; gap: 16px; padding: 20px; margin-bottom: 20px; border: 1px solid #c7e5d3; border-radius: 18px; background: #edf8f1; color: #194e35; }
.shop-demo-banner > span svg { width: 28px; height: 28px; }
.shop-demo-banner > div { flex: 1; }
.shop-demo-banner p { margin: 6px 0 0; font-size: 12px; line-height: 1.9; }
@media (max-width: 600px) { .shop-demo-banner { flex-wrap: wrap; } .shop-demo-banner .primary-button { width: 100%; } }

/* Keep the offer and countdown opposite the copy, including without a campaign CTA. */
.shop-wheel-banner { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; }
.shop-wheel-banner-actions { display: flex; flex-direction: column; align-items: stretch; gap: 12px; min-width: 240px; }
.shop-wheel-banner-actions .shop-wheel-timer { display: grid; grid-template-columns: auto 1fr; width: 100%; margin: 0; padding: 12px 18px; text-align: center; }
.shop-wheel-banner-actions .shop-wheel-timer time { grid-column: 1 / -1; width: 100%; font-size: 25px; padding: 7px 14px; letter-spacing: 2px; }
@media (max-width: 760px) {
  .shop-wheel-banner { grid-template-columns: auto minmax(0, 1fr); gap: 18px; }
  .shop-wheel-banner-actions { grid-column: 1 / -1; min-width: 0; }
  .shop-wheel-banner-actions .shop-wheel-timer { display: flex; justify-content: space-between; }
  .shop-wheel-banner-actions .shop-wheel-timer time { width: auto; font-size: 20px; }
}

/* ═══════════ تخفیف پله‌ایِ عرضه، پیش‌خرید، پاپ‌آپِ ثبت‌نام ═══════════ */
/* بنرِ تخفیف پله‌ای: کارتِ شبِ بنفش با نورِ طلایی؛ عددِ بزرگ، صندلی‌هایی که پر
   می‌شوند و نمودارِ پله‌ایِ واقعی (ارتفاعِ هر پله = درصدش) که به گردونه می‌رسد. */
.lx { --lx-gold: #ffc857; --lx-amber: #ff8a3d; position: relative; isolation: isolate; overflow: hidden; display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); align-items: end; gap: 28px; margin: 0 0 26px; padding: 28px 30px 24px; border-radius: 28px; color: #fff; background: radial-gradient(120% 90% at 100% 0%, #ff8a3d40, transparent 55%), radial-gradient(80% 80% at 0% 100%, #7c3aed4d, transparent 60%), linear-gradient(140deg, #150c27, #26113d 55%, #3b1538); box-shadow: 0 22px 50px #1c0d3340, inset 0 1px 0 #ffffff1a; }
.lx::before { content: ""; position: absolute; inset: 0; z-index: -1; opacity: .5; background-image: radial-gradient(#ffffff38 1px, transparent 1.4px); background-size: 22px 22px; -webkit-mask-image: linear-gradient(90deg, #000, transparent 70%); mask-image: linear-gradient(90deg, #000, transparent 70%); }
.lx::after { content: ""; position: absolute; z-index: -1; width: 380px; height: 380px; inset: -170px -120px auto auto; border-radius: 50%; border: 1px solid #ffc8573d; box-shadow: 0 0 0 42px #ffc8570a, 0 0 0 90px #ffc85708; }
.lx-kicker { display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px; border: 1px solid #ffffff26; border-radius: 999px; background: #ffffff12; color: #ffe6b3; font-size: 12px; font-weight: 800; letter-spacing: .2px; }
/* box-shadow هر فریم روی نخِ اصلی نقاشی می‌شود؛ چند تپش کافی است و بعد می‌ایستد. */
.lx-live { position: relative; width: 8px; height: 8px; border-radius: 50%; background: #3ee08f; box-shadow: 0 0 0 0 #3ee08f99; animation: lx-live 1.8s ease-out 4; }
@keyframes lx-live { 0% { box-shadow: 0 0 0 0 #3ee08f99; } 80%, 100% { box-shadow: 0 0 0 9px #3ee08f00; } }
.lx-hero { display: flex; align-items: center; gap: 18px; margin: 14px 0 16px; }
.lx-big { display: flex; align-items: flex-start; flex: none; line-height: .9; font-weight: 900; background: linear-gradient(180deg, #fff3d1 5%, var(--lx-gold) 45%, var(--lx-amber) 100%); -webkit-background-clip: text; background-clip: text; color: transparent; filter: drop-shadow(0 8px 22px #ff8a3d55); }
.lx-big b { font-size: clamp(66px, 8vw, 108px); letter-spacing: -2px; }
.lx-big span { margin-top: .2em; font-size: clamp(28px, 3.2vw, 44px); }
.lx-hero-copy h2 { margin: 0 0 6px; color: #fff; font-size: clamp(19px, 2vw, 27px); font-weight: 900; }
.lx-hero-copy p { margin: 0; color: #e9ddff; font-size: 13px; line-height: 1.95; }
.lx-hero-copy p b { color: var(--lx-gold); }
.lx-seats { max-width: 440px; padding: 12px 14px; border: 1px solid #ffffff1f; border-radius: 16px; background: #ffffff0d; backdrop-filter: blur(4px); }
.lx-seats-row { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.lx-seats-row span { color: #fff; font-size: 14px; font-weight: 800; }
.lx-seats-row span b { color: var(--lx-gold); font-size: 22px; margin-inline-end: 2px; }
.lx-seats-row small { color: #cdbdf0; font-size: 11px; }
.lx-dots { display: grid; grid-template-columns: repeat(auto-fill, minmax(18px, 1fr)); gap: 6px; }
.lx-dots i { height: 18px; border-radius: 6px; background: linear-gradient(180deg, #ffe39a, var(--lx-gold)); box-shadow: 0 0 12px #ffc85766; }
.lx-dots i.is-taken { background: #ffffff1a; box-shadow: none; }
.lx-meter { height: 10px; border-radius: 999px; background: #ffffff1a; overflow: hidden; }
.lx-meter span { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--lx-amber), var(--lx-gold)); transition: width .5s ease; }
.lx-stairs { display: flex; align-items: flex-end; gap: 8px; height: 214px; margin: 0; padding: 26px 0 0; list-style: none; }
.lx-step { position: relative; display: flex; flex: 1 1 0; min-width: 0; flex-direction: column; align-items: stretch; justify-content: flex-end; gap: 7px; height: 100%; text-align: center; }
.lx-bar { position: relative; display: flex; align-items: flex-start; justify-content: center; height: var(--h); min-height: 44px; padding-top: 9px; border: 1px solid #ffffff24; border-radius: 14px 14px 8px 8px; background: linear-gradient(180deg, #ffffff26, #ffffff0a); transition: height .5s ease; }
.lx-bar b { font-size: clamp(14px, 1.3vw, 18px); font-weight: 900; }
.lx-bar svg { width: 20px; height: 20px; }
.lx-step small { color: #cdbdf0; font-size: 11px; white-space: nowrap; }
.lx-step.is-done .lx-bar { background: #ffffff0a; border-style: dashed; border-color: #ffffff1f; }
.lx-step.is-done .lx-bar b { color: #ffffff66; text-decoration: line-through; }
.lx-step.is-now .lx-bar { overflow: hidden; border-color: #ffe39a; background: linear-gradient(180deg, #ffe39a, var(--lx-gold) 45%, var(--lx-amber)); color: #3b1538; box-shadow: 0 0 0 4px #ffc85726, 0 14px 32px #ff8a3d66; }
.lx-step.is-now .lx-bar::after { content: ""; position: absolute; inset: 0; background: linear-gradient(115deg, transparent 30%, #ffffff66 45%, transparent 60%); transform: translateX(-120%); animation: lx-shine 3.2s ease-in-out infinite; }
@keyframes lx-shine { 0%, 55% { transform: translateX(-120%); } 100% { transform: translateX(120%); } }
.lx-step.is-now small { color: var(--lx-gold); font-weight: 800; }
.lx-now-tag { position: absolute; top: -24px; inset-inline: 0; margin: 0 auto; width: max-content; padding: 2px 9px; border-radius: 999px; background: #fff; color: #3b1538; font-size: 11px; font-style: normal; font-weight: 900; box-shadow: 0 6px 14px #0003; }
.lx-step.is-wheel .lx-bar { align-items: center; padding: 0; border-style: dashed; color: #f3b6ff; background: radial-gradient(circle at 50% 30%, #c084fc40, #ffffff08); }
@media (prefers-reduced-motion: reduce) { .lx-live, .lx-step.is-now .lx-bar::after { animation: none; } }
@media (max-width: 900px) {
  .lx { grid-template-columns: minmax(0, 1fr); gap: 18px; padding: 22px 18px 18px; border-radius: 24px; }
  .lx-stairs { height: 170px; gap: 6px; }
  .lx-seats { max-width: none; }
}
@media (max-width: 420px) {
  .lx-hero { gap: 12px; }
  .lx-big b { font-size: 60px; }
  .lx-bar b { font-size: 12px; }
  .lx-step small { font-size: 10px; }
}
.shop-launch-steps { display: flex; gap: 8px; margin: 0; padding: 0; list-style: none; }
.shop-launch-steps li { display: grid; place-items: center; gap: 2px; min-width: 64px; padding: 10px 8px; border-radius: 14px; text-align: center; }
.shop-launch-steps li b { font-size: 18px; line-height: 1.2; }
.shop-launch-steps li small { font-size: 11px; opacity: .85; white-space: nowrap; }
.shop-launch-steps li.is-done { opacity: .5; }
.shop-launch-steps li.is-done b { text-decoration: line-through; }
/* همان پله‌ها داخل پاپ‌آپِ ثبت‌نام، روی زمینهٔ روشن */
.shop-launch-steps.compact { flex-wrap: wrap; justify-content: center; margin-top: 14px; }
.shop-launch-steps.compact li { background: #fff4ea; color: #8a3a12; }
.shop-launch-steps.compact li.is-now { background: #d9480f; color: #fff; }

.shop-presale-chip { display: inline-flex; align-items: center; gap: 6px; align-self: flex-start; padding: 5px 10px; border-radius: 999px; background: #eef2ff; color: #3730a3; font-size: 12px; font-weight: 800; }
.shop-presale-chip svg { width: 14px; height: 14px; }
.shop-completion-note { display: flex; align-items: flex-start; gap: var(--space-2); margin: 0; padding: var(--space-3); border: 1px solid #e7d69e; border-radius: 12px; background: var(--yellow-soft); color: #785600; font-size: 12px; line-height: 1.9; }
.shop-completion-note > .ui-icon { flex: none; width: 16px; height: 16px; margin-top: var(--space-1); }
.shop-card > .shop-completion-note { font-size: 11px; }
.shop-presale-note { display: flex; gap: 8px; margin-top: 10px; padding: 10px 12px; border-radius: 12px; background: #eef2ff; color: #312e81; font-size: 12px; line-height: 1.9; }
.shop-presale-note svg { width: 16px; height: 16px; flex: none; margin-top: 3px; }
.shop-presale-hero, .launch-signup-hero { display: flex; gap: 14px; align-items: flex-start; padding: 16px; border-radius: 16px; background: #fff4ea; color: #5c2408; }
.shop-presale-hero { background: #eef2ff; color: #1e1b4b; }
.shop-presale-hero > svg, .launch-signup-hero > svg { width: 30px; height: 30px; flex: none; color: #d9480f; }
.shop-presale-hero > svg { color: #4338ca; }
.shop-presale-hero > div > b, .launch-signup-hero > div > b { display: block; margin-bottom: 4px; font-size: 16px; }
.shop-presale-hero p, .launch-signup-hero p { margin: 0; font-size: 13px; line-height: 1.9; }
.shop-presale-points { display: grid; gap: 10px; margin: 14px 0 0; padding: 0; list-style: none; font-size: 13px; line-height: 1.9; }
.shop-presale-points li { display: flex; gap: 8px; }
.shop-presale-points svg { width: 17px; height: 17px; flex: none; margin-top: 3px; color: #16a34a; }
.shop-presale-points del { color: var(--muted); font-size: 12px; }

.exam-hub-tab.is-locked:not(.on) { color: var(--muted); }
.exam-hub-tab.is-locked:not(.on) svg { opacity: .55; }

.shop-launch-admin { border-color: #f6d3bd; background: linear-gradient(160deg, #fff, #fff8f2); }
.shop-launch-admin .shop-wheel-admin-head span { color: #c2410c; }
.shop-wheel-admin-live.is-off { color: #6b6477; background: #f1eef5; }
.shop-launch-admin-scroll { overflow-x: auto; margin: 4px 0 6px; border: 1px solid #efe4da; border-radius: 12px; background: #fff; }
.shop-launch-admin-table { width: 100%; border-collapse: collapse; font-size: 12.5px; color: #6b5a4c; white-space: nowrap; }
.shop-launch-admin-table th, .shop-launch-admin-table td { padding: 9px 12px; text-align: right; border-bottom: 1px solid #f3ebe3; }
.shop-launch-admin-table th { font-weight: 600; color: #8a7767; background: #fcf8f4; }
.shop-launch-admin-table td b { display: inline-flex; align-items: center; gap: 5px; color: #3d2a1c; }
.shop-launch-admin-table td b svg { width: 15px; height: 15px; }
.shop-launch-admin-table tr.is-now td { background: #fff4ec; }
.shop-launch-admin-table tr.is-now td:first-child { box-shadow: inset -3px 0 0 #d9480f; }
.shop-launch-admin-table tr.is-done td { color: #9a8a7d; }
.shop-launch-admin-table tfoot td { font-weight: 600; color: #3d2a1c; border-bottom: 0; }
.shop-launch-expired { font-style: normal; font-size: 11px; color: #8a7767; background: #f3ebe3; border-radius: 999px; padding: 1px 7px; }
.shop-launch-overflow { font-style: normal; font-size: 11px; color: #b54708; background: #fff1e0; border-radius: 999px; padding: 1px 7px; }
.auth-sub.auth-invite-launch { display: flex; align-items: flex-start; gap: 8px; margin-top: 10px; padding: 10px 12px; border-radius: 12px; background: #fff4ea; color: #7a2e0c; font-weight: 700; }
.auth-sub.auth-invite-launch svg { width: 16px; height: 16px; flex: none; margin-top: 4px; color: #d9480f; }


/* ═════════ شرکت بعد از پایان مهلت (آزمون‌ساز، وضعیت‌ها، نتایج) ═════════ */
.exam-state.late { background: #eef0ff; color: #4a4fb0; }
.exam-window-state.late { color: #4a4fb0; }
.pro-late-card.on { border-color: #c9ccf1; background: #fafaff; }
.pro-late-card .pro-hall-text b { display: inline-flex; align-items: center; gap: 6px; }
.pro-late-card .pro-hall-text b svg { width: 16px; height: 16px; color: #5a5fc4; }
.pro-late-settings { display: grid; gap: 8px; margin-top: 12px; padding: 12px 14px; border: 1px dashed #c9ccf1; border-radius: 12px; background: #fff; }
.pro-late-select { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.pro-late-select > span { color: #4b4438; font-size: 12.5px; font-weight: 800; }
.pro-late-select select {
  min-height: 38px; padding: 0 12px; border: 1px solid #ddd3c4; border-radius: 10px; background: #fff;
  color: var(--ink); font: inherit; font-size: 12.5px; font-weight: 800; cursor: pointer;
}
.pro-late-select select:focus-visible { outline: 2px solid var(--orange); outline-offset: 2px; }
.pro-late-preview { margin: 0; color: #6d665b; font-size: 12px; line-height: 1.9; }
.pro-late-preview b { color: #3f4392; }
.exam-guide-late { display: flex; align-items: flex-start; gap: 8px; margin: 0; padding: 10px 12px; border: 1px solid #cfd2f3; border-radius: 12px; background: #f4f5ff; color: #383d8f; font-size: 12.5px; line-height: 1.9; }
.exam-guide-late svg { flex: none; width: 16px; height: 16px; margin-top: 4px; }
.exam-guide-late.warn { border-color: #f1d6a8; background: #fff8ea; color: #85560f; }
.primary-button.is-late { background: #4f54c2; border-color: #4f54c2; }
.xl-link-expired.late { color: #383d8f; }
.xl-status.tone-late { color: #4a4fb0; }
.xl-status.tone-late i { box-shadow: 0 0 0 4px rgba(74, 79, 176, .14); }
.xl-auth-status.tone-late { background: #eef0ff; color: #383d8f; }

/* پنجرهٔ «مهلت و شرکت با تأخیر» */
.pro-timing-body { display: grid; gap: 14px; }
.pro-timing-state { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; padding: 10px 12px; border: 1px solid #eee5da; border-radius: 12px; background: #fffdf9; font-size: 12.5px; }
.pro-timing-state > span:not(.exam-state) { display: inline-flex; align-items: center; gap: 6px; color: #5f584d; }
.pro-timing-state svg { width: 14px; height: 14px; color: #8b7f6e; }
.pro-timing-sec { display: grid; gap: 10px; padding: 14px; border: 1px solid #eee5da; border-radius: 14px; background: #fff; }
.pro-timing-sec h3 { display: flex; align-items: center; gap: 7px; margin: 0; font-size: 14px; font-weight: 900; }
.pro-timing-sec h3 svg { width: 16px; height: 16px; color: var(--orange); }
.pro-timing-sec .pro-extend-options { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.pro-timing-switch { align-items: center; }
.pro-timing-save { display: flex; justify-content: flex-end; }
.pro-confirm-check { display: flex; align-items: center; gap: 8px; margin: 8px 0; padding: 9px 12px; border: 1px solid #f3c9c2; border-radius: 10px; background: #fff5f3; font-size: 12.5px; font-weight: 800; cursor: pointer; }
.pro-confirm-check input { width: 16px; height: 16px; accent-color: var(--orange); }
@media (max-width: 480px) { .pro-timing-sec .pro-extend-options { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.pro-late-card .pro-hall-toggle input:checked + .pro-switch { background: #5a5fc4; }
.pro-organizer-panel .pro-owner-row .exam-td.exam-td-status { display: grid; justify-items: center; align-content: center; gap: 3px; overflow: visible; }
.pro-owner-row .exam-td-status .exam-state.late { padding: 1px 7px; font-size: 9px; }
.er-info-row.er-late-row { color: #383d8f; }
.er-info-row.er-late-row i { border-color: #cfd2f3; background: #f4f5ff; color: #4a4fb0; }
.er-info-row.er-late-row span { font-weight: 800; }

/* نتایج: زمان شرکت (درونِ مهلت / بعد از مهلت) */
.pr-timing button b { margin-inline-start: 5px; padding: 0 6px; border-radius: 999px; background: rgba(0, 0, 0, .06); font-size: 10px; font-weight: 900; }
.pr-timing button.on b { background: rgba(255, 255, 255, .28); }
.pr-late-chip {
  display: inline-flex; align-items: center; margin-inline-start: 6px; padding: 1px 8px; border-radius: 999px;
  background: #eef0ff; color: #4a4fb0; font-style: normal; font-size: 10px; font-weight: 900; white-space: nowrap; vertical-align: middle;
}
.pr-timing-banner {
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 12px;
  margin: 0 0 14px; padding: 12px 14px; border: 1px solid #cfd2f3; border-radius: 14px; background: linear-gradient(180deg, #f7f8ff, #fff);
}
.pr-timing-icon { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 11px; background: #eef0ff; color: #4a4fb0; }
.pr-timing-icon svg { width: 18px; height: 18px; }
.pr-timing-banner b { display: block; color: #33388a; font-size: 13.5px; font-weight: 900; }
.pr-timing-banner p { margin: 3px 0 0; color: #5f584d; font-size: 12px; line-height: 1.9; }
.pr-timing-actions { display: flex; flex-wrap: wrap; gap: 6px; justify-content: flex-end; }
@media (max-width: 720px) { .pr-timing-banner { grid-template-columns: auto minmax(0, 1fr); } .pr-timing-actions { grid-column: 1 / -1; justify-content: flex-start; } }
.rr-note.rr-late-note { display: flex; align-items: flex-start; gap: 8px; border-color: #cfd2f3; background: #f4f5ff; color: #383d8f; line-height: 1.9; }
.rr-note.rr-late-note svg { flex: none; width: 16px; height: 16px; margin-top: 4px; color: #4a4fb0; }

/* ═════════ برنامهٔ راهبردیِ حسابِ آموزشی (برگزاری برای دانش‌آموزان) + برنامهٔ برگزارشده در پنل دانش‌آموز ═════════ */
.rb-st-unscheduled .rb-status-chip { background: #f1eee8; color: #81786c; }
.rb-st-open .rb-status-chip { background: #e8f6ee; color: #1a7a48; }
.rb-st-late .rb-status-chip { background: #eef0ff; color: #4a4fb0; }
.rb-mobile-stage summary > .rb-st-unscheduled { background: #f1eee8; color: #81786c; }
.rb-mobile-stage summary > .rb-st-open { background: #e8f6ee; color: #1a7a48; }
.rb-mobile-stage summary > .rb-st-late { background: #eef0ff; color: #4a4fb0; }

/* مودالِ مرحله: بازهٔ شرکتِ دانش‌آموزان + شرکت با تأخیر */
.rb-stage-window { display: grid; gap: 10px; margin-top: 12px; padding: 12px; border: 1px solid #ece4d7; border-radius: 14px; background: #fffdfa; }
.rb-stage-window .rb-hint { margin: 0; }
.rb-window-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.rb-late-toggle { position: relative; align-items: center; padding: 10px 12px; border: 1px solid #ece4d7; border-radius: 12px; background: #fff; }
.rb-late-toggle input:checked + .pro-switch { background: #5a5fc4; }
.rb-late-toggle .pro-hall-text { display: grid; gap: 3px; }
.rb-late-toggle .pro-hall-text b { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; }
.rb-late-toggle .pro-hall-text b svg { width: 16px; height: 16px; color: #5a5fc4; }
.rb-late-toggle .pro-hall-text small { color: var(--muted); font-size: 11px; font-weight: 700; line-height: 1.9; }

/* مودالِ «برگزاری برای دانش‌آموزان» */
.rb-org-publish { display: grid; gap: 14px; }
.rbo-block { display: grid; gap: 10px; padding: 14px; border: 1px solid #eee5da; border-radius: 14px; background: #fff; }
.rbo-block-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 10px; }
.rbo-block-head b { display: inline-flex; align-items: center; gap: 7px; font-size: 13.5px; font-weight: 900; }
.rbo-block-head b svg { width: 16px; height: 16px; color: var(--orange); }
.rbo-block-head > span { color: var(--muted); font-size: 11.5px; font-weight: 800; }
.rbo-stage-list { display: grid; gap: 7px; }
.rbo-stage-row {
  position: relative; display: grid; grid-template-columns: 18px minmax(0, 1fr) auto auto; align-items: center; gap: 10px;
  padding: 10px 12px; border: 1.5px solid #ece4d7; border-radius: 12px; background: #fff; cursor: pointer;
  transition: border-color .15s ease, background .15s ease;
}
.rbo-stage-row.on { border-color: var(--orange); background: #fffdf9; }
.rbo-stage-row.off { cursor: not-allowed; opacity: .62; background: #faf7f1; }
.rbo-stage-row input { width: 16px; height: 16px; accent-color: var(--orange); }
.rbo-stage-main { display: grid; gap: 2px; min-width: 0; }
.rbo-stage-main b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; font-weight: 900; }
.rbo-stage-main small { color: var(--muted); font-size: 11px; font-weight: 700; }
.rbo-stage-meta { color: #6b6357; font-size: 11.5px; font-weight: 800; white-space: nowrap; }
.rbo-state { flex: none; padding: 2px 9px; border-radius: 999px; background: #f1eee8; color: #81786c; font-style: normal; font-size: 10.5px; font-weight: 900; white-space: nowrap; }
.rbo-state.ready { background: var(--orange-soft); color: #b8480e; }
.rbo-state.open { background: #e8f6ee; color: #1a7a48; }
.rbo-state.upcoming { background: #f7efe3; color: #97764a; }
.rbo-state.late { background: #eef0ff; color: #4a4fb0; }
.rbo-state.draft { background: #fff7df; color: #9a7413; }
.rbo-short { padding: 2px 8px; border-radius: 8px; background: #fff1e0; color: #b54708; font-style: normal; font-size: 10.5px; font-weight: 900; white-space: nowrap; }
.rbo-stage-tags { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 6px; }
.rbo-short-detail { grid-column: 2 / -1; color: #b54708; font-size: 11px; font-weight: 800; line-height: 1.9; }
.rbo-progress { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.rbo-prog { display: grid; grid-template-columns: 22px minmax(0, 1fr) minmax(0, auto); align-items: center; gap: 10px; padding: 10px 12px; border: 1px solid #eee5da; border-radius: 12px; background: #fff; }
.rbo-prog > span { display: grid; place-items: center; color: var(--muted); }
.rbo-prog > span svg { width: 18px; height: 18px; }
.rbo-prog b { font-size: 13px; font-weight: 900; }
.rbo-prog small { color: var(--muted); font-size: 11.5px; font-weight: 700; text-align: end; overflow-wrap: anywhere; }
.rbo-prog.ok > span { color: #1a7a48; }
.rbo-prog.bad { border-color: #f3c9c2; background: #fff8f6; }
.rbo-prog.bad > span, .rbo-prog.bad small { color: #b42318; }
.rbo-prog.run > span svg { animation: rbo-spin 1s linear infinite; color: var(--orange); }
@keyframes rbo-spin { to { transform: rotate(360deg); } }
.rbo-result { display: flex; align-items: flex-start; gap: 12px; padding: 14px; border: 1px solid #cfe8d9; border-radius: 14px; background: #f3fbf6; }
.rbo-result.warn { border-color: #f1d6a8; background: #fff8ea; }
.rbo-result > span { display: grid; place-items: center; width: 34px; height: 34px; flex: none; border-radius: 11px; background: #fff; color: #1a7a48; }
.rbo-result.warn > span { color: #b8770f; }
.rbo-result > span svg { width: 18px; height: 18px; }
.rbo-result b { display: block; font-size: 14px; font-weight: 900; }
.rbo-result p { margin: 4px 0 0; color: #5f584d; font-size: 12.5px; line-height: 1.9; }
@media (max-width: 640px) {
  .rbo-stage-row { grid-template-columns: 18px minmax(0, 1fr); }
  .rbo-stage-meta, .rbo-stage-tags { grid-column: 2 / -1; }
  .rbo-stage-tags { justify-content: flex-start; }
  .rb-window-grid { grid-template-columns: minmax(0, 1fr); }
}

/* تبِ «نتایج دانش‌آموزان» */
.rbo-results { display: grid; gap: 14px; }
.rbo-kpis { display: flex; flex-wrap: wrap; align-items: stretch; gap: 10px; }
.rbo-kpis > span { display: grid; gap: 2px; min-width: 112px; padding: 10px 14px; border: 1px solid #eee5da; border-radius: 12px; background: #fff; }
.rbo-kpis small { color: var(--muted); font-size: 10.5px; font-weight: 800; }
.rbo-kpis b { font-size: 18px; font-weight: 900; }
.rbo-kpis .secondary-button { align-self: center; }
.rbo-kpis #rboRefresh { margin-inline-start: auto; }
.rbo-matrix-wrap { max-height: 72vh; overflow: auto; border: 1px solid #eee5da; border-radius: 14px; background: #fff; scrollbar-width: thin; }
.rbo-matrix { width: 100%; min-width: 560px; border-collapse: separate; border-spacing: 0; font-size: 12px; }
.rbo-matrix th, .rbo-matrix td { padding: 8px 10px; border-bottom: 1px solid #f3ece0; text-align: center; white-space: nowrap; }
.rbo-matrix thead th { position: sticky; top: 0; z-index: 2; background: #fffaf3; font-weight: 900; }
.rbo-matrix .rbo-student, .rbo-matrix .rbo-student-head { position: sticky; inset-inline-start: 0; z-index: 1; min-width: 150px; background: #fff; text-align: start; }
.rbo-matrix thead .rbo-student-head { z-index: 3; background: #fffaf3; }
.rbo-stage-head { cursor: pointer; min-width: 116px; }
.rbo-stage-head:hover { background: #fff3e3; }
.rbo-stage-head b, .rbo-stage-head small, .rbo-stage-head > span { display: block; }
.rbo-stage-head small, .rbo-stage-head > span { color: var(--muted); font-size: 10.5px; font-weight: 700; }
.rbo-stage-head > span i { color: #4a4fb0; font-style: normal; font-weight: 900; }
.rbo-stage-head .rbo-state { display: inline-block; margin: 3px 0; }
.rbo-cell { font-weight: 900; }
.rbo-cell:not(.none) { cursor: pointer; }
.rbo-cell.high { background: #e8f6ee; color: #1a7a48; }
.rbo-cell.mid { background: #fff7df; color: #9a7413; }
.rbo-cell.low { background: #fdeeee; color: #b42318; }
.rbo-cell.none { color: #b8aea1; }
.rbo-cell:not(.none):hover { filter: brightness(.96); }
.rbo-cell.late { box-shadow: inset 0 0 0 1.5px #b7bbf0; }
.rbo-cell i { display: inline-flex; margin-inline-start: 4px; color: #4a4fb0; vertical-align: middle; }
.rbo-cell i svg { width: 12px; height: 12px; }
.rbo-avg { font-weight: 900; background: #fffaf3; }
.rbo-done { color: var(--muted); font-weight: 800; }
.rbo-empty { padding: 24px; color: var(--muted); }
.rbo-state-box { display: grid; justify-items: center; gap: 8px; padding: 34px 18px; border: 1px dashed #e5d8c6; border-radius: 16px; background: #fffdf9; color: var(--muted); text-align: center; }
.rbo-state-box svg { width: 28px; height: 28px; color: #c9b79b; }
.rbo-state-box b { color: var(--ink); font-size: 14px; font-weight: 900; }
.rbo-state-box p { margin: 0; max-width: 460px; font-size: 12.5px; line-height: 1.9; }
.rbo-state-box.err svg { color: #c0392b; }

/* پنل دانش‌آموز: برنامه‌ای که دبیر/مدرسه برگزار کرده */
.rba-assigned { display: grid; gap: 12px; margin-bottom: 24px; }
.rba-list { display: grid; gap: 10px; margin-top: 14px; }
.rba-stage { display: grid; grid-template-columns: 40px minmax(0, 1fr) auto auto; align-items: center; gap: 14px; padding: 14px; border: 1px solid #ece4d7; border-radius: 16px; background: #fff; }
.rba-stage.rba-open, .rba-stage.rba-running { border-color: #bfe3cd; background: #fbfefc; }
.rba-stage.rba-late { border-color: #cfd2f3; background: #fafaff; }
.rba-stage.rba-missed { background: #fdfaf8; }
.rba-index { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 13px; background: var(--orange-soft); color: #b8480e; font-size: 15px; font-weight: 900; }
.rba-main { display: grid; gap: 6px; min-width: 0; }
.rba-title { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; }
.rba-title b { font-size: 14px; font-weight: 900; }
.rba-chip { padding: 2px 9px; border-radius: 999px; background: #f1eee8; color: #81786c; font-style: normal; font-size: 10.5px; font-weight: 900; white-space: nowrap; }
.rba-chip.open, .rba-chip.running { background: #e8f6ee; color: #1a7a48; }
.rba-chip.done { background: var(--teal-soft); color: #157e70; }
.rba-chip.upcoming { background: #f7efe3; color: #97764a; }
.rba-chip.late, .rba-chip.late-mark { background: #eef0ff; color: #4a4fb0; }
.rba-chip.missed { background: #fdeeee; color: #b42318; }
.rba-chip.late-mark { display: inline-flex; align-items: center; gap: 4px; }
.rba-chip.late-mark svg { width: 12px; height: 12px; }
.rba-meta { display: flex; flex-wrap: wrap; gap: 4px 14px; color: var(--muted); font-size: 11.5px; font-weight: 700; }
.rba-meta span { display: inline-flex; align-items: center; gap: 5px; }
.rba-meta svg { width: 13px; height: 13px; }
.rba-line { display: flex; align-items: flex-start; gap: 6px; color: #383d8f; font-size: 11.5px; font-weight: 800; line-height: 1.9; }
.rba-line svg { flex: none; width: 14px; height: 14px; margin-top: 4px; }
.rba-result { min-width: 62px; text-align: center; }
.rba-result b { display: block; color: #157e70; font-size: 18px; font-weight: 900; }
.rba-result small { color: var(--muted); font-size: 10.5px; font-weight: 800; }
.rba-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 8px; }
@media (max-width: 720px) {
  .rba-stage { grid-template-columns: 36px minmax(0, 1fr); gap: 10px 12px; }
  .rba-index { width: 36px; height: 36px; font-size: 14px; }
  .rba-result, .rba-actions { grid-column: 1 / -1; }
  .rba-result { text-align: start; }
  .rba-result b { display: inline; margin-inline-end: 6px; }
  .rba-actions { justify-content: flex-start; }
}

.rb-stage-win { grid-area: 4 / 1 / 5 / 3; display: flex; align-items: flex-start; gap: 5px; margin-top: 2px; color: #6b6357; font-size: 10px; font-weight: 750; line-height: 1.75; }
.rb-stage-win svg { flex: none; width: 11px; height: 11px; margin-top: 3px; color: #a89a86; }
.rba-result b.rba-sealed { color: #8b7f6e; }
.rba-result b.rba-sealed svg { width: 20px; height: 20px; }
/* گوشی: مهم‌ترین کارِ میز کارِ دبیر (برگزاری) اول و تمام‌عرض */
@media (max-width: 760px) {
  .rb-board-actions #rbOrgPublish { order: -1; flex: 1 1 100%; }
}

/* نتایجِ آزمونِ یک مرحله: پیوند به نتایجِ کلِ برنامهٔ راهبردی */
.pr-program-link {
  display: inline-flex; align-items: center; gap: 6px; margin-top: 6px; padding: 5px 12px; border: 1px solid #efd6bc; border-radius: 999px;
  background: #fff6ec; color: #b8480e; font: inherit; font-size: 11.5px; font-weight: 850; cursor: pointer;
}
.pr-program-link:hover { border-color: var(--orange); background: #ffefdd; }
.pr-program-link svg { width: 14px; height: 14px; }

/* زمان‌بندیِ خودکارِ مرحله‌ها */
.rb-org-schedule { display: grid; gap: 14px; }
.rb-sched-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.rb-sched-scope { margin-top: 2px; }
.rb-sched-preview { display: grid; gap: 6px; margin: 0; padding: 0; list-style: none; max-height: 260px; overflow: auto; scrollbar-width: thin; }
.rb-sched-preview li { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 10px; padding: 8px 12px; border: 1px solid #eee5da; border-radius: 10px; background: #fff; }
.rb-sched-preview b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12.5px; font-weight: 900; }
.rb-sched-preview small { color: var(--muted); font-size: 11px; font-weight: 700; }
.rb-menu-schedule { justify-content: center; }
@media (max-width: 640px) {
  .rb-sched-grid { grid-template-columns: minmax(0, 1fr); }
.rb-sched-preview li { grid-template-columns: minmax(0, 1fr); gap: 2px; }
}

/* فهرست انتخابِ مشترک؛ خودِ select مرجعِ مقدار، فرم و برچسب می‌ماند.
   popover در لایهٔ بالا قرار می‌گیرد تا اسکرولِ مودال و سایدبار آن را نبُرد. */
.mk-select-popover {
  position: fixed;
  inset: auto;
  z-index: 100060;
  display: flex;
  flex-direction: column;
  box-sizing: border-box;
  width: 200px;
  max-width: calc(100vw - 16px);
  max-height: min(300px, calc(100dvh - 16px));
  margin: 0;
  padding: 4px;
  overflow: hidden;
  border: 1px solid var(--line, #ebe8e0);
  border-radius: 12px;
  background: var(--panel, #fff);
  color: var(--ink, #25231f);
  box-shadow: 0 10px 28px rgba(49, 38, 24, .14), 0 2px 6px rgba(49, 38, 24, .05);
  font-family: "Vazirmatn", Tahoma, sans-serif;
  font-size: 13px;
  line-height: 1.6;
  text-align: start;
  overscroll-behavior: contain;
  isolation: isolate;
}
.mk-select-popover[popover]:not(:popover-open) { display: none; }
.mk-select-popover::backdrop { background: transparent; pointer-events: none; }
.mk-select-list {
  flex: 1 1 auto;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  scroll-padding-block: 4px;
  scrollbar-width: thin;
  scrollbar-color: #d9d1c5 transparent;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-y pinch-zoom;
}
.mk-select-list::-webkit-scrollbar { width: 4px; height: 4px; }
.mk-select-list::-webkit-scrollbar-thumb { border-radius: 9px; background: #d9d1c5; }
.mk-select-option {
  display: flex;
  align-items: center;
  gap: 6px;
  box-sizing: border-box;
  min-height: 32px;
  padding: 4px 9px;
  border-radius: 8px;
  color: #4a4239;
  background: transparent;
  cursor: pointer;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}
.mk-select-option > span:first-child { flex: 1; min-width: 0; overflow-wrap: anywhere; white-space: normal; }
.mk-select-option:not([aria-disabled="true"]):hover,
.mk-select-option.is-active:not([aria-disabled="true"]) { background: #f8f3ec; }
.mk-select-option[aria-selected="true"] { color: #9b430d; background: var(--orange-soft, #fff0e7); font-weight: 750; }
.mk-select-option[aria-selected="true"]:not([aria-disabled="true"]):hover,
.mk-select-option[aria-selected="true"].is-active { background: #ffe8d7; }
.mk-select-check { flex: none; width: 14px; color: #ba551a; font-size: 13px; font-weight: 800; text-align: center; opacity: 0; }
.mk-select-option[aria-selected="true"] > .mk-select-check { opacity: 1; }
.mk-select-option[aria-disabled="true"] { color: #a19a90; cursor: not-allowed; background: transparent; }
.mk-select-option[aria-disabled="true"] > .mk-select-check { color: inherit; }
.mk-select-group { padding: 6px 9px 2px; color: var(--muted, #827e75); font-size: 10.5px; font-weight: 850; }
.mk-select-group:not(:first-child) { margin-top: 4px; border-top: 1px solid var(--line, #ebe8e0); }
.mk-select-empty { padding: 12px 10px; color: var(--muted, #827e75); text-align: center; font-size: 12px; }
select[data-mk-select-open] { border-color: #e89c68; box-shadow: 0 0 0 3px rgba(255, 107, 24, .12); }
@media (pointer: coarse), (max-width: 640px) {
  .mk-select-popover { font-size: 14px; }
  .mk-select-option { min-height: 40px; }
}
@media (forced-colors: active) {
  .mk-select-option.is-active:not([aria-disabled="true"]) { outline: 1px solid Highlight; outline-offset: -2px; }
  .mk-select-option[aria-selected="true"] { border-color: Highlight; }
}
@media print {
  .mk-select-popover { display: none !important; }
  select[data-mk-select-open] { box-shadow: none; }
}

/* ── تنظیمات نمایش سؤال ─────────────────────────────────────────────────────
   ریلِ کنار سؤال با تعدادِ سلول‌های روشن کوتاه/بلند می‌شود؛ نوارِ آمار زیر
   گزینه‌ها فقط چیپ‌هایی را دارد که کاربر برای این لحظه (قبل/بعد از پاسخ) خواسته. */
.sq-rail-n1 .sq-rail-cell { min-height: 150px; }
.sq-metrics {
  display: flex; flex-wrap: wrap; align-items: center; gap: 7px;
  margin-top: 14px;
}
.sq-metric {
  position: relative;
  display: inline-flex; align-items: center; gap: 5px;
  padding: 5px 10px; border: 1px solid #ebe6dc; border-radius: 999px;
  background: #fbfaf7; color: #5f5a51;
  font-size: 11.5px; line-height: 1.3; cursor: help; outline: none;
  transition: border-color .14s ease, box-shadow .14s ease;
}
.sq-metric:hover, .sq-metric:focus-visible { border-color: #f0b487; box-shadow: 0 0 0 3px rgba(255,107,24,.08); }
.sq-metric svg { width: 14px; height: 14px; flex: none; }
/* راست به چپ: عنوان، بعد مقدار («وضعیت ترکیب: ترکیب درون‌فصلی»)، بعد توضیح کوتاه */
.sq-metric small { font-size: 10.5px; font-weight: 700; color: #968f84; }
.sq-metric small::after { content: ":"; }
.sq-metric b { font-weight: 900; color: inherit; }
.sq-metric em { font-style: normal; font-size: 10.5px; font-weight: 800; opacity: .82; }
.sq-metric em::before { content: "-"; margin-inline-end: 4px; }
.sq-metric.is-correct { background: #eef9f5; border-color: #cdebe2; color: #177a68; }
.sq-metric.is-wrong { background: #fff1ef; border-color: #f4d1cb; color: #bd4438; }
.sq-metric.is-blank { background: #f4f2ed; border-color: #e5e0d6; color: #7c7468; }
.sq-metric.is-combo { background: #f4f0ff; border-color: #dfd5fb; color: #6c4fc2; }
.sq-metric.is-correct small, .sq-metric.is-wrong small, .sq-metric.is-combo small { color: inherit; opacity: .78; }
.sq-metric[data-qm-tip]::after {
  content: attr(data-qm-tip);
  position: absolute; bottom: calc(100% + 9px); inset-inline-start: 0;
  width: max-content; max-width: min(320px, calc(100vw - 32px));
  padding: 8px 11px;
  border: 1px solid rgba(240, 180, 135, .74); border-radius: 11px;
  background: linear-gradient(180deg, rgba(255,255,255,.99), rgba(255,250,246,.99));
  box-shadow: 0 14px 28px rgba(65,47,29,.14);
  color: #4d3b2a; font-size: 10.5px; font-weight: 800; line-height: 1.8; white-space: normal; text-align: right;
  opacity: 0; transform: translateY(5px); pointer-events: none;
  transition: opacity .15s ease, transform .18s var(--ease-soft);
  z-index: 35;
}
.sq-metric[data-qm-tip]:hover::after,
.sq-metric[data-qm-tip]:focus-visible::after,
.sq-metric[data-qm-tip]:focus::after { opacity: 1; transform: translateY(0); }
.sqf-side .sq-metrics { margin-top: 10px; }

.qvs-trigger.on { background: #fbf0e3; color: #9a5a1f; border-color: #f0d3b4; }
/* تولتیپ‌های پنهانِ گزینه‌ها (opacity:0) هم جای اسکرول می‌گیرند؛ پاپ‌آپ فقط عمودی اسکرول می‌خورد. */
.qvs-modal { width: min(760px, 96vw); overflow-x: hidden; overflow-y: auto; }
.qvs-title { display: inline-flex; align-items: center; gap: 8px; }
.qvs-title svg { width: 20px; height: 20px; color: var(--orange); }
.qvs-intro { margin: 0 0 12px; color: #6f695f; font-size: 12.5px; line-height: 1.9; }
.qvs-legend { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.qvs-legend-item {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 10px; border-radius: 10px; background: #fbfaf7; border: 1px dashed #e5ded2;
  font-size: 11.5px; color: #5f5a51;
}
.qvs-legend-item svg { width: 15px; height: 15px; }
.qvs-legend-item small { color: var(--muted); font-size: 10.5px; }
.qvs-group { margin: 0 0 12px; padding: 4px 14px 8px; border: 1px solid #eee8de; border-radius: 14px; background: #fff; }
.qvs-group legend { padding: 0 6px; font-size: 13px; font-weight: 900; color: var(--ink); }
.qvs-group-hint {
  display: flex; align-items: center; gap: 6px; margin: 2px 0 2px;
  font-size: 11px; line-height: 1.7; color: var(--muted);
}
.qvs-group-hint svg { width: 13px; height: 13px; flex: none; color: #b9a58c; }
.qvs-row {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 9px 0;
}
.qvs-row + .qvs-row { border-top: 1px solid #f3efe8; }
.qvs-label { display: inline-flex; align-items: center; gap: 9px; min-width: 0; }
.qvs-label > svg { width: 18px; height: 18px; flex: none; color: #b07a4a; }
.qvs-label > span { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.qvs-label b { font-size: 12.5px; font-weight: 800; color: var(--ink); }
.qvs-label small { font-size: 10.5px; color: var(--muted); line-height: 1.6; }
.qvs-seg { display: inline-flex; flex: none; padding: 3px; gap: 3px; border-radius: 11px; background: #f5f2ec; }
.qvs-opt { position: relative; cursor: pointer; }
.qvs-opt input, .qvs-reveal-opt input { position: absolute; opacity: 0; pointer-events: none; }
.qvs-opt > span {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 6px 10px; border-radius: 9px;
  font-size: 11.5px; font-weight: 800; color: #8a8378; white-space: nowrap;
  transition: background .14s ease, color .14s ease, box-shadow .14s ease;
}
.qvs-opt > span svg { width: 14px; height: 14px; }
.qvs-opt:hover > span { color: var(--ink); }
.qvs-opt input:focus-visible + span { box-shadow: 0 0 0 2px rgba(255,107,24,.35); }
.qvs-opt-before input:checked + span { background: #fff; color: #177a68; box-shadow: 0 1px 3px rgba(40,30,20,.12); }
.qvs-opt-after input:checked + span { background: #fff; color: #c2641f; box-shadow: 0 1px 3px rgba(40,30,20,.12); }
.qvs-opt-hide input:checked + span { background: #fff; color: #8a4a4a; box-shadow: 0 1px 3px rgba(40,30,20,.12); }
.qvs-legend-item.qvs-opt-before svg { color: #177a68; }
.qvs-legend-item.qvs-opt-after svg { color: #c2641f; }
.qvs-legend-item.qvs-opt-hide svg { color: #8a4a4a; }
.qvs-opt[data-qvs-tip]::after {
  content: attr(data-qvs-tip);
  position: absolute; bottom: calc(100% + 8px); left: 50%;
  width: max-content; max-width: 240px;
  padding: 6px 10px; border-radius: 9px;
  background: #2f2a24; color: #fff; font-size: 10.5px; font-weight: 700; line-height: 1.7; text-align: center;
  opacity: 0; transform: translate(-50%, 4px); pointer-events: none;
  transition: opacity .14s ease, transform .16s var(--ease-soft);
  z-index: 40;
}
.qvs-opt[data-qvs-tip]:hover::after { opacity: 1; transform: translate(-50%, 0); }
/* گزینهٔ آخر (چپ‌ترین) نزدیکِ لبهٔ پاپ‌آپ است: تولتیپش از لبهٔ چپِ خودش به داخل باز شود. */
.qvs-opt-hide[data-qvs-tip]::after { left: 0; transform: translate(0, 4px); }
.qvs-opt-hide[data-qvs-tip]:hover::after { transform: translate(0, 0); }
.qvs-reveal-options { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; padding: 8px 0 6px; }
.qvs-reveal-opt { cursor: pointer; position: relative; }
.qvs-reveal-opt > span {
  display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 4px 8px;
  height: 100%; padding: 11px 12px; border: 1px solid #ebe5da; border-radius: 12px; background: #fdfcf9;
  transition: border-color .14s ease, background .14s ease, box-shadow .14s ease;
}
.qvs-reveal-opt > span svg { width: 18px; height: 18px; color: #b07a4a; }
.qvs-reveal-opt b { font-size: 13px; font-weight: 900; color: var(--ink); }
.qvs-reveal-opt small { grid-column: 1 / -1; font-size: 11px; line-height: 1.8; color: var(--muted); }
.qvs-reveal-opt:hover > span { border-color: #f0c9a6; }
.qvs-reveal-opt input:checked + span { border-color: var(--orange); background: var(--orange-soft); box-shadow: 0 0 0 3px rgba(255,107,24,.08); }
.qvs-reveal-opt input:checked + span svg { color: var(--orange); }
.qvs-reveal-opt input:focus-visible + span { box-shadow: 0 0 0 3px rgba(255,107,24,.3); }
.qvs-preview { margin-top: 4px; padding: 12px 14px; border-radius: 14px; background: #fbfaf7; border: 1px solid #efe9df; }
.qvs-preview h3 { margin: 0 0 10px; font-size: 12.5px; font-weight: 900; }
.qvs-preview-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.qvs-preview-col h4 { margin: 0 0 6px; font-size: 11px; font-weight: 900; color: #8a7a66; }
.qvs-preview-col > div { display: flex; flex-wrap: wrap; gap: 5px; }
.qvs-preview-chip {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 8px; border-radius: 999px; background: #fff; border: 1px solid #ebe5da;
  font-size: 10.5px; font-weight: 700; color: #5f5a51;
}
.qvs-preview-chip svg { width: 12px; height: 12px; }
.qvs-preview-empty { font-size: 10.5px; color: var(--muted); }
.qvs-preview-reveal {
  grid-column: 1 / -1; margin: 4px 0 0; display: inline-flex; align-items: center; gap: 6px;
  font-size: 11.5px; color: #5f5a51;
}
.qvs-preview-reveal svg { width: 15px; height: 15px; color: var(--orange); }
.qvs-footer { flex-wrap: wrap; }
.qvs-footer .qvs-reset { margin-inline-end: auto; }
.qvs-footer .qvs-reset:disabled { opacity: .45; cursor: default; }
.qvs-dirty { font-size: 11px; font-weight: 800; color: #c2641f; }

@media (max-width: 760px) {
  .sq-rail-n1 .sq-rail-cell { min-height: 96px; }
  .qvs-row { flex-direction: column; align-items: stretch; gap: 8px; }
  .qvs-seg { width: 100%; }
  .qvs-opt { flex: 1; }
  .qvs-opt > span { justify-content: center; padding: 7px 4px; }
  .qvs-reveal-options { grid-template-columns: 1fr; }
  .qvs-preview-grid { grid-template-columns: 1fr; }
  .qvs-opt[data-qvs-tip]::after { display: none; }
}

/* ---------- اشتراکِ صاحبِ تیکت در سرِ تیکتِ کارشناس (چیپ + کارتِ هاور) ---------- */
.sup-sub { position: relative; display: inline-flex; outline: none; }
.sup-sub-chip { cursor: help; }
.sup-sub-chip em { font-style: normal; font-size: 9.5px; font-weight: 800; color: var(--muted); }
.sup-sub-chip small { padding-inline-start: 6px; border-inline-start: 1px solid currentColor; }
.sup-sub.is-active .sup-sub-chip { background: #effaf5; border-color: #bfe6d3; color: #17724d; }
.sup-sub.is-active .sup-sub-chip small { color: #17724d; border-color: #bfe6d3; }
.sup-sub.is-ended .sup-sub-chip { background: #fff7ea; border-color: #f0d6a8; color: #9a6410; }
.sup-sub.is-none .sup-sub-chip { background: var(--panel-soft); border-color: var(--line); color: var(--muted); }
.sup-sub:focus-visible .sup-sub-chip { box-shadow: 0 0 0 2px rgba(255, 107, 24, .35); }
.sup-sub-pop {
  position: absolute; top: calc(100% + 8px); inset-inline-start: 0; z-index: 30;
  width: min(340px, calc(100vw - 48px)); max-height: min(420px, 60vh); overflow: auto;
  display: grid; gap: 8px; padding: 10px;
  background: var(--panel); border: 1px solid var(--line); border-radius: 14px;
  box-shadow: 0 14px 34px rgba(41, 36, 29, .16);
  opacity: 0; visibility: hidden; transform: translateY(-4px);
  transition: opacity .14s ease, transform .14s ease, visibility 0s linear .14s;
}
/* پلِ نامرئی تا موس در فاصلهٔ چیپ و کارت، کارت را نبندد */
.sup-sub-pop::before { content: ""; position: absolute; inset-inline: 0; top: -9px; height: 9px; }
.sup-sub:hover .sup-sub-pop, .sup-sub:focus-within .sup-sub-pop {
  opacity: 1; visibility: visible; transform: none; transition-delay: 0s;
}
.sup-sub-pop-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; font-size: 11.5px; font-weight: 800; color: var(--ink); padding: 0 2px; }
.sup-sub-pop-head small { font-size: 10px; font-weight: 600; color: var(--muted); }
.sup-sub-card { display: grid; gap: 5px; border: 1px solid var(--line); border-radius: 11px; padding: 9px 10px; background: var(--panel-soft); }
.sup-sub-card.is-active { background: #f6fcf9; border-color: #cfeadc; }
.sup-sub-card header { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 2px; }
.sup-sub-card header strong { font-size: 11.5px; line-height: 1.6; color: var(--ink); }
.sup-sub-card header .badge { flex: none; }
.sup-sub-row { display: flex; justify-content: space-between; gap: 10px; font-size: 10.5px; line-height: 1.7; }
.sup-sub-row span { color: var(--muted); flex: none; }
.sup-sub-row b { font-weight: 700; color: var(--ink); text-align: end; }
.sup-sub-bar { height: 5px; border-radius: 99px; background: #e4efe9; overflow: hidden; margin-top: 3px; }
.sup-sub-bar i { display: block; height: 100%; border-radius: inherit; background: #23a26d; }
.sup-sub-left { display: inline-flex; align-items: center; gap: 5px; font-size: 11px; font-weight: 800; color: #17724d; }
.sup-sub-left.off { color: var(--muted); font-weight: 700; }
.sup-sub-left svg { width: 13px; height: 13px; }
.sup-sub-note { margin: 0; font-size: 10px; line-height: 1.7; color: var(--muted); }
.sup-sub-empty, .sup-sub-more { margin: 0; font-size: 10.5px; color: var(--muted); text-align: center; padding: 6px 0; }

/* «افزودن فیش» در تاریخچهٔ پرداخت‌ها، جای خط تیرهٔ فیشِ خالی */
.receipt-add {
  display: inline-flex; align-items: center; gap: 5px;
  border: 1px dashed #e2b48a; background: #fff8f1; color: #b85a12;
  border-radius: 8px; padding: 4px 9px; font: inherit; font-size: 11px; font-weight: 700;
  cursor: pointer; white-space: nowrap;
}
.receipt-add:hover { background: #ffeedd; border-style: solid; }
.receipt-add svg { width: 13px; height: 13px; }
/* روی صفحهٔ باریک چیپ ممکن است سمتِ چپِ ردیف بیفتد؛ کارت به لبهٔ ردیف لنگر می‌شود نه چیپ */
@media (max-width: 640px) {
  .sup-thread-meta:has(.sup-sub) { position: relative; }
  .sup-thread-meta .sup-sub { position: static; }
  .sup-thread-meta .sup-sub-pop { inset-inline: 0; width: auto; }
}

/* ═════════════ آزمون‌های آماده (rx-) — پنل مدیر اصلی + شخصی‌سازیِ کاربر ═════════════ */
.rx-admin-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; flex-wrap: wrap; }
.rx-admin-head > div { flex: 1 1 360px; min-width: 0; }
.rx-list { display: grid; gap: 12px; margin-top: 14px; }
.rx-card { border: 1px solid #e7dfd0; border-radius: 14px; background: linear-gradient(135deg, #fffdf9, #fbf7ef); padding: 13px 14px; display: grid; gap: 10px; min-width: 0; }
.rx-card.is-off { opacity: .72; background: #f7f5f2; }
.rx-card-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.rx-card-title { display: flex; align-items: center; gap: 8px; min-width: 0; flex-wrap: wrap; }
.rx-card-title b { font-size: 14px; color: #3d3428; }
.rx-state { font-size: 10.5px; font-weight: 800; border-radius: 99px; padding: 2px 9px; }
.rx-state.on { background: #e5f5ec; color: #17724d; }
.rx-state.off { background: #eeeae4; color: #8a7d6b; }
.rx-code { font-size: 11px; letter-spacing: .08em; background: #f4efe7; color: #7c6f5d; border-radius: 7px; padding: 2px 7px; }
.rx-card-actions { display: flex; gap: 6px; }
.rx-card-desc, .rx-desc { margin: 0; font-size: 12px; line-height: 1.9; color: #6f6353; }
.rx-units { display: flex; flex-wrap: wrap; gap: 7px; }
.rx-unit { display: inline-flex; align-items: center; gap: 8px; flex-wrap: wrap; background: #fff; border: 1px solid #ece4d6; border-radius: 10px; padding: 6px 10px; min-width: 0; max-width: 100%; }
.rx-unit b { font-size: 12px; color: #3d3428; }
.rx-unit .eb-path { font-size: 9.8px; color: #b3a790; }
.rx-unit em { font-style: normal; font-size: 10.5px; color: #8a7048; font-weight: 700; }
.rx-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.rx-total { font-size: 11.5px; font-weight: 800; color: var(--orange, #e8722a); margin-inline-end: 4px; }
.rx-lesson-chip { display: inline-flex; align-items: center; gap: 5px; font-size: 10.5px; background: #f4efe7; border-radius: 8px; padding: 3px 8px; color: #6f6353; }
.rx-lesson-chip i { font-style: normal; }
.rx-lesson-chip b { color: #8a7048; }
.rx-link { display: flex; gap: 8px; align-items: center; }
.rx-link input { flex: 1 1 auto; min-width: 0; font: inherit; font-size: 12px; border: 1px solid #e7dfd0; border-radius: 9px; padding: 8px 10px; background: #fff; color: #3d3428; }
.rx-link .secondary-button { flex: 0 0 auto; }
.rx-warn { margin: 0; display: flex; align-items: center; gap: 6px; font-size: 11.5px; color: #a3541a; background: #fff4e8; border-radius: 9px; padding: 7px 10px; }
.rx-warn .ui-icon { width: 14px; height: 14px; flex: 0 0 auto; }
.rx-empty-note { margin: 0; font-size: 11.5px; color: #9a8c78; padding: 8px 2px; }
.rx-cap-note { color: #b23; font-weight: 700; }

/* ویرایشگرِ مدیر */
.rx-editor { display: grid; gap: 12px; }
.rx-editor textarea { resize: vertical; }
.rx-sec { display: grid; gap: 6px; min-width: 0; }
.rx-sec > .eb-budget-title { margin-bottom: 2px; }
.rx-picked { display: grid; gap: 6px; }
.rx-picked-row { display: grid; grid-template-columns: 28px minmax(0, 1fr) auto auto; align-items: center; gap: 10px; background: #fff; border: 1px solid #ece4d6; border-radius: 11px; padding: 8px 9px; min-width: 0; }
.rx-picked-move { display: inline-flex; gap: 4px; }
.rx-picked-move button { border: 0; background: #f4f1ec; cursor: pointer; width: 26px; height: 26px; border-radius: 7px; display: inline-grid; place-items: center; color: #9a8c78; }
.rx-picked-move button:hover:not(:disabled) { background: #ecd9cc; color: #8a4a17; }
.rx-picked-move button:disabled { opacity: .35; cursor: default; }
.rx-picked-move .ui-icon { width: 12px; height: 12px; }
.rx-search { margin: 0; }
.rx-results { display: grid; gap: 5px; max-height: 320px; overflow: auto; padding: 2px; }
.rx-result, .rx-src { display: grid; grid-template-columns: 20px minmax(0, 1fr) auto; align-items: center; gap: 10px; border: 1px solid #ece4d6; border-radius: 10px; padding: 8px 10px; background: #fff; cursor: pointer; min-width: 0; }
.rx-result:hover, .rx-src:hover { border-color: #e2c9ad; }
.rx-result.on, .rx-src.on { border-color: #f0b183; background: #fff8f1; }
.rx-result .eb-pick-title, .rx-src .eb-pick-title { flex-wrap: wrap; row-gap: 2px; justify-content: flex-start; text-align: start; }
.rx-result-lessons { flex-basis: 100%; font-size: 10px; color: #9a8c78; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* شخصی‌سازیِ کاربر */
.rx-custom { display: grid; gap: 12px; }
.rx-src-list { display: grid; gap: 6px; }
.rx-src:not(.on) .eb-pick-name { color: #a99c88; text-decoration: line-through; }
.rx-lessons { display: grid; gap: 7px; }
.rx-lesson { border: 1px solid #ece4d6; border-radius: 12px; background: #fff; overflow: hidden; }
.rx-lesson.rx-off { background: #f8f6f3; }
.rx-row { display: grid; grid-template-columns: 22px minmax(0, 1fr) auto auto; align-items: center; gap: 9px; padding: 8px 10px; min-width: 0; }
.rx-lesson-row { grid-template-columns: 22px minmax(0, 1fr) auto; }
.rx-check { display: inline-grid; place-items: center; }
.rx-check input, .rx-section input, .rx-result input, .rx-src input { width: 16px; height: 16px; accent-color: var(--orange, #e8722a); cursor: pointer; }
.rx-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; color: #4a3f31; }
.rx-lesson-name { display: inline-flex; align-items: center; gap: 8px; border: 0; background: none; font: inherit; cursor: pointer; padding: 2px 0; text-align: start; }
.rx-lesson-name b { font-size: 13px; color: #3d3428; }
.rx-lesson-name small { font-size: 10.5px; color: #b3a790; }
.rx-lesson-name .ui-icon, .rx-more .ui-icon { width: 13px; height: 13px; color: #b3a790; transition: transform .18s; }
.rx-lesson-name.open .ui-icon, .rx-more.open .ui-icon { transform: rotate(180deg); }
.rx-off .rx-lesson-name b { color: #a99c88; text-decoration: line-through; }
.rx-count { font-size: 10.5px; font-weight: 700; color: #8a7048; white-space: nowrap; }
.rx-off .rx-count { color: #b3a790; }
.rx-chapters { border-top: 1px dashed #ece4d6; padding: 4px 10px 8px; display: grid; gap: 2px; background: #fdfbf7; }
.rx-ch { border-inline-start: 2px solid #f0e3d2; margin-inline-start: 10px; }
.rx-ch.is-off .rx-name { color: #a99c88; text-decoration: line-through; }
.rx-ch .rx-row { padding-block: 6px; }
.rx-more { display: inline-flex; align-items: center; gap: 4px; border: 1px solid #ece4d6; background: #fff; border-radius: 8px; padding: 3px 8px; font: inherit; font-size: 10.5px; color: #7c6f5d; cursor: pointer; white-space: nowrap; }
.rx-more:hover { border-color: #e2c9ad; }
.rx-sections { display: grid; gap: 3px; padding: 2px 34px 8px 10px; }
.rx-section { display: grid; grid-template-columns: 18px minmax(0, 1fr) auto; align-items: center; gap: 8px; font-size: 11.5px; color: #5a4e3f; padding: 4px 8px; border-radius: 8px; background: #fff; border: 1px solid #f1ebe1; cursor: pointer; }
.rx-section span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rx-section small { font-size: 10px; color: #9a8c78; }
.rx-section.is-off span { color: #a99c88; text-decoration: line-through; }
.rx-section input:disabled { cursor: not-allowed; }

/* ردیفِ «آزمون‌های آماده» بالای بانک آزمون */
.rx-strip { border: 1px solid #f0d6bd; border-radius: 14px; background: linear-gradient(135deg, #fff8f0, #fffdf9); padding: 12px 13px; margin-bottom: 14px; display: grid; gap: 9px; }
.rx-strip-head { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.rx-strip-head b { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: #3d3428; }
.rx-strip-head b .ui-icon { width: 15px; height: 15px; color: var(--orange, #e8722a); }
.rx-strip-head small { font-size: 11px; color: #9a8c78; }
.rx-strip-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 8px; }
.rx-tile { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "main count" "main go"; align-items: center; gap: 4px 10px; text-align: start; border: 1px solid #ecd9c4; background: #fff; border-radius: 12px; padding: 10px 12px; font: inherit; cursor: pointer; min-width: 0; transition: border-color .15s, box-shadow .15s; }
.rx-tile:hover { border-color: #f0a46a; box-shadow: 0 4px 14px rgba(232, 114, 42, .12); }
.rx-tile-main { grid-area: main; display: grid; gap: 3px; min-width: 0; }
.rx-tile-main b { font-size: 12.5px; color: #3d3428; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rx-tile-main small { font-size: 10.5px; color: #9a8c78; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rx-tile em { grid-area: count; font-style: normal; font-size: 10.5px; font-weight: 700; color: #8a7048; white-space: nowrap; }
.rx-tile-go { grid-area: go; display: inline-flex; align-items: center; gap: 3px; font-size: 10.5px; font-weight: 800; color: var(--orange, #e8722a); white-space: nowrap; }
.rx-tile-go .ui-icon { width: 12px; height: 12px; }

@media (max-width: 560px) {
  .rx-link { flex-direction: column; align-items: stretch; }
  .rx-picked-row { grid-template-columns: 26px minmax(0, 1fr) auto; }
  .rx-picked-row .eb-pick-count { display: none; }
  .rx-row { grid-template-columns: 22px minmax(0, 1fr) auto; }
  .rx-ch .rx-row { grid-template-columns: 22px minmax(0, 1fr) auto; row-gap: 4px; }
  .rx-ch .rx-more { grid-column: 2 / -1; justify-self: start; }
  .rx-sections { padding-inline: 10px 4px; }
}

/* مدت‌های قابل خرید از سه ماه شروع می‌شوند؛ گزینهٔ کنکور ردیف جدا دارد. */
.shop-plan-grid,
.shop-card .shop-plan-grid,
.shop-buybox .shop-plan-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

/* گردش مالی: وضعیت، مبلغ و اقدام در RTL جای مستقل دارند. */
.pm-wallet-body { padding: 16px 18px 20px; }
.pm-help, .pm-section-hint { color: var(--muted); font-size: 12px; line-height: 1.9; margin: 8px 0 0; }
.pm-section-hint { margin: 0 18px 14px; }
.pm-request-btn { width: 100%; justify-content: center; min-height: 44px; margin-top: 18px; }
.pm-status { display: inline-flex; align-items: center; justify-content: center; gap: 6px; width: fit-content; max-width: 100%; padding: 7px 10px; border-radius: 10px; font-size: 11px; font-weight: 850; line-height: 1.6; }
.pm-status svg { width: 15px; height: 15px; flex: none; }
.pm-status.pending { background: var(--yellow-soft); color: #785600; border: 1px solid #e7d69e; }
.pm-status.paid { background: var(--teal-soft); color: #0f7365; }
.pm-status.cancelled, .pm-status.unknown { background: var(--panel-soft); color: var(--muted); }
.pm-status.rejected { background: var(--red-soft); color: #b94e45; }
.pm-pending-note { display: grid; grid-template-columns: auto 1fr; gap: 8px 12px; align-items: center; margin-top: 16px; padding: 12px; border: 1px solid #e7d69e; border-radius: 12px; background: color-mix(in srgb, var(--yellow-soft) 45%, var(--panel)); }
.pm-pending-note small { grid-column: 1 / -1; color: var(--muted); font-size: 11px; line-height: 1.8; }
.pm-pending-note strong { text-align: end; }
.pm-pending-total { color: #785600; font-size: 14px; }
.pm-request-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; padding: 0 18px 18px; }
.pm-request-card { display: grid; gap: 16px; min-width: 0; padding: 16px; border: 1px solid #e7d69e; border-radius: 14px; background: var(--panel); }
.pm-request-person { display: flex; gap: 10px; align-items: center; min-width: 0; }
.pm-request-person > div { display: grid; gap: 4px; flex: 1; min-width: 0; }
.pm-request-person b { overflow-wrap: anywhere; font-size: 13px; }
.pm-request-person small { color: var(--muted); font-size: 10px; }
.pm-request-person > .pm-status { flex: none; }
.pm-request-amount { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.pm-request-amount strong { font-size: 19px; }
.pm-request-amount span { color: var(--muted); font-size: 11px; }
.pm-request-bank { display: grid; gap: 9px; }
.pm-request-bank label { display: flex; gap: 12px; justify-content: space-between; align-items: baseline; font-size: 11px; color: var(--muted); }
.pm-request-bank span { color: var(--ink); unicode-bidi: isolate; font-family: inherit; font-size: 12px; overflow-wrap: anywhere; text-align: left; min-width: 0; }
.pm-request-actions { display: flex; justify-content: flex-end; padding-top: 10px; border-top: 1px solid var(--line); }
.pm-pay-btn { min-height: 40px; font-size: 12px; padding: 8px 12px; }
.pm-wallet-available { display: grid; gap: 6px; }
.pm-wallet-pending { display: inline-flex; justify-content: center; align-items: center; gap: 4px; color: #785600; line-height: 1.7; font-size: 10px; }
.pm-wallet-pending svg { width: 12px; height: 12px; flex: none; }
/* پیش‌پرداخت: مانده‌ای که با درآمد پوشش داده نشده منفی و قرمز است */
.pm-wallet-debt { color: var(--red); }
.pm-wallet-debt-note { color: var(--red); font-size: 10px; line-height: 1.7; }
.pm-row-actions { display: inline-flex; flex-wrap: wrap; gap: 4px; justify-content: center; }
.pm-status.pm-advance { background: var(--purple-soft); color: var(--purple); }
.pm-advance-label { display: block; font-size: 11.5px; }
.pm-advance-note { display: block; color: var(--muted); font-size: 10.5px; line-height: 1.7; overflow-wrap: anywhere; }
.pm-advance-words { display: block; margin-top: 4px; color: var(--muted); font-size: 11px; min-height: 1em; }
.pm-advance-preview { margin-top: 12px; display: grid; gap: 4px; }
.pm-advance-preview:empty { display: none; }
.pm-advance-bank { margin-top: 12px; }
.pm-advance-line { display: flex; gap: 12px; align-items: center; font-size: 11px; color: var(--muted); }
.pm-advance-bank .pm-request-bank span { flex: 1; }
.pm-advance-copy { margin-inline-start: auto; padding: 2px 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--panel); color: var(--ink); font: inherit; font-size: 11px; cursor: pointer; }
.pm-advance-nobank { display: flex; align-items: center; gap: 6px; margin: 0; padding: 10px 12px; border-radius: 10px; background: var(--red-soft); color: var(--red); font-size: 12px; line-height: 1.8; }
.pm-advance-nobank svg { width: 14px; height: 14px; flex: none; }
.pm-advance-cancel { display: block; margin: 6px auto 0; padding: 2px 10px; border: 0; background: none; color: var(--red); font: inherit; font-size: 11px; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.pm-page-footer { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 18px; border-top: 1px solid var(--line); color: var(--muted); font-size: 11.5px; }
.pm-page-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.pm-page-actions button { min-height: 38px; }
.pm-load-error { flex-basis: 100%; margin: 0; color: #b94e45; line-height: 1.8; }
.pm-receipt-view { display: inline-flex; align-items: center; gap: 7px; background: transparent; border: 0; cursor: pointer; color: var(--teal); font: inherit; font-weight: 800; padding: 6px; }
.pm-receipt-view svg { width: 20px; height: 20px; }
.pm-muted { color: var(--muted); font-size: 10px; }
.pm-receipt-summary { display: flex; gap: 14px; flex-wrap: wrap; align-items: center; }
.pm-receipt-summary > strong { margin-inline-start: auto; font-size: 18px; }
.pm-receipt-picker { display: flex; align-items: center; gap: 14px; margin: 18px 0; padding: 14px; border: 1px dashed var(--line); border-radius: 14px; }
.pm-receipt-picker > div:last-child { display: grid; gap: 8px; min-width: 0; }
.pm-receipt-picker small, #rcStatus { color: var(--muted); font-size: 11px; line-height: 1.8; margin: 0; }
.pm-receipt-preview { display: grid; align-items: center; justify-items: center; width: 88px; height: 88px; border-radius: 10px; background: var(--panel-soft); overflow: hidden; flex: none; }
.pm-receipt-preview > svg { width: 24px; height: 24px; }
.pm-receipt-preview img { width: 100%; height: 100%; object-fit: contain; }
.pm-paid-confirm { display: flex; align-items: flex-start; gap: 9px; padding: 13px; background: var(--teal-soft); color: #0f7365; font-size: 12px; line-height: 1.9; border-radius: 12px; }
.pm-paid-confirm input { flex: none; margin-top: 5px; }
.pm-receipt-pdf { width: 100%; min-height: 65vh; }
.lrate-override-link { display: flex; gap: 4px; align-items: center; background: transparent; border: 0; color: #a85b1b; padding: 4px 0; font: inherit; font-size: 10.5px; text-align: start; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.lrate-override-link svg { width: 13px; height: 13px; flex: none; }
.lrate-conflict { margin-top: 8px; color: #a85b1b; font-size: 11px; line-height: 1.9; }
.lrate-conflict summary { cursor: pointer; font-weight: 800; }
.lrate-conflict summary svg { width: 13px; height: 13px; vertical-align: middle; margin-inline-end: 3px; }
.lrate-conflict > div { display: grid; gap: 2px; margin-top: 8px; padding: 8px; border: 1px solid var(--line); border-radius: 9px; }
.lrate-conflict small { color: var(--muted); }
.lrate-folder-list { display: grid; gap: 14px; margin-top: 15px; }
.lrate-folder-card { padding: 16px; border: 1px solid var(--line); border-radius: 13px; }
.lrate-folder-card h3 { margin: 10px 0; font-size: 14px; }
.lrate-folder-card > p { font-size: 12px; color: var(--muted); line-height: 1.8; }
.lrate-folder-path { display: flex; flex-wrap: wrap; align-items: center; gap: 5px; color: var(--muted); font-size: 10.5px; line-height: 1.8; }
.lrate-folder-path i { display: flex; }
.lrate-folder-path svg { width: 12px; height: 12px; }
.lrate-folder-rates { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.lrate-folder-rates > div { display: grid; gap: 5px; padding: 10px; background: var(--panel-soft); border-radius: 10px; font-size: 12px; }
.lrate-folder-rates small { font-size: 10px; color: var(--muted); }
.lrate-folder-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; margin-top: 14px; }
.q-compensation-card .info-row { flex-wrap: wrap; gap: 8px; }
.q-compensation-card .info-row small { flex-basis: 100%; color: var(--muted); font-size: 10.5px; }
.q-compensation-hold { display: flex; gap: 4px; align-items: flex-start; margin-top: 6px; color: #a85b1b; font-size: 10px; line-height: 1.7; }
.q-compensation-hold svg { width: 12px; height: 12px; flex: none; margin-top: 2px; }
.q-compensation-warning { display: flex; gap: 7px; margin: 0 0 12px; padding: 10px; background: var(--yellow-soft); color: #785600; border-radius: 9px; font-size: 11px; line-height: 1.9; }
.q-compensation-warning svg { width: 15px; height: 15px; flex: none; margin-top: 2px; }
.pm-finance-warning { padding: 16px 18px; border-color: #e7d69e; }
.pm-finance-warning h2 { display: flex; align-items: center; gap: 8px; font-size: 14px; margin: 0 0 10px; }
.pm-finance-warning h2 svg { width: 17px; height: 17px; }
.pm-finance-warning p, .pm-finance-warning li { font-size: 12px; line-height: 1.9; }
@media (max-width: 1000px) {
  .pm-request-list { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 680px) {
  .pm-request-list { padding: 0 12px 12px; }
  .pm-request-card { padding: 13px; gap: 13px; }
  .pm-request-person { flex-wrap: wrap; }
  .pm-request-person > .pm-status { margin-inline-start: 34px; }
  .pm-request-bank label { flex-direction: column; gap: 4px; }
  .pm-request-bank span { align-self: flex-end; font-size: 11px; max-width: 100%; }
  .pm-request-actions button { width: 100%; justify-content: center; }
  .pm-page-footer { padding: 12px; }
  .pm-table thead { display: none; }
  .pm-table, .pm-table tbody { display: block; }
  .pm-table tbody tr { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; padding: 14px 12px; border-bottom: 1px solid var(--line); }
  .pm-table td { display: block; width: auto !important; min-width: 0; padding: 0 !important; border: 0; text-align: start !important; }
  .pm-table td::before { content: attr(data-pm-label); display: block; color: var(--muted); font-size: 10px; margin-bottom: 5px; }
  .pm-table td:first-child { grid-column: 1 / -1; }
  .pm-table td[colspan] { grid-column: 1 / -1; }
  .pm-table td .question-cell { justify-content: flex-start; }
  .pm-table .pm-wallet-pending { justify-content: flex-start; }
  .lrate-table td:last-child { grid-column: 1 / -1; }
  .lrate-field { max-width: none; }
  .lrate-folder-rates { grid-template-columns: minmax(0, 1fr); }
  .lrate-folder-actions button { flex: 1 1 auto; }
  .pm-receipt-picker { padding: 10px; gap: 10px; }
  .pm-receipt-preview { width: 65px; height: 65px; }
}

/* پرداخت‌ها: حالت خالی تمام عرض است و تاریخ از نشان وضعیت جدا می‌ماند. */
.pm-pending-panel > .panel-header,
.lrate-panel > .panel-header {
  flex-direction: row;
  flex-wrap: wrap;
  align-items: center;
  padding: 16px 20px;
  gap: 12px 18px;
}
.pm-pending-panel .panel-title,
.lrate-panel .panel-title { min-width: 0; }
.pm-pending-panel .panel-title h2,
.lrate-panel .panel-title h2 { line-height: 1.8; }
.pm-pending-summary { display: grid; gap: 3px; flex: none; margin-inline-start: auto; text-align: end; }
.pm-pending-summary > span { color: var(--muted); font-size: 10.5px; }
.pm-pending-panel .pm-pending-total { font-size: 15px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.pm-pending-panel > .pm-section-hint { margin: 14px 20px 16px; }
.pm-pending-panel .pm-pending-empty {
  grid-column: 1 / -1;
  display: grid;
  justify-items: center;
  gap: 7px;
  padding: 28px 20px 24px;
  text-align: center;
}
.pm-pending-panel .pm-pending-empty .empty-icon {
  width: 46px;
  height: 46px;
  margin: 0 0 5px;
  border-radius: 15px;
  background: var(--teal-soft);
  color: var(--teal);
}
.pm-pending-panel .pm-pending-empty .empty-icon > .ui-icon { width: 24px; height: 24px; }
.pm-pending-panel .pm-pending-empty h3 { margin: 0; font-size: 15px; line-height: 1.8; }
.pm-pending-panel .pm-pending-empty p { max-width: 460px; margin: 0; font-size: 12px; line-height: 1.9; }

.lrate-panel > .panel-header > .toolbar { flex: none; margin-inline-start: auto; }
.lrate-panel .lrate-save { min-height: 40px; padding: 9px 15px; }
.lrate-panel .lrate-hint { margin: 16px 20px 20px; padding: 12px 14px; gap: 10px; }
.lrate-panel .lrate-hint > .ui-icon { width: 17px; height: 17px; margin-top: 3px; color: var(--orange); }
.lrate-panel .lrate-hint-copy { min-width: 0; }
.lrate-panel .lrate-hint-copy > strong { display: block; color: var(--ink); font-size: 12px; font-weight: 800; }
.lrate-panel .lrate-hint-copy > p { margin: 3px 0 0; font-size: 11.5px; line-height: 1.9; }
.lrate-panel .lrate-table th,
.lrate-panel .lrate-table td { padding: 12px 14px; text-align: center; }
.lrate-panel .lrate-table th:first-child,
.lrate-panel .lrate-table td:first-child { padding-inline-start: 20px; text-align: start; }
.lrate-panel .lrate-table th:last-child,
.lrate-panel .lrate-table td:last-child { padding-inline-end: 20px; }
.lrate-panel .lrate-field { min-height: 40px; margin-inline: auto; padding: 5px 10px; }
.lrate-panel .lrate-scope { justify-items: center; gap: 4px; }
.lrate-panel .lrate-override-link { justify-content: center; }
.lrate-panel .lrate-table tbody tr:hover { transform: none; }

.pm-paid th:nth-child(2), .pm-paid td:nth-child(2) { width: 17%; }
.pm-paid th:nth-child(3), .pm-paid td:nth-child(3) { width: 10%; }
.pm-paid th:nth-child(4), .pm-paid td:nth-child(4) { width: 23%; }
.pm-paid th:nth-child(5), .pm-paid td:nth-child(5),
.pm-paid th:nth-child(6), .pm-paid td:nth-child(6) { width: 14%; }
.pm-paid .question-cell { min-width: 0; max-width: 100%; }
.pm-paid .question-cell strong { min-width: 0; }
.pm-paid .pm-receipt-view { max-width: 100%; gap: 6px; padding: 4px; font-size: 10.5px; white-space: nowrap; }
.pm-paid .pm-receipt-view .receipt-thumb { flex: none; width: 28px; height: 28px; object-fit: cover; }
.pm-paid-state { display: grid; justify-items: center; gap: 7px; min-width: 0; padding-block: 3px; }
.pm-paid-state > .pm-status { padding: 4px 8px; border-radius: 8px; font-size: 10px; white-space: nowrap; }
.pm-paid-state > .pm-status svg { width: 13px; height: 13px; }
.pm-date-stack { display: inline-flex; align-items: baseline; justify-content: center; direction: ltr; unicode-bidi: isolate; gap: 6px; white-space: nowrap; min-width: 0; font-variant-numeric: tabular-nums; line-height: 1.6; }
.pm-date-day,
.pm-date-time { display: block; direction: ltr; unicode-bidi: isolate; white-space: nowrap; }
.pm-date-day { color: var(--ink); font-size: 11px; font-weight: 650; }
.pm-date-time { color: var(--muted); font-size: 10px; }
.referral-date-time { display: inline-flex; align-items: baseline; gap: 6px; direction: ltr; unicode-bidi: isolate; white-space: nowrap; }
.referral-date-time > small { margin: 0; color: var(--muted); font-size: 9.5px; font-weight: 650; }
.pm-date-text { color: var(--muted); font-size: 10.5px; overflow-wrap: anywhere; }

@media (min-width: 681px) and (max-width: 1000px) {
  .pm-paid .pm-receipt-view { flex-direction: column; gap: 4px; }
}

@media (max-width: 680px) {
  .pm-pending-panel > .panel-header,
  .lrate-panel > .panel-header { padding: 14px 12px; gap: 10px; }
  .pm-pending-panel > .pm-section-hint { margin: 12px 12px 14px; }
  .pm-pending-panel .pm-pending-empty { padding: 25px 10px 20px; }
  .pm-pending-panel .pm-pending-empty h3 { font-size: 14px; }
  .pm-pending-summary > span { font-size: 10px; }
  .pm-pending-panel .pm-pending-total { font-size: 13px; }
  .lrate-panel .lrate-save { font-size: 12px; padding: 8px 12px; }
  .lrate-panel .lrate-hint { margin: 12px; padding: 11px 12px; }
  .lrate-panel .pm-table,
  .pm-paid,
  .pm-mysettle,
  .pm-ledger,
  .pm-adj { min-width: 0; }
  .lrate-panel .lrate-field { margin-inline: 0; }
  .lrate-panel .lrate-scope { justify-items: start; }
  .lrate-panel .lrate-override-link { justify-content: flex-start; }
  .pm-paid-state,
  .pm-mysettle .pm-date-stack,
  .pm-ledger .pm-date-stack,
  .pm-adj .pm-date-stack { justify-items: start; }
  .pm-paid-state .pm-date-stack { justify-items: start; }
}

/* کارگاهِ ورود سریع ماهنامه — هم‌راستا با پنل، فارسی و واکنش‌گرا */
.mi-page-head { margin-bottom: 16px; }
.mi-page-tabs { display: flex; gap: 5px; width: fit-content; max-width: 100%; padding: 5px; margin-bottom: 20px; border: 1px solid #e9e3d8; background: #f3f0e8; border-radius: 14px; }
.mi-page-tabs button { display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 40px; padding: 9px 17px; border: 0; border-radius: 10px; background: transparent; color: #8a7f6e; font: inherit; font-size: 12px; font-weight: 800; cursor: pointer; }
.mi-page-tabs button.on { background: #fff; color: #2e7770; box-shadow: 0 3px 10px #51472c0b; }
.mi-page-tabs .ui-icon { width: 17px; height: 17px; }
.mi-hero { position: relative; display: flex; justify-content: space-between; align-items: center; gap: 30px; overflow: hidden; padding: 28px 32px; border: 1px solid #d7e9e4; border-radius: 22px; background: radial-gradient(ellipse at 4% 10%, #dcece480 0%, transparent 55%), linear-gradient(120deg, #eff7f1, #f8fbf7 70%); }
.mi-hero-copy { position: relative; max-width: 750px; min-width: 0; }
.mi-kicker { display: inline-flex; margin-bottom: 7px; color: #67917b; font-size: 11px; font-weight: 850; }
.mi-hero h2 { margin: 0 0 9px; color: #285c4c; font-size: 23px; font-weight: 950; letter-spacing: -.4px; }
.mi-hero p { margin: 0; max-width: 650px; color: #698373; font-size: 12px; line-height: 2.1; }
.mi-steps { display: flex; flex-wrap: wrap; gap: 23px; padding: 0; margin: 20px 0 0; list-style: none; }
.mi-steps li { display: flex; align-items: center; gap: 8px; color: #3e6a54; font-size: 11px; font-weight: 750; }
.mi-steps li b { display: grid; place-items: center; width: 24px; height: 24px; border: 1px solid #cbdfd2; border-radius: 8px; color: #5a8c6e; background: #fff8; font-size: 12px; }
.mi-hero-rate { flex: 0 0 140px; display: grid; justify-items: center; padding: 18px 14px; border: 1px solid #ccdfd0; border-radius: 18px; background: #f9fcf5c9; color: #5a7d4d; text-align: center; transform: rotate(-3deg); }
.mi-hero-rate span { font-size: 11px; font-weight: 800; }
.mi-hero-rate > b { color: #497042; direction: ltr; font-size: 53px; line-height: 1.15; font-weight: 950; }
.mi-hero-rate small { margin-block: 4px 10px; font-size: 11px; font-weight: 700; }
.mi-hero-rate em { display: block; padding-top: 9px; border-top: 1px dashed #d4e1c7; font-size: 9px; font-style: normal; color: #859570; }
.mi-summary { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 13px; margin-block: 18px 24px; }
.mi-summary > div { display: flex; align-items: center; gap: 12px; min-width: 0; padding: 16px 18px; border: 1px solid #e9e3d8; border-radius: 15px; background: #fffdf9; }
.mi-summary-icon { display: grid; place-items: center; flex: 0 0 40px; height: 40px; border-radius: 12px; }
.mi-summary-icon.available { color: #ac7c32; background: #f7eedc; }
.mi-summary-icon.claimed { color: #ae7040; background: #fbecdf; }
.mi-summary-icon.submitted { color: #3b8980; background: #e8f4ef; }
.mi-summary-icon .ui-icon { width: 20px; height: 20px; }
.mi-summary > div > span:last-child { display: grid; gap: 2px; min-width: 0; }
.mi-summary b { color: #514b3c; font-size: 21px; line-height: 1.2; font-weight: 950; }
.mi-summary small { color: #948774; font-size: 10px; line-height: 1.8; }
.mi-toolbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 17px; }
.mi-filter-tabs { display: flex; flex-wrap: wrap; gap: 6px; min-width: 0; }
.mi-filter-tabs button { display: inline-flex; align-items: center; gap: 7px; min-height: 37px; padding: 7px 11px; border: 1px solid #e5dfd4; border-radius: 10px; background: #fffdf9; color: #8b7c64; font: inherit; font-size: 10.5px; font-weight: 750; cursor: pointer; }
.mi-filter-tabs button b { display: grid; place-items: center; min-width: 19px; height: 19px; padding-inline: 4px; border-radius: 6px; background: #f2eee4; color: #9b8b70; font-size: 10px; }
.mi-filter-tabs button.on { color: #327e76; background: #edf6f2; border-color: #b7d7c8; }
.mi-filter-tabs button.on b { color: #327e76; background: #dfeee7; }
.mi-search { display: flex; align-items: center; gap: 9px; min-width: 210px; max-width: 100%; flex: 0 1 275px; padding: 0 12px; height: 40px; border: 1px solid #e8e0d2; border-radius: 11px; background: #fffdf8; color: #ad9c83; }
.mi-search .ui-icon { width: 17px; height: 17px; flex: none; }
.mi-search input { min-width: 0; width: 100%; height: 38px; padding: 0; border: 0; outline: none; background: transparent; font: inherit; font-size: 11px; box-shadow: none; }
.mi-search:focus-within { border-color: #8dbbab; outline: 2px solid #91bdb51a; }
.mi-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; gap: 18px; }
.mi-card { position: relative; display: flex; flex-direction: column; min-width: 0; padding: 20px; border: 1px solid #e6e1d7; border-radius: 18px; background: #fffdf9; box-shadow: 0 5px 17px #5d503605; }
.mi-card.is-mine { border-color: #e5ba92; box-shadow: inset 0 3px 0 #ebb184, 0 5px 17px #5d503605; }
.mi-card.status-submitted { border-color: #c5dfd1; box-shadow: inset 0 3px 0 #b0d4bf; }
.mi-card.status-expired, .mi-card.status-file_issue { background: #fffaf4; }
.mi-card-top { display: flex; flex-wrap: wrap; align-items: center; gap: 7px; min-width: 0; margin-bottom: 14px; }
.mi-card-top > small { margin-inline-start: auto; color: #a59783; font-size: 10px; }
.mi-status { display: inline-flex; align-items: center; gap: 6px; min-width: 0; padding: 4px 8px; border-radius: 7px; background: #f1efea; color: #8d8576; font-size: 10px; font-weight: 750; line-height: 1.8; }
.mi-status i { flex: none; width: 5px; height: 5px; border-radius: 100%; background: currentColor; }
.mi-status.available { background: #f6efd9; color: #98742e; }
.mi-status.claimed { background: #faeadb; color: #ae703c; }
.mi-status.submitted { background: #e9f3ec; color: #42845b; }
.mi-status.expired, .mi-status.file_issue { background: #faeae3; color: #b57053; }
.mi-mine { padding: 4px 7px; border: 1px solid #e9caaa; border-radius: 7px; color: #b78558; font-size: 9px; font-weight: 700; }
.mi-card h2 { margin: 0 0 5px; color: #494437; font-size: 16px; font-weight: 900; line-height: 1.85; overflow-wrap: anywhere; }
.mi-scope { margin: 0 0 17px; color: #9b8c76; font-size: 10.5px; line-height: 1.8; }
.mi-source { display: flex; align-items: center; gap: 10px; min-width: 0; padding: 11px 12px; border: 1px solid #e8e3d9; border-radius: 12px; background: #f7f6f0; text-decoration: none; transition: border-color .16s, background .16s; }
a.mi-source:hover { border-color: #b6cfc5; background: #f0f6f1; }
.mi-source-icon { display: grid; place-items: center; flex: 0 0 34px; height: 38px; border: 1px solid #ded9cc; border-radius: 8px; background: #fffdf6; color: #a2977d; }
.mi-source-icon .ui-icon { width: 17px; height: 17px; }
.mi-source > span:nth-child(2) { display: grid; gap: 3px; min-width: 0; flex: 1; }
.mi-source small { color: #a59b8a; font-size: 9px; line-height: 1.7; }
.mi-source b { color: #79715f; font-size: 11px; font-weight: 750; overflow-wrap: anywhere; }
.mi-source > .ui-icon { width: 16px; height: 16px; flex: none; color: #9b8d72; }
.mi-source-missing { color: #ad795d; font-size: 9px; }
.mi-deadline { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; padding-block: 15px 17px; color: #8f8672; font-size: 10px; }
.mi-deadline > .ui-icon { flex: none; width: 14px; height: 14px; }
.mi-deadline > span { color: #87714e; font-weight: 750; }
.mi-deadline > small { margin-inline-start: auto; color: #b5a48c; font-size: 8.5px; }
.mi-deadline.expired > span { color: #b0714f; }
.mi-progress-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 7px; margin-bottom: 9px; }
.mi-progress-head b { font-size: 16px; font-weight: 900; color: #6c634d; }
.mi-progress-head b small { font-size: 10px; font-weight: 550; color: #9e9179; }
.mi-progress-head > span { color: #b29879; font-size: 9px; }
.mi-progress { height: 5px; overflow: hidden; border-radius: 10px; background: #eee9dd; }
.mi-progress i { display: block; height: 100%; border-radius: inherit; background: #b3cab0; transition: width .2s; }
.mi-card.is-mine .mi-progress i { background: #e4b48b; }
.mi-counts { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 5px; margin-block: 12px 17px; }
.mi-counts > div { padding: 7px 4px; border: 1px solid #f0eade; border-radius: 8px; text-align: center; }
.mi-counts dt { margin-bottom: 3px; color: #a49a86; font-size: 8.5px; }
.mi-counts dd { margin: 0; color: #928570; font-size: 12px; font-weight: 800; }
.mi-counts .approved dd { color: #678b61; }
.mi-counts .returned dd { color: #b3966a; }
.mi-counts .rejected dd { color: #b6816d; }
.mi-rate { display: flex; flex-wrap: wrap; align-items: center; gap: 9px; padding: 11px 12px; border: 1px solid #e8e7d8; border-radius: 11px; background: #f7f8ee; }
.mi-rate-mark { display: grid; place-items: center; flex: 0 0 31px; height: 31px; border-radius: 9px; background: #e8ebd4; color: #8a925c; direction: ltr; font-size: 16px; font-weight: 900; }
.mi-rate > span:nth-child(2) { display: grid; gap: 3px; flex: 1; min-width: 170px; }
.mi-rate b { color: #84865c; font-size: 10px; font-weight: 800; }
.mi-rate small { color: #a39e83; font-size: 8.5px; line-height: 1.9; }
.mi-policy-pill { display: block; padding: 3px 6px; border: 1px solid #e5dcc4; border-radius: 6px; background: #fffaf1; color: #b3986a; font-size: 8px; font-weight: 700; }
.mi-card-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 18px; }
.mi-card-actions button { min-height: 36px; padding: 8px 12px; font-size: 10px; }
.mi-card-actions button .ui-icon { width: 14px; height: 14px; }
.mi-card-actions .ghost-button { color: #a69a87; padding-inline: 6px; font-size: 9.5px; }
.mi-card-actions .mi-file-issue { margin-inline-start: auto; }
.mi-card-actions .mi-review-button { background: #448c76; border-color: #448c76; }
.mi-card-foot { margin: 11px 0 0; font-size: 9px; line-height: 1.9; color: #b2987a; }
.mi-warning { display: flex; align-items: start; gap: 6px; margin: 0 0 13px; padding: 10px 12px; border: 1px solid #f0dcc3; border-radius: 10px; background: #fff5e9; color: #b28a60; font-size: 10px; line-height: 2; }
.mi-warning > .ui-icon { width: 14px; height: 14px; flex: none; margin-top: 3px; }
.mi-error { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; margin-bottom: 18px; padding: 13px 15px; border: 1px solid #e8cbbb; border-radius: 12px; color: #ad775c; background: #fff2e9; font-size: 11px; }
.mi-error > span { flex: 1; min-width: 200px; }
.mi-empty, .mi-loading { display: grid; justify-items: center; gap: 10px; padding: 45px 20px; border: 1px dashed #dfdbd0; border-radius: 18px; background: #fffdf8; text-align: center; }
.mi-empty > span { display: grid; place-items: center; width: 50px; height: 50px; border: 1px solid #e6e5d6; border-radius: 15px; background: #f8f8ee; color: #a6aa85; }
.mi-empty h2 { margin: 6px 0 0; color: #817961; font-size: 16px; }
.mi-empty p { margin: 0 0 10px; max-width: 570px; color: #aba08b; font-size: 11px; line-height: 2; }
.mi-loading { color: #a59981; font-size: 12px; }
.mi-page-note { display: flex; align-items: center; justify-content: center; gap: 7px; margin-block: 22px 0; color: #b1a58d; font-size: 9.5px; line-height: 1.9; }
.mi-page-note > .ui-icon { width: 13px; height: 13px; flex: none; }
.mi-modal-body { display: flex; flex-direction: column; gap: 15px; }
.mi-modal-body .form-grid { margin: 0; }
.mi-modal-body .field { margin: 0; }
.mi-modal-body h3 { margin: 0; color: #6f6650; font-size: 15px; }
.mi-modal-sub { margin: 6px 0 0; color: #a3957c; font-size: 10px; }
.mi-info-note { display: flex; align-items: start; gap: 8px; padding: 12px 14px; border: 1px solid #dfe9e2; border-radius: 12px; color: #73917c; background: #f0f7f1; font-size: 11px; line-height: 2; }
.mi-info-note > .ui-icon { width: 17px; height: 17px; flex: none; margin-top: 3px; }
.mi-policy-note { padding: 13px 15px; border: 1px solid #e6ddc7; border-radius: 12px; background: #faf6e9; }
.mi-policy-note b { color: #9d8b56; font-size: 11px; }
.mi-policy-note p { margin: 5px 0 0; color: #ac9d78; font-size: 10px; line-height: 2; }
.mi-submit-summary { display: grid; gap: 7px; padding: 16px; border: 1px solid #e0e8da; border-radius: 13px; color: #7d9469; background: #f3f8ed; }
.mi-submit-summary b { font-size: 15px; }
.mi-submit-summary span { color: #9a9c84; font-size: 10px; }
.mi-folder-banner { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; padding: 14px 16px; margin-bottom: 18px; border: 1px solid #d7e5d9; border-radius: 15px; background: #f0f6eb; }
.mi-banner-icon { display: grid; place-items: center; width: 36px; height: 40px; flex: none; border: 1px solid #d5e1c7; border-radius: 10px; color: #859b69; background: #f8fbf3; }
.mi-folder-banner > div { display: grid; gap: 3px; min-width: 180px; flex: 1; }
.mi-folder-banner b { font-size: 11px; color: #77895d; }
.mi-folder-banner [data-mi-clock] { font-size: 10px; color: #929a7b; }
.mi-folder-banner small { font-size: 9px; color: #a1a78e; line-height: 1.9; }
.mi-folder-banner > a, .mi-folder-banner > button { padding: 8px 10px; font-size: 10px; }
.mi-folder-banner > a { text-decoration: none; }
.mi-folder-banner .ui-icon { width: 15px; height: 15px; }
.mi-page-tabs button:focus-visible, .mi-filter-tabs button:focus-visible { outline: 2px solid #84b5a1; outline-offset: 3px; }
.mi-card-actions button:disabled { opacity: .5; cursor: default; }
@media (min-width: 1500px) { .mi-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 1100px) { .mi-grid { gap: 14px; } .mi-card { padding: 17px; } .mi-hero { padding: 24px; gap: 20px; } .mi-hero h2 { font-size: 21px; } .mi-summary > div { padding: 14px; gap: 9px; } }
@media (max-width: 760px) {
  .mi-grid { grid-template-columns: minmax(0, 1fr); }
  .mi-page-head .head-actions { gap: 6px; }
  .mi-page-head .head-actions button { padding: 8px 10px; font-size: 11px; }
  .mi-page-tabs { width: 100%; border-radius: 12px; margin-bottom: 15px; }
  .mi-page-tabs button { flex: 1; padding: 8px 7px; font-size: 10px; gap: 5px; }
  .mi-page-tabs .ui-icon { width: 15px; height: 15px; }
  .mi-hero { padding: 20px; gap: 13px; border-radius: 17px; }
  .mi-hero h2 { font-size: 18px; line-height: 1.8; }
  .mi-hero p { font-size: 10px; }
  .mi-hero-rate { flex-basis: 100px; padding: 13px 9px; border-radius: 14px; }
  .mi-hero-rate > b { font-size: 41px; }
  .mi-hero-rate span, .mi-hero-rate small { font-size: 9px; }
  .mi-hero-rate em { font-size: 8px; line-height: 1.8; }
  .mi-steps { margin-top: 14px; gap: 10px; }
  .mi-steps li { font-size: 9px; gap: 5px; }
  .mi-steps li b { width: 20px; height: 20px; font-size: 10px; }
  .mi-summary { gap: 7px; margin-block: 12px 19px; }
  .mi-summary > div { flex-direction: column; align-items: start; padding: 11px 12px; gap: 8px; }
  .mi-summary-icon { flex-basis: 31px; width: 31px; height: 31px; border-radius: 9px; }
  .mi-summary-icon .ui-icon { width: 17px; height: 17px; }
  .mi-summary b { font-size: 19px; }
  .mi-summary small { font-size: 8px; line-height: 1.8; }
  .mi-toolbar { gap: 10px; }
  .mi-filter-tabs { width: 100%; }
  .mi-filter-tabs button { flex: 1; min-width: fit-content; padding: 6px 8px; font-size: 9px; }
  .mi-search { flex: 1 1 100%; }
  .mi-folder-banner { gap: 8px; padding: 12px; }
  .mi-folder-banner > a, .mi-folder-banner > button { padding: 7px 9px; font-size: 9px; }
  .mi-folder-banner > div { flex-basis: calc(100% - 50px); }
}
@media (max-width: 460px) {
  .mi-hero { flex-direction: column; align-items: stretch; }
  .mi-hero-rate { flex-basis: auto; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; justify-content: center; padding: 7px 10px; border-radius: 11px; transform: none; }
  .mi-hero-rate > b { font-size: 28px; }
  .mi-hero-rate small { margin: 0; }
  .mi-hero-rate em { width: 100%; padding-top: 5px; font-size: 8px; }
  .mi-kicker { font-size: 9px; }
  .mi-card { padding: 16px; border-radius: 15px; }
  .mi-card h2 { font-size: 15px; }
  .mi-deadline { gap: 5px; padding-block: 13px; }
  .mi-deadline > small { flex-basis: 100%; padding-inline-start: 20px; font-size: 9px; }
  .mi-card-actions button.primary-button { flex: 1; }
  .mi-card-actions .mi-file-issue { margin-inline-start: 0; }
  .mi-page-note { align-items: start; justify-content: start; font-size: 9px; }
  .mi-page-note > .ui-icon { margin-top: 3px; }
}
.mi-create-folder-help { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; padding: 9px 12px; border: 1px dashed #e1dfd0; border-radius: 10px; background: #fcfaf2; }
.mi-create-folder-help span { color: #a3977f; font-size: 10px; line-height: 1.9; }
.mi-create-folder-help button { padding: 6px 8px; font-size: 10px; }
.mi-preserved-confirm { display: flex; align-items: start; gap: 8px; padding: 12px; border: 1px solid #e3dfc8; border-radius: 10px; background: #faf7e8; color: #9f8d58; font-size: 10px; line-height: 2; }
.mi-preserved-confirm input { width: 16px; height: 16px; flex: none; margin-top: 3px; accent-color: #a3905e; }
/* گزارش سؤال روی گوشی در ظرف اسکرول می‌ماند تا نام فارسی ستون‌ها خرد نشود. */
.qrep-table { min-width: 820px; }
.mi-reviewer-note { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 11px 0 0; padding: 8px 10px; border: 1px dashed #ddd9ca; border-radius: 9px; color: #a2967b; font-size: 9px; line-height: 1.9; }
.mi-reviewer-note > .ui-icon { width: 14px; height: 14px; flex: none; }
.mi-reviewer-note button { padding: 3px 6px; margin-inline-start: auto; font-size: 9px; }
.mi-monthly-group { display: grid; gap: 12px; min-width: 0; margin-bottom: 24px; }
.mi-monthly-head { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; padding: 2px 2px 10px; border-bottom: 1px solid #e5dfd3; }
.mi-monthly-head > div { flex: 1 1 220px; min-width: 0; }
.mi-monthly-head h2 { margin: 0 0 3px; color: #4f4838; font-size: 16px; font-weight: 850; line-height: 1.8; overflow-wrap: anywhere; }
.mi-monthly-head p { display: flex; flex-wrap: wrap; align-items: center; gap: 5px 12px; margin: 0; color: #8f856f; font-size: 11px; }
.mi-monthly-head p span { padding: 2px 8px; border-radius: 7px; background: #f0ede4; color: #7b715e; font-size: 10px; }
.mi-monthly-head > button { flex: none; max-width: 100%; font-size: 11px; }
/* هر آزمون یک ردیف مستقل دارد و درس‌هایش در چهار ستون هم‌اندازه قرار می‌گیرند. */
.mi-exam-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; align-items: stretch; }
.mi-exam { grid-column: 1 / -1; display: flex; flex-direction: column; gap: 12px; min-width: 0; padding: 14px; border: 1px solid #e6e1d7; border-radius: 20px; background: #fffdf9; box-shadow: 0 6px 18px #5d503607; }
.mi-exam.is-mine { border-color: #e5ba92; box-shadow: inset 0 3px 0 #ebb184, 0 6px 18px #5d503607; }
.mi-exam-head { display: flex; align-items: center; gap: 14px; min-width: 0; }
.mi-exam-icon { display: grid; place-items: center; flex: none; width: 48px; height: 48px; border-radius: 14px; background: #fbeee0; color: #c4763a; }
.mi-exam-logo { display: inline-flex; align-items: center; justify-content: center; flex: none; width: 48px; height: 48px; padding: 5px; overflow: hidden; border: 1px solid #ece6da; border-radius: 14px; background: #fff; }
.mi-exam-logo > svg, .mi-exam-logo > img { display: block; width: 100%; height: 100%; max-width: 100%; max-height: 100%; object-fit: contain; }
.mi-exam-logo.src-icon-fallback > svg { width: 60%; height: 60%; color: #c4763a; }
.mi-exam-icon .ui-icon { width: 25px; height: 25px; }
.mi-exam-title { display: grid; gap: 5px; min-width: 0; flex: 1; }
.mi-exam-title h2 { margin: 0; color: #4f4838; font-size: 17px; line-height: 1.6; overflow-wrap: anywhere; }
.mi-exam-title p { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; margin: 0; color: #9b917c; font-size: 10.5px; }
.mi-exam-title p span { position: relative; }
.mi-exam-title p span + span::before { content: ""; position: absolute; inset-inline-start: -7px; top: 50%; width: 3px; height: 3px; margin-top: -1.5px; border-radius: 50%; background: #d4cbb9; }
.mi-exam-hours { display: inline-flex; align-items: center; gap: 4px; color: #ae703c; }
.mi-exam-hours .ui-icon { width: 13px; height: 13px; }
.mi-exam-overall { display: grid; justify-items: end; gap: 3px; flex: 0 0 150px; }
.mi-exam-overall b { color: #4f4838; font-size: 19px; font-weight: 900; line-height: 1; }
.mi-exam-overall small { color: #9b917c; font-size: 10px; }
.mi-exam-bar { width: 100%; height: 5px; overflow: hidden; border-radius: 10px; background: #eee9dd; }
.mi-exam-bar i { display: block; height: 100%; border-radius: inherit; background: #6fae86; transition: width .2s; }
.mi-exam-file { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border: 1px solid #e3ddcf; border-radius: 14px; background: #f7f5ee; color: inherit; text-decoration: none; transition: border-color .16s, background .16s; }
a.mi-exam-file:hover { border-color: #b6cfc5; background: #f0f6f1; }
.mi-exam-file-icon { display: grid; place-items: center; flex: none; width: 38px; height: 38px; border: 1px solid #ded9cc; border-radius: 10px; background: #fffdf6; color: #a2977d; }
.mi-exam-file-icon .ui-icon { width: 18px; height: 18px; }
.mi-exam-file-name { display: grid; gap: 2px; flex: 1; min-width: 0; }
.mi-exam-file-name small { color: #a59b8a; font-size: 9.5px; }
.mi-exam-file-name b { color: #5f5745; font-size: 12px; overflow-wrap: anywhere; }
.mi-exam-file-cta { display: inline-flex; align-items: center; gap: 5px; flex: none; padding: 7px 13px; border-radius: 10px; background: #2e7770; color: #fff; font-size: 11px; font-weight: 800; }
.mi-exam-file-cta .ui-icon { width: 14px; height: 14px; }
.mi-exam-file.is-missing .mi-exam-file-cta { background: #faeae3; color: #b57053; }
.mi-tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.mi-tile { position: relative; display: flex; flex-direction: column; gap: 8px; min-width: 0; padding: 12px 12px 10px; border: 1px solid #ece7dc; border-top: 4px solid var(--tint, #a3957c); border-radius: 15px; background: #fff; }
.mi-tile.is-mine { background: #fffaf3; box-shadow: 0 0 0 2px #ebc8a6; }
.mi-tile.status-submitted { background: #f7fbf6; }
.mi-tile-head { display: flex; align-items: center; justify-content: space-between; gap: 6px; min-width: 0; }
.mi-tile-head b { min-width: 0; overflow: hidden; color: var(--tint, #5f5745); font-size: 14px; font-weight: 900; white-space: nowrap; text-overflow: ellipsis; }
.mi-tile-head .mi-status { flex: none; padding: 3px 7px; font-size: 9.5px; }
.mi-tile-count { display: flex; align-items: baseline; gap: 5px; }
.mi-tile-count b { color: #4f4838; font-size: 22px; font-weight: 900; line-height: 1; }
.mi-tile-count small { color: #9b917c; font-size: 10.5px; }
.mi-tile .mi-progress i { background: var(--tint, #b3cab0); opacity: .75; }
.mi-tile-meta { display: grid; gap: 4px; color: #9a8f79; font-size: 10px; }
.mi-tile-meta span { display: flex; align-items: center; gap: 5px; min-width: 0; }
.mi-tile-meta .ui-icon { width: 13px; height: 13px; flex: none; }
.mi-tile-meta .mi-tile-clock { color: #ae703c; font-weight: 700; }
.mi-tile-meta .mi-tile-income { color: #3f7d4e; font-weight: 700; flex-wrap: wrap; }
.mi-tile-meta .mi-tile-income small { font-weight: 500; opacity: .8; }
.mi-tile-meta .is-warn { color: #b5704f; }
.mi-tile-actions { display: flex; align-items: flex-end; gap: 6px; margin-top: auto; padding-top: 8px; border-top: 1px dashed #eee8dc; }
.mi-tile-main { order: 1; display: grid; gap: 6px; flex: 1; min-width: 0; }
.mi-tile-main button { width: 100%; justify-content: center; min-height: 36px; padding: 7px 8px; font-size: 11px; white-space: nowrap; }
.mi-tile-main button .ui-icon { width: 14px; height: 14px; }
.mi-tile-main .mi-review-button { background: #448c76; border-color: #448c76; }
.mi-tile-main button:disabled { opacity: .5; cursor: default; }
.mi-tile-tools { order: 2; display: flex; flex: none; gap: 1px; margin-inline-start: auto; }
.mi-tile-tool { display: grid; place-items: center; width: 30px; height: 30px; padding: 0; border: 0; border-radius: 8px; background: transparent; color: #aa9f8b; cursor: pointer; }
.mi-tile-tool:hover { background: #f3efe6; color: #6f6650; }
.mi-tile-tool:disabled { opacity: .4; cursor: default; }
.mi-tile-tool .ui-icon { width: 15px; height: 15px; }
@media (max-width: 900px) {
  .mi-exam { padding: 14px; }
  .mi-exam-head { flex-wrap: wrap; }
  .mi-exam-overall { flex: 1 1 100%; justify-items: stretch; grid-template-columns: auto 1fr; align-items: center; column-gap: 10px; }
  .mi-exam-overall .mi-exam-bar { grid-column: 1 / -1; }
  .mi-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 460px) { .mi-tiles { grid-template-columns: minmax(0, 1fr); } .mi-exam-file-cta { padding: 7px 10px; } }
/* سرِ جمع‌وجورِ تابلو: چند واقعیتِ کوتاه، یک نوار ابزار، راهنمای سه‌قدمی فقط وقتی تابلو خالی است */
.mi-facts { display: flex; flex-wrap: wrap; gap: 6px; margin: -6px 0 16px; padding: 0; list-style: none; }
.mi-facts li { display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px; border-radius: 999px; background: #f4f1ea; color: #8a7f6e; font-size: 10.5px; font-weight: 700; }
.mi-facts .ui-icon { width: 13px; height: 13px; flex: none; color: #a3957c; }
.mi-facts li.is-warn { background: #fbeee6; color: #b5704f; }
.mi-facts li.is-warn .ui-icon { color: #b5704f; }
.mi-claim-body { gap: 12px; }
.mi-claim-lead { margin: 0; color: #8f856f; font-size: 11px; }
.mi-claim-terms { display: grid; gap: 6px; margin: 0; }
.mi-claim-terms div { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; padding: 9px 12px; border-radius: 10px; background: #f7f5ee; }
.mi-claim-terms dt { color: #8f856f; font-size: 11px; }
.mi-claim-terms dd { margin: 0; color: #4f4838; font-size: 14px; font-weight: 900; }
.mi-claim-warning { display: flex; align-items: start; gap: 8px; margin: 0; padding: 11px 13px; border: 1px solid #f0d3c3; border-radius: 12px; background: #fff3ec; color: #a8603f; font-size: 11px; line-height: 2; }
.mi-claim-warning .ui-icon { width: 16px; height: 16px; flex: none; margin-top: 4px; }
.mi-toolbar-end { display: flex; flex-wrap: nowrap; align-items: center; gap: 8px; min-width: 0; max-width: 100%; margin-inline-start: auto; }
.mi-toolbar-end #miMonthlyFilter { flex: 0 1 260px; width: 260px; min-width: 0; max-width: 100%; min-height: 40px; padding: 8px 10px; border: 1px solid #e8e0d2; border-radius: 11px; background: #fffdf8; color: #6f6650; font: inherit; font-size: 11px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mi-toolbar-end .mi-search { flex: 0 0 200px; min-width: 0; }
.mi-stepper { display: grid; justify-items: center; gap: 18px; padding: 34px 20px; border: 1px dashed #dfdbd0; border-radius: 18px; background: #fffdf8; }
.mi-stepper ol { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px 34px; margin: 0; padding: 0; list-style: none; }
.mi-stepper li { position: relative; display: grid; justify-items: center; gap: 4px; width: 150px; text-align: center; }
.mi-stepper li + li::before { content: ""; position: absolute; top: 15px; inset-inline-end: calc(100% - 8px); width: 26px; height: 1px; background: #e2dccf; }
.mi-stepper li > span { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: #faeadb; color: #ae703c; font-size: 13px; font-weight: 900; }
.mi-stepper li.is-done > span { background: #e3f1e6; color: #42845b; }
.mi-stepper li > span .ui-icon { width: 15px; height: 15px; }
.mi-stepper b { color: #5f5745; font-size: 12px; }
.mi-stepper small { color: #a3957c; font-size: 10px; line-height: 1.8; }
@media (max-width: 760px) { .mi-toolbar-end { margin-inline-start: 0; flex: 1 1 100%; flex-wrap: wrap; } .mi-toolbar-end .mi-search { flex: 1 1 100%; } .mi-toolbar-end #miMonthlyFilter { flex: 1 1 100%; width: 100%; } .mi-stepper li + li::before { display: none; } }
/* فرمِ «آزمون جدید» */
.mx-body .mx-grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.mx-hint { display: flex; align-items: center; gap: 5px; margin-top: 5px; color: #a3957c; font-size: 9.5px; line-height: 1.8; }
.mx-hint .ui-icon { width: 13px; height: 13px; flex: none; color: #6f9c7c; }
.mx-lessons, .mx-file { display: grid; gap: 9px; padding: 13px 14px; border: 1px solid #e8e3d9; border-radius: 13px; background: #fbfaf6; }
.mx-lessons, .mx-file, #mxFileBody { min-width: 0; max-width: 100%; }
.mx-lessons header, .mx-file header { display: grid; gap: 3px; }
.mx-lessons header b, .mx-file header b { color: #6f6650; font-size: 12px; }
.mx-lessons header small, .mx-file header small { color: #a3957c; font-size: 9.5px; line-height: 1.8; }
#mxLessonRows { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 7px; }
.mx-lesson { display: flex; align-items: center; gap: 8px; padding: 7px 9px; border: 1px solid #e6e0d3; border-radius: 10px; background: #fff; cursor: pointer; }
.mx-body select { min-width: 0; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mx-lesson-folder { display: grid; grid-template-columns: 16px minmax(0, 1fr) 86px; min-width: 0; cursor: default; }
.mx-lesson-folder select { grid-column: 1 / -1; width: 100%; min-width: 0; min-height: 36px; padding: 6px 8px; border: 1px solid #ddd6c8; border-radius: 8px; background: #fff; color: #6f6650; font: inherit; font-size: 10.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mx-lesson.is-off { opacity: .55; background: transparent; }
.mx-lesson input[type=checkbox] { width: 16px; height: 16px; flex: none; accent-color: #448c76; }
.mx-lesson span { flex: 1; min-width: 0; color: #5f5745; font-size: 11.5px; font-weight: 750; }
.mx-lesson input[type=text] { width: 86px; min-height: 32px; padding: 5px 8px; border: 1px solid #ddd6c8; border-radius: 8px; font: inherit; font-size: 12px; text-align: center; }
.mx-edit-row { cursor: default; }
.mx-edit-row.mx-lesson-folder { grid-template-columns: minmax(0, 1fr) 86px auto; }
.mx-edit-row > span { display: grid; gap: 1px; }
.mx-edit-meta { color: #a3957c; font-size: 9.5px; font-weight: 600; }
.mx-edit-row.is-new { border-style: dashed; border-color: #b9d6c4; }
.mx-edit-row.is-off > span { text-decoration: line-through; }
.mx-edit-toggle { flex: none; min-height: 32px; padding: 4px 10px; font-size: 10.5px; }
.mx-edit-toggle .ui-icon { width: 14px; height: 14px; }
.mx-edit-toggle.is-danger { color: #b5704f; }
.mx-edit-toggle:disabled { opacity: .45; cursor: not-allowed; }
.mi-exam-edit { flex: none; align-self: flex-start; }
.mx-extra select { min-height: 34px; padding: 4px 9px; border: 1px dashed #d7cfbe; border-radius: 9px; background: transparent; color: #8f856f; font: inherit; font-size: 10.5px; }
.mx-radio { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; min-width: 0; max-width: 100%; color: #6f6650; font-size: 11px; }
.mx-radio select, .mx-radio input[type=file] { flex: 1 1 220px; min-width: 0; max-width: 100%; box-sizing: border-box; font: inherit; font-size: 11px; }
.mx-radio select { min-height: 34px; padding: 4px 8px; border: 1px solid #ddd6c8; border-radius: 9px; background: #fff; }
.mx-preview { display: grid; gap: 4px; padding: 11px 13px; border-radius: 12px; background: #f0f6eb; color: #6f8a5c; font-size: 10.5px; line-height: 1.9; }
.mx-preview:empty { display: none; }
.mx-preview b { display: flex; align-items: center; gap: 6px; color: #5f7a4c; font-size: 11px; overflow-wrap: anywhere; }
.mx-preview .ui-icon { width: 14px; height: 14px; flex: none; }
.mx-preview-paths { display: grid; gap: 7px; padding-top: 8px; border-top: 1px solid #dce7d5; }
.mx-preview-path { display: grid; gap: 2px; min-width: 0; }
.mx-preview-path strong { color: #506d40; font-size: 11px; }
.mx-preview-path > span { color: #647754; font-size: 11px; line-height: 1.9; overflow-wrap: anywhere; }
.mx-problems { margin: 4px 0 0; padding-inline-start: 18px; color: #b5704f; }
.mx-status { margin-inline-end: auto; color: #8f856f; font-size: 10.5px; }
@media (max-width: 640px) { .mx-body .mx-grid-3 { grid-template-columns: minmax(0, 1fr); } #mxLessonRows { grid-template-columns: minmax(0, 1fr); } }
/* نمای مرحله‌ای مخزن: یک ردیف برای هر آزمون، یک خانهٔ هم‌تراز برای هر درس. */
.rsv-panel { overflow: hidden; container-type: inline-size; }
.rsv-panel > .panel-header { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; gap: 10px; padding: 10px 16px; }
.rsv-panel > .panel-header > .panel-title { grid-column: 1; grid-row: 1; }
.rsv-panel > .panel-header > .rsv-toggle { grid-column: 3; grid-row: 1; justify-self: end; }
.rsv-panel > .panel-header > .panel-tools { grid-column: 2; grid-row: 1; justify-self: end; flex-wrap: wrap; }
.rsv-toggle { display: inline-flex; gap: 4px; padding: 4px; border: 1px solid #e8e4dc; border-radius: 12px; background: #f5f3ee; }
.rsv-toggle button { display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 38px; padding: 7px 15px; border: 1px solid transparent; border-radius: 9px; background: transparent; color: #777267; font: inherit; font-size: 12px; font-weight: 650; cursor: pointer; white-space: nowrap; }
.rsv-toggle button.on { background: #fff; border-color: #e6e3da; color: #286751; box-shadow: 0 2px 4px #38302109; }
.rsv-browser { padding: 14px 16px; }
.rsv-toolbar { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; }
.rsv-search { display: flex; align-items: center; gap: 9px; flex: 1 1 240px; max-width: 420px; min-width: 0; min-height: 44px; padding: 0 12px; border: 1px solid #e4e0d7; border-radius: 11px; background: #fff; color: #8c887d; }
.rsv-search > .ui-icon { width: 18px; height: 18px; flex: none; }
.rsv-search input { width: 100%; min-width: 0; min-height: 42px; padding: 9px 0; border: 0; outline: none; box-shadow: none; background: transparent; color: #393d35; font: inherit; font-size: 12px; }
.rsv-search input::placeholder { color: #858177; }
.rsv-search:focus-within { border-color: #4b8b70; box-shadow: 0 0 0 3px #4b8b7014; }
.rsv-sort { display: flex; position: relative; align-items: center; gap: 8px; color: #7c786e; font-size: 11px; }
.rsv-sort select { min-height: 44px; max-width: 100%; padding: 9px 12px 9px 32px; appearance: none; border: 1px solid #e4e0d7; border-radius: 11px; background: #fff; color: #55594e; font: inherit; font-size: 12px; cursor: pointer; }
.rsv-sort > .ui-icon { position: absolute; left: 10px; width: 14px; height: 14px; pointer-events: none; }
.rsv-result { margin-inline-start: auto; color: #858177; font-size: 11px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.rsv-hint { margin: 8px 0 12px; color: #77786d; font-size: 11px; line-height: 1.9; }
.rsv-list { display: grid; gap: 8px; min-width: 0; }
.rsv-stage { display: grid; grid-template-columns: minmax(180px, .85fr) minmax(0, 3fr); align-items: center; gap: 14px; padding: 10px; border: 1px solid #e6e4db; border-radius: 12px; background: #fafaf7; }
.rsv-head { display: flex; align-items: flex-start; gap: 10px; min-width: 0; }
.rsv-stage-icon { display: grid; place-items: center; flex: none; width: 36px; height: 36px; border: 1px solid #e2e8dd; border-radius: 11px; background: #eff3eb; color: #66816b; }
.rsv-stage-icon .ui-icon { width: 18px; height: 18px; }
.rsv-stage-copy { min-width: 0; }
.rsv-head h3 { margin: 0; color: #394638; font-size: 13px; font-weight: 750; line-height: 1.9; overflow-wrap: anywhere; }
.rsv-stage-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin-top: 5px; color: #777c70; font-size: 10px; }
.rsv-stage-meta > span + span { padding-inline-start: 10px; border-inline-start: 1px solid #dcded4; }
.rsv-stage-meta b { font-weight: 650; }
.rsv-lessons { display: grid; grid-template-columns: repeat(var(--rsv-columns, 4), minmax(0, 1fr)); gap: 8px; min-width: 0; }
.rsv-lesson { display: flex; flex-direction: column; align-items: stretch; justify-content: center; gap: 3px; min-width: 0; min-height: 78px; padding: 7px 10px; border: 1px solid #e3e5db; border-radius: 12px; background: #fff; color: #464c40; text-align: start; font: inherit; cursor: pointer; transition: border-color .15s, background .15s, box-shadow .15s; }
button.rsv-lesson:hover { border-color: #89ad96; background: #fcfefa; box-shadow: 0 3px 10px #34543b0a; }
.rsv-lesson-top { display: flex; justify-content: space-between; align-items: center; gap: 4px; min-width: 0; }
.rsv-lesson-name { display: flex; align-items: center; gap: 6px; font-size: 11px; font-weight: 700; line-height: 1.8; overflow-wrap: anywhere; }
.rsv-lesson-dot { width: 7px; height: 7px; flex: none; border-radius: 50%; background: var(--folder-color, #448c76); box-shadow: inset 0 0 0 1px #0000000f; }
.rsv-open { width: 13px; height: 13px; flex: none; color: #9aa18f; }
.rsv-lesson-count { display: flex; align-items: baseline; gap: 5px; color: #7d8277; font-size: 10px; }
.rsv-lesson-count b { color: #364e3b; font-size: 18px; font-weight: 750; line-height: 1.2; font-variant-numeric: tabular-nums; }
.rsv-lesson-status { min-height: 17px; font-size: 9px; line-height: 1.8; }
.rsv-pending { display: flex; align-items: center; flex-wrap: wrap; gap: 3px; color: #9c682b; }
.rsv-pending .ui-icon { width: 11px; height: 11px; flex: none; }
.rsv-neutral { color: #7f8577; }
.rsv-task { display: inline-flex; align-self: center; margin-inline-start: auto; color: #448c76; }
.rsv-task .ui-icon { width: 14px; height: 14px; }
.rsv-lesson.is-missing { border-style: dashed; border-color: #dedfd5; background: transparent; color: #8b9083; cursor: default; }
.rsv-lesson-empty { color: #898e80; font-size: 10px; line-height: 1.9; }
.rsv-empty { display: flex; flex-direction: column; align-items: center; padding: 40px 16px; text-align: center; }
.rsv-empty > .ui-icon { width: 28px; height: 28px; color: #80917c; }
.rsv-empty h3 { margin: 14px 0 0; color: #465540; font-size: 14px; }
.rsv-empty p { margin: 8px 0 18px; color: #7d8276; font-size: 12px; }
.rsv-stage[hidden], .rsv-empty[hidden] { display: none; }
.rsv-toggle button:focus-visible, .rsv-lesson:focus-visible, .rsv-sort select:focus-visible, .rsv-back:focus-visible { outline: 2px solid #448c76; outline-offset: 3px; }
@media (max-width: 1200px) {
  .rsv-stage { grid-template-columns: minmax(0, 1fr); gap: 9px; }
  .rsv-head { align-items: center; }
  .rsv-stage-copy { display: flex; align-items: center; justify-content: space-between; flex: 1; gap: 12px; }
  .rsv-stage-meta { margin: 0; flex-shrink: 0; }
}
@media (max-width: 760px) {
  .rsv-panel > .panel-header { padding: 12px; gap: 10px; }
  .rsv-browser { padding: 14px; }
  .rsv-toolbar { gap: 9px; }
  .rsv-search { flex-basis: 100%; max-width: none; }
  .rsv-sort select { min-height: 40px; }
  .rsv-stage { padding: 9px; border-radius: 12px; }
  .rsv-lessons { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .rsv-stage-copy { display: block; }
  .rsv-stage-meta { margin-top: 4px; }
  .rsv-lesson { min-height: 78px; }
  .rsv-toggle button { padding: 7px 10px; font-size: 11px; }
}
@container (max-width: 600px) {
  .rsv-panel > .panel-header { grid-template-columns: minmax(0, 1fr) auto; }
  .rsv-panel > .panel-header > .rsv-toggle { grid-column: 2; }
  .rsv-panel > .panel-header > .panel-tools { grid-column: 1 / -1; grid-row: 2; }
}
@media (prefers-reduced-motion: reduce) { .rsv-lesson { transition: none; } }
/* اصلاحِ ساختارِ پوشه‌ها */
.fsx-banner { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 12px 15px; margin-bottom: 18px; border: 1px solid #f0dcc3; border-radius: 14px; background: #fff5e9; color: #b28a60; }
.fsx-banner > .ui-icon { width: 18px; height: 18px; flex: none; }
.fsx-banner > span { display: grid; gap: 2px; flex: 1; min-width: 200px; }
.fsx-banner b { font-size: 11.5px; }
.fsx-banner small { font-size: 10px; color: #b9a07f; }
.fsx-list { display: grid; gap: 6px; margin: 0; padding: 0; list-style: none; }
.fsx-list li { display: flex; align-items: start; gap: 8px; padding: 9px 11px; border: 1px solid #ece7dc; border-radius: 10px; background: #fffdf9; color: #6f6650; font-size: 11px; line-height: 1.9; }
.fsx-list .ui-icon { width: 15px; height: 15px; flex: none; margin-top: 3px; color: #a3957c; }

/* اشتراکِ بودجهٔ راهبردی با سؤال‌های مجاز؛ مستقل از بانک سؤال. */
.pl-access { padding: 12px; border: 1px solid #dedcd2; border-radius: 12px; background: #f7f7f0; color: #575f54; font-size: .76rem; line-height: 1.95; overflow-wrap: anywhere; }
.pl-access p { margin: 4px 0 0; }
.pl-access b { display: block; color: var(--ink); }
.pl-access-error { border-color: #e7c5ba; background: #fff4ef; color: #9f4d37; }
.pl-access-error button { margin-top: 9px; width: 100%; }
.pl-access-empty { border-style: dashed; }
.pl-ws-cta button:disabled { opacity: .5; cursor: not-allowed; }
.pl-practice { min-width: 0; margin-top: 28px; padding-top: 20px; border-top: 1px solid var(--line); }
.pl-practice-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 14px; }
.pl-practice-head h2 { margin: 0; font-size: 1.05rem; }
.pl-practice-head p { margin: 5px 0 0; color: var(--muted); font-size: .78rem; }
.pl-practice-list { display: grid; gap: 14px; min-width: 0; }
.pl-practice-pager { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 12px; margin-top: 16px; font-size: .78rem; }
@media (max-width: 420px) { .pl-practice-pager { gap: 7px; } .pl-practice-pager button { padding-inline: 12px; } }

/* Profile and account verification share one compact, RTL-aware visual language. */
.modal.account-modal { width: min(580px, calc(100vw - 32px)); border: 1px solid #eee9e2; border-radius: 24px; color: var(--ink); }
.modal.account-security-modal { width: min(540px, calc(100vw - 32px)); }
.account-modal .account-modal-head { padding: 20px 24px; gap: 16px; }
.account-heading { display: flex; align-items: center; gap: 12px; min-width: 0; }
.account-heading-icon { width: 44px; height: 44px; display: grid; place-items: center; flex: none; border: 1px solid #ffe1cb; border-radius: 14px; background: #fff4eb; color: #dc641b; }
.account-heading-icon .ui-icon { width: 22px; height: 22px; }
.account-heading h2 { font-size: 17px; line-height: 1.7; }
.account-heading p { margin: 3px 0 0; color: #79746c; font-size: 11px; line-height: 1.8; }
.account-modal .modal-close { flex: none; width: 36px; height: 36px; border-radius: 12px; }
.account-modal .account-modal-body { display: grid; gap: 24px; padding: 24px; }
.account-profile-section { display: grid; gap: 20px; min-width: 0; }
.account-modal .account-avatar-edit { margin: 0; padding: 16px; gap: 16px; border: 1px solid #eee9e2; border-radius: 16px; background: #faf9f6; }
.account-avatar-edit .avatar-lg { width: 72px; height: 72px; flex: 0 0 72px; border-radius: 22px; box-shadow: 0 0 0 4px #fff; }
.account-avatar-copy { display: grid; gap: 3px; min-width: 0; }
.account-avatar-copy > b { font-size: 13px; }
.account-avatar-copy > small { font-size: 11px; line-height: 1.9; color: #79746c; }
.account-avatar-edit .avatar-actions { display: flex; flex-direction: row; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 7px; }
.account-avatar-edit .avatar-actions button { min-height: 34px; padding: 6px 10px; font-size: 11px; border-radius: 10px; }
.account-modal .field { min-width: 0; gap: 8px; }
.account-modal .field label { color: #49443d; font-size: 12px; }
.account-modal .field input { width: 100%; min-width: 0; min-height: 48px; border-radius: 12px; background: #fff; border-color: #e4dfd6; font-size: 14px; transition: border-color .16s, box-shadow .16s; }
.account-modal .field input:focus { border-color: #ed9b62; outline: none; box-shadow: 0 0 0 3px #fff0e4; }
.account-modal button:focus-visible { outline: 3px solid #ed9b62; outline-offset: 3px; }
.account-meta { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; padding: 13px 16px; background: #f8f7f4; border-radius: 12px; }
.account-meta > span { display: grid; gap: 4px; color: #79746c; font-size: 11px; }
.account-meta > span + span { border-inline-start: 1px solid #e8e4dc; padding-inline-start: 16px; }
.account-meta strong { color: #57514a; font-size: 13px; font-weight: 600; text-align: start; overflow-wrap: anywhere; }
.account-meta strong[dir="ltr"] { text-align: right; }
.account-security-section { border-top: 1px solid #eee9e2; padding-top: 20px; }
.account-section-heading { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 12px; }
.account-section-heading h3 { display: flex; align-items: center; gap: 7px; margin: 0; font-size: 13px; }
.account-section-heading h3 .ui-icon { width: 17px; height: 17px; color: #79746c; }
.account-section-heading > span { border: 1px solid #dcebe5; border-radius: 20px; padding: 3px 8px; color: #387562; background: #f3f8f5; font-size: 10px; }
.account-security-options { border: 1px solid #e9e4dc; border-radius: 16px; overflow: hidden; }
.account-setting-row { display: flex; align-items: center; gap: 12px; padding: 15px; }
.account-setting-row + .account-setting-row { border-top: 1px solid #eee9e2; }
.account-setting-icon { display: grid; place-items: center; width: 36px; height: 36px; flex: none; border-radius: 11px; background: #f6f4ef; color: #8b8173; }
.account-setting-icon .ui-icon { width: 18px; height: 18px; }
.account-setting-copy { display: grid; gap: 4px; flex: 1; min-width: 0; }
.account-setting-copy b { font-size: 12px; }
.account-setting-copy > span { justify-self: start; font-size: 13px; color: #79746c; }
.account-setting-copy small { color: #79746c; font-size: 10px; line-height: 1.8; }
.account-setting-row button { flex: none; min-height: 36px; padding: 7px 12px; border-radius: 10px; font-size: 11px; white-space: nowrap; }
.account-security-caption { display: flex; align-items: flex-start; gap: 6px; margin: 12px 2px 0; color: #79746c; font-size: 10px; line-height: 1.9; }
.account-security-caption .ui-icon { width: 14px; height: 14px; flex: none; margin-top: 3px; }
.account-security-steps { display: flex; list-style: none; padding: 0; margin: 0; }
.account-security-steps li { position: relative; display: flex; flex: 1; align-items: center; flex-direction: column; gap: 8px; color: #8b857d; text-align: center; }
.account-security-steps li:not(:last-child)::after { content: ""; position: absolute; height: 1px; background: #e8e3dc; top: 15px; right: calc(50% + 22px); width: calc(100% - 44px); }
.account-security-steps li > span { display: grid; place-items: center; width: 32px; height: 32px; border: 1px solid #e8e3dc; background: #faf9f6; border-radius: 50%; font-size: 12px; }
.account-security-steps li b { font-size: 10px; font-weight: 500; line-height: 1.7; }
.account-security-steps li.is-current { color: #bd5314; }
.account-security-steps li.is-current > span { background: #ff6b18; border-color: #ff6b18; color: #fff; box-shadow: 0 0 0 4px #fff2e8; }
.account-security-steps li.is-current b { font-weight: 700; }
.account-security-steps li.is-complete { color: #387562; }
.account-security-steps li.is-complete > span { background: #edf6f0; border-color: #d7e9de; }
.account-security-steps li.is-complete::after { background: #c7dfd0; }
.account-security-steps .ui-icon { width: 16px; height: 16px; }
.account-flow-intro h3 { margin: 0 0 6px; font-size: 15px; }
.account-flow-intro p { margin: 0; color: #79746c; font-size: 12px; line-height: 2; }
.account-flow-intro b[dir="ltr"] { display: inline-block; color: #49443d; }
.account-security-fields { display: grid; gap: 18px; min-width: 0; }
.account-modal .field .account-field-help { display: block; color: #79746c; font-size: 11px; line-height: 1.9; }
.account-modal .field .account-otp-input { min-height: 58px; text-align: center; letter-spacing: .3em; font-size: 23px; font-variant-numeric: tabular-nums; }
.account-security-notice { display: flex; align-items: flex-start; gap: 10px; padding: 14px; border: 1px solid #f0dfc4; border-radius: 13px; background: #fffaf1; color: #8c672f; }
.account-security-notice > .ui-icon { width: 18px; height: 18px; flex: none; margin-top: 2px; }
.account-security-notice b { display: block; font-size: 11px; font-weight: 700; }
.account-security-notice p { margin: 4px 0 0; font-size: 11px; line-height: 1.9; }
.account-modal .modal-footer { padding: 16px 24px; gap: 12px; }
.account-modal .modal-footer button { min-height: 44px; border-radius: 12px; font-size: 12px; }
.account-modal .modal-footer .primary-button { padding-inline: 20px; }
@media (max-width: 540px) {
  .account-modal .account-modal-head { padding: 16px; }
  .account-heading { gap: 10px; }
  .account-heading h2 { font-size: 15px; }
  .account-heading-icon { width: 38px; height: 38px; border-radius: 12px; }
  .account-heading p { font-size: 10px; }
  .account-modal .account-modal-body { padding: 20px 16px; gap: 20px; }
  .account-modal .account-avatar-edit { padding: 12px; gap: 12px; }
  .account-avatar-edit .avatar-lg { width: 60px; height: 60px; flex-basis: 60px; border-radius: 18px; }
  .account-setting-row { padding: 12px; gap: 9px; }
  .account-setting-icon { display: none; }
  .account-setting-row button { padding-inline: 10px; }
  .account-modal .modal-footer { padding: 14px 16px; flex-wrap: wrap; }
  .account-modal .modal-footer .primary-button { flex: 1; padding-inline: 12px; }
}

/* Four-payment subscriptions */
.shop-plan-option,.shop-exam-choice { position:relative; }
.shop-installment-ribbon { position:absolute; top:0; left:0; width:38px; height:28px; overflow:hidden; pointer-events:none; }
.shop-installment-ribbon > span { position:absolute; top:4px; left:-17px; width:58px; padding:0; line-height:12px; transform:rotate(-35deg); background:#116958; color:#fff; font-size:8px; font-style:normal; font-weight:800; text-align:center; box-shadow:0 2px 6px #114f3820; }
.shop-exam-choice:has(.shop-installment-ribbon) { padding-left:34px; }
.shop-installment-choice { border:1px solid #cddfd7; background:linear-gradient(145deg,#f5faf6,#fffaf2); border-radius:18px; padding:16px; margin:14px 0; }
.shop-installment-heading { display:flex; align-items:center; justify-content:space-between; gap:8px; margin-bottom:14px; color:#205449; }
.shop-installment-heading > span { display:flex; gap:7px; align-items:center; font-weight:800; font-size:13px; }
.shop-installment-heading svg { width:19px; height:19px; }
.shop-installment-heading > small { border-radius:20px; padding:3px 10px; background:#dceee3; font-weight:800; }
.shop-installment-toggle { display:grid; grid-template-columns:1fr 1fr; padding:4px; background:#e9eee8; border-radius:12px; gap:4px; }
.shop-installment-toggle label { padding:10px 5px; border-radius:9px; display:flex; align-items:center; justify-content:center; gap:6px; font-weight:700; font-size:12px; cursor:pointer; }
.shop-installment-toggle label.on { background:#fff; color:#145746; box-shadow:0 2px 6px #12382112; }
.shop-installment-toggle input { width:14px; height:14px; accent-color:#14735a; margin:0; }
.shop-installment-timeline { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:5px; margin-top:18px; }
.shop-installment-timeline > div { display:flex; flex-direction:column; align-items:center; gap:6px; padding:10px 2px; background:#fff; border:1px solid #dde6de; border-radius:10px; min-width:0; }
.shop-installment-timeline .current { border-color:#2b8165; background:#e6f2ea; color:#135440; }
.shop-installment-timeline span,.shop-installment-timeline small { font-size:10px; }
.shop-installment-timeline b { font-size:12px; font-variant-numeric:tabular-nums; white-space:nowrap; }
.shop-installment-total { display:flex; justify-content:space-between; gap:8px; font-size:12px; margin:16px 0 8px; }
.shop-installment-terms { color:#626c66; font-size:12px; line-height:1.95; margin:12px 0 0; }
.shop-installment-summary { display:flex; align-items:center; gap:14px; padding:12px 16px; background:#f1f7f2; border:1px solid #d9e7dc; border-radius:13px; flex-basis:100%; margin-top:8px; }
.shop-installment-summary > div { display:flex; flex:1; min-width:0; flex-direction:column; gap:4px; }
.shop-installment-summary b { font-size:12px; color:#245b47; }
.shop-installment-summary span { font-size:12px; color:#616b63; }
.shop-installment-summary.overdue { background:#fff6eb; border-color:#efd6ad; }
.shop-installment-summary.overdue b { color:#9b541c; }
.shop-card > .shop-installment-summary, .shop-buybox > .shop-installment-summary, .shop-mine-row > .shop-installment-summary { flex-wrap:wrap; }
.shop-card > .shop-installment-summary .ghost-button, .shop-buybox > .shop-installment-summary .ghost-button, .shop-mine-row > .shop-installment-summary .ghost-button { width:100%; justify-content:center; }
.shop-buybox > h2 { margin:0; font-size:16px; line-height:1.7; }
.shop-installment-progress { display:flex; gap:4px; direction:rtl; }
.shop-installment-progress i { display:block; width:18px; height:5px; background:#dbe3dc; border-radius:3px; }
.shop-installment-progress i.paid { background:#278265; }
.shop-mine-row:has(.shop-installment-summary) { flex-wrap:wrap; }
.shop-mine-row .shop-installment-summary { order:10; grid-column:1 / -1; min-width:0; }
.shop-installment-dashboard { flex-wrap:wrap; }
.shop-installment-dashboard > .shop-installment-summary { width:100%; }
.shop-installment-modal.mk-stack > * { margin-block:0; }
.shop-installment-modal.mk-stack > .shop-installment-modal-head { padding-block:0; }
.shop-installment-reminder { display:grid; gap:var(--space-1); padding:var(--space-3); border-radius:12px; background:var(--teal-soft); color:var(--ink); font-size:13px; }
.shop-installment-reminder.overdue { background:var(--orange-soft); }
.shop-installment-error { color:var(--danger, #aa3028); font-size:13px; }
.shop-installment-footer { display:flex; flex-wrap:wrap; align-items:center; justify-content:flex-end; gap:var(--space-2); }
.shop-installment-modal-head { display:flex; gap:14px; align-items:center; padding:10px 0 18px; }
.shop-installment-modal-head > span { display:grid; place-items:center; width:52px; height:52px; background:#e3f0e7; border-radius:16px; color:#19694f; }
.shop-installment-modal-head > span svg { width:26px; height:26px; }
.shop-installment-modal-head > div { flex:1; }
.shop-installment-modal-head h3 { font-size:16px; margin:0 0 7px; }
.shop-installment-modal-head p,.shop-installment-modal-head small { font-size:11px; color:#68736c; margin:0; }
.shop-installment-modal-head > b { text-align:center; color:#1b634c; font-size:19px; line-height:1.5; }
.shop-installment-bills { display:flex; flex-direction:column; gap:10px; margin:20px 0; }
.shop-installment-bills.mk-stack { gap:var(--space-2); }
.shop-installment-modal > .sd-check + .field { margin-block-start: 14px; }
.shop-installment-bill { display:flex; align-items:center; gap:12px; border:1px solid #e1e6df; border-radius:13px; padding:14px; cursor:pointer; background:#fff; }
.shop-installment-bill:has(input:checked:not(:disabled)) { border-color:#348666; background:#f0f8f1; box-shadow:0 0 0 1px #348666; }
.shop-installment-bill > input { width:18px; height:18px; accent-color:#247656; }
.shop-installment-bill > span { flex:1; display:flex; flex-direction:column; gap:5px; }
.shop-installment-bill b,.shop-installment-bill strong { font-size:14px; }
.shop-installment-bill small { display:block; color:#758077; font-size:11px; font-weight:400; margin-top:3px; }
.shop-installment-bill.overdue small { color:#aa5919; }
.shop-installment-bill.paid { background:#f7f8f5; opacity:.75; cursor:default; }
@media(max-width:600px) {
 .shop-installment-summary { flex-wrap:wrap; gap:10px; padding:12px; }
 .shop-installment-summary .ghost-button { width:100%; justify-content:center; }
 .shop-installment-choice { padding:12px; }
 .shop-installment-bill { padding:12px 9px; gap:8px; }
 .shop-installment-bill strong { font-size:13px; }
}

/* Admin collaboration rules: native modal keeps the work panel inaccessible until consent. */
.admin-terms-dialog { width: min(820px, calc(100vw - 32px)); max-width: none; height: min(860px, calc(100dvh - 40px)); max-height: calc(100dvh - 40px); padding: 0; margin: auto; border: 1px solid #dce9df; border-radius: 24px; color: #29453b; background: #fff; font-family: inherit; box-shadow: 0 24px 90px #153b2a33; overflow: hidden; }
.admin-terms-dialog[open] { display: flex; flex-direction: column; }
.admin-terms-dialog::backdrop { background: #1d332c99; backdrop-filter: blur(5px); }
.at-head { display: flex; align-items: center; flex-shrink: 0; gap: 14px; padding: 24px 28px; background: linear-gradient(120deg, #fff5f4, #f0f8ec); border-bottom: 1px solid #e5eee6; }
.at-symbol { display: grid; place-items: center; width: 48px; height: 48px; flex-shrink: 0; background: #e4efcf; border-radius: 16px; color: #637e40; }
.at-symbol svg { width: 24px; height: 24px; }
.at-eyebrow { font-size: 11px; color: #6f8374; }
.at-head h2 { margin: 4px 0; font-size: 20px; line-height: 1.7; }
.at-head p { margin: 0; font-size: 11px; color: #6f8374; }
.at-reading { min-height: 80px; flex: 1; overflow-y: auto; overscroll-behavior: contain; padding: 24px 28px; scrollbar-gutter: stable; }
.at-reading:focus-visible { outline: 2px solid #83aa8d; outline-offset: -4px; }
.at-intro { margin: 0 0 20px; padding: 14px 16px; border-radius: 14px; background: #f4f7f1; font-size: 12px; line-height: 2.1; }
.at-section { padding: 18px 0; border-bottom: 1px solid #edf0ea; }
.at-section:last-child { border: 0; }
.at-section h3 { display: flex; align-items: center; gap: 10px; margin: 0 0 10px; font-size: 14px; line-height: 1.9; }
.at-section h3 span { display: grid; place-items: center; flex-shrink: 0; width: 28px; height: 28px; border-radius: 9px; color: #5d7e58; background: #edf4e8; font-size: 12px; }
.at-section p { margin: 8px 0; font-size: 12px; line-height: 2.25; color: #45584f; }
.at-footer { flex-shrink: 0; padding: 16px 28px 22px; border-top: 1px solid #e5eee6; background: #fcfdfb; }
.at-hint { margin: 0 0 10px; font-size: 11px; color: #6c7d71; line-height: 1.8; }
.at-consent { display: flex; align-items: flex-start; gap: 10px; font-size: 12px; line-height: 2; cursor: pointer; }
.at-consent input { flex: 0 0 19px; width: 19px; height: 19px; margin: 3px 0 0; accent-color: #407a60; }
.at-consent:has(input:disabled) { opacity: .55; cursor: default; }
.at-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.at-actions button { min-height: 40px; font-family: inherit; font-size: 12px; }
.at-actions button:disabled { opacity: .45; cursor: not-allowed; }
.at-error { color: #a53f50; font-size: 12px; line-height: 1.9; }
.at-error button { margin: 8px; }
.at-loading { padding: 32px; }
.at-loading button { margin: 8px 0 0 8px; }
@media (max-width: 600px) {
  .admin-terms-dialog { width: calc(100vw - 16px); height: calc(100dvh - 16px); max-height: calc(100dvh - 16px); border-radius: 18px; }
  .at-head { padding: 16px; gap: 10px; }
  .at-head h2 { font-size: 16px; }
  .at-symbol { width: 38px; height: 38px; border-radius: 12px; }
  .at-eyebrow { font-size: 10px; }
  .at-reading { padding: 14px 16px; }
  .at-footer { padding: 12px 16px; }
  .at-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
  .at-actions .primary-button { grid-column: 1 / -1; }
  .at-actions button { padding: 8px; white-space: normal; }
}
.admin-terms-dialog .primary-button { background: #39775c; border-color: #39775c; box-shadow: none; }
.admin-terms-dialog .primary-button:hover:not(:disabled) { background: #2d654b; }

/* Owner overview of server-recorded administrator consent (opened as a modal
   from the «پذیرش قوانین» button in the access page header). */
.atr-toolbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 14px; }
.atr-caption { margin: 0; color: #718174; font-size: 11px; line-height: 1.9; }
.atr-head-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.atr-head-actions button { font-size: 12px; }
.atr-filters { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 14px 0; }
.atr-filters > button { display: inline-flex; gap: 8px; align-items: center; min-height: 38px; padding: 7px 12px; border: 1px solid #e0e9df; border-radius: 12px; background: #fff; color: #52695b; font: inherit; font-size: 12px; cursor: pointer; }
.atr-filters > button.on { background: #eaf4e8; border-color: #98b99a; color: #356b4e; }
.atr-search { margin-inline-start: auto; }
.atr-search input { max-width: 100%; padding: 9px 12px; border: 1px solid #dfe8de; border-radius: 10px; background: #fff; font: inherit; font-size: 12px; }
.atr-table { width: 100%; }
.atr-table small { display: block; color: #7b867e; font-size: 11px; margin-top: 5px; }
.atr-badge { display: inline-block; border-radius: 9px; padding: 6px 10px; font-size: 11px; }
.atr-accepted { color: #2c7554; background: #eaf6ef; }
.atr-pending { color: #9a5d35; background: #fff3e8; }
.atr-exempt { color: #777181; background: #f3f0f6; }
.atr-empty { text-align: center; padding: 22px; color: #7a857e; font-size: 12px; }
.atr-error { margin: 12px 0; color: #a33f4e; font-size: 12px; line-height: 1.9; }
@media (max-width: 600px) {
  .atr-filters { padding: 12px 0; }
  .atr-filters > button { flex: 1; justify-content: center; white-space: nowrap; }
  .atr-search, .atr-search input { width: 100%; }
  .atr-table thead { display: none; }
  .atr-table, .atr-table tbody, .atr-table tr { display: block; min-width: 0; }
  .atr-table tr { padding: 12px 16px; border-top: 1px solid #e7eee5; }
  .atr-table td { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 6px 12px; padding: 7px 0; border: 0; white-space: normal; }
  .atr-table td::before { content: attr(data-label); color: #7a857e; font-size: 11px; }
  .atr-table td small { width: 100%; text-align: end; margin: 0; }
  .atr-table .atr-empty { display: block; }
}

/* ───────── دسترسی‌ها: هر مدیر یک ردیفِ جمع‌شده (+ بخشِ مدیرانِ تعلیق‌شده) ───────── */
.acg-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 4px 19px 12px; }
.acg-filters { display: flex; flex-wrap: wrap; gap: 6px; }
.acg-filters > button { display: inline-flex; align-items: center; gap: 7px; padding: 6px 12px; border: 1px solid #e8e0d4; border-radius: 999px; color: #7d7466; background: #fff; font-size: 11.5px; font-weight: 800; cursor: pointer; transition: .16s; }
.acg-filters > button b { color: #a39886; font-size: 10.5px; font-weight: 900; }
.acg-filters > button:hover { border-color: #d8c9ae; color: #4f4739; }
.acg-filters > button.on { border-color: #2c261e; color: #fff; background: #2c261e; }
.acg-filters > button.on b { color: #e9dfcd; }
.acg-search { display: flex; align-items: center; gap: 7px; min-width: 220px; margin-inline-start: auto; padding: 0 11px; border: 1px solid var(--line); border-radius: 11px; background: var(--panel-soft); color: #a39886; }
.acg-search:focus-within { border-color: #d8c9ae; background: #fff; }
.acg-search .ui-icon { flex: none; width: 15px; height: 15px; }
.acg-search input { width: 100%; min-width: 0; padding: 8px 0; border: 0; outline: none; background: transparent; color: var(--ink); font-size: 12px; }
.acg-list { display: grid; gap: 8px; padding: 0 19px 19px; }
.acg-group { overflow: hidden; border: 1px solid var(--line); border-radius: 14px; background: #fff; transition: border-color .16s, box-shadow .16s; }
.acg-group:hover { border-color: #e0d5c2; }
.acg-group.open { border-color: #d9cdb6; box-shadow: 0 8px 22px rgba(48, 40, 28, .06); }
.acg-head { display: flex; align-items: center; gap: 8px; }
.acg-toggle { display: grid; grid-template-columns: auto minmax(130px, 1.1fr) minmax(0, 1.3fr) minmax(0, 1.5fr) auto auto; align-items: center; gap: 14px; flex: 1 1 auto; min-width: 0; padding: 10px 14px; border: 0; background: transparent; color: inherit; font: inherit; text-align: start; cursor: pointer; }
.acg-toggle:focus-visible { outline: 2px solid #d8c9ae; outline-offset: -2px; border-radius: 14px; }
.acg-avatar .avatar { width: 36px; height: 36px; }
.acg-person { display: grid; gap: 1px; min-width: 0; }
.acg-person b { overflow: hidden; color: #332c24; font-size: 13px; font-weight: 900; text-overflow: ellipsis; white-space: nowrap; }
.acg-person small { overflow: hidden; color: #a1978a; font-size: 10px; font-weight: 750; text-overflow: ellipsis; white-space: nowrap; }
.acg-roles { display: flex; flex-wrap: wrap; align-items: center; gap: 5px; min-width: 0; }
.acg-role { display: inline-flex; align-items: center; gap: 3px; }
.acg-role .badge { padding: 3px 8px; font-size: 9.5px; white-space: nowrap; }
.acg-role b { color: #8d8375; font-size: 10px; font-weight: 900; }
.acg-none { color: #b0a696; font-size: 10.5px; font-weight: 750; }
.acg-scope { overflow: hidden; color: #8d8375; font-size: 11px; font-weight: 750; text-overflow: ellipsis; white-space: nowrap; }
.acg-count { display: grid; justify-items: center; min-width: 46px; line-height: 1.25; }
.acg-count b { color: #332c24; font-size: 14px; font-weight: 950; }
.acg-count small { color: #aaa093; font-size: 9px; font-weight: 750; }
.acg-chevron { display: grid; place-items: center; width: 28px; height: 28px; border: 1px solid #e8e0d4; border-radius: 9px; color: #8b8173; background: #fff; transition: .16s; }
.acg-chevron .ui-icon { width: 14px; height: 14px; transition: transform .2s; }
.acg-toggle[aria-expanded="true"] .acg-chevron, .acg-suspended-head[aria-expanded="true"] .acg-chevron { border-color: #2c261e; color: #fff; background: #2c261e; }
.acg-toggle[aria-expanded="true"] .acg-chevron .ui-icon, .acg-suspended-head[aria-expanded="true"] .acg-chevron .ui-icon { transform: rotate(180deg); }
.acg-body { border-top: 1px solid var(--line); background: var(--panel-soft); }
.acg-body .data-table { background: transparent; }
.acg-table td { vertical-align: middle; }
.acg-empty, .acg-empty-body { margin: 0; padding: 18px; color: var(--muted); font-size: 12px; text-align: center; }
.acg-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 6px; flex: none; padding-inline-end: 12px; }
.acg-actions .secondary-button { white-space: nowrap; }
.acg-actions .dl-revoke-button { color: #a04454; }
.acg-group.suspended .acg-person b { color: #6f675c; }
.acg-panel .pm-page-footer { margin: 0 19px 19px; padding: 12px 0 0; }

/* بخشِ مدیرانِ تعلیق‌شده: پیش‌فرض یک نوارِ بسته با شمار */
.acg-suspended-head { display: flex; align-items: center; gap: 12px; width: 100%; padding: 16px 19px; border: 0; background: transparent; color: inherit; font: inherit; text-align: start; cursor: pointer; }
.acg-suspended-icon { display: grid; place-items: center; flex: none; width: 36px; height: 36px; border-radius: 11px; color: #a04454; background: var(--red-soft); }
.acg-suspended-icon .ui-icon { width: 17px; height: 17px; }
.acg-suspended-title { display: grid; gap: 2px; flex: 1 1 auto; min-width: 0; }
.acg-suspended-title b { color: #332c24; font-size: 15px; font-weight: 900; }
.acg-suspended-title small { color: var(--muted); font-size: 11px; font-weight: 750; line-height: 1.8; }
.acg-suspended-panel .acg-list { padding-top: 2px; }

@media (max-width: 900px) {
  .acg-toggle { grid-template-columns: auto minmax(0, 1fr) auto auto; gap: 10px; }
  .acg-roles { grid-column: 2 / -1; grid-row: 2; }
  .acg-scope { display: none; }
  .acg-head { flex-wrap: wrap; }
  .acg-actions { width: 100%; justify-content: flex-start; padding: 0 14px 12px; }
}
@media (max-width: 600px) {
  .acg-toolbar { padding-inline: 14px; }
  .acg-search { width: 100%; min-width: 0; }
  .acg-list { padding-inline: 12px; }
  .acg-actions { flex-wrap: nowrap; }
  .acg-actions .secondary-button { flex: 1 1 0; min-width: 0; justify-content: center; padding-inline: 10px; font-size: 12px; }
}

/* ───────── ارقامِ فیلدهای ورودی همیشه فارسی دیده می‌شوند ─────────
   کاربر با صفحه‌کلیدِ انگلیسی 0912… می‌زند؛ «MK Fa Digits» (ساختهٔ
   tools/build_fa_digit_font.py از همین وزیرمتن) فقط ده رقم را دارد و 0-9 را با
   شکلِ ۰-۹ می‌کشد. مقدارِ فیلد دست نمی‌خورد (FormData، Number، maxlength و
   اعتبارسنجیِ سرور همان ارقامِ لاتین را می‌بینند). فیلدهای چپ‌به‌راستِ متنی
   (لینک، کد رنگ، شناسهٔ درگاه) لاتین می‌مانند مگر data-fa-digits داشته باشند.
   !important چون ده‌ها قاعدهٔ `font: inherit` روی ورودی‌ها هست که خانوادهٔ
   فونت را هم بازنویسی می‌کند. */
input:is(:not([type]), [type="text"], [type="search"]):not([dir="ltr"]),
input:is([type="tel"], [type="number"], [inputmode="numeric"], [inputmode="decimal"], [inputmode="tel"], [autocomplete="one-time-code"], [data-fa-digits]) {
  font-family: "MK Fa Digits", "Vazirmatn", Tahoma, sans-serif !important;
}
.fml-fa-entry input { font-family: "MK Fa Digits", var(--q-font) !important; }

/* ═══════════ قالبِ واحدِ متنِ تایپیِ سؤال ═════════════════════════════════════
   یک مرجع برای فاصلهٔ سطر، فاصلهٔ بند، عنوان، فرمول و کادرِ رنگی: هم ویرایشگر
   (.rte-area) و هم هر جایی که سؤال دیده می‌شود (.sq-rich-text: پنل‌ها، آزمون،
   پیش‌نمایش، تبدیلِ تصویر به متن و چاپ). قاعده‌های قدیمی‌ترِ همین موضوع پراکنده
   بودند — عنوانِ ۱٫۳em با حاشیهٔ ۰٫۸em، فرمولِ کسری با ۰٫۴em حاشیهٔ بالا و
   پایین، کادرِ هر رنگ با شکلِ خودش — و همین‌ها «فاصلهٔ زیادی که درست نمی‌شود»
   و ظاهرِ رنگارنگ را می‌ساختند. این بلوک عمداً آخرِ فایل است تا بر همه برنده شود.

   قراردادِ دفترچهٔ کنکور:
   • فاصلهٔ سطرها یکنواخت؛ هر بند فقط یک نفسِ کوچک (--q-para) بعد از خودش دارد.
   • عنوان فقط درشت است، نه بزرگ: تقریباً هم‌اندازهٔ متن با کمی فاصلهٔ بالا.
   • فرمولِ کسری/رادیکالی فقط به اندازهٔ خودش سطر را باز می‌کند (+۰٫۱۵em نفس).
   • کادرِ رنگی یک شکل و چهار رنگِ ملایم دارد: نکته (سبز)، دام تستی (قرمز)،
     یادآوری (بنفش) و مثال (زرد)؛ رنگ‌های قدیمی‌ترِ کادر به نزدیک‌ترینِ همین‌ها.
   چاپ و PDF فاصلهٔ سطرِ تأییدشدهٔ خودشان (۱٫۹) را نگه می‌دارند تا صفحه‌بندیِ
   دفترچه‌ها جابه‌جا نشود؛ روی صفحه کمی جمع‌تر است، مثلِ متنِ کتاب. */
:root { --q-line: 1.7; --q-para: .25em; }
.pstudio-page, .pstudio-measure, .pq-block, body.pdf-export, body.pstudio-printing { --q-line: 1.9; }
@media print { :root { --q-line: 1.9; } }

.sq-rich-text,
.rte-area,
.rte-studio .rte-area,
.rte.is-compact .rte-area { line-height: var(--q-line); }
:is(.sq-rich-text, .rte-area) p { margin: 0 0 var(--q-para); }
:is(.sq-rich-text, .rte-area) :is(ul, ol) { margin: var(--q-para) 0; padding-inline-start: 1.4em; }
:is(.sq-rich-text, .rte-area) li { margin: 0; }

:is(.rte-area, .sq-rich-text, .qai-render, .pq-body, .pq-explanation) :is(h2, h3, h4) {
  margin: .35em 0 .1em;
  font-size: 1.04em;
  font-weight: 700;
  line-height: inherit;
  color: inherit;
}
:is(.rte-area, .sq-rich-text, .qai-render, .pq-body, .pq-explanation) h2 { font-size: 1.08em; }
:is(.rte-area, .sq-rich-text, .qai-render, .pq-body, .pq-explanation) h4 { font-size: 1em; }

.mkm:not(.is-display):has(.mfrac, .sqrt, .op-limits, .mtable) { padding-block: .15em; }
.mkm.is-display { margin: .3em 0; }
.rte-area .mkm.is-display { padding: 2px 0; }

/* ── کادرِ رنگی: یک شکل، چهار رنگِ ملایم ───────────────────────────────────── */
.mkbox,
.rte-box-choice,
.rte-template-box { --mkb-fill: #f4f5f7; --mkb-line: #d9dde2; --mkb-ink: #4a5560; }
:is(.mkbox[data-mk-tone="green"], .mkbox[data-mk-tone="teal"], .rte-box-choice[data-tone="green"], .rte-template-box[data-tone="green"]) {
  --mkb-fill: #eef8f1; --mkb-line: #b6dcc0; --mkb-ink: #23743a;
}
:is(.mkbox[data-mk-tone="red"], .rte-box-choice[data-tone="red"], .rte-template-box[data-tone="red"]) {
  --mkb-fill: #fdf1f0; --mkb-line: #efc1bc; --mkb-ink: #b3382f;
}
:is(.mkbox[data-mk-tone="purple"], .mkbox[data-mk-tone="blue"], .mkbox[data-mk-tone="gray"], .rte-box-choice[data-tone="purple"], .rte-template-box[data-tone="purple"]) {
  --mkb-fill: #f4f1fc; --mkb-line: #d4caf2; --mkb-ink: #5b40a6;
}
:is(.mkbox[data-mk-tone="amber"], .mkbox[data-mk-tone="yellow"], .rte-box-choice[data-tone="amber"], .rte-template-box[data-tone="amber"]) {
  --mkb-fill: #fdf8e4; --mkb-line: #ebd593; --mkb-ink: #8a6407;
}
.mkbox,
.mkbox[data-mk-box-style] {
  margin: .45em 0;
  border: 1px solid var(--mkb-line);
  border-radius: 10px;
  background: var(--mkb-fill);
  color: var(--q-ink);
}
.mkbox > .mkbox-title,
.mkbox[data-mk-box-style] > .mkbox-title {
  padding: .4em .9em 0;
  border: 0;
  background: none;
  color: var(--mkb-ink);
  font-size: 1em;
  font-weight: 700;
}
.mkbox > .mkbox-body,
.mkbox[data-mk-box-style] > .mkbox-body,
.mkbox[data-mk-box-style="topic"] > .mkbox-body,
.mkbox[data-mk-box-style="mint"] > .mkbox-body {
  padding: .45em .9em;
  color: var(--q-ink);
  font-style: normal;
}
.mkbox > .mkbox-title + .mkbox-body { padding-top: .1em; }
.mkbox[data-mk-box-style] > .mkbox-body > p { margin-block: 0 var(--q-para); }
.mkbox .mkbox { margin: .35em 0; }
@media (max-width: 640px) {
  .mkbox, .mkbox[data-mk-box-style] { border-radius: 9px; }
  .mkbox > .mkbox-title, .mkbox > .mkbox-body,
  .mkbox[data-mk-box-style] > .mkbox-title, .mkbox[data-mk-box-style] > .mkbox-body { padding-inline: .7em; }
}
/* رنگِ دلخواهی که نویسنده قبلاً روی یک کادر گذاشته همچنان برنده است */
.mkbox[style*="--mk-custom-box-fill"] { background-color: var(--mk-custom-box-fill); }
.mkbox[style*="--mk-custom-box-line"] { border-color: var(--mk-custom-box-line); }
.mkbox[style*="--mk-custom-box-ink"] > .mkbox-body { color: var(--mk-custom-box-ink); }
.mkbox[style*="--mk-custom-box-head:"] > .mkbox-title { background-color: var(--mk-custom-box-head); }
.mkbox[style*="--mk-custom-box-head-ink"] > .mkbox-title { color: var(--mk-custom-box-head-ink); }

/* منوی «کادر»: چهار دکمه که خودشان نمونهٔ همان کادرند */
.rte-pop[data-rte-pop="box"] { width: min(280px, calc(100vw - 42px)); max-height: none; overflow: visible; }
.rte-box-choices { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; margin: 2px 0 10px; }
.rte-box-choice {
  min-height: 38px;
  padding: 6px 10px;
  border: 1px solid var(--mkb-line);
  border-radius: 9px;
  background: var(--mkb-fill);
  color: var(--mkb-ink);
  font: inherit;
  font-size: 12px;
  font-weight: 800;
  text-align: start;
  cursor: pointer;
}
.rte-box-choice:hover { border-color: var(--mkb-ink); }
.rte-box-choice.on { box-shadow: 0 0 0 2px var(--mkb-ink); }
.rte-box-choice:focus-visible { outline: 2px solid var(--mkb-ink); outline-offset: 2px; }
.rte-box-remove {
  display: block;
  width: 100%;
  margin-top: 8px;
  padding: 7px 10px;
  border: 1px dashed #cfd8d6;
  border-radius: 8px;
  background: #fff;
  color: #4f5f5c;
  font: inherit;
  font-size: 12px;
  cursor: pointer;
}
.rte-box-remove:hover:not(:disabled) { background: #f6f8f8; }
.rte-box-remove:disabled { opacity: .45; cursor: default; }
.rte-template-pop > .rte-template-box::before {
  content: "";
  display: inline-block;
  width: 11px;
  height: 11px;
  margin-inline-end: 8px;
  border: 1px solid var(--mkb-line);
  border-radius: 3px;
  background: var(--mkb-fill);
  vertical-align: -1px;
}
/* منوی ویرایشگر که از لبهٔ کادرِ ویرایشگر بیرون می‌زد، به لنگرِ طرفِ دیگر می‌رود (rteFitPop) */
.rte-pop.is-flip { inset-inline-start: auto; inset-inline-end: 0; }

/* ثبت بازگشت وجه از تاریخچهٔ خرید */
.sho-payment-details { display: grid; gap: 2px; margin: 5px 0 0; padding: 0; list-style: none; font-size: 11px; line-height: 1.7; color: var(--muted); overflow-wrap: anywhere; }
.sho-payment-actions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.sho-payment-actions > button { min-height: 34px; padding: 5px 8px; gap: 5px; font-size: 11px; white-space: nowrap; }
.sho-payment-actions > .sho-refund-button { color: var(--red); }
.modal.sho-refund-modal {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  width: min(640px, calc(100vw - 40px));
  overflow: hidden;
  color: var(--ink);
}
.sho-refund-head { gap: 12px; background: var(--panel); }
.sho-refund-head .modal-close { flex: none; }
.sho-refund-heading { display: flex; align-items: center; gap: 12px; min-width: 0; }
.sho-refund-heading > .ui-icon {
  box-sizing: content-box;
  width: 19px;
  height: 19px;
  flex: none;
  padding: 10px;
  border-radius: 12px;
  background: var(--red-soft);
  color: var(--red);
}
.sho-refund-heading small { display: block; margin-top: 2px; font-size: 12px; color: var(--muted); overflow-wrap: anywhere; }
.sho-refund-body, .sho-refund-form { display: grid; min-height: 0; }
.sho-refund-form { grid-template-rows: minmax(0, 1fr) auto; }
.sho-refund-scroll { display: grid; gap: 16px; min-height: 0; overflow: auto; overscroll-behavior: contain; padding: 16px 20px; }
.sho-refund-section { display: grid; gap: 8px; min-width: 0; }
.sho-refund-section h3 { margin: 0; font-size: 14px; }
.sho-refund-summary { margin: 0; border: 1px solid var(--line); border-radius: 12px; background: var(--panel-soft); overflow: hidden; }
.sho-refund-summary > div { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 2px 12px; padding: 8px 12px; font-size: 13px; color: var(--muted); }
.sho-refund-summary > div + div { border-top: 1px solid var(--line); }
.sho-refund-summary dd { margin: 0; color: var(--ink); font-weight: 750; white-space: nowrap; }
.sho-refund-summary > .sho-refund-limit { background: var(--teal-soft); color: var(--ink); font-weight: 750; }
.sho-refund-effects { display: grid; gap: 6px; list-style: none; margin: 0; padding: 0; }
.sho-refund-effects li, .sho-refund-note, .sho-refund-check { display: flex; align-items: flex-start; gap: 8px; margin: 0; font-size: 12px; line-height: 1.85; }
.sho-refund-effects li { color: var(--muted); }
.sho-refund-effects li.is-bad { padding: 8px 10px; border-radius: 8px; background: var(--red-soft); color: var(--ink); }
.sho-refund-effects li.is-bad .ui-icon { color: var(--red); }
.sho-refund-effects .ui-icon, .sho-refund-note .ui-icon { width: 16px; height: 16px; flex: none; margin-top: 3px; }
.sho-refund-note { color: var(--muted); }
.sho-refund-check { align-items: center; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; cursor: pointer; }
.sho-refund-check input { flex: none; margin: 0; accent-color: var(--teal); }
.sho-refund-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.sho-refund-fields .field label { font-size: 12px; }
.sho-refund-reason { grid-column: 1 / -1; }
.sho-refund-footer { position: static; display: grid; gap: 8px; padding: 12px 20px; background: var(--panel); }
.sho-refund-actions { display: flex; justify-content: flex-end; gap: 8px; }
.sho-refund-error { margin: 0; color: var(--red); font-size: 13px; line-height: 1.75; }
.sho-refund-error:empty { display: none; }
.sho-refund-message { margin: 0; padding: 20px; font-size: 13px; }
@media (max-width: 560px) {
  .modal.sho-refund-modal { width: calc(100vw - 24px); height: auto; max-height: calc(100dvh - 24px); border-radius: 16px; }
  .sho-refund-scroll, .sho-refund-footer, .sho-refund-head { padding-inline: 13px; }
  .sho-refund-fields { grid-template-columns: minmax(0, 1fr); }
  .sho-refund-actions > button { flex: 1; justify-content: center; min-width: 0; min-height: 44px; padding-inline: 7px; }
}
/* فاکتور ثابت سفارش: پیش‌نمایش A4 و چاپ از همان نسخهٔ ثبت‌شده. */
.modal.shop-invoice-modal{width:min(960px,96vw);max-width:960px}
.shop-invoice-content{padding:0 20px 20px;min-width:0}
.shop-invoice-help{font-size:13px;line-height:1.9;color:var(--text-muted,#61716e);margin:0 0 14px}
.shop-invoice-preview{display:block;width:100%;height:55vh;min-height:300px;border:1px solid #dbe4e0;border-radius:10px;background:#eef1f0}
.shop-invoice-actions{display:flex;justify-content:flex-end;gap:12px;flex-wrap:wrap;padding-top:16px}
.shop-invoice-error{color:#a92c35;font-size:13px;line-height:1.8}
@media(max-width:600px){.shop-invoice-content{padding:0 10px 14px}.shop-invoice-actions>button{flex:1}.shop-invoice-preview{height:52vh}}
.sho-invoice-selection{display:flex;align-items:center;justify-content:space-between;gap:16px;flex-wrap:wrap;margin:16px 0;padding:16px;border:1px solid #dbe4e0;border-radius:12px;background:#f4f8f5}
.sho-invoice-selection small{display:block;margin-top:5px;line-height:1.9;color:#526660;overflow-wrap:anywhere}
.sho-invoice-selection>div:last-child{display:flex;gap:8px;flex-wrap:wrap}
.sho-invoice-check{width:18px;height:18px;accent-color:#28644f;cursor:pointer}
@media(max-width:600px){.sho-invoice-selection>div{width:100%}.sho-invoice-selection button{flex:1}}

/* ═══════════ آزمون فایل‌محور (سؤال‌های شخصی در قالب PDF) ═══════════ */
/* آزمون‌ساز */
.xf-source-cards .ew-type b { gap: 6px; }
.xf-ctx-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin: 4px 0 10px; }
.xf-select { display: grid; gap: 5px; font-size: 12px; font-weight: 800; color: var(--muted); }
.xf-select select { min-height: 40px; border: 1px solid #e3ddd2; border-radius: 12px; padding: 0 10px; background: #fff; font: inherit; color: var(--ink); }
.xf-setting-card { margin-top: 10px; }
.xf-setting-card .pro-hall-text b { display: inline-flex; align-items: center; gap: 6px; }
.xf-numbering { display: flex; flex-wrap: wrap; align-items: stretch; gap: 8px; margin: 4px 0 14px; font-size: 12.5px; font-weight: 800; color: var(--muted); }
.xf-numbering > span { align-self: center; }
.xf-numbering label { display: grid; gap: 2px; padding: 9px 12px; border: 1px solid #e7e0d4; border-radius: 12px; background: #fff; cursor: pointer; color: var(--ink); }
.xf-numbering label.on { border-color: var(--orange); background: var(--orange-soft); }
.xf-numbering label input { position: absolute; opacity: 0; pointer-events: none; }
.xf-numbering label small { font-size: 11px; font-weight: 600; color: var(--muted); }
.xf-booklet .ew-bk-head { flex-wrap: wrap; }
.xf-bk-time { width: 110px; }
.xf-drop { display: flex; align-items: center; gap: 12px; width: 100%; margin: 10px 0; padding: 16px; border: 1.5px dashed #e2c7ae; border-radius: 14px; background: #fffaf4; color: var(--ink); font: inherit; text-align: start; cursor: pointer; transition: border-color .2s, background .2s; }
.xf-drop:hover { border-color: var(--orange); background: var(--orange-soft); }
.xf-drop .ui-icon { width: 26px; height: 26px; color: var(--orange); flex: none; }
.xf-drop span { display: grid; gap: 3px; }
.xf-drop b { font-size: 13.5px; }
.xf-drop b em { font-style: normal; font-size: 10.5px; padding: 1px 7px; border-radius: 999px; background: var(--orange); color: #fff; margin-inline-start: 4px; }
.xf-drop small { font-size: 11.5px; color: var(--muted); }
.xf-file { display: flex; align-items: center; gap: 10px; margin: 10px 0; padding: 11px 12px; border: 1px solid #e7e0d4; border-radius: 14px; background: #fff; }
.xf-file.ready { border-color: #bfe5dc; background: #f4fbf9; }
.xf-file.failed { border-color: #f1c3c3; background: var(--red-soft); }
.xf-file-icon { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 11px; background: var(--teal-soft); color: var(--teal); flex: none; }
.xf-file-main { display: grid; gap: 4px; min-width: 0; flex: 1; }
.xf-file-main b { font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.xf-file-main small { font-size: 11.5px; color: var(--muted); }
.xf-file-actions { display: flex; gap: 6px; flex: none; }
.xf-file-bar { display: block; height: 6px; border-radius: 999px; background: #f0e8dc; overflow: hidden; }
.xf-file-bar i { display: block; height: 100%; background: var(--orange); transition: width .2s; }
.xf-busy { color: var(--blue) !important; }
.xf-error { color: var(--red) !important; }
.xf-lessons { display: grid; gap: 8px; }
/* کارتِ دفترچه پدینگ ندارد (سربرگش تمام‌عرض است)؛ کادرِ فایل و ردیفِ درس‌ها هم‌ترازِ «افزودن درس» فاصله می‌گیرند. */
.xf-booklet > :is(.xf-drop, .xf-file, .xf-lessons) { width: auto; margin: 0 18px; }
.xf-booklet > .ew-bk-head + :is(.xf-drop, .xf-file) { margin-top: 4px; }
.xf-lesson-row { display: grid; grid-template-columns: 26px minmax(130px, 1.6fr) repeat(2, minmax(64px, .7fr)) 74px minmax(56px, .6fr) minmax(76px, .7fr) 34px; align-items: end; gap: 8px; padding: 9px 10px; border: 1px solid #eee7dc; border-radius: 13px; background: #fffdf9; }
.xf-lesson-row .ew-ls-ord { align-self: center; }
.xf-f { display: grid; gap: 4px; min-width: 0; font-size: 11px; font-weight: 800; color: var(--muted); }
.xf-f input { min-width: 0; width: 100%; height: 38px; border: 1px solid #e3ddd2; border-radius: 10px; padding: 0 9px; background: #fff; font: inherit; font-size: 13px; color: var(--ink); }
.xf-f-num input { text-align: center; direction: ltr; }
.xf-f input:focus, .xf-select select:focus { outline: none; border-color: var(--orange); box-shadow: 0 0 0 3px #ffe3d0; }
/* مباحثِ درس یک خطِ تمام‌عرض زیرِ بازه و ضریب است. */
.xf-f-topics { grid-column: 2 / -1; }
.xl-topic-note { margin: 0; font-size: 13px; line-height: 2; color: var(--ink); }
.xf-f-topics span small { font-weight: 600; color: var(--muted); opacity: .85; }
.xf-count { align-self: center; justify-self: center; font-size: 11.5px; font-weight: 800; color: var(--teal); white-space: nowrap; }
.xf-hall-note .pro-hall-text { display: grid; gap: 4px; padding: 4px 2px; }
.xf-hall-note b { display: inline-flex; align-items: center; gap: 6px; }
.xf-release-note { display: flex; align-items: flex-start; gap: 6px; margin-top: 10px; }
/* کلید */
.xf-key { display: grid; gap: 12px; }
.xf-key-summary { display: grid; grid-template-columns: auto minmax(80px, 1fr); align-items: center; gap: 6px 12px; padding: 12px 14px; border: 1px solid #f0dcc6; border-radius: 14px; background: #fffaf3; }
.xf-key-summary.complete { border-color: #bfe5dc; background: #f2fbf8; }
.xf-key-summary > span:first-child { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 800; }
.xf-key-summary small { grid-column: 1 / -1; font-size: 11.5px; color: var(--muted); }
.xf-key-bar { height: 7px; border-radius: 999px; background: #f2e8db; overflow: hidden; }
.xf-key-bar i { display: block; height: 100%; background: var(--orange); }
.xf-key-summary.complete .xf-key-bar i { background: var(--teal); }
.xf-key-warn { display: flex; align-items: flex-start; gap: 6px; margin: 0; }
.xf-key-quick { display: grid; gap: 8px; padding: 12px; border: 1px solid #ece5da; border-radius: 14px; background: #fff; }
.xf-key-quick > label { display: grid; gap: 3px; }
.xf-key-quick > label b { font-size: 13px; }
.xf-key-quick > label small { font-size: 11.5px; color: var(--muted); line-height: 1.8; }
.xf-key-quick textarea { width: 100%; min-height: 54px; resize: vertical; border: 1px solid #e3ddd2; border-radius: 11px; padding: 8px 10px; font: 600 15px/1.7 ui-monospace, Menlo, Consolas, monospace; letter-spacing: 2px; color: var(--ink); background: #fffdf9; }
.xf-key-quick-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 12px; font-weight: 700; }
.xf-key-quick-row select { min-height: 36px; border: 1px solid #e3ddd2; border-radius: 10px; padding: 0 8px; font: inherit; background: #fff; max-width: 230px; }
.xf-key-grid { display: grid; gap: 14px; max-height: 620px; overflow-y: auto; padding: 4px; border-radius: 14px; outline: none; }
.xf-key-grid:focus-visible { box-shadow: 0 0 0 3px #ffe3d0; }
.xf-key-group h4 { display: flex; align-items: baseline; gap: 6px; margin: 0 0 6px; font-size: 13px; }
.xf-key-group h4 small { font-size: 11px; color: var(--muted); }
.xf-key-group h4 em { font-style: normal; font-size: 11px; color: var(--muted); }
/* ستون‌های ده‌تایی از چپ (مثلِ پاسخبرگِ کاغذی)؛ نامِ درس و بازه بالای هر ستون. */
.xf-key-blocks { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 12px; direction: ltr; }
.xf-key-block { display: grid; gap: 2px; width: 268px; max-width: 100%; padding: 6px 6px 8px; border: 1px solid #cfe2f1; border-radius: 12px; background: #f6fafd; }
.xf-key-cap { direction: rtl; display: flex; align-items: baseline; justify-content: space-between; gap: 8px; margin: 0 2px 4px; padding: 2px 4px 7px; border-bottom: 1.5px solid #cfe2f1; }
.xf-key-cap b { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; font-weight: 900; color: #1f5f8f; }
.xf-key-cap small { flex: none; font-size: 11px; font-weight: 800; color: #5d7f99; direction: rtl; }
/* مثلِ پاسخبرگِ کاغذی: شمارهٔ سؤال سمتِ چپ، بعد گزینه‌های ۱ تا ۴ از چپ به راست. */
.xf-key-row, .xf-row { direction: ltr; }
.xf-key-row { display: flex; align-items: center; gap: 6px; padding: 2px 4px; border: 1px solid transparent; border-radius: 8px; background: transparent; }
.xf-key-row.filled { background: transparent; }
.xf-key-row.cancelled { background: #f3efea; }
.xf-key-row.cancelled .xf-key-opts { opacity: .35; }
.xf-key-row.current { border-color: var(--orange); background: #fff; box-shadow: 0 0 0 2px #ffe3d0; }
.xf-key-no { min-width: 34px; height: 26px; border: 0; border-radius: 8px; background: transparent; text-align: start; font-variant-numeric: tabular-nums; font: inherit; font-size: 12px; font-weight: 900; color: var(--ink); cursor: pointer; }
.xf-key-opts, .xf-opts { display: inline-flex; gap: 5px; direction: ltr; }
.xf-b { display: inline-grid; place-items: center; width: 36px; height: 24px; border: 1.5px solid #3b8fcf; border-radius: 6px; background: #eaf4fc; font: inherit; font-size: 12px; font-weight: 800; color: #1f6aa5; cursor: pointer; transition: background .15s, border-color .15s, color .15s; }
.xf-b:hover:not(:disabled) { border-color: #1f6aa5; background: #d6eafa; }
.xf-b.on { background: #2f97dd; border-color: #1f78bd; color: #fff; }
.xf-key-row .xf-b.on:hover { background: #2589cc; }
.xf-b:disabled { opacity: .45; cursor: not-allowed; }
.xf-key-x { width: 26px; height: 24px; margin-inline-start: auto; border: 1px dashed #d9cfc1; border-radius: 8px; background: transparent; color: var(--muted); font-size: 16px; line-height: 1; cursor: pointer; }
.xf-key-x.on { border-style: solid; border-color: var(--red); background: var(--red-soft); color: var(--red); }
.xf-discard-note { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 20px; border-top: 1px solid var(--line); color: var(--ink); background: var(--orange-soft); font-size: 12.5px; line-height: 1.8; }
.xf-key-preview { height: min(65vh, 720px); margin-top: 12px; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.xf-recovery-list { display: grid; gap: 10px; margin-top: 16px; }
.xf-recovery-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 12px; border: 1px solid var(--line); border-radius: 12px; }
.xf-recovery-row b { overflow-wrap: anywhere; }
.xf-recovery-row button { margin-inline-start: auto; }
.xf-numbering label:has(input:focus-visible) { outline: 2px solid var(--orange); outline-offset: 3px; }
.xf-sheet:focus-visible { outline: 2px solid var(--orange); outline-offset: -2px; }
.xf-no:disabled { opacity: .5; cursor: not-allowed; }
/* اسکنِ پاسخبرگِ کلید */
.xf-key-scan { display: grid; gap: 10px; padding: 12px; border: 1px solid #ece5da; border-radius: 14px; background: #fff; }
.xf-key-scan-head { display: flex; align-items: flex-start; gap: 10px; }
.xf-key-scan-head > .ui-icon { flex: none; width: 22px; height: 22px; margin-top: 2px; color: var(--orange); }
.xf-key-scan-head > span { display: grid; gap: 3px; }
.xf-key-scan-head b { font-size: 13px; }
.xf-key-scan-head small { font-size: 11.5px; color: var(--muted); line-height: 1.8; }
.xf-scan-status { margin: 0; font-size: 12.5px; font-weight: 700; color: var(--muted); }
.xf-scan-report { display: grid; gap: 8px; padding: 10px 12px; border: 1px solid #bfe5dc; border-radius: 12px; background: #f2fbf8; font-size: 12.5px; line-height: 1.9; }
.xf-scan-report.has-issues { border-color: #f0d9a8; background: #fffaf0; }
.xf-scan-report > p { display: flex; align-items: flex-start; gap: 6px; margin: 0; }
.xf-scan-report > p > .ui-icon { flex: none; margin-top: 4px; color: var(--teal); }
.xf-scan-report ul { display: grid; gap: 3px; margin: 0; padding-inline-start: 20px; }
.xf-scan-report li.is-unclear b { color: #a2650f; }
.xf-scan-report li.is-changed b { color: var(--orange); }
.xf-scan-report > .ghost-button { justify-self: start; }
.xf-key-row.scan-unclear { border-color: #e9b44c; background: #fff7e6; box-shadow: inset 0 0 0 1px #e9b44c; }
.xf-key-row.scan-blank { border-style: dashed; border-color: #d6c7b2; }
.xf-key-row.scan-changed .xf-key-no { box-shadow: inset 0 -3px 0 var(--orange); }
.xf-key-row.scan-unclear.current, .xf-key-row.scan-blank.current { border-color: var(--orange); }
.xf-answer-file { margin-top: 16px; padding-top: 14px; border-top: 1px dashed #e6ded2; }
.xf-answer-file h4 { display: inline-flex; align-items: center; gap: 6px; margin: 0 0 4px; font-size: 13.5px; }
/* پیش‌نمایش و مرور */
.xf-preview { display: grid; grid-template-columns: minmax(0, 1fr) 250px; gap: 14px; align-items: start; }
.xf-preview-main { min-width: 0; height: min(70vh, 760px); border: 1px solid #ece4d7; border-radius: 16px; background: #f3eee6; overflow: hidden; }
.xf-preview-side { display: grid; gap: 8px; padding: 12px; border: 1px solid #ece4d7; border-radius: 16px; background: #fff; position: sticky; top: 10px; }
.xf-preview-side h4 { margin: 4px 0 0; font-size: 12.5px; color: var(--muted); }
.xf-prev-bk { display: grid; gap: 4px; padding: 8px 10px; border-radius: 12px; background: #fbf8f3; font-size: 12px; }
.xf-prev-bk span em { font-style: normal; color: var(--teal); font-weight: 800; }
.xf-prev-bk small { color: var(--muted); }
.xf-preview-sheet { display: grid; gap: 6px; padding: 10px 8px 8px; border: 1px solid #e6dccd; border-top: 3px solid var(--orange); border-radius: 14px; background: #fffdf9; }
.xf-omr-head { display: flex; align-items: baseline; justify-content: space-between; gap: 6px; padding: 0 4px 2px; }
.xf-omr-head b { font-size: 12.5px; font-weight: 900; color: var(--ink); }
.xf-omr-head small { font-size: 10px; font-weight: 700; color: var(--muted); }
.xf-omr-more { justify-self: center; font-size: 11px; font-weight: 700; color: var(--muted); }
.xf-preview-sheet .xf-row { cursor: default; }
.xf-preview-sheet .xf-b { width: 28px; height: 19px; font-size: 10px; font-style: normal; cursor: default; }
.xf-checklist { display: grid; gap: 6px; margin: 10px 0 14px; padding: 0; list-style: none; }
.xf-checklist li { display: flex; align-items: center; gap: 7px; font-size: 13px; font-weight: 700; }
.xf-checklist li.ok .ui-icon { color: var(--teal); }
.xf-checklist li.todo .ui-icon { color: var(--yellow); }
.xf-key-chip { border: 0; cursor: pointer; background: #fff3df; color: #a2650f; font: inherit; }
.xf-key-chip.ok { background: var(--teal-soft); color: #127566; }
/* نمایشگرِ فایل */
.xf-viewer { display: flex; flex-direction: column; min-height: 0; height: 100%; }
.xf-vtools { flex: none; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 8px 10px; border-bottom: 1px solid #ebe3d6; background: #fffdf9; }
.xf-vtitle { font-size: 13px; }
.xf-vtabs, .xf-vchips { display: flex; flex-wrap: wrap; gap: 6px; }
.xf-vtabs button, .xf-vchips button { min-height: 30px; padding: 0 11px; border: 1px solid #e3dbcd; border-radius: 999px; background: #fff; font: inherit; font-size: 12px; font-weight: 800; color: var(--ink); cursor: pointer; }
.xf-vtabs button.on { background: var(--ink); border-color: var(--ink); color: #fff; }
.xf-vtabs button:disabled { opacity: .5; cursor: not-allowed; }
.xf-vchips button { border-style: dashed; color: #8a5a22; }
.xf-vchips button:hover { border-color: var(--orange); color: var(--orange); }
.xf-vspacer { flex: 1; }
.xf-vzoom { display: inline-flex; align-items: center; gap: 4px; padding: 2px; border: 1px solid #e3dbcd; border-radius: 999px; background: #fff; }
.xf-vzoom button { width: 28px; height: 28px; border: 0; border-radius: 50%; background: #f4efe7; font-size: 16px; font-weight: 900; cursor: pointer; color: var(--ink); }
.xf-vzoom b { min-width: 44px; text-align: center; font-size: 12px; }
.xf-vpage { font-size: 11.5px; font-weight: 800; color: var(--muted); white-space: nowrap; }
.xf-vdl { min-height: 32px; padding: 0 12px; font-size: 12px; text-decoration: none; }
.xf-vpages { flex: 1; min-height: 0; overflow: auto; overscroll-behavior: contain; display: flex; flex-direction: column; align-items: flex-start; gap: 14px; padding: 14px; background: #ece6dc; }
/* flex: none — صفحه‌ای که overflow:hidden دارد در ستونِ ارتفاع‌ثابت کوچک و بریده می‌شد */
.xf-page { position: relative; flex: none; width: var(--xf-zoom, 100%); max-width: none; margin: 0 auto; border-radius: 6px; background: #fff; box-shadow: 0 6px 18px rgba(40, 32, 22, .12); overflow: hidden; }
.xf-page img { display: block; width: 100%; height: auto; min-height: 240px; background: #fff; -webkit-user-drag: none; user-select: none; }
.xf-image-error { position: absolute; inset: 0; z-index: 2; margin: 0; background: var(--panel); justify-content: center; }
.xf-page figcaption { position: absolute; inset-block-end: 6px; inset-inline-start: 8px; padding: 2px 8px; border-radius: 999px; background: rgba(37, 35, 31, .55); color: #fff; font-size: 10.5px; font-weight: 700; pointer-events: none; }
.xf-wm { position: absolute; inset: 0; display: grid; align-content: space-evenly; justify-items: center; pointer-events: none; overflow: hidden; }
.xf-wm i { font-style: normal; font-size: clamp(14px, 3.2vw, 30px); font-weight: 900; color: rgba(40, 32, 22, .07); transform: rotate(-24deg); white-space: nowrap; user-select: none; }
.xf-vstate { display: grid; justify-items: center; gap: 8px; margin: auto 0; padding: 40px 16px; color: var(--muted); font-size: 13px; text-align: center; }
.xf-vstate.error .ui-icon { width: 28px; height: 28px; color: var(--orange); }
.xf-viewer.compact .xf-vpages { padding: 10px; }
/* خودِ PDF در نمایشگرِ مرورگر: قاب تمام‌قد، ابزارِ بزرگ‌نمایی و شمارهٔ صفحه مالِ خودِ نمایشگر است. */
.xf-viewer.is-native .xf-vpages { padding: 0; overflow: hidden; }
.xf-viewer.is-native :is(.xf-vzoom, .xf-vpage) { display: none; }
.xf-vnative { position: relative; flex: 1; align-self: stretch; min-height: 0; display: flex; }
.xf-vnative iframe { flex: 1; width: 100%; height: 100%; min-height: 60vh; border: 0; background: #fff; }
.xf-viewer-modal { height: min(78vh, 900px); padding: 0 !important; display: flex; flex-direction: column; }
.xf-viewer-modal .xf-viewer { flex: 1; }
.xf-report-files [data-xf-report-viewer], .xf-report-files[data-xf-results-viewer] { height: min(80vh, 980px); border: 1px solid #ece4d7; border-radius: 16px; overflow: hidden; }
/* اجراکننده در حالت فایل */
.exam-runner.er-file-mode .er-body { gap: 14px; padding: 12px 14px; }
.exam-runner.er-file-mode .er-main.xf-main { display: flex; flex-direction: column; padding: 0; overflow: hidden; border: 1px solid #e8dfd1; border-radius: 16px; background: #fff; }
.exam-runner.er-file-mode .er-side.xf-side { width: 300px; gap: 10px; padding: 12px; border: 1px solid #e8dfd1; border-radius: 16px; background: #fffdf9; }
.xf-top .xf-finish { min-height: 40px; }
.xf-untimed { display: inline-flex; align-items: center; gap: 5px; margin-inline-start: auto; font-size: 12px; font-weight: 800; color: var(--muted); }
.xf-side-head { flex: none; display: flex; align-items: center; gap: 8px; }
.xf-side-head b { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; }
.xf-side-progress { padding: 3px 9px; border-radius: 999px; background: var(--teal-soft); color: #127566; font-size: 11.5px; font-weight: 800; }
.xf-side-timer { margin-inline-start: auto; padding: 4px 10px; border-radius: 10px; background: #2b2721; color: #fff; font-size: 13px; font-weight: 900; direction: ltr; font-variant-numeric: tabular-nums; }
.xf-side-timer.danger { background: #c24a3a; }
.xf-sheet { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; display: grid; align-content: start; gap: 10px; padding: 2px; outline: none; }
.xf-sheet-bk h4 { display: flex; align-items: center; gap: 6px; margin: 0 0 6px; font-size: 12.5px; color: var(--ink); }
.xf-sheet-bk.locked { opacity: .55; }
.xf-sheet-ls h5 { position: sticky; top: 0; z-index: 1; margin: 0; padding: 6px 4px; background: #fffdf9; font-size: 12px; }
.xf-sheet-ls h5 small { color: var(--muted); font-weight: 700; }
.xf-row { display: flex; align-items: center; gap: 8px; padding: 3px 6px; border-radius: 8px; }
/* کادرِ ده‌تایی مثلِ برگهٔ کاغذی؛ ردیف‌های زوج کمی سایه دارند تا چشم ردیف را گم نکند. */
.xf-grp { display: grid; gap: 1px; padding: 4px; border: 1px solid #cfe2f1; border-radius: 12px; background: #f6fafd; }
.xf-grp + .xf-grp { margin-top: 6px; }
.xf-grp > .xf-row:nth-child(even):not(.current) { background: #edf5fb; }
.xf-row.current { background: var(--orange-soft); box-shadow: inset 0 0 0 1px #ffc9a5; }
.xf-no { display: inline-grid; place-items: center; flex: none; min-width: 32px; height: 26px; padding: 0 2px; border: 0; border-radius: 7px; background: transparent; font: inherit; font-size: 12.5px; font-weight: 900; color: var(--ink); cursor: pointer; font-variant-numeric: tabular-nums; }
.xf-row.answered .xf-no { color: var(--teal); }
.xf-doubt { width: 26px; height: 26px; margin-inline-start: auto; border: 1px dashed #d6ccbd; border-radius: 50%; background: transparent; font: inherit; font-size: 12px; font-weight: 900; color: #b1a796; cursor: pointer; }
.xf-doubt.on { border-style: solid; border-color: var(--purple); background: var(--purple-soft); color: var(--purple); }
.xf-side-foot { flex: none; display: grid; gap: 6px; }
.xf-side-foot .ghost-button { justify-content: center; }
.xf-side-hint { margin: 0; font-size: 11px; line-height: 1.8; color: var(--muted); }
@media (max-width: 980px) {
  .xf-preview { grid-template-columns: 1fr; }
  .xf-preview-side { position: static; }
}
@media (max-width: 760px) {
  .xf-ctx-row { grid-template-columns: 1fr; }
  .xf-lesson-row { grid-template-columns: repeat(4, minmax(0, 1fr)); align-items: end; }
  .xf-lesson-row .ew-ls-ord { display: none; }
  .xf-f-name, .xf-f-topics { grid-column: 1 / -1; }
  .xf-count { grid-column: span 2; justify-self: start; }
  .xf-lesson-row > .ew-mini { justify-self: end; }
  .xf-key-block { width: 100%; }
  .xf-key-grid { max-height: 60vh; }
  .xf-vtools { gap: 6px; padding: 6px 8px; }
  .xf-vchips { flex-wrap: nowrap; overflow-x: auto; max-width: 100%; }
  .xf-vpages { padding: 8px; gap: 8px; }
}
@media (max-width: 860px), (max-height: 520px) {
  /* گوشی: فایل تمام‌صفحه، پاسخبرگ برگهٔ پایین‌آمدنی (همان پوستهٔ اجراکننده) */
  .exam-runner.er-file-mode .er-body { padding: 0; gap: 0; }
  .exam-runner.er-file-mode .er-main.xf-main { border: 0; border-radius: 0; padding: 0; }
  /* کشو تا ۶۰٪ بالا می‌آید تا هنگامِ پاسخ‌دادن، بالای صفحهٔ فایل (همان سؤال) دیده بماند */
  .exam-runner.er-file-mode .er-side.xf-side { width: auto; max-height: 60dvh; padding: 4px 12px calc(12px + env(safe-area-inset-bottom, 0px)); border: 0; border-radius: 22px 22px 0 0; background: #f6f1e8; }
  .exam-runner.er-file-mode .er-side.xf-side .xf-sheet { overflow-y: auto; max-height: 38dvh; }
  .exam-runner.er-file-mode .er-sheet-backdrop { background: rgba(28, 22, 16, .18); }
  .xf-vdl { min-height: 30px; padding: 0 9px; font-size: 11px; }
  .xf-vzoom button { width: 26px; height: 26px; }
  .exam-runner.er-file-mode .er-sheet-toggle { order: 9; }
  .xf-top .xf-finish { min-height: 36px; padding-inline: 10px; font-size: 12.5px; }
  .xf-top .xf-finish .ui-icon { display: none; }
  .xf-untimed { display: none; }
  .xf-b { width: 42px; height: 30px; font-size: 13px; }
}
@media (max-width: 600px) {
  .exam-runner.er-file-mode .xf-top { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 6px; }
  .exam-runner.er-file-mode .xf-top .er-title { grid-column: 1 / -1; display: flex; align-items: baseline; gap: 8px; width: 100%; }
  .exam-runner.er-file-mode .xf-top .er-title strong { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .exam-runner.er-file-mode .xf-top .er-title small { flex: none; white-space: nowrap; }
  .exam-runner.er-file-mode .xf-top .er-timer-mini { grid-column: 1; grid-row: 2; justify-self: start; padding-inline: 8px; font-size: 12px; }
  .exam-runner.er-file-mode .xf-top .er-top-actions { grid-column: 2; grid-row: 2; }
  .exam-runner.er-file-mode .xf-top .er-sheet-toggle { grid-column: 3; grid-row: 2; white-space: nowrap; }
  .exam-runner.er-file-mode .xf-top .xf-finish { white-space: nowrap; }
  .exam-runner.er-file-mode .xf-top .er-net-chip { grid-column: 1 / -1; }
}
.xf-source-cards .ew-type.is-locked { opacity: .6; cursor: not-allowed; }

/* Payment components come from the recorded settlement; missing evidence stays visible. */
.finance-bar .payment-bar-unknown { fill: #94a3b8; filter: none; stroke: none; }
.finance-chart-svg[data-finance-monthly-chart] .finance-bar:not(.is-active) .chart-tooltip { opacity: 0; }
.reward-legend .rl-swatch.unknown { background: #94a3b8; }
.pm-breakdown-details { margin-top: 6px; max-width: 100%; font-size: 11px; white-space: normal; }
.pm-breakdown-details > div, .pm-breakdown-details:not(details) { display: grid; gap: 5px; }
.pm-breakdown-details summary { cursor: pointer; }
.pm-breakdown-details small { overflow-wrap: anywhere; }
.pm-breakdown-inputs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.pm-breakdown-error { color: var(--red, #c43b35); white-space: normal; }
@media (max-width: 600px) {
  .pm-breakdown-inputs { grid-template-columns: minmax(0, 1fr); }
}

/* حساب مستقل پشتیبانی و حقوق ثابت */
.am-support-salary { background: var(--teal-soft); border-color: #cfeae4; }
.am-support-salary[hidden], .am-block[hidden] { display: none; }
.am-support-salary .form-grid { margin-top: 14px; }
.ss-summary { padding: 20px 22px; }
.ss-summary-head { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; }
.ss-summary h2 { display: flex; align-items: center; gap: 8px; margin: 0; font-size: 14px; }
.ss-summary h2 svg { color: var(--teal); }
.ss-state { padding: 5px 10px; border-radius: 8px; background: var(--teal-soft); color: #0f7365; font-size: 10px; font-weight: 750; }
.ss-state.is-paused { background: var(--panel-soft); color: var(--muted); }
.ss-summary-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; margin: 22px 0 18px; }
.ss-summary-grid > div { display: grid; gap: 8px; min-width: 0; }
.ss-summary-grid dt { color: var(--muted); font-size: 11px; }
.ss-summary-grid dd { margin: 0; font-size: 14px; font-weight: 750; overflow-wrap: anywhere; }
.ss-summary > p { margin-bottom: 0; }
.ss-staff-list { display: grid; gap: 10px; padding: 0 20px 18px; }
.ss-staff-card { display: flex; align-items: center; flex-wrap: wrap; gap: 14px; padding: 14px; border: 1px solid var(--line); border-radius: 12px; }
.ss-staff-person { display: flex; align-items: center; gap: 9px; flex: 1; min-width: 160px; }
.ss-staff-person > div, .ss-staff-pay { display: grid; gap: 5px; }
.ss-staff-card strong { font-size: 12px; }
.ss-staff-card small { color: var(--muted); font-size: 10px; }
@media (max-width: 600px) {
  .ss-summary { padding: 18px 16px; }
  .ss-summary-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 12px; }
  .ss-summary-grid dd { font-size: 13px; }
  .ss-staff-list { padding-inline: 14px; }
  .ss-staff-card > button { width: 100%; justify-content: center; }
  .ss-staff .panel-header { flex-wrap: wrap; gap: 12px; }
}

/* جزئیات گزارش مالیِ بازشده از کانال تلگرام */
.modal.telegram-financial-modal { width: min(760px, calc(100vw - 40px)); border-radius: 22px; }
.telegram-financial-modal .modal-head { gap: 14px; padding: 18px 24px; }
.telegram-financial-modal .modal-head h2 { font-size: 16px; }
.telegram-financial-modal .modal-close { flex: none; }
.telegram-financial-modal .tfr-body { display: grid; gap: 18px; padding: 22px 24px 14px; }
.tfr-summary { padding: 20px; border: 1px solid var(--line); background: var(--panel-soft); border-radius: 16px; }
.tfr-summary-top { display: flex; align-items: center; justify-content: space-between; gap: 18px; }
.tfr-person { display: grid; gap: 4px; min-width: 0; }
.tfr-person > span, .tfr-amount-label { color: var(--muted); font-size: 11px; }
.tfr-person > strong { font-size: 16px; overflow-wrap: anywhere; }
.tfr-summary .pm-status { flex: none; margin: 0; padding: 7px 11px; border-radius: 9px; }
.tfr-amount-label { margin-top: 22px; }
.tfr-amount { display: flex; align-items: baseline; flex-wrap: wrap; gap: 8px; margin-top: 4px; }
.tfr-amount > strong { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: clamp(25px, 5vw, 34px); line-height: 1.4; letter-spacing: -.7px; overflow-wrap: anywhere; min-width: 0; }
.tfr-amount > span { font-size: 12px; color: var(--muted); }
.tfr-copy { display: inline-flex; align-items: center; justify-content: center; flex: none; gap: 5px; min-height: 36px; padding: 6px 9px; border: 1px solid var(--line); background: var(--panel); color: var(--ink); border-radius: 9px; cursor: pointer; font-family: inherit; font-size: 10px; white-space: nowrap; }
.tfr-copy svg { width: 14px; height: 14px; }
.tfr-copy:hover { background: var(--teal-soft); border-color: var(--teal); }
.tfr-copy:focus-visible { outline: 2px solid var(--teal); outline-offset: 3px; }
.tfr-amount > .tfr-copy { align-self: center; margin-inline-start: auto; }
.tfr-sections { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 20px; }
.tfr-section { min-width: 0; }
.tfr-section h3 { margin: 0 0 12px; padding-bottom: 10px; border-bottom: 1px solid var(--line); font-size: 12px; }
.tfr-section dl { display: grid; gap: 16px; margin: 0; }
.tfr-field { display: grid; gap: 5px; min-width: 0; }
.tfr-field dt { color: var(--muted); font-size: 10px; }
.tfr-field dd { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: 0; min-width: 0; font-size: 12px; font-weight: 650; }
.tfr-field bdi { min-width: 0; overflow-wrap: anywhere; white-space: pre-wrap; }
.tfr-field .tfr-number { font-variant-numeric: tabular-nums; font-size: 11px; }
.tfr-field .tfr-copy { min-height: 32px; padding: 5px 7px; }
.tfr-notes { padding: 14px; border: 1px solid var(--line); border-radius: 12px; }
.telegram-financial-modal .pm-breakdown-details { margin: 0; padding: 12px 0 0; border-top: 1px solid var(--line); }
.telegram-financial-modal .pm-breakdown-details > div { padding-top: 10px; }
.tfr-reference { font-size: 10px; color: var(--muted); }
.tfr-reference summary { cursor: pointer; }
.tfr-reference bdi { display: block; margin-top: 8px; overflow-wrap: anywhere; user-select: all; }
.tfr-copy-status { min-height: 16px; margin: -6px 0 0; color: #0f7365; font-size: 11px; }
.tfr-copy-status.is-error { color: var(--red); }
.telegram-financial-modal .modal-footer { flex-wrap: wrap; gap: 8px; padding: 14px 24px; }
.telegram-financial-modal .modal-footer > .ghost-button { margin-inline-end: auto; }
@media (max-width: 600px) {
  .modal-backdrop:has(.telegram-financial-modal) { padding: 12px; }
  .modal.telegram-financial-modal { width: calc(100vw - 24px); height: auto; max-height: calc(100dvh - 24px); border-radius: 18px; }
  .telegram-financial-modal .modal-head { padding: 14px 16px; }
  .telegram-financial-modal .modal-head h2 { font-size: 14px; }
  .telegram-financial-modal .tfr-body { padding: 16px; gap: 18px; }
  .tfr-summary { padding: 16px; }
  .tfr-summary-top { flex-wrap: wrap; gap: 12px; }
  .tfr-summary .pm-status { font-size: 10px; }
  .tfr-person > strong { font-size: 14px; }
  .tfr-sections { grid-template-columns: minmax(0, 1fr); gap: 22px; }
  .tfr-section dl { gap: 13px; }
  .tfr-field .tfr-number { font-size: 12px; }
  .telegram-financial-modal .modal-footer { padding: 12px 16px; }
  .telegram-financial-modal .modal-footer > .primary-button,
  .telegram-financial-modal .modal-footer > .secondary-button { flex: 1; justify-content: center; }
}

/* h1ِ سرور برای خزندهٔ بی‌JS (server.render_seo_into_index). پنهانِ دیداری، نه
   display:none: صفحه‌خوان هم تا رسیدنِ h1ِ واقعیِ صفحه همین را می‌خواند. app.js
   در renderPublicLanding/renderPublicPlan برش می‌دارد. */
.mk-seo-h1 {
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* ═════════════ پیش‌آزمون (آزمون‌ساز ← پیش‌آزمون، و منوی ادمین‌ها) ═════════════ */
.pe-wrap { display: grid; gap: 16px; }
.pe-card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; box-shadow: var(--shadow); display: grid; gap: 12px; min-width: 0; }
.pe-toolbar, .pe-actions, .pe-card-foot, .pe-dots, .pe-people, .pe-topics, .pe-deadlines, .pe-pick-topics { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.pe-toolbar .seg em { font-style: normal; font-size: 11px; opacity: .75; }
.pe-grow { flex: 1 1 auto; }
.pe-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 14px; }
.pe-row-card { cursor: pointer; transition: transform var(--motion-fast, 140ms), box-shadow var(--motion-fast, 140ms); }
.pe-row-card:hover, .pe-row-card:focus-visible { transform: translateY(-2px); box-shadow: var(--lift-shadow, var(--shadow)); outline: none; }
.pe-card-head { display: flex; align-items: center; gap: 12px; min-width: 0; flex-wrap: wrap; }
.pe-card-title { display: grid; gap: 3px; min-width: 0; flex: 1 1 200px; }
.pe-card-title b { font-size: 15.5px; color: var(--ink); overflow-wrap: anywhere; }
.pe-card-title small { color: var(--muted); font-size: 12.5px; line-height: 1.8; }
.pe-logo { width: 42px; height: 42px; border-radius: 12px; flex: 0 0 auto; display: grid; place-items: center; overflow: hidden; }
.pe-logo-icon { background: var(--orange-soft); color: var(--orange); }
.pe-logo-icon .ui-icon, .pe-logo-icon svg { width: 22px; height: 22px; }
.pe-phase, .pe-status { font-size: 12px; font-weight: 700; padding: 4px 10px; border-radius: 999px; white-space: nowrap; background: var(--panel-soft); color: var(--muted); border: 1px solid var(--line); }
.pe-phase.phase-collecting, .pe-status.open { background: var(--blue-soft); color: var(--blue); border-color: transparent; }
.pe-phase.phase-ready, .pe-status.submitted { background: var(--yellow-soft); color: #9a6a00; border-color: transparent; }
.pe-phase.phase-published, .pe-status.approved { background: var(--teal-soft); color: var(--teal); border-color: transparent; }
.pe-progress-line { display: grid; gap: 6px; }
.pe-progress-line small { color: var(--muted); font-size: 12.5px; }
.pe-progress-line small b { color: var(--ink); }
.pe-bar { display: block; height: 8px; border-radius: 99px; background: var(--panel-soft); border: 1px solid var(--line); overflow: hidden; }
.pe-progress-line.big .pe-bar { height: 11px; }
.pe-bar i { display: block; height: 100%; background: var(--orange); border-radius: inherit; transition: width var(--motion-med, 260ms); }
.pe-bar.full i { background: var(--teal); }
.pe-dot { font-size: 11.5px; padding: 3px 9px; border-radius: 999px; background: var(--blue-soft); color: var(--blue); }
.pe-dot.submitted { background: var(--yellow-soft); color: #9a6a00; }
.pe-dot.approved { background: var(--teal-soft); color: var(--teal); }
.pe-chip { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; padding: 4px 10px; border-radius: 999px; background: var(--panel-soft); color: var(--muted); border: 1px solid var(--line); }
.pe-chip svg, .pe-chip .ui-icon { width: 14px; height: 14px; }
.pe-chip.is-soon { background: var(--yellow-soft); color: #9a6a00; border-color: transparent; }
.pe-chip.is-late { background: var(--red-soft); color: var(--red); border-color: transparent; }
.pe-chip.is-ok { background: var(--teal-soft); color: var(--teal); border-color: transparent; }
.pe-steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; }
.pe-steps > div { display: flex; gap: 10px; align-items: flex-start; background: var(--panel); border: 1px dashed var(--line); border-radius: 14px; padding: 14px; }
.pe-steps b { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: var(--orange-soft); color: var(--orange); flex: 0 0 auto; }
.pe-steps span { display: grid; gap: 4px; font-size: 12.5px; color: var(--muted); line-height: 1.9; }
.pe-steps strong { color: var(--ink); font-size: 13.5px; }
.pe-empty { text-align: center; padding: 44px 16px; display: grid; justify-items: center; gap: 10px; color: var(--muted); background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); }
.pe-empty h3 { color: var(--ink); margin: 0; font-size: 16px; }
.pe-back { justify-self: start; display: inline-flex; align-items: center; gap: 4px; background: none; border: 0; color: var(--muted); cursor: pointer; font: inherit; font-size: 13px; padding: 4px 0; }
.pe-back:hover { color: var(--orange); }
.pe-note { display: flex; gap: 8px; align-items: flex-start; margin: 0; font-size: 12.8px; line-height: 1.9; padding: 9px 12px; border-radius: 12px; background: var(--blue-soft); color: var(--ink); white-space: pre-line; }
.pe-note svg, .pe-note .ui-icon { width: 16px; height: 16px; flex: 0 0 auto; margin-top: 4px; color: var(--blue); }
.pe-note.is-warn { background: var(--red-soft); }
.pe-note.is-warn svg { color: var(--red); }
.pe-note.is-soft { background: var(--panel-soft); }
.pe-note.is-soft svg { color: var(--yellow); }
.pe-hint { margin: 0; font-size: 12.5px; color: #9a6a00; display: flex; gap: 6px; align-items: center; line-height: 1.9; }
.pe-hint.subtle { color: var(--muted); }
.pe-hint svg { width: 15px; height: 15px; flex: 0 0 auto; }
.pe-booklet { display: grid; gap: 10px; }
.pe-booklet > h3 { margin: 4px 2px 0; font-size: 15px; display: flex; align-items: center; gap: 8px; color: var(--ink); }
.pe-booklet > h3 small { color: var(--muted); font-weight: 400; font-size: 12px; }
.pe-booklet > h3 svg { width: 18px; height: 18px; color: var(--orange); }
.pe-lessons { display: grid; gap: 12px; }
.pe-lesson { background: var(--panel); border: 1px solid var(--line); border-inline-start: 4px solid var(--blue); border-radius: 14px; padding: 14px 16px; display: grid; gap: 10px; min-width: 0; }
.pe-lesson.status-submitted { border-inline-start-color: var(--yellow); }
.pe-lesson.status-approved { border-inline-start-color: var(--teal); }
.pe-lesson.is-other { opacity: .78; border-inline-start-color: var(--line); }
.pe-task-group .pe-lesson { box-shadow: none; }
.pe-ls-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.pe-ls-head b { font-size: 15px; color: var(--ink); }
.pe-ls-head small { color: var(--muted); font-size: 12px; flex: 1 1 auto; }
.pe-topics-label { font-size: 12px; color: var(--muted); }
.pe-topic { display: inline-flex; align-items: center; gap: 6px; font: inherit; font-size: 12px; padding: 4px 10px; border-radius: 999px; background: var(--purple-soft); color: var(--purple); border: 1px solid transparent; max-width: 100%; }
.pe-topic em { font-style: normal; font-weight: 700; font-size: 11px; background: var(--panel); border-radius: 99px; padding: 0 6px; color: var(--ink); }
.pe-topic.done { background: var(--teal-soft); color: var(--teal); }
.pe-topic.pick { cursor: pointer; }
.pe-topic.pick.on { border-color: currentColor; box-shadow: 0 0 0 2px var(--panel) inset; }
.pe-topic.edit input { width: 46px; padding: 2px 6px; border-radius: 8px; border: 1px solid var(--line); background: var(--panel); color: var(--ink); font: inherit; font-size: 12px; text-align: center; }
.pe-topic.edit button { border: 0; background: none; padding: 0; color: inherit; cursor: pointer; display: grid; }
.pe-topic.edit button svg { width: 13px; height: 13px; }
.pe-person { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; padding: 3px 10px; border-radius: 999px; background: var(--orange-soft); color: var(--ink); }
.pe-person svg { width: 13px; height: 13px; color: var(--orange); }
.pe-person.none { background: var(--panel-soft); color: var(--muted); }
.pe-person button { border: 0; background: none; padding: 0; cursor: pointer; color: var(--muted); display: grid; }
.pe-qlist { display: grid; gap: 12px; }
/* هر دفترچه یک ردیف: کارتِ فشردهٔ هر درس کنارِ هم */
.pe-lessons.pe-row { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(250px, 1fr); gap: 12px; overflow-x: auto; padding: 2px 2px 8px; scroll-snap-type: x proximity; }
.pe-row > .pe-lesson { scroll-snap-align: start; padding: 12px 14px; gap: 8px; align-content: start; }
.pe-row > .pe-lesson.is-open { box-shadow: 0 0 0 2px var(--orange) inset; }
.pe-row .pe-ls-head { gap: 6px; }
.pe-row .pe-ls-head small { flex-basis: 100%; order: 3; }
.pe-row .pe-note { font-size: 12px; padding: 7px 10px; }
.pe-row .pe-actions { gap: 6px; }
.pe-row .pe-actions button { padding: 6px 10px; font-size: 12px; }
.pe-row .pe-actions .primary-button:first-child { flex: 1 1 100%; justify-content: center; }
.pe-qpanel { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; display: grid; gap: 10px; }
.pe-qpanel-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.pe-qpanel-head b { display: inline-flex; align-items: center; gap: 6px; color: var(--ink); }
.pe-qpanel-head b svg { width: 16px; height: 16px; color: var(--orange); }
.pe-qpanel-head small { color: var(--muted); }
.pe-q { display: grid; gap: 6px; min-width: 0; }
.pe-q-tools { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 12px; }
.pe-q-num { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; background: var(--panel-soft); border: 1px solid var(--line); font-weight: 700; }
.pe-q-code { color: var(--muted); font-family: ui-monospace, monospace; }
.pe-wrap .ghost-button.danger, .pe-ed-tools .danger { color: var(--red); }
/* ویرایشگر */
.pe-sec-title { margin: 0; display: flex; align-items: center; gap: 8px; font-size: 16px; color: var(--ink); }
.pe-sec-title svg { width: 20px; height: 20px; color: var(--orange); }
.pe-ed-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.pe-ed-grid .span2 { grid-column: span 2; }
.pe-ed-grid .span3 { grid-column: span 3; }
.pe-ed-field { display: grid; gap: 6px; font-size: 12.5px; color: var(--muted); min-width: 0; }
.pe-ed-field input, .pe-ed-field select, .pe-ed-field textarea, .pe-ed-note, .pe-ed-people select, .pe-ed-bk-head input { width: 100%; min-width: 0; box-sizing: border-box; padding: 9px 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--panel); color: var(--ink); font: inherit; font-size: 13.5px; }
.pe-ed-field textarea { resize: vertical; line-height: 1.9; }
.pe-ed-field .required { color: var(--red); font-style: normal; }
.pe-ed-btn button { width: 100%; justify-content: center; white-space: nowrap; }
.pe-dl { font: inherit; font-size: 12.5px; padding: 6px 12px; border-radius: 999px; border: 1px solid var(--line); background: var(--panel-soft); color: var(--ink); cursor: pointer; }
.pe-dl:hover { border-color: var(--orange); color: var(--orange); }
.pe-dl-now { display: inline-flex; align-items: center; gap: 5px; color: var(--ink); font-size: 12.5px; }
.pe-dl-now svg { width: 14px; height: 14px; color: var(--orange); }
.pe-check { display: flex; align-items: flex-start; gap: 8px; font-size: 12.8px; color: var(--ink); line-height: 1.9; cursor: pointer; }
.pe-check input { margin-top: 6px; accent-color: var(--orange); }
.pe-check.small { font-size: 12px; color: var(--muted); }
.pe-ed-booklet { gap: 14px; }
.pe-ed-bk-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.pe-ed-bk-head input { flex: 1 1 200px; width: auto; font-weight: 700; }
.pe-ed-bk-head small { color: var(--muted); }
.pe-ed-lesson { display: grid; gap: 10px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 14px; background: var(--panel-soft); }
.pe-ed-row { display: flex; align-items: flex-end; gap: 10px; flex-wrap: wrap; }
.pe-ed-row .pe-ed-field { flex: 0 1 110px; }
.pe-ed-row .pe-ed-field.grow { flex: 1 1 200px; }
.pe-ed-index { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: var(--panel); border: 1px solid var(--line); font-weight: 700; font-size: 12.5px; margin-bottom: 7px; }
.pe-ed-tools { display: flex; gap: 4px; margin-bottom: 4px; }
.pe-ed-tools button { width: 34px; height: 34px; border-radius: 10px; border: 1px solid var(--line); background: var(--panel); cursor: pointer; display: grid; place-items: center; color: var(--muted); }
.pe-ed-tools button:disabled { opacity: .4; cursor: default; }
.pe-ed-tools svg { width: 16px; height: 16px; }
.pe-ed-topics, .pe-ed-people { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.pe-ed-people select { width: auto; padding: 5px 10px; font-size: 12.5px; }
.pe-ed-label { display: inline-flex; align-items: center; gap: 5px; font-size: 12.5px; color: var(--muted); }
.pe-ed-label svg { width: 15px; height: 15px; }
.pe-topic-sum { font-size: 12px; color: var(--muted); }
.pe-topic-sum.bad, .pe-ed-foot .bad { color: var(--red); font-style: normal; }
.pe-add-bk { justify-self: start; }
/* بخش‌بندیِ بودجهٔ درس */
.pe-ed-sections { display: grid; gap: 8px; }
.pe-ed-sec-head { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.pe-ed-sec-head > b { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--ink); }
.pe-ed-sec-head > b svg { width: 16px; height: 16px; color: var(--purple); }
.pe-ed-sec-head .secondary-button, .pe-ed-sec-head .ghost-button { padding: 6px 12px; font-size: 12.5px; }
.pe-ed-sec { display: grid; gap: 8px; padding: 10px 12px; border-radius: 12px; background: var(--panel); border: 1px solid var(--line); border-inline-start: 3px solid var(--purple); }
.pe-ed-sec-row { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.pe-ed-sec-n { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; background: var(--purple-soft); color: var(--purple); font-size: 12px; font-weight: 700; flex: 0 0 auto; }
.pe-ed-sec-title { flex: 1 1 180px; min-width: 0; padding: 8px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--panel); color: var(--ink); font: inherit; font-size: 13px; font-weight: 600; }
.pe-ed-sec-count { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--muted); }
.pe-ed-sec-count input { width: 64px; padding: 8px 8px; border: 1px solid var(--line); border-radius: 10px; background: var(--panel); color: var(--ink); font: inherit; font-size: 13px; text-align: center; }
.pe-ed-sec-row .secondary-button { padding: 7px 12px; font-size: 12.5px; }
.pe-icon-btn { width: 34px; height: 34px; border-radius: 10px; border: 1px solid var(--line); background: var(--panel); cursor: pointer; display: grid; place-items: center; color: var(--muted); }
.pe-icon-btn.danger { color: var(--red); }
.pe-icon-btn svg { width: 16px; height: 16px; }
.pe-topic small { font-size: 10.5px; opacity: .8; }
/* مهلت: تقویمِ شمسی + ساعت */
.pe-dl-field { gap: 8px; }
.pe-dl-pick { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.pe-dl-date { display: inline-flex; align-items: center; gap: 7px; font: inherit; font-size: 13.5px; font-weight: 600; padding: 9px 14px; border-radius: 12px; border: 1px solid var(--line); background: var(--panel); color: var(--ink); cursor: pointer; }
.pe-dl-date svg { width: 16px; height: 16px; color: var(--orange); }
.pe-dl-date.on, .pe-dl-date:hover { border-color: var(--orange); }
.pe-dl-time { display: inline-flex; align-items: center; gap: 4px; padding: 3px 6px; border: 1px solid var(--line); border-radius: 12px; background: var(--panel); }
.pe-dl-time select { border: 0; background: transparent; color: var(--ink); font: inherit; font-size: 14px; font-weight: 700; padding: 6px 4px; cursor: pointer; }
.pe-dl-time b { color: var(--muted); }
.pe-dl-cal { max-width: 320px; }
.pe-deadlines small { color: var(--muted); font-size: 12px; }
.pe-ed-foot { position: sticky; bottom: 12px; z-index: 5; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; background: var(--panel); border: 1px solid var(--line); border-radius: 16px; padding: 12px 16px; box-shadow: var(--lift-shadow, var(--shadow)); font-size: 13px; color: var(--muted); }
.pe-ed-foot b { color: var(--ink); }
/* سرِ صفحهٔ انتخاب از بانک */
.pe-pick-head .pe-quota em { font-style: normal; font-size: 11.5px; color: var(--teal); }
.pe-pick-head .pe-quota em.pending { color: #9a6a00; }
.pe-pick-head .pe-quota em.bad { color: var(--red); }
/* سرِ صفحهٔ انتخاب ثابت نیست: بزرگ است و جای دیدنِ سؤال‌ها را می‌گرفت */
.exam-pick-mode.pe-pick-head { position: static; box-shadow: none; }
.pe-pick-head > .pe-pick-topics, .pe-pick-head > .pe-check { grid-column: 1 / -1; }
.pe-pick-head > .pe-pick-topics { justify-content: center; }
.pe-pick-head > .pe-check { justify-content: center; margin: -4px 0 0; }
.pe-pick-head .exam-pick-counter b + b { color: var(--ink); }
@media (max-width: 760px) {
  .pe-ed-grid { grid-template-columns: 1fr 1fr; }
  .pe-ed-grid .span2, .pe-ed-grid .span3 { grid-column: 1 / -1; }
  .pe-grid { grid-template-columns: 1fr; }
  .pe-card { padding: 14px; }
  .pe-ed-row .pe-ed-field { flex: 1 1 90px; }
  .pe-ed-foot { bottom: 76px; }
}
/* آزمون‌ساز: «فقط از راهِ لینک» وقتی دانش‌آموزی انتخاب نشده */
.pro-student-picker > .pro-aud-hint { display: flex; align-items: flex-start; gap: 7px; margin: 10px 12px 2px; padding: 9px 12px; border-radius: 12px; background: var(--teal-soft); color: var(--ink); font-size: 12.5px; line-height: 1.9; }
.pro-student-picker > .pro-aud-hint svg { width: 16px; height: 16px; flex: 0 0 auto; margin-top: 4px; color: var(--teal); }
/* ————— نقشهٔ تکمیل پوشه‌ها (fmap-*) ————— */
.fmap-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(118px, 1fr)); gap: 10px; margin-bottom: 14px; }
.fmap-kpi { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; padding: 11px 14px; border: 1px solid var(--line); border-radius: 14px; background: var(--panel); font: inherit; color: var(--ink); cursor: pointer; text-align: right; transition: border-color .15s, box-shadow .15s; }
.fmap-kpi strong { font-size: 21px; font-weight: 900; line-height: 1.2; }
.fmap-kpi small { font-size: 11.5px; color: var(--muted); font-weight: 750; }
.fmap-kpi:hover { border-color: var(--muted); }
.fmap-kpi.on { box-shadow: 0 0 0 2px var(--ink) inset; }
.fmap-kpi.t-done strong { color: var(--teal); }
.fmap-kpi.t-partial strong { color: #a87a08; }
.fmap-kpi.t-empty strong { color: var(--red); }
.fmap-kpi.t-missing strong, .fmap-kpi.t-nostage strong { color: var(--muted); }
.fmap-kpi.t-work strong { color: var(--purple); }
.fmap-kpi.t-free strong { color: var(--orange); }
.fmap-toolbar { padding: 12px 14px; display: flex; flex-direction: column; gap: 10px; }
.fmap-tools-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; }
.fmap-tools-row:empty { display: none; }
.fmap-tools-row .prj-filters { display: flex; flex-wrap: wrap; gap: 6px; }
.fmap-search { flex: 1 1 200px; max-width: 280px; }
.fmap-min { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); font-weight: 750; white-space: nowrap; }
.fmap-min input { width: 58px; min-height: 32px; padding: 4px 8px; border: 1px solid var(--line); border-radius: 10px; background: var(--panel); color: var(--ink); font: inherit; text-align: center; }
.fmap-legend { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; font-size: 11.5px; color: var(--muted); }
.fmap-legend > span { display: inline-flex; align-items: center; gap: 5px; }
.fmap-stamp { margin-inline-start: auto; }
.fmap-err { color: var(--red); }
.fmap-sw { width: 14px; height: 14px; border-radius: 4px; border: 1.5px solid transparent; display: inline-block; position: relative; }
.fmap-sw.w-running, .fmap-sw.w-open { border-radius: 50%; width: 9px; height: 9px; }
.fmap-sw.w-running { background: var(--purple); }
.fmap-sw.w-open { background: var(--blue); }
.fmap-loading { padding: 28px; text-align: center; color: var(--muted); }

.fmap-section { padding: 0; overflow: hidden; }
.fmap-sechead { display: flex; align-items: center; gap: 14px; padding: 13px 16px; cursor: pointer; list-style: none; }
.fmap-sechead::-webkit-details-marker { display: none; }
.fmap-sectitle { display: flex; flex-direction: column; min-width: 150px; }
.fmap-sectitle b { font-size: 15px; font-weight: 900; }
.fmap-sectitle small { font-size: 11.5px; color: var(--muted); }
.fmap-secstats { display: flex; flex-direction: column; gap: 5px; flex: 1; min-width: 0; }
.fmap-secstats small { font-size: 11.5px; color: var(--muted); }
.fmap-chev { flex: none; color: var(--muted); transition: transform .2s; display: inline-flex; }
.fmap-section:not([open]) .fmap-chev { transform: rotate(90deg); }
.fmap-pbar { height: 6px; border-radius: 99px; background: var(--line); overflow: hidden; }
.fmap-pbar.wide { max-width: 420px; height: 7px; }
.fmap-pbar > i { display: block; height: 100%; background: var(--teal); border-radius: inherit; }

.fmap-scroll { overflow-x: auto; border-top: 1px solid var(--line); }
.fmap-table { width: 100%; border-collapse: collapse; font-size: 12px; }
.fmap-table thead th { position: sticky; top: 0; background: var(--panel-soft); font-size: 11.5px; font-weight: 850; color: var(--muted); text-align: right; padding: 8px 10px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.fmap-table td, .fmap-table tbody th { padding: 6px 7px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.fmap-srchead th { background: var(--panel-soft); text-align: right; padding: 8px 12px !important; }
.fmap-srcname { font-size: 13px; font-weight: 900; color: var(--ink); margin-inline-end: 10px; }
.fmap-srchead small { font-size: 11px; color: var(--muted); font-weight: 700; }
.fmap-rowhead { width: 1%; white-space: nowrap; text-align: right; }
.fmap-rowname { border: 0; background: none; padding: 2px 0; font: inherit; font-size: 12.5px; font-weight: 800; color: var(--ink); cursor: pointer; text-align: right; max-width: 170px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: block; }
.fmap-rowname:hover { color: var(--orange); text-decoration: underline; }
.fmap-row.is-hidden { display: none; }
.fmap-row:hover > * { background: color-mix(in srgb, var(--panel-soft) 70%, transparent); }
.fmap-tiles { display: flex; flex-wrap: nowrap; justify-content: center; gap: 3px; }
/* ستون‌های پایه وسط‌چین و با خطی از هم جدا */
.fmap-table .fmap-col { text-align: center; border-inline-start: 2px solid color-mix(in srgb, var(--muted) 30%, var(--line)); }
.fmap-table thead .fmap-col { color: var(--ink); font-size: 12.5px; }
/* جای درسی که این سال ندارد: فقط برای هم‌ترازیِ خانه‌ها زیرِ هم، دیده نمی‌شود */
.fmap-slot { display: inline-block; min-width: 37px; height: 30px; visibility: hidden; }
.fmap-none { color: var(--muted); font-size: 11px; }
.fmap-extra { min-width: 120px; }
.fmap-extra .fmap-tiles { flex-wrap: wrap; }
.fmap-customcell { display: flex; flex-direction: column; align-items: center; gap: 2px; margin-bottom: 4px; }
.fmap-custom { font-size: 10.5px; color: var(--muted); font-weight: 800; }
.fmap-prog { width: 130px; min-width: 120px; }
.fmap-prog small { display: block; margin-top: 4px; font-size: 10.5px; color: var(--muted); white-space: nowrap; }
.fmap-miss-n { color: var(--red); font-weight: 800; }
.fmap-empty-row { color: var(--muted); text-align: center; }

.fmap-tile { position: relative; display: inline-flex; flex-direction: column; align-items: stretch; justify-content: center; gap: 3px; min-width: 37px; height: 30px; padding: 2px 4px 4px; border-radius: 8px; border: 1.5px solid transparent; font: inherit; font-size: 10.5px; font-weight: 850; cursor: pointer; transition: transform .12s, opacity .15s, box-shadow .12s; }
.fmap-tile:hover { transform: translateY(-1px); box-shadow: 0 3px 8px rgba(0, 0, 0, .08); }
.fmap-tl { text-align: center; white-space: nowrap; line-height: 1.2; }
.fmap-bar { display: block; height: 4px; border-radius: 99px; background: color-mix(in srgb, currentColor 18%, transparent); overflow: hidden; }
.fmap-bar > i { display: block; height: 100%; background: currentColor; border-radius: inherit; }
.fmap-tile.s-done, .fmap-sw.s-done { background: var(--teal-soft); border-color: var(--teal); color: #0f7a6d; }
.fmap-tile.s-partial, .fmap-sw.s-partial { background: var(--yellow-soft); border-color: var(--yellow); color: #8a6205; }
.fmap-tile.s-empty, .fmap-sw.s-empty { background: var(--red-soft); border-color: color-mix(in srgb, var(--red) 55%, transparent); color: #b23f3f; }
.fmap-tile.s-nostage, .fmap-sw.s-nostage { background: var(--panel-soft); border-color: var(--line); color: var(--muted); }
.fmap-tile.w-running::after, .fmap-tile.w-open::after, .fmap-tile.w-some::after { content: ""; position: absolute; top: -4px; inset-inline-start: -4px; width: 10px; height: 10px; border-radius: 50%; border: 2px solid var(--panel); }
.fmap-tile.w-running::after { background: var(--purple); }
.fmap-tile.w-open::after { background: var(--blue); }
.fmap-tile.w-some::after { background: color-mix(in srgb, var(--purple) 45%, var(--panel)); }
.fmap-tile.w-broad::after { content: ""; position: absolute; top: -3px; inset-inline-start: -3px; width: 8px; height: 8px; border-radius: 50%; border: 1.5px solid var(--purple); background: var(--panel); }
.fmap-sw.w-broad { border-radius: 50%; width: 9px; height: 9px; border: 1.5px solid var(--purple); }
.fmap-tile.dim { opacity: .2; }
.fmap-tile.dim:hover { opacity: .6; }
.fmap-tile.on { box-shadow: 0 0 0 2.5px var(--orange); }
.fmap-tile.on::before { content: "✓"; position: absolute; top: -7px; inset-inline-end: -6px; width: 15px; height: 15px; border-radius: 50%; background: var(--orange); color: #fff; font-size: 9px; line-height: 15px; text-align: center; }

.fmap-selbar-host { position: sticky; bottom: 14px; z-index: 5; }
.fmap-selbar-host:empty { display: none; }
.fmap-selbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-top: 12px; padding: 11px 16px; border-radius: 16px; background: var(--panel); border: 1px solid var(--line); box-shadow: var(--shadow); font-size: 12.5px; }
.fmap-selbar-actions { display: inline-flex; gap: 8px; flex: none; }
.secondary-button[data-fmap-select].on { background: var(--orange-soft); border-color: var(--orange); color: #a85b1b; }

.fmap-m-path { font-size: 12px; color: var(--muted); margin: 0 0 12px; }
.fmap-m-kpis { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.fmap-m-kpis > span { display: flex; flex-direction: column; padding: 8px 12px; border: 1px solid var(--line); border-radius: 12px; min-width: 82px; }
.fmap-m-kpis b { font-size: 15px; font-weight: 900; }
.fmap-m-kpis small { font-size: 11px; color: var(--muted); }
.fmap-m-kpis .s-done b { color: var(--teal); }
.fmap-m-kpis .s-partial b { color: #a87a08; }
.fmap-m-kpis .s-empty b { color: var(--red); }
.fmap-m-work { display: flex; align-items: center; gap: 6px; padding: 8px 12px; border-radius: 12px; background: var(--purple-soft); color: var(--ink); font-size: 12.5px; margin: 0 0 10px; }
.fmap-m-work svg { width: 16px; height: 16px; color: var(--purple); }
.fmap-m-line { font-size: 12.5px; margin: 0 0 8px; }
.fmap-m-note { font-size: 11px; color: var(--muted); margin: 12px 0 0; }
.fmap-m-stages { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 6px; margin-top: 10px; max-height: 340px; overflow-y: auto; }
.fmap-m-stage { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 7px 10px; border-radius: 10px; border: 1px solid var(--line); background: var(--red-soft); font: inherit; font-size: 11.5px; color: var(--ink); cursor: pointer; text-align: right; }
.fmap-m-stage span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fmap-m-stage b { flex: none; font-weight: 900; }
.fmap-m-stage.part { background: var(--yellow-soft); }
.fmap-m-stage.done { background: var(--teal-soft); }
.fmap-m-stage:hover { border-color: var(--muted); }
@media (max-width: 760px) {
  .fmap-kpis { grid-template-columns: repeat(4, 1fr); gap: 6px; }
  .fmap-kpi { padding: 8px 8px; border-radius: 12px; }
  .fmap-kpi strong { font-size: 16px; }
  .fmap-kpi small { font-size: 10px; }
  .fmap-sechead { flex-wrap: wrap; }
  .fmap-search { max-width: none; }
  .fmap-stamp { margin-inline-start: 0; }
  .fmap-selbar-host { bottom: 80px; }
}
/* ————— tooltip هم‌سبکِ سایت (جای title ِ مرورگر؛ installSiteTooltips) ————— */
.mk-tip { position: fixed; z-index: 10000; left: 0; top: 0; max-width: 300px; padding: 8px 12px; border-radius: 12px; background: var(--ink); color: var(--panel); font-family: inherit; font-size: 12px; font-weight: 600; line-height: 1.8; text-align: right; direction: rtl; white-space: pre-line; box-shadow: 0 10px 28px rgba(20, 18, 14, .22); pointer-events: none; opacity: 0; visibility: hidden; transform: translateY(4px); transition: opacity .14s ease, transform .14s ease, visibility 0s linear .14s; }
.mk-tip.show { opacity: 1; visibility: visible; transform: translateY(0); transition: opacity .14s ease, transform .14s ease; }
.mk-tip.below { transform: translateY(-4px); }
.mk-tip.below.show { transform: translateY(0); }
.mk-tip.multi::first-line { font-weight: 850; }
.mk-tip::after { content: ""; position: absolute; top: 100%; left: var(--tip-arrow, 50%); margin-left: -6px; border: 6px solid transparent; border-top-color: var(--ink); }
.mk-tip.below::after { top: auto; bottom: 100%; border-top-color: transparent; border-bottom-color: var(--ink); }

/* نوارِ صفِ ثبتِ پس‌زمینهٔ سؤال (app.js: renderQuestionSaveIndicator)؛ داخلِ
   پشتهٔ توست ولی همیشه پایینِ آن، و برخلافِ توست کلیک‌پذیر. */
.qsave-status {
  order: 99;
  pointer-events: auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 260px;
  max-width: 390px;
  padding: 10px 14px;
  border-radius: 12px;
  border-right: 4px solid var(--orange);
  background: #292721;
  color: #fff;
  font-size: 11px;
  box-shadow: 0 14px 35px rgba(0,0,0,.2);
}
.qsave-status.is-failed { border-right-color: var(--red); }
.qsave-line { display: flex; align-items: center; gap: 8px; line-height: 1.7; }
.qsave-fail { color: #ffd2d2; }
/* سؤالِ تازه‌ای که هنوز کدِ سرور را نگرفته: به‌جای کدِ حدسی، وضعیتِ ثبت */
.q-code-pending { color: var(--muted); font-family: Vazirmatn, Tahoma, sans-serif; font-weight: 600; font-size: .92em; direction: rtl; unicode-bidi: isolate; }
.q-code-pending.is-failed { color: var(--red); }
.qsave-spin {
  flex: none;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 2px solid rgba(255,255,255,.25);
  border-top-color: var(--orange);
  animation: qsave-spin .8s linear infinite;
}
@keyframes qsave-spin { to { transform: rotate(360deg); } }
.qsave-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.qsave-actions button {
  font: inherit;
  color: #fff;
  background: rgba(255,255,255,.12);
  border: 1px solid rgba(255,255,255,.22);
  border-radius: 8px;
  padding: 4px 10px;
  cursor: pointer;
}
.qsave-actions button:hover { background: rgba(255,255,255,.2); }
@media (prefers-reduced-motion: reduce) { .qsave-spin { animation: none; } }

/* ═════ «دپارتمان‌ها» (tm-*) ═════ */
.tm-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; }
.tm-card { display: flex; flex-direction: column; gap: 12px; }
.tm-card-top { display: flex; align-items: center; gap: 12px; }
.tm-card-top h2 { margin: 0; font-size: 16px; }
.tm-card-top small { color: var(--muted); }
.tm-card-icon { display: inline-grid; place-items: center; width: 42px; height: 42px; border-radius: 12px; background: var(--orange-soft); color: var(--orange); flex: none; }
.tm-card-icon .ui-icon, .tm-card-icon svg { width: 22px; height: 22px; }
.tm-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.tm-members-line { display: flex; align-items: flex-start; gap: 6px; margin: 0; color: var(--muted); font-size: 12px; line-height: 1.9; }
.tm-members-line svg { width: 16px; height: 16px; flex: none; margin-top: 3px; }
.tm-off { color: var(--muted); text-decoration: line-through; }
.tm-busy { color: var(--orange); font-weight: 700; }
.tm-hint { display: block; color: var(--muted); font-size: 12px; margin: 4px 0 8px; line-height: 1.8; }
.tm-count { color: var(--muted); font-weight: 600; }
.tm-check-grid { display: flex; flex-wrap: wrap; gap: 8px; }
.tm-check { display: inline-flex; align-items: center; gap: 8px; padding: 6px 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--panel); cursor: pointer; font-size: 13px; }
.tm-check input { margin: 0; flex: none; }
.tm-radio-row { display: flex; flex-wrap: wrap; gap: 8px; }
.tm-member-pick { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 6px; max-height: 300px; overflow-y: auto; padding: 4px; margin-top: 8px; }
.tm-member-row { width: 100%; box-sizing: border-box; }
.tm-member-row small { color: var(--muted); }
.tm-member-row.is-busy { opacity: .7; }
.tm-member-row.tm-filtered, .tm-member-row[hidden] { display: none; }
.tm-team-tabs { margin-bottom: 14px; }
.tm-tab-count { display: inline-grid; place-items: center; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px; background: var(--orange); color: #fff; font-size: 10px; margin-inline-start: 4px; }
.tm-loading { color: var(--muted); text-align: center; padding: 24px 0; margin: 0; }
.tm-toolbar { display: flex; justify-content: flex-start; margin-bottom: 12px; }
.tm-members { display: flex; flex-direction: column; gap: 10px; }
.tm-member { border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; background: var(--panel); display: flex; flex-direction: column; gap: 10px; }
.tm-member.is-off { opacity: .65; }
.tm-member-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.tm-member-id { display: flex; flex-direction: column; min-width: 150px; flex: 1 1 160px; }
.tm-member-id small { color: var(--muted); font-size: 12px; }
.tm-member-stats { display: flex; gap: 6px; flex-wrap: wrap; }
.tm-member-stats span { display: flex; flex-direction: column; align-items: center; min-width: 62px; padding: 4px 8px; border-radius: 10px; background: var(--panel-soft); }
.tm-member-stats b { font-size: 15px; }
.tm-member-stats small { color: var(--muted); font-size: 10px; white-space: nowrap; }
.tm-member-actions { display: flex; gap: 6px; flex-wrap: wrap; margin-inline-start: auto; }
.tm-member-actions button { white-space: nowrap; }
.tm-grants { display: flex; flex-wrap: wrap; gap: 6px; }
.tm-grant { display: inline-flex; align-items: center; gap: 6px; padding: 3px 4px 3px 10px; border-radius: 999px; border: 1px solid var(--line); background: var(--panel-soft); font-size: 12px; }
.tm-grant b { color: var(--teal); font-weight: 800; }
.tm-grant-reviewer b { color: var(--purple); }
.tm-grant.is-locked { opacity: .7; padding-inline-end: 8px; }
.tm-grant.is-locked svg { width: 12px; height: 12px; color: var(--muted); }
.tm-grant-x { display: inline-grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; border: 0; background: transparent; color: var(--muted); cursor: pointer; padding: 0; }
.tm-grant-x:hover { background: var(--red-soft); color: var(--red); }
.tm-grant-x svg { width: 12px; height: 12px; }
.tm-empty { color: var(--muted); font-size: 12px; }
.tm-subfilters { margin: 4px 0 14px; }
.tm-pending { border: 1px dashed var(--orange); border-radius: 14px; padding: 10px 14px; margin-bottom: 14px; background: var(--orange-soft); }
.tm-pending h3 { display: flex; align-items: center; gap: 6px; margin: 0 0 8px; font-size: 14px; }
.tm-pending h3 svg { width: 16px; height: 16px; }
.tm-pending-row { padding: 6px 0; border-top: 1px solid var(--line); }
.tm-pending-row:first-of-type { border-top: 0; }
.tm-pending-row > small { color: var(--muted); }
.tm-req { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; font-size: 13px; }
.tm-req-actions { display: flex; gap: 6px; flex: none; }
.tm-reqs { display: flex; flex-direction: column; gap: 6px; padding: 8px 10px; border-radius: 10px; background: var(--panel-soft); }
.tm-assignee { display: flex; align-items: center; gap: 6px; margin: 0; font-size: 13px; }
.tm-assignee svg { width: 15px; height: 15px; color: var(--muted); }
.tm-table-wrap { overflow-x: auto; }
.tm-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.tm-table th, .tm-table td { padding: 8px 10px; border-bottom: 1px solid var(--line); text-align: start; vertical-align: middle; }
.tm-table th { color: var(--muted); font-weight: 700; font-size: 12px; white-space: nowrap; }
.tm-table small { color: var(--muted); }
.tm-dl-badge { display: inline-block; padding: 2px 8px; border-radius: 999px; background: var(--panel-soft); font-size: 11px; font-weight: 800; white-space: nowrap; }
.tm-dl-active .tm-dl-badge { background: var(--teal-soft); color: var(--teal); }
.tm-dl-notstarted .tm-dl-badge { background: var(--yellow-soft); color: var(--ink); }
.tm-dl-submitted .tm-dl-badge { background: var(--blue-soft); color: var(--blue); }
.tm-dl-completed .tm-dl-badge { background: var(--teal-soft); color: var(--teal); }
.tm-dl-blocked .tm-dl-badge, .tm-dl-activation_expired .tm-dl-badge { background: var(--red-soft); color: var(--red); }
.tm-pick { border: 1px solid var(--line); border-radius: 12px; padding: 8px; margin-top: 8px; background: var(--panel); }
.tm-pick-list { display: flex; flex-direction: column; gap: 2px; max-height: 280px; overflow-y: auto; margin-top: 6px; }
.tm-pick-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 5px 8px; border-radius: 8px; }
.tm-pick-row:hover { background: var(--panel-soft); }
.tm-pick-row.is-shell { color: var(--muted); }
.tm-pick-main { display: flex; align-items: center; gap: 8px; flex: 1; min-width: 0; cursor: pointer; }
.tm-pick-main > span { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; min-width: 0; }
.tm-pick-main svg { width: 15px; height: 15px; flex: none; color: var(--muted); }
.tm-pick-main small { color: var(--muted); font-size: 11px; }
.tm-pick-row .ghost-button { white-space: nowrap; flex: none; }
.tm-picked { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; padding-top: 8px; border-top: 1px solid var(--line); }
@media (max-width: 640px) {
  .tm-member-actions { margin-inline-start: 0; width: 100%; }
  .tm-member-stats span { min-width: 54px; }
}
.tm-card { padding: 18px; }
.tm-actions-bar { display: flex; flex-wrap: wrap; gap: 8px; margin: -6px 0 18px; }
.tm-actions-bar button { white-space: nowrap; }
.tm-grant.is-locked { gap: 5px; }
.tm-table-note { padding: 10px 12px 0; margin: 0; }
.tm-board-note { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin: 6px 0 4px; padding: 8px 12px; border-radius: 10px; background: var(--orange-soft); color: var(--ink); font-size: 13px; }
.tm-board-note svg { width: 16px; height: 16px; color: var(--orange); flex: none; }
.tm-board-note .link-button { border: 0; background: none; padding: 0; color: var(--orange); font: inherit; font-weight: 800; cursor: pointer; text-decoration: underline; }
/* چندنقشی: نقش‌های کنارِ کار با سؤال */
.am-team-line { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin: 10px 0 0; padding: 8px 12px; border-radius: 10px; background: var(--panel-soft); font-size: 13px; }
.am-team-line svg { width: 16px; height: 16px; color: var(--orange); flex: none; }
.am-team-line small { color: var(--muted); }
.sup-user .sup-multi-role { color: var(--teal); font-weight: 700; }

/* ══════════════ درست یا نادرست (زیست) ══════════════
   پنل کاربر (`tf-*`، همان طرحِ تأییدشدهٔ ۱۴۰۵/۰۸/۱۸) + فضای کارِ مدیر (`tfa-*`) و ویرایشگرِ
   نکته (`tfe-*`). رنگ‌ها فقط از توکن‌های `--tf-*`؛ نسخهٔ تاریکشان در assets/panel-theme.css. */
:is(.tf-page, .tfa-body, .tfa-head, .tfa-tabs, .tfe, .tfw) {
  --tf-duo-r: 14px;
  --tf-card: #ffffff;
  --tf-ink: #25231f;
  --tf-muted: #6b675f;
  --tf-line: #ebe8e0;
  --tf-track: #f3f1ec;
  --tf-raised: #faf9f6;
  --tf-node-line: #cfc9bc;
  --tf-spine: #e4dfd4;
  --tf-true: #087a5e;
  --tf-true-soft: #e3f5ee;
  --tf-true-line: #a8dcc9;
  --tf-on-true: #ffffff;
  --tf-false: #c0354a;
  --tf-false-soft: #fdecee;
  --tf-false-line: #f1b8c1;
  --tf-on-false: #ffffff;
  --tf-accent: #ff6b18;
  --tf-accent-ink: #b84b0b;
  --tf-accent-soft: #fff0e7;
  --tf-on-accent: #2b1608;
  --tf-shadow: 0 1px 2px rgba(41, 36, 29, .04), 0 10px 30px rgba(41, 36, 29, .06);
  --tf-ease: cubic-bezier(.22, 1, .36, 1);
  --tf-spring: cubic-bezier(.34, 1.56, .64, 1);
}
.tf-page { color: var(--tf-ink); }
.tf-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 18px; }
.tf-head h1 { margin: 4px 0 6px; font-size: 30px; font-weight: 900; letter-spacing: -.01em; display: flex; align-items: center; gap: 12px; }
.tf-head p { margin: 0; color: var(--tf-muted); font-size: 14px; }
.tf-title-mark { display: inline-flex; gap: 2px; height: 32px; font-size: 12.5px; font-weight: 800; }
.tf-title-mark span { display: grid; place-items: center; padding: 0 12px; }
.tf-title-mark span:first-child { background: var(--tf-true); color: var(--tf-on-true); border-start-start-radius: 10px; border-end-start-radius: 10px; border-start-end-radius: 2px; border-end-end-radius: 2px; }
.tf-title-mark span:last-child { background: var(--tf-false); color: var(--tf-on-false); border-start-end-radius: 10px; border-end-end-radius: 10px; border-start-start-radius: 2px; border-end-start-radius: 2px; }
.tf-head-tools { display: flex; gap: 10px; }
.tf-btn { display: inline-flex; align-items: center; gap: 8px; height: 42px; padding: 0 16px; border-radius: 12px; border: 1px solid var(--tf-line); background: var(--tf-card); color: var(--tf-ink); font: inherit; font-size: 13.5px; font-weight: 700; cursor: pointer; transition: border-color .2s, background .2s, transform .2s var(--tf-ease); }
.tf-btn:hover { border-color: var(--tf-accent); color: var(--tf-accent-ink); }
.tf-btn:active { transform: scale(.97); }
.tf-btn:disabled { opacity: .55; cursor: default; }
.tf-btn .ui-icon { width: 18px; height: 18px; }
.tf-btn.is-primary { background: var(--tf-accent); border-color: var(--tf-accent); color: var(--tf-on-accent); }
.tf-btn.is-primary:hover { filter: brightness(1.05); color: var(--tf-on-accent); }
.tf-btn.is-true { background: var(--tf-true); border-color: var(--tf-true); color: var(--tf-on-true); }
.tf-btn.is-true:hover { filter: brightness(1.06); color: var(--tf-on-true); }
.tf-btn.is-small { height: 34px; padding: 0 12px; border-radius: 10px; font-size: 12.5px; gap: 6px; }
.tf-btn.is-small .ui-icon { width: 15px; height: 15px; }
.tf-filters { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 10px; margin-bottom: 20px; background: var(--tf-card); border: 1px solid var(--tf-line); border-radius: 16px; box-shadow: var(--tf-shadow); }
.tf-seg-ctl { display: inline-flex; padding: 3px; border-radius: 12px; background: var(--tf-track); gap: 2px; }
.tf-seg-ctl button { display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 14px; border: 0; border-radius: 9px; background: transparent; color: var(--tf-muted); font: inherit; font-size: 13px; font-weight: 700; cursor: pointer; white-space: nowrap; transition: background .2s, color .2s; }
.tf-seg-ctl button .ui-icon { width: 15px; height: 15px; }
.tf-seg-ctl button:hover { color: var(--tf-ink); }
.tf-seg-ctl button.is-on { background: var(--tf-card); color: var(--tf-ink); box-shadow: 0 1px 3px rgba(0, 0, 0, .08), inset 0 0 0 1px var(--tf-line); }
.tf-select { position: relative; display: inline-flex; align-items: center; gap: 6px; height: 40px; padding: 0 10px; border-radius: 12px; border: 1px solid var(--tf-line); color: var(--tf-ink); font-size: 13px; font-weight: 700; background: var(--tf-card); }
.tf-select .ui-icon { width: 15px; height: 15px; color: var(--tf-muted); flex: none; }
.tf-select select { border: 0; background: transparent; color: inherit; font: inherit; padding: 0 2px; min-width: 0; max-width: 220px; cursor: pointer; outline: none; }
.tf-filters .tf-spacer, .tf-card-head .tf-spacer, .tf-card-foot .tf-spacer { flex: 1; }
.tf-layout { display: grid; grid-template-columns: minmax(0, 1fr) 312px; gap: 22px; align-items: start; }
.tf-feed { display: grid; gap: 20px; min-width: 0; }
.tf-aside { position: sticky; top: 86px; display: grid; gap: 16px; }
.tf-card { position: relative; background: var(--tf-card); border: 1px solid var(--tf-line); border-radius: 22px; box-shadow: var(--tf-shadow); overflow: hidden; animation: tf-rise .55s var(--tf-ease) both; animation-delay: calc(var(--c, 0) * 70ms); }
@keyframes tf-rise { from { opacity: 0; transform: translateY(10px); } }
.tf-card::before { content: ""; position: absolute; inset: 0 0 auto; height: 3px; background: linear-gradient(to left, var(--tf-true) 0 var(--tf-r, 0%), var(--tf-false) var(--tf-r, 0%) var(--tf-done, 0%), transparent var(--tf-done, 0%)); }
.tf-card-head { display: flex; align-items: center; gap: 10px; padding: 16px 20px 0; min-width: 0; }
.tf-id { direction: ltr; flex: none; font: 800 12px/1 ui-monospace, "SF Mono", Menlo, monospace; letter-spacing: .04em; padding: 6px 8px; border-radius: 8px; background: var(--tf-track); color: var(--tf-muted); }
.tf-path { display: flex; align-items: center; gap: 4px; min-width: 0; font-size: 12.5px; color: var(--tf-muted); font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tf-path b { color: var(--tf-ink); font-weight: 800; }
.tf-path .ui-icon { width: 13px; height: 13px; flex: none; opacity: .6; }
.tf-src { display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 10px; border-radius: 999px; font-size: 12px; font-weight: 800; white-space: nowrap; flex: none; }
.tf-src .ui-icon { width: 14px; height: 14px; }
.tf-src.is-book { background: var(--tf-accent-soft); color: var(--tf-accent-ink); }
.tf-src.is-q { background: var(--tf-track); color: var(--tf-ink); box-shadow: inset 0 0 0 1px var(--tf-line); }
button.tf-src { border: 0; font: inherit; font-size: 12px; font-weight: 800; cursor: pointer; transition: box-shadow .2s, color .2s; }
button.tf-src:hover { box-shadow: inset 0 0 0 1.5px var(--tf-accent); color: var(--tf-accent-ink); }
.tf-src.is-q em { font-style: normal; direction: ltr; font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: 11.5px; color: var(--tf-accent-ink); }
.tf-icon-btn { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 10px; border: 0; background: transparent; color: var(--tf-muted); cursor: pointer; transition: background .2s, color .2s; }
.tf-icon-btn:hover { background: var(--tf-track); color: var(--tf-ink); }
.tf-icon-btn.is-danger:hover { color: var(--tf-false); }
.tf-icon-btn:disabled { opacity: .35; cursor: default; background: transparent; }
.tf-icon-btn .ui-icon { width: 17px; height: 17px; }
.tf-stem { margin: 14px 20px 4px; font-family: var(--q-font); font-size: calc(15px * var(--q-scale)); font-weight: 700; line-height: 1.9; color: var(--tf-ink); }
.tf-list { list-style: none; margin: 0; padding: 6px 0 10px; }
.tf-row { position: relative; display: grid; grid-template-columns: 34px minmax(0, 1fr) 256px; grid-template-areas: "node body choice" ". why why"; column-gap: 16px; align-items: center; padding: 14px 20px; transition: background .4s; }
.tf-row + .tf-row { border-top: 1px dashed var(--tf-line); }
.tf-row.is-right { background: linear-gradient(to left, color-mix(in srgb, var(--tf-true-soft) 75%, transparent), transparent 46%); }
.tf-row.is-wrong { background: linear-gradient(to left, color-mix(in srgb, var(--tf-false-soft) 85%, transparent), transparent 46%); }
.tf-row:not(:last-child)::after { content: ""; position: absolute; right: 36px; top: calc(50% + 17px); width: 2px; height: calc(100% - 32px); background: var(--tf-spine); border-radius: 2px; transition: background .5s; }
.tf-row.has-why:not(:last-child)::after { top: 48px; height: calc(100% - 18px); }
.tf-row.is-right:not(:last-child)::after { background: linear-gradient(var(--tf-true), var(--tf-spine)); }
.tf-row.is-wrong:not(:last-child)::after { background: linear-gradient(var(--tf-false), var(--tf-spine)); }
.tf-node { grid-area: node; position: relative; z-index: 1; display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--tf-card); box-shadow: inset 0 0 0 1.5px var(--tf-node-line); color: var(--tf-muted); font-weight: 800; font-size: 14px; transition: background .3s, box-shadow .3s, color .3s; }
.tf-node > * { grid-area: 1 / 1; }
.tf-node svg { display: block; width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2.8; stroke-linecap: round; stroke-linejoin: round; }
.tf-node .tf-i-ok, .tf-node .tf-i-no { opacity: 0; transform: scale(.4); transition: opacity .25s, transform .45s var(--tf-spring); }
.tf-row.is-right .tf-node { background: var(--tf-true); box-shadow: 0 0 0 5px var(--tf-true-soft); color: var(--tf-on-true); animation: tf-pop .5s var(--tf-spring); }
.tf-row.is-wrong .tf-node { background: var(--tf-false); box-shadow: 0 0 0 5px var(--tf-false-soft); color: var(--tf-on-false); animation: tf-pop .5s var(--tf-spring); }
.tf-row.is-right .tf-node b, .tf-row.is-wrong .tf-node b { opacity: 0; }
.tf-row.is-right .tf-node .tf-i-ok, .tf-row.is-wrong .tf-node .tf-i-no { opacity: 1; transform: none; }
@keyframes tf-pop { 40% { transform: scale(1.18); } }
.tf-row.is-active:not(.is-revealed) .tf-node { box-shadow: inset 0 0 0 2px var(--tf-accent), 0 0 0 5px var(--tf-accent-soft); color: var(--tf-accent-ink); }
.tf-body { grid-area: body; min-width: 0; }
.tf-text { margin: 0; font-family: var(--q-font); font-size: calc(14.5px * var(--q-scale)); line-height: 2; color: var(--tf-ink); overflow-wrap: anywhere; }
.tf-trap { color: var(--tf-false); text-decoration: line-through 2px var(--tf-false); text-decoration-skip-ink: none; }
.tf-fix { display: inline; margin-inline-start: 6px; padding: 1px 8px 2px; border-radius: 7px; background: var(--tf-true-soft); color: var(--tf-true); box-shadow: inset 0 0 0 1px var(--tf-true-line); font-weight: 700; text-decoration: none; animation: tf-fix-in .5s var(--tf-ease) .25s both; }
.tf-fix::before { content: "←"; margin-inline-end: 4px; font-family: Vazirmatn, sans-serif; font-size: .7em; vertical-align: .12em; }
@keyframes tf-fix-in { from { opacity: 0; transform: translateX(8px); } }
.tf-retry { display: inline-flex; align-items: center; gap: 5px; margin-top: 4px; font-size: 12px; font-weight: 700; color: var(--tf-false); }
.tf-retry .ui-icon { width: 13px; height: 13px; }
.tf-choice { grid-area: choice; display: grid; gap: 7px; justify-items: stretch; }
/* کلیدِ دوتکه: «درست» و «نادرست» دو نیمهٔ مکملِ یک شکل‌اند. لبهٔ بیرونی گرد، درزِ وسط صاف؛
   بعد از پاسخ همین دو نیمه به نسبتِ پاسخِ همه باز و بسته می‌شوند. */
.tf-duo { position: relative; display: flex; height: 48px; gap: 3px; border-radius: var(--tf-duo-r); transition: box-shadow .25s; }
.tf-opt { position: relative; display: flex; align-items: center; justify-content: center; gap: 7px; min-width: 0; flex: 1 1 50%; padding: 0 8px; border: 0; font: inherit; font-size: 14px; font-weight: 800; cursor: pointer; white-space: nowrap; transition: flex-basis .7s var(--tf-ease), flex-grow .7s var(--tf-ease), background .22s, color .22s, box-shadow .22s, transform .18s var(--tf-ease); }
.tf-opt svg { flex: none; width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }
.tf-opt .tf-pct { display: none; font-size: 13.5px; font-variant-numeric: tabular-nums; }
.tf-opt-true { background: var(--tf-true-soft); color: var(--tf-true); box-shadow: inset 0 0 0 1.5px var(--tf-true-line); border-start-start-radius: var(--tf-duo-r); border-end-start-radius: var(--tf-duo-r); border-start-end-radius: 3px; border-end-end-radius: 3px; }
.tf-opt-false { background: var(--tf-false-soft); color: var(--tf-false); box-shadow: inset 0 0 0 1.5px var(--tf-false-line); border-start-end-radius: var(--tf-duo-r); border-end-end-radius: var(--tf-duo-r); border-start-start-radius: 3px; border-end-start-radius: 3px; }
@media (hover: hover) {
  .tf-duo:not(.is-revealed) .tf-opt-true:hover { background: var(--tf-true); color: var(--tf-on-true); box-shadow: 0 8px 18px -10px var(--tf-true); }
  .tf-duo:not(.is-revealed) .tf-opt-false:hover { background: var(--tf-false); color: var(--tf-on-false); box-shadow: 0 8px 18px -10px var(--tf-false); }
}
.tf-duo:not(.is-revealed) .tf-opt:active { transform: scale(.96); }
.tf-duo:not(.is-revealed) .tf-opt:focus-visible { outline: 2px solid var(--tf-accent); outline-offset: 2px; }
.tf-duo.is-busy { opacity: .6; pointer-events: none; }
.tf-duo.is-revealed .tf-opt { cursor: default; }
.tf-duo.is-revealed .tf-opt .tf-pct { display: inline; }
.tf-duo.is-revealed .tf-opt-true { flex: 0 0 var(--t); }
.tf-duo.is-revealed .tf-opt-false { flex: 1 1 0; min-width: 68px; }
.tf-duo.is-revealed .tf-opt.is-narrow .tf-word { display: none; }
/* انتخابِ کاربر روی نیمه‌ای که پاسخ نبود: همان نیمهٔ کم‌رنگ با خطِ دورِ پررنگ */
.tf-duo.is-revealed .tf-opt-true.is-picked { box-shadow: inset 0 0 0 2px var(--tf-true); }
.tf-duo.is-revealed .tf-opt-false.is-picked { box-shadow: inset 0 0 0 2px var(--tf-false); }
.tf-duo.is-revealed[data-answer="1"] .tf-opt-true { background: var(--tf-true); color: var(--tf-on-true); box-shadow: none; }
.tf-duo.is-revealed[data-answer="0"] .tf-opt-false { background: var(--tf-false); color: var(--tf-on-false); box-shadow: none; }
/* همان کلید در میزِ ساختِ نکته: نیمهٔ انتخاب‌شده پُر، نیمهٔ دیگر خنثی */
.tf-duo.is-editor { flex: none; width: 204px; height: 38px; --tf-duo-r: 11px; }
.tf-duo.is-editor .tf-opt { font-size: 13px; }
.tf-duo.is-editor .tf-opt svg { width: 15px; height: 15px; }
.tf-duo.is-editor.has-value .tf-opt:not(.is-on) { background: var(--tf-track); color: var(--tf-muted); box-shadow: inset 0 0 0 1.5px var(--tf-line); }
.tf-duo.is-editor .tf-opt-true.is-on { background: var(--tf-true); color: var(--tf-on-true); box-shadow: none; }
.tf-duo.is-editor .tf-opt-false.is-on { background: var(--tf-false); color: var(--tf-on-false); box-shadow: none; }
.tf-you { position: absolute; top: -11px; inset-inline-start: 50%; translate: 50% 0; padding: 1px 7px 2px; border-radius: 99px; font-size: 10.5px; font-weight: 900; line-height: 1.5; z-index: 2; opacity: 0; transform: translateY(4px); transition: opacity .3s .35s, transform .4s var(--tf-spring) .35s; pointer-events: none; }
.tf-opt-true .tf-you { background: var(--tf-true); color: var(--tf-on-true); box-shadow: 0 0 0 2px var(--tf-card); }
.tf-opt-false .tf-you { background: var(--tf-false); color: var(--tf-on-false); box-shadow: 0 0 0 2px var(--tf-card); }
.tf-duo.is-revealed .is-picked .tf-you { opacity: 1; transform: none; }
.tf-caption { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 18px; padding: 0 6px; font-size: 12px; font-weight: 700; color: var(--tf-muted); }
.tf-caption .tf-verdict { display: inline-flex; align-items: center; gap: 4px; }
.tf-caption .tf-verdict svg { width: 13px; height: 13px; fill: none; stroke: currentColor; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.tf-row.is-right .tf-verdict { color: var(--tf-true); }
.tf-row.is-wrong .tf-verdict { color: var(--tf-false); }
.tf-why-toggle { border: 0; background: none; padding: 0; color: var(--tf-accent-ink); font: inherit; font-size: 12px; font-weight: 800; cursor: pointer; }
.tf-why-toggle:hover { text-decoration: underline; }
.tf-keys { display: inline-flex; gap: 4px; align-items: center; }
.tf-row:not(.is-active) .tf-caption .tf-keys { visibility: hidden; }
.tf-row.is-active .tf-duo:not(.is-revealed) { box-shadow: 0 0 0 4px var(--tf-accent-soft); }
kbd.tf-kbd { display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 6px; background: var(--tf-card); box-shadow: inset 0 -1.5px 0 var(--tf-node-line), inset 0 0 0 1px var(--tf-line); font: 800 11px/1 Vazirmatn, sans-serif; color: var(--tf-muted); }
kbd.tf-kbd-gap { margin-inline-start: 6px; }
.tf-why { grid-area: why; display: grid; grid-template-rows: 0fr; transition: grid-template-rows .5s var(--tf-ease), margin .5s var(--tf-ease); }
.tf-row.has-why .tf-why { grid-template-rows: 1fr; margin-top: 12px; }
.tf-why > div { overflow: hidden; }
.tf-why-box { position: relative; padding: 12px 16px 12px 14px; border-radius: 14px; background: var(--tf-raised); border: 1px solid var(--tf-line); font-size: 13.5px; line-height: 2; color: var(--tf-ink); }
.tf-why-box::before { content: ""; position: absolute; inset-block: 10px; right: 0; width: 3px; border-radius: 3px; background: var(--tf-true); }
.tf-why-box.is-false::before { background: var(--tf-false); }
.tf-why-box strong { display: inline-flex; align-items: center; gap: 6px; margin-inline-end: 8px; padding: 0 9px; border-radius: 99px; font-size: 12px; background: var(--tf-true-soft); color: var(--tf-true); }
.tf-why-box.is-false strong { background: var(--tf-false-soft); color: var(--tf-false); }
.tf-why-box strong svg { width: 12px; height: 12px; fill: none; stroke: currentColor; stroke-width: 3; stroke-linecap: round; }
.tf-card-foot { display: flex; align-items: center; gap: 14px; padding: 14px 20px 16px; border-top: 1px solid var(--tf-line); background: var(--tf-raised); }
.tf-dots { display: flex; gap: 5px; }
.tf-dots i { width: 22px; height: 6px; border-radius: 99px; background: var(--tf-spine); transition: background .4s; }
.tf-dots i.is-right { background: var(--tf-true); }
.tf-dots i.is-wrong { background: var(--tf-false); }
.tf-foot-text { font-size: 13px; color: var(--tf-muted); font-weight: 600; }
.tf-foot-text b { color: var(--tf-ink); font-weight: 900; font-size: 15px; }
.tf-card.is-done .tf-card-foot { background: color-mix(in srgb, var(--tf-accent-soft) 60%, var(--tf-raised)); }
.tf-next { opacity: .45; pointer-events: none; transition: opacity .3s; }
.tf-card.is-done .tf-next { opacity: 1; pointer-events: auto; }
.tf-more { justify-self: center; }
.tf-panel { background: var(--tf-card); border: 1px solid var(--tf-line); border-radius: 20px; padding: 18px; box-shadow: var(--tf-shadow); }
.tf-panel h3 { margin: 0 0 12px; font-size: 14px; font-weight: 900; display: flex; align-items: center; gap: 8px; color: var(--tf-ink); }
.tf-panel h3 .ui-icon { width: 17px; height: 17px; color: var(--tf-accent); }
.tf-score { display: grid; grid-template-columns: 104px 1fr; gap: 16px; align-items: center; }
.tf-ring { position: relative; width: 104px; height: 104px; }
.tf-ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.tf-ring circle { fill: none; stroke-width: 10; }
.tf-ring .bg { stroke: var(--tf-track); }
.tf-ring .fg { stroke: url(#tfRingGrad); stroke-linecap: round; stroke-dasharray: 289; transition: stroke-dashoffset 1.2s var(--tf-ease); }
.tf-ring-val { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; }
.tf-ring-val b { font-size: 26px; font-weight: 900; line-height: 1.1; color: var(--tf-ink); }
.tf-ring-val small { font-size: 11px; color: var(--tf-muted); font-weight: 700; }
.tf-stat-list { display: grid; gap: 10px; }
.tf-stat { display: flex; align-items: center; gap: 10px; font-size: 12.5px; color: var(--tf-muted); font-weight: 600; }
.tf-stat i { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 10px; flex: none; }
.tf-stat i .ui-icon { width: 16px; height: 16px; }
.tf-stat b { display: block; color: var(--tf-ink); font-size: 16px; font-weight: 900; line-height: 1.3; }
.tf-stat .c1 { background: var(--tf-accent-soft); color: var(--tf-accent-ink); }
.tf-stat .c2 { background: var(--tf-true-soft); color: var(--tf-true); }
.tf-stat .c3 { background: var(--tf-false-soft); color: var(--tf-false); }
.tf-chapters { display: grid; gap: 12px; }
.tf-chap { display: grid; gap: 6px; font-size: 12.5px; font-weight: 700; }
.tf-chap-top { display: flex; justify-content: space-between; gap: 8px; color: var(--tf-ink); }
.tf-chap-top span:last-child { color: var(--tf-muted); font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }
.tf-bar { height: 8px; border-radius: 99px; background: var(--tf-track); overflow: hidden; display: flex; }
.tf-bar i { height: 100%; }
.tf-bar i.r { background: var(--tf-true); }
.tf-bar i.w { background: var(--tf-false); }
.tf-legend { display: flex; gap: 14px; margin-top: 12px; font-size: 11.5px; color: var(--tf-muted); font-weight: 700; }
.tf-legend span { display: inline-flex; align-items: center; gap: 5px; }
.tf-legend span::before { content: ""; width: 9px; height: 9px; border-radius: 3px; background: var(--c); }
.tf-traps { display: flex; flex-wrap: wrap; gap: 8px; }
.tf-trap-chip { display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px; border-radius: 10px; background: var(--tf-track); font-size: 12.5px; font-weight: 700; }
.tf-trap-chip s { color: var(--tf-false); text-decoration-thickness: 1.5px; }
.tf-trap-chip u { text-decoration: none; color: var(--tf-true); }
.tf-trap-chip em { font-style: normal; font-size: 11px; color: var(--tf-muted); }
.tf-panel .tf-btn { width: 100%; justify-content: center; margin-top: 14px; }
.tf-shortcuts { display: grid; gap: 8px; font-size: 12.5px; color: var(--tf-muted); font-weight: 600; }
.tf-shortcuts div { display: flex; align-items: center; justify-content: space-between; }
.tf-empty { display: grid; justify-items: center; gap: 12px; padding: 54px 20px; text-align: center; background: var(--tf-card, var(--panel)); border: 1px dashed var(--tf-line, var(--line)); border-radius: 22px; color: var(--tf-muted, var(--muted)); }
.tf-empty > .ui-icon { width: 34px; height: 34px; color: var(--tf-accent, var(--orange)); }
.tf-empty b { color: var(--tf-ink, var(--ink)); font-size: 15px; }
.tf-spinner { width: 28px; height: 28px; border-radius: 50%; border: 3px solid var(--tf-track, var(--line)); border-top-color: var(--tf-accent, var(--orange)); animation: tf-spin .8s linear infinite; }
@keyframes tf-spin { to { transform: rotate(360deg); } }
/* حالت تمرکز: فقط کارتِ جاری، بی‌ستونِ کناری و فیلتر */
.tf-page.is-focus-mode .tf-layout { grid-template-columns: minmax(0, 820px); justify-content: center; }
.tf-page.is-focus-mode :is(.tf-aside, .tf-filters, .tf-more) { display: none; }
.tf-page.is-focus-mode .tf-card:not(.is-current) { display: none; }
.tf-page.is-focus-mode .tf-card.is-current { animation: tf-rise .45s var(--tf-ease) both; }
@media (max-width: 1180px) {
  .tf-layout { grid-template-columns: 1fr; }
  .tf-aside { position: static; grid-template-columns: repeat(2, minmax(0, 1fr)); order: -1; }
  .tf-aside .tf-panel.is-wide-only { display: none; }
}
@media (max-width: 820px) {
  .tf-head { flex-direction: column; align-items: stretch; gap: 14px; }
  .tf-head h1 { font-size: 24px; }
  .tf-head-tools .tf-btn { flex: 1; justify-content: center; }
  .tf-filters { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; padding: 8px; border-radius: 14px; }
  .tf-filters::-webkit-scrollbar { display: none; }
  .tf-filters > * { flex: none; }
  .tf-filters .tf-spacer { display: none; }
  .tf-aside { grid-template-columns: 1fr; }
  .tf-aside .tf-panel:not(.is-score) { display: none; }
  .tf-panel.is-score { padding: 14px; }
  .tf-score { grid-template-columns: 84px 1fr; }
  .tf-ring { width: 84px; height: 84px; }
  .tf-ring-val b { font-size: 21px; }
  .tf-stat-list { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
  .tf-stat { flex-direction: column; align-items: flex-start; gap: 4px; font-size: 11px; }
  .tf-stat i { display: none; }
  .tf-stat b { font-size: 18px; }
  .tf-card { border-radius: 18px; }
  .tf-card-head { flex-wrap: wrap; padding: 14px 14px 0; row-gap: 8px; }
  .tf-path { order: 5; flex-basis: 100%; }
  .tf-stem { margin: 10px 14px 2px; }
  .tf-row { grid-template-columns: 30px minmax(0, 1fr); grid-template-areas: "node body" ". choice" ". why"; row-gap: 10px; padding: 14px; column-gap: 12px; align-items: start; }
  .tf-node { width: 30px; height: 30px; margin-top: 5px; font-size: 13px; }
  .tf-row:not(:last-child)::after, .tf-row.has-why:not(:last-child)::after { right: 28px; top: 50px; height: calc(100% - 44px); }
  .tf-card-foot { padding: 12px 14px; flex-wrap: wrap; }
  .tf-card-foot .tf-btn { flex: 1; justify-content: center; }
  .tf-keys { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .tf-page *, .tf-page *::before, .tf-page *::after { animation: none !important; transition: none !important; }
}

/* ── فضای کارِ مدیر ── */
.tfa-head .tfa-head-tools { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.tfa-tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 18px; padding: 4px; border-radius: 14px; background: var(--panel); border: 1px solid var(--line); width: fit-content; max-width: 100%; }
.tfa-tabs button { display: inline-flex; align-items: center; gap: 8px; height: 38px; padding: 0 14px; border: 0; border-radius: 10px; background: transparent; color: var(--muted); font: inherit; font-size: 13.5px; font-weight: 800; cursor: pointer; }
.tfa-tabs button:hover { color: var(--ink); }
.tfa-tabs button.is-on { background: var(--orange-soft); color: var(--tf-accent-ink); }
.tfa-tabs button span { min-width: 22px; height: 20px; padding: 0 6px; border-radius: 99px; background: var(--tf-track); color: var(--tf-muted); font-size: 11.5px; display: inline-grid; place-items: center; }
/* minmax(0,…): نوارِ فیلترِ اسکرول‌شوندهٔ پیش‌نمایش نباید ستون را از عرضِ گوشی پهن‌تر کند. */
.tfa-body { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; }
.tfa-tools { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.tfa-search { flex: 1 1 220px; max-width: 360px; }
.tfa-earn { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 12px; }
.tfa-earn > div { display: grid; grid-template-columns: 38px minmax(0, 1fr); column-gap: 12px; align-items: center; padding: 13px 15px; border-radius: 16px; background: var(--tf-card); border: 1px solid var(--tf-line); }
.tfa-earn i { grid-row: 1 / span 3; display: grid; place-items: center; width: 38px; height: 38px; border-radius: 12px; background: var(--tf-track); color: var(--tf-muted); }
.tfa-earn i .ui-icon { width: 19px; height: 19px; }
.tfa-earn :is(span, b, small) { grid-column: 2; min-width: 0; }
.tfa-earn span { font-size: 12px; color: var(--tf-muted); font-weight: 700; }
.tfa-earn b { font-size: 15px; color: var(--tf-ink); }
.tfa-earn small { font-size: 12px; color: var(--tf-muted); font-weight: 600; }
.tfa-earn .is-live i { background: var(--tf-true-soft); color: var(--tf-true); }
.tfa-earn .is-wait i { background: var(--tf-accent-soft); color: var(--tf-accent-ink); }
.tfa-earn .is-back i { background: var(--tf-false-soft); color: var(--tf-false); }
.tfa-list { display: grid; gap: 14px; }
.tfa-note { position: relative; padding: 16px 18px; border-radius: 18px; background: var(--tf-card); border: 1px solid var(--tf-line); box-shadow: var(--tf-shadow); overflow: hidden; }
.tfa-note::before { content: ""; position: absolute; inset-block: 0; right: 0; width: 4px; background: var(--tf-node-line); }
.tfa-note.s-pending::before { background: var(--tf-accent); }
.tfa-note.s-approved::before { background: var(--tf-true); }
.tfa-note.s-returned::before, .tfa-note.s-rejected::before { background: var(--tf-false); }
.tfa-note-head { display: flex; align-items: center; gap: 10px; min-width: 0; flex-wrap: wrap; }
.tfa-note-head .tf-spacer { flex: 1; }
.tfa-status { flex: none; padding: 4px 10px; border-radius: 99px; font-size: 11.5px; font-weight: 800; background: var(--tf-track); color: var(--tf-muted); }
.tfa-status.s-pending { background: var(--tf-accent-soft); color: var(--tf-accent-ink); }
.tfa-status.s-approved { background: var(--tf-true-soft); color: var(--tf-true); }
.tfa-status.s-returned, .tfa-status.s-rejected { background: var(--tf-false-soft); color: var(--tf-false); }
.tfa-stem { margin: 12px 0 0; font-family: var(--q-font); font-size: calc(14px * var(--q-scale)); font-weight: 700; line-height: 1.9; color: var(--tf-ink); }
.tfa-statements { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: 8px; }
.tfa-statements > li { display: grid; grid-template-columns: 98px minmax(0, 1fr); gap: 12px; align-items: start; padding: 10px 12px; border-radius: 12px; background: var(--tf-raised); border: 1px solid var(--tf-line); }
.tfa-statements p { margin: 0; }
.tfa-statements > li > div > p:first-child { font-family: var(--q-font); font-size: calc(13.5px * var(--q-scale)); line-height: 1.95; color: var(--tf-ink); }
.tfa-ans { display: flex; gap: 2px; height: 28px; font-size: 12px; font-weight: 800; }
.tfa-ans > span { display: flex; align-items: center; justify-content: center; gap: 4px; min-width: 26px; padding: 0 6px; background: var(--tf-track); color: var(--tf-node-line); }
.tfa-ans svg { width: 13px; height: 13px; fill: none; stroke: currentColor; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.tfa-ans .t { border-start-start-radius: 9px; border-end-start-radius: 9px; border-start-end-radius: 2px; border-end-end-radius: 2px; }
.tfa-ans .f { border-start-end-radius: 9px; border-end-end-radius: 9px; border-start-start-radius: 2px; border-end-start-radius: 2px; }
.tfa-ans.is-true .t { flex: 1; background: var(--tf-true); color: var(--tf-on-true); }
.tfa-ans.is-false .f { flex: 1; background: var(--tf-false); color: var(--tf-on-false); }
.tfa-why { margin-top: 4px !important; font-size: 12.5px; line-height: 1.9; color: var(--tf-muted); }
.tfa-stats { margin-top: 4px !important; font-size: 11.5px; font-weight: 800; color: var(--tf-accent-ink); }
.tfa-review-note { display: flex; gap: 10px; margin-top: 12px; padding: 10px 12px; border-radius: 12px; background: var(--tf-false-soft); color: var(--tf-ink); border: 1px solid var(--tf-false-line); }
.tfa-review-note > .ui-icon { width: 18px; height: 18px; flex: none; color: var(--tf-false); margin-top: 2px; }
.tfa-review-note b { font-size: 12.5px; color: var(--tf-false); }
.tfa-review-note p { margin: 2px 0 0; font-size: 13px; line-height: 1.9; }
.tfa-note-foot { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.tfa-note-foot .tf-spacer { flex: 1; }
.tfa-note-foot :is(button) { height: 36px; font-size: 12.5px; }
.tfa-meta { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--tf-muted); font-weight: 600; }
.tfa-meta .ui-icon { width: 14px; height: 14px; }
.tfa-approve { display: inline-flex; align-items: center; gap: 6px; padding: 0 16px; border-radius: 10px; border: 0; background: var(--tf-true); color: var(--tf-on-true); font: inherit; font-weight: 800; cursor: pointer; }
.tfa-approve:hover { filter: brightness(1.06); }
.tfa-approve .ui-icon { width: 16px; height: 16px; }
.tfa-danger { color: var(--tf-false) !important; }
.tfa-pager { display: flex; align-items: center; justify-content: center; gap: 12px; font-size: 13px; color: var(--tf-muted); }
.tfa-settings { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.tfa-settings > .panel { margin: 0; }
.tfa-settings .panel-title { display: grid; gap: 4px; }
.tfa-settings .panel-title h2 { margin: 0; }
.tfa-members { display: flex; flex-wrap: wrap; gap: 8px; padding: 0 18px 18px; }
.tfa-member { display: inline-flex; align-items: center; gap: 8px; height: 36px; padding: 0 12px; border-radius: 10px; border: 1px solid var(--line); background: var(--panel); font-size: 13px; font-weight: 700; cursor: pointer; color: var(--ink); }
.tfa-member input { width: auto; min-height: 0; margin: 0; accent-color: var(--orange); }
.tfa-member.is-on { border-color: var(--tf-accent); background: var(--orange-soft); color: var(--tf-accent-ink); }
.tfa-rates { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; padding: 0 18px 18px; }
.tfa-settings-foot { grid-column: 1 / -1; display: flex; justify-content: flex-end; }
.tfa-preview-note { display: flex; align-items: center; gap: 12px; margin-bottom: 4px; padding: 12px 16px; border-radius: 14px; background: var(--tf-accent-soft); border: 1px solid color-mix(in srgb, var(--tf-accent) 35%, transparent); color: var(--tf-ink); }
.tfa-preview-note.is-on { background: var(--tf-true-soft); border-color: var(--tf-true-line); }
.tfa-preview-note > .ui-icon { width: 20px; height: 20px; color: var(--tf-accent-ink); flex: none; }
.tfa-preview-note > div { display: grid; gap: 2px; flex: 1; font-size: 12.5px; color: var(--tf-muted); }
.tfa-preview-note b { font-size: 13.5px; color: var(--tf-ink); }
@media (max-width: 900px) {
  .tfa-settings, .tfa-rates { grid-template-columns: 1fr; }
  .tfa-statements > li { grid-template-columns: 1fr; }
  .tfa-statements .tfa-ans { justify-self: start; width: 104px; }
}

/* ── میز ساخت نکته با فرم زیر سؤال ── */
.tfw { --tfw-stick: 80px; color: var(--tf-ink); }
.tfw .field { margin: 0; }
.tfw .field label small, .tfw h3 small { font-size: 12px; color: var(--tf-muted); font-weight: 600; }
.tfw .tf-spacer { flex: 1; }
.tfw-bar { position: sticky; top: var(--tfw-stick); z-index: 30; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; min-height: 62px; padding: 9px 12px; margin-bottom: 14px; background: color-mix(in srgb, var(--tf-card) 94%, transparent); backdrop-filter: blur(10px); border: 1px solid var(--tf-line); border-radius: 16px; box-shadow: var(--tf-shadow); }
.tfw-title { display: flex; align-items: center; gap: 10px; min-width: 0; flex-wrap: wrap; }
.tfw-title h1 { margin: 0; font-size: 18px; font-weight: 900; }
.tfw-dirty { padding: 3px 9px; border-radius: 99px; background: var(--tf-accent-soft); color: var(--tf-accent-ink); font-size: 11.5px; font-weight: 800; }
.tfw-check { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 700; }
.tfw-check .ui-icon { width: 16px; height: 16px; flex: none; }
.tfw-check.is-ready { color: var(--tf-true); }
.tfw-check.is-todo { color: var(--tf-accent-ink); }
.tfw-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.tfw-src, .tfw-note { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; min-width: 0; padding: 16px; }
.tfw-src { background: var(--tf-card); border: 1px solid var(--tf-line); border-radius: 18px; box-shadow: var(--tf-shadow); }
.tfw-note { background: var(--tf-card); border: 1px solid var(--tf-line); border-radius: 16px; }
.tfw-q > .tfw-note { border-width: 1px 0 0; border-radius: 0; }
.tfw-note-footer { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; padding-top: 12px; border-top: 1px solid var(--tf-line); }
.tfw-qtools, .tfw-note-head h3 { scroll-margin-top: calc(var(--tfw-stick) + 80px); }
.tfw-sec { display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; min-width: 0; }
.tfw :is(.tfw-sec, .tfw-note-head) h3 { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: 0; font-size: 14.5px; font-weight: 900; color: var(--tf-ink); }
.tfw :is(.tfw-sec, .tfw-note-head) h3 i { display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: var(--tf-accent-soft); color: var(--tf-accent-ink); font-style: normal; font-size: 12px; }
.tfw-sec > h3 { min-height: 40px; }
.tfw-note-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; min-height: 40px; }
.tfe-topic { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; }
.tfw-qtools { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.tfw-qtools .tfa-search { max-width: none; }
.tfw-count { margin: 0; font-size: 12.5px; line-height: 1.9; color: var(--tf-muted); font-weight: 600; }
.tfw-count b { color: var(--tf-ink); }
.tfw-count .ui-icon { width: 15px; height: 15px; margin-inline-end: 6px; vertical-align: -3px; color: var(--tf-accent); }
.tfw-qlist { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; }
.tfw-q { min-width: 0; border: 1px solid var(--tf-line); border-radius: 16px; background: var(--tf-raised); overflow: hidden; }
.tfw-q.is-picked { background: var(--tf-card); border-color: var(--tf-accent); box-shadow: 0 0 0 3px var(--tf-accent-soft); }
.tfw-q-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 10px 12px; border-bottom: 1px dashed var(--tf-line); }
.tfw-q .qv-card.tfw-qv { margin: 0; border: 0; border-radius: 0; box-shadow: none; background: transparent; }
.tfw-used { display: inline-flex; align-items: center; gap: 4px; height: 26px; padding: 0 8px; border-radius: 99px; background: var(--tf-true-soft); color: var(--tf-true); font-size: 11.5px; font-weight: 800; }
.tfw-used .ui-icon { width: 14px; height: 14px; }
.tfw-used em { font-style: normal; direction: ltr; font-family: ui-monospace, "SF Mono", Menlo, monospace; }
.tfw-used em + em::before { content: "،"; margin-inline-end: 3px; font-family: Vazirmatn, sans-serif; }
.tfw-qstatus { padding: 3px 9px; border-radius: 99px; background: var(--tf-accent-soft); color: var(--tf-accent-ink); font-size: 11.5px; font-weight: 800; }
.tfw-opt-bar { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; padding: 10px 12px; background: var(--tf-accent-soft); border-block: 1px solid color-mix(in srgb, var(--tf-accent) 28%, transparent); font-size: 12.5px; font-weight: 800; color: var(--tf-accent-ink); }
.tfw-opt-bar > span { display: inline-flex; align-items: center; gap: 5px; }
.tfw-opt-bar .ui-icon { width: 15px; height: 15px; }
.tfw-opt-bar button { height: 30px; padding: 0 12px; border-radius: 9px; border: 1px solid color-mix(in srgb, var(--tf-accent) 55%, transparent); background: var(--tf-card); color: var(--tf-accent-ink); font: inherit; font-size: 12.5px; font-weight: 800; cursor: pointer; transition: background .2s, color .2s, transform .15s; }
.tfw-opt-bar button:hover:not(:disabled) { background: var(--tf-accent); color: var(--tf-on-accent); }
.tfw-opt-bar button:active:not(:disabled) { transform: scale(.96); }
.tfw-opt-bar button:disabled { opacity: .45; cursor: default; }
.tfw-opt-bar small { flex-basis: 100%; font-size: 11.5px; font-weight: 600; color: var(--tf-muted); }
.tfw-q img.sq-content-image:not(.sq-img-lazy) { cursor: zoom-in; }
.tfw-zoom { position: fixed; inset: 0; z-index: 400; display: grid; justify-items: center; align-items: start; padding: 28px 20px; overflow: auto; background: rgba(15, 18, 24, .82); cursor: zoom-out; animation: tfw-zoom-in .18s ease-out; }
.tfw-zoom img { width: min(1180px, 100%); height: auto; border-radius: 12px; background: #fff; box-shadow: 0 24px 60px rgba(0, 0, 0, .45); }
@keyframes tfw-zoom-in { from { opacity: 0; } }
.tfw-opt-bar.is-image { background: var(--tf-raised); border-color: var(--tf-line); color: var(--tf-muted); font-weight: 700; }
.tfw-opt-bar.is-image .ui-icon { color: var(--tf-accent); }
.tfw-answer { padding: 12px; }
.tfw-answer .qv-answer { margin: 0; }
.tfw-hint { display: flex; align-items: flex-start; gap: 10px; padding: 12px 14px; border-radius: 14px; background: var(--tf-raised); border: 1px solid var(--tf-line); font-size: 12.5px; line-height: 1.9; color: var(--tf-muted); }
.tfw-hint > .ui-icon { width: 18px; height: 18px; flex: none; margin-top: 3px; color: var(--tf-accent); }
.tfw-hint > div { flex: 1; min-width: 0; }
.tfw-hint b { display: block; color: var(--tf-ink); font-size: 13.5px; }
.tfw-hint.is-warn { background: var(--tf-false-soft); border-color: var(--tf-false-line); }
.tfw-hint.is-warn > .ui-icon { color: var(--tf-false); }
.tfw-book { display: grid; gap: 12px; }
.tfw-pager { padding-top: 2px; }
.tfw-selbar { position: fixed; z-index: 80; display: flex; gap: 2px; padding: 4px; border-radius: 12px; background: var(--tf-ink); box-shadow: 0 12px 30px rgba(0, 0, 0, .28); }
.tfw-selbar[hidden], .tfw-selbar [hidden] { display: none; }
.tfw-selbar button { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 12px; border: 0; border-radius: 9px; background: transparent; color: var(--tf-card); font: inherit; font-size: 12.5px; font-weight: 800; white-space: nowrap; cursor: pointer; }
.tfw-selbar button:hover { background: color-mix(in srgb, var(--tf-card) 18%, transparent); }
.tfw-selbar .ui-icon { width: 15px; height: 15px; }
.tfe-list { display: grid; gap: 12px; }
.tfe-st { position: relative; display: grid; gap: 10px; padding: 14px; border-radius: 16px; background: var(--tf-raised); border: 1px solid var(--tf-line); transition: border-color .2s, box-shadow .2s, background .2s; }
.tfe-st::before { content: ""; position: absolute; inset-block: 16px; inset-inline-start: -1px; width: 3px; border-radius: 3px; background: var(--tf-node-line); transition: background .25s; }
.tfe-st.is-true::before { background: var(--tf-true); }
.tfe-st.is-false::before { background: var(--tf-false); }
.tfe-st.is-active { background: var(--tf-card); border-color: color-mix(in srgb, var(--tf-accent) 60%, var(--tf-line)); box-shadow: 0 0 0 3px var(--tf-accent-soft); }
.tfe-st.is-fresh { animation: tfe-fresh 1.4s var(--tf-ease); }
@keyframes tfe-fresh { from { background: var(--tf-accent-soft); } }
.tfe-st-head { display: flex; align-items: center; gap: 10px; }
.tfe-no { display: grid; place-items: center; flex: none; width: 28px; height: 28px; border-radius: 50%; background: var(--tf-card); box-shadow: inset 0 0 0 1.5px var(--tf-node-line); color: var(--tf-muted); font-size: 13px; font-weight: 800; }
.tfe-st.is-true .tfe-no { box-shadow: inset 0 0 0 1.5px var(--tf-true); color: var(--tf-true); }
.tfe-st.is-false .tfe-no { box-shadow: inset 0 0 0 1.5px var(--tf-false); color: var(--tf-false); }
.tfe-trap { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; padding: 10px; border-radius: 12px; background: var(--tf-false-soft); }
.tfe-trap label { color: var(--tf-false); }
.tfe-trap-input { display: flex; gap: 6px; }
.tfe-trap-input input { flex: 1; min-width: 0; }
.tfe-mini { flex: none; padding: 0 10px; border-radius: 10px; border: 1px solid var(--tf-false-line); background: var(--tf-card); color: var(--tf-false); font: inherit; font-size: 11.5px; font-weight: 800; white-space: nowrap; cursor: pointer; }
.tfe-mini:hover { border-color: var(--tf-false); }
.tfe-trap-state { grid-column: 1 / -1; margin: 0; font-size: 12.5px; line-height: 1.9; }
.tfe-trap-state .is-hint { color: var(--tf-muted); }
.tfe-trap-state .is-bad { display: inline-flex; align-items: center; gap: 5px; color: var(--tf-false); font-weight: 800; }
.tfe-trap-state .is-bad svg { width: 13px; height: 13px; fill: none; stroke: currentColor; stroke-width: 3; stroke-linecap: round; }
.tfe-trap-state .is-ok { font-family: var(--q-font); font-size: calc(13.5px * var(--q-scale)); color: var(--tf-ink); }
.tfe-trap-state .tf-fix, .tfa-statements .tf-fix { animation: none; }
.tfe-add { justify-self: start; }
/* پیش‌نمایش کارت کاربر در فرم نکته */
.tfw-preview { display: grid; gap: 12px; }
.tfw-preview .tf-card { animation: none; }
.tfw-preview .tf-next { display: none; }
.tfw-preview .tf-card-head { flex-wrap: wrap; row-gap: 8px; }
.tfw-preview .tf-path { order: 5; flex-basis: 100%; }
.tfw-preview .tf-row { grid-template-columns: 30px minmax(0, 1fr); grid-template-areas: "node body" ". choice" ". why"; row-gap: 10px; align-items: start; }
.tfw-preview .tf-node { width: 30px; height: 30px; margin-top: 5px; font-size: 13px; }
.tfw-preview .tf-row:not(:last-child)::after, .tfw-preview .tf-row.has-why:not(:last-child)::after { right: 34px; top: 50px; height: calc(100% - 44px); }
.tf-peek { display: grid; gap: 14px; }
.modal-footer .tf-spacer { flex: 1; }
@media (max-width: 1100px) {
  .tfw-bar { position: static; backdrop-filter: none; background: var(--tf-card); }
  .tfw-qtools, .tfw-note-head h3 { scroll-margin-top: var(--tfw-stick); }
}
@media (max-width: 700px) {
  .tfe-trap { grid-template-columns: 1fr; }
  .tfw-src, .tfw-note { padding: 12px; }
  .tfw-src { border-radius: 16px; }
  .tfw-actions { width: 100%; }
  .tfw-actions .tf-btn { flex: 1; justify-content: center; }
  .tf-duo.is-editor { width: 176px; }
}

/* Search shells share the same controls while each toolbar sets its own width. */
.mk-search-field.mk-search-field:not([hidden]) {
  display: flex;
  align-items: center;
  gap: 8px;
  box-sizing: border-box;
  min-inline-size: 0;
  min-block-size: 40px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel);
  color: var(--muted);
  cursor: text;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.mk-search-field.mk-search-field:focus-within {
  border-color: var(--orange);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--orange) 16%, transparent);
}
.mk-search-field.mk-search-field > svg {
  position: static;
  flex: 0 0 16px;
  width: 16px;
  height: 16px;
  margin: 0;
  color: var(--muted);
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  transform: none;
  translate: none;
  pointer-events: none;
}
.mk-search-field.mk-search-field > input,
.mk-search-field.mk-search-field > input:is(:focus, :focus-visible) {
  appearance: none;
  flex: 1 1 0;
  inline-size: 0;
  min-inline-size: 0;
  min-block-size: 0;
  block-size: auto;
  padding: 8px 0;
  border: 0;
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-size: 13px;
  font-weight: 500;
  outline: 0;
  box-shadow: none;
  transform: none;
}
.mk-search-field > input::-webkit-search-cancel-button { display: none; }
.mk-search-field.mk-search-field > button[data-search-clear] {
  display: grid;
  place-items: center;
  flex: 0 0 30px;
  width: 30px;
  height: 30px;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: var(--panel-soft);
  color: var(--muted);
  cursor: pointer;
}
.mk-search-field:has(> input:is(:placeholder-shown, :disabled, [readonly])) > [data-search-clear] {
  visibility: hidden;
}
.mk-search-field.mk-search-field > button[data-search-clear]:hover {
  background: var(--orange-soft);
  color: var(--ink);
}
.mk-search-field.mk-search-field > button[data-search-clear]:focus-visible {
  outline: 2px solid var(--orange);
  outline-offset: 1px;
  box-shadow: none;
}
.mk-search-field > button[data-search-clear] > svg.ui-icon { width: 14px; height: 14px; color: inherit; }
.fml-pal-search > .mk-search-field { flex: 1; }
.orgm-coop-search { flex: 1 1 230px; }
.pro-sheet-search { width: min(290px, 100%); }
@media (max-width: 760px) {
  .mk-search-field.mk-search-field:not([hidden]) { min-block-size: 44px; }
  .mk-search-field.mk-search-field > input,
  .mk-search-field.mk-search-field > input:is(:focus, :focus-visible) { font-size: 16px; }
  .pro-sheet-search { width: 100%; }
}

/* بخشِ پوشش‌نیافتهٔ پیش‌پرداخت در نمودار پرداخت‌ها (با کارِ بعدی کوچک می‌شود) */
.finance-bar .payment-bar-advance { fill: var(--chart-advance-color, #8b7fd4); filter: none; stroke: none; }
.reward-legend .rl-swatch.adv { background: var(--chart-advance-color, #8b7fd4); }

/* فهرست شماره‌های ماهنامه */
.mn-library {
  container-type: inline-size;
  --mn-library-accent: color-mix(in srgb, var(--orange) 62%, var(--ink));
  --mn-library-muted: color-mix(in srgb, var(--muted) 78%, var(--ink));
}
.mn-library-heading { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: var(--space-2) var(--space-3); }
.mn-library-heading h1 { margin: 0; font-size: 1.45rem; font-weight: 850; line-height: 1.5; }
.mn-library-meta { display: flex; align-items: center; flex-wrap: wrap; gap: var(--space-1) var(--space-3); color: var(--mn-library-muted); font-size: .8125rem; }
.mn-library-count { color: var(--mn-library-accent); }
.mn-library .mn-progress-loading { min-height: 40px; margin: 0; }
.mn-library-empty { padding: var(--space-5); }
.mn-list-cards { display: grid; gap: var(--space-2); }
.mn-card.mn-unified-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(130px, .53fr) minmax(130px, .56fr) max-content;
  grid-template-areas: "identity meta progress action";
  align-items: center; gap: var(--space-4); min-height: 60px; min-width: 0;
  padding: var(--space-2) var(--space-3); border-radius: 12px;
  background: var(--panel); color: var(--ink); border: 1px solid var(--line);
  text-align: start; font-family: inherit; cursor: pointer;
  transition: border-color .18s ease, background-color .18s ease;
}
.mn-card.mn-unified-card:hover { background: var(--panel-soft); border-color: color-mix(in srgb, var(--line) 58%, var(--orange)); }
.mn-card.mn-unified-card:focus-visible { outline: 2px solid var(--orange); outline-offset: 2px; }
.mn-card-main { grid-area: identity; min-width: 0; display: flex; align-items: center; gap: var(--space-2); }
.mn-issue-icon { flex: none; width: 34px; height: 34px; display: grid; place-items: center; border-radius: 9px; background: var(--orange-soft); color: var(--mn-library-accent); }
.mn-issue-icon > svg { width: 18px; height: 18px; }
.mn-issue-copy { min-width: 0; display: grid; line-height: 1.45; }
.mn-issue-copy b { font-size: .9375rem; font-weight: 800; }
.mn-issue-copy small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .75rem; color: var(--mn-library-muted); }
.mn-card-meta { grid-area: meta; display: flex; flex-wrap: wrap; gap: 0 var(--space-2); color: var(--mn-library-muted); font-size: .75rem; }
.mn-card-meta > span { white-space: nowrap; }
.mn-card-meta b { color: var(--ink); }
.mn-card-progress { grid-area: progress; display: grid; gap: var(--space-1); width: 100%; max-width: 200px; min-width: 0; }
.mn-card-progress > span { display: flex; justify-content: space-between; align-items: baseline; gap: var(--space-1); font-size: .75rem; color: var(--mn-library-muted); }
.mn-card-unread { color: var(--mn-library-accent); }
.mn-card-action { grid-area: action; justify-self: end; display: flex; align-items: center; gap: var(--space-1); color: var(--mn-library-accent); font-size: .8125rem; font-weight: 750; white-space: nowrap; }
.mn-card-action svg { flex: none; width: 15px; height: 15px; }
@container (max-width: 640px) {
  .mn-library-heading h1 { font-size: 1.25rem; }
  .mn-card.mn-unified-card {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto;
    grid-template-areas: "identity identity action" "meta progress progress";
    gap: var(--space-1) var(--space-2); padding: var(--space-2);
  }
  .mn-issue-icon { width: 30px; height: 30px; }
  .mn-issue-copy b { font-size: .875rem; }
  .mn-card-action > span { display: none; }
  .mn-card-progress { justify-self: end; }
}

/* ماهنامهٔ یکپارچه: نشان نزده‌ها و امتیاز به گزینش هر درس */
.mn-unread-dot { min-width: 23px; height: 23px; display: inline-flex; align-items: center; justify-content: center; padding: 0 6px; border-radius: 999px; border: 2px solid #fff; background: #ee7036; color: #fff; font-size: 10px; line-height: 1; font-style: normal; font-weight: 850; box-shadow: 0 2px 5px #d86b2620; }
.mn-card-progress progress, .mn-study-progress progress, .mn-lesson-card progress { display: block; width: 100%; height: 5px; border: 0; border-radius: 99px; overflow: hidden; background: #eee9e0; appearance: none; }
.mn-card-progress progress::-webkit-progress-bar, .mn-study-progress progress::-webkit-progress-bar, .mn-lesson-card progress::-webkit-progress-bar { background: #eee9e0; border-radius: 99px; }
.mn-card-progress progress::-webkit-progress-value, .mn-study-progress progress::-webkit-progress-value, .mn-lesson-card progress::-webkit-progress-value { background: #86a197; border-radius: 99px; }
.mn-card-progress progress::-moz-progress-bar, .mn-study-progress progress::-moz-progress-bar, .mn-lesson-card progress::-moz-progress-bar { background: #86a197; border-radius: 99px; }
.mn-head-badge svg { width: 16px; height: 16px; }
.mn-issue-view { --stack-gap: var(--space-4); }
.mn-issue-header { min-width: 0; border: 1px solid var(--line); border-radius: 13px; background: var(--panel); }
.mn-issue-top {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: var(--space-2) var(--space-4); padding: var(--space-3) var(--space-4);
}
.mn-issue-identity { display: flex; flex: 1 1 275px; align-items: center; gap: var(--space-3); min-width: 0; }
.mn-issue-identity > div { min-width: 0; overflow-wrap: anywhere; }
.mn-issue-identity h1 { margin: 0; color: var(--ink); font-size: 20px; font-weight: 850; line-height: 1.5; }
.mn-issue-identity p { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.7; }
.mn-issue-identity .mn-back {
  display: grid; place-items: center; flex: none; width: 36px; height: 36px; min-height: 0;
  padding: 0; border: 1px solid var(--line); border-radius: 8px; color: var(--ink);
}
.mn-issue-identity .mn-back svg { width: 17px; height: 17px; }
.mn-tabs {
  display: flex; align-items: stretch; gap: var(--space-3); padding-inline: var(--space-4);
  border-top: 1px solid var(--line);
}
.mn-tab {
  min-height: 38px; border: 0; border-bottom: 2px solid transparent; border-radius: 0;
  padding: var(--space-1) var(--space-2); background: transparent; color: var(--muted);
  font: inherit; font-size: 13px; font-weight: 700; line-height: 1.5; cursor: pointer;
}
.mn-tab:hover, .mn-tab.on { color: #a64c1a; }
.mn-tab.on { border-bottom-color: var(--orange); }
.mn-issue-header :is(.mn-back, .mn-tab):focus-visible,
.mn-lesson-select:focus-visible { outline: 2px solid var(--orange); outline-offset: -2px; }
.mn-study-overview { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-1) var(--space-3); }
.mn-study-stat { display: inline-flex; align-items: baseline; gap: var(--space-1); color: var(--muted); font-size: 12px; white-space: nowrap; }
.mn-study-stat b { color: var(--ink); font-size: 14px; font-weight: 800; }
.mn-study-stat.is-done b { color: #3a7663; }
.mn-study-stat.is-unread b { color: #ac531e; }
.mn-study-progress { display: flex; align-items: center; flex: 1 0 52px; gap: var(--space-1); width: 92px; max-width: 105px; }
.mn-study-progress progress { min-width: 20px; }
.mn-study-progress b { color: #3a7663; font-size: 12px; white-space: nowrap; }
.mn-progress-loading { display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 55px; margin-bottom: 15px; border: 1px dashed #e6d8c5; border-radius: 12px; color: #9c8466; font-size: 11px; }
.mn-progress-loading button { font-size: 11px; }
.mn-issue-header .mn-progress-loading { min-height: 0; margin: 0; justify-content: flex-start; border: 0; color: var(--muted); }
.mn-lesson-overview { display: grid; gap: var(--space-2); }
.mn-lesson-overview:empty { display: none; }
.mn-lessons-head { display: flex; align-items: center; justify-content: space-between; gap: var(--space-2); }
.mn-lessons-head h2 { margin: 0; font-size: 15px; font-weight: 850; }
.mn-all-lessons { border: 1px solid var(--line); border-radius: 8px; background: var(--panel); color: var(--ink); padding: var(--space-1) var(--space-3); font: inherit; font-size: 12px; font-weight: 750; cursor: pointer; white-space: nowrap; }
.mn-all-lessons.on { color: #a64c1a; border-color: #ebcda9; background: #fff6e9; }
.mn-lesson-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 175px), 1fr)); gap: var(--space-2); }
.mn-lesson-card { display: flex; flex-direction: column; min-width: 0; overflow: hidden; background: var(--panel); border: 1px solid var(--line); border-radius: 11px; transition: border-color .2s; }
.mn-lesson-card.on { border-color: #e7b580; }
.mn-lesson-select { display: grid; flex: 1; align-content: start; gap: var(--space-1); width: 100%; padding: var(--space-2) var(--space-3); border: 0; background: transparent; text-align: start; font: inherit; cursor: pointer; }
.mn-lesson-select:hover { background: #fffcf7; }
.mn-lesson-top, .mn-lesson-meta { display: flex; align-items: center; justify-content: space-between; gap: var(--space-2); min-width: 0; }
.mn-lesson-title { display: flex; align-items: center; gap: var(--space-1); min-width: 0; color: var(--ink); }
.mn-lesson-title b { font-size: 13px; font-weight: 850; overflow-wrap: anywhere; }
.mn-lesson-title > svg { width: 15px; height: 15px; flex: none; color: #a87b50; }
.mn-lesson-top .mn-unread-dot { flex: none; height: 20px; min-width: 20px; border: 0; padding-inline: var(--space-1); background: #fff0e5; color: #a64c1a; box-shadow: none; font-size: 11px; }
.mn-lesson-check { display: grid; place-items: center; width: 20px; height: 20px; flex: none; color: #3a7663; }
.mn-lesson-check svg { width: 16px; height: 16px; }
.mn-lesson-meta { color: var(--muted); font-size: 11px; }
.mn-lesson-meta > span { flex: none; white-space: nowrap; }
.mn-lesson-meta progress { min-width: 0; }
.mn-lesson-rating { min-height: 28px; display: flex; align-items: center; justify-content: center; border-top: 1px solid var(--line); padding: 0 var(--space-2); color: var(--muted); font-size: 11px; text-align: center; line-height: 1.65; }
.mn-lesson-rating > span { display: inline-flex; align-items: center; gap: var(--space-1); }
.mn-rate-link { display: inline-flex; align-items: center; justify-content: center; gap: var(--space-1); align-self: stretch; width: 100%; background: transparent; border: 0; padding: 0; color: #93631c; font: inherit; font-weight: 750; cursor: pointer; }
.mn-rate-link svg { width: 14px; height: 14px; fill: #edd28d; }
.mn-rated { flex-wrap: wrap; justify-content: center; }
.mn-rated small { font-size: inherit; }
.mn-unread-toggle { display: flex; align-items: center; gap: var(--space-1); color: var(--muted); font-size: 12px; font-weight: 700; white-space: nowrap; cursor: pointer; }
.mn-unread-toggle input { width: 14px; height: 14px; accent-color: var(--orange); }
.mn-review-row { display: flex; justify-content: flex-end; margin-top: -6px; margin-bottom: 3px; }
.mn-review-row button { min-height: 32px; font-size: 10px; }
.mn-review-row .is-reviewed { color: #568975; background: #eff7f1; border-color: #d8e8dd; opacity: 1; }
.mn-rating-modal { width: min(440px, calc(100vw - 28px)); max-width: 440px; border-radius: 23px; overflow: hidden; }
.mn-rate-head { border-bottom: 0; padding: 16px 20px 0; }
.mn-rate-eyebrow { color: #ad9273; font-size: 10px; }
.mn-rate-body { text-align: center; padding: 9px 25px 4px; }
.mn-rate-emblem { display: grid; place-items: center; width: 62px; height: 62px; margin: 0 auto 19px; border: 1px solid #ecd7a1; border-radius: 21px; background: #fff4d8; color: #cca449; transform: rotate(-8deg); }
.mn-rate-emblem svg { width: 29px; height: 29px; fill: #f3db9a; transform: rotate(8deg); }
.mn-rate-body h2 { font-size: 17px; color: #574632; line-height: 1.9; font-weight: 900; margin: 0; }
.mn-rate-issue { color: #a88963; font-size: 11px; margin: 7px 0 17px; }
.mn-rate-description { font-size: 11px; color: #9a8b77; line-height: 2.1; margin: 0 0 21px; }
.mn-rate-body .sup-stars { display: flex; flex-direction: column; align-items: center; gap: 12px; }
.mn-rate-body .sup-stars-row { gap: 8px; }
.mn-rate-body .sup-star { width: 44px; height: 44px; color: #ded3bc; border-radius: 10px; background: #faf6ed; }
.mn-rate-body .sup-star svg { width: 30px; height: 30px; }
.mn-rate-body .sup-star.on { color: #dbad45; background: #fff4d5; }
.mn-rate-body .sup-star:focus-visible { outline: 2px solid #d7aa51; outline-offset: 3px; }
.mn-rate-body .sup-stars-value { color: #a58c69; font-size: 10px; font-weight: 650; }
.mn-rate-error { min-height: 18px; margin: 10px 0 0; color: #c86048; font-size: 11px; }
.mn-rate-footer { border-top: 1px solid #f0e7d9; background: #fdfbf7; padding: 16px 22px; gap: 12px; justify-content: space-between; }
.mn-rate-footer button { font-size: 11px; }
.mn-rate-footer .primary-button { min-width: 128px; }
.mn-rate-footer .primary-button:disabled { opacity: .5; cursor: default; }
@media (max-width: 760px) {
  body.mk-user-ui .student-shell .mn-library .mn-card { border-radius: 12px; }
  .mn-issue-top { padding: var(--space-2) var(--space-3); }
  .mn-issue-identity { flex-basis: 100%; gap: var(--space-2); }
  .mn-issue-identity h1 { font-size: 17px; }
  .mn-issue-top #mnStudyOverview { width: 100%; }
  .mn-tabs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--space-1); padding-inline: var(--space-2); }
  .mn-tab { min-height: 40px; padding-inline: var(--space-1); font-size: 12px; }
  .mn-lesson-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .mn-lesson-select { padding-inline: var(--space-2); }
  .mn-picked-toolbar .mn-unread-toggle { margin-inline-start: auto; }
  .mn-rating-modal { border-radius: 21px; }
  .mn-rate-body { padding-inline: 17px; }
  .mn-rate-body h2 { font-size: 16px; }
  .mn-rate-body .sup-stars-row { gap: 6px; }
  .mn-rate-footer { padding-inline: 17px; }
  .mn-rate-footer button { font-size: 10px; }
}
@media (max-width: 370px) {
  .mn-lesson-title > svg { display: none; }
  .mn-lesson-rating { padding-inline: var(--space-1); }
  .mn-study-overview { column-gap: var(--space-2); }
}
@media (prefers-reduced-motion: reduce) {
  .mn-unified-card, .mn-lesson-card, .mn-rate-body .sup-star { transition: none; }
}
body #modalRoot .modal-backdrop:has(.mn-rating-modal), body.mk-user-ui #modalRoot .modal-backdrop:has(.mn-rating-modal) { align-items: center; padding: 14px; }
body #modalRoot .modal.mn-rating-modal, body.mk-user-ui #modalRoot .modal.mn-rating-modal { width: min(440px, 100%); height: auto; min-height: 0; max-height: calc(100dvh - 28px); border-radius: 23px; overflow-y: auto; }
.student-shell .sidebar .nav-item .mn-nav-count {
  display: block;
  flex: 0 1 auto;
  margin-inline-start: auto;
  padding: 2px var(--space-2);
  border: 0;
  border-radius: 999px;
  background: color-mix(in srgb, var(--orange) 14%, var(--panel));
  color: color-mix(in srgb, var(--orange) 45%, var(--ink));
  font-size: 11px;
  font-weight: 750;
  font-variant-numeric: tabular-nums;
  line-height: 1.2;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
@media (min-width: 821px) {
  .app-shell.nav-mini .sidebar:not(.is-open, .open, :focus-within) .nav-item[data-sview="monthly"]:has(.mn-nav-count) {
    flex-direction: column;
    gap: var(--space-1);
    height: auto;
    min-height: 44px;
    padding: var(--space-1) 0;
  }
  .app-shell.nav-mini .sidebar:not(.is-open, .open, :focus-within) .nav-item[data-sview="monthly"]:has(.mn-nav-count)::before {
    inset-block-end: auto;
    block-size: 16px;
  }
  .app-shell.nav-mini .sidebar:not(.is-open, .open, :focus-within) .nav-item[data-sview="monthly"]:has(.mn-nav-count) > span:not(.mn-nav-count) { display: none; }
  .app-shell.nav-mini .sidebar:not(.is-open, .open, :focus-within) .nav-item[data-sview="monthly"] .mn-nav-count {
    flex: none;
    max-inline-size: calc(100% - var(--space-1));
    margin-inline: 0;
    padding-inline: var(--space-1);
    font-size: 10px;
  }
}

/* Monthly ingestion: readable controls and compact, stable table rows. */
.mi-compact-board { min-width: 0; --mi-text: #514c43; --mi-muted: #71695d; --mi-line: #e8e2d8; }
.mi-workshop-head { display: flex; align-items: center; flex-wrap: wrap; gap: 12px 22px; min-width: 0; margin: 0 0 16px; }
.mi-workshop-title { display: flex; align-items: baseline; flex-wrap: wrap; gap: 9px; }
.mi-workshop-title h1 { margin: 0; color: var(--ink); font-size: 22px; font-weight: 900; }
.mi-workshop-title > span { color: var(--mi-muted); font-size: 13px; }
.mi-workshop-head .mi-page-tabs { flex: 0 1 auto; width: auto; margin: 0; padding: 3px; border-radius: 10px; }
.mi-workshop-head .mi-page-tabs button { height: 36px; min-height: 36px; padding: 6px 12px; border-radius: 7px; font-size: 12px; }
.mi-workshop-head .mi-page-tabs .ui-icon { width: 16px; height: 16px; }
.mi-workshop-head .head-actions { display: flex; align-items: center; gap: 7px; margin-inline-start: auto; }
.mi-workshop-head .head-actions button { height: 36px; min-height: 36px; padding: 6px 12px; border-radius: 9px; font-size: 12px; white-space: nowrap; box-shadow: none; }
.mi-workshop-head .head-actions .icon-button { width: 36px; padding: 0; }
.mi-workshop-head .head-actions .ui-icon { width: 16px; height: 16px; }
.mi-compact-board .mi-toolbar { display: grid; grid-template-columns: minmax(0, 1fr); justify-content: stretch; gap: 0; padding: 12px 14px 0; margin-bottom: 12px; border: 1px solid var(--mi-line); border-radius: 14px; background: #fff; }
.mi-compact-board .mi-toolbar-end { display: flex; align-items: center; width: 100%; gap: 12px; margin: 0 0 10px; min-width: 0; }
.mi-compact-board .mi-search.mk-search-field:not([hidden]) { flex: 1 1 360px; width: auto; max-width: none; min-width: 0; height: 42px; min-block-size: 42px; padding: 0 12px; border: 1px solid #ded8ce; border-radius: 9px; background: #faf9f6; color: var(--mi-muted); outline: 0; }
.mi-compact-board .mi-search.mk-search-field:focus-within { border-color: #538f80; background: #fff; outline: 0; box-shadow: 0 0 0 3px #538f801a; }
.mi-compact-board .mi-search.mk-search-field > input,
.mi-compact-board .mi-search.mk-search-field > input:is(:focus, :focus-visible) { width: 0; min-width: 0; height: 40px; min-height: 0; padding: 0; border: 0; border-radius: 0; background: transparent; font-size: 14px; font-weight: 500; color: var(--mi-text); outline: 0; box-shadow: none; transform: none; }
.mi-compact-board .mi-search input::placeholder { color: #81796d; opacity: 1; }
.mi-compact-board .mi-search > svg { width: 18px; height: 18px; flex-basis: 18px; color: #71695d; }
.mi-compact-board .mi-search.mk-search-field > [data-search-clear] { display: grid; place-items: center; flex: none; width: 28px; height: 28px; min-height: 28px; padding: 0; border: 0; border-radius: 6px; background: #eeeae3; color: #675f53; box-shadow: none; }
.mi-compact-board .mi-search.mk-search-field > [data-search-clear] svg { width: 15px; height: 15px; }
.mi-monthly-select { display: flex; align-items: center; flex: 0 1 360px; gap: 9px; height: 42px; min-width: 0; margin: 0; padding-inline-start: 11px; border: 1px solid #ded8ce; border-radius: 9px; background: #fff; }
.mi-monthly-select > span { display: inline-flex; align-items: center; gap: 6px; flex: none; font-size: 12px; font-weight: 650; color: var(--mi-muted); }
.mi-monthly-select > span svg { width: 16px; height: 16px; }
.mi-compact-board .mi-toolbar-end #miMonthlyFilter { flex: 1 1 auto; width: 0; min-width: 0; height: 40px; min-height: 40px; padding: 5px 8px; border: 0; border-radius: 8px; background-color: transparent; color: var(--mi-text); font-size: 13px; box-shadow: none; }
.mi-monthly-select:focus-within { border-color: #538f80; box-shadow: 0 0 0 3px #538f801a; }
.mi-compact-board #miMonthlyFilter:focus { outline: 0; }
.mi-guide-button { display: inline-flex; align-items: center; justify-content: center; gap: 6px; flex: none; height: 38px; min-height: 38px; padding: 6px 10px; border: 0; border-radius: 8px; background: transparent; color: #625c51; font-size: 12px; font-weight: 650; white-space: nowrap; box-shadow: none; }
.mi-guide-button svg { width: 17px; height: 17px; }
.mi-guide-button:hover { background: #f4f1eb; }
.mi-compact-board .mi-filter-tabs { display: flex; gap: 4px; width: 100%; padding: 9px 0; border-top: 1px solid #eeeae3; }
.mi-compact-board .mi-filter-tabs button { gap: 7px; height: 34px; min-height: 34px; padding: 5px 11px; border: 1px solid transparent; border-radius: 8px; background: transparent; color: #696155; font-size: 12px; font-weight: 650; white-space: nowrap; box-shadow: none; }
.mi-compact-board .mi-filter-tabs button:hover { background: #f6f4ef; }
.mi-compact-board .mi-filter-tabs button.on { border-color: #c8ddd5; background: #edf5f1; color: #2e6d5a; }
.mi-compact-board .mi-filter-tabs button b { display: grid; place-items: center; min-width: 22px; height: 22px; padding-inline: 5px; border-radius: 6px; background: #f0ede7; color: #6c6458; font-size: 12px; }
.mi-compact-board .mi-filter-tabs button.on b { background: #dcece4; color: #2e6d5a; }
.mi-compact-monthly { gap: 8px; margin-bottom: 22px; }
.mi-compact-monthly > .mi-monthly-head { gap: 10px; padding: 0 2px 7px; border-bottom: 0; }
.mi-compact-monthly > .mi-monthly-head > div { display: flex; align-items: center; flex-wrap: wrap; gap: 9px; flex: 1; }
.mi-compact-monthly .mi-monthly-head h2 { margin: 0; font-size: 16px; line-height: 1.8; }
.mi-monthly-count { color: #71695d; background: #eeeae2; padding: 2px 8px; border-radius: 6px; font-size: 12px; white-space: nowrap; }
.mi-compact-monthly > .mi-monthly-head > button { height: 32px; min-height: 32px; padding: 4px 8px; font-size: 12px; color: #965a22; }
.mi-compact-monthly > .mi-monthly-head > button svg { width: 15px; height: 15px; }
.mi-compact-monthly .mi-exam-grid { gap: 12px; }
.mi-exam.mi-compact-exam { display: block; padding: 0; overflow: hidden; border: 1px solid var(--mi-line); border-radius: 13px; box-shadow: none; background: #fff; }
.mi-compact-exam.is-mine { border-color: #d8ba95; }
.mi-compact-exam > .mi-exam-head { flex-wrap: nowrap; gap: 12px; padding: 12px 14px; background: #fcfbf8; border-bottom: 1px solid var(--mi-line); }
.mi-compact-exam .mi-exam-icon, .mi-compact-exam .mi-exam-logo { width: 36px; height: 38px; border-radius: 9px; }
.mi-compact-exam .mi-exam-icon .ui-icon { width: 21px; height: 21px; }
.mi-compact-exam .mi-exam-title { gap: 4px; }
.mi-compact-exam .mi-exam-title h2 { font-size: 15px; font-weight: 850; line-height: 1.7; }
.mi-compact-exam .mi-exam-title p { gap: 5px 12px; color: var(--mi-muted); font-size: 12px; }
.mi-compact-exam .mi-exam-title p span + span::before { content: none; }
.mi-compact-exam .mi-exam-overall { flex: 0 0 146px; display: grid; grid-template-columns: auto 1fr; justify-items: start; align-items: center; gap: 5px 7px; }
.mi-compact-exam .mi-exam-overall b { font-size: 16px; color: #42765a; }
.mi-compact-exam .mi-exam-overall small { color: var(--mi-muted); font-size: 11px; justify-self: end; white-space: nowrap; }
.mi-compact-exam .mi-exam-bar { grid-column: 1 / -1; height: 4px; }
.mi-exam-header-tools { display: flex; align-items: center; gap: 7px; flex: none; margin-inline-start: 6px; }
.mi-exam-header-tools .mi-exam-hours { color: #8e5b31; font-size: 12px; padding: 5px 7px; white-space: nowrap; }
.mi-compact-file { display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 34px; min-height: 34px; padding: 5px 10px; border: 1px solid #d8dfd1; border-radius: 8px; background: #f3f7ef; color: #4d6e50; text-decoration: none; font: inherit; font-size: 12px; font-weight: 750; white-space: nowrap; }
.mi-compact-file svg { width: 15px; height: 15px; }
.mi-compact-file.is-missing { border-color: #eedbc9; background: #fff4e8; color: #96682f; }
.mi-compact-exam .mi-exam-edit { width: 34px; min-width: 34px; height: 34px; min-height: 34px; padding: 0; border-radius: 8px; }
.mi-compact-exam .mi-exam-edit svg { width: 16px; height: 16px; }
.mi-lesson-table-wrap { width: 100%; max-width: 100%; overflow-x: auto; overscroll-behavior-x: contain; scrollbar-width: thin; scrollbar-color: #c9c0b0 #faf8f3; }
.mi-lesson-table-wrap:focus-visible { outline: 2px solid #538f80; outline-offset: -2px; }
.mi-lesson-table { width: 100%; min-width: 1120px; table-layout: fixed; border-collapse: collapse; text-align: right; }
.mi-lesson-table thead th { height: 36px; padding: 7px 12px; background: #f6f4ef; border-bottom: 1px solid var(--mi-line); color: #6c6356; font-size: 12px; font-weight: 650; white-space: nowrap; }
.mi-lesson-table thead th:nth-child(1) { width: 13%; }
.mi-lesson-table thead th:nth-child(2) { width: 10%; }
.mi-lesson-table thead th:nth-child(3) { width: 12%; }
.mi-lesson-table thead th:nth-child(4) { width: 10%; }
.mi-lesson-table thead th:nth-child(5) { width: 13%; }
.mi-lesson-table thead th:nth-child(6) { width: 12%; }
.mi-lesson-table thead th:nth-child(7) { width: 30%; }
.mi-lesson-table tbody > tr > th, .mi-lesson-table tbody > tr > td { padding: 9px 12px; height: 68px; vertical-align: middle; border-bottom: 1px solid #eeeae3; color: var(--mi-muted); font-size: 13px; line-height: 1.7; }
.mi-lesson-table tbody > tr:last-child > * { border-bottom: 0; }
.mi-lesson-table .mi-lesson-row.is-mine { background: #fffaf2; }
.mi-lesson-table .mi-lesson-row:hover { background: #faf9f6; }
.mi-row-lesson { display: flex; align-items: center; gap: 8px; color: var(--mi-text); font-size: 14px; font-weight: 800; }
.mi-row-lesson > i { flex: none; width: 7px; height: 7px; background: var(--tint, #9b8c73); border-radius: 50%; }
.mi-row-context { display: block; margin-top: 3px; color: var(--mi-muted); font-size: 12px; font-weight: 400; line-height: 1.7; }
.mi-lesson-table .mi-status { padding: 4px 8px; gap: 5px; font-size: 12px; white-space: nowrap; }
.mi-row-progress > span { display: flex; align-items: baseline; gap: 5px; margin-bottom: 5px; }
.mi-row-progress b { color: var(--mi-text); font-size: 15px; }
.mi-row-progress small { font-size: 12px; color: var(--mi-muted); }
.mi-row-progress .mi-progress { height: 4px; max-width: 120px; }
.mi-row-progress .mi-progress i { background: var(--tint, #9b8c73); opacity: .85; }
.mi-row-progress-note { display: block; margin-top: 3px; }
.mi-row-owner { overflow-wrap: anywhere; }
.mi-row-owner.is-mine { color: #966128; font-weight: 750; }
.mi-row-deadline { font-size: 12px !important; }
.mi-lesson-row.status-expired .mi-row-deadline { color: #a65537; }
.mi-row-notes { display: inline-flex; align-items: center; gap: 4px; height: 24px; min-height: 24px; margin-top: 3px; padding: 0; border: 0; border-radius: 4px; background: transparent; color: #94612e; font-size: 12px; font-weight: 500; box-shadow: none; }
.mi-row-notes svg { width: 13px; height: 13px; }
.mi-row-notes:hover { text-decoration: underline; }
.mi-pay-button { display: grid; grid-template-columns: auto 15px; align-items: center; justify-content: start; column-gap: 7px; height: auto; min-height: 40px; padding: 3px 0; border: 0; border-radius: 5px; background: transparent; color: var(--mi-text); text-align: right; box-shadow: none; }
.mi-pay-button b { color: #426d50; font-size: 14px; font-weight: 750; }
.mi-pay-button small { grid-column: 1 / -1; grid-row: 2; color: var(--mi-muted); font-size: 12px; font-weight: 400; }
.mi-pay-button svg { width: 14px; height: 14px; color: #887f71; }
.mi-pay-button:hover b, .mi-pay-button:hover svg { color: #285b3a; }
.mi-row-actions { display: flex; align-items: center; gap: 6px; min-width: 0; }
.mi-row-actions .mi-tile-main { display: grid; grid-template-columns: repeat(2, 100px); gap: 6px; flex: 0 0 206px; }
.mi-row-actions .mi-tile-main button { display: inline-flex; align-items: center; justify-content: center; box-sizing: border-box; width: 100px; height: 34px; min-height: 34px; margin: 0; padding: 4px 6px; gap: 5px; font-size: 12px; line-height: 1.5; border-radius: 8px; white-space: nowrap; box-shadow: none; }
.mi-row-actions .mi-tile-main button .ui-icon { width: 15px; height: 15px; }
.mi-row-actions .mi-tile-tools { margin-inline-start: auto; gap: 2px; }
.mi-row-actions .mi-tile-tool { width: 28px; height: 32px; min-height: 32px; padding: 0; border-radius: 6px; color: #817360; }
.mi-row-actions .mi-tile-tool:hover { background: #f0ece5; color: #4f473b; }
.mi-row-actions .mi-tile-tool .ui-icon { width: 15px; height: 15px; }
body #modalRoot .modal-backdrop:has(.mi-row-info-dialog) { align-items: center; padding: 16px; }
body #modalRoot .modal.mi-row-info-dialog { width: min(480px, 100%); height: auto; min-height: 0; max-height: calc(100dvh - 32px); border-radius: 16px; overflow-y: auto; }
.mi-row-info-dialog .modal-head { padding: 18px 20px; }
.mi-row-info-dialog .modal-head h2 { margin: 0; font-size: 17px; line-height: 1.7; }
.mi-row-info-dialog .modal-head p { margin: 4px 0 0; color: #71695d; font-size: 13px; }
.mi-row-info-dialog .mi-info-body { display: grid; gap: 16px; padding: 18px 20px 22px; color: #514c43; font-size: 14px; line-height: 1.9; }
.mi-info-estimate { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px; padding: 13px 14px; border-radius: 10px; background: #edf5f0; color: #35634c; }
.mi-info-estimate strong { font-size: 21px; }
.mi-info-estimate strong small { font-size: 12px; font-weight: 500; }
.mi-row-info-dialog .mi-rate { margin: 0; padding: 0; border: 0; background: transparent; gap: 10px; }
.mi-row-info-dialog .mi-rate b { font-size: 14px; color: #514c43; }
.mi-row-info-dialog .mi-rate small { margin-top: 8px; font-size: 13px; color: #71695d; line-height: 1.9; }
.mi-row-info-dialog .mi-rate-mark { font-size: 17px; }
.mi-info-caption { margin: 0; color: #71695d; font-size: 12px; }
.mi-info-list { display: grid; gap: 10px; margin: 0; padding-inline-start: 20px; }
.mi-info-counts { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 0; }
.mi-info-counts > div { display: flex; justify-content: space-between; gap: 8px; padding: 8px 10px; border-radius: 8px; background: #f5f3ee; }
.mi-info-counts dd { margin: 0; font-weight: 750; }
@media (max-width: 1200px) {
  .mi-workshop-title > span { display: none; }
  .mi-workshop-head { gap: 10px; }
  .mi-compact-board .mi-filter-tabs { overflow-x: auto; flex-wrap: nowrap; }
  .mi-compact-board .mi-filter-tabs button { flex: none; }
  .mi-compact-exam > .mi-exam-head { flex-wrap: wrap; }
  .mi-compact-exam .mi-exam-title { flex: 1 1 220px; }
  .mi-exam-header-tools { margin-inline-start: auto; }
}
@media (max-width: 760px) {
  .mi-workshop-head { gap: 10px 6px; margin-bottom: 12px; }
  .mi-workshop-title { flex: 1; }
  .mi-workshop-title h1 { font-size: 19px; }
  .mi-workshop-head .mi-page-tabs { order: 3; flex: 1 1 100%; width: 100%; }
  .mi-workshop-head .head-actions { gap: 5px; }
  .mi-workshop-head .head-actions button { height: 36px; min-height: 36px; font-size: 12px; padding-inline: 9px; }
  .mi-compact-board .mi-toolbar { padding: 10px 10px 0; }
  .mi-compact-board .mi-toolbar-end { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 9px; }
  .mi-compact-board .mi-search.mk-search-field:not([hidden]) { grid-column: 1 / -1; width: 100%; height: 44px; min-block-size: 44px; }
  .mi-compact-board .mi-search.mk-search-field > input, .mi-compact-board .mi-search.mk-search-field > input:is(:focus, :focus-visible) { font-size: 16px; height: 42px; }
  .mi-monthly-select { width: 100%; }
  .mi-monthly-select > span { display: none; }
  .mi-compact-board .mi-toolbar-end #miMonthlyFilter { flex: 1; width: 100%; }
  .mi-guide-button { padding-inline: 6px; }
  .mi-compact-board .mi-filter-tabs { gap: 3px; padding-block: 8px; }
  .mi-compact-monthly .mi-monthly-head h2 { font-size: 14px; }
  .mi-compact-monthly .mi-monthly-head > div { gap: 6px; }
  .mi-compact-exam > .mi-exam-head { padding: 10px 12px; gap: 10px; }
  .mi-compact-exam .mi-exam-title { flex: 1 1 210px; }
  .mi-compact-exam .mi-exam-overall { flex: 0 0 140px; }
  .mi-exam-header-tools { gap: 5px; }
  .mi-exam-header-tools .mi-exam-hours { border: 0; padding-inline: 2px; }
  .mi-compact-file { padding-inline: 8px; }
  .mi-lesson-table { min-width: 1180px; }
  .mi-row-actions .mi-tile-tool { width: 34px; height: 36px; min-height: 36px; }
}

/* Monthly admin compact tables and feedback */
.mn-admin-page-head { gap: 16px; margin-bottom: 16px; align-items: center; }
.mn-admin-page-head h1 { margin: 0; font-size: 23px; line-height: 1.7; }
.mn-admin-page-head p { margin: 3px 0 0; color: var(--muted); font-size: 11px; }
.mn-admin-page-head > .primary-button { flex: none; min-height: 38px; font-size: 11px; }
.mn-admin-table-panel { min-width: 0; border: 1px solid #e5dccf; border-radius: 15px; background: #fff; overflow: hidden; }
.mn-admin-table-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 48px; padding: 8px 16px; border-bottom: 1px solid #ebe3d8; color: #817463; font-size: 11px; }
.mn-admin-table-toolbar > span { font-weight: 800; }
.mn-admin-table-toolbar > div { display: flex; align-items: center; gap: 6px; }
.mn-admin-table-toolbar small { font-size: 10px; }
.mn-admin-table-toolbar .ghost-button { display: grid; place-items: center; width: 28px; height: 28px; min-height: 0; padding: 4px; border-radius: 8px; }
.mn-admin-table-toolbar .ghost-button svg { width: 14px; height: 14px; }
.mn-admin-table-scroll { width: 100%; overflow-x: auto; overscroll-behavior-x: contain; scrollbar-width: thin; scrollbar-color: #d6c8b5 #fbf8f3; }
.mn-admin-table-scroll:focus-visible { outline: 2px solid #dba16b; outline-offset: -2px; }
.mn-admin-table { width: 100%; min-width: 1000px; border-collapse: collapse; text-align: right; font-size: 11px; }
.mn-admin-table thead { background: #faf7f2; }
.mn-admin-table thead th { padding: 12px 13px; color: #8b7f6d; font-size: 10px; font-weight: 750; white-space: nowrap; }
.mn-admin-table th, .mn-admin-table td { border: 0; border-bottom: 1px solid #f0e9df; vertical-align: middle; }
.mn-admin-table tbody td, .mn-admin-table tbody th { height: 76px; padding: 12px 13px; }
.mn-admin-table tbody tr:last-child td, .mn-admin-table tbody tr:last-child th { border-bottom: 0; }
.mn-admin-table tbody tr:hover { background: #fffdf9; }
.mn-admin-table .mn-admin-identity { min-width: 225px; font-weight: 400; }
.mn-admin-identity b { display: block; color: #514638; font-size: 12px; font-weight: 850; line-height: 1.8; white-space: nowrap; }
.mn-admin-identity small { display: block; margin-top: 3px; color: #a09380; font-size: 10px; line-height: 1.7; max-width: 270px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mn-admin-table .mn-admin-number { min-width: 58px; color: #776954; font-size: 13px; font-weight: 750; text-align: center; font-variant-numeric: tabular-nums; }
.mn-admin-table thead th:not(:first-child):not(:last-child) { text-align: center; }
.mn-admin-table .mn-admin-picked { color: #ce6b25; }
.mn-admin-table .mn-admin-lessons { min-width: 100px; max-width: 190px; line-height: 1.9; color: #7c705e; }
.mn-admin-table .mn-admin-status { display: inline-flex; align-items: center; gap: 5px; height: 27px; min-width: 79px; padding: 4px 7px; border-radius: 8px; font-size: 9px; white-space: nowrap; }
.mn-admin-row-actions { display: flex; align-items: center; gap: 6px; flex-wrap: nowrap; }
.mn-admin-row-actions > .secondary-button { min-height: 32px; height: 32px; border-radius: 8px; padding: 6px 9px; color: #826b50; background: #fff; border-color: #e6dac9; font-size: 10px; white-space: nowrap; }
.mn-admin-row-actions > .secondary-button:first-child { color: #c46b2d; background: #fff8ef; border-color: #ecd7bb; }
.mn-admin-menu { flex: none; }
.mn-admin-menu > summary { width: 30px; height: 32px; border-radius: 8px; background: #fff; border-color: #e6dac9; color: #978872; }
.mn-admin-menu > summary svg { width: 16px; height: 16px; }
.mn-admin-menu .orgm-action-popover { width: 190px; z-index: 140; }
.mn-admin-menu .orgm-action-popover button { min-height: 36px; font-size: 11px; }
.mn-admin-feedback-link { display: inline-flex; align-items: center; justify-content: center; gap: 9px; width: 100%; min-width: 105px; padding: 3px 0; color: #8e795a; border: 0; border-radius: 7px; background: transparent; font: inherit; cursor: pointer; }
.mn-admin-feedback-link:hover { color: #bc852e; background: #fdf8ed; }
.mn-admin-feedback-link:focus-visible { outline: 2px solid #d9ad59; outline-offset: 3px; }
.mn-admin-feedback-link > span { display: grid; gap: 3px; justify-items: center; }
.mn-admin-feedback-link > svg { width: 12px; height: 12px; color: #bbae96; }
.mn-admin-feedback-link small { font-size: 9px; color: #a2947d; }
.mn-feedback-number { display: inline-flex; align-items: center; gap: 4px; white-space: nowrap; }
.mn-feedback-number > svg { width: 14px; height: 14px; color: #d8ab43; fill: #edcf86; }
.mn-feedback-number b { font-size: 13px; color: #89703b; }
.mn-feedback-empty { color: #b1a692; font-weight: 500; font-size: 10px; }
.mn-admin-empty { padding: 38px 20px; }
[data-mn-admin-rating-status].is-error { color: #bf634b; }
body #modalRoot .modal.mn-edit-modal { width: min(640px, calc(100vw - 28px)); height: auto; min-height: 0; max-height: calc(100dvh - 28px); border-radius: 18px; }
.mn-edit-modal .modal-head { padding: 18px 22px; }
.mn-edit-modal .modal-head h2 { font-size: 16px; }
.mn-edit-modal .mn-edit-body { display: grid; gap: 18px; padding: 22px; }
.mn-edit-grid { display: grid; grid-template-columns: 1fr 1.25fr 1fr; gap: 14px; }
.mn-edit-grid .field { min-width: 0; }
.mn-edit-body .field { gap: 8px; }
.mn-edit-body .field input, .mn-edit-body .field select { min-height: 42px; height: 42px; margin: 0; font-size: 12px; }
.mn-edit-body .field label { color: #776852; font-size: 11px; }
.mn-field-optional { color: #b2a48e; font-weight: 400; }
.mn-edit-scope-note { display: flex; align-items: center; gap: 7px; margin: -1px 0 0; padding: 10px 12px; border: 1px solid #eee5d7; border-radius: 9px; background: #fcfaf5; color: #a08c70; font-size: 10px; line-height: 1.9; }
.mn-edit-scope-note svg { width: 15px; height: 15px; flex: none; color: #b79a6e; }
.mn-edit-modal .modal-footer { gap: 10px; padding: 15px 22px; background: #fdfbf7; }
.mn-edit-modal .modal-footer button { min-height: 36px; padding: 7px 16px; font-size: 11px; }
body #modalRoot .modal.mn-feedback-modal { width: min(620px, calc(100vw - 28px)); height: auto; min-height: 0; max-height: calc(100dvh - 28px); border-radius: 18px; }
.mn-feedback-modal .modal-head { padding: 18px 22px; }
.mn-feedback-modal .modal-head h2 { margin: 0; font-size: 16px; }
.mn-feedback-subtitle { margin: 5px 0 0; color: #a18d72; font-size: 11px; }
.mn-feedback-modal .mn-feedback-body { padding: 18px 22px 22px; }
.mn-feedback-total { display: flex; align-items: center; gap: 10px; padding: 12px 13px; margin-bottom: 16px; border: 1px solid #ecdcb8; border-radius: 10px; color: #9a8152; background: #fffbf1; font-size: 11px; }
.mn-feedback-total strong { margin-inline-start: auto; color: #8f7135; font-size: 20px; }
.mn-feedback-total strong small { font-weight: 500; font-size: 10px; }
.mn-feedback-total > span:last-child { margin-inline-start: 5px; padding-inline-start: 12px; border-inline-start: 1px solid #eadbb8; font-size: 10px; }
.mn-feedback-table { width: 100%; border-collapse: collapse; font-size: 12px; text-align: right; }
.mn-feedback-table th, .mn-feedback-table td { padding: 13px 10px; border: 0; border-bottom: 1px solid #eee7da; }
.mn-feedback-table thead th { color: #a6967f; background: #fcfaf6; font-weight: 600; font-size: 10px; }
.mn-feedback-table tbody th { color: #77654c; font-weight: 700; }
.mn-feedback-table th:last-child, .mn-feedback-table td:last-child { text-align: center; color: #9b886c; }
.mn-feedback-table tbody tr:last-child th, .mn-feedback-table tbody tr:last-child td { border-bottom: 0; }
.mn-feedback-score { display: inline-flex; align-items: center; gap: 10px; color: #9c7c36; }
.mn-feedback-score > b { min-width: 24px; font-weight: 750; font-variant-numeric: tabular-nums; }
.mn-feedback-stars { display: inline-block; position: relative; direction: ltr; white-space: nowrap; font: 17px/1.2 Arial, sans-serif; letter-spacing: 2px; color: #e6dfd1; }
.mn-feedback-stars i { position: absolute; left: 0; top: 0; overflow: hidden; color: #d6ab4b; font: inherit; }
.mn-feedback-state { margin: 0; padding: 18px 0; color: #a39177; font-size: 12px; text-align: center; line-height: 2; }
.mn-feedback-modal .mn-feedback-footer { gap: 9px; padding: 13px 20px; background: #fcfaf6; }
.mn-feedback-footer > span { margin-inline-end: auto; color: #a18d72; font-size: 10px; }
.mn-feedback-footer button { min-height: 33px; font-size: 10px; padding: 6px 10px; }
.mn-feedback-footer button svg { width: 13px; height: 13px; }
@media (max-width: 760px) {
  .mn-admin-page-head { gap: 10px; }
  .mn-admin-page-head h1 { font-size: 20px; }
  .mn-admin-page-head p { max-width: 210px; font-size: 10px; line-height: 1.9; }
  .mn-admin-page-head > .primary-button { font-size: 10px; padding-inline: 10px; }
  .mn-admin-table-toolbar { padding-inline: 12px; }
  .mn-admin-table-toolbar small { max-width: 170px; font-size: 9px; }
  .mn-admin-table { min-width: 965px; }
  body #modalRoot .modal-backdrop:has(.mn-edit-modal), body #modalRoot .modal-backdrop:has(.mn-feedback-modal) { align-items: center; padding: 14px; }
  .mn-edit-modal .modal-head, .mn-feedback-modal .modal-head { padding: 15px 17px; }
  .mn-edit-modal .mn-edit-body, .mn-feedback-modal .mn-feedback-body { padding: 17px; gap: 16px; }
  .mn-edit-grid { gap: 8px; grid-template-columns: .9fr 1.2fr 1fr; }
  .mn-edit-body .field label { font-size: 10px; }
  .mn-edit-body .field input, .mn-edit-body .field select { padding-inline: 8px; font-size: 11px; }
  .mn-edit-scope-note { align-items: flex-start; padding: 9px; font-size: 9px; }
  .mn-edit-scope-note svg { margin-top: 3px; }
  .mn-edit-modal .modal-footer { padding: 13px 17px; }
  .mn-feedback-total { gap: 6px; padding: 10px; font-size: 10px; }
  .mn-feedback-total strong { font-size: 17px; }
  .mn-feedback-total > span:last-child { padding-inline-start: 7px; margin-inline-start: 0; font-size: 9px; }
  .mn-feedback-table th, .mn-feedback-table td { padding: 12px 5px; font-size: 11px; }
  .mn-feedback-score { gap: 6px; }
  .mn-feedback-stars { font-size: 15px; letter-spacing: 1px; }
  .mn-feedback-footer { flex-wrap: wrap; }
  .mn-feedback-footer > span { flex-basis: 100%; }
}

/* Monthly ingestion owner reservations */
.mi-status.reserved { background: #eeeaf7; color: #77658b; }
.mi-status.reserved > i { background: #9b87b5; }
.mi-reservation-owner { display: inline-flex; align-items: center; gap: 4px; }
.mi-reservation-owner .ui-icon { width: 12px; height: 12px; flex: none; color: #9680ab; }
.mi-reservation-hint, .mi-reservation-note { display: flex; align-items: center; gap: 6px; margin: -2px 2px 12px; color: #71695d; font-size: 12px; line-height: 1.9; }
.mi-reservation-hint .ui-icon, .mi-reservation-note .ui-icon { width: 13px; height: 13px; flex: none; color: #9b87b5; }
.mi-row-actions .mi-reserve-button { border-color: #e0d7e8; background: #f7f4fa; color: #88749d; }
.mi-row-actions .mi-release-reservation { border-color: #e5ddd3; background: #fff; color: #a18c76; }
.mi-row-actions .mi-reserve-button:disabled, .mi-row-actions .mi-release-reservation:disabled { cursor: wait; }
@media (max-width: 650px) {
  .mi-reservation-hint { align-items: flex-start; margin-bottom: 11px; font-size: 12px; }
  .mi-reservation-hint .ui-icon { margin-top: 3px; }
}

/* Exam-bank publication queue: compact rows, single-line cells and clear column rules. */
.ebp-banner { display:flex; align-items:center; gap:14px; width:100%; min-width:0; margin:0 0 18px; padding:16px 18px; border:1px solid color-mix(in srgb,var(--teal) 28%,var(--line)); border-radius:12px; background:var(--teal-soft); color:var(--ink); text-align:start; font:inherit; }
.ebp-banner > .ui-icon { width:24px; height:24px; flex:none; color:var(--teal); }
.ebp-banner-copy { display:grid; gap:4px; flex:1; min-width:0; }
.ebp-banner-copy strong { font-size:14px; }
.ebp-banner-copy small { color:var(--muted); font-size:13px; line-height:1.8; }
.ebp-banner > button { flex:none; font-size:13px; min-height:36px; }
.ebp-folder-badge { display:inline-flex; align-items:center; gap:6px; max-width:100%; margin-top:6px; padding:4px 8px; border:1px solid color-mix(in srgb,var(--teal) 26%,var(--line)); border-radius:7px; background:var(--teal-soft); color:color-mix(in srgb,var(--teal) 78%,var(--ink)); font:inherit; font-size:13px; font-weight:700; line-height:1.7; white-space:normal; text-align:start; }
button.ebp-folder-badge { cursor:pointer; }
button.ebp-folder-badge:hover { border-color:var(--teal); }
.ebp-folder-badge .ui-icon { width:15px; height:15px; flex:none; }
.rsv-lesson .ebp-folder-badge { margin-top:0; }
.ebp-page { min-width:0; --ebp-green:color-mix(in srgb,#27886c 82%,var(--ink)); --ebp-amber:color-mix(in srgb,#b98327 82%,var(--ink)); --ebp-red:color-mix(in srgb,#b75f5c 82%,var(--ink)); --ebp-blue:color-mix(in srgb,#587dab 82%,var(--ink)); }
.ebp-page .page-head { align-items:center; gap:12px; margin-bottom:12px; }
.ebp-page .page-head h1 { margin:0; font-size:22px; line-height:1.6; font-weight:800; }
.ebp-page button, .ebp-page input, .ebp-page select { font-family:inherit; }
.ebp-page .secondary-button, .ebp-page .primary-button, .ebp-page .ghost-button { height:34px; min-height:34px; padding:6px 11px; font-size:13px; line-height:1.6; }
.ebp-summary { display:flex; align-items:center; gap:4px; width:fit-content; max-width:100%; padding:4px; margin-bottom:12px; border:1px solid var(--line); border-radius:10px; background:var(--panel-soft,var(--bg)); }
.ebp-page .ebp-mode { display:inline-flex; align-items:center; gap:12px; min-width:0; min-height:34px; padding:6px 12px; font-size:13px; border:0; border-radius:7px; background:transparent; color:var(--muted); text-align:start; white-space:nowrap; cursor:pointer; transition:background .15s; }
.ebp-page .ebp-mode:hover { color:var(--ink); }
.ebp-page .ebp-mode.is-active { background:var(--panel); color:var(--ebp-green); box-shadow:0 2px 7px #51472c0b; }
.ebp-mode > strong { font-size:13px; font-weight:650; }
.ebp-mode > b { min-width:22px; padding:1px 5px; border-radius:5px; background:color-mix(in srgb,var(--muted) 9%,var(--panel)); font-size:14px; line-height:1.5; text-align:center; font-weight:750; font-variant-numeric:tabular-nums; }
.ebp-mode-ready > b { color:var(--ebp-green); }
.ebp-page .ebp-panel { padding:0; min-width:0; border-radius:10px; overflow:visible; border:1px solid var(--line); background:var(--panel); }
.ebp-panel-head { display:flex; align-items:center; justify-content:space-between; gap:12px; padding:12px 14px 10px; }
.ebp-panel-head > div { display:flex; align-items:center; gap:12px; min-width:0; }
.ebp-panel-head h2 { margin:0; font-size:15px; font-weight:750; color:var(--ink); white-space:nowrap; }
.ebp-panel-head p { margin:0; font-size:13px; color:var(--muted); white-space:nowrap; }
.ebp-panel-head p > span { margin:0 4px; color:var(--line); }
.ebp-page .ebp-search { display:flex; align-items:center; gap:8px; width:290px; max-width:42%; min-height:34px; padding:0 10px; border:1px solid var(--line); border-radius:7px; background:var(--bg); }
.ebp-search .ui-icon { width:16px; height:16px; flex:none; color:var(--muted); }
.ebp-page .ebp-search input { width:100%; min-width:0; min-height:32px; border:0; outline:0; background:transparent; color:var(--ink); padding:5px 0; font-size:13px; box-shadow:none; }
.ebp-search:focus-within { outline:2px solid var(--teal); outline-offset:2px; }
.ebp-toolbar { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); align-items:center; gap:12px; padding:0 14px 10px; }
.ebp-toolbar label { display:flex; align-items:center; gap:7px; min-width:0; color:var(--muted); font-size:13px; }
.ebp-toolbar label > span { flex:none; }
.ebp-page .ebp-toolbar select { width:100%; min-width:0; min-height:32px; padding:5px 8px; border:1px solid var(--line); border-radius:6px; background:var(--panel); color:var(--ink); font-size:13px; }
.ebp-criteria { padding:0 14px; border-top:1px solid var(--line); background:color-mix(in srgb,var(--bg) 65%,var(--panel)); color:var(--muted); font-size:13px; line-height:1.7; }
.ebp-criteria summary { padding:7px 0; cursor:pointer; color:var(--ink); }
.ebp-criteria summary > span { margin-inline-start:12px; color:var(--muted); }
.ebp-criteria > div { display:flex; align-items:center; gap:18px; padding-bottom:10px; }
.ebp-criteria p { margin:0; flex:1; line-height:1.9; }
.ebp-criteria label { display:grid; gap:6px; flex:0 0 240px; }
.ebp-page .ebp-criteria input { width:100%; min-height:32px; padding:5px 8px; border:1px solid var(--line); border-radius:6px; background:var(--panel); color:var(--ink); font-size:13px; }
.ebp-scope { display:flex; align-items:center; justify-content:space-between; gap:10px; padding:6px 14px; background:var(--teal-soft); color:var(--ink); font-size:13px; }
.ebp-scope > span { min-width:0; overflow-wrap:anywhere; }
.ebp-table-tools { display:flex; align-items:center; justify-content:space-between; gap:10px; flex-wrap:wrap; padding:8px 14px; border-top:1px solid var(--line); color:var(--muted); font-size:13px; }
.ebp-table-tools label { display:inline-flex; align-items:center; gap:8px; color:var(--ink); cursor:pointer; }
.ebp-page .check { width:16px; height:16px; flex:none; accent-color:var(--orange); cursor:pointer; }
.ebp-page .check:disabled { cursor:default; }
.ebp-table-scroll { max-width:100%; overflow:auto; max-height:650px; max-height:min(650px,70dvh); scrollbar-width:thin; scrollbar-color:color-mix(in srgb,var(--muted) 45%,var(--line)) var(--bg); border-top:1px solid var(--line); border-bottom:1px solid var(--line); overscroll-behavior-inline:contain; }
.ebp-page .ebp-table { width:100%; min-width:1370px; table-layout:fixed; border-collapse:separate; border-spacing:0; margin:0; text-align:start; color:var(--ink); font-size:13px; }
.ebp-table .sr-only { position:absolute; width:1px; height:1px; padding:0; margin:-1px; overflow:hidden; clip:rect(0,0,0,0); white-space:nowrap; border:0; }
.ebp-page .ebp-table th, .ebp-page .ebp-table td { padding:6px 8px; border:0; border-bottom:1px solid var(--line); border-inline-end:1px solid var(--line); vertical-align:middle; background:var(--panel); white-space:nowrap; }
.ebp-page .ebp-table th:last-child, .ebp-page .ebp-table td:last-child { border-inline-end:0; }
.ebp-page .ebp-table thead th { position:sticky; top:0; z-index:3; padding:0 6px; height:38px; background:color-mix(in srgb,var(--bg) 78%,var(--panel)); color:var(--muted); font-size:13px; font-weight:650; text-align:center; box-shadow:0 1px 0 var(--line); }
.ebp-page .ebp-table .ebp-check-cell { position:sticky; inset-inline-start:0; width:34px; min-width:34px; padding-inline:8px; z-index:2; text-align:center; }
.ebp-page .ebp-table .ebp-folder-cell { position:sticky; inset-inline-start:34px; width:340px; min-width:340px; padding-inline:9px; z-index:2; text-align:start; font-weight:400; }
.ebp-page .ebp-table thead .ebp-folder-cell, .ebp-page .ebp-table thead .ebp-check-cell { z-index:5; font-weight:650; }
.ebp-page .ebp-table .ebp-action-cell { width:72px; text-align:center; }
.ebp-page .ebp-table .ebp-status-cell { width:165px; overflow:hidden; text-overflow:ellipsis; }
.ebp-heading-total { width:68px; }
.ebp-heading-approved { width:76px; }
.ebp-heading-pending_review { width:110px; }
.ebp-heading-returned_for_correction { width:100px; }
.ebp-heading-corrected { width:85px; }
.ebp-heading-rejected { width:64px; }
.ebp-heading-draft { width:80px; }
.ebp-heading-hidden { width:110px; }
.ebp-heading-other { width:55px; }
.ebp-stat-heading button { display:block; width:100%; min-height:38px; padding:6px 0; border:0; background:transparent; color:inherit; font-size:13px; line-height:1.6; white-space:nowrap; cursor:pointer; }
.ebp-page .ebp-table th[aria-sort="ascending"], .ebp-page .ebp-table th[aria-sort="descending"] { color:var(--ink); background:var(--orange-soft); }
.ebp-page .ebp-table .ebp-heading-approved { color:var(--ebp-green); }
.ebp-page .ebp-table .ebp-heading-returned_for_correction { color:var(--ebp-amber); }
.ebp-page .ebp-table .ebp-heading-rejected { color:var(--ebp-red); }
.ebp-page .ebp-row:hover > * { background:color-mix(in srgb,var(--bg) 55%,var(--panel)); }
.ebp-page .ebp-row.is-selected > * { background:color-mix(in srgb,var(--orange-soft) 65%,var(--panel)); }
.ebp-page .ebp-folder-title { display:flex; align-items:center; gap:10px; width:100%; min-width:0; padding:0; border:0; background:none; text-align:start; color:var(--ink); font-size:14px; line-height:1.7; white-space:nowrap; overflow:hidden; cursor:pointer; }
.ebp-folder-title > strong { font-size:14px; font-weight:700; flex:none; max-width:62%; overflow:hidden; text-overflow:ellipsis; }
.ebp-folder-title:hover { color:var(--teal); }
.ebp-path { min-width:0; margin:0; padding-inline-start:10px; border-inline-start:1px solid var(--line); color:var(--muted); font-size:12px; line-height:1.7; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.ebp-readiness { display:inline-flex; align-items:center; gap:5px; max-width:100%; font-size:12px; line-height:1.7; color:var(--ebp-amber); white-space:nowrap; }
.ebp-readiness i { width:5px; height:5px; border-radius:50%; background:currentColor; flex:none; }
.ebp-readiness.is-ready { color:var(--ebp-green); }
.ebp-page .ebp-stat { text-align:center; font-size:14px; font-weight:700; font-variant-numeric:tabular-nums; }
.ebp-stat > span { display:inline-flex; align-items:center; justify-content:center; min-width:26px; min-height:26px; padding:1px 4px; border-radius:5px; }
.ebp-stat-approved:not(.is-zero) > span { background:color-mix(in srgb,var(--ebp-green) 10%,var(--panel)); color:var(--ebp-green); }
.ebp-stat-pending_review:not(.is-zero) > span, .ebp-stat-returned_for_correction:not(.is-zero) > span { background:color-mix(in srgb,var(--ebp-amber) 10%,var(--panel)); color:var(--ebp-amber); }
.ebp-stat-corrected:not(.is-zero) > span { background:color-mix(in srgb,var(--ebp-blue) 10%,var(--panel)); color:var(--ebp-blue); }
.ebp-stat-rejected:not(.is-zero) > span { background:color-mix(in srgb,var(--ebp-red) 10%,var(--panel)); color:var(--ebp-red); }
.ebp-stat.is-zero, .ebp-unselectable { color:color-mix(in srgb,var(--muted) 70%,var(--panel)); font-weight:400; }
.ebp-page .ebp-publish-button, .ebp-page .ebp-inspect-button { display:inline-flex; align-items:center; justify-content:center; height:28px; min-height:28px; width:100%; padding:3px 8px; border:1px solid color-mix(in srgb,var(--orange) 23%,var(--line)); border-radius:6px; background:color-mix(in srgb,var(--orange-soft) 55%,var(--panel)); color:color-mix(in srgb,var(--orange) 76%,var(--ink)); font-size:12px; font-weight:650; line-height:1.7; white-space:nowrap; cursor:pointer; }
.ebp-page .ebp-inspect-button { border-color:var(--line); background:var(--panel); color:var(--ink); }
.ebp-page button:disabled { opacity:.5; cursor:default; }
.ebp-page .ebp-table tfoot th, .ebp-page .ebp-table tfoot td { position:sticky; bottom:0; z-index:3; padding-block:8px; background:color-mix(in srgb,var(--bg) 75%,var(--panel)); border-bottom:0; font-size:13px; font-weight:750; box-shadow:0 -1px 0 var(--line); }
.ebp-page .ebp-table tfoot .ebp-folder-cell, .ebp-page .ebp-table tfoot .ebp-check-cell { z-index:4; }
@media (min-width:701px) {
  .ebp-page .ebp-table .ebp-action-cell { position:sticky; inset-inline-end:0; z-index:2; box-shadow:1px 0 0 var(--line); }
  .ebp-page .ebp-table thead .ebp-action-cell { z-index:5; }
  .ebp-page .ebp-table tfoot .ebp-action-cell { z-index:4; }
}
.ebp-table-note { display:flex; justify-content:space-between; flex-wrap:wrap; gap:4px 14px; padding:8px 14px; color:var(--muted); font-size:12px; line-height:1.8; }
.ebp-page .client-list-pagination { font-size:12px; padding:8px 14px; }
.ebp-page .client-list-pagination > span { font-size:12px; }
.ebp-page .client-list-pagination button { min-height:30px; font-size:12px; }
.ebp-selection { display:flex; align-items:center; gap:12px; flex-wrap:wrap; padding:10px 14px; border-top:1px solid var(--line); border-radius:0 0 10px 10px; background:var(--panel); font-size:13px; }
.ebp-selection.has-selection { background:color-mix(in srgb,var(--teal-soft) 55%,var(--panel)); }
.ebp-selection-count { display:flex; align-items:center; gap:10px; margin-inline-end:auto; }
.ebp-selection-count strong { font-size:13px; color:var(--ink); }
.ebp-selection-count span { font-size:12px; color:var(--muted); }
.ebp-page .ebp-selection .primary-button { min-height:34px; padding-inline:14px; font-size:13px; }
.ebp-page .empty-state { padding:28px 18px; font-size:14px; }
.ebp-page .empty-state h3 { font-size:17px; }
.ebp-page .empty-state p { max-width:490px; margin-inline:auto; font-size:13px; line-height:1.9; }
.ebp-preview-list { display:grid; margin:14px 0 0; max-height:min(350px,48dvh); overflow:auto; border:1px solid var(--line); border-radius:10px; }
.ebp-preview-list > div { min-width:0; display:grid; gap:4px; padding:12px; border-bottom:1px solid var(--line); }
.ebp-preview-list > div:last-child { border-bottom:0; }
.ebp-preview-list strong { font-size:14px; line-height:1.8; color:var(--ink); overflow-wrap:anywhere; }
.ebp-preview-list > div > span { font-size:13px; line-height:1.8; color:var(--muted); }
.modal:has(.ebp-preview-list) .modal-head h2 { font-size:19px; }
.modal:has(.ebp-preview-list) .modal-body, .modal:has(.ebp-preview-list) .modal-body p, .modal:has(.ebp-preview-list) .modal-footer button { font-size:14px; line-height:1.9; }
.ebp-page button:focus-visible, .ebp-page input:focus-visible, .ebp-page select:focus-visible, .ebp-table-scroll:focus-visible, .ebp-folder-badge:focus-visible { outline:2px solid var(--teal); outline-offset:3px; }
@media (max-width:700px) {
  .ebp-banner { gap:10px; padding:12px; flex-wrap:wrap; }
  .ebp-banner-copy { flex-basis:calc(100% - 40px); }
  .ebp-banner > button { margin-inline-start:auto; }
  .ebp-page .page-head { gap:8px; margin-bottom:10px; }
  .ebp-page .page-head h1 { font-size:20px; }
  .ebp-summary { flex-wrap:wrap; gap:6px; margin-bottom:10px; }
  .ebp-page .ebp-mode { gap:6px; min-height:34px; padding:5px 8px; }
  .ebp-panel-head { flex-wrap:wrap; padding:10px; gap:8px; }
  .ebp-panel-head > div { justify-content:space-between; width:100%; gap:6px; }
  .ebp-panel-head h2 { font-size:14px; }
  .ebp-panel-head p { font-size:12px; }
  .ebp-page .ebp-search { width:100%; max-width:100%; }
  .ebp-toolbar { grid-template-columns:repeat(2,minmax(0,1fr)); padding:0 10px 10px; gap:8px; }
  .ebp-toolbar label { gap:5px; }
  .ebp-criteria { padding-inline:10px; font-size:12px; }
  .ebp-criteria summary > span { margin-inline-start:6px; }
  .ebp-criteria > div { flex-direction:column; align-items:stretch; gap:10px; }
  .ebp-criteria label { flex:auto; }
  .ebp-scope, .ebp-table-tools { padding:7px 10px; }
  .ebp-table-tools > span { display:none; }
  .ebp-page .ebp-table { min-width:1230px; }
  .ebp-page .ebp-table .ebp-folder-cell { width:200px; min-width:200px; }
  .ebp-folder-title > strong { max-width:100%; flex-shrink:0; }
  .ebp-path { flex:0 0 155px; }
  .ebp-table-note { padding:7px 10px; }
  .ebp-selection { gap:8px; padding:8px 10px; }
  .ebp-selection-count { gap:8px; }
  .ebp-page .ebp-selection .primary-button { flex-basis:100%; }
}


/* ═════════════════ دانش‌آموز / رتبه‌بندی ═════════════════
   هم‌خانوادهٔ جدول «آماده انتشار»: خانه‌های فشرده، خطوط شبکه و هویت چسبان. */
.srk { --srk-green:#27806c; --srk-fixed-base:728px; --srk-name-base:156px; --srk-rank-width:40px; --srk-name-share:.09; --srk-stat-share:.021; width:100%; max-width:none; margin-inline:auto; color:var(--ink); padding-bottom:0; }
#studentContent:has(> .srk) { padding-bottom:0; }
.srk *, .srk *::before, .srk *::after { box-sizing:border-box; }
.srk button, .srk input, .srk select { font:inherit; }
.srk button { cursor:pointer; }
.srk button:disabled { cursor:default; opacity:.45; }
.srk button:focus-visible, .srk input:focus-visible, .srk select:focus-visible, .srk-sheet-scroll:focus-visible { outline:2px solid var(--teal); outline-offset:3px; }
.srk svg { width:17px; height:17px; flex-shrink:0; }
.srk-heading { display:flex; align-items:center; justify-content:space-between; gap:16px; margin-bottom:18px; }
.srk-heading h1 { margin:0; font-size:25px; font-weight:750; line-height:1.7; letter-spacing:-.6px; }
.srk-heading p { margin:4px 0 0; color:var(--muted); font-size:12px; }
.srk-heading .srk-refresh { min-height:36px; padding:7px 11px; border-radius:8px; font-size:12px; display:flex; align-items:center; gap:7px; }
.srk-board { background:var(--panel); border:1px solid var(--line); border-radius:12px; min-width:0; }
.srk-toolbar { display:flex; align-items:center; flex-wrap:wrap; gap:12px; padding:12px 14px; }
.srk-period { display:inline-flex; gap:3px; background:var(--bg); padding:3px; border:1px solid var(--line); border-radius:8px; }
.srk-period button { border:0; border-radius:5px; background:transparent; color:var(--muted); padding:6px 15px; min-height:32px; font-size:12px; white-space:nowrap; }
.srk-period button[aria-pressed="true"] { color:var(--ink); background:var(--panel); box-shadow:0 1px 4px #20201012; font-weight:650; }
.srk-lesson { display:flex; align-items:center; gap:8px; font-size:12px; color:var(--muted); }
.srk-lesson select { min-height:40px; max-width:180px; border:1px solid var(--line); border-radius:9px; color:var(--ink); background:var(--panel); padding:6px 10px; font-size:12px; }
.srk-search.mk-search-field:not([hidden]) { margin-inline-start:auto; flex:1 1 240px; min-width:180px; max-width:390px; }
.srk-table-tools { display:flex; justify-content:space-between; align-items:center; flex-wrap:wrap; gap:5px 14px; padding:10px 14px; font-size:11px; color:var(--muted); }
.srk-table-tools > strong { color:var(--ink); display:flex; align-items:center; gap:9px; font-size:12px; font-weight:650; }
.srk-sheet-scroll { width:100%; max-width:100%; overflow:auto; height:calc(100dvh - 240px); scrollbar-width:thin; scrollbar-color:color-mix(in srgb,var(--muted) 45%,var(--line)) var(--bg); border-block:1px solid var(--line); border-radius:0 0 11px 11px; overscroll-behavior:contain; }
.srk .srk-sheet { width:100%; min-width:calc(var(--srk-fixed-base) + var(--srk-lesson-count,5) * 45px / .7); table-layout:fixed; border-collapse:separate; border-spacing:0; margin:0; text-align:start; color:var(--ink); font-size:13px; }
.srk .srk-sheet th, .srk .srk-sheet td { padding:5px 5px; border:0; border-bottom:1px solid var(--line); border-inline-end:1px solid var(--line); vertical-align:middle; background:var(--panel); white-space:nowrap; height:36px; }
.srk .srk-sheet th:last-child, .srk .srk-sheet td:last-child { border-inline-end:0; }
.srk .srk-sheet thead th { position:sticky; top:0; z-index:3; height:30px; padding:0 4px; background:color-mix(in srgb,var(--bg) 78%,var(--panel)); color:var(--muted); font-size:11px; font-weight:650; text-align:center; box-shadow:0 1px 0 var(--line); }
.srk .srk-sheet thead tr:nth-child(2) th { top:30px; }
.srk .srk-sheet .srk-rank-cell { position:sticky; inset-inline-start:0; width:40px; min-width:40px; padding-inline:2px; z-index:2; text-align:center; font-weight:650; }
.srk .srk-sheet .srk-name-cell { position:sticky; inset-inline-start:40px; width:156px; min-width:156px; z-index:2; text-align:start; padding-inline:7px; font-weight:400; box-shadow:-2px 0 0 color-mix(in srgb,var(--line) 60%,transparent); }
.srk .srk-sheet thead .srk-rank-cell, .srk .srk-sheet thead .srk-name-cell { z-index:5; font-weight:650; }
.srk .srk-sheet .srk-level-cell { width:48px; }
.srk .srk-sheet .srk-points-cell { width:78px; }
.srk .srk-sheet .srk-stat-heading { width:58px; }
.srk .srk-sheet .srk-lesson-heading, .srk .srk-sheet .srk-percent-cell { width:64px; }
.srk .srk-sheet .srk-lessons-heading { color:var(--ink); font-weight:650; }
.srk-lessons-heading > small { color:var(--muted); font-weight:400; font-size:10px; margin-inline-start:9px; }
.srk .srk-sheet thead th[aria-sort="ascending"], .srk .srk-sheet thead th[aria-sort="descending"] { color:var(--ink); background:var(--orange-soft); }
.srk .srk-sheet thead .srk-points-cell > svg { display:inline-block; vertical-align:middle; width:12px; height:12px; }
.srk .srk-sheet .is-selected-lesson { background:color-mix(in srgb,var(--orange-soft) 55%,var(--panel)); }
.srk .srk-row:hover > * { background:color-mix(in srgb,var(--bg) 55%,var(--panel)); }
.srk .srk-row.is-me > * { background:color-mix(in srgb,var(--teal-soft) 50%,var(--panel)); }
.srk .srk-row.is-me > .srk-rank-cell { color:var(--srk-green); box-shadow:inset -3px 0 var(--srk-green); }
.srk-person { display:flex; align-items:center; gap:6px; min-width:0; }
.srk-person > strong { font-size:11px; font-weight:650; min-width:0; overflow:hidden; text-overflow:ellipsis; }
.srk-person > em { font-size:9px; font-style:normal; color:var(--srk-green); font-weight:500; margin-inline-start:auto; }
.srk .srk-avatar { width:22px; height:22px; border-radius:6px; flex-shrink:0; overflow:hidden; background:var(--bg); }
.srk .srk-avatar img, .srk .srk-avatar svg { display:block; width:100%; height:100%; object-fit:cover; }
.srk .srk-sheet .srk-stat, .srk .srk-sheet .srk-percent-cell { text-align:center; font-size:12px; font-weight:650; font-variant-numeric:tabular-nums; }
.srk-stat > span { display:inline-flex; align-items:center; justify-content:center; min-width:26px; min-height:26px; padding:1px 4px; border-radius:5px; }
.srk .srk-sheet .srk-points-cell > span { color:var(--orange); background:color-mix(in srgb,var(--orange) 8%,var(--panel)); }
.srk .srk-sheet .is-correct:not(.is-zero) > span { color:var(--srk-green); background:color-mix(in srgb,var(--srk-green) 9%,var(--panel)); }
.srk .srk-sheet .is-wrong:not(.is-zero) > span { color:var(--red); background:color-mix(in srgb,var(--red) 8%,var(--panel)); }
.srk .srk-sheet .is-zero, .srk-missing { color:color-mix(in srgb,var(--muted) 65%,var(--line)); font-weight:400; }
.srk .srk-sheet th.is-correct { color:var(--srk-green); }
.srk .srk-sheet th.is-wrong { color:var(--red); }
.srk-subject { display:inline-block; }
.srk-subject-trigger { color:var(--ink); border:0; border-bottom:1px dotted color-mix(in srgb,var(--muted) 45%,transparent); border-radius:0; background:transparent; padding:3px 4px; min-width:0; padding-inline:0; font-size:11px !important; font-weight:650 !important; font-variant-numeric:tabular-nums; }
.srk-subject:hover .srk-subject-trigger, .srk-subject:focus-within .srk-subject-trigger, .srk-subject.is-open .srk-subject-trigger { color:var(--teal); border-bottom-color:var(--teal); }
.srk-subject-tip { display:none; position:fixed; z-index:150; width:270px; max-width:calc(100vw - 24px); padding:14px; border:1px solid var(--line); border-radius:9px; background:var(--panel); color:var(--ink); box-shadow:0 8px 30px #14292125; font-size:11px; font-weight:400; text-align:start; white-space:normal; }
.srk-subject:hover > .srk-subject-tip, .srk-subject:focus-within > .srk-subject-tip, .srk-subject.is-open > .srk-subject-tip { display:block; }
.srk-subject.is-dismissed > .srk-subject-tip { display:none; }
.srk-tip-title { display:flex; justify-content:space-between; align-items:center; margin-bottom:13px; }
.srk-tip-title b { font-size:13px; }
.srk-tip-title strong { color:var(--srk-green); font-size:18px; }
.srk-subject-tip-grid { display:grid; grid-template-columns:repeat(2,1fr); gap:9px 14px; }
.srk-subject-tip-grid > span { display:flex; justify-content:space-between; gap:6px; color:var(--muted); }
.srk-subject-tip-grid b { color:var(--ink); font-size:12px; }
.srk-answer-key { display:flex; justify-content:space-between; gap:7px; margin-top:12px; padding-top:10px; border-top:1px solid var(--line); color:var(--muted); font-size:10px; }
.srk-answer-key .is-correct { color:var(--srk-green); }
.srk-answer-key .is-wrong { color:var(--red); }
.srk-tip-note { display:block; margin-top:10px; color:var(--muted); line-height:1.9; font-size:10px; }
.srk-error { display:flex; align-items:center; gap:9px; padding:11px 14px; border-block:1px solid var(--line); color:var(--red); font-size:12px; }
.srk-error > span { flex:1; }
.srk-error button, .srk-empty button { border:1px solid var(--line); background:var(--panel); color:var(--ink); border-radius:6px; padding:6px 10px; font-size:11px; }
.srk-empty { padding:35px 20px; text-align:center; }
.srk-empty h3 { margin:0; font-size:15px; }
.srk-empty p { margin:8px 0 15px; color:var(--muted); font-size:12px; }
.srk-loading { padding:14px; border-top:1px solid var(--line); color:var(--muted); font-size:12px; }
.srk-loading > span { display:block; padding:6px 0 15px; }
.srk-loading > div { display:flex; align-items:center; gap:14px; height:36px; border-top:1px solid var(--line); }
.srk-loading i { width:22px; height:22px; background:var(--bg); border-radius:6px; }
.srk-loading div > span { width:25%; height:9px; border-radius:3px; background:var(--bg); }
.srk-loading b { width:8%; height:11px; border-radius:3px; background:var(--bg); margin-inline-start:auto; }
.srk .sr-only { position:absolute; width:1px; height:1px; padding:0; margin:-1px; overflow:hidden; clip:rect(0,0,0,0); white-space:nowrap; border:0; }
@media (max-width:760px) {
  .srk-heading { gap:9px; margin-bottom:13px; }
  .srk-heading h1 { font-size:21px; }
  .srk-heading p { font-size:10px; }
  .srk-heading .srk-refresh { font-size:10px; padding:5px 5px; }
  .srk-heading .srk-refresh svg { width:14px; height:14px; }
  .srk-toolbar { gap:10px; padding:11px; }
  .srk-period button { font-size:11px; padding-inline:13px; }
  .srk-lesson { gap:6px; margin-inline-start:auto; font-size:10px; }
  .srk-lesson > span { display:none; }
  .srk-lesson select { min-height:37px; max-width:170px; font-size:11px; padding-inline:5px; }
  .srk-table-tools { padding:8px 11px; font-size:10px; }
  .srk-table-tools > strong { font-size:11px; }
  .srk .srk-sheet .srk-rank-cell { width:36px; min-width:36px; }
  .srk .srk-sheet .srk-name-cell { width:144px; min-width:144px; inset-inline-start:36px; padding-inline:6px; }
  .srk-person { gap:5px; }
  .srk-person > strong { font-size:11px; }
  .srk-person > em { font-size:8px; }
  .srk .srk-avatar { width:21px; height:21px; border-radius:5px; }
  .srk .srk-sheet th, .srk .srk-sheet td { padding-inline:6px; }
}
@media (prefers-reduced-motion:reduce) { .srk * { scroll-behavior:auto !important; } }


.srk-medal { display:inline-flex; align-items:center; justify-content:center; min-width:26px; height:26px; padding-inline:3px; border-radius:50%; font-size:12px; font-weight:750; font-variant-numeric:tabular-nums; }
.srk-medal.is-long { min-width:0; max-width:100%; padding-inline:0; border-radius:4px; font-size:9px; letter-spacing:-.4px; }
.srk-medal.is-gold { color:#765512; background:linear-gradient(135deg,#fff0b7,#e9c55c); box-shadow:inset 0 0 0 1px #c29a36; }
.srk-medal.is-silver { color:#5f6d7c; background:linear-gradient(135deg,#f8fafc,#d6dde6); box-shadow:inset 0 0 0 1px #afb9c6; }
.srk-medal.is-bronze { color:#865d3e; background:linear-gradient(135deg,#f6e1ca,#cfaa86); box-shadow:inset 0 0 0 1px #b88c63; }
.srk-medal.is-honor { color:#92702b; background:color-mix(in srgb,#f0cb6a 23%,var(--panel)); border-radius:7px; }
.srk .srk-sheet .srk-pinned-footer[hidden] { display:none !important; }
.srk .srk-sheet .srk-pinned-footer > tr > * { position:sticky; bottom:var(--srk-pinned-bottom,0px); z-index:4; background:color-mix(in srgb,var(--teal-soft) 85%,var(--panel)); border-top:2px solid var(--teal); box-shadow:0 -3px 9px #24543e10; }
.srk .srk-sheet .srk-pinned-footer .srk-rank-cell, .srk .srk-sheet .srk-pinned-footer .srk-name-cell { z-index:7; }
.srk .srk-sheet .srk-pinned-footer .srk-name-cell { color:var(--srk-green); }
.srk .srk-sheet thead .srk-rank-cell, .srk .srk-sheet thead .srk-name-cell { z-index:8; }
@media (max-width:760px) { .srk-search.mk-search-field:not([hidden]) { flex-basis:100%; max-width:none; } }

/* Preserve 70% of the previous course area; spread the released 30% over the other columns. */
.srk-sheet col.srk-col-rank { width:var(--srk-rank-width); }
.srk-sheet col.srk-col-name { width:calc(var(--srk-name-base) + var(--srk-course-space,0px) * var(--srk-name-share)); }
.srk-sheet col.srk-col-level { width:calc(48px + var(--srk-course-space,0px) * .021); }
.srk-sheet col.srk-col-points { width:calc(78px + var(--srk-course-space,0px) * .042); }
.srk-sheet col.srk-col-stat { width:calc(58px + var(--srk-course-space,0px) * var(--srk-stat-share)); }
.srk-sheet col.srk-col-lesson { width:calc(var(--srk-course-space,0px) * .7 / var(--srk-lesson-count)); }
.srk .srk-sheet .srk-percent-cell { padding-inline:2px; }
.srk .srk-sheet .srk-lesson-heading { white-space:normal; overflow-wrap:anywhere; font-size:10px; line-height:1.5; }
.srk-board > .srk-toolbar { min-height:0; margin:0; padding:10px 14px; }
.srk-board > .srk-table-tools { min-height:0; margin:0; padding:6px 14px; line-height:1.5; }
.srk-privacy-controls { display:flex; align-items:center; flex-wrap:wrap; gap:8px; margin-inline-start:auto; }
.srk-privacy { display:inline-flex; align-items:center; gap:6px; color:var(--ink); font-size:11px; white-space:nowrap; cursor:pointer; }
.srk-privacy input { width:14px; height:14px; margin:0; accent-color:var(--teal); cursor:pointer; }
.srk-privacy:has(input:disabled) { opacity:.6; cursor:default; }
.srk-privacy-status { color:var(--muted); font-size:10px; }
.srk-privacy-status:empty { display:none; }
.srk-privacy-error { flex-basis:100%; color:var(--red); font-size:11px; }
@media (max-width:760px) {
  .srk { --srk-fixed-base:712px; --srk-name-base:144px; --srk-rank-width:36px; --srk-name-share:0; --srk-stat-share:.0338571429; }
  .srk-period button { padding-inline:10px; }
  .srk-board > .srk-toolbar { padding:9px 11px; gap:9px; }
  .srk-board > .srk-table-tools { padding:6px 11px; }
}

.srk .srk-avatar-anonymous { background:#e4e6ea; box-shadow:none; }
.srk-mine { display:inline-flex; align-items:center; gap:6px; margin-inline-start:auto; color:var(--ink); font-size:11px; white-space:nowrap; cursor:pointer; }
.srk-mine input { width:14px; height:14px; margin:0; accent-color:var(--teal); cursor:pointer; }
.srk-mine:has(input:disabled) { opacity:.6; cursor:default; }

.srk .srk-sheet .srk-pinned-footer[data-dock="top"] > tr > * { box-shadow:0 3px 9px #24543e14; }

/* بلک فرایدی فروشگاه */
.bf-campaign {
  --bf-ink: #000;
  --bf-panel: #181818;
  --bf-border: #414141;
  --bf-text: #f5f5f5;
  --bf-muted: #bdbdbd;
  --bf-accent: #a6ff35;
  color: var(--bf-text);
  border: 1px solid var(--bf-border);
  border-radius: var(--space-5);
  text-align: start;
  min-inline-size: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
  align-items: center;
  gap: var(--space-8);
  padding: clamp(var(--space-6), 4vw, calc(var(--space-8) * 1.5));
  background:
    repeating-linear-gradient(142deg, transparent 0 13px, #ffffff10 13px 14px, transparent 14px 29px) left center / 47% 100% no-repeat,
    radial-gradient(ellipse at 6% 100%, var(--bf-panel) 0, transparent 62%), var(--bf-ink);
  box-shadow: 0 14px 36px #00000035;
}
.bf-campaign-copy,
.bf-campaign-availability { display: grid; gap: var(--space-3); min-inline-size: 0; }
.bf-campaign :is(h2, h3, p, ol),
.bf-demo :is(h3, p),
.bf-gift-intro :is(h3, p),
.bf-gift-form :is(p, small),
.bf-gift-result :is(h2, p, ul),
.bf-print-bonus :is(dl, dd, p) { margin: 0; }
.bf-campaign h2 {
  font-size: clamp(2rem, 4.1vw, 3.5rem);
  line-height: 1.22;
  font-weight: 900;
  color: var(--bf-text);
}
.bf-campaign-title {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: var(--space-1) var(--space-3);
}
.bf-campaign-title > span { color: var(--bf-muted); font-size: .8rem; font-weight: 700; }
.bf-campaign-deadline {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  color: var(--bf-muted);
  font-size: .83rem;
  line-height: 1.65;
}
.bf-campaign-deadline svg { width: 1rem; height: 1rem; flex: none; }
.bf-campaign-rate { display: flex; align-items: center; flex-wrap: wrap; gap: var(--space-2) var(--space-3); font-weight: 750; }
.bf-campaign-rate strong {
  font-size: clamp(2.5rem, 5vw, 5rem);
  line-height: 1.08;
  font-weight: 900;
  color: var(--bf-accent);
  text-shadow: 0 0 22px #a6ff3540;
}
.bf-campaign-status,
.bf-campaign-availability h3 { color: var(--bf-muted); font-size: .875rem; line-height: 1.75; }
.bf-tiers {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(4rem, 100%), 1fr));
  gap: var(--space-2);
  padding: 0;
  list-style: none;
}
.bf-tier {
  min-inline-size: 0;
  display: grid;
  align-content: center;
  justify-items: center;
  gap: var(--space-1);
  padding: var(--space-3) var(--space-1);
  border: 1px solid var(--bf-border);
  border-radius: var(--space-3);
  background: var(--bf-panel);
  text-align: center;
  min-height: 84px;
}
.bf-tier > b { font-size: clamp(1.15rem, 2.25vw, 1.85rem); line-height: 1.25; }
.bf-tier small { color: var(--bf-muted); font-size: .75rem; line-height: 1.35; }
.bf-tier.is-current { background: var(--bf-accent); border-color: var(--bf-accent); color: var(--bf-ink); box-shadow: 0 0 20px #a6ff3530; }
.bf-tier.is-current small { color: var(--bf-ink); }
.bf-tier.is-full > b { color: var(--bf-muted); text-decoration: line-through; }

.bf-campaign.bf-campaign-decay {
  grid-template: "copy chart" auto "rates chart" auto / minmax(0, 1fr) clamp(7rem, 19%, 11rem);
  gap: var(--space-2) clamp(var(--space-2), 2vw, var(--space-6));
  padding: var(--space-4) clamp(var(--space-3), 2.5vw, var(--space-6));
  background: radial-gradient(ellipse at 0 100%, var(--bf-panel), transparent 52%), var(--bf-ink);
}
.bf-campaign.bf-campaign-decay:has(.bf-campaign-mini[hidden]),
.bf-campaign.bf-campaign-rate-unavailable {
  grid-template: "copy" auto "rates" auto / minmax(0, 1fr);
}
.bf-campaign-decay .bf-campaign-copy { grid-area: copy; gap: var(--space-2); }
.bf-campaign-order-counts {
  display: flex;
  flex-wrap: wrap;
  min-inline-size: 0;
  gap: var(--space-1) var(--space-3);
  margin: 0;
  color: var(--bf-muted);
  font-size: .76rem;
  line-height: 1.6;
}
.bf-campaign-order-counts > div { display: flex; align-items: baseline; gap: var(--space-1); }
.bf-campaign-order-counts dd { margin: 0; color: var(--bf-text); font-weight: 800; font-variant-numeric: tabular-nums; }
.bf-campaign-heading {
  display: flex;
  flex-direction: row-reverse;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-1) var(--space-4);
}
.bf-campaign-decay .bf-campaign-heading h2 { font-size: clamp(1.5rem, 3vw, 2.25rem); }
.bf-campaign-heading .bf-campaign-deadline { flex: none; }
.bf-campaign-mini {
  grid-area: chart;
  display: block;
  inline-size: 100%;
  block-size: auto;
  padding: var(--space-1);
  color: var(--bf-accent);
  background: #141414;
  border: 1px solid var(--bf-border);
  border-radius: var(--space-3);
}
.bf-campaign-mini[hidden] { display: none; }
.bf-campaign-mini path { fill: none; stroke-linecap: round; stroke-linejoin: round; }
.bf-campaign-mini-guide { stroke: var(--bf-border); }
.bf-campaign-mini-future { stroke: var(--bf-muted); stroke-width: 1.25; stroke-dasharray: 3 4; }
.bf-campaign-mini-recorded { stroke: currentColor; stroke-width: 1.7; }
.bf-campaign-mini-point {
  fill: currentColor;
  stroke: var(--bf-ink);
  stroke-width: 1.25;
  transition: transform 260ms cubic-bezier(.22,.61,.36,1);
}
.bf-campaign-mini[data-bf-mini-snap] .bf-campaign-mini-point { transition: none; }
.bf-campaign-reel {
  --bf-reel-gap: var(--space-3);
  --bf-reel-height: var(--space-8);
  grid-area: rates;
  display: grid;
  grid-template-rows: var(--space-3) var(--bf-reel-height);
  justify-self: start;
  inline-size: min(100%, 27rem);
  min-inline-size: 0;
  white-space: nowrap;
  font-size: clamp(.75rem, 3.6vw, 1rem);
  font-weight: 750;
  font-variant-numeric: tabular-nums;
}
.bf-campaign-reel-pointer {
  justify-self: center;
  inline-size: var(--space-3);
  block-size: 10px;
  fill: var(--bf-accent);
  stroke: var(--bf-accent);
  stroke-width: 1.2;
  stroke-linejoin: round;
}
.bf-campaign-reel[data-bf-rolling] .bf-campaign-reel-pointer { fill: none; }
.bf-campaign-reel-window {
  position: relative;
  overflow: hidden;
  overflow: clip;
  isolation: isolate;
}
.bf-campaign-reel-wells,
.bf-campaign .bf-campaign-sequence {
  display: grid;
  grid-template: var(--bf-reel-height) / repeat(5, minmax(0, 1fr));
  gap: var(--bf-reel-gap);
  direction: rtl;
}
.bf-campaign-reel-wells, .bf-campaign-reel-exits { position: absolute; inset: 0; pointer-events: none; }
.bf-campaign-reel-wells > span {
  position: relative;
  border: 1px dashed #303030;
  border-radius: var(--space-2);
  background: #121212;
}
.bf-campaign .bf-campaign-sequence { position: relative; padding: 0; list-style: none; }
.bf-campaign-sequence > li { grid-row: 1; min-inline-size: 0; }
.bf-campaign-sequence > [data-slot="1"] { grid-column: 1; }
.bf-campaign-sequence > [data-slot="2"] { grid-column: 2; }
.bf-campaign-sequence > [data-slot="3"] { grid-column: 3; }
.bf-campaign-sequence > [data-slot="4"] { grid-column: 4; }
.bf-campaign-sequence > [data-slot="5"] { grid-column: 5; }
.bf-campaign-sequence-value {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  place-items: center;
  block-size: var(--bf-reel-height);
  padding-inline: var(--space-1);
  border: 1px solid var(--bf-border);
  border-radius: var(--space-2);
  background: var(--bf-panel);
}
.bf-campaign-sequence-value bdi {
  position: relative;
  display: block;
  line-height: 1;
  inset-block-start: .09em; /* Persian glyphs sit above the optical center of this font's line box. */
}
.bf-campaign-sequence [aria-current="step"] .bf-campaign-sequence-value {
  border-color: var(--bf-accent);
  background: var(--bf-accent);
  color: var(--bf-ink);
  font-weight: 900;
}
.bf-campaign-reel-exit { position: absolute; }
.bf-campaign-sequence-separator {
  position: absolute;
  inset-inline-start: calc(100% + (var(--bf-reel-gap) - var(--bf-reel-chevron)) / 2);
  inset-block-start: 50%;
  transform: translateY(-50%);
  --bf-reel-chevron: .5rem;
  inline-size: var(--bf-reel-chevron);
  block-size: .625rem;
  visibility: hidden;
  color: var(--bf-muted);
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}
[data-bf-filled]:has(+ [data-bf-filled]) > .bf-campaign-sequence-separator { visibility: visible; }
.bf-rate-freshness { color: var(--bf-muted); font-size: .75rem; line-height: 1.45; }
.bf-campaign-rate-sr {
  position: absolute;
  inline-size: 1px;
  block-size: 1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
@media (hover: hover) and (prefers-reduced-motion: no-preference) {
  .bf-campaign-sequence-value { transition: border-color 160ms ease, box-shadow 160ms ease; }
  .bf-campaign-sequence > li:not([aria-current]) .bf-campaign-sequence-value:hover { border-color: var(--bf-muted); }
  .bf-campaign-sequence [aria-current="step"] .bf-campaign-sequence-value:hover { box-shadow: 0 0 12px #a6ff3540; }
}
@media (prefers-reduced-motion: reduce) {
  .bf-campaign-mini-point { transition: none; }
}
@media (max-width: 560px) {
  .bf-campaign.bf-campaign-decay {
    grid-template: "copy chart" auto "rates rates" auto / minmax(0, 1fr) clamp(4.5rem, 22vw, 6.5rem);
  }
  .bf-campaign-decay .bf-campaign-copy { gap: var(--space-1); }
  .bf-campaign-heading { flex-direction: column; align-items: flex-start; }
  .bf-campaign-decay .bf-campaign-heading h2 { font-size: clamp(1.2rem, 5.5vw, 1.52rem); }
  .bf-campaign-decay .bf-campaign-status { font-size: .8rem; line-height: 1.55; }
}
@media (max-width: 430px) {
  .bf-campaign-sequence-value { padding-inline: 0; }
}
@media (max-width: 360px) {
  .bf-campaign.bf-campaign-decay { padding-inline: var(--space-2); }
  .bf-campaign-reel { --bf-reel-gap: var(--space-2); }
  .bf-campaign-sequence-separator { --bf-reel-chevron: .375rem; }
}
.bf-package-context { display: flex; align-items: center; flex-wrap: wrap; gap: var(--space-1) var(--space-2); }
.bf-package-badge, .bf-package-rate {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  line-height: 1.6;
  font-size: .72rem;
}
.bf-package-badge {
  min-block-size: 24px;
  padding-inline: var(--space-2);
  color: var(--ink);
  background: var(--teal-soft);
  border: 1px solid var(--line);
  border-radius: 999px;
  font-weight: 850;
}
.bf-package-rate { color: var(--muted); }
.bf-package-rate > bdi { color: var(--ink); font-weight: 850; }

.bf-demo,
.bf-gift-result {
  color: var(--ink);
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--space-5);
  text-align: start;
  min-inline-size: 0;
}
.bf-demo {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: var(--space-4);
  padding: var(--space-4);
}
.bf-demo-icon {
  display: inline-grid;
  place-items: center;
  inline-size: 44px;
  block-size: 44px;
  color: var(--ink);
  background: var(--teal-soft);
  border: 1px solid var(--line);
  border-radius: var(--space-3);
  flex: none;
}
.bf-demo-icon svg { inline-size: 21px; block-size: 21px; }
.bf-demo-copy { display: grid; gap: var(--space-1); min-inline-size: 0; }
.bf-demo-copy h3 { font-size: 1rem; line-height: 1.55; }
.bf-demo-copy p { color: var(--muted); font-size: .84rem; line-height: 1.7; }
.bf-action,
.bf-gift-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  min-inline-size: 44px;
  min-block-size: 44px;
  text-decoration: none;
}
.bf-action:disabled { opacity: .64; cursor: wait; }
.bf-gift-action-header { white-space: nowrap; }
.bf-gift-action:not(.bf-gift-action-text) { padding: 0; }
.bf-action svg, .bf-gift-action svg { width: 17px; height: 17px; flex: none; }
.bf-header-slot:empty { display: none; }
.bf-header-slot { display: inline-flex; flex: none; }
.shop-card-actions:has(> .bf-gift-action) {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 44px;
  gap: var(--space-2);
}
.shop-card-actions:has(> .bf-gift-action):not(:has(> .primary-button)) { grid-template-columns: minmax(0, 1fr) 44px; }
.shop-card-actions:has(> .bf-gift-action) > button { min-inline-size: 0; justify-content: center; padding-inline: var(--space-1); }
.shop-buybox > .bf-gift-action { inline-size: 100%; }
.modal.bf-gift-dialog {
  inline-size: min(100%, 36rem);
  max-inline-size: 100%;
}
.modal-body.bf-gift-body { display: grid; gap: var(--space-4); }
.bf-gift-intro {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: start;
  gap: var(--space-3);
  padding: var(--space-3);
  background: var(--panel-soft);
  border: 1px solid var(--line);
  border-radius: var(--space-3);
}
.bf-gift-intro > svg { color: var(--teal); width: 21px; height: 21px; }
.bf-gift-intro h3 { color: var(--ink); font-size: .94rem; }
.bf-gift-intro p,
.bf-gift-form label small { color: var(--muted); font-size: .8rem; line-height: 1.7; }
.bf-gift-form { display: grid; gap: var(--space-4); }
.bf-gift-fields { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); gap: var(--space-3); }
.bf-gift-form label { display: grid; gap: var(--space-2); min-inline-size: 0; color: var(--ink); font-size: .87rem; font-weight: 750; }
.bf-gift-form label[hidden] { display: none; }
.bf-gift-form :is(input:not([type="checkbox"]), select) {
  width: 100%;
  min-inline-size: 0;
  min-block-size: 44px;
  padding-inline: var(--space-3);
  border: 1px solid var(--line);
  border-radius: var(--space-2);
  color: var(--ink);
  background: var(--panel);
  font: inherit;
  text-overflow: ellipsis;
}
.bf-gift-form input::placeholder { color: var(--muted); }
.bf-gift-form input[aria-invalid="true"] { border-color: var(--red); }
.bf-gift-form :is(input, select):focus-visible { outline: 2px solid var(--orange); outline-offset: 2px; }
.bf-gift-form .bf-gift-wallet { display: flex; align-items: center; gap: var(--space-2); min-block-size: 44px; }
.bf-gift-wallet input { accent-color: var(--teal); }
.bf-gift-price { display: grid; gap: var(--space-1); padding: var(--space-3); background: var(--panel-soft); border: 1px solid var(--line); border-radius: var(--space-3); }
.bf-gift-price div { display: flex; justify-content: space-between; align-items: baseline; gap: var(--space-2); flex-wrap: wrap; }
.bf-gift-price strong { color: var(--ink); font-size: 1.15rem; }
.bf-gift-price small { color: var(--muted); }
.bf-checkout-error { padding: var(--space-3); background: var(--red-soft); border: 1px solid var(--red); border-radius: var(--space-2); color: var(--red); font-size: .85rem; line-height: 1.7; }
.bf-personal-popup {
  --bf-notice-accent: #a6ff35;
  --bf-notice-ink: #f5f5f5;
  --bf-notice-muted: #bdbdbd;
  --bf-notice-line: #414141;
  box-sizing: border-box;
  position: fixed;
  inset: 0;
  inline-size: min(38rem, calc(100% - 2 * var(--space-4)));
  max-inline-size: none;
  max-block-size: calc(100dvh - 2 * var(--space-4));
  margin: auto;
  padding: 0;
  overflow: auto;
  overscroll-behavior: contain;
  border: 1px solid var(--bf-notice-line);
  border-radius: var(--space-6);
  color: var(--bf-notice-ink);
  background: #050505;
  box-shadow: 0 28px 80px #0009;
  color-scheme: dark;
  text-align: start;
}
.bf-personal-popup::backdrop { background: #0b0b0bbd; }
body:has(.bf-personal-popup[open]) { overflow: hidden; }
.bf-personal-frame {
  display: grid;
  gap: var(--space-5);
  padding: var(--space-6);
}
.bf-personal-head, .bf-personal-head-copy {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}
.bf-personal-head { justify-content: space-between; }
.bf-personal-head-copy { flex-wrap: wrap; }
.bf-personal-brand, .bf-personal-deadline {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  line-height: 1.4;
}
.bf-personal-brand {
  color: var(--bf-notice-accent);
  font-size: .88rem;
  font-weight: 800;
}
.bf-personal-brand > span {
  inline-size: .4rem;
  block-size: .4rem;
  border-radius: 50%;
  background: currentColor;
}
.bf-personal-deadline {
  color: var(--bf-notice-muted);
  font-size: .81rem;
}
.bf-personal-popup .ui-icon {
  flex: none;
  inline-size: 1rem;
  block-size: 1rem;
}
.bf-personal-popup button {
  cursor: pointer;
  min-block-size: 44px;
  font: inherit;
}
.bf-personal-popup button:focus-visible {
  outline: 2px solid var(--bf-notice-accent);
  outline-offset: 3px;
}
.bf-personal-close {
  flex: none;
  display: grid;
  place-items: center;
  inline-size: 44px;
  padding: 0;
  border: 1px solid var(--bf-notice-line);
  border-radius: 50%;
  color: var(--bf-notice-muted);
  background: #181818;
}
.bf-personal-body {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(9.25rem, 31%);
  gap: var(--space-5);
  align-items: center;
}
.bf-personal-copy { display: grid; gap: var(--space-3); }
.bf-personal-copy h2 {
  margin: 0;
  font-size: clamp(1.27rem, 3vw, 1.75rem);
  line-height: 1.4;
  font-weight: 900;
  color: inherit;
  outline: none;
}
.bf-personal-copy p {
  margin: 0;
  color: var(--bf-notice-muted);
  font-size: .95rem;
  line-height: 1.76;
}
.bf-personal-copy .bf-personal-example {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-1);
  width: fit-content;
  padding: var(--space-2);
  border-radius: var(--space-2);
  border: 1px solid var(--bf-notice-line);
  background: #141414;
  font-size: .78rem;
}
.bf-personal-example b { color: var(--bf-notice-ink); }
.bf-personal-example b:nth-of-type(2), .bf-personal-example svg { color: var(--bf-notice-accent); }
.bf-personal-example .ui-icon { inline-size: .8rem; block-size: .8rem; margin-inline: var(--space-1); }
.bf-personal-figure {
  display: grid;
  justify-items: center;
  align-content: center;
  gap: var(--space-1);
  min-block-size: 10rem;
  padding: var(--space-3);
  border: 1px solid var(--bf-notice-line);
  border-radius: var(--space-4);
  text-align: center;
  background: radial-gradient(circle at center, #161616, transparent 73%), repeating-linear-gradient(137deg, #151515 0 1px, #101010 1px 12px);
}
.bf-personal-figure-icon {
  display: grid;
  place-items: center;
  inline-size: 2rem;
  block-size: 2rem;
  border: 1px solid var(--bf-notice-line);
  border-radius: 50%;
  color: var(--bf-notice-accent);
  background: #191919;
}
.bf-personal-number {
  color: var(--bf-notice-accent);
  font-size: clamp(2.5rem, 7vw, 3.5rem);
  font-weight: 900;
  line-height: 1.15;
  font-variant-numeric: tabular-nums;
}
.bf-personal-unit {
  color: var(--bf-notice-muted);
  font-size: .82rem;
  font-weight: 700;
  line-height: 1.4;
}
.bf-personal-footer {
  display: grid;
  gap: var(--space-2);
  padding-block-start: var(--space-4);
  border-block-start: 1px solid #2d2d2d;
}
.bf-personal-actions { display: flex; align-items: stretch; flex-wrap: wrap; gap: var(--space-2); }
.bf-personal-actions > button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-3);
  border-radius: var(--space-2);
  font-size: .87rem;
  font-weight: 800;
  line-height: 1.45;
}
.bf-personal-primary {
  border: 1px solid var(--bf-notice-accent);
  color: #0b0b0b;
  background: var(--bf-notice-accent);
}
.bf-personal-primary:hover { background: #c2ff79; }
.bf-personal-secondary {
  border: 1px solid var(--bf-notice-line);
  background: #191919;
  color: var(--bf-notice-ink);
}
.bf-personal-secondary:hover, .bf-personal-close:hover { background: #242424; }
.bf-personal-footer p { margin: 0; color: var(--bf-notice-muted); font-size: .76rem; line-height: 1.6; }
@media (max-width: 550px) {
  .bf-personal-frame { gap: var(--space-4); padding: var(--space-4); }
  .bf-personal-body { grid-template-columns: 1fr; gap: var(--space-3); }
  .bf-personal-figure {
    grid-auto-flow: column;
    justify-content: center;
    align-items: center;
    gap: var(--space-2);
    min-block-size: unset;
    padding: var(--space-2);
  }
  .bf-personal-figure .bf-personal-number { font-size: 2rem; }
  .bf-personal-actions > button { flex: 1 1 auto; }
}
@media (prefers-reduced-motion: no-preference) {
  .bf-personal-popup[open] { animation: bf-personal-enter .18s ease-out; }
  @keyframes bf-personal-enter {
    from { opacity: 0; transform: scale(.985); }
  }
}

.bf-demo-modal { display: grid; gap: var(--space-4); }
.bf-demo-modal > * { margin-block: 0; }
.bf-gift-result { display: flex; align-items: start; justify-content: space-between; gap: var(--space-3); padding: var(--space-4); }
.bf-gift-result-slot { padding: var(--space-4) var(--space-6); }
.bf-gift-result-copy > .bf-action { justify-self: start; }
.bf-gift-result-copy { display: grid; gap: var(--space-2); min-inline-size: 0; }
.bf-gift-result h2 { display: flex; align-items: center; gap: var(--space-2); font-size: 1.05rem; color: var(--ink); }
.bf-gift-result h2 > svg { width: 18px; height: 18px; flex: none; color: var(--teal); }
.bf-gift-result ul { display: grid; gap: var(--space-3); padding: 0; list-style: none; }
.bf-gift-result li { display: grid; gap: var(--space-1); overflow-wrap: anywhere; }
.bf-gift-result :is(p, small) { color: var(--muted); line-height: 1.7; }
.bf-print-bonus { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: start; gap: var(--space-3); padding: var(--space-3); background: var(--panel); color: var(--ink); border: 1px solid var(--line); border-radius: var(--space-3); text-align: start; }
.bf-print-bonus[hidden] { display: none; }
.bf-print-bonus > svg { width: 19px; height: 19px; color: var(--teal); }
.bf-print-bonus > div { display: grid; gap: var(--space-2); }
.bf-print-bonus p { color: var(--muted); font-size: .8rem; line-height: 1.65; }
.bf-print-bonus dl { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--space-2); }
.bf-print-bonus dl > div { display: grid; gap: var(--space-1); padding: var(--space-2); border: 1px solid var(--line); border-radius: var(--space-2); background: var(--panel-soft); }
.bf-print-bonus dt { font-size: .72rem; color: var(--muted); }
.bf-print-bonus dd { font-weight: 900; color: var(--ink); }
.bf-print-bonus dl > div:nth-child(2) dd { color: var(--teal); }
.shop-page:has(.bf-campaign, .bf-demo) { gap: var(--space-6); }
@media (max-width: 740px) {
  .bf-campaign { grid-template-columns: minmax(0, 1fr); gap: var(--space-5); padding: var(--space-5); }
  .bf-campaign h2 { font-size: clamp(1.58rem, 5.7vw, 2.3rem); }
  .bf-campaign-rate strong { font-size: 2.65rem; }
  .bf-tiers { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: var(--space-1); }
  .bf-tier { min-height: 62px; padding: var(--space-2) var(--space-1); }
  .bf-tier small { font-size: .66rem; }
  .bf-gift-result-slot { padding-inline: var(--space-3); }
}
@media (max-width: 440px) {
  .bf-campaign { padding: var(--space-4); }
  .bf-demo { grid-template-columns: auto minmax(0, 1fr); gap: var(--space-3); }
  .bf-demo > .bf-action { grid-column: 1 / -1; }
  .bf-gift-fields { grid-template-columns: minmax(0, 1fr); }
  :is(.store-public-actions, .lp-head-actions) .bf-gift-action-header { padding-inline: 0; }
  :is(.store-public-actions, .lp-head-actions) .bf-gift-action-header span { display: none; }
  .shop-card-actions:has(> .bf-gift-action) > .primary-button svg { display: none; }
}
