@font-face { font-family: "Vazirmatn"; src: url("fonts/Vazirmatn-Regular.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Vazirmatn"; src: url("fonts/Vazirmatn-Bold.woff2") format("woff2"); font-weight: 700; font-display: swap; }

:root {
  --bg: #f5f6f8; --card: #fff; --ink: #1d2433; --muted: #6b7280; --line: #e5e7eb;
  --brand: #1f3a5f; --brand-2: #2d5b8f; --gold: #b8893b;
  --ok: #15803d; --ok-bg: #e8f6ec; --warn: #b45309; --warn-bg: #fff4e0; --err: #b91c1c; --err-bg: #fdecec;
  --info: #1d4ed8; --info-bg: #e8effd; --radius: 10px;
}
* { box-sizing: border-box; }
body { margin: 0; font-family: "Vazirmatn", Tahoma, "Segoe UI", sans-serif; background: var(--bg); color: var(--ink);
  line-height: 1.8; font-size: 15px; }
a { color: var(--brand-2); text-decoration: none; }
a:hover { text-decoration: underline; }
header.top { background: var(--brand); color: #fff; }
header.top .in { max-width: 1150px; margin: auto; padding: 10px 16px; display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
header.top .logo { font-weight: 700; font-size: 18px; color: #fff; display: flex; align-items: center; gap: 8px; }
header.top .logo span.mark { width: 30px; height: 30px; border-radius: 50%; background: var(--gold); display: inline-grid; place-items: center; font-size: 14px; }
header.top nav { display: flex; gap: 14px; flex-wrap: wrap; flex: 1; }
header.top nav a { color: #dbe6f3; font-size: 14px; }
header.top nav a:hover { color: #fff; }
header.top .who { font-size: 13px; color: #c9d6e6; }
main { max-width: 1150px; margin: 24px auto; padding: 0 16px; }
h1 { font-size: 22px; margin: 0 0 16px; }
h2 { font-size: 17px; margin: 0 0 12px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; margin-bottom: 18px; }
.grid { display: grid; gap: 16px; }
.g2 { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.g4 { grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); }
.stat { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; }
.stat b { display: block; font-size: 24px; color: var(--brand); }
.stat span { color: var(--muted); font-size: 13px; }
label { display: block; font-size: 14px; margin: 10px 0 4px; color: #374151; }
input[type=text], input[type=email], input:not([type]), input[type=number], input[type=password], input[type=tel], input[type=search], select, textarea {
  width: 100%; padding: 9px 11px; border: 1px solid #cfd5dd; border-radius: 8px; font: inherit; background: #fff; }
textarea { min-height: 80px; }
input:focus, select:focus, textarea:focus { outline: 2px solid #9db8da; border-color: var(--brand-2); }
.btn { display: inline-block; border: 0; border-radius: 8px; padding: 9px 18px; font: inherit; cursor: pointer;
  background: var(--brand); color: #fff; text-decoration: none !important; }
.btn:hover { background: var(--brand-2); }
.btn.sec { background: #e7ecf3; color: var(--brand); }
.btn.ok { background: var(--ok); } .btn.danger { background: var(--err); }
.btn.sm { padding: 4px 10px; font-size: 13px; }
.row { display: flex; gap: 12px; flex-wrap: wrap; align-items: end; }
.row > * { flex: 1; min-width: 140px; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { padding: 9px 8px; border-bottom: 1px solid var(--line); text-align: right; vertical-align: top; }
th { color: var(--muted); font-weight: 500; background: #fafbfc; }
.tbl-wrap { overflow-x: auto; }
.flash { padding: 10px 14px; border-radius: 8px; margin-bottom: 12px; }
.flash.ok { background: var(--ok-bg); color: var(--ok); }
.flash.err { background: var(--err-bg); color: var(--err); }
.flash.info { background: var(--info-bg); color: var(--info); }
.badge { display: inline-block; padding: 1px 10px; border-radius: 99px; font-size: 12.5px; background: #eef1f5; color: #374151; white-space: nowrap; }
.badge.approved { background: var(--ok-bg); color: var(--ok); }
.badge.with_supervisor, .badge.evaluating, .badge.eval_error { background: var(--info-bg); color: var(--info); }
.badge.needs_revision, .badge.supervisor_rejected { background: var(--warn-bg); color: var(--warn); }
.badge.locked { background: var(--err-bg); color: var(--err); }
.muted { color: var(--muted); font-size: 13px; }
.score { font-size: 34px; font-weight: 700; }
.score.pass { color: var(--ok); } .score.fail { color: var(--warn); }
.bar { height: 8px; background: #edf0f4; border-radius: 99px; overflow: hidden; min-width: 80px; }
.bar i { display: block; height: 100%; background: var(--ok); }
.bar i.mid { background: #d59a2b; } .bar i.low { background: var(--err); }
.issue { color: var(--warn); font-size: 13.5px; }
.steps { display: flex; gap: 6px; flex-wrap: wrap; margin: 6px 0 16px; }
.steps span { flex: 1; min-width: 120px; text-align: center; padding: 6px; border-radius: 8px; background: #eef1f5; font-size: 13px; color: var(--muted); }
.steps span.done { background: var(--ok-bg); color: var(--ok); }
.steps span.cur { background: var(--brand); color: #fff; }
.hero { text-align: center; padding: 50px 20px; }
.hero h1 { font-size: 28px; }
.hero p { color: var(--muted); max-width: 640px; margin: 0 auto 22px; }
details summary { cursor: pointer; color: var(--brand-2); }
.hide { display: none; }
.kv { display: grid; grid-template-columns: 150px 1fr; gap: 4px 12px; font-size: 14px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; }
footer { text-align: center; color: var(--muted); font-size: 12px; padding: 30px 0; }
@media (max-width: 600px) { .kv { grid-template-columns: 1fr; } .score { font-size: 28px; } }

/* ---------- نوار مراحل (تایم‌لاین افقی) ---------- */
.wizard { display: flex; list-style: none; padding: 0; margin: 4px 0 22px; counter-reset: s; }
.wizard li { flex: 1; position: relative; text-align: center; font-size: 13.5px; color: var(--muted); }
.wizard li::before { /* خط اتصال */
  content: ""; position: absolute; top: 19px; left: 50%; width: 100%; height: 4px; background: #e3e7ed; z-index: 0; }
.wizard li:first-child::before { display: none; }
.wizard li.done::before, .wizard li.current::before, .wizard li.error::before { background: var(--ok); }
.wizard .dot { position: relative; z-index: 1; width: 40px; height: 40px; border-radius: 50%; margin: 0 auto 6px;
  display: grid; place-items: center; font-weight: 700; background: #fff; border: 3px solid #d5dbe3; color: #9aa3af; }
.wizard li.done .dot { background: var(--ok); border-color: var(--ok); color: #fff; }
.wizard li.current .dot { border-color: var(--ok); color: var(--ok); box-shadow: 0 0 0 5px #d9f2e1; }
.wizard li.error .dot { background: var(--err); border-color: var(--err); color: #fff; box-shadow: 0 0 0 5px #fbdcdc; }
.wizard li.done, .wizard li.current { color: var(--ok); }
.wizard li.error { color: var(--err); }
.wizard li.viewing .lbl { font-weight: 700; text-decoration: underline; text-underline-offset: 6px; }
.wizard a { color: inherit; text-decoration: none; }

/* ---------- راهنمای کوچک (تولتیپ) ---------- */
.tip { position: relative; display: inline-grid; place-items: center; width: 17px; height: 17px; border-radius: 50%;
  background: #e7ecf3; color: var(--brand); font-size: 11px; font-weight: 700; cursor: help; margin-inline-start: 4px;
  vertical-align: middle; font-style: normal; }
.tip::after { content: attr(data-tip); position: absolute; bottom: 135%; left: 50%; transform: translateX(-50%);
  width: max-content; max-width: 240px; padding: 7px 10px; border-radius: 8px; background: #1d2433; color: #fff;
  font-size: 12.5px; font-weight: 400; line-height: 1.7; text-align: right; white-space: normal;
  display: none; pointer-events: none; z-index: 20; box-shadow: 0 4px 14px rgba(0,0,0,.18); }
.tip:hover::after, .tip:focus::after { display: block; }
/* جلوگیری از بیرون‌زدن راهنما در لبه‌ها */
.wizard li:first-child .tip::after { left: auto; right: -8px; transform: none; }
.wizard li:last-child .tip::after { left: -8px; transform: none; }
.tip:focus { outline: 2px solid #9db8da; }

/* ---------- تایم‌لاین عمودی وضعیت ---------- */
.tl { list-style: none; margin: 0; padding: 0; }
.tl li { position: relative; padding: 0 44px 22px 0; }
.tl li::before { content: ""; position: absolute; right: 15px; top: 30px; bottom: -2px; width: 3px; background: #e3e7ed; }
.tl li:last-child::before { display: none; }
.tl li.done::before { background: var(--ok); }
.tl .mk { position: absolute; right: 0; top: 0; width: 33px; height: 33px; border-radius: 50%; display: grid; place-items: center;
  background: #fff; border: 3px solid #d5dbe3; color: #9aa3af; font-size: 15px; font-weight: 700; }
.tl li.done .mk { background: var(--ok); border-color: var(--ok); color: #fff; }
.tl li.current .mk { border-color: var(--info); color: var(--info); animation: pulse 1.6s infinite; }
.tl li.error .mk { background: var(--err); border-color: var(--err); color: #fff; }
.tl .t { font-weight: 700; }
.tl li.done .t { color: var(--ok); } .tl li.error .t { color: var(--err); } .tl li.current .t { color: var(--info); }
.tl .n { color: var(--muted); font-size: 13.5px; }
@keyframes pulse { 0%,100% { box-shadow: 0 0 0 0 #c9dafb; } 50% { box-shadow: 0 0 0 7px transparent; } }
.wait-box { background: var(--info-bg); color: var(--info); border-radius: 10px; padding: 14px 16px; display: flex; gap: 12px; align-items: center; }
.wait-box b { font-size: 18px; }
.actions { display: flex; gap: 10px; flex-wrap: wrap; justify-content: space-between; margin-top: 18px; }
@media (max-width: 600px) {
  .wizard li { font-size: 11.5px; } .wizard .dot { width: 32px; height: 32px; } .wizard li::before { top: 15px; }
  .tip::after { max-width: 200px; }
}
@media (prefers-reduced-motion: reduce) { .tl li.current .mk { animation: none; } }

/* ---------- منوی کناری مدیریت (سمت راست) ---------- */
.admin-shell { display: flex; align-items: flex-start; min-height: 100vh; }
.side { flex: 0 0 250px; width: 250px; background: var(--brand); color: #fff; min-height: 100vh;
  position: sticky; top: 0; align-self: flex-start; max-height: 100vh; overflow-y: auto; }
.side-head { padding: 18px 14px; }
.side .logo { color: #fff; font-weight: 700; font-size: 17px; display: flex; align-items: center; gap: 8px;
  text-decoration: none; padding: 0 6px 14px; }
.side .logo .mark { width: 32px; height: 32px; border-radius: 50%; background: var(--gold); display: inline-grid; place-items: center; font-size: 14px; }
.side-nav { display: flex; flex-direction: column; gap: 2px; }
.side-nav a { display: flex; align-items: center; gap: 10px; color: #d6e2f0; padding: 9px 12px; border-radius: 8px;
  font-size: 14.5px; text-decoration: none; border-right: 3px solid transparent; }
.side-nav a:hover { background: rgba(255,255,255,.08); color: #fff; text-decoration: none; }
.side-nav a.on { background: rgba(255,255,255,.14); color: #fff; font-weight: 700; border-right-color: var(--gold); }
.side-nav a.out { color: #f3c2c2; }
.side-nav a.out:hover { background: rgba(220,60,60,.18); color: #fff; }
.side-nav .ic { width: 20px; text-align: center; font-size: 15px; opacity: .9; }
.side-nav hr { border: 0; border-top: 1px solid rgba(255,255,255,.18); margin: 8px 6px; }
.side-user { color: #9fb3cb; font-size: 12.5px; padding: 12px 12px 0; }
.nav-btn { display: none; }
.nav-toggle { position: absolute; opacity: 0; width: 1px; height: 1px; pointer-events: none; }
.admin-main { flex: 1; min-width: 0; padding: 24px 24px 40px; max-width: 1150px; }

@media (max-width: 900px) {
  .admin-shell { display: block; }
  .side { position: static; width: auto; min-height: 0; max-height: none; }
  .side-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; padding: 10px 16px; }
  .side .logo { padding: 0; }
  .nav-btn { display: inline-block; cursor: pointer; padding: 6px 12px; border: 1px solid rgba(255,255,255,.35);
    border-radius: 8px; font-size: 14px; }
  .side-nav { display: none; flex-basis: 100%; padding-top: 10px; }
  .nav-toggle:checked ~ .side-nav { display: flex; }
  .nav-toggle:focus-visible + .nav-btn { outline: 2px solid #fff; }
  .admin-main { padding: 18px 16px 30px; }
}
input[type=file] { max-width: 100%; width: 100%; font-size: 13px; }
.row > * { min-width: min(140px, 100%); }

.chips { display: flex; flex-wrap: wrap; gap: 6px 8px; margin: 4px 0; }
.chip { display: inline-flex; align-items: center; gap: 6px; margin: 0; padding: 4px 11px; border: 1px solid #d5dbe3;
  border-radius: 99px; background: #fafbfc; font-size: 13.5px; cursor: pointer; }
.chip:has(input:checked) { background: var(--ok-bg); border-color: #9fd3b0; color: var(--ok); }

/* ---------- نسخه جمع‌وجورتر پنل مدیر ---------- */
.side { flex-basis: 220px; width: 220px; overflow: visible; max-height: none; }
.side-head { padding: 12px 10px; }
.side .logo { font-size: 15.5px; padding: 0 6px 10px; }
.side .logo .mark { width: 28px; height: 28px; font-size: 13px; }
.side-nav { gap: 0; }
.side-nav a { padding: 6px 10px; font-size: 13.5px; gap: 8px; line-height: 1.6; }
.side-nav .ic { width: 18px; font-size: 13.5px; }
.side-nav hr { margin: 5px 6px; }
.side-user { padding: 8px 10px 0; font-size: 12px; }
.admin-main { padding: 18px 20px 30px; font-size: 14.5px; }
.admin-main h1 { font-size: 20px; margin-bottom: 12px; }
.admin-main h2 { font-size: 15.5px; margin-bottom: 8px; }
.admin-main .card { padding: 14px 16px; margin-bottom: 12px; }
.admin-main label { margin: 6px 0 3px; font-size: 13.5px; }
.admin-main input[type=text], .admin-main input[type=email], .admin-main input:not([type]), .admin-main input[type=number], .admin-main input[type=password],
.admin-main input[type=tel], .admin-main select, .admin-main textarea { padding: 6px 9px; }
.admin-main .row { gap: 10px; }
.admin-main .grid { gap: 12px; }
.admin-main .stat { padding: 10px 12px; }
.admin-main .stat b { font-size: 20px; }
.admin-main th, .admin-main td { padding: 7px 6px; }
.admin-main p { margin: 8px 0; }
.admin-main .actions { margin-top: 10px; }
.admin-main .chip { padding: 2px 10px; font-size: 13px; }
@media (max-width: 900px) { .side { width: auto; } }

/* ---------- صفحه ورود مدیر (جدا از سایت دانشجو) ---------- */
body.admin-login { background: var(--brand); min-height: 100vh; display: grid; place-items: center; padding: 16px; }
.admin-login-box { width: 100%; max-width: 380px; }
.admin-login .side-logo { color: #fff; font-weight: 700; font-size: 18px; display: flex; align-items: center;
  justify-content: center; gap: 8px; margin-bottom: 14px; }
.admin-login .side-logo .mark { width: 34px; height: 34px; border-radius: 50%; background: var(--gold); display: inline-grid; place-items: center; font-size: 15px; }
.admin-login h1 { font-size: 19px; text-align: center; }

/* ---------- اعتبارسنجی فرم ---------- */
.field-err { color: var(--err); font-size: 12.5px; margin-top: 3px; }
.fg.invalid input, .fg.invalid select, .fg.invalid textarea { border-color: var(--err); background: #fff7f7; }
.fg.invalid label { color: var(--err); }
.fg.valid input:not([type=file]), .fg.valid select, .fg.valid textarea { border-color: #7cc596; }
.fg.invalid input[type=file] { outline: 2px solid var(--err); border-radius: 6px; }

/* =====================================================================
   ریسپانسیو — موبایل و تبلت
   ===================================================================== */
.out-link { color: #fff; white-space: nowrap; }
.wizard-hint { display: none; }
.report-head { display: flex; flex-wrap: wrap; gap: 8px 18px; align-items: center; margin-bottom: 10px; }
img, video, canvas { max-width: 100%; height: auto; }
.card, .kv dd, td { overflow-wrap: anywhere; }

/* لمسی: اهداف بزرگ‌تر برای انگشت */
@media (pointer: coarse) {
  .tip { width: 24px; height: 24px; font-size: 13px; }
  .btn { min-height: 42px; }
  .btn.sm { min-height: 34px; padding: 6px 12px; }
  .chip { min-height: 36px; padding: 4px 12px; }
  details summary { padding: 6px 0; }
}

/* تبلت */
@media (max-width: 900px) {
  main { margin: 18px auto; }
  .g4 { grid-template-columns: repeat(2, 1fr); }
}

/* موبایل */
@media (max-width: 640px) {
  body { font-size: 14.5px; }
  /* جلوگیری از بزرگ‌نمایی خودکار آیفون هنگام لمس فیلد */
  input[type=text], input[type=number], input[type=password], input[type=tel], select, textarea,
  .admin-main input[type=text], .admin-main input[type=number], .admin-main input[type=password],
  .admin-main input[type=tel], .admin-main select, .admin-main textarea { font-size: 16px; }

  /* هدر جمع‌وجور: ردیف اول لوگو و خروج، ردیف دوم منو */
  header.top .in { padding: 8px 14px; gap: 4px 12px; }
  header.top .logo { font-size: 16px; flex: 1; }
  header.top .logo span.mark { width: 26px; height: 26px; font-size: 12px; }
  header.top nav { order: 3; flex-basis: 100%; gap: 18px; }
  header.top nav a { padding: 6px 0; font-size: 14px; }
  header.top .who { font-size: 13px; }
  header.top .who .nm { display: none; }

  main { margin: 14px auto; padding: 0 12px; }
  h1 { font-size: 19px; margin-bottom: 12px; }
  h2 { font-size: 16px; }
  .card { padding: 14px; margin-bottom: 12px; border-radius: 12px; }
  .hero { padding: 28px 8px; }
  .hero h1 { font-size: 22px; }
  .hero .btn { display: block; margin: 8px 0; }
  .g4 { grid-template-columns: 1fr 1fr; gap: 10px; }
  .score { font-size: 28px; }

  /* نوار مراحل */
  .wizard { margin-bottom: 8px; }
  .wizard .pre, .wizard .tip { display: none; }
  .wizard li { font-size: 12px; line-height: 1.5; padding: 0 2px; }
  .wizard .dot { width: 30px; height: 30px; border-width: 2px; font-size: 13px; margin-bottom: 4px; }
  .wizard li::before { top: 13px; height: 3px; }
  .wizard li.current .dot { box-shadow: 0 0 0 4px #d9f2e1; }
  .wizard-hint { display: block; font-size: 12.5px; color: var(--muted); background: #fff; border: 1px dashed #d5dbe3;
    border-radius: 10px; padding: 7px 10px; margin: 0 0 14px; }

  /* فهرست مشخصات: برچسب کوچک بالای مقدار */
  .kv { grid-template-columns: 1fr; gap: 0; }
  .kv dt { font-size: 12.5px; margin-top: 8px; }
  .kv dd { font-weight: 500; }

  /* دکمه‌های پایین فرم تمام‌عرض */
  .actions { flex-direction: column-reverse; align-items: stretch; }
  .actions > *, .actions form, .actions form .btn { width: 100%; text-align: center; }
  .row > * { flex-basis: 100%; }

  /* پنل مدیر */
  .admin-main { padding: 14px 12px 24px; }
  .admin-main .card { padding: 12px; }
  .chips { gap: 6px; }
  .tl li { padding-right: 40px; }
}

/* موبایل خیلی کوچک (۳۲۰ پیکسل) */
@media (max-width: 360px) {
  .wizard li { font-size: 11px; }
  .g4 { grid-template-columns: 1fr; }
}

/* جدول‌ها وقتی ناحیه محتوا باریک است (موبایل، یا تبلت با منوی کناری) به کارت تبدیل می‌شوند */
main, .admin-main { container-type: inline-size; container-name: content; }
.btn { white-space: nowrap; }
@container content (max-width: 860px) {

  .tbl-wrap { overflow: visible; }
  table.rt, table.rt tbody, table.rt tr, table.rt td { display: block; width: 100%; }
  table.rt thead { display: none; }
  table.rt tr { border: 1px solid var(--line); border-radius: 10px; padding: 8px 12px; margin-bottom: 10px; background: #fff; }
  table.rt td { border: 0; padding: 4px 0; display: flex; flex-wrap: wrap; gap: 2px 10px; align-items: baseline; justify-content: flex-start; text-align: right; }
  table.rt td > * { text-align: right; }
  table.rt td[data-label]::before { content: attr(data-label); color: var(--muted); font-size: 12.5px; flex: 0 0 92px; text-align: right; }
  table.rt td.rt-title, table.rt td:has(.rt-title) { display: block; text-align: right; font-size: 15px; padding-bottom: 6px;
    border-bottom: 1px solid var(--line); margin-bottom: 4px; }
  table.rt td.rt-title::before, table.rt td:has(.rt-title)::before { display: none; }
  table.rt td.rt-title > *, table.rt td:has(.rt-title) > * { text-align: right; }
  table.rt td.rt-actions { justify-content: flex-start; flex-wrap: wrap; padding-top: 8px; }
  table.rt td.rt-actions details { width: 100%; }
  table.rt td[colspan] { display: block; text-align: center; }
  table.rt td[colspan]::before { display: none; }
  table.rt .bar { flex: 1; max-width: 140px; }
  table.rt td[data-label="وضعیت"], table.rt td[data-label="متن"], table.rt td[data-label="جزئیات"],
  table.rt td[data-label="پارامترها"] { display: block; text-align: right; }
  table.rt td[data-label="وضعیت"]::before, table.rt td[data-label="متن"]::before,
  table.rt td[data-label="جزئیات"]::before, table.rt td[data-label="پارامترها"]::before { display: block; margin-bottom: 2px; }
  table.rt td[data-label="وضعیت"] > *, table.rt td[data-label="متن"] > * { text-align: right; }

}

.nw { white-space: nowrap; }
td .badge { white-space: nowrap; }
.copy-row { display: flex; gap: 8px; align-items: center; }
.copy-row input { flex: 1; min-width: 0; font-size: 13px; }

@media (max-width: 640px) { .actions.fwd { flex-direction: column; } }

/* ---------- فهرست پروپوزال‌های دانشجو ---------- */
.list-head { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.list-head h1 { margin: 0; }
.plist { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 330px), 1fr)); }
.pcard { margin: 0; display: flex; flex-direction: column; gap: 6px; }
.pcard.is-open { border-color: #9fd3b0; box-shadow: 0 0 0 3px #e8f6ec; }
.pcard-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.pcard h2 { margin: 4px 0 0; line-height: 1.7; }
.pcard-meta { line-height: 1.9; }
.pcard-actions { margin-top: auto; padding-top: 8px; display: flex; flex-wrap: wrap; gap: 8px; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
@media (max-width: 640px) { .list-head .btn { width: 100%; } .list-head form { width: 100%; } .pcard-actions .btn { flex: 1; text-align: center; } }

/* ---------- شباهت عنوان، اقدام بعدی، پیشرفت ---------- */
.sim-box { margin-top: 6px; padding: 6px 10px; border-radius: 8px; font-size: 13px; }
.sim-box.low { background: var(--ok-bg); color: var(--ok); }
.sim-box.mid { background: var(--warn-bg); color: var(--warn); }
.sim-box.high { background: var(--err-bg); color: var(--err); font-weight: 700; }
.next-box { display: flex; flex-wrap: wrap; gap: 10px 16px; align-items: center; justify-content: space-between;
  background: #fff; border: 1px solid var(--line); border-right: 4px solid var(--brand); border-radius: 10px;
  padding: 12px 14px; margin-bottom: 16px; }
.next-box.wait { border-right-color: var(--info); }
.next-box.done { border-right-color: var(--ok); }
.next-box .nb-label { font-size: 12px; color: var(--muted); }
.next-box .nb-text { font-weight: 700; }
.progress { display: flex; align-items: center; gap: 8px; min-width: 160px; flex: 1; max-width: 280px; }
.progress .bar { flex: 1; height: 10px; }
.progress span { font-size: 13px; color: var(--muted); white-space: nowrap; }
@media (max-width: 640px) { .next-box .btn { width: 100%; text-align: center; } .progress { max-width: none; } }
.pcard-next { font-size: 13.5px; margin: 4px 0 0; color: var(--brand); }
.hist { list-style: none; margin: 0; padding: 0; }
.hist li { border-right: 3px solid var(--line); padding: 4px 12px 10px; position: relative; }
.hist li::before { content: ""; position: absolute; right: -7px; top: 9px; width: 11px; height: 11px; border-radius: 50%; background: var(--brand-2); }
.hist-top { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; }

/* ---------- گزارش نگارشی ---------- */
.writing { margin-top: 12px; border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; background: #fcfcfd; }
.writing summary { cursor: pointer; color: var(--ink); }
.w-list { list-style: none; margin: 0; padding: 0; }
.w-list li { padding: 8px 0; border-bottom: 1px dashed var(--line); }
.w-list li:last-child { border-bottom: 0; }
.w-ctx { margin-top: 4px; line-height: 2; }
.w-ctx mark { background: #ffe1e1; color: var(--err); border-radius: 4px; padding: 0 3px; }
.w-fix { font-size: 13.5px; color: var(--ok); }
@media print { .writing { display: block; } .writing[open] summary ~ * , .writing summary ~ * { display: block; } }

/* ---------- بخش‌های فرم پروپوزال ---------- */
.sec-card { margin: 18px 0 8px; padding-top: 14px; border-top: 2px solid var(--line); }
.sec-card h2 { margin-bottom: 4px; }
.psec { margin-top: 14px; }
.psec label { font-weight: 700; color: var(--ink); }
.sec-guide { font-size: 13px; color: var(--muted); background: #f6f8fb; border-right: 3px solid var(--brand-2);
  border-radius: 6px; padding: 5px 9px; margin: 2px 0 6px; }
.sec-count { font-size: 12.5px; margin-top: 3px; }
.sec-count.short { color: var(--warn); }
.li-wrap { display: flex; flex-direction: column; gap: 6px; margin-bottom: 6px; }
.li-row { display: flex; gap: 6px; align-items: center; }
.li-row input { flex: 1; min-width: 0; }
.li-rm { flex: 0 0 auto; }
.psec.invalid textarea, .psec.invalid input { border-color: var(--err); background: #fff7f7; }
.psec.invalid label { color: var(--err); }
.sec-view h3 { font-size: 14.5px; margin: 14px 0 4px; color: var(--brand); }
.sec-view p, .sec-view li { white-space: pre-line; line-height: 2; }
.dh-box { margin: 10px 0; border: 1px dashed var(--line); border-radius: 10px; padding: 8px 12px; }
.dh-box summary { cursor: pointer; font-weight: 700; }
.badge.with_dept_head { background: var(--info-bg); color: var(--info); }
.badge.dept_rejected { background: var(--warn-bg); color: var(--warn); }
.hero .hero-sub { color: var(--brand); font-weight: 700; margin: -6px auto 14px; }

/* ---------- لینک اصلاح ایرادها ---------- */
.fix-link { display: inline-block; margin-top: 4px; font-size: 13px; font-weight: 700; }
.jump { font-weight: 700; text-decoration: underline; text-underline-offset: 4px; }
html { scroll-behavior: smooth; }
#report { scroll-margin-top: 12px; }
.psec.focus-flash { animation: focusflash 2.4s ease-out 1; border-radius: 10px; }
.fg.focus-flash { animation: focusflash 2.4s ease-out 1; border-radius: 10px; }
@keyframes focusflash { 0%, 35% { box-shadow: 0 0 0 4px #ffd36b; background: #fff8e1; } 100% { box-shadow: none; background: transparent; } }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } .psec.focus-flash, .fg.focus-flash { animation: none; outline: 3px solid #ffd36b; } }
.sec-count.short { font-weight: 700; }
.sec-count.enough { color: var(--ok); }

/* ---------- لوگوی برنا ---------- */
.logo-img { width: 30px; height: 30px; display: inline-block; flex: 0 0 auto; }
.side .logo .logo-img { width: 28px; height: 28px; }
.admin-login .logo-img { width: 34px; height: 34px; }
.hero-logo { width: 84px; height: 84px; display: block; margin: 0 auto 10px; }
@media (max-width: 640px) { header.top .logo .logo-img { width: 26px; height: 26px; } .hero-logo { width: 64px; height: 64px; } }

/* ---------- ایراد هر بخش در صفحه ارسال مجدد ---------- */
.psec.has-issue { border-right: 4px solid #e8a33a; padding-right: 10px; }
.sec-issue { background: var(--warn-bg); color: var(--warn); border-radius: 8px; padding: 6px 10px; margin: 2px 0 6px;
  font-size: 13.5px; font-weight: 700; }
.sec-issues-head { background: var(--warn-bg); color: var(--warn); border-radius: 8px; padding: 8px 12px; font-weight: 700; }
.sec-ok-box { margin-top: 16px; border: 1px solid var(--line); border-radius: 10px; padding: 8px 12px; }
.sec-ok-box summary { cursor: pointer; color: var(--brand-2); font-weight: 700; }

/* ---------- صفحه اصلی و «درباره سامانه» ---------- */
.hero-more { margin: 16px 0 0; font-size: 14px; }
.about { max-width: 900px; margin: 0 auto; }
.about-hero { text-align: center; }
.about-hero p { max-width: 680px; margin-left: auto; margin-right: auto; }
.about-who b { display: block; margin-bottom: 4px; color: var(--brand); }
.about-who p { margin: 0; color: #4b5563; font-size: 14px; }
.about-steps .mk { font-size: 14px; }
.about-list { margin: 0; padding-right: 20px; line-height: 2.1; }
.faq { border-bottom: 1px solid var(--line); padding: 8px 0; }
.faq:last-of-type { border-bottom: 0; }
.faq summary { cursor: pointer; font-weight: 700; color: var(--ink); }
.faq p { margin: 6px 0 2px; color: #4b5563; }
.about-actions { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin: 6px 0 10px; }
@media (max-width: 640px) { .about-actions .btn { width: 100%; text-align: center; } }

.psec.fixed { border-right-color: #7cc596; }
.psec.fixed .sec-issue { opacity: 0; max-height: 0; padding: 0 10px; margin: 0; overflow: hidden;
  transition: opacity .5s ease, max-height .5s ease, padding .5s ease, margin .5s ease; }
.sec-issue { max-height: 200px; transition: opacity .5s ease, max-height .5s ease; }
.psec.fixed .sec-icon { color: var(--ok); }
.sec-issue-hint { font-weight: 400; font-size: 12.5px; margin-top: 2px; }
.sec-enter { font-size: 13px; color: var(--brand); background: var(--info-bg); border-radius: 6px; padding: 4px 9px; margin: 2px 0 6px; }

/* ---------- در حال بررسی: ساعت شنی وسط صفحه ---------- */
.eval-overlay { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; padding: 16px;
  background: rgba(17, 45, 92, .28); backdrop-filter: blur(3px); animation: fadein .3s ease; }
.eval-overlay.hidden { display: none; }
.eval-card { background: #fff; border-radius: 18px; padding: 28px 26px 22px; max-width: 440px; width: 100%; text-align: center;
  box-shadow: 0 20px 60px rgba(17, 45, 92, .25); }
.eval-card h2 { font-size: 19px; margin: 6px 0 8px; color: var(--brand); }
.eval-card p { line-height: 2; margin: 6px 0; }
.eval-card .btn { margin-top: 10px; min-width: 120px; }
.hourglass { position: relative; width: 120px; height: 120px; margin: 0 auto 6px; display: grid; place-items: center; }
.hg-ring { position: absolute; inset: 0; border-radius: 50%; border: 3px solid #e3e9f2; border-top-color: var(--gold);
  animation: spin 2.4s linear infinite; }
.hg-ring.r2 { inset: 12px; border-width: 2px; border-top-color: transparent; border-bottom-color: var(--brand-2);
  animation-duration: 3.6s; animation-direction: reverse; }
.hg-svg { width: 48px; height: 72px; animation: flip 4s ease-in-out infinite; transform-origin: 50% 50%; }
.hg-frame { fill: none; stroke: var(--brand); stroke-width: 4; stroke-linecap: round; }
.hg-sand-top { fill: var(--gold); transform-origin: 32px 46px; animation: drain 4s ease-in infinite; }
.hg-sand-bottom { fill: var(--gold); transform-origin: 32px 86px; animation: fill 4s ease-out infinite; }
.hg-stream { stroke: var(--gold); stroke-width: 2; stroke-dasharray: 3 3; animation: stream .5s linear infinite; }
.think-dots i { font-style: normal; animation: blink 1.4s infinite both; }
.think-dots i:nth-child(2) { animation-delay: .2s; } .think-dots i:nth-child(3) { animation-delay: .4s; }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes flip { 0%, 88% { transform: rotate(0); } 100% { transform: rotate(180deg); } }
@keyframes drain { 0% { transform: scaleY(1); } 85%, 100% { transform: scaleY(.05); } }
@keyframes fill { 0% { transform: scaleY(.1); } 85%, 100% { transform: scaleY(1); } }
@keyframes stream { to { stroke-dashoffset: -6; } }
@keyframes blink { 0%, 80%, 100% { opacity: .2; } 40% { opacity: 1; } }
@keyframes fadein { from { opacity: 0; } to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) {
  .hg-ring, .hg-svg, .hg-sand-top, .hg-sand-bottom, .hg-stream, .think-dots i, .eval-overlay { animation: none; }
}
/* نتایج ارسال قبلی هنگام بررسی فایل جدید کم‌رنگ می‌شوند */
.old-result { opacity: .5; filter: grayscale(.6); position: relative; }
.old-result:hover { opacity: .8; }
.old-tag { display: inline-block; background: #eef1f5; color: #4b5563; border-radius: 99px; padding: 2px 12px; font-size: 12.5px;
  font-weight: 700; margin-bottom: 8px; }
.support-line { display: flex; flex-wrap: wrap; gap: 6px 18px; margin-top: 8px; color: var(--ink); }

/* ---------- ارسال‌های قبلی (آبشاری) ---------- */
.older-results h2 { margin-bottom: 6px; }
.older { border: 1px solid var(--line); border-radius: 10px; padding: 0 12px; margin-top: 8px; background: #fcfcfd; }
.older > summary { cursor: pointer; padding: 10px 0; display: flex; flex-wrap: wrap; gap: 6px 12px; align-items: center; list-style: none; }
.older > summary::-webkit-details-marker { display: none; }
.older > summary::before { content: "◂"; color: var(--brand-2); transition: transform .2s; display: inline-block; }
.older[open] > summary::before { transform: rotate(-90deg); }
.older[open] { padding-bottom: 12px; background: #fff; }

/* ---------- برگه‌های پروپوزال‌ها، بایگانی و حذف ---------- */
.tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 12px; border-bottom: 2px solid var(--line); }
.tab { padding: 8px 14px; border-radius: 10px 10px 0 0; color: var(--muted); text-decoration: none !important; font-weight: 700;
  margin-bottom: -2px; border-bottom: 2px solid transparent; }
.tab.on { color: var(--brand); border-bottom-color: var(--brand); background: #fff; }
.tab-n { display: inline-block; min-width: 22px; padding: 0 6px; border-radius: 99px; background: #eef1f5; font-size: 12px;
  text-align: center; margin-right: 4px; }
.tab.on .tab-n { background: var(--brand); color: #fff; }
.state-banner { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.danger-zone { border-color: #f1c4c4; }
.danger-zone h2 { color: var(--err); }

/* ---------- جدول قواعد: ستون‌های کوتاه یک‌خطی ---------- */
@container content (min-width: 861px) {
  table.rt td.rt-actions { white-space: nowrap; width: 1%; vertical-align: top; }
  table.rt td.rt-actions > details, table.rt td.rt-actions > form { display: inline-block; vertical-align: top; margin-inline-end: 4px; }
  table.rt td.rt-actions > details[open] { display: block; white-space: normal; min-width: 320px; margin-bottom: 6px; }
  table.rt td[data-label="نوع"], table.rt td[data-label="وزن"], table.rt th { white-space: nowrap; }
}
table.rt td.rt-actions summary { cursor: pointer; display: inline-block; padding: 4px 12px; border: 1px solid var(--line);
  border-radius: 8px; font-size: 13px; font-weight: 700; color: var(--brand); background: #fff; list-style: none; }
table.rt td.rt-actions summary::-webkit-details-marker { display: none; }

/* ---------- اتصال سرویس‌ها ---------- */
.svc-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr)); gap: 0 16px; }
.svc-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; }
.svc-head h2 { margin: 0; }
.svc-field { margin-bottom: 10px; }
.svc-field .hint { color: var(--muted); font-size: 12.5px; margin-top: 3px; }
.svc-field .src { font-size: 11px; font-weight: 400; background: #eef1f5; color: var(--muted); border-radius: 99px; padding: 1px 8px; margin-right: 6px; }
.svc-field .src.env { background: #fff4e0; color: #8a5a00; }
.secret-row { display: flex; gap: 6px; }
.secret-row input { flex: 1; min-width: 0; }
.chk { display: flex; gap: 8px; align-items: center; font-weight: 400; cursor: pointer; }
.chk input { width: auto; }
.chk.small { font-size: 12.5px; color: var(--muted); margin-top: 4px; }
.svc-actions { justify-content: flex-start; }

/* ---------- صفحه هر دانشگاه ---------- */
.crumb { margin: 0 0 4px; font-size: 13px; }
.crumb a { color: var(--muted); }
.uni-steps { display: flex; gap: 8px; flex-wrap: wrap; margin: 4px 0 14px; }
.uni-steps a { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border: 1px solid var(--line);
  border-radius: 99px; background: #fff; color: var(--ink, #1f2937); text-decoration: none; font-size: 13.5px; }
.uni-steps a span { display: inline-grid; place-items: center; width: 20px; height: 20px; border-radius: 50%;
  background: var(--brand); color: #fff; font-size: 11.5px; }
.uni-steps a b { color: var(--muted); font-weight: 400; }
.uni-steps a.todo { border-color: #f1c4c4; background: #fff6f6; }
.uni-steps a.todo span { background: var(--err); }
.add-field { margin-bottom: 14px; }
.add-field input[type=text] { max-width: 560px; }
.deg-row { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 8px; }
.deg-form { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.chip.sm { padding: 3px 9px; font-size: 12.5px; }
.sup-list { list-style: none; padding: 0; margin: 0 0 10px; }
.sup-list li { display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--line); }
.sup-list li:last-child { border-bottom: 0; }
.sup-list .sm-link { margin-inline-start: auto; font-size: 13px; }
.sub-add { margin-top: 10px; }
.sub-add > summary { cursor: pointer; color: var(--brand); font-weight: 700; padding: 4px 0; }
.add-uni > summary { cursor: pointer; list-style: none; }
.add-uni > summary::-webkit-details-marker { display: none; }
.add-uni > summary b { color: var(--brand); }
.list-head .btn { white-space: nowrap; }
html { scroll-padding-top: 12px; }
:target.card { outline: 2px solid var(--brand); outline-offset: 2px; transition: outline-color 1.5s; }

.field-rows { list-style: none; padding: 0; margin: 0 0 10px; border: 1px solid var(--line); border-radius: 10px; }
.field-rows li { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; padding: 8px 12px; border-bottom: 1px solid var(--line); }
.field-rows li:last-child { border-bottom: 0; }
.field-rows .fr-name { flex: 1 1 160px; }
.field-rows .fr-remove { margin: 0; }
.deg-save[hidden] { display: none !important; }
.std-rows .std-deg { flex: 0 0 110px; color: var(--muted); font-size: 13px; }
@media (max-width: 640px) { .std-rows .std-deg { flex-basis: 100%; } }
.danger-zone-inline { margin-top: 12px; padding-top: 10px; border-top: 1px dashed #f1c4c4; }
.danger-zone-inline form { margin: 0; }
.del-blocked { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; }
.del-blocked .btn[disabled] { background: #e5e7eb; color: #9ca3af; border-color: #e5e7eb; cursor: not-allowed; }
.del-blocked .muted { font-size: 12.5px; }

/* ---------- گفت‌وگوی استاد و مدیرگروه ---------- */
.thread { list-style: none; padding: 0; margin: 0 0 8px; display: grid; gap: 8px; }
.thread li { border: 1px solid var(--line); border-radius: 10px; padding: 8px 12px; background: #fff; }
.thread li.th-dept { border-inline-start: 4px solid #6366f1; }
.thread li.th-supervisor { border-inline-start: 4px solid var(--brand); }
.thread li.th-admin { border-inline-start: 4px solid #f59e0b; }
.thread li.th-k-oppose, .thread li.th-k-changes { background: #fff6f6; }
.thread li.th-k-agree, .thread li.th-k-approve { background: #f3fbf5; }
.th-head { display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: baseline; font-size: 13.5px; }
.th-kind { font-weight: 700; }
.th-head time { margin-inline-start: auto; font-size: 12px; }
.th-text { margin-top: 4px; white-space: pre-wrap; }
.small { font-size: 12.5px; }
.opinion-box { border-radius: 10px; padding: 10px 12px; margin-bottom: 10px; border: 1px solid var(--line); }
.opinion-box p { margin: 6px 0 0; white-space: pre-wrap; }
.opinion-box.op-agree { background: #f3fbf5; border-color: #9fd3b0; }
.opinion-box.op-oppose, .opinion-box.op-changes { background: #fff1f1; border-color: #f1a9a9; }
.opinion-box.op-oppose b, .opinion-box.op-changes b { color: var(--err); }
.badge.needs_coordination { background: #fff4e0; color: #8a5a00; }
.dh-rows { display: block; }
.dh-row { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; padding: 8px 12px; border-bottom: 1px solid var(--line); }
.dh-row:last-child { border-bottom: 0; }
.dh-row select { flex: 1 1 220px; max-width: 360px; }

/* ---------- جعبه‌های متن: هرگز از کادر بیرون نمی‌زنند؛ فقط از پایین بلند می‌شوند ---------- */
textarea { box-sizing: border-box; max-width: 100%; width: 100%; resize: vertical; }
textarea.autogrow { overflow: hidden; resize: none; min-height: 64px; }
input, select { max-width: 100%; box-sizing: border-box; }
.card, .fg, fieldset { min-width: 0; }

/* ---------- فرم دانشجو (فرم شماره ۱) ---------- */
.form-card { max-width: 860px; margin: 0 auto 16px; }
.fs { border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px 4px; margin: 0 0 14px; }
.fs > legend { font-weight: 800; color: var(--brand); padding: 0 8px; font-size: 15px; }
.fguide { font-size: 13px; line-height: 1.8; color: #44506a; background: #f4f7fb; border-inline-start: 3px solid #b9c7da;
  border-radius: 8px; padding: 6px 10px; margin: 0 0 6px; transition: background .2s, border-color .2s; white-space: pre-line; }
.fguide .fg-more { margin-top: 2px; }
.fguide .fg-more > summary { cursor: pointer; color: var(--brand); font-weight: 700; font-size: 12.5px; }
.fguide .fg-more > div { margin-top: 4px; white-space: pre-line; }
.fg:focus-within > .fguide, .psec:focus-within > .fguide { background: #eaf2ff; border-color: var(--brand); color: #1d2b44; }
.fg .lbl { display: block; font-weight: 700; margin: 4px 0; }
.radio-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); gap: 8px; }
.rcard { display: flex; flex-direction: column; gap: 2px; border: 1.5px solid var(--line); border-radius: 10px; padding: 10px 12px;
  cursor: pointer; background: #fff; font-weight: 400; }
.rcard input { position: absolute; opacity: 0; pointer-events: none; }
.rcard b { font-size: 14.5px; }
.rcard span { font-size: 12.5px; color: var(--muted); }
.rcard:has(input:checked) { border-color: var(--brand); background: #eef4ff; box-shadow: 0 0 0 2px rgba(30, 58, 110, .12); }
.rcard:has(input:focus-visible) { outline: 2px solid var(--brand); outline-offset: 2px; }
.chk.pledge { align-items: flex-start; line-height: 1.8; }
.chk.pledge input { margin-top: 6px; }
.field-warn { color: #8a5a00; font-size: 12.5px; margin-top: 4px; }
.err-list { margin: 6px 0 0; padding-inline-start: 20px; }
.err-list li { margin: 2px 0; }
.err-list a { color: inherit; }
.fg.invalid > .fguide { border-color: var(--err); }
.fg[data-radio].invalid .rcard { border-color: #f1a9a9; }

/* ---------- جلسات کرکسیون ---------- */
.corr-list { list-style: none; padding: 0; margin: 8px 0 12px; display: grid; gap: 8px; }
.corr-list li { border: 1px solid var(--line); border-radius: 10px; padding: 8px 12px; background: #fff; }
.corr-list li.corr-confirmed { border-inline-start: 4px solid #3aa76d; }
.corr-list li.corr-rejected { border-inline-start: 4px solid var(--err); background: #fffafa; }
.corr-list li.corr-pending { border-inline-start: 4px solid #f0b429; }
.corr-head { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; }
.corr-head form { margin: 0 auto 0 0; }
.corr-text { margin-top: 4px; white-space: pre-wrap; }
.corr-actions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; align-items: center; }
.corr-actions form { margin: 0; display: flex; gap: 6px; flex-wrap: wrap; }
.corr-reject input { min-width: 160px; flex: 1; }
.corr-form .row { align-items: flex-start; }

/* ---------- صفحه استاندارد: راهنماها ---------- */
.guide-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); gap: 4px 14px; }

@media (max-width: 640px) {
  .fs { padding: 10px 10px 2px; }
  .form-card .actions .btn { width: 100%; }
  .corr-form .fg { max-width: none !important; }
}

/* ---------- جستجو ---------- */
.search-bar { display: flex; gap: 8px; align-items: center; padding: 10px 12px; }
.search-bar input { flex: 1; min-width: 0; }
.side-search { padding: 4px 8px 10px; }
.side-search input { width: 100%; padding: 7px 10px; border-radius: 8px; border: 1px solid rgba(255,255,255,.25);
  background: rgba(255,255,255,.1); color: #fff; font: inherit; font-size: 13.5px; }
.side-search input::placeholder { color: rgba(255,255,255,.7); }
.sr-prop { display: flex; flex-wrap: wrap; gap: 4px 8px; align-items: center; padding: 2px 0; }
.sr-list { padding-inline-start: 18px; }
@media (max-width: 640px) { .search-bar { flex-direction: column; align-items: stretch; } }

/* ---------- گزارش‌ها ---------- */
.tbl-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; border: 1px solid var(--line); border-radius: 10px; }
table.rep { border-collapse: collapse; font-size: 12.5px; min-width: 100%; }
table.rep th, table.rep td { padding: 6px 8px; border-bottom: 1px solid var(--line); white-space: nowrap; text-align: right; }
table.rep th { background: #f4f7fb; position: sticky; top: 0; }
.rep-summary ul { margin: 6px 0 0; padding-inline-start: 18px; font-size: 13.5px; }
.g3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); gap: 12px; }
/* فیلدهای کنار هم با راهنمای کوتاه/بلند: کادرها در یک خط می‌مانند */
.fs .row > .fg { display: flex; flex-direction: column; justify-content: flex-end; }
.fs .row > .fg > .fguide { flex: 1 0 auto; }
.fs .row > .fg > .field-err { order: 99; }

/* ---------- همه رشته‌ها: جدول فشرده با ویرایش درجا ---------- */
.fl-card { padding: 12px; }
.fl-tools { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 10px; }
.fl-tools input[type=search] { flex: 1 1 200px; min-width: 0; }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 9px; overflow: hidden; }
.seg-b { border: 0; background: #fff; padding: 6px 11px; font: inherit; font-size: 13px; cursor: pointer; color: var(--muted); }
.seg-b + .seg-b { border-inline-start: 1px solid var(--line); }
.seg-b b { font-weight: 700; margin-inline-start: 3px; }
.seg-b.on { background: var(--brand); color: #fff; }
.fl-add { border: 1px dashed var(--line); border-radius: 10px; padding: 8px 12px 10px; margin-bottom: 10px; background: #fafcff; }
.fl-table { border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.fl-row { display: grid; grid-template-columns: minmax(0, 2.2fr) minmax(0, 1.4fr) 70px 70px auto; gap: 8px; align-items: center;
  padding: 7px 12px; }
.fl-head { background: #f4f7fb; font-size: 12.5px; color: var(--muted); font-weight: 700; }
.fl-item { border-top: 1px solid var(--line); }
.fl-item:hover > .fl-row { background: #fafcff; }
.fl-item.off .fl-name b { color: var(--muted); }
.fl-item.editing { background: #f6f9ff; }
.fl-name { display: flex; flex-wrap: wrap; gap: 4px 6px; align-items: center; min-width: 0; }
.fl-name b { overflow-wrap: anywhere; }
.fl-deg { font-size: 13px; color: #374151; }
.fl-act { display: flex; gap: 4px; justify-content: flex-end; white-space: nowrap; }
.fl-editbox { padding: 4px 12px 12px; border-top: 1px dashed var(--line); }
.fl-edit-actions { justify-content: flex-start; margin-top: 8px; }
.fl-del { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; margin-top: 10px; padding-top: 8px;
  border-top: 1px dashed #f1c4c4; }
.fl-del form { margin: 0; }
.fl-empty { padding: 12px; margin: 0; }
@container content (max-width: 640px) {
  .fl-head { display: none; }
  .fl-row { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 6px; padding: 7px 10px; }
  .fl-name { flex: 1 1 0; min-width: 0; }
  .fl-act { order: 1; }
  .fl-act .btn { padding: 4px 9px; }
  .fl-row > [data-l] { order: 2; font-size: 12px; color: var(--muted); }
  .fl-row > .fl-deg { flex-basis: 100%; height: 0; overflow: hidden; }  /* شکستن سطر */
  .fl-row > [data-l]:not(.fl-deg)::before { content: attr(data-l) " "; }
  .fl-row > [data-l]::after { content: " ·"; }
  .fl-row > [data-l]:nth-last-child(2)::after { content: none; }
  .fl-row.fl-head { display: none; }
  .fl-row > .fl-deg + [data-l]::before { content: "مقطع: " attr(data-deg) " · " attr(data-l) " "; }
}

/* ---------- رشته‌های صفحه دانشگاه: شبکه فشرده ---------- */
.uf-q { margin-bottom: 8px; }
.uf-grid { list-style: none; margin: 0 0 10px; padding: 0; display: grid; gap: 6px;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); }
.uf-grid li { display: flex; align-items: center; gap: 6px; padding: 5px 6px 5px 8px; border: 1px solid var(--line);
  border-radius: 9px; background: #fff; min-width: 0; }
.uf-name { flex: 1 1 auto; min-width: 0; font-size: 13.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.uf-grid .deg-form { flex: 0 0 auto; gap: 3px; flex-wrap: nowrap; }
.chip.xs { padding: 1px 7px; font-size: 11.5px; gap: 3px; }
.chip.xs input { width: 13px; height: 13px; }
.btn.xs { padding: 2px 8px; font-size: 11.5px; }
.uf-rm { margin: 0; flex: 0 0 auto; }
.uf-x { border: 0; background: transparent; color: var(--muted); cursor: pointer; font-size: 13px; width: 26px; height: 26px;
  border-radius: 6px; line-height: 1; }
.uf-x:hover, .uf-x:focus-visible { background: #fdecec; color: var(--err); }
@media (max-width: 420px) { .uf-grid li { flex-wrap: wrap; } .uf-name { flex-basis: calc(100% - 34px); } }

.gen-box { background: #f3f8ff; border: 1px solid #cfe0f5; border-radius: 10px; padding: 10px 12px; }
.gen-box p { margin: 0; }

.intro-box { border: 1px solid #cfe0f5; background: #f3f8ff; border-radius: 10px; padding: 8px 12px; margin: 0 0 12px; }
.intro-box > summary { cursor: pointer; font-weight: 700; color: var(--brand); }
.intro-box > .fguide { background: transparent; border: 0; padding: 6px 0 0; margin: 0; }

/* ---------- صفحه اصلی: دو ورود ---------- */
.home { max-width: 760px; margin: 18px auto 0; text-align: center; }
.home-head h1 { font-size: 28px; margin: 6px 0 2px; }
.home-head .hero-sub { color: var(--brand); font-weight: 700; margin: 0 0 22px; }
.enter-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.enter-card { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 26px 18px; border-radius: 16px;
  background: var(--brand); color: #fff; text-decoration: none !important; box-shadow: 0 6px 18px rgba(17, 45, 92, .18);
  transition: transform .15s, box-shadow .15s; }
.enter-card.alt { background: #fff; color: var(--brand); border: 2px solid var(--brand); box-shadow: 0 4px 14px rgba(17, 45, 92, .08); }
.enter-card:hover, .enter-card:focus-visible { transform: translateY(-2px); box-shadow: 0 10px 24px rgba(17, 45, 92, .22); }
.enter-card .ec-ic { font-size: 34px; line-height: 1; }
.enter-card b { font-size: 18px; }
.enter-card span:last-child { font-size: 13.5px; opacity: .85; }
.home-links { margin: 18px 0 0; font-size: 14px; color: var(--muted); }
@media (max-width: 600px) {
  .enter-grid { grid-template-columns: 1fr; }
  .enter-card { padding: 20px 14px; }
  .home-head h1 { font-size: 23px; }
}

/* ---------- پاورقی: آیکن کوچک متحرک سند + نسخه ---------- */
footer.foot { display: flex; align-items: center; justify-content: center; gap: 8px; padding: 22px 0 26px;
  color: var(--muted); font-size: 12px; }
.foot-doc .fd-back { fill: #e8eef7; stroke: #b9c7da; stroke-width: 1.2; }
.foot-doc .fd-page { fill: #fff; stroke: var(--brand); stroke-width: 1.4; }
.foot-doc .fd-l { stroke: var(--brand); stroke-width: 1.6; stroke-linecap: round; stroke-dasharray: 12; stroke-dashoffset: 12;
  animation: fd-write 4.8s ease-in-out infinite; opacity: .75; }
.foot-doc .fd-l2 { animation-delay: .5s; }
.foot-doc .fd-l3 { animation-delay: 1s; }
.foot-doc .fd-check { fill: none; stroke: #2f9e63; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round;
  stroke-dasharray: 16; stroke-dashoffset: 16; animation: fd-check 4.8s ease-in-out infinite; }
@keyframes fd-write { 0% { stroke-dashoffset: 12; } 20%, 80% { stroke-dashoffset: 0; } 95%, 100% { stroke-dashoffset: 12; } }
@keyframes fd-check { 0%, 35% { stroke-dashoffset: 16; } 50%, 80% { stroke-dashoffset: 0; } 95%, 100% { stroke-dashoffset: 16; } }
@media (prefers-reduced-motion: reduce) {
  .foot-doc .fd-l, .foot-doc .fd-check { animation: none; stroke-dashoffset: 0; }
}
.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.home-head .hero-logo { width: 84px; height: 84px; margin-bottom: 8px; }
.enter-card .ec-ic { display: inline-grid; place-items: center; width: 64px; height: 64px; border-radius: 50%;
  background: rgba(255, 255, 255, .14); color: #fff; font-size: 0; }
.enter-card.alt .ec-ic { background: #eef3fb; color: var(--brand); }
.purge-list { margin: 6px 0 12px; padding-inline-start: 20px; line-height: 1.9; }
.sup-del { display: flex; gap: 8px; align-items: center; justify-content: flex-end; margin-top: 8px; border-top: 1px dashed var(--line, #e3e8ef); padding-top: 8px; }

/* ---------- انتخاب دوستونی ---------- */
.dual.on { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 4px 0 8px; }
.dual-col { border: 1px solid var(--line); border-radius: var(--radius); background: #fafbfc; display: flex; flex-direction: column; min-width: 0; }
.dual-sel { background: #f4f8fd; border-color: #cfdcec; }
.dual-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 8px 10px; border-bottom: 1px solid var(--line); font-size: 13px; font-weight: 600; }
.dual-head b { color: var(--brand-2); font-weight: 600; }
.dual-q { flex: 1; max-width: 220px; padding: 5px 9px !important; font-size: 13px; margin: 0 !important; }
.dual-list { list-style: none; margin: 0; padding: 4px; max-height: 216px; overflow-y: auto; }
.dual-list li { margin: 0; }
.dual-it { width: 100%; display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 5px 9px; border: 0; border-radius: 7px;
  background: transparent; font: inherit; font-size: 14px; color: var(--ink); text-align: right; cursor: pointer; }
.dual-it:hover, .dual-it:focus-visible { background: #e8effa; outline: none; }
.dual-it i { font-style: normal; font-weight: 700; color: var(--brand-2); width: 20px; text-align: center; }
.dual-sel .dual-it i { color: var(--err); }
.dual-empty, .dual-none { margin: 0; padding: 10px 12px; }
@media (max-width: 640px) { .dual.on { grid-template-columns: 1fr; } .dual-q { max-width: none; } }

/* ---------- فهرست فشرده اساتید ---------- */
.sup-rows { padding: 0; overflow: hidden; }
.sup-row { border-bottom: 1px solid var(--line); }
.sup-row:last-child { border-bottom: 0; }
.sup-row > summary { list-style: none; cursor: pointer; display: grid; grid-template-columns: minmax(150px, 1.4fr) 120px minmax(120px, 1fr) minmax(0, 1.6fr) auto;
  gap: 10px; align-items: center; padding: 10px 16px; font-size: 14px; }
.sup-row > summary::-webkit-details-marker { display: none; }
.sup-row > summary:hover { background: #f7f9fc; }
.sup-row[open] > summary { background: #eef3fb; }
.sup-row .sr-name { font-weight: 600; }
.sup-row .sr-tags { display: flex; flex-wrap: wrap; gap: 4px; }
.sup-row .sr-edit { color: var(--brand-2); font-size: 13px; white-space: nowrap; }
.sup-row[open] .sr-edit::after { content: " ▴"; }
.sup-row:not([open]) .sr-edit::after { content: " ▾"; }
.sup-row .sup-body { padding: 4px 16px 14px; border-top: 1px dashed var(--line); }
.sup-head { display: grid; grid-template-columns: minmax(150px, 1.4fr) 120px minmax(120px, 1fr) minmax(0, 1.6fr) auto; gap: 10px;
  padding: 8px 16px; font-size: 12.5px; color: var(--muted); border-bottom: 1px solid var(--line); background: #fafbfc; }
.pager { display: flex; gap: 6px; justify-content: center; flex-wrap: wrap; margin: 8px 0 18px; }
.pager a, .pager span { padding: 3px 11px; border: 1px solid var(--line); border-radius: 7px; background: #fff; font-size: 14px; }
.pager span.on { background: var(--brand); color: #fff; border-color: var(--brand); }
@media (max-width: 760px) {
  .sup-head { display: none; }
  .sup-row > summary { grid-template-columns: 1fr auto; row-gap: 2px; }
  .sup-row .sr-mob, .sup-row .sr-uni, .sup-row .sr-tags { grid-column: 1; font-size: 13px; }
  .sup-row .sr-edit { grid-column: 2; grid-row: 1; }
}
.dual [hidden], .dual.on .dual-src { display: none !important; }
@media (max-width: 760px) {
  .sup-row > summary { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 10px; padding: 9px 12px; }
  .sup-row .sr-name { flex: 1 1 55%; }
  .sup-row .sr-edit { order: 1; }
  .sup-row .sr-mob, .sup-row .sr-uni, .sup-row .sr-tags { order: 2; font-size: 12.5px; }
  .sup-row .sup-body { padding: 4px 12px 12px; }
}
.role-box { border: 1px solid var(--line); border-radius: var(--radius); padding: 6px 12px 10px; margin: 6px 0 10px; display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; }
.role-box legend { font-size: 13px; font-weight: 600; padding: 0 4px; }
.role-chip input[disabled] { opacity: .6; }

/* ---------- جستجوی سراسری مدیر ---------- */
.gsearch { position: sticky; top: 0; z-index: 30; display: flex; gap: 8px; align-items: center; margin: -6px 0 16px;
  padding: 8px 0; background: var(--bg); }
.gsearch input[type=search] { flex: 1; min-width: 0; padding: 9px 38px 9px 40px !important; font-size: 14.5px; border-radius: 10px;
  border: 1px solid #cfd8e3; margin: 0;
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' fill='none' stroke='%236b7280' stroke-width='2' viewBox='0 0 24 24'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='m20 20-3.5-3.5'/%3E%3C/svg%3E") no-repeat right 12px center; }
.gsearch input[type=search]:focus { border-color: var(--brand-2); box-shadow: 0 0 0 3px rgba(45,91,143,.15); outline: none; }
.gs-key { position: absolute; left: 92px; top: 50%; transform: translateY(-50%); font: 12px/1 monospace; color: var(--muted);
  border: 1px solid var(--line); border-radius: 5px; padding: 3px 6px; background: #fafbfc; pointer-events: none; }
.gsug { position: absolute; top: calc(100% - 4px); right: 0; left: 0; background: #fff; border: 1px solid #cfd8e3; border-radius: 10px;
  box-shadow: 0 10px 30px rgba(20,30,50,.12); max-height: min(70vh, 460px); overflow-y: auto; padding: 6px; }
.gs-g { font-size: 12.5px; font-weight: 700; color: var(--muted); padding: 8px 10px 4px; }
.gs-it { display: flex; flex-direction: column; padding: 7px 10px; border-radius: 8px; color: var(--ink); line-height: 1.6; }
.gs-it:hover, .gs-it:focus { background: #eef3fb; text-decoration: none; outline: none; }
.gs-it .muted { font-size: 12.5px; }
.gs-all { display: block; text-align: center; padding: 8px; margin-top: 4px; border-top: 1px solid var(--line); font-size: 13.5px; }
.gs-msg { padding: 10px 12px; }
.gs-empty { display: flex; flex-direction: column; gap: 4px; padding: 12px 14px; background: var(--warn-bg); border-radius: 8px; color: #7a4a0a; }
.gs-empty span { font-size: 13px; }
@media (max-width: 900px) {
  .gsearch { margin: 0 0 12px; }
  .gs-key { display: none; }
  .gsearch .btn { padding-inline: 12px; }
}
/* عدد کنار منو */
.side-nav a .lbl { flex: 1; }
.nb { display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 99px;
  font-size: 11.5px; font-weight: 700; line-height: 1; color: #fff; }
.nb.act { background: #dc2626; }
.nb.new { background: #3b82f6; }
.nav-btn .nb { margin-inline-start: 4px; }
/* نبودِ نتیجه و فیلتر فهرست‌ها */
.empty-state { text-align: center; padding: 26px 16px; }
.empty-state .es-ic { font-size: 30px; }
.empty-state b { display: block; font-size: 16px; margin: 6px 0; }
.empty-state ul { display: inline-block; text-align: right; margin: 6px 0 0; color: var(--muted); font-size: 13.5px; line-height: 2; }
.list-filter { display: flex; gap: 8px; align-items: center; margin-bottom: 10px; }
.list-filter input[type=search] { flex: 1; max-width: 380px; margin: 0; }
.list-filter .muted { font-size: 13px; }
/* ---------- پرونده دانشجو ---------- */
.head-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.sf-dl { display: grid; grid-template-columns: repeat(auto-fit, minmax(135px, 1fr)); gap: 8px 16px; margin: 0; }
.sf-dl dt { font-size: 12.5px; color: var(--muted); }
.sf-dl dd { margin: 0; font-weight: 600; overflow-wrap: anywhere; }
.sf-head { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; align-items: flex-start; }
.sf-head h2 { margin: 0 0 2px; overflow-wrap: anywhere; }
.sf-badges { display: flex; gap: 4px; flex-wrap: wrap; }
.sf-trash { opacity: .8; border-style: dashed; }
.stepper { list-style: none; margin: 14px 0 6px; padding: 0; display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 0; counter-reset: s; }
.stepper li { position: relative; display: flex; flex-direction: column; align-items: center; text-align: center; padding: 0 4px; min-width: 0; }
.stepper li::before { content: ""; position: absolute; top: 15px; left: 50%; width: 100%; height: 3px; background: var(--line); z-index: 0; }
.stepper li:first-child::before { display: none; }
.stepper li.st-done::before, .stepper li.st-current::before, .stepper li.st-fail::before { background: #9fd3b0; }
.st-dot { position: relative; z-index: 1; width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; font-size: 14px;
  background: #fff; border: 2px solid var(--line); color: var(--muted); }
.st-done .st-dot { background: var(--ok); border-color: var(--ok); color: #fff; }
.st-current .st-dot { background: #fff; border-color: var(--info); color: var(--info); box-shadow: 0 0 0 4px var(--info-bg); }
.st-fail .st-dot { background: var(--warn); border-color: var(--warn); color: #fff; }
.st-body { display: flex; flex-direction: column; margin-top: 6px; line-height: 1.5; min-width: 0; }
.st-body b { font-size: 13px; }
.st-current .st-body b { color: var(--info); }
.st-fail .st-body b { color: var(--warn); }
.st-todo .st-body b { color: var(--muted); font-weight: 500; }
.st-note { font-size: 12px; color: var(--ink); overflow-wrap: anywhere; }
.st-date { font-size: 11.5px; color: var(--muted); }
.sf-more { margin-top: 10px; }
.sf-more summary { cursor: pointer; color: var(--brand-2); font-size: 13.5px; }
.sf-links { margin: 8px 0 0; font-size: 13.5px; }
.sf-list { list-style: none; margin: 0; padding: 0; }
.sf-list li { padding: 6px 0; border-bottom: 1px solid var(--line); display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 8px; font-size: 13.5px; }
.sf-list li:last-child { border-bottom: 0; }
.sf-msg { flex-basis: 100%; }
@media (max-width: 700px) {
  /* روی موبایل مراحل عمودی می‌شوند تا هیچ متنی بریده نشود */
  .stepper { grid-template-columns: 1fr; gap: 0; }
  .stepper li { flex-direction: row; align-items: flex-start; text-align: right; gap: 10px; padding: 0 0 12px; }
  .stepper li::before { top: -12px; left: auto; right: 15px; width: 3px; height: 14px; }
  .st-body { margin-top: 3px; }
}
@media (max-width: 900px) { .nav-btn { color: #fff; border-color: rgba(255,255,255,.55); } }
[data-row][hidden] { display: none !important; }

/* نام کاربر بالای منو و نسخه پایین منوی مدیر */
.side-nav .side-user { padding: 2px 10px 8px; margin-bottom: 4px; border-bottom: 1px solid rgba(255,255,255,.18); color: #c4d3e6; font-size: 12.5px; }
.side-ver { display: flex; align-items: center; gap: 8px; padding: 12px 10px 4px; color: #9fb3cb; font-size: 12px; }
.side-ver .foot-doc .fd-back { fill: rgba(255,255,255,.12); stroke: rgba(255,255,255,.35); }
.side-ver .foot-doc .fd-page { fill: #fff; }

/* حالت «مشاهده به‌جای کاربر» */
.imp-bar { position: sticky; top: 0; z-index: 50; display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: center; justify-content: center;
  padding: 8px 16px; background: #f59e0b; color: #1f1300; font-size: 14px; text-align: center; }
.imp-bar form { margin: 0; }
.imp-bar .btn { background: #1f2937; color: #fff; border-color: #1f2937; }
.inline-form { display: inline; margin: 0; }
.sf-views { margin-top: 10px; }

.imp-short { display: none; }
@media (max-width: 700px) {
  .imp-bar { flex-wrap: nowrap; justify-content: space-between; padding: 5px 10px; font-size: 13px; text-align: right; }
  .imp-bar > span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .imp-bar .btn { padding: 4px 10px; white-space: nowrap; }
  .imp-long { display: none; }
  .imp-short { display: inline; }
}
/* نقش‌های استاد در داشبورد */
.my-roles { display: flex; flex-wrap: wrap; gap: 6px; margin: -6px 0 14px; }

/* دکمه بازگشت بالای صفحه‌های داخلی */
.back-row { margin: 0 0 10px; }
.back-btn { display: inline-flex; align-items: center; gap: 6px; padding: 6px 14px; border-radius: 99px; font-size: 13.5px;
  background: #eef3fb; color: var(--brand, #1f3b63); border: 1px solid #d6e2f0; text-decoration: none; min-height: 36px; }
.back-btn:hover, .back-btn:focus-visible { background: #e1ebf8; text-decoration: none; }

/* نسخه‌ها، تاریخچه، متن کامل */
.full-text .sec-view { margin-top: 4px; border: 0; padding: 0; background: none; }
.full-text .list-head h2 { margin: 0; }
details.hist-card > summary { cursor: pointer; list-style: none; }
details.hist-card > summary::-webkit-details-marker { display: none; }
details.hist-card > summary::before { content: "◂ "; color: var(--muted); }
details.hist-card[open] > summary::before { content: "▾ "; }
details.hist-card[open] > summary { margin-bottom: 10px; }
.ver-pick { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 8px; }
.ver-pick select { width: auto; min-width: 110px; }
.ver-sec { border: 1px solid var(--line); border-radius: 10px; padding: 8px 12px; margin-top: 8px; }
.ver-sec > summary { cursor: pointer; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.ver-sec.ver-same { opacity: .8; }
.ver-body { margin-top: 8px; line-height: 2.1; overflow-wrap: anywhere; }
.ver-body ins, .ver-legend ins { background: #dcfce7; color: #14532d; text-decoration: none; border-radius: 3px; padding: 0 2px; }
.ver-body del, .ver-legend del { background: #fee2e2; color: #7f1d1d; border-radius: 3px; padding: 0 2px; }
tr.ver-cur td { background: #f5f8ff; }

/* ابزار مدیرگروه */
.dept-nav { display: flex; gap: 6px; flex-wrap: wrap; margin: 0 0 12px; }
.dept-entry { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin: -4px 0 12px; }
.dept-entry .dept-nav { margin: 0; }
.dept-actions { border-right: 4px solid var(--brand-2); }
.dept-actions fieldset, .sup-form fieldset, #edit fieldset { border: 0; padding: 0; margin: 0 0 10px; }
.dept-actions legend, .sup-form legend, #edit legend { font-weight: 700; margin-bottom: 4px; }
.dept-actions .chk, .sup-form .chk, #edit .chk { display: inline-flex; margin-left: 14px; }
.deadline-fg input { max-width: 160px; }
.deadline-form { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.dept-student-link { margin: 0 0 12px; }
.sup-stats { margin-bottom: 14px; }
.stat.warn b { color: #b45309; }
.se-list { list-style: none; margin: 8px 0 0; padding: 0; }
.se-item { border-bottom: 1px solid var(--line); padding: 8px 0; }
.se-item > summary { display: flex; gap: 10px; align-items: baseline; cursor: pointer; list-style: none; flex-wrap: wrap; }
.se-item > summary::-webkit-details-marker { display: none; }
.se-label { color: var(--muted); min-width: 120px; }
.se-val { font-weight: 700; flex: 1; overflow-wrap: anywhere; }
.se-edit { font-size: 13px; color: var(--brand); }
.se-form { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-top: 8px; }
.se-form input, .se-form select, .se-form textarea { flex: 1; min-width: 180px; }
.rep-filter .row { flex-wrap: wrap; }

.blocking-box ul { margin: 6px 0 0; padding-right: 18px; }
.blocking-box li { margin: 3px 0; line-height: 1.9; }

.ai-issues { margin: 0; padding-right: 16px; }
.ai-issues li { margin: 2px 0 6px; line-height: 1.9; }
.ai-fix { color: var(--ok); font-size: 13px; }

.danger-zone { border: 1px solid #fecaca; border-right: 4px solid var(--err); }
.reset-list { margin: 6px 0 0; padding-right: 18px; line-height: 2.1; }
.reset-del h2 { color: var(--err); } .reset-keep h2 { color: var(--ok); }
