/* شاهین — سیستمِ طراحی (۲۰۲۶-۰۷). فونت/آیکنِ محلی از index.html. کلاس‌ها ثابت‌اند؛ فقط لایهٔ بصری. */

:root {
  /* سطوح + زمینه */
  --bg: #F3F5F8; --surface: #FFFFFF; --sunken: #EBEEF2;
  /* هویتِ نفتی — عمیق‌تر */
  --primary: #16455F; --primary-deep: #0F3446; --primary-soft: #E7EFF3; --ring: rgba(22,69,95,.15);
  --brass: #B0863A;
  /* خاکستریِ سردِ انتخاب‌شده (نه خام) */
  --ink: #16212C; --ink-2: #45566A; --ink-3: #798795; --ink-4: #A6B1BC;
  --line: #E4E9EE; --line-2: #D3DAE1;
  /* سمانتیک + نرم‌هایشان */
  --ok: #1F7A54; --ok-soft: #E4F1EB; --warn: #B06F1C; --warn-soft: #FAEEDA; --danger: #C13B36; --danger-soft: #F9E7E5;
  /* مقیاسِ فاصله (۴px) */
  --s1: 4px; --s2: 8px; --s3: 12px; --s4: 16px; --s5: 20px; --s6: 24px; --s7: 32px; --s8: 40px; --s9: 48px;
  /* مقیاسِ تایپ (پایه ۱۵) */
  --fs-xs: 12px; --fs-sm: 13px; --fs-base: 15px; --fs-md: 17px; --fs-lg: 20px; --fs-xl: 25px; --fs-2xl: 31px;
  /* شعاع */
  --r-sm: 8px; --r: 12px; --r-lg: 16px;
  /* ارتفاع — سه‌پله، سایهٔ نرمِ نفتی‌ته‌رنگ */
  --e1: 0 1px 2px rgba(23,34,46,.05), 0 1px 3px rgba(23,34,46,.045);
  --e2: 0 3px 10px rgba(23,34,46,.08), 0 1px 3px rgba(23,34,46,.05);
  --e3: 0 14px 38px rgba(23,34,46,.17);
  /* نام‌های قدیمی (برای استایل‌های inline در JS) → نگاشت به سیستمِ جدید */
  --text: var(--ink); --text-muted: var(--ink-2); --text-subtle: var(--ink-3);
  --border: var(--line); --primary-hover: var(--primary-deep);
  --success: var(--ok); --warning: var(--warn);
  --shadow-card: var(--e1); --shadow-pop: var(--e3);
}

/* r119 — کیفیت تصویربرداری و پیام کارفرما: فشرده روی کارت، کامل و خوانا در برگه */
.filming-issue-link.is-open{color:var(--danger)!important;font-weight:800}
.filming-issue-sheet{max-width:650px}
.filming-issue-summary,.filming-incident-card{display:grid;gap:9px;padding:14px;border:1px solid var(--border);border-radius:14px;background:var(--sunken)}
.filming-issue-summary p,.filming-incident-card p{margin:0;line-height:1.9;white-space:pre-wrap}
.filming-incident-list{display:grid;gap:10px}
.filming-incident-head{display:flex;align-items:center;justify-content:space-between;gap:8px;flex-wrap:wrap}
.client-message-report,.client-message-view{border-inline-start:3px solid var(--primary)}
.client-message-fields{grid-template-columns:180px minmax(0,1fr);gap:10px;margin-top:10px}
.sr-miss-detail{grid-column:1/-1;grid-template-columns:1fr 1fr;gap:8px;width:100%;padding:10px;margin-top:8px;border-radius:12px;background:color-mix(in srgb,var(--danger) 7%,var(--sunken));border:1px solid color-mix(in srgb,var(--danger) 32%,var(--border))}
.sr-miss-description{grid-column:1/-1}
@media(max-width:680px){
  .client-message-fields,.sr-miss-detail{grid-template-columns:1fr}
  .sr-miss-description{grid-column:auto}
  .filming-issue-sheet{width:min(94vw,650px)}
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { max-width: 100%; overflow-x: clip; }
body {
  font-family: 'Vazirmatn', 'Segoe UI', Tahoma, system-ui, sans-serif;
  background: var(--bg); color: var(--ink); line-height: 1.75; font-size: var(--fs-base);
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
  max-width: 100%; overflow-x: clip;
}
button { font-family: inherit; }
.tnum, .dash-stat-v, .dash-fin-v, .q-count, .prof-v, .lead-est { font-variant-numeric: tabular-nums; }

.layout { display: flex; min-height: 100vh; }

/* سایدبار */
.sidebar { width: 232px; flex-shrink: 0; background: var(--surface); border-inline-start: 1px solid var(--line); padding: var(--s6) var(--s4); display: flex; flex-direction: column; }
.brand { font-size: var(--fs-xl); font-weight: 700; color: var(--primary); margin-bottom: var(--s6); padding-inline-start: 6px; letter-spacing: -.01em; display: flex; align-items: center; gap: var(--s2); }
.brand::before { content: ""; width: 8px; height: 22px; border-radius: 3px; background: linear-gradient(var(--primary), var(--brass)); flex-shrink: 0; }
.nav { display: flex; flex-direction: column; gap: 2px; }
.nav-item { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: var(--r-sm); color: var(--ink-2); cursor: pointer; font-size: var(--fs-sm); transition: background .16s, color .16s; }
.nav-item i { font-size: 18px; color: var(--ink-3); transition: color .16s; }
.nav-item:hover { background: var(--sunken); color: var(--ink); }
.nav-item.active { background: var(--primary-soft); color: var(--primary); font-weight: 600; }
.nav-item.active i { color: var(--primary); }

.main { flex: 1; min-width: 0; padding: var(--s7); max-width: 1140px; }
.page-head { display: flex; align-items: flex-start; justify-content: space-between; gap: var(--s4); margin-bottom: var(--s7); }
.page-title { font-size: var(--fs-2xl); font-weight: 700; letter-spacing: -.015em; line-height: 1.25; }
.page-sub { font-size: var(--fs-sm); color: var(--ink-3); margin-top: var(--s1); }

/* دکمه‌ها — سلسله‌مراتبِ روشن */
.btn { height: 40px; padding: 0 var(--s5); border-radius: var(--r-sm); font-size: var(--fs-base); font-weight: 600; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 7px; border: 1px solid transparent; transition: background .15s, border-color .15s, box-shadow .15s, filter .15s; }
.btn-primary { background: var(--primary); color: #fff; box-shadow: var(--e1); }
.btn-primary:hover { background: var(--primary-deep); }
.btn-secondary { background: var(--surface); color: var(--ink); border-color: var(--line-2); }
.btn-secondary:hover { background: var(--bg); border-color: var(--ink-4); }
.btn-danger { background: var(--danger); color: #fff; }
.btn-danger:hover { filter: brightness(.93); }
.btn-soft { background: var(--surface); border: 1px solid var(--line-2); color: var(--ink); }
.btn-soft:hover { background: var(--bg); }
.btn-text { background: none; border: none; color: var(--primary); cursor: pointer; font-size: var(--fs-sm); font-weight: 500; padding: 7px 10px; border-radius: var(--r-sm); transition: background .15s; }
.btn-text:hover { background: var(--primary-soft); }
.btn-row { height: auto; padding: 7px 14px; font-size: var(--fs-sm); }

/* کارتِ واحد (فهرست) + ردیف */
.list { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--e1); overflow: hidden; }
.row { display: flex; align-items: center; justify-content: space-between; gap: var(--s3); padding: var(--s4); min-height: 54px; border-bottom: 1px solid var(--line); transition: background .15s; }
.row:last-child { border-bottom: none; }
.row:hover { background: var(--bg); }
/* r57: ردیفِ «سلامتِ سیستم» که به محلِ رسیدگی وصل است — نشانهٔ بصریِ کلیک‌پذیری.
   عمداً همان الگوی موجودِ .pl-colhead.clickable است تا زبانِ بصری یکی بماند. */
.row-clickable { cursor: pointer; }
.row-clickable:hover { background: var(--primary-soft); }
.row-clickable:focus-visible { outline: 2px solid var(--primary); outline-offset: -2px; }
.row-info { display: flex; align-items: center; gap: var(--s3); min-width: 0; }
.row-ic { color: var(--ink-3); font-size: 20px; width: 24px; text-align: center; flex-shrink: 0; }
.row-title { font-size: var(--fs-base); font-weight: 600; }
.row-meta { font-size: var(--fs-sm); color: var(--ink-3); }
.row-meta.preproduction-note { display: inline-flex; width: fit-content; margin-top: 4px; padding: 3px 9px;
  border: 1px solid color-mix(in srgb,var(--primary) 35%,transparent); border-radius: 999px;
  background: color-mix(in srgb,var(--primary) 10%,transparent); color: var(--primary); font-weight: 600; }
.row-actions { display: flex; align-items: center; gap: 4px; flex-shrink: 0; position: relative; }

/* نشان‌ها */
.badge { font-size: var(--fs-xs); font-weight: 600; padding: 4px 11px; border-radius: var(--r-full, 999px); white-space: nowrap; }
.badge-stage { background: var(--primary-soft); color: var(--primary); }
.badge-success { background: var(--ok-soft); color: var(--ok); }
.badge-warning { background: var(--warn-soft); color: var(--warn); }
.badge-danger { background: var(--danger-soft); color: var(--danger); }

/* منوی شناور */
.menu { position: absolute; top: 100%; left: 0; margin-top: var(--s2); background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--e3); padding: 6px; min-width: 198px; z-index: 10; }
.menu.user-switch-menu { z-index: 320; }
.menu-label { font-size: var(--fs-xs); color: var(--ink-4); padding: 6px 8px; font-weight: 500; }
.menu-item { display: block; width: 100%; text-align: right; background: none; border: none; padding: 9px 10px; border-radius: var(--r-sm); font-size: var(--fs-sm); color: var(--ink); cursor: pointer; transition: background .12s; }
.menu-item:hover { background: var(--sunken); }
.menu-divider { height: 1px; background: var(--line); margin: 6px 4px; }
.menu-item.danger { color: var(--danger); }
.menu-item.active-month { background: var(--primary-soft); color: var(--primary); font-weight: 600; }

.empty { padding: var(--s9) var(--s4); text-align: center; color: var(--ink-3); }

/* نوارِ موبایل و بک‌دراپِ drawer — روی دسکتاپ پنهان‌اند */
.mobilebar { display: none; }
.nav-backdrop { display: none; }

@media (max-width: 720px) {
  /* ── چیدمان: سایدبار به drawerِ کشویی (وگرنه کلِ فهرستِ پیج‌ها روی محتوا تلنبار می‌شد) ── */
  .mobilebar { display: flex; align-items: center; gap: 10px; padding: 9px 14px; background: var(--surface); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 100; }
  .nav-toggle { background: none; border: 1px solid var(--line-2); border-radius: var(--r-sm); width: 38px; height: 38px; display: inline-flex; align-items: center; justify-content: center; color: var(--ink); cursor: pointer; flex-shrink: 0; }
  .nav-toggle i { font-size: 22px; }
  .mobilebar-brand { font-size: var(--fs-xl); font-weight: 700; color: var(--primary); }
  .mobilebar-actions { margin-inline-start: auto; display: flex; align-items: center; gap: 8px; }
  .sidebar { position: fixed; top: 0; bottom: 0; right: 0; width: 280px; max-width: 84vw; height: 100vh; overflow-y: auto; z-index: 300; transform: translateX(100%); transition: transform .22s ease; border-inline-start: 1px solid var(--line); border-bottom: none; box-shadow: var(--e3); }
  body.nav-open .sidebar { transform: translateX(0); }
  body.nav-open .nav-backdrop { display: block; position: fixed; inset: 0; background: rgba(15,23,32,.45); z-index: 250; }
  .main { padding: var(--s5); max-width: none; width: 100%; }
  .page-title { font-size: var(--fs-xl); }
  /* ── کارت‌های نیرو/ردیف‌ها: دکمه‌ها زیرِ نام بروند، نه روی متن (مشکل۴) ── */
  .row { flex-wrap: wrap; }
  .row-actions { flex-wrap: wrap; justify-content: flex-end; width: 100%; margin-top: 8px; }
  /* ── سرِ صفحه‌ها: دکمه‌ها زیرِ عنوان بشکنند، نه سرریز (مشکل۳ تولبار) ── */
  .page-head { flex-wrap: wrap; }
  .page-head > div:last-child { flex-wrap: wrap; }
  /* ── پنلِ اعلان و دستیار: تمامِ عرضِ صفحه منهای حاشیه (با !important چون پایه‌شان بعداً در فایل می‌آید — مشکل۱) ── */
  .notif-panel { inset-inline: 10px !important; width: auto !important; max-width: none !important; }
  .ai-panel { inset-inline: 10px !important; width: auto !important; max-width: none !important; left: auto !important; }
}

/* فرم و مودال */
.field { margin-bottom: var(--s4); }
.field label { display: block; font-size: var(--fs-sm); color: var(--ink-3); margin-bottom: 6px; font-weight: 500; }
.field input, .field select, .field textarea {
  width: 100%; min-height: 40px; padding: 8px 12px; font: inherit; font-size: var(--fs-base); color: var(--ink);
  background: var(--surface); border: 1px solid var(--line-2); border-radius: var(--r-sm);
  transition: border-color .15s, box-shadow .15s;
}
.field textarea { min-height: 66px; resize: vertical; line-height: 1.75; }
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px var(--ring);
}
/* انتخابگرِ کشویی تاریخِ جلالی (سال/ماه/روز) — سه select که عرض را به‌تساوی پر می‌کنند و روی موبایل هم جا می‌شوند */
.jp-row { display: flex; gap: 6px; }
.jp-row .jp-sel { flex: 1; min-width: 0; width: auto; }
/* انتخابگرِ کشوییِ قابلِ‌سرچ (مشکل۹) */
.ss-wrap { position: relative; }
.ss-input { width: 100%; }
.ss-list { display: none; position: absolute; z-index: 60; top: calc(100% + 2px); inset-inline: 0; max-height: 220px; overflow-y: auto; background: var(--surface); border: 1px solid var(--line-2); border-radius: var(--r-sm); box-shadow: var(--e2); }
.ss-list.open { display: block; }
.ss-opt { padding: 8px 12px; cursor: pointer; font-size: var(--fs-base); color: var(--ink); }
.ss-opt:hover { background: var(--sunken); }
.ss-opt.ss-none { color: var(--ink-3); cursor: default; }
.ss-opt.ss-none:hover { background: transparent; }
/* مالیِ من — نوارِ بازه/فیلتر + چیپ‌های تفکیک */
.mf-rangebar { display: flex; flex-wrap: wrap; gap: 10px 16px; align-items: center; margin: 4px 0 14px; }
.mf-presets, .mf-typebar { display: flex; flex-wrap: wrap; gap: 6px; }
.mf-typebar { margin-bottom: 12px; }
.mf-custom { display: flex; align-items: center; gap: 6px; }
.mf-custom select { min-height: 34px; padding: 4px 8px; width: auto; min-width: 64px; }
.btn-soft.active { background: var(--primary-soft); color: var(--primary); border-color: var(--primary); font-weight: 700; }
.mf-chips { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 5px; }
.mf-chip { font-size: 11px; padding: 1px 8px; border-radius: 999px; background: var(--sunken); color: var(--ink-2); font-variant-numeric: tabular-nums; }
.mf-chip.neg { background: var(--danger-soft); color: var(--danger); }
.mf-paid { color: var(--ok); font-size: var(--fs-sm); font-weight: 600; }
.mf-unpaid { color: var(--warn); font-size: var(--fs-sm); }
.field-err { color: var(--danger); font-size: var(--fs-sm); min-height: 20px; margin-bottom: var(--s2); }
.daily-salary-timeline { display: grid; gap: 10px; margin: 4px 0 16px; }
.daily-salary-rule { padding: 13px 14px; border: 1px solid var(--line); border-radius: var(--r); background: var(--sunken); }
.daily-salary-rule.is-current { border-inline-start: 4px solid var(--ok); background: var(--ok-soft); }
.daily-salary-rule.is-scheduled { border-inline-start: 4px solid var(--warn); background: var(--warn-soft); }
.daily-salary-rule-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 7px; }
.daily-salary-rule-label { color: var(--ink); font-size: var(--fs-sm); font-weight: 700; }
.daily-salary-rule-date { color: var(--ink-3); font-size: var(--fs-xs); direction: rtl; unicode-bidi: isolate; }
.daily-salary-rule-amount { color: var(--ink); font-size: clamp(18px, 4vw, 22px); font-weight: 800; line-height: 1.35; font-variant-numeric: tabular-nums; overflow-wrap: normal; word-break: normal; }
.daily-salary-rule-note, .daily-salary-help { margin-top: 5px; color: var(--ink-3); font-size: var(--fs-xs); line-height: 1.7; }
.daily-salary-help { margin: 0 2px; }
.daily-salary-feedback { min-height: 0; margin-top: 9px; padding: 0; font-size: var(--fs-sm); line-height: 1.7; }
.daily-salary-feedback:empty { display: none; }
.daily-salary-feedback.is-success, .daily-salary-feedback.is-error { padding: 10px 12px; border-radius: var(--r-sm); border: 1px solid transparent; }
.daily-salary-feedback.is-success { color: var(--ok); background: var(--ok-soft); border-color: var(--ok); }
.daily-salary-feedback.is-error { color: var(--danger); background: var(--danger-soft); border-color: var(--danger); }
.check { display: flex; align-items: center; gap: var(--s2); cursor: pointer; font-size: var(--fs-base); }
.check input { width: auto; min-height: auto; }
.hint { font-size: var(--fs-xs); color: var(--ink-3); margin-top: 6px; line-height: 1.65; }
/* جعبهٔ آگاه‌سازی (مثلِ شفافیتِ دادهٔ دستیار) — تم‌آگاه با توکن‌ها */
.notice { margin-top: 12px; padding: 11px 13px; border-radius: var(--r-sm); font-size: var(--fs-xs); line-height: 1.75; border: 1px solid var(--line); background: var(--sunken); color: var(--ink-2); }
.notice.warn { border-color: var(--warn); background: var(--warn-soft); color: var(--ink); }
.notice-t { font-weight: 700; display: block; margin-bottom: 5px; }
/* شناسهٔ فنیِ مدیر (مرحلهٔ ۲) — کوچک، فقط در جزئیات */
.id-chip { display: inline-block; font-size: 11px; font-family: ui-monospace, monospace; color: var(--ink-3); background: var(--sunken); border: 1px solid var(--line); border-radius: 5px; padding: 0 5px; margin-inline-start: 6px; cursor: pointer; vertical-align: middle; direction: ltr; unicode-bidi: isolate; }
.id-chip:hover { color: var(--ink); border-color: var(--line-2); }
/* هشدارِ تخصیصِ خارج از مهارت (بی‌بلاک) */
.skill-warn { font-size: var(--fs-xs); color: var(--warn); line-height: 1.6; margin-top: 4px; min-height: 0; }
/* هشدارِ دسترسی — نقش نمی‌تواند وضعیتِ محتوا را جلو ببرد (جدا از مهارت، بی‌بلاک) */
.perm-warn { font-size: var(--fs-xs); color: var(--danger); line-height: 1.6; margin-top: 3px; min-height: 0; }
.skill-chip { display: inline-flex; align-items: center; gap: 4px; font-size: var(--fs-xs); background: var(--ok-soft); color: var(--ok); border: 1px solid transparent; border-radius: 999px; padding: 2px 9px; margin: 2px; }
.skill-chip button { border: none; background: none; color: var(--danger); cursor: pointer; font-size: 13px; line-height: 1; padding: 0; }
.notice p { margin: 0 0 6px; }
.notice p:last-child { margin-bottom: 0; }
.sidebar-add { margin-top: 6px; width: 100%; justify-content: flex-start; }
.user-switch { display: flex; align-items: center; gap: var(--s2); width: 100%; padding: 10px 12px; background: var(--primary-soft); color: var(--primary); border: none; border-radius: var(--r-sm); cursor: pointer; font: inherit; font-size: var(--fs-sm); font-weight: 600; text-align: right; transition: background .15s; }
.user-switch:hover { background: #dbe6ec; }
.user-switch-name { display: flex; flex-direction: column; min-width: 0; line-height: 1.35; }
.usn-name { font-weight: 600; white-space: normal; word-break: break-word; }
.usn-role { font-size: 11px; font-weight: 400; opacity: .72; }
.page-search { width: 100%; box-sizing: border-box; margin: var(--s1) 0 6px; padding: 8px 11px; border: 1px solid var(--line-2); border-radius: var(--r-sm); background: var(--surface); font: inherit; font-size: var(--fs-sm); }
.page-search:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px var(--ring); }

/* کارتِ قرارداد */
.contract-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--e1); padding: var(--s5); margin-bottom: var(--s4); }
.contract-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: var(--s3); font-size: var(--fs-base); font-weight: 600; }
.contract-sub { font-size: var(--fs-xs); color: var(--ink-3); font-weight: 400; }
.q-grid { display: flex; flex-direction: column; gap: var(--s2); }
.q-line { display: flex; align-items: center; gap: var(--s3); }
.q-label { width: 92px; font-size: var(--fs-sm); color: var(--ink-2); flex-shrink: 0; }
.q-bar { flex: 1; height: 8px; background: var(--sunken); border-radius: var(--r-full, 999px); overflow: hidden; }
.q-fill { height: 100%; background: var(--primary); border-radius: var(--r-full, 999px); transition: width .3s; }
.q-fill.done { background: var(--ok); }
.q-count { width: 54px; text-align: left; font-size: var(--fs-sm); color: var(--ink-2); flex-shrink: 0; }
.q-rate { font-size: 10px; color: var(--ink-3); font-weight: 400; }
.contract-empty { background: var(--surface); border: 1px dashed var(--line-2); border-radius: var(--r); padding: var(--s4) var(--s5); margin-bottom: var(--s4); font-size: var(--fs-base); color: var(--ink-3); }
.month-switch { background: none; border: none; cursor: pointer; font: inherit; font-size: var(--fs-base); color: var(--ink-3); padding: 3px 8px; border-radius: var(--r-sm); transition: background .15s, color .15s; }
.month-switch:hover { background: var(--sunken); color: var(--ink); }

/* مودال */
.modal-overlay { position: fixed; inset: 0; background: rgba(15,23,32,.42); backdrop-filter: blur(2px); display: flex; align-items: center; justify-content: center; padding: var(--s6); z-index: 500; animation: fade .16s ease; }
.modal-card { background: var(--surface); border-radius: var(--r-lg); box-shadow: var(--e3); padding: var(--s6); width: 100%; max-width: 460px; max-height: calc(100vh - 2 * var(--s6)); overflow-y: auto; }
/* دکمه‌های پایینِ مودال همیشه در دسترس بمانند حتی وقتی فرم بلند است (اسکرولِ داخلی + چسبیدنِ نوارِ دکمه به پایین). */
.modal-actions { position: sticky; bottom: calc(-1 * var(--s6)); background: var(--surface); padding-top: var(--s3); margin-bottom: calc(-1 * var(--s6)); padding-bottom: var(--s6); }
.modal-title { font-size: var(--fs-lg); font-weight: 700; margin-bottom: var(--s5); letter-spacing: -.01em; }
.modal-actions { display: flex; gap: var(--s2); margin-top: var(--s4); }
@keyframes fade { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
@media (max-width: 720px) { .modal-card { max-width: none; } }
@media (max-width: 430px) {
  .daily-salary-rule-head { align-items: flex-start; flex-direction: column; gap: 3px; }
  .daily-salary-rule { padding: 12px; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }

/* آنبوردینگ / چرخهٔ قرارداد */
.onboard-banner { display: flex; align-items: center; gap: var(--s2); background: var(--warn-soft); border: 1px solid #F0D9AE; color: #8A5314; border-radius: var(--r-sm); padding: 11px 14px; margin-bottom: var(--s4); font-size: var(--fs-sm); }
.onboard-banner i { font-size: 18px; flex-shrink: 0; }
.brief-view { border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; box-shadow: var(--e1); }
.brief-row { display: flex; gap: 10px; padding: 10px 14px; border-bottom: 1px solid var(--line); }
.brief-row:last-child { border-bottom: none; }
.brief-q { flex: 0 0 38%; color: var(--ink-3); font-size: var(--fs-sm); }
.brief-a { flex: 1; color: var(--ink); font-size: var(--fs-base); white-space: pre-wrap; word-break: break-word; }
.months-strip { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; margin-bottom: var(--s4); font-size: var(--fs-sm); }
.month-chip { padding: 3px 11px; border-radius: var(--r-full, 999px); border: 1px solid var(--line-2); background: var(--surface); color: var(--ink-3); }
.month-chip.open { background: var(--primary-soft); color: var(--primary); border-color: var(--primary-soft); font-weight: 600; }
.setup-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--e1); padding: var(--s4) var(--s5); margin-bottom: var(--s4); }
.pref-time { margin-top: 10px; font-size: var(--fs-sm); color: var(--ink-2); display: flex; align-items: center; gap: 4px; }
.form-divider { margin: var(--s4) 0 var(--s2); padding-top: var(--s3); border-top: 1px solid var(--line); font-size: var(--fs-xs); font-weight: 600; color: var(--ink-3); letter-spacing: .04em; }

/* بردِ برنامه‌ریزیِ تصویربرداری */
.pl-grid { display: flex; border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; background: var(--surface); box-shadow: var(--e1); }
.pl-axis { width: 52px; flex-shrink: 0; border-inline-end: 1px solid var(--line); background: var(--surface); }
.pl-col { flex: 1; min-width: 0; border-inline-end: 1px solid var(--line); position: relative; }
.pl-col:last-child { border-inline-end: none; }
.pl-col.friday { background: #FCFBF9; }
.pl-col.today { background: rgba(22,69,95,.02); }
.pl-colhead { height: 58px; display: flex; flex-direction: column; align-items: center; justify-content: center; border-bottom: 2px solid var(--line); font-size: var(--fs-xs); color: var(--ink-3); gap: 1px; background: var(--surface); }
/* خلاصهٔ بارِ per روز در سرِ ستونِ هفته — یک‌نگاه به شلوغیِ هر روز */
.pl-load { display: flex; align-items: center; gap: 4px; width: 80%; margin-top: 3px; }
.pl-load-bar { flex: 1; height: 4px; background: var(--sunken); border-radius: 999px; overflow: hidden; }
.pl-load-fill { height: 100%; background: var(--primary); border-radius: 999px; }
.pl-load-fill.peak { background: var(--warn); }
.pl-load-n { font-size: 10px; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.pl-load.empty { justify-content: center; color: var(--ink-4); font-size: 10px; }
/* CRM — رابطهٔ مشتری (نقطهٔ سلامت + دکمه‌های وضعیت) */
.crm-dot { width: 11px; height: 11px; border-radius: 50%; flex-shrink: 0; }
.crm-dot.ok { background: var(--ok); }
.crm-dot.watch { background: var(--warn); }
.crm-dot.risk { background: var(--danger); }
.crm-health-btns { display: flex; gap: 8px; flex-wrap: wrap; }
.crm-hbtn { border: 1px solid var(--line-2); background: var(--surface); color: var(--ink-2); font: inherit; font-size: var(--fs-sm); font-weight: 600; padding: 7px 18px; border-radius: var(--r-sm); cursor: pointer; transition: background .15s, color .15s, border-color .15s; }
.crm-hbtn:hover { background: var(--bg); }
.crm-hbtn.ok.active { background: var(--ok-soft); color: var(--ok); border-color: var(--ok); }
.crm-hbtn.watch.active { background: var(--warn-soft); color: var(--warn); border-color: var(--warn); }
.crm-hbtn.risk.active { background: var(--danger-soft); color: var(--danger); border-color: var(--danger); }
/* «مالی» — نوارِ تب (سود و زیان / حسابداری / طلب‌ها و بدهی‌ها) زیرِ یک سرشاخه */
.money-tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--line); margin-bottom: var(--s5); flex-wrap: wrap; }
.money-tab { display: inline-flex; align-items: center; gap: 7px; border: none; background: none; color: var(--ink-3); font: inherit; font-size: var(--fs-base); font-weight: 600; padding: 11px 18px; cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -1px; transition: color .15s, border-color .15s; }
.money-tab i { font-size: 18px; }
.money-tab:hover { color: var(--ink); }
.money-tab.active { color: var(--primary); border-bottom-color: var(--primary); }
.money-tab-badge { font-size: 11px; font-weight: 700; border-radius: 999px; padding: 0 7px; margin-inline-start: 3px; background: var(--sunken); color: var(--ink-2); font-variant-numeric: tabular-nums; }
.money-tab-badge.danger { background: var(--danger-soft); color: var(--danger); }
@media (max-width: 720px) { .money-tab { padding: 9px 12px; font-size: var(--fs-sm); } }
.pl-col.today .pl-colhead { background: var(--primary-soft); }
.pl-col.today .pl-colhead b { color: var(--primary); }
.pl-colhead.friday { color: var(--danger); }
.pl-colhead b { color: var(--ink); font-size: var(--fs-sm); font-weight: 600; }
.pl-date { font-size: 10px; color: var(--ink-4); }
.pl-hour { font-size: 10px; color: var(--ink-4); text-align: left; padding: 0 6px; display: flex; align-items: flex-start; transform: translateY(-1px); box-sizing: border-box; }
.pl-daybody { position: relative; background-image: repeating-linear-gradient(to bottom, var(--line) 0, var(--line) 1px, transparent 1px, transparent 38px); }
.pl-sess { position: absolute; background: #fff; border: 1px solid var(--line); border-inline-end: 3px solid var(--primary); border-radius: 7px; padding: 3px 7px; overflow: hidden; cursor: pointer; font-size: 11px; line-height: 1.25; box-sizing: border-box; box-shadow: var(--e1); transition: box-shadow .12s; z-index: 1; }
.pl-sess:hover { box-shadow: var(--e2); z-index: 4; }
/* نسل۴۳ (r54): کارتِ باریک به‌جای فشرده‌شدنِ متن، ساده می‌شود — فقط ساعت، وسط‌چین، بی‌شکستنِ کلمه. */
.pl-sess.narrow { padding: 3px 2px; text-align: center; }
.pl-sess.narrow .pl-sess-t { font-size: 10px; white-space: nowrap; overflow: hidden; text-overflow: clip; }
.pl-sess-narrow{display:grid;gap:2px;min-width:0}.pl-sess.narrow .pl-sess-c{font-size:9px;line-height:1.25;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
/* تراشهٔ «+N جلسهٔ دیگر» — درِ ورود به نمای روز، وقتی جلسه‌ها از دو لِین بیشتر شدند. */
.pl-more { position: absolute; inset-inline: 2px; height: 18px; line-height: 18px; text-align: center; font-size: 10px;
  border-radius: 6px; background: var(--sunken); border: 1px dashed var(--line-2); color: var(--ink-3); cursor: pointer; z-index: 3; }
.pl-more:hover { background: var(--surface); color: var(--ink); box-shadow: var(--e1); }
.pl-sess.mine { border-inline-end-color: #2563EB; background: #EFF6FF; }
.pl-sess.anon { background: repeating-linear-gradient(45deg, #F2F5F8, #F2F5F8 6px, #E9EFF4 6px, #E9EFF4 12px); border: 1px solid var(--line); border-inline-end: 3px solid #CBD5E1; color: var(--ink-4); box-shadow: none; cursor: default; }
.pl-sess.done { opacity: .5; }
.pl-sess.at-risk { border-inline-end-color: var(--danger) !important; background: var(--danger-soft); }
.pl-sess.just-moved { outline: 3px solid #F59E0B; outline-offset: 2px; animation: movedPulse 1.2s ease-in-out 3; z-index: 8; }
@keyframes movedPulse { 50% { box-shadow: 0 0 0 8px rgba(245,158,11,.2); } }
.pl-sess-t { font-weight: 700; color: var(--primary); font-size: 11px; }
.pl-sess.mine .pl-sess-t { color: #2563EB; }
.pl-sess.anon .pl-sess-t { color: var(--ink-4); font-weight: 600; }
.pl-sess-c { color: var(--ink); font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pl-sess-v { color: var(--ink-3); font-size: 10px; }
.pl-sess-meta { display: flex; gap: 5px; flex-wrap: wrap; align-items: center; margin-top: 1px; }
.pl-sess-l { color: var(--primary); font-size: 10px; font-weight: 500; background: var(--primary-soft); border-radius: 4px; padding: 0 5px; white-space: nowrap; }
.pl-risk { color: var(--danger); font-size: 10px; font-weight: 700; background: var(--danger-soft); border-radius: 4px; padding: 0 5px; white-space: nowrap; }
.pl-unconfirmed { color: var(--warn); font-size: 10px; font-weight: 700; background: var(--warn-soft); border-radius: 4px; padding: 0 5px; white-space: nowrap; }
.pl-confirmed { color: var(--ok); font-size: 11px; font-weight: 700; }
.pl-sess[draggable=true] { cursor: grab; }
.pl-sess.dragging { opacity: .45; }
.pl-free { position: absolute; left: 2px; right: 2px; background: rgba(31,122,84,.09); border: 1.5px dashed var(--ok); border-radius: 7px; pointer-events: none; z-index: 0; }
.pl-drop-preview { position: absolute; left: 2px; right: 2px; background: rgba(22,69,95,.12); border: 2px dashed var(--primary); border-radius: 7px; pointer-events: none; z-index: 5; font-size: 11px; font-weight: 700; color: var(--primary); padding: 2px 6px; }
.pl-colhead.clickable { cursor: pointer; }
.pl-colhead.clickable:hover { background: var(--primary-soft); }
.pl-daycontrols { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 10px; flex-wrap: wrap; }
.pl-daychips { display: flex; gap: 4px; flex-wrap: wrap; }
.pl-daychip { border: 1px solid var(--line-2); background: var(--surface); border-radius: var(--r-full, 999px); padding: 5px 13px; font: inherit; font-size: var(--fs-xs); color: var(--ink-2); cursor: pointer; transition: background .14s; }
.pl-daychip:hover { background: var(--bg); }
.pl-daychip.active { background: var(--primary); color: #fff; border-color: var(--primary); }
.pl-daychip.friday:not(.active) { color: var(--danger); }
.pl-axistoggle { display: flex; border: 1px solid var(--line-2); border-radius: var(--r-sm); overflow: hidden; flex-shrink: 0; }
.pl-axisbtn { border: none; background: var(--surface); padding: 7px 16px; font: inherit; font-size: var(--fs-xs); color: var(--ink-2); cursor: pointer; }
.pl-axisbtn.active { background: var(--primary-soft); color: var(--primary); font-weight: 600; }
.pl-daygrid { overflow: visible; overflow-x: auto; }
.pl-daygrid .pl-axis { position: sticky; right: 0; z-index: 6; background: var(--surface); }
.pl-daygrid .pl-colhead { height: 56px; min-height: 56px; padding: 5px 2px; gap: 2px; }
.pl-rescol { flex: 1 0 132px; }
.pl-avatar { width: 24px; height: 24px; border-radius: 50%; background: var(--primary-soft); color: var(--primary); font-size: 11px; font-weight: 600; display: flex; align-items: center; justify-content: center; }
.pl-colhead.unassigned b { color: var(--ink-4); }
.pl-col-empty { position: absolute; top: 50%; left: 0; right: 0; transform: translateY(-50%); text-align: center; color: var(--ink-4); font-size: var(--fs-xs); pointer-events: none; }
.pl-scoped-daychips { margin: 0 0 12px; padding: 4px; flex-wrap: nowrap; overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: thin; }
.pl-scoped-stats { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 10px; margin-bottom: 12px; }
.pl-scoped-stat { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); box-shadow: var(--e1); }
.pl-scoped-stat b { font-size: 1.35rem; color: var(--primary); }
.pl-scoped-stat span { font-size: var(--fs-xs); color: var(--ink-3); }
.pl-scoped-stat.risk b { color: var(--danger); }
.pl-scoped-hint { margin: 2px 0 12px; }
.pl-scoped-list { display: grid; gap: 10px; }
.pl-scoped-card { display: grid; grid-template-columns: 112px minmax(0,1fr) auto; gap: 14px; align-items: center; padding: 14px; border: 1px solid var(--line); border-inline-end: 4px solid var(--primary); border-radius: 14px; background: var(--surface); box-shadow: var(--e1); }
.pl-scoped-card.at-risk { border-inline-end-color: var(--danger); background: linear-gradient(90deg,var(--surface),var(--danger-soft)); }
.pl-scoped-card.done { opacity: .72; }
.pl-scoped-time { display: grid; gap: 4px; text-align: center; padding: 9px; border-radius: 10px; background: var(--primary-soft); color: var(--primary); }
.pl-scoped-time b { font-size: .9rem; }
.pl-scoped-time span { font-size: var(--fs-xs); color: var(--ink-3); }
.pl-scoped-main { min-width: 0; }
.pl-scoped-title { font-size: var(--fs-md); font-weight: 700; color: var(--ink); margin-bottom: 4px; }
.pl-scoped-meta { font-size: var(--fs-xs); color: var(--ink-3); line-height: 1.8; }
.pl-scoped-badges { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-top: 7px; }
.pl-scoped-actions { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.pl-scoped-actions .btn { white-space: nowrap; }
.pl-scoped-empty { margin-top: 4px; }

/* کارتابلِ سناریو */
.scenario-task { align-items: stretch; }
.scenario-box { white-space: pre-wrap; background: var(--sunken); border: 1px solid var(--line); border-radius: var(--r-sm); padding: 10px 12px; font-size: var(--fs-sm); line-height: 1.75; color: var(--ink); max-height: 180px; overflow: auto; margin-top: 6px; }
.scenario-note { background: var(--warn-soft); border: 1px solid #EFD6A9; border-radius: var(--r-sm); padding: 7px 11px; font-size: var(--fs-xs); color: #8A5314; margin: 6px 0; }
.scenario-waiting { border-inline-start: 3px solid var(--ink-4); background: linear-gradient(90deg, var(--surface), var(--sunken)); }
.scenario-waiting-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.scenario-waiting-meta { margin-top: 7px; line-height: 1.7; }

/* انتخابگرِ اسلاتِ خالیِ مشتری */
.slot-day { margin-bottom: var(--s3); }
.slot-day-h { font-size: var(--fs-sm); font-weight: 600; color: var(--ink-2); margin-bottom: 6px; }
.slot-chips { display: flex; flex-wrap: wrap; gap: var(--s2); }
.slot-chip { border: 1px solid var(--line-2); background: var(--surface); color: var(--primary); font-weight: 600; font-size: var(--fs-sm); padding: 8px 15px; border-radius: var(--r-sm); cursor: pointer; direction: ltr; transition: .15s; }
.slot-chip:hover { background: var(--primary); color: #fff; border-color: var(--primary); }

/* قیفِ فروش (CRM) */
.lead-funnel { display: flex; gap: var(--s3); overflow-x: auto; padding-bottom: var(--s2); }
.lead-col { flex: 0 0 224px; min-width: 224px; background: var(--sunken); border-radius: var(--r); padding: var(--s3); }
.lead-col-h { display: flex; align-items: center; justify-content: space-between; font-weight: 600; font-size: var(--fs-sm); margin-bottom: var(--s2); color: var(--ink); }
.lead-col-n { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-full, 999px); padding: 1px 9px; font-size: var(--fs-xs); color: var(--ink-3); }
.lead-col-empty { color: var(--ink-3); font-size: var(--fs-xs); text-align: center; padding: 10px 0; }
.lead-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-sm); padding: var(--s3); margin-bottom: var(--s2); box-shadow: var(--e1); transition: box-shadow .15s; }
.lead-card:hover { box-shadow: var(--e2); }
.lead-card.muted { opacity: .68; }
.lead-head { display: flex; align-items: baseline; justify-content: space-between; gap: 6px; }
.lead-name { font-weight: 700; font-size: var(--fs-base); }
.lead-est { font-size: 11px; color: var(--ok); font-weight: 600; direction: ltr; white-space: nowrap; }
.lead-meta { font-size: var(--fs-xs); color: var(--ink-3); margin-top: 3px; }
.lead-actions { display: flex; flex-wrap: wrap; gap: 2px 8px; margin-top: var(--s2); }

/* بارِ کاری/ظرفیت + آنبوردینگِ نیرو (HR) */
.cap-badge { font-size: var(--fs-xs); font-weight: 600; color: var(--ink-2); background: var(--sunken); border: 1px solid var(--line-2); border-radius: var(--r-full, 999px); padding: 3px 11px; white-space: nowrap; direction: rtl; }
.cap-badge.full { color: var(--warn); border-color: var(--warn); background: var(--warn-soft); }
.cap-badge.over { color: var(--danger); border-color: var(--danger); background: var(--danger-soft); }
.cap-badge.done { color: var(--ok); border-color: var(--ok); background: var(--ok-soft); }
.cap-badge.warn { color: var(--warn); border-color: var(--warn); }
.row-badges { display: flex; flex-direction: column; gap: 4px; align-items: flex-end; margin-inline: 10px; }
.ob-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 0; border-bottom: 1px dashed var(--line); }
.ob-row:last-child { border-bottom: none; }
.ob-check { display: flex; align-items: center; gap: var(--s2); font-size: var(--fs-base); cursor: pointer; }
.ob-check input { width: 17px; height: 17px; cursor: pointer; accent-color: var(--primary); }
.ob-done { text-decoration: line-through; color: var(--ink-3); }
.row-link { cursor: pointer; }
.row-link:hover { color: var(--primary); text-decoration: underline; }
.prof-grid { display: flex; flex-direction: column; gap: 0; }
.prof-row { display: flex; align-items: baseline; justify-content: space-between; gap: var(--s3); padding: 10px 0; border-bottom: 1px dashed var(--line); font-size: var(--fs-sm); }
.prof-row:last-child { border-bottom: none; }
.prof-l { color: var(--ink-3); white-space: nowrap; }
.prof-v { font-weight: 600; text-align: left; }
.row-meta.deadline { color: var(--primary); font-weight: 600; margin-top: 2px; }
.row-meta.deadline.overdue { color: var(--danger); }

/* نوارِ فیلترِ چیپ (کارهای من) */
.tk-chips { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: var(--s5); }
.tk-chip { border: 1px solid var(--line-2); background: var(--surface); border-radius: var(--r-full, 999px); padding: 6px 14px; font: inherit; font-size: var(--fs-sm); color: var(--ink-2); cursor: pointer; transition: background .14s, border-color .14s; }
.tk-chip:hover { background: var(--bg); }
.tk-chip.active { background: var(--primary); color: #fff; border-color: var(--primary); }

/* داشبوردِ مدیریت */
.dash-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(134px, 1fr)); gap: var(--s3); margin-bottom: var(--s6); }
.dash-stat { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: var(--s4) var(--s5); box-shadow: var(--e1); min-width: 0; }
.dash-stat-v { font-size: 28px; font-weight: 700; color: var(--primary); line-height: 1.1; letter-spacing: -.02em;
  direction: ltr; unicode-bidi: isolate; white-space: nowrap; overflow-wrap: normal; word-break: keep-all; }
.dash-stat-l { font-size: var(--fs-xs); color: var(--ink-3); margin-top: 4px; }
.dash-stat.danger .dash-stat-v { color: var(--danger); }
.dash-stat.warning .dash-stat-v { color: var(--warn); }
.dash-section { margin-bottom: var(--s6); }
.dash-section-h { display: flex; align-items: center; gap: var(--s2); font-size: var(--fs-md); font-weight: 700; color: var(--ink); margin-bottom: var(--s3); }
.dash-section-h i { color: var(--ink-3); }
.dash-count { background: var(--primary-soft); color: var(--primary); font-size: var(--fs-xs); font-weight: 700; border-radius: var(--r-full, 999px); padding: 1px 10px; }
.dash-empty { color: var(--ink-3); font-size: var(--fs-sm); padding: var(--s3) 2px; }
.dash-dot { width: 9px; height: 9px; border-radius: 50%; flex-shrink: 0; }
.dash-dot.danger { background: var(--danger); }
.dash-dot.warning { background: var(--warn); }
.dash-team { display: grid; grid-template-columns: repeat(auto-fit, minmax(158px, 1fr)); gap: 10px; }
.dash-team-item { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-sm); padding: 11px 14px; display: flex; justify-content: space-between; align-items: center; font-size: var(--fs-base); box-shadow: var(--e1); min-width: 0; }
.dash-team-n { font-weight: 600; color: var(--primary); font-size: var(--fs-sm); }
.dash-pipe { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: var(--s3) var(--s5); box-shadow: var(--e1); }
.dash-pipe-row { display: flex; align-items: center; gap: 10px; padding: 6px 0; }
.dash-pipe-l { width: 122px; font-size: var(--fs-sm); color: var(--ink-2); flex-shrink: 0; }
.dash-pipe-bar { flex: 1; height: 8px; background: var(--sunken); border-radius: var(--r-full, 999px); overflow: hidden; }
.dash-pipe-fill { height: 100%; background: var(--primary); border-radius: var(--r-full, 999px); }
.dash-pipe-n { width: 30px; text-align: left; font-size: var(--fs-sm); font-weight: 700; color: var(--ink); flex-shrink: 0; font-variant-numeric: tabular-nums; }
@media (max-width: 720px) { .dash-stats { grid-template-columns: repeat(2, 1fr); } }
/* موبایلِ باریک: کارت‌های آماریِ .dash-stats تک‌ستونه شوند — عددِ ۲۸px میلیاردی (کاما نقطهٔ شکست ندارد) در کارتِ ۲-ستونهٔ ~۱۶۲px جا نمی‌شود و صفحه افقی سرریز می‌کند.
   (dash-fin/dash-team عددِ کوچک‌تر دارند و در ۲ستون بی‌سرریز و فشرده‌تر جا می‌شوند ⇒ عمداً تک‌ستونه نمی‌شوند.) */
@media (max-width: 520px) {
  .dash-stats { grid-template-columns: 1fr; }
  .dash-stat-v { font-size: 24px; }
}

/* جدولِ مالی */
.fin-table { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; box-shadow: var(--e1); }
.fin-row { display: grid; grid-template-columns: 2fr 1fr 1.4fr 1fr; gap: 10px; padding: 12px 16px; border-bottom: 1px solid var(--line); font-size: var(--fs-sm); align-items: center; }
.fin-row:last-child { border-bottom: none; }
.fin-row span:not(:first-child) { text-align: left; direction: ltr; font-variant-numeric: tabular-nums; }
.fin-head { background: var(--bg); font-weight: 600; color: var(--ink-3); font-size: var(--fs-xs); }
.fin-detail { color: var(--ink-3); font-size: var(--fs-xs); }
.fin-pos { color: var(--ok); font-weight: 600; }
.fin-neg { color: var(--danger); font-weight: 600; }
.fin-contract { margin-top: 10px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--e1); overflow: hidden; }
.fin-contract-summary { display: flex; align-items: center; justify-content: space-between; font-weight: 600; font-size: var(--fs-sm); padding: 13px 16px; cursor: pointer; list-style: none; transition: background .15s; }
.fin-contract-summary::-webkit-details-marker { display: none; }
.fin-contract-summary::after { content: '▾'; color: var(--ink-3); margin-inline-start: 6px; transition: transform .15s; }
details.fin-contract[open] .fin-contract-summary::after { transform: rotate(180deg); }
.fin-contract-summary:hover { background: var(--bg); }
.fin-contract-body { padding: 0 16px 14px; }
.fin-contract-head { display: flex; align-items: center; justify-content: space-between; font-weight: 600; font-size: var(--fs-sm); }
.fin-contract-sub { color: var(--ink-3); font-size: var(--fs-xs); margin: 4px 0 6px; }
.fin-statement { display: flex; flex-wrap: wrap; gap: 4px 16px; font-size: var(--fs-xs); margin-bottom: var(--s2); padding: 9px 12px; background: var(--sunken); border-radius: var(--r-sm); }
.fin-statement span { direction: rtl; font-variant-numeric: tabular-nums; }
.dash-fin { display: grid; grid-template-columns: repeat(auto-fit, minmax(154px, 1fr)); gap: 10px; }
.dash-fin-item { display: flex; flex-direction: column; gap: 3px; padding: 12px 14px; background: var(--sunken); border-radius: var(--r-sm); min-width: 0; }
.dash-fin-item.actionable { cursor: pointer; border: 1px solid transparent; transition: border-color .14s, background .14s, transform .14s; }
.dash-fin-item.actionable:hover { border-color: var(--primary); background: var(--primary-soft); transform: translateY(-1px); }
.dash-fin-item.actionable:focus-visible { outline: 3px solid var(--ring); border-color: var(--primary); }
.dash-fin-l { font-size: var(--fs-xs); color: var(--ink-3); }
.dash-fin-v { font-size: var(--fs-md); font-weight: 700; direction: ltr; unicode-bidi: isolate; text-align: right;
  white-space: nowrap; overflow-wrap: normal; word-break: keep-all; }
.dash-fin-sub { font-size: 11px; color: var(--warn); margin-top: 1px; }
/* داشبورد — زونِ سلامتِ مالی (بازچینیِ ۲۰۲۶-۰۷): عددِ قهرمان + روند + پشتیبان‌ها */
.mh { display: flex; flex-direction: column; gap: var(--s4); }
.mh-top { display: grid; grid-template-columns: 1.35fr 2fr; gap: var(--s3); align-items: stretch; }
.mh-hero { background: var(--surface); border: 1px solid var(--line); border-top: 3px solid var(--ink-4); border-radius: var(--r); box-shadow: var(--e1); padding: var(--s4) var(--s5); display: flex; flex-direction: column; justify-content: center; }
.mh-hero.pos { border-top-color: var(--ok); }
.mh-hero.neg { border-top-color: var(--danger); }
.mh-hero-l { font-size: var(--fs-sm); color: var(--ink-3); }
.mh-hero-v { font-size: var(--fs-2xl); font-weight: 700; line-height: 1.2; letter-spacing: -.02em; direction: ltr; unicode-bidi: isolate; text-align: right; font-variant-numeric: tabular-nums; margin: 2px 0;
  white-space: nowrap; overflow-wrap: normal; word-break: keep-all; }
.mh-hero.pos .mh-hero-v { color: var(--ok); }
.mh-hero.neg .mh-hero-v { color: var(--danger); }
.mh-hero-sub { font-size: var(--fs-xs); color: var(--ink-3); }
.mh-trend-cap { font-size: var(--fs-xs); color: var(--ink-3); margin-bottom: 6px; display: flex; align-items: center; gap: 6px; }
.trend.mini { height: 120px; padding: 8px 6px 0; gap: 6px; }
@media (max-width: 720px) { .mh-top { grid-template-columns: 1fr; } }
/* داشبورد — زونِ نیاز به توجه */
.att-chips { display: flex; flex-wrap: wrap; gap: var(--s2); margin-bottom: var(--s4); }
.att-chip { font-size: var(--fs-sm); font-weight: 600; padding: 5px 13px; border-radius: var(--r-full, 999px); border: 1px solid var(--line-2); color: var(--ink-2); background: var(--surface); }
.att-chip.danger { color: var(--danger); background: var(--danger-soft); border-color: transparent; }
.att-chip.warn { color: var(--warn); background: var(--warn-soft); border-color: transparent; }
.att-chip.ok { color: var(--ok); background: var(--ok-soft); border-color: transparent; }
.att-blocks { display: flex; flex-direction: column; gap: var(--s4); }
.att-block-h { display: flex; align-items: center; gap: var(--s2); font-size: var(--fs-sm); font-weight: 600; color: var(--ink-2); margin-bottom: 6px; }
.att-clear { display: flex; align-items: center; gap: var(--s2); background: var(--ok-soft); color: var(--ok); border-radius: var(--r); padding: 14px 16px; font-size: var(--fs-sm); font-weight: 500; }
.att-clear i { font-size: 20px; }
/* داشبورد — نبضِ کار: آمارِ عملیاتیِ فشرده‌تر از عددِ مالی */
.dash-stats.ops { margin-bottom: var(--s4); }
.dash-stats.ops .dash-stat-v { font-size: 22px; }
/* مالی — میله‌های سود/زیانِ هر مشتری */
.pnl-bars { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--e1); padding: var(--s4) var(--s5); display: flex; flex-direction: column; gap: 12px; }
.pnl-row { display: grid; grid-template-columns: 150px 1fr 130px; gap: 12px; align-items: center; }
.pnl-name { min-width: 0; }
.pnl-name > div:first-child { font-size: var(--fs-sm); font-weight: 600; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pnl-sub { font-size: 11px; color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pnl-track { height: 16px; background: var(--sunken); border-radius: var(--r-sm); overflow: hidden; }
.pnl-fill { height: 100%; border-radius: var(--r-sm); min-width: 2px; }
.pnl-fill.pos { background: var(--ok); }
.pnl-fill.neg { background: var(--danger); }
.pnl-val { font-size: var(--fs-sm); font-weight: 600; text-align: left; direction: ltr; font-variant-numeric: tabular-nums; }
@media (max-width: 720px) { .pnl-row { grid-template-columns: 96px 1fr 96px; } }
/* مالی — نوارِ ساختارِ دستمزد (ثابت vs متغیر) */
.struct { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--e1); padding: var(--s4) var(--s5); margin-bottom: 10px; }
.struct-bar { display: flex; height: 20px; border-radius: var(--r-sm); overflow: hidden; margin-bottom: 10px; background: var(--sunken); }
.struct-seg.salary { background: var(--primary); }
.struct-seg.variable { background: var(--brass); }
.struct-legend { display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: var(--fs-sm); color: var(--ink-2); }
.struct-legend span { display: flex; align-items: center; gap: 6px; }
.struct-dot { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }
.struct-dot.salary { background: var(--primary); }
.struct-dot.variable { background: var(--brass); }
/* مالی — نرخِ کارها، جمع‌شونده */
.fin-collapse { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--e1); padding: var(--s3) var(--s5); margin-bottom: var(--s6); }
.fin-collapse-h { cursor: pointer; font-weight: 600; font-size: var(--fs-sm); color: var(--ink-2); list-style: none; display: flex; align-items: center; gap: 6px; }
.fin-collapse-h::-webkit-details-marker { display: none; }
.fin-collapse-h::before { content: '▾'; color: var(--ink-3); transition: transform .15s; }
.fin-collapse[open] .fin-collapse-h::before { transform: rotate(180deg); }
/* بردِ محتوا — سوییچِ نما (فهرست/تقویم) */
.board-toolbar { display: flex; justify-content: flex-end; margin-bottom: var(--s4); }
.seg { display: inline-flex; border: 1px solid var(--line-2); border-radius: var(--r-sm); overflow: hidden; }
.seg-btn { display: inline-flex; align-items: center; gap: 6px; border: none; background: var(--surface); color: var(--ink-2); font: inherit; font-size: var(--fs-sm); padding: 7px 15px; cursor: pointer; transition: background .14s, color .14s; }
.seg-btn i { font-size: 16px; }
.seg-btn + .seg-btn { border-inline-start: 1px solid var(--line-2); }
.seg-btn.active { background: var(--primary-soft); color: var(--primary); font-weight: 600; }
/* نمای تقویمیِ محتوا */
.cal { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--e1); overflow: hidden; }
.cal-head, .cal-body { display: grid; grid-template-columns: repeat(7, 1fr); }
.cal-head { background: var(--bg); border-bottom: 1px solid var(--line); }
.cal-hd { padding: 8px 4px; text-align: center; font-size: var(--fs-xs); color: var(--ink-3); font-weight: 600; }
.cal-hd.fri { color: var(--danger); }
.cal-cell { min-height: 94px; border-inline-start: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 5px; display: flex; flex-direction: column; gap: 4px; }
.cal-cell.blank { background: var(--bg); }
.cal-cell.today { background: var(--primary-soft); }
.cal-daynum { font-size: var(--fs-xs); color: var(--ink-3); font-variant-numeric: tabular-nums; text-align: left; }
.cal-cell.today .cal-daynum { color: var(--primary); font-weight: 700; }
.cal-chips { display: flex; flex-direction: column; gap: 3px; }
.cal-chip { display: flex; align-items: center; gap: 4px; padding: 3px 6px; border-radius: 6px; font-size: 11px; cursor: pointer; border-inline-start: 3px solid var(--ink-4); background: var(--sunken); color: var(--ink); overflow: hidden; transition: filter .12s; }
.cal-chip:hover { filter: brightness(.96); }
.cal-chip i { font-size: 13px; flex-shrink: 0; }
.cal-chip span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cal-chip .cal-rule-count { margin-inline-start: auto; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px; display: inline-grid; place-items: center; background: color-mix(in srgb, var(--primary) 16%, var(--surface)); color: var(--primary); font-size: 10px; font-weight: 800; flex: 0 0 auto; }
.cal-chip.ok { border-inline-start-color: var(--ok); background: var(--ok-soft); color: var(--ok); }
.cal-chip.prog { border-inline-start-color: var(--primary); background: var(--primary-soft); color: var(--primary); }
.cal-chip.warn { border-inline-start-color: var(--warn); background: var(--warn-soft); color: var(--warn); }
.cal-chip.neutral { border-inline-start-color: var(--ink-4); }
.cal-chip.muted { opacity: .55; text-decoration: line-through; }
.cal-undated { margin-top: var(--s4); background: var(--surface); border: 1px dashed var(--line-2); border-radius: var(--r); padding: var(--s3) var(--s4); }
.cal-undated-h { display: flex; align-items: center; gap: 6px; font-size: var(--fs-sm); color: var(--ink-3); margin-bottom: 8px; }
.cal-undated .cal-chips { flex-direction: row; flex-wrap: wrap; }
.cal-undated .cal-chip { max-width: 230px; }
@media (max-width: 720px) { .cal-cell { min-height: 72px; } }
/* حسابداری — جریانِ نقد، ردیف‌های هزینه/دستمزد/تنخواه (RTLِ کامل، مستقل از fin-row) */
.acct-flow { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 10px; margin-bottom: var(--s5); }
.acct-flow-item { display: flex; align-items: center; justify-content: space-between; padding: 13px 16px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-sm); box-shadow: var(--e1); font-size: var(--fs-sm); color: var(--ink-2); }
.acct-flow-item b { direction: ltr; font-variant-numeric: tabular-nums; font-size: var(--fs-md); }
.acct-flow-net { background: var(--sunken); color: var(--ink); font-weight: 700; }
.acct-list { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; box-shadow: var(--e1); margin-top: 8px; }
.acct-row { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--line); font-size: var(--fs-sm); }
.acct-row:last-child { border-bottom: none; }
.acct-main { flex: 1; min-width: 0; }
.acct-main .acct-sub { color: var(--ink-3); font-size: var(--fs-xs); margin-top: 2px; }
.acct-amt { direction: ltr; font-variant-numeric: tabular-nums; font-weight: 700; white-space: nowrap; }
.acct-cats { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0 2px; }
.acct-cat-chip { background: var(--sunken); border-radius: 999px; padding: 4px 12px; font-size: var(--fs-xs); color: var(--ink-2); font-variant-numeric: tabular-nums; }
.acct-paid { color: var(--ok); font-weight: 600; font-size: var(--fs-xs); white-space: nowrap; }
.acct-toolbar { display: flex; justify-content: flex-end; margin-bottom: 2px; }
/* روندِ چند ماهه — ستون‌های ساده */
.trend { display: flex; align-items: flex-end; gap: 10px; height: 150px; padding: 10px 4px 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--e1); }
.trend-col { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; gap: 4px; min-width: 0; }
.trend-bar { width: 62%; max-width: 36px; border-radius: 4px 4px 0 0; background: var(--ok); min-height: 3px; }
.trend-bar.neg { background: var(--danger); }
.trend-val { font-size: 10px; direction: ltr; font-variant-numeric: tabular-nums; white-space: nowrap; }
.trend-lbl { font-size: var(--fs-xs); color: var(--ink-3); }
.pay-list { display: flex; flex-direction: column; gap: 0; margin-bottom: 6px; }
.pay-row { display: flex; align-items: center; justify-content: space-between; font-size: var(--fs-xs); padding: 6px 0; border-bottom: 1px dashed var(--line); }
.pay-row:last-child { border-bottom: none; }
.pay-row span:last-child { direction: ltr; font-weight: 600; font-variant-numeric: tabular-nums; }

/* ── سوییچِ تم (کنارِ لوگو) ── */
.brand-name { flex: 0 1 auto; }
.theme-toggle { margin-inline-start: auto; background: none; border: 1px solid var(--line-2); color: var(--ink-3); width: 32px; height: 32px; border-radius: var(--r-sm); cursor: pointer; display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; transition: background .15s, color .15s, border-color .15s; }
.theme-toggle:hover { background: var(--sunken); color: var(--ink); border-color: var(--ink-4); }
.theme-toggle i { font-size: 17px; }

/* ── حالتِ تیره (انتخابی) — فقط متغیرها را برمی‌گرداند؛ چون کلِ اپ روی همین متغیرهاست، بقیه خودکار می‌شود ── */
:root[data-theme="dark"] {
  --bg: #0F1720; --surface: #18222E; --sunken: #131C25;
  --primary: #3E93B8; --primary-deep: #327C9C; --primary-soft: #16303D; --ring: rgba(62,147,184,.25);
  --brass: #C8A25C;
  --ink: #E6ECF2; --ink-2: #AEBAC7; --ink-3: #7C8896; --ink-4: #566270;
  --line: #263241; --line-2: #33404F;
  --ok: #3FB080; --ok-soft: #123024; --warn: #D79B44; --warn-soft: #2E2410; --danger: #E06B62; --danger-soft: #331B19;
  --e1: 0 1px 2px rgba(0,0,0,.28), 0 1px 3px rgba(0,0,0,.22);
  --e2: 0 3px 10px rgba(0,0,0,.34), 0 1px 3px rgba(0,0,0,.28);
  --e3: 0 14px 40px rgba(0,0,0,.55);
}
/* رنگ‌های هاردکدِ معدود (بردِ برنامه‌ریزی + بنرها + هاورِ سوییچ) که در تیره باید برگردند */
:root[data-theme="dark"] .pl-col.friday { background: rgba(255,255,255,.025); }
:root[data-theme="dark"] .pl-sess { background: var(--surface); }
:root[data-theme="dark"] .pl-sess.mine { background: rgba(62,147,184,.16); border-inline-end-color: #4C9BE0; }
:root[data-theme="dark"] .pl-sess.mine .pl-sess-t { color: #6FB2F0; }
:root[data-theme="dark"] .pl-sess.anon { background: repeating-linear-gradient(45deg, #1b2530, #1b2530 6px, #223041 6px, #223041 12px); border-inline-end-color: var(--line-2); }
:root[data-theme="dark"] .user-switch:hover { background: #1c3a49; }
:root[data-theme="dark"] .onboard-banner { border-color: var(--warn); color: var(--warn); }
:root[data-theme="dark"] .scenario-note { border-color: var(--warn); color: var(--warn); }

/* ── سابقهٔ اکشن‌ها (audit trail) ── */
.aud-count{font-size:var(--fs-sm);color:var(--ink-3);font-weight:600;white-space:nowrap}
.aud-filters{display:flex;flex-direction:column;gap:10px;margin:14px 0 6px}
.aud-filter-row{display:flex;gap:8px;flex-wrap:wrap;align-items:center}
.aud-search{flex:1;min-width:180px;background:var(--surface);border:1px solid var(--line);border-radius:var(--r-sm);padding:8px 12px;color:var(--ink);font-family:inherit;font-size:var(--fs-sm);outline:none}
.aud-search:focus{border-color:var(--primary);box-shadow:0 0 0 3px var(--ring)}
.aud-sel{background:var(--surface);border:1px solid var(--line);border-radius:var(--r-sm);padding:8px 10px;color:var(--ink);font-family:inherit;font-size:var(--fs-sm);cursor:pointer;outline:none}
.aud-ranges{display:flex;gap:6px;flex-wrap:wrap}
.aud-range{background:var(--surface);border:1px solid var(--line);border-radius:999px;padding:5px 14px;color:var(--ink-2);font-family:inherit;font-size:var(--fs-sm);cursor:pointer}
.aud-range:hover{border-color:var(--primary);color:var(--ink)}
.aud-range.active{background:var(--primary-soft);border-color:var(--primary);color:var(--primary-deep);font-weight:600}

.aud-list{margin-top:8px}
.aud-day{display:flex;align-items:center;gap:10px;position:sticky;top:0;background:var(--bg);padding:12px 2px 6px;z-index:1}
.aud-day::after{content:'';flex:1;height:1px;background:var(--line)}
.aud-day-wd{font-weight:700;color:var(--ink);font-size:var(--fs-sm)}
.aud-day-date{color:var(--ink-3);font-size:var(--fs-xs);font-variant-numeric:tabular-nums}
.aud-day-rows{display:flex;flex-direction:column}
.aud-row{display:flex;gap:12px;padding:9px 4px;border-bottom:1px solid var(--line-2)}
.aud-row:hover{background:var(--surface)}
.aud-time{flex:0 0 auto;width:44px;text-align:center;color:var(--ink-3);font-size:var(--fs-xs);font-variant-numeric:tabular-nums;padding-top:2px}
.aud-body{flex:1;min-width:0;display:flex;flex-direction:column;gap:5px}
.aud-line{display:flex;align-items:baseline;gap:8px;flex-wrap:wrap}
.aud-summary{color:var(--ink);font-size:var(--fs-sm);line-height:1.6}
.aud-sub{display:flex;align-items:center;gap:8px;flex-wrap:wrap}

.aud-cat{display:inline-flex;align-items:center;gap:5px;flex:0 0 auto;padding:1px 9px 1px 7px;border-radius:999px;font-size:11px;font-weight:600;background:var(--sunken);border:1px solid var(--line);color:var(--ink-2)}
.aud-cat::before{content:'';width:7px;height:7px;border-radius:50%;background:var(--dot,#9aa4ad)}
.aud-c-money{--dot:#2f9e5f}.aud-c-content{--dot:#4a7dff}.aud-c-contract{--dot:#7a5cff}.aud-c-film{--dot:#14a0a8}
.aud-c-mission{--dot:#d99422}.aud-c-hr{--dot:#3b93c4}.aud-c-sales{--dot:#d0669b}.aud-c-crm{--dot:#d0577a}
.aud-c-setup{--dot:#7b8a9a}.aud-c-page{--dot:#4a7dff}.aud-c-sec{--dot:#d05555}.aud-c-sys{--dot:#8a94a0}.aud-c-other{--dot:#9aa4ad}

.aud-actor{display:inline-flex;align-items:center;gap:4px;font-size:var(--fs-xs);color:var(--ink-2)}
.aud-actor-ic{font-size:14px;color:var(--ink-3)}
.aud-actor-name{font-weight:600;color:var(--ink)}
.aud-actor-role{color:var(--ink-3)}
.aud-actor-sys .aud-actor-ic,.aud-actor-sys .aud-actor-name{color:var(--brass)}

.aud-chip{display:inline-flex;align-items:center;gap:5px;max-width:100%;background:var(--surface);border:1px solid var(--line);border-radius:999px;padding:2px 10px;color:var(--ink-2);font-family:inherit;font-size:var(--fs-xs);cursor:pointer}
.aud-chip:hover{border-color:var(--primary);color:var(--primary-deep);background:var(--primary-soft)}
.aud-chip-ic{font-size:13px;flex:0 0 auto}
.aud-chip-t{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:220px}
.aud-more{background:none;border:none;color:var(--primary);font-family:inherit;font-size:var(--fs-xs);cursor:pointer;padding:2px 4px}
.aud-more:hover{text-decoration:underline}
.aud-details{flex-basis:100%;margin-top:4px;background:var(--sunken);border:1px solid var(--line-2);border-radius:var(--r-sm);padding:7px 10px;color:var(--ink-2);font-size:var(--fs-xs);line-height:1.7;word-break:break-word;direction:ltr;text-align:right}
.aud-more-btn{margin:16px auto;display:block}

/* تایم‌لاینِ یک مورد (مودال) */
.aud-tl-card{max-width:640px;width:94vw;max-height:86vh;display:flex;flex-direction:column}
.aud-tl-sub{color:var(--ink-3);font-size:var(--fs-sm);margin:-4px 0 12px}
.aud-tl-loading{color:var(--ink-3);padding:22px 4px;text-align:center}
.aud-tl{overflow-y:auto;padding:2px 2px 2px 6px;margin:0 -2px}
.aud-tl-node{display:flex;gap:12px;position:relative;padding-bottom:16px}
.aud-tl-node::before{content:'';position:absolute;top:16px;bottom:-2px;right:6px;width:2px;background:var(--line)}
.aud-tl-node:last-child::before{display:none}
.aud-tl-dot{flex:0 0 auto;width:14px;height:14px;border-radius:50%;margin-top:2px;background:var(--dot,#9aa4ad);border:3px solid var(--surface);box-shadow:0 0 0 1px var(--line);z-index:1}
.aud-tl-content{flex:1;min-width:0;display:flex;flex-direction:column;gap:4px}
.aud-tl-when{font-size:var(--fs-xs);color:var(--ink-3);font-variant-numeric:tabular-nums}
.aud-tl-summary{font-size:var(--fs-sm);color:var(--ink);font-weight:600;line-height:1.6}
.aud-tl-actor{display:flex;flex-wrap:wrap;gap:8px;align-items:center}

.aud-d-before{color:var(--warn)}
.aud-d-sep{color:var(--ink-4,var(--ink-3))}

/* ── اعلان‌ها: زنگوله + کشو + صفحهٔ تاریخچه (همه با توکن‌ها ⇒ تمِ تیره هم می‌گیرد) ── */
.brand-actions { margin-inline-start: auto; display: inline-flex; align-items: center; gap: 6px; }
.brand-actions .theme-toggle { margin-inline-start: 0; }
.notif-bell { position: relative; background: none; border: 1px solid var(--line-2); color: var(--ink-3); width: 32px; height: 32px; border-radius: var(--r-sm); cursor: pointer; display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; transition: background .15s, color .15s, border-color .15s; }
.notif-bell:hover { background: var(--sunken); color: var(--ink); border-color: var(--ink-4); }
.notif-bell i { font-size: 17px; }
.notif-badge { position: absolute; top: -5px; left: -5px; min-width: 16px; height: 16px; padding: 0 4px; border-radius: 999px; background: var(--danger); color: #fff; font-size: 10px; font-weight: 700; line-height: 16px; text-align: center; box-shadow: 0 0 0 2px var(--surface); font-variant-numeric: tabular-nums; }
.notif-badge.hidden { display: none; }

.notif-panel { position: fixed; z-index: 200; width: 340px; max-width: calc(100vw - 24px); max-height: 72vh; display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--e3); overflow: hidden; }
.notif-panel-loading { padding: 28px 16px; text-align: center; color: var(--ink-3); font-size: var(--fs-sm); }
.notif-panel-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 12px 14px; border-bottom: 1px solid var(--line); flex-shrink: 0; }
.notif-panel-title { font-weight: 700; font-size: var(--fs-base); color: var(--ink); }
.notif-markall { background: none; border: none; color: var(--primary); font: inherit; font-size: var(--fs-xs); cursor: pointer; padding: 4px 6px; border-radius: var(--r-sm); }
.notif-markall:hover { background: var(--primary-soft); }
.notif-panel-list { overflow-y: auto; flex: 1; }
.notif-panel-foot { border-top: 1px solid var(--line); padding: 8px; text-align: center; flex-shrink: 0; }
.notif-seeall { background: none; border: none; color: var(--ink-2); font: inherit; font-size: var(--fs-sm); cursor: pointer; padding: 6px 10px; border-radius: var(--r-sm); width: 100%; }
.notif-seeall:hover { background: var(--sunken); color: var(--ink); }

.notif-row { display: flex; align-items: flex-start; gap: 10px; padding: 11px 14px; cursor: pointer; border-bottom: 1px solid var(--line); transition: background .12s; }
.notif-row:last-child { border-bottom: none; }
.notif-row:hover { background: var(--bg); }
.notif-row.unread { background: var(--primary-soft); }
.notif-ic { flex-shrink: 0; width: 30px; height: 30px; border-radius: 8px; display: inline-flex; align-items: center; justify-content: center; font-size: 16px; }
.notif-ic.n-task { background: var(--primary-soft); color: var(--primary); }
.notif-ic.n-approval { background: var(--warn-soft); color: var(--warn); }
.notif-ic.n-mission { background: rgba(176,134,58,.15); color: var(--brass); }
.notif-ic.n-deadline { background: var(--danger-soft); color: var(--danger); }
.notif-ic.n-finance { background: var(--ok-soft); color: var(--ok); }
.notif-ic.n-system { background: var(--sunken); color: var(--ink-3); }
.notif-body { min-width: 0; flex: 1; }
.notif-title { font-size: var(--fs-sm); color: var(--ink); line-height: 1.6; }
.notif-meta { margin-top: 3px; font-size: var(--fs-xs); color: var(--ink-3); display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.notif-page { color: var(--ink-2); }
.notif-time { color: var(--ink-3); font-variant-numeric: tabular-nums; }
.notif-dot { flex-shrink: 0; width: 8px; height: 8px; border-radius: 50%; background: var(--danger); margin-top: 6px; }

.notif-empty { padding: 32px 16px; text-align: center; color: var(--ink-3); font-size: var(--fs-sm); display: flex; flex-direction: column; align-items: center; gap: 8px; }
.notif-empty i { font-size: 28px; color: var(--ink-4); }

.notif-filters { display: flex; gap: 8px; margin-bottom: var(--s4); }
.notif-filter { background: var(--surface); border: 1px solid var(--line-2); color: var(--ink-2); font: inherit; font-size: var(--fs-sm); padding: 6px 14px; border-radius: 999px; cursor: pointer; transition: background .14s, color .14s, border-color .14s; }
.notif-filter:hover { border-color: var(--ink-4); }
.notif-filter.active { background: var(--primary); color: #fff; border-color: var(--primary); }
.notif-fulllist { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--e1); overflow: hidden; }
.notif-day { padding: 10px 14px 6px; font-size: var(--fs-xs); color: var(--ink-3); background: var(--sunken); display: flex; gap: 8px; align-items: center; }
.notif-day-wd { font-weight: 600; }
.notif-day-date { color: var(--ink-4); }

/* ── دستیارِ هوش مصنوعی: دکمهٔ شناور + پنجرهٔ چت ── */
.ai-fab { position: fixed; bottom: 20px; left: 20px; z-index: 150; width: 52px; height: 52px; border-radius: 50%; border: none; cursor: pointer; background: linear-gradient(135deg, var(--primary), var(--brass)); color: #fff; box-shadow: var(--e3); display: flex; align-items: center; justify-content: center; transition: transform .15s; }
.ai-fab:hover { transform: scale(1.06); }
.ai-fab i { font-size: 24px; }
.ai-panel { position: fixed; bottom: 84px; left: 20px; z-index: 151; width: 384px; max-width: calc(100vw - 40px); height: 560px; max-height: calc(100vh - 120px); display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--e3); overflow: hidden; }
.ai-head { display: flex; align-items: center; justify-content: space-between; padding: 12px 14px; border-bottom: 1px solid var(--line); background: linear-gradient(135deg, var(--primary-soft), transparent); flex-shrink: 0; }
.ai-head-t { font-weight: 700; color: var(--primary); display: flex; align-items: center; gap: 8px; }
.ai-context { font-size: 10px; color: var(--ink-3); margin-top: 3px; max-width: 260px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ai-x { background: none; border: none; color: var(--ink-3); cursor: pointer; padding: 4px; border-radius: var(--r-sm); display: inline-flex; }
.ai-x:hover { background: var(--sunken); color: var(--ink); }
.ai-body { flex: 1; overflow-y: auto; padding: 14px; display: flex; flex-direction: column; gap: 10px; }
.ai-hello { text-align: center; color: var(--ink-3); padding: 16px 8px; }
.ai-hello-t { font-size: var(--fs-md); color: var(--ink); font-weight: 600; margin-bottom: 8px; }
.ai-hello-s { font-size: var(--fs-sm); line-height: 1.85; }
.ai-hello-note { font-size: var(--fs-xs); color: var(--ink-3); line-height: 1.7; margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--line); }
.ai-msg { max-width: 86%; padding: 9px 13px; border-radius: 14px; font-size: var(--fs-sm); line-height: 1.8; white-space: pre-wrap; word-break: break-word; }
.ai-user { align-self: flex-start; background: var(--primary); color: #fff; border-bottom-left-radius: 4px; }
.ai-bot { align-self: flex-end; background: var(--sunken); color: var(--ink); border-bottom-right-radius: 4px; }
.ai-typing { color: var(--ink-3); font-style: italic; }
.ai-action { align-self: flex-end; width: 92%; background: var(--surface); border: 1px solid var(--brass); border-radius: 12px; padding: 10px 12px; }
.ai-action-t { font-weight: 600; font-size: var(--fs-sm); color: var(--ink); display: flex; align-items: center; gap: 6px; }
.ai-action-t i { color: var(--brass); }
.ai-action-p { font-size: var(--fs-xs); color: var(--ink-3); margin: 5px 0 9px; line-height: 1.7; }
.ai-action-btns { display: flex; }
.ai-do { padding: 6px 16px; font-size: var(--fs-sm); }
.ai-do.done { background: var(--ok); border-color: var(--ok); cursor: default; }
/* پیشنهادِ امنِ گروهیِ دستیار (فاز۲): چند کار در یک کارت با یک «تأیید همه» */
.ai-proposal { align-self: flex-end; width: 92%; background: var(--surface); border: 1px solid var(--brass); border-radius: 12px; padding: 10px 12px; }
.ai-proposal.done { border-color: var(--ok); }
.ai-proposal-h { font-size: var(--fs-xs); color: var(--warn); margin-bottom: 8px; line-height: 1.7; }
.ai-action-row { padding: 6px 0; border-bottom: 1px dashed var(--line-2); }
.ai-action-row:last-of-type { border-bottom: none; }
.ai-action-row.ok .ai-action-t i { color: var(--ok); }
.ai-action-row .ai-action-p { margin: 4px 0 0; }
.ai-action-btns { display: flex; gap: 8px; margin-top: 8px; }
.ai-proposal-err { align-self: flex-end; width: 92%; font-size: var(--fs-xs); color: var(--danger); background: var(--danger-soft); border-radius: 10px; padding: 8px 12px; line-height: 1.7; }
.ai-risk { color: var(--danger); font-size: 11px; margin-top: 4px; }
.ai-memory { width: 100%; text-align: right; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 10px; margin-top: 10px; }
.ai-memory-title { font-weight: 700; color: var(--primary); }
.ai-memory-line,.ai-memory-item { font-size: 11px; color: var(--ink-3); margin-top: 5px; line-height: 1.6; }
.ai-choices { align-self: flex-end; width: 92%; display: grid; gap: 7px; }
.ai-choice-prompt { font-size: 12px; color: var(--ink-3); }
.ai-choice { text-align: right; border: 1px solid var(--line-2); background: var(--surface); color: var(--ink); border-radius: 10px; padding: 9px 11px; cursor: pointer; font: inherit; }
.ai-choice:hover { border-color: var(--primary); background: var(--primary-soft); }
.ai-choice span { display: block; font-weight: 650; }
.ai-choice small { display: block; color: var(--ink-3); margin-top: 3px; }
.ai-report { margin-top: 7px; border-top: 1px solid var(--line); padding-top: 6px; }
.ai-report summary { cursor: pointer; color: var(--primary); font-size: 12px; }
.ai-report-grid { display: grid; gap: 4px; margin-top: 6px; }
.ai-report-row { display: flex; justify-content: space-between; gap: 10px; font-size: 11px; }
.ai-report-row span { color: var(--ink-3); }
.ai-foot { display: flex; gap: 8px; padding: 10px; border-top: 1px solid var(--line); flex-shrink: 0; align-items: flex-end; }
.ai-input { flex: 1; resize: none; max-height: 110px; min-height: 42px; padding: 10px 12px; border: 1px solid var(--line-2); border-radius: 12px; font: inherit; font-size: var(--fs-sm); background: var(--surface); color: var(--ink); }
.ai-input:focus { outline: none; border-color: var(--primary); }
.ai-send { flex-shrink: 0; width: 42px; height: 42px; border-radius: 50%; border: none; background: var(--primary); color: #fff; cursor: pointer; display: flex; align-items: center; justify-content: center; }
.ai-send:hover { background: var(--primary-deep); }

/* ── override‌های موبایلِ اجزایی که پایه‌شان بعد از بلوکِ موبایلِ اصلی تعریف شده (باید آخرِ فایل باشند تا غالب شوند) ── */
@media (max-width: 720px) {
  /* بردِ برنامه‌ریزی: به‌جای فشرده‌شدنِ ۷ ستون، اسکرولِ افقی با ستون‌های خوانا؛ محورِ ساعت چسبیده (مشکل۳) */
  .pl-grid { overflow-x: auto; overflow-y: hidden; -webkit-overflow-scrolling: touch; }
  .pl-col { flex: 0 0 96px; min-width: 96px; }
  .pl-axis { position: sticky; right: 0; z-index: 3; flex: 0 0 52px; }
}

/* کارتِ تنظیمات (مشکل۱) */
.set-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: var(--s5); margin-bottom: var(--s4); max-width: 560px; box-shadow: var(--e1); }
.set-card-h { font-weight: 700; font-size: var(--fs-lg, 17px); color: var(--ink); margin-bottom: var(--s4); }

/* صفحهٔ ورود — برندشده (مشکل۲) */
.login-bg { position: fixed; inset: 0; z-index: 9999; display: flex; align-items: center; justify-content: center; padding: 20px; background: radial-gradient(1100px 560px at 72% -12%, var(--primary-soft), transparent 60%), var(--bg); }
.login-card { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 34px 30px; width: 344px; max-width: 92vw; box-shadow: var(--e3); animation: fade .2s ease; }
.login-brand { display: flex; align-items: center; justify-content: center; gap: 10px; font-size: 30px; font-weight: 800; color: var(--primary); letter-spacing: -.01em; }
.login-brand-bar { width: 5px; height: 30px; border-radius: 3px; background: linear-gradient(var(--primary), var(--brass, #C8973F)); }
.login-sub { text-align: center; color: var(--ink-3); font-size: var(--fs-sm); margin: 6px 0 24px; }
.login-field { position: relative; margin-bottom: 12px; }
.login-field > .ti { position: absolute; top: 50%; transform: translateY(-50%); inset-inline-start: 13px; color: var(--ink-4); font-size: 18px; pointer-events: none; }
.login-input { width: 100%; min-height: 46px; padding: 8px 14px; padding-inline-start: 42px; border: 1px solid var(--line-2); border-radius: 12px; font: inherit; font-size: var(--fs-base); background: var(--bg); color: var(--ink); transition: border-color .15s, box-shadow .15s, background .15s; }
.login-input:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px var(--ring); background: var(--surface); }
.login-btn { width: 100%; min-height: 46px; margin-top: 6px; border-radius: 12px; font-size: var(--fs-base); font-weight: 700; }
.login-err { color: var(--danger); font-size: 13px; min-height: 18px; margin-bottom: 6px; text-align: center; }
.login-foot { text-align: center; color: var(--ink-4); font-size: var(--fs-xs); margin-top: 18px; }
/* سابقهٔ تخصیص‌ها (گزارشِ کاملِ مدیر) — سه وضعیتِ فعلی/حذف‌شده/سابقهٔ قدیمی با رنگِ متمایز */
.asn-list { margin-top: 8px; }
.asn-row { display: flex; justify-content: space-between; gap: 12px; padding: 10px 4px; border-bottom: 1px solid var(--line-2); }
.asn-row:hover { background: var(--surface); }
.asn-main { min-width: 0; }
.asn-line1 { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.asn-resp { font-weight: 600; color: var(--ink); }
.asn-line2 { margin-top: 3px; line-height: 1.8; }
.asn-meta { text-align: left; flex-shrink: 0; white-space: nowrap; }
.asn-st { display: inline-flex; align-items: center; font-size: var(--fs-xs); border-radius: 999px; padding: 2px 9px; white-space: nowrap; }
.asn-st-live { background: var(--ok-soft); color: var(--ok); }
.asn-st-deleted { background: var(--danger-soft); color: var(--danger); }
.asn-st-legacy { background: var(--warn-soft); color: var(--warn); }

/* گزارشِ تصویربرداری — نتیجهٔ صریحِ هر محتوا (نسل۱۳) */
.sr-list { border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; margin-bottom: var(--s3); }
.sr-item { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--s2); padding: 10px var(--s3); border-bottom: 1px solid var(--line); }
.sr-item:last-child { border-bottom: none; }
.sr-item.sr-undecided { background: var(--warn-soft); }
.sr-txt { min-width: 0; flex: 1 1 140px; }
.sr-t { font-size: var(--fs-sm); font-weight: 600; overflow-wrap: anywhere; }
.sr-m { font-size: var(--fs-xs); color: var(--ink-3); }
.sr-choice { display: inline-flex; flex: 0 0 auto; border: 1px solid var(--line-2); border-radius: var(--r-sm); overflow: hidden; background: var(--surface); }
.sr-btn { border: none; background: var(--surface); color: var(--ink-2); font: inherit; font-size: var(--fs-xs); padding: 6px 10px; cursor: pointer; white-space: nowrap; transition: background .14s, color .14s; }
.sr-btn + .sr-btn { border-inline-start: 1px solid var(--line-2); }
.sr-btn[aria-pressed="true"].sr-yes { background: var(--ok-soft); color: var(--ok); font-weight: 700; }
.sr-btn[aria-pressed="true"].sr-no { background: var(--danger-soft); color: var(--danger); font-weight: 700; }
.sr-counts { display: flex; flex-wrap: wrap; gap: var(--s2); margin-bottom: var(--s3); }
.sr-count { font-size: var(--fs-xs); border-radius: 999px; padding: 2px 10px; background: var(--sunken); color: var(--ink-2); white-space: nowrap; }
.sr-count-yes { background: var(--ok-soft); color: var(--ok); }
.sr-count-no { background: var(--danger-soft); color: var(--danger); }
.sr-count-legacy { background: var(--warn-soft); color: var(--warn); }

/* ── دستمزدِ شخصیِ «نفر × نوعِ کار» (نسل۱۶) ── */
/* هدف: در ۳۷۵px هم بدونِ سرریز/هم‌پوشانی. کنترل‌ها flex-wrap با min-width:0 ⇒ هرگز از کارت بیرون نمی‌زنند. */
.wc-summary { margin-bottom: var(--s3); }
.wc-sum-line { font-size: var(--fs-sm); font-weight: 600; color: var(--ink); line-height: 1.7; }
.wc-list { display: flex; flex-direction: column; gap: 8px; }
.wc-row { border: 1px solid var(--line); border-radius: var(--r-sm); padding: 9px 11px; background: var(--sunken); }
.wc-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 10px; margin-bottom: 7px; }
.wc-name { font-size: var(--fs-sm); font-weight: 600; color: var(--ink); min-width: 0; overflow-wrap: anywhere; }
.wc-global { font-size: var(--fs-xs); color: var(--ink-3); direction: rtl; unicode-bidi: isolate; white-space: nowrap; }
.wc-ctl { display: flex; flex-wrap: wrap; gap: 6px; }
.wc-ctl > select, .wc-ctl > input {
  flex: 1 1 130px; min-width: 0; width: auto; min-height: 38px; padding: 6px 10px;
  font: inherit; font-size: var(--fs-sm); color: var(--ink);
  background: var(--surface); border: 1px solid var(--line-2); border-radius: var(--r-sm);
}
.wc-ctl > select:focus, .wc-ctl > input:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px var(--ring); }
.wc-ctl > input.wc-val { flex: 0 1 110px; }
.wc-eff { margin-top: 6px; overflow-wrap: anywhere; }
@media (max-width: 420px) { .wc-ctl > select, .wc-ctl > input { flex: 1 1 100%; } }

/* ── نمای «بارِ کاری» (نسل۱۷) ── */
/* هدف: در ۳۷۵px هم بدونِ سرریزِ افقی/هم‌پوشانی. کنترلِ بازه با flex-wrap؛ نوارِ روزها تنها چیزی است که خودش اسکرول می‌شود. */
.wl-ctl { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s2) var(--s3); margin-bottom: var(--s4); }
.wl-seg { display: flex; flex-wrap: wrap; gap: 2px; padding: 3px; background: var(--sunken); border: 1px solid var(--line); border-radius: var(--r-sm); max-width: 100%; }
.wl-seg-btn { border: none; background: none; color: var(--ink-2); font: inherit; font-size: var(--fs-sm); font-weight: 600; padding: 7px 13px; border-radius: calc(var(--r-sm) - 2px); cursor: pointer; white-space: nowrap; transition: background .14s, color .14s; }
.wl-seg-btn:hover { color: var(--ink); }
.wl-seg-btn.active { background: var(--surface); color: var(--primary); box-shadow: 0 1px 2px rgba(0,0,0,.06); }
.wl-custom { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; min-width: 0; }
.wl-date { flex: 1 1 132px; min-width: 0; width: auto; min-height: 38px; padding: 6px 10px; font: inherit; font-size: var(--fs-sm); color: var(--ink); background: var(--surface); border: 1px solid var(--line-2); border-radius: var(--r-sm); direction: ltr; text-align: center; }
.wl-date:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px var(--ring); }
.wl-apply { flex: 0 0 auto; min-height: 38px; }
.wl-err { font-size: var(--fs-sm); font-weight: 600; color: var(--danger); background: var(--danger-soft); border: 1px solid var(--danger); border-radius: var(--r-sm); padding: 9px 12px; margin-bottom: var(--s4); overflow-wrap: anywhere; }
.wl-list { display: flex; flex-direction: column; gap: 8px; }
.wl-card { border: 1px solid var(--line); border-radius: var(--r-sm); padding: 11px 13px; background: var(--surface); }
.wl-card-h { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 10px; }
.wl-who { min-width: 0; }
.wl-name { font-size: var(--fs-sm); font-weight: 700; color: var(--ink); overflow-wrap: anywhere; }
.wl-role { font-size: var(--fs-xs); color: var(--ink-3); overflow-wrap: anywhere; }
.wl-nums { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 9px; }
.wl-num { flex: 1 1 78px; min-width: 0; display: flex; flex-direction: column; align-items: center; gap: 1px; padding: 6px 4px; border: 1px solid var(--line-2); border-radius: var(--r-sm); background: var(--sunken); }
.wl-num b { font-size: var(--fs-base); font-weight: 700; color: var(--ink); font-variant-numeric: tabular-nums; }
.wl-num span { font-size: var(--fs-xs); color: var(--ink-3); white-space: nowrap; }
.wl-num.ok b { color: var(--primary); }
.wl-num.danger { border-color: var(--danger); background: var(--danger-soft); }
.wl-num.danger b { color: var(--danger); }
.wl-num.warn { border-color: var(--warn); background: var(--warn-soft); }
.wl-num.warn b { color: var(--warn); }
.wl-num.muted b { color: var(--ink-3); }
.wl-extra { margin-top: 8px; font-size: var(--fs-xs); color: var(--ink-2); overflow-wrap: anywhere; }
.wl-days { display: flex; align-items: flex-end; gap: 2px; margin-top: 9px; height: 36px; overflow-x: auto; overflow-y: hidden; padding-bottom: 2px; }
.wl-day { flex: 0 0 8px; display: flex; align-items: flex-end; height: 100%; }
.wl-day i { display: block; width: 100%; background: var(--line-2); border-radius: 2px; }
.wl-day.on i { background: var(--primary); }
@media (max-width: 420px) {
  .wl-seg-btn { padding: 7px 10px; font-size: var(--fs-xs); }
  .wl-custom { flex: 1 1 100%; }
  .wl-apply { flex: 1 1 100%; }
}

/* ── کارِ «در انتظارِ تصمیمِ دیگری» (فقط خواندنی) و دلیلِ برگشت برای اصلاح ── */
.row-waiting { opacity: .78; }
/* نسل۳۰: برجسته‌سازیِ کوتاهِ ردیفِ مقصد وقتی از داشبورد روی یک کارِ مشخص کلیک می‌شود. */
.row-focus { box-shadow: 0 0 0 2px var(--primary) inset; transition: box-shadow .2s ease; }
.row-waiting .row-title { font-weight: 500; }
.badge-muted {
  background: var(--surface-2, #f1f3f5);
  color: var(--muted, #6b7280);
  border: 1px solid var(--border, #e5e7eb);
  white-space: nowrap;
}
[data-theme="dark"] .badge-muted { background: rgba(255,255,255,.06); color: #9aa3ae; border-color: rgba(255,255,255,.12); }
.row-meta.revision-note {
  color: var(--danger, #dc2626);
  white-space: normal;
  overflow-wrap: anywhere;   /* دلیلِ بلند نباید برد را افقی سرریز کند */
  line-height: 1.6;
}

/* نشانِ عددیِ کنارِ آیتمِ منو (مثلاً تعدادِ مقصرهای نیازمندِ بررسی) */
.nav-badge {
  margin-inline-start: auto;
  min-width: 20px; padding: 1px 7px;
  border-radius: var(--r-full, 999px);
  background: var(--danger-soft, #fee2e2); color: var(--danger, #dc2626);
  font-size: var(--fs-xs); font-weight: 700; text-align: center; line-height: 1.6;
}
[data-theme="dark"] .nav-badge { background: rgba(220,38,38,.18); color: #f4a3a0; }

/* چیپِ پیج در سابقهٔ اکشن‌ها (نسل۱۹) */
.aud-chip-page { background: var(--primary-soft); color: var(--primary); border-color: transparent; }
[data-theme="dark"] .aud-chip-page { background: rgba(56,132,255,.16); color: #8fbaff; }

/* آیتمِ دوخطیِ منو (برچسبِ دوره + برچسبِ تقویمی) — نسل۲۰ */
.menu-item-2l { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; line-height: 1.5; }
.menu-item-2l .mi-main { font-weight: 600; }
.menu-item-2l .mi-sub { font-size: var(--fs-xs); color: var(--muted, #6b7280); }
[data-theme="dark"] .menu-item-2l .mi-sub { color: #9aa3ae; }

/* ── نسل۴۸ (r56، فاز۷): عددِ توضیح‌پذیر ──
   هر عددِ مالی یک دکمهٔ نامرئی است: مثلِ متن دیده می‌شود، ولی زیرش خطِ نقطه‌چین دارد تا معلوم
   باشد کلیک‌پذیر است. عمداً شبیهِ دکمه نیست — وگرنه صفحهٔ مالی پر از دکمه می‌شد و شلوغ. */
.explain-num {
  background: none; border: 0; padding: 0; margin: 0; font: inherit; color: inherit;
  cursor: pointer; border-bottom: 1px dotted currentColor; line-height: inherit;
}
.explain-num:hover, .explain-num:focus-visible { border-bottom-style: solid; opacity: .85; }
.explain-num:focus-visible { outline: 2px solid var(--accent, #2563eb); outline-offset: 2px; border-radius: 3px; }
.explain-heading { font-weight: 700; margin: var(--s4) 0 var(--s2); }
.explain-term, .explain-total { display: flex; justify-content: space-between; align-items: center; gap: var(--s3); padding: 6px 0; }
.explain-total { border-top: 1px solid var(--border); font-weight: 700; }
.explain-rows { max-height: 360px; overflow: auto; border: 1px solid var(--border); border-radius: var(--r); }
.explain-row { display: grid; grid-template-columns: 112px minmax(0, 1fr) 120px; align-items: center; gap: var(--s3); padding: 8px 10px; border-bottom: 1px solid var(--border); font-size: 13px; }
.explain-row:last-child { border-bottom: 0; }
.explain-row-date { opacity: .78; font-size: 12px; }
.explain-row-main, .explain-row-link { min-width: 0; overflow-wrap: anywhere; }
.explain-row-link { border: 0; background: transparent; color: inherit; cursor: pointer; text-align: right; padding: 0; font: inherit; }
.explain-row-link:hover { color: var(--primary); }
.explain-row small, .explain-row-link small { display: block; color: var(--ink-3); font-size: 11px; margin-top: 2px; }
@media (max-width: 720px) {
  .explain-row { grid-template-columns: 1fr auto; gap: 4px 10px; }
  .explain-row-date { grid-column: 1 / -1; }
  .explain-rows { max-height: 52vh; }
  .explain-report .hint { line-height: 1.7; }
}

/* ── r57: تقویمِ نمایشیِ انتخابِ تاریخ ──
   خواستهٔ فراز: «تاریخ‌ها رو باید برامون تقویمِ نمایشی بیاره و کلیک کنیم.»
   همهٔ رنگ‌ها از توکن‌های موجود می‌آیند تا با دارک‌مود هم درست بماند. */
.jcal-input { cursor: pointer; }
/* r58 (موردِ ۳ی فراز): پیش از این `background: var(--card)` بود و **`--card` هرگز تعریف نشده**.
   متغیرِ ناموجود ⇒ اعلانِ نامعتبر ⇒ پس‌زمینهٔ شفاف ⇒ هرچه پشتِ تقویم بود از تویش دیده می‌شد و
   به‌نظر می‌رسید جدول به‌هم ریخته. نامِ درستِ همان توکن `--surface` است. تستِ ۳-الف از این پس
   **هر** متغیرِ تعریف‌نشده‌ای را در کلِ استایل‌شیت قرمز می‌کند. */
.jcal-host { position: relative; display: block; }
.jcal-pop { position: absolute; z-index: 60; inset-inline-start: 0; top: 100%; margin-top: 4px;
  background: var(--surface); border: 1px solid var(--line-2);
  border-radius: var(--r-sm); box-shadow: 0 8px 24px rgba(0,0,0,.18); padding: 10px; width: 268px; }
/* پایینِ پنجره جا نبود ⇒ از بالای اینپوت باز شود (وگرنه در مودالِ کوتاه، تقویم بیرونِ دید می‌افتد). */
.jcal-pop.jcal-up { top: auto; bottom: 100%; margin-top: 0; margin-bottom: 4px; }
.jcal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.jcal-title { font-weight: 600; font-size: var(--fs-sm); color: var(--ink); }
.jcal-nav { background: none; border: 1px solid var(--line-2); border-radius: var(--r-sm); width: 28px; height: 28px;
  cursor: pointer; color: var(--ink); font-size: var(--fs-base); line-height: 1; }
.jcal-nav:hover { background: var(--bg); }
.jcal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; }
.jcal-wk { margin-bottom: 4px; }
.jcal-wd { text-align: center; font-size: var(--fs-xs); color: var(--ink-2); padding: 2px 0; }
.jcal-day { background: none; border: none; border-radius: var(--r-sm); padding: 6px 0; cursor: pointer;
  font-size: var(--fs-sm); color: var(--ink); }
.jcal-day:hover { background: var(--primary-soft); }
.jcal-day.is-off { color: var(--danger); }
.jcal-day.is-today { border: 1px solid var(--primary); }
.jcal-day.is-sel { background: var(--primary); color: #fff; }
.jcal-foot { display: flex; justify-content: space-between; margin-top: 8px; border-top: 1px solid var(--line); padding-top: 6px; }

/* ── r57 · موردِ ۴: نوارِ دکمه‌های سرِ صفحه ──
   گزارشِ فراز: «دکمه‌های بارِ بالا … به‌هم‌ریخته‌ست و قشنگ هم نیستن.»
   علت: هفت دکمه در یک ردیفِ flexِ بدونِ wrap با گپِ inlineِ ۶px — در عرضِ کم روی هم می‌ریختند و
   ناوبریِ هفته (قبل/این هفته/بعد) از ابزارها قابلِ تفکیک نبود.
   اصلاح فقط چیدمانی است: wrap می‌شوند، ناوبری یک واحدِ بصریِ به‌هم‌چسبیده می‌شود، و دکمه‌ها
   وسطِ کلمه نمی‌شکنند. هیچ منطقی عوض نشده. */
.head-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: var(--s2); }
.head-actions .btn, .head-actions .btn-text { white-space: nowrap; }
.seg { display: inline-flex; border: 1px solid var(--line-2); border-radius: var(--r-sm); overflow: hidden; }
.seg .btn-text { border-radius: 0; padding: 7px 12px; }
.seg .btn-text + .btn-text { border-inline-start: 1px solid var(--line-2); }
.seg .btn-text:hover { background: var(--bg); }

/* ── r57 · موردِ ۸: ردیف داخلِ مودالِ باریک ──
   گزارشِ فراز: مودالِ «دوره‌های خدمتِ قرارداد» چیدمانش فرو ریخته بود و متن **کلمه‌به‌کلمه و
   حتی رقم‌به‌رقم** در سطرهای جدا می‌شکست.
   علت: `.row` برای ناحیهٔ عریضِ اصلی ساخته شده؛ داخلِ مودالِ ۴۶۰px با دو دکمهٔ بلند،
   `.row-info` تا نزدیکِ صفر فشرده می‌شد و متن حرف‌به‌حرف می‌شکست.
   اصلاح: ردیف اجازهٔ wrap می‌گیرد و `.row-info` کفِ عرض دارد، پس هرگز له نمی‌شود. */
.modal-card .row { flex-wrap: wrap; row-gap: var(--s2); }
.modal-card .row-info { flex: 1 1 200px; min-width: 0; }
.modal-card .row-actions { flex-wrap: wrap; justify-content: flex-end; }
.modal-card .row-title, .modal-card .row-meta { overflow-wrap: anywhere; }

/* ── r77: تبلت و موبایل یک قراردادِ چیدمان دارند ──
   شکستِ قبلی در ۷۲۰px بود؛ آیپدِ ۸۹۴px هنوز سایدبارِ ۲۳۲px را داخل صفحه نگه می‌داشت و
   کارت‌های مالی/قرارداد را تا مرزِ بریدنِ عددها فشار می‌داد. از ۱۰۲۴px به پایین همان drawer
   موبایل فعال می‌شود. این تغییر فقط چیدمان است و هیچ داده یا اکشنی را عوض نمی‌کند. */
@media (max-width: 1024px) {
  .mobilebar { display: flex; align-items: center; gap: 10px; padding: 9px 14px; background: var(--surface); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 100; }
  .nav-toggle { background: none; border: 1px solid var(--line-2); border-radius: var(--r-sm); width: 38px; height: 38px; display: inline-flex; align-items: center; justify-content: center; color: var(--ink); cursor: pointer; flex-shrink: 0; }
  .nav-toggle i { font-size: 22px; }
  .mobilebar-brand { font-size: var(--fs-xl); font-weight: 700; color: var(--primary); }
  .mobilebar-actions { margin-inline-start: auto; display: flex; align-items: center; gap: 8px; }
  .layout { display: block; width: 100%; min-width: 0; overflow: clip; }
  .sidebar { position: fixed; top: 0; bottom: 0; right: 0; left: auto; width: 280px; max-width: 84vw; height: 100dvh; overflow-y: auto; z-index: 300; transform: translateX(101%); transition: transform .22s ease; border-inline-start: 1px solid var(--line); border-bottom: none; box-shadow: none; visibility: hidden; pointer-events: none; }
  body.nav-open .sidebar { transform: translateX(0); visibility: visible; pointer-events: auto; box-shadow: var(--e3); }
  body.nav-open .nav-backdrop { display: block; position: fixed; inset: 0; background: rgba(15,23,32,.45); z-index: 250; }
  .main { padding: var(--s5); max-width: none; width: 100%; min-width: 0; overflow: clip; }
  .main > *, .contract-card, .list, .row, .dash-section, .health-detail-card { max-width: 100%; min-width: 0; }
  .row-info, .row-info > div, .contract-card > div { min-width: 0; }
  .contract-card { overflow: hidden; }
  .modal-card { width: min(620px, calc(100vw - 24px)); max-width: calc(100vw - 24px) !important; max-height: calc(100dvh - 24px); overflow: auto; }
  img, svg, canvas, table { max-width: 100%; }
  .page-head, .head-actions { flex-wrap: wrap; }
  .dash-stat, .dash-fin-item, .mh-hero, .prof-row, .contract-card { min-width: 0; }
  /* عدد یک واحد معنایی است: در تبلت هرگز وسط رقم/کاما نصف نمی‌شود. شبکه زودتر دو ستونه
     می‌شود و اندازهٔ قلم هم با عرض کارت پایین می‌آید؛ متن‌های عادی همچنان اجازهٔ wrap دارند. */
  .dash-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dash-stat-v, .dash-fin-v, .mh-hero-v { max-width: 100%; white-space: nowrap; overflow-wrap: normal; word-break: keep-all;
    font-size: clamp(18px, 3.1vw, 28px); }
  .prof-v { max-width: 100%; overflow-wrap: anywhere; word-break: normal; font-size: clamp(17px, 2.8vw, 22px); }
  .fin-row > *, .row-title, .row-meta { min-width: 0; overflow-wrap: anywhere; }
  .notif-panel { inset-inline: 10px !important; width: auto !important; max-width: none !important; }
  .ai-panel { inset-inline: 10px !important; width: auto !important; max-width: none !important; left: auto !important; }
}

@media (max-width: 720px) {
  .main { padding: 14px; }
  .page-title { font-size: var(--fs-xl); }
  .row { flex-wrap: wrap; }
  .row-actions { flex-wrap: wrap; justify-content: flex-end; width: 100%; margin-top: 8px; }
  .dash-fin { grid-template-columns: 1fr 1fr; }
  .mh-hero-v { font-size: clamp(22px, 8vw, 30px); }
  .crm-note-picks { grid-template-columns: 1fr; }
  .contract-card { padding: 14px; }
  .contract-card [style*="display:flex"], .modal-card [style*="display:flex"] { flex-wrap: wrap; min-width: 0; }
  .contract-card [style*="min-width"], .modal-card [style*="min-width"] { max-width: 100%; }
  .seg { max-width: 100%; overflow-x: auto; }
  .btn, .btn-text { max-width: 100%; white-space: normal; }
  .source-action { flex: 1 1 150px; border: 1px solid var(--line); background: var(--primary-soft); }
  .source-check { align-items: flex-start; }
  .archive-row { align-items: flex-start; }
  .archive-info { width: 100%; }
}

@media (max-width: 430px) {
  .dash-stats, .dash-fin { grid-template-columns: 1fr; }
  .main { padding-inline: 10px; }
  .page-head { margin-bottom: var(--s5); }
}

/* r95: کارتابل ارتباطات و فرم دستمزد پروژه‌ای در موبایل/تبلت همان منطق دسکتاپ را
   با چیدمان خوانا نشان می‌دهند؛ هیچ فیلد یا ردیفی در اسکرول افقی پنهان نمی‌شود. */
.comms-workbench { width: 100%; min-width: 0; overflow: clip; }
.comms-workbench .dash-section,
.comms-workbench .list,
.comms-workbench .row,
.comms-workbench .row-info,
.comms-workbench .row-info > div { min-width: 0; max-width: 100%; }
.comms-workbench .row-title,
.comms-workbench .row-meta { overflow-wrap: anywhere; word-break: normal; }
.comms-client-search { width:100%; margin:0 0 10px; min-height:44px; }
.project-role-effective-field { padding: 12px; border: 1px solid var(--primary); border-radius: var(--r-sm); background: var(--primary-soft); }
.project-role-effective-field label { color: var(--primary); font-weight: 700; }
.project-role-effective-field .jcal-host,
.project-role-effective-field input { width: 100%; min-width: 0; }
@media (max-width: 720px) {
  .comms-workbench .page-head { align-items: flex-start; }
  .comms-workbench .dash-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .comms-workbench .dash-stat { padding: 13px; }
  .comms-workbench .dash-stat-v { font-size: 24px; }
  .comms-workbench .row { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 8px; align-items: start; }
  .comms-workbench .row-info { width: auto; margin: 0; align-items: flex-start; }
  .project-role-comp-modal { padding: 16px; }
  .project-role-comp-modal .modal-actions { display: grid; grid-template-columns: 1fr; }
  .project-role-comp-modal .modal-actions .btn { width: 100%; }
}
@media (max-width: 430px) {
  /* شمارهای کارتابل کوتاه‌اند؛ ۲×۲ از چهار کارت بلند و اسکرول‌ساز خواناتر است. */
  .comms-workbench .dash-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .comms-workbench .dash-stat-v { font-size: 22px; }
}

/* دفتر تعاملِ r77: اطلاعات ساختاریافته‌اند ولی فرم عمداً فشرده می‌ماند. */
.crm-note-form { display: grid; gap: 8px; margin-bottom: 12px; padding: 12px; border: 1px solid var(--line); border-radius: var(--r); background: var(--sunken); }
.crm-note-form select, .crm-note-form input, .crm-note-form textarea { width: 100%; min-width: 0; min-height: 40px; padding: 8px 11px; border: 1px solid var(--line-2); border-radius: var(--r-sm); background: var(--surface); color: var(--ink); font: inherit; }
.crm-note-form textarea { min-height: 72px; resize: vertical; }
.crm-note-picks { display: grid; grid-template-columns: minmax(130px,.65fr) minmax(180px,1.35fr); gap: 8px; }
.crm-next { color: var(--primary); font-weight: 600; white-space: normal; }

/* r88: انتخابِ منبع و مقصدِ روشنِ کارِ بازِ پروژه‌های بایگانی‌شده. */
.source-meta { color: var(--primary); }
.source-check { display:flex; align-items:center; gap:8px; margin:-2px 0 12px; cursor:pointer; }
.source-check input { width:18px; height:18px; flex:0 0 auto; }
.source-impact { margin-bottom:12px; }
.archive-open { margin-top:8px; padding:8px 10px; border-radius:var(--r-sm); background:var(--warn-soft); color:var(--ink); }
.archive-open strong { color:var(--warn); }
.archive-clear { margin-top:6px; color:var(--ok); }

/* r83: سلامت سیستم مثل بار کاری — شمارِ روشن، کلیک، سپس فقط فهرست مرتبط. */
.health-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(210px,1fr)); gap:12px; margin-bottom:18px; }
.health-tile { appearance:none; border:1px solid var(--line); border-radius:18px; background:linear-gradient(145deg,var(--surface),var(--sunken)); color:var(--ink); padding:15px; display:grid; grid-template-columns:auto 1fr auto; gap:11px; align-items:center; text-align:start; cursor:pointer; min-height:88px; transition:.16s ease; }
.health-tile:hover { transform:translateY(-2px); border-color:var(--primary); box-shadow:var(--e2); }
.health-tile.active { border-color:var(--primary); box-shadow:0 0 0 3px var(--primary-soft),var(--e2); }
.health-tile-icon { width:42px; height:42px; border-radius:14px; display:grid; place-items:center; background:var(--bg); color:var(--ink-2); font-size:21px; }
.health-tile-copy { min-width:0; display:flex; flex-direction:column; gap:4px; }
.health-tile-copy strong { font-size:14px; }
.health-tile-copy small { color:var(--ink-3); font-size:11px; white-space:normal; }
.health-tile-count { min-width:38px; height:38px; border-radius:13px; display:grid; place-items:center; font-size:20px; background:var(--bg); }
.health-tile.danger .health-tile-count,.health-tile.danger .health-tile-icon { color:var(--danger); background:color-mix(in srgb,var(--danger) 11%,var(--surface)); }
.health-tile.warn .health-tile-count,.health-tile.warn .health-tile-icon { color:var(--warning); background:color-mix(in srgb,var(--warning) 13%,var(--surface)); }
.health-tile.ok .health-tile-count,.health-tile.ok .health-tile-icon { color:var(--success); background:color-mix(in srgb,var(--success) 11%,var(--surface)); }
.health-tile.calm .health-tile-count,.health-tile.calm .health-tile-icon { color:var(--primary); background:var(--primary-soft); }
.health-detail-head { display:flex; align-items:center; justify-content:space-between; gap:12px; margin:4px 2px 10px; font-weight:700; }
.health-detail-card { animation:health-in .16s ease-out; }
@keyframes health-in { from { opacity:.3; transform:translateY(5px) } to { opacity:1; transform:none } }
@media (max-width:720px) { .health-grid { grid-template-columns:1fr 1fr; gap:8px; } .health-tile { grid-template-columns:auto 1fr; min-height:96px; padding:11px; } .health-tile-count { grid-column:2; justify-self:start; height:auto; min-width:0; background:none!important; } .health-tile-icon { width:36px;height:36px; } }
@media (max-width:430px) { .health-grid { grid-template-columns:1fr; } .health-tile { min-height:76px; grid-template-columns:auto 1fr auto; } .health-tile-count { grid-column:auto; justify-self:auto; } }
.request-status-grid,.staff-account-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(150px,1fr));gap:12px;margin:12px 0 18px}.request-status-card,.staff-account-card{border:1px solid var(--line);background:linear-gradient(145deg,var(--surface),var(--sunken));border-radius:16px;padding:16px;text-align:right;color:var(--text);box-shadow:var(--e1);cursor:pointer}.request-status-card:hover,.staff-account-card:hover,.request-status-card.active{border-color:var(--primary);transform:translateY(-1px)}.request-status-card strong{display:block;font-size:28px;color:var(--primary);margin-bottom:5px}.request-board,.request-mini-grid{display:grid;gap:10px}.request-mini-grid .row{border-radius:14px;background:var(--sunken)}.staff-card-head{display:flex;justify-content:space-between;gap:8px;align-items:center}.staff-card-money{font-size:22px;font-weight:800;color:var(--primary);margin:14px 0 4px}.staff-account-card small{color:var(--text-muted)}.crm-primary-actions{display:flex;justify-content:flex-start;margin-bottom:12px}.handoff-list{display:grid;gap:8px;margin:12px 0;max-height:330px;overflow:auto}.handoff-row{display:grid;grid-template-columns:minmax(170px,1fr) minmax(190px,1fr);gap:12px;align-items:center;padding:11px;border:1px solid var(--line);border-radius:12px}.handoff-row small{display:block;color:var(--text-muted);margin-top:3px}.offboard-summary,.staff-ledger-summary{display:grid;grid-template-columns:repeat(3,1fr);gap:8px;margin-bottom:12px}.modal-wide{width:min(760px,94vw);max-width:min(760px,94vw)}.check-line{display:flex;align-items:center;gap:8px;padding:10px 0;color:var(--text-muted)}.acct-history{margin-top:10px;border-top:1px solid var(--line);padding-top:10px}.acct-history summary{cursor:pointer;color:var(--text-muted);font-weight:700}.acct-history-row{width:100%;border:0;border-bottom:1px solid var(--line);background:transparent;color:inherit;padding:10px;display:flex;justify-content:space-between;gap:12px;text-align:right;cursor:pointer}.acct-history-row:hover{background:var(--sunken)}
.staff-card-money{direction:ltr;unicode-bidi:isolate;white-space:nowrap;overflow-wrap:normal;word-break:keep-all;font-variant-numeric:tabular-nums}.staff-job-title{color:var(--primary);margin-top:2px}
@media(max-width:720px){.request-status-grid{grid-template-columns:repeat(2,1fr)}.request-status-grid .request-status-card:last-child{grid-column:1/-1}.staff-account-grid{grid-template-columns:1fr}.request-board .row,.request-mini-grid .row{align-items:flex-start}.handoff-row{grid-template-columns:1fr}.offboard-summary,.staff-ledger-summary{grid-template-columns:1fr}.crm-note-picks{grid-template-columns:1fr}.crm-primary-actions .btn{width:100%;justify-content:center}}
/* r91 — میز روزانهٔ فشرده و چک‌لیستِ بستن ماه؛ روی موبایل هر بسته یک ستون کامل است. */
.today-page-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(300px,1fr));gap:12px}
.today-page-card{min-width:0}.today-page-card .card-title{display:flex;align-items:center;justify-content:space-between;gap:8px}
.close-check-row{width:100%;text-align:inherit;border:0;cursor:pointer;background:transparent}
.close-check-row:hover{background:var(--sunken)}
.close-check-icon{width:30px;height:30px;display:grid;place-items:center;border-radius:10px;background:rgba(245,158,11,.14);color:var(--warning);font-weight:800;flex:none}
.close-check-row.done .close-check-icon{background:rgba(34,197,94,.14);color:var(--success)}
@media(max-width:640px){.today-page-grid{grid-template-columns:1fr}.today-page-card{padding:12px}.close-check-row{align-items:flex-start}}
/* r97 — مرکز سبکِ «کار و یادآوری»: نمای اول کوتاه و کارت‌محور؛ فهرست کامل فقط با انتخاب کاربر. */
.iw-hub{background:linear-gradient(145deg,color-mix(in srgb,var(--primary) 9%,var(--surface)),var(--surface));border:1px solid color-mix(in srgb,var(--primary) 24%,var(--border));border-radius:20px;padding:16px;margin-bottom:18px;box-shadow:0 12px 35px rgba(0,0,0,.08)}
.iw-head{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:14px}.iw-head>div{display:grid;gap:3px}.iw-head small{color:var(--text-muted)}
.iw-stats{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:9px;margin-bottom:12px}.iw-stat{border:1px solid var(--border);background:color-mix(in srgb,var(--surface) 86%,transparent);color:var(--text);border-radius:15px;padding:11px;display:grid;grid-template-columns:auto 1fr auto;align-items:center;gap:7px;text-align:right;cursor:pointer}.iw-stat:hover{border-color:var(--primary);transform:translateY(-1px)}.iw-stat strong{font-size:1.25rem}.iw-stat.overdue strong{color:var(--danger)}.iw-stat.today strong{color:var(--primary)}
.iw-important,.iw-center-list{display:grid;gap:8px}.iw-card{display:grid;grid-template-columns:auto minmax(0,1fr) auto;gap:11px;align-items:center;border:1px solid var(--border);background:var(--surface);border-radius:15px;padding:11px 12px}.iw-card.overdue{border-color:color-mix(in srgb,var(--danger) 45%,var(--border))}.iw-card.urgent{box-shadow:inset -3px 0 var(--warning)}.iw-card-icon{width:36px;height:36px;display:grid;place-items:center;border-radius:12px;background:color-mix(in srgb,var(--primary) 13%,transparent);color:var(--primary);font-size:1.15rem}.iw-card-body{min-width:0}.iw-card-top{display:flex;align-items:center;gap:7px}.iw-card-top strong,.iw-card-note{overflow-wrap:anywhere}.iw-card-meta,.iw-card-note{font-size:.82rem;color:var(--text-muted);margin-top:4px}.iw-blocked{font-size:.8rem;color:var(--warning);margin-top:5px}.iw-card-actions{display:flex;align-items:center;gap:6px;flex-wrap:wrap;justify-content:flex-end}.iw-calm{text-align:center;color:var(--text-muted);padding:13px}.iw-all{margin-top:9px}.iw-center{width:min(850px,94vw);max-width:min(850px,94vw);max-height:88vh;display:flex;flex-direction:column;padding:0;overflow:hidden;border:1px solid color-mix(in srgb,var(--primary) 20%,var(--border))}.iw-center-head{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:20px 22px 16px;background:linear-gradient(135deg,color-mix(in srgb,var(--primary) 12%,var(--surface)),var(--surface));border-bottom:1px solid var(--border)}.iw-center-heading{display:flex;align-items:center;gap:12px;min-width:0}.iw-center-heading .modal-title{margin:0}.iw-center-heading-icon{width:44px;height:44px;display:grid;place-items:center;flex:none;border-radius:14px;background:color-mix(in srgb,var(--primary) 16%,var(--surface));color:var(--primary);font-size:1.3rem}.iw-center-tools{display:flex;align-items:center;gap:12px;padding:15px 22px 0}.iw-center-search{position:relative;flex:1;min-width:0}.iw-center-search>i{position:absolute;inset-inline-start:13px;top:50%;transform:translateY(-50%);color:var(--text-muted);pointer-events:none}.iw-center-search input{width:100%;min-width:0;min-height:44px;padding:9px 40px 9px 13px;border:1px solid var(--line-2);border-radius:12px;background:var(--sunken);color:var(--text);font:inherit}.iw-center-search input:focus{outline:0;border-color:var(--primary);box-shadow:0 0 0 3px var(--ring);background:var(--surface)}.iw-center-result{flex:none;color:var(--text-muted);font-size:.78rem;white-space:nowrap}.iw-filter-chips{margin:10px 22px 12px}.iw-center-list{overflow:auto;padding:0 22px 4px}.iw-center-list .iw-card{grid-template-columns:auto minmax(0,1fr);align-items:start;padding:14px 15px;gap:11px 12px}.iw-center-list .iw-card-actions{grid-column:1/-1;justify-content:flex-start;padding-top:9px;border-top:1px dashed var(--border)}.iw-center-list .iw-card-actions .btn-text,.iw-center-list .iw-card-actions .btn-row{min-height:38px}.iw-center-empty{display:grid;place-items:center;gap:5px;min-height:230px;padding:28px;text-align:center;color:var(--text-muted);border:1px dashed var(--border);border-radius:16px;background:color-mix(in srgb,var(--sunken) 72%,transparent)}.iw-center-empty i{font-size:2rem;color:var(--primary)}.iw-center-empty small{color:var(--text-muted)}.iw-center>.modal-actions{margin:12px 0 0;padding:12px 22px 18px;border-top:1px solid var(--border);background:color-mix(in srgb,var(--surface) 96%,transparent)}.iw-form-grid{display:grid;grid-template-columns:1fr 1fr;gap:9px;margin:12px 0}.iw-decision{width:min(520px,92vw)}.iw-decision-task{padding:12px 14px;border-radius:13px;background:color-mix(in srgb,var(--primary) 9%,var(--surface));font-weight:700;margin-bottom:10px}.iw-decision textarea{min-height:100px}.danger-text{color:var(--danger)!important}
.iw-head-actions{display:flex;align-items:center;gap:9px}.iw-card-note.clamp{display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}.iw-detail{width:min(620px,94vw)}.iw-detail-head{display:flex;align-items:center;gap:11px}.iw-detail-head .modal-title{margin:0}.iw-detail-body,.iw-detail-empty{margin:16px 0;padding:14px 16px;border-radius:14px;line-height:1.9;white-space:pre-wrap;overflow-wrap:anywhere}.iw-detail-body{background:color-mix(in srgb,var(--primary) 8%,var(--surface));border:1px solid color-mix(in srgb,var(--primary) 18%,var(--border))}.iw-detail-empty{background:var(--sunken);color:var(--text-muted)}.iw-detail-grid{display:grid;grid-template-columns:1fr 1fr;gap:8px}.iw-detail-line{display:grid;gap:3px;padding:9px 11px;border:1px solid var(--border);border-radius:12px}.iw-detail-line span{font-size:.76rem;color:var(--text-muted)}
@media(max-width:760px){.iw-hub{padding:12px;border-radius:17px}.iw-head{align-items:flex-start}.iw-head-actions{flex-wrap:wrap;justify-content:flex-end}.iw-stats{grid-template-columns:1fr 1fr}.iw-stat{padding:10px}.iw-card{grid-template-columns:auto minmax(0,1fr)}.iw-card-actions{grid-column:1/-1;justify-content:stretch}.iw-card-actions>*{flex:1;text-align:center}.iw-form-grid{grid-template-columns:1fr}.iw-center{padding:0!important;max-height:calc(100dvh - 16px)!important;border-radius:22px 22px 12px 12px}.iw-center-head{align-items:flex-start;padding:16px;gap:10px}.iw-center-heading-icon{width:40px;height:40px}.iw-center-create{flex:none;white-space:nowrap;padding-inline:12px}.iw-center-tools{padding:13px 16px 0;align-items:stretch;flex-direction:column;gap:6px}.iw-center-result{padding-inline:3px}.iw-filter-chips{margin:9px 16px 11px;overflow-x:auto;flex-wrap:nowrap}.iw-filter-chips>*{flex:0 0 auto}.iw-center-list{padding:0 16px 4px}.iw-center-list .iw-card{grid-template-columns:auto minmax(0,1fr);padding:13px}.iw-center-list .iw-card-actions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));justify-content:stretch}.iw-center-list .iw-card-actions>*{width:100%;min-width:0;text-align:center}.iw-center>.modal-actions{margin:10px 0 0!important;padding:11px 16px max(14px,env(safe-area-inset-bottom))!important}.iw-detail-grid{grid-template-columns:1fr}}
@media(max-width:430px){.iw-center-heading .hint{display:none}.iw-center-head{flex-wrap:wrap}.iw-center-create{width:100%}.iw-center-list .iw-card{grid-template-columns:1fr}.iw-center-list .iw-card-icon{display:none}.iw-center-list .iw-card-actions{grid-template-columns:1fr 1fr}.iw-center-list .iw-card-note{line-height:1.8}.iw-center-list .iw-card-meta{line-height:1.8}}

/* r98 — فرم ساخت کار: همان منطق r97 با ساختار دیداری استاندارد فراز؛ کنترل خام مرورگر عمداً ممنوع است. */
.iw-compose{width:min(680px,94vw);max-width:none;padding:0;overflow:auto;border:1px solid color-mix(in srgb,var(--primary) 22%,var(--border));background:var(--surface)}
.iw-compose-head{display:flex;align-items:center;gap:13px;padding:21px 22px 17px;background:linear-gradient(135deg,color-mix(in srgb,var(--primary) 13%,var(--surface)),var(--surface));border-bottom:1px solid var(--border)}
.iw-compose-head .modal-title{margin:0;font-size:1.16rem}.iw-compose-subtitle{margin-top:4px;color:var(--text-muted);font-size:.84rem;line-height:1.7}.iw-compose-icon{width:44px;height:44px;display:grid;place-items:center;flex:none;border-radius:14px;background:color-mix(in srgb,var(--primary) 18%,var(--surface));color:var(--primary);font-size:1.3rem;box-shadow:inset 0 0 0 1px color-mix(in srgb,var(--primary) 25%,transparent)}
.iw-compose-body{padding:20px 22px 4px}.iw-compose-grid{display:grid;grid-template-columns:1fr 1fr;gap:15px 13px}.iw-compose-field{min-width:0;margin:0}.iw-compose-field label{display:flex;align-items:center;min-height:20px;margin-bottom:7px;color:var(--text);font-size:.86rem;font-weight:700}.iw-compose-field input,.iw-compose-field select,.iw-compose-field textarea{width:100%;min-width:0;min-height:44px;padding:9px 12px;border:1px solid var(--line-2);border-radius:12px;background:color-mix(in srgb,var(--sunken) 72%,var(--surface));color:var(--text);font:inherit;line-height:1.6;transition:border-color .15s,box-shadow .15s,background .15s}.iw-compose-field textarea{min-height:92px;resize:vertical}.iw-compose-field input:hover,.iw-compose-field select:hover,.iw-compose-field textarea:hover{border-color:color-mix(in srgb,var(--primary) 45%,var(--line-2))}.iw-compose-field input:focus,.iw-compose-field select:focus,.iw-compose-field textarea:focus{outline:0;border-color:var(--primary);background:var(--surface);box-shadow:0 0 0 3px var(--ring)}.iw-compose-field select:disabled{opacity:.72;cursor:not-allowed}.iw-compose-field input::placeholder,.iw-compose-field textarea::placeholder{color:var(--text-muted);opacity:.75}.iw-compose-wide{grid-column:1/-1}.iw-compose-help{display:block;margin-top:6px;color:var(--text-muted);font-size:.74rem;line-height:1.55}.iw-compose-tip{display:flex;align-items:flex-start;gap:8px;margin-top:16px;padding:10px 12px;border-radius:12px;background:color-mix(in srgb,var(--primary) 8%,var(--surface));color:var(--text-muted);font-size:.78rem;line-height:1.7}.iw-compose-tip i{margin-top:3px;color:var(--primary);flex:none}.iw-compose-error{margin:9px 0 0;min-height:18px}.iw-compose-actions{position:sticky;bottom:0;margin:12px 0 0;padding:14px 22px 18px;background:color-mix(in srgb,var(--surface) 94%,transparent);border-top:1px solid var(--border);backdrop-filter:blur(10px)}.iw-compose-actions .btn{min-width:104px;justify-content:center}
.iw-group-toggle{display:flex;align-items:center;gap:9px;padding:11px 13px;border:1px solid color-mix(in srgb,var(--primary) 24%,var(--border));border-radius:13px;background:color-mix(in srgb,var(--primary) 6%,var(--surface));font-weight:800;cursor:pointer}.iw-group-toggle input{width:19px;height:19px;accent-color:var(--primary)}.iw-recipient-picker{display:grid;gap:10px;margin-top:10px;padding:12px;border:1px solid var(--border);border-radius:15px;background:var(--sunken)}.iw-recipient-picker[hidden]{display:none}.iw-recipient-picker>input{width:100%;min-height:44px;border:1px solid var(--line-2);border-radius:11px;padding:8px 11px;background:var(--surface);color:var(--text)}.iw-recipient-selected{display:flex;gap:6px;align-items:center;flex-wrap:wrap}.iw-recipient-selected strong{margin-inline-end:4px}.iw-recipient-selected span{display:inline-flex;align-items:center;gap:5px;padding:5px 8px;border-radius:999px;background:color-mix(in srgb,var(--primary) 13%,var(--surface));color:var(--primary);font-size:.76rem}.iw-recipient-selected button{border:0;background:none;color:inherit;font-size:1rem;cursor:pointer}.iw-recipient-choices{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:7px;max-height:230px;overflow:auto}.iw-recipient-choice{display:grid;grid-template-columns:auto minmax(0,1fr) auto;align-items:center;gap:7px;min-width:0;padding:9px 10px;border:1px solid var(--border);border-radius:11px;background:var(--surface);color:var(--text);font:inherit;text-align:right;cursor:pointer}.iw-recipient-choice span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.iw-recipient-choice small{color:var(--text-muted);white-space:nowrap}.iw-recipient-choice.active{border-color:var(--primary);background:color-mix(in srgb,var(--primary) 10%,var(--surface));color:var(--primary)}.iw-batch-progress{position:relative;height:7px;margin-top:9px;border-radius:999px;background:var(--sunken)}.iw-batch-progress>span{display:block;height:100%;border-radius:inherit;background:var(--ok)}.iw-batch-progress small{display:block;margin-top:6px;color:var(--text-muted)}.iw-batch-members{display:grid;gap:7px;margin:12px 0}.iw-batch-members>div{display:flex;justify-content:space-between;gap:10px;padding:9px 11px;border:1px solid var(--border);border-radius:11px}.iw-batch-status{color:var(--text-muted)}.iw-batch-status.done{color:var(--ok)}.iw-batch-status.blocked{color:var(--warning)}
@media(max-width:760px){.iw-compose-overlay{align-items:flex-end;padding:12px}.iw-compose{width:100%;max-height:calc(100dvh - 24px);border-radius:20px}.iw-compose-head{padding:17px 16px 14px}.iw-compose-body{padding:16px 16px 2px}.iw-compose-grid{grid-template-columns:1fr;gap:12px}.iw-compose-wide{grid-column:auto}.iw-compose-actions{padding:12px 16px 16px}.iw-compose-actions .btn{flex:1}.iw-compose-subtitle{font-size:.79rem}}
@media(max-width:560px){.iw-recipient-choices{grid-template-columns:1fr}.iw-recipient-choice small{font-size:.7rem}}

/* r100 — تحویل گروهی مسئولیت تولید: فرم تصمیم‌محور، پیش‌نمایش دقیق و موبایل واقعی. */
.handoff-modal{width:min(760px,95vw);max-width:none;max-height:90vh;overflow:auto;padding:0;border:1px solid color-mix(in srgb,var(--primary) 24%,var(--border))}
.handoff-head{display:flex;align-items:center;gap:13px;padding:20px 22px 16px;background:linear-gradient(135deg,color-mix(in srgb,var(--primary) 12%,var(--surface)),var(--surface));border-bottom:1px solid var(--border)}
.handoff-head .modal-title{margin:0}.handoff-head-icon{width:44px;height:44px;display:grid;place-items:center;flex:none;border-radius:14px;background:color-mix(in srgb,var(--primary) 17%,var(--surface));color:var(--primary);font-size:1.3rem}
.handoff-grid{display:grid;grid-template-columns:1fr 1fr;gap:13px;padding:18px 22px 4px}.handoff-grid .field{min-width:0;margin:0}.handoff-grid select,.handoff-grid textarea{width:100%;min-width:0}.handoff-wide{grid-column:1/-1}
.handoff-type-picks{display:flex;flex-wrap:wrap;gap:8px}.handoff-check{display:flex;align-items:center;gap:7px;padding:8px 12px;border:1px solid var(--border);border-radius:999px;background:var(--sunken);cursor:pointer}.handoff-check:has(input:checked){border-color:var(--primary);background:color-mix(in srgb,var(--primary) 12%,var(--surface));color:var(--primary)}.handoff-check input{width:17px;height:17px;margin:0}
.handoff-options{display:grid;grid-template-columns:1fr 1fr;gap:8px}.handoff-option{display:flex;align-items:center;gap:8px;padding:11px 12px;border:1px solid var(--border);border-radius:12px;background:var(--sunken);cursor:pointer}.handoff-option[hidden]{display:none}.handoff-option input{width:18px;height:18px;flex:none}
.handoff-preview{margin:14px 22px 4px;padding:13px;border:1px solid color-mix(in srgb,var(--primary) 22%,var(--border));border-radius:14px;background:color-mix(in srgb,var(--primary) 6%,var(--surface));min-height:62px}.handoff-preview-head{display:flex;align-items:center;justify-content:space-between;gap:10px}.handoff-preview-head strong,.handoff-preview-head small{display:block}.handoff-preview-head small{margin-top:3px;color:var(--text-muted)}.handoff-preview-list{display:grid;gap:6px;margin-top:10px}.handoff-preview-list>div{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:8px 10px;border-radius:10px;background:var(--surface)}.handoff-preview-list span{min-width:0;overflow-wrap:anywhere}.handoff-preview-list small{flex:none;color:var(--text-muted)}.handoff-skip{margin-top:9px;color:var(--warning);font-size:.8rem}.handoff-modal>.field-err{padding:0 22px}.handoff-modal>.modal-actions{position:sticky;bottom:0;margin-top:10px;padding:14px 22px 18px;background:color-mix(in srgb,var(--surface) 94%,transparent);border-top:1px solid var(--border);backdrop-filter:blur(10px)}
@media(max-width:700px){.handoff-overlay{align-items:flex-end;padding:10px}.handoff-modal{width:100%;max-height:calc(100dvh - 20px);border-radius:20px}.handoff-head{padding:17px 16px 14px}.handoff-grid{grid-template-columns:1fr;padding:15px 16px 2px}.handoff-wide{grid-column:auto}.handoff-options{grid-template-columns:1fr}.handoff-preview{margin:12px 16px 2px}.handoff-preview-list>div{align-items:flex-start;flex-direction:column;gap:2px}.handoff-preview-list small{flex:auto}.handoff-modal>.field-err{padding:0 16px}.handoff-modal>.modal-actions{padding:12px 16px 16px}.handoff-modal>.modal-actions .btn{flex:1}}
/* r101 — راهنمای اجرای پیج؛ فشرده در صفحه، خوانا در bottom-sheet موبایل. */
.page-guide-card{padding:0!important;margin:12px 0;overflow:hidden}.page-guide-summary{width:100%;border:0;background:linear-gradient(135deg,color-mix(in srgb,var(--primary) 12%,var(--surface)),color-mix(in srgb,var(--ok) 7%,var(--surface)));color:var(--text);display:flex;align-items:center;gap:12px;padding:16px 18px;text-align:right;cursor:pointer}.page-guide-summary:hover{background:linear-gradient(135deg,color-mix(in srgb,var(--primary) 18%,var(--surface)),color-mix(in srgb,var(--ok) 10%,var(--surface)))}.page-guide-icon{width:42px;height:42px;border-radius:14px;background:color-mix(in srgb,var(--primary) 16%,var(--surface));color:var(--primary);display:grid;place-items:center;font-size:22px;flex:0 0 auto}.page-guide-copy{display:flex;flex-direction:column;gap:3px;min-width:0}.page-guide-copy small{color:var(--text-muted)}.page-guide-open{margin-inline-start:auto;color:var(--primary);white-space:nowrap}.page-guide-modal{width:min(720px,calc(100vw - 24px));max-height:min(82vh,760px);overflow:auto}.page-guide-list{display:grid;gap:8px;margin:14px 0}.page-rule-group-title{font-weight:800;color:var(--text-muted);margin-top:8px}.page-rule-row{border:1px solid var(--border);border-radius:14px;padding:12px 14px;display:flex;gap:12px;align-items:flex-start;background:color-mix(in srgb,var(--surface) 98%,var(--text))}.page-rule-row.mandatory{border-inline-start:4px solid var(--warn);background:color-mix(in srgb,var(--warn) 6%,var(--surface))}.page-rule-row-main{min-width:0;flex:1}.page-rule-row p{margin:6px 0;white-space:pre-wrap;line-height:1.7}.page-rule-row small{color:var(--text-muted)}.page-rule-actions{display:flex;gap:4px;flex-wrap:wrap}.page-rule-chip{display:inline-flex;align-items:center;gap:5px;border:1px solid color-mix(in srgb,var(--primary) 28%,var(--border));border-radius:999px;padding:4px 9px;margin-top:6px;background:color-mix(in srgb,var(--primary) 8%,var(--surface));color:var(--primary);font:inherit;font-size:12px;cursor:pointer}.page-rule-chip.mandatory{border-color:color-mix(in srgb,var(--warn) 45%,var(--border));color:var(--warn);background:color-mix(in srgb,var(--warn) 8%,var(--surface))}.page-rule-mini{display:grid;gap:8px;margin:14px 0}.page-rule-mini-title{font-weight:800}.page-rule-mini-row{padding:10px 12px;border-radius:12px;background:var(--surface);display:grid;gap:5px}.page-rule-mini-row.mandatory{border-inline-start:3px solid var(--warn)}.page-rule-mini-row span{white-space:pre-wrap;line-height:1.6}.page-rule-types{display:flex;gap:8px;flex-wrap:wrap}.page-rule-type{display:flex;gap:6px;align-items:center;border:1px solid var(--border);border-radius:10px;padding:8px 10px}.btn-text.ok{color:var(--ok)}.btn-text.danger{color:var(--danger)}
@media(max-width:640px){.page-guide-summary{padding:13px}.page-guide-open{font-size:12px}.page-guide-modal{position:fixed;inset:auto 0 0;width:100%;max-width:none;max-height:88dvh;border-radius:22px 22px 0 0;padding-bottom:max(18px,env(safe-area-inset-bottom))}.page-rule-row{display:block}.page-rule-actions{margin-top:8px}.page-guide-copy small{white-space:normal}}

/* r102 — بانک متقاضیان: کارت‌محور، کم‌تراکم و بدون جدول افقی در موبایل */
.applicant-head{display:flex;align-items:flex-start;justify-content:space-between;gap:18px;margin-bottom:18px}.applicant-head-actions{display:flex;gap:8px;flex-wrap:wrap}.applicant-stats{display:grid;grid-template-columns:repeat(4,minmax(130px,1fr));gap:10px;margin-bottom:14px}.applicant-stat{border:1px solid var(--line);background:var(--surface);color:var(--text);border-radius:16px;padding:14px;text-align:right;display:grid;grid-template-columns:auto 1fr;gap:3px 9px;cursor:pointer;transition:.16s}.applicant-stat:hover,.applicant-stat.active{border-color:var(--primary);transform:translateY(-1px);box-shadow:0 8px 24px rgba(30,108,143,.09)}.applicant-stat i{grid-row:1/3;font-size:21px;color:var(--primary)}.applicant-stat strong{font-size:22px;line-height:1}.applicant-stat span{font-size:12px;color:var(--ink-3)}.applicant-toolbar{display:grid;grid-template-columns:minmax(220px,1fr) minmax(180px,280px) auto;gap:9px;align-items:center;margin:0 0 14px}.applicant-search,.applicant-select{width:100%;min-height:44px}.applicant-result{color:var(--ink-3);font-size:12px;white-space:nowrap}.applicant-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}.applicant-card{appearance:none;text-align:right;color:var(--text);background:var(--surface);border:1px solid var(--line);border-radius:18px;padding:16px;cursor:pointer;min-width:0;transition:.16s}.applicant-card:hover{border-color:rgba(46,157,197,.6);box-shadow:0 10px 30px rgba(15,50,70,.09);transform:translateY(-2px)}.applicant-card-top{display:flex;gap:10px;align-items:center}.applicant-avatar{width:38px;height:38px;border-radius:13px;background:var(--primary);display:grid;place-items:center;color:var(--surface);font-weight:800;flex:0 0 auto}.applicant-avatar.big{width:52px;height:52px;font-size:20px}.applicant-name-wrap{min-width:0;flex:1}.applicant-name{font-size:15px;font-weight:800;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.applicant-sub{font-size:12px;color:var(--ink-3);direction:ltr;text-align:right}.applicant-status{border-radius:999px;padding:5px 9px;font-size:10px;white-space:nowrap;background:var(--sunken)}.applicant-status.green,.applicant-status.teal{color:var(--ok);background:var(--ok-soft)}.applicant-status.amber{color:var(--warn);background:var(--warn-soft)}.applicant-status.red{color:var(--danger);background:var(--danger-soft)}.applicant-status.violet{color:var(--brass);background:var(--warn-soft)}.applicant-status.blue{color:var(--primary);background:var(--primary-soft)}.applicant-jobs{display:flex;gap:6px;flex-wrap:wrap;margin:12px 0}.applicant-job{font-size:10px;padding:4px 8px;border-radius:999px;background:var(--sunken);color:var(--ink-2)}.applicant-job.muted{color:var(--ink-3)}.applicant-meta{display:flex;justify-content:space-between;gap:8px;color:var(--ink-3);font-size:11px}.applicant-meta span{display:flex;gap:4px;align-items:center}.applicant-meta .due-over{color:var(--danger)}.applicant-excerpt{font-size:11px;color:var(--ink-2);line-height:1.8;margin-top:10px;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}.applicant-empty{display:flex;flex-direction:column;gap:7px;align-items:center}.applicant-empty i{font-size:30px;color:var(--primary)}.applicant-form-grid{display:grid;grid-template-columns:1fr 1fr;gap:0 12px}.applicant-form-grid .wide{grid-column:1/-1}.applicant-modal{width:min(780px,calc(100vw - 28px));max-height:90vh;overflow:auto}.applicant-job-picker{display:flex;gap:7px;flex-wrap:wrap;padding:10px;border:1px solid var(--line);border-radius:12px}.job-choice{border:1px solid var(--line);background:var(--surface);color:var(--ink-2);padding:7px 10px;border-radius:999px;cursor:pointer}.job-choice.active{color:var(--primary);border-color:var(--primary);background:var(--primary-soft)}.applicant-detail{width:min(720px,calc(100vw - 28px));max-height:90vh;overflow:auto}.applicant-detail-head{display:flex;align-items:center;gap:12px}.applicant-detail-head>div:nth-child(2){flex:1}.applicant-facts{display:grid;grid-template-columns:repeat(3,1fr);gap:8px;margin:14px 0}.applicant-facts>div{background:var(--sunken);border-radius:12px;padding:10px;color:var(--ink-3);font-size:10px}.applicant-facts b{display:block;color:var(--text);font-size:12px;margin-top:4px}.applicant-note{border:1px solid var(--line);border-radius:13px;padding:12px;margin-top:10px}.applicant-note.private{border-color:var(--warn);background:var(--warn-soft)}.applicant-note p{white-space:pre-wrap;line-height:1.8;margin:5px 0 0;color:var(--ink-2)}.applicant-links,.applicant-detail-actions{display:flex;gap:8px;flex-wrap:wrap;margin-top:12px}.applicant-links a{color:var(--primary);font-size:12px}.applicant-timeline-title{font-weight:800;margin-top:18px;padding-top:15px;border-top:1px solid var(--line)}.applicant-timeline{margin-top:8px}.applicant-event{display:grid;grid-template-columns:12px 1fr;gap:8px;padding:8px 0}.event-dot{width:8px;height:8px;border-radius:50%;background:var(--primary);margin-top:5px}.applicant-event b,.applicant-event small{display:block}.applicant-event small{color:var(--ink-3);font-size:10px;margin-top:3px}
@media(max-width:1100px){.applicant-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.applicant-stats{grid-template-columns:repeat(3,minmax(120px,1fr))}}
@media(max-width:720px){.applicant-head{display:block}.applicant-head-actions{margin-top:12px;display:grid;grid-template-columns:1fr 1fr}.applicant-head-actions .btn-primary{grid-column:1/-1}.applicant-stats{display:flex;overflow-x:auto;scroll-snap-type:x mandatory;padding-bottom:5px;margin-inline:-4px}.applicant-stat{min-width:128px;scroll-snap-align:start}.applicant-toolbar{grid-template-columns:1fr}.applicant-result{display:none}.applicant-grid{grid-template-columns:1fr}.applicant-card{padding:14px}.applicant-form-grid{grid-template-columns:1fr}.applicant-form-grid .wide{grid-column:auto}.applicant-modal,.applicant-detail{width:calc(100vw - 16px);max-height:94vh;border-radius:18px}.applicant-facts{grid-template-columns:1fr 1fr}.applicant-detail-actions .btn{flex:1}.applicant-status{font-size:9px}.applicant-meta{flex-wrap:wrap}}

/* r103 — قرارداد یکپارچهٔ واکنش‌گرایی پیش از PWA.
   این لایه فقط نمایش را اصلاح می‌کند: هیچ مسیر داده، اکشن یا محاسبه‌ای تغییر نمی‌کند. */
@media (max-width:1024px) {
  /* فضای امن دستگاه و کنترل‌های لمسی؛ برای وب معمولی هم مفید است و وابستگی PWA ندارد. */
  .mobilebar {
    min-height:56px;
    padding-top:max(9px,env(safe-area-inset-top));
    padding-inline:max(14px,env(safe-area-inset-left)) max(14px,env(safe-area-inset-right));
  }
  .sidebar {
    padding-top:max(var(--s6),env(safe-area-inset-top));
    padding-bottom:max(var(--s6),env(safe-area-inset-bottom));
  }
  .nav-toggle,.theme-toggle,.notif-bell { width:44px; height:44px; min-width:44px; min-height:44px; }
  .btn { min-height:44px; height:auto; padding-block:8px; }
  .explain-num { display:inline-flex; align-items:center; justify-content:center; min-width:32px; min-height:44px; }
  .field input,.field select,.crm-note-form input,.crm-note-form select { min-height:44px; }

  /* ردیف‌های عملیاتی در تبلت: متن هرگز زیر انبوه دکمه‌ها له نمی‌شود. */
  .row { flex-wrap:wrap; align-items:flex-start; }
  .row-info { flex:1 1 270px; max-width:100%; align-items:flex-start; }
  .row-badges { flex:0 1 auto; max-width:100%; margin-inline:0; }
  .row-actions { flex:1 1 100%; width:100%; flex-wrap:wrap; justify-content:flex-end; margin-top:6px; }
  .row-actions > * { max-width:100%; }
  .people-row { display:grid; grid-template-columns:minmax(0,1fr) auto; gap:10px 12px; }
  .people-row .row-info { width:100%; }
  .people-row .row-badges { align-self:start; }
  .people-row .row-actions { grid-column:1/-1; margin-top:0; padding-top:8px; border-top:1px dashed var(--line); }
  .people-row .btn-text { min-height:40px; }

  /* همهٔ فرزندان flex/grid اجازهٔ جمع‌شدن دارند؛ خود عددها شکسته نمی‌شوند. */
  .main :where(.page-head,.head-actions,.row,.row-info,.row-actions,.dash-section,.card,.list,.modal-card) > * { min-width:0; }
  .tnum,.dash-stat-v,.dash-fin-v,.staff-card-money,.fin-pos,.fin-neg { font-variant-numeric:tabular-nums; }

  /* پنجره‌ها در تبلت از صفحه بیرون نمی‌زنند و نوار عمل همیشه در دسترس است. */
  .modal-overlay {
    padding:max(12px,env(safe-area-inset-top)) max(12px,env(safe-area-inset-right)) max(12px,env(safe-area-inset-bottom)) max(12px,env(safe-area-inset-left));
  }
  .modal-card { overscroll-behavior:contain; scrollbar-gutter:stable; }
  .modal-actions { flex-wrap:wrap; z-index:2; }
  .modal-actions .btn { flex:0 1 auto; }

  /* نوارهای انتخاب و تب فقط در خودشان اسکرول می‌شوند، نه کل صفحه. */
  .seg,.money-tabs,.tk-chips,.months-strip,.mf-presets,.mf-typebar {
    max-width:100%; overflow-x:auto; overflow-y:hidden; flex-wrap:nowrap; scrollbar-width:thin;
    -webkit-overflow-scrolling:touch; scroll-snap-type:x proximity;
  }
  .seg > *,.money-tabs > *,.tk-chips > *,.months-strip > *,.mf-presets > *,.mf-typebar > * { flex:0 0 auto; scroll-snap-align:start; }

  .handoff-row { grid-template-columns:minmax(0,1fr); }
  .offboard-summary,.staff-ledger-summary { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .today-page-grid { grid-template-columns:repeat(auto-fit,minmax(min(280px,100%),1fr)); }
}

@media (max-width:720px) {
  /* صفحه و bottom-sheet با صفحه‌کلید و نوارهای سیستم هم‌زیست می‌مانند. */
  .main {
    padding-inline:max(14px,env(safe-area-inset-left)) max(14px,env(safe-area-inset-right));
    padding-bottom:max(20px,env(safe-area-inset-bottom));
  }
  .page-head { align-items:stretch; gap:12px; }
  .page-head > *,.head-actions { width:100%; }
  .head-actions { justify-content:flex-start; }
  .head-actions .btn { flex:1 1 140px; }
  .modal-overlay { align-items:flex-end; padding:8px; }
  .modal-card {
    width:100% !important; max-width:none !important; max-height:calc(100dvh - max(16px,env(safe-area-inset-top)));
    border-radius:22px 22px 12px 12px; padding:18px 16px max(16px,env(safe-area-inset-bottom));
  }
  .modal-actions { bottom:calc(0px - max(16px,env(safe-area-inset-bottom))); margin-inline:-16px; padding-inline:16px; padding-bottom:max(16px,env(safe-area-inset-bottom)); }
  .modal-actions .btn { flex:1 1 130px; }

  .row-info { flex-basis:100%; width:100%; }
  .row-badges { width:100%; flex-direction:row; flex-wrap:wrap; align-items:center; }
  .row-actions { justify-content:stretch; }
  .row-actions .btn,.row-actions .btn-text { flex:1 1 112px; min-height:44px; text-align:center; }
  .people-row { grid-template-columns:minmax(0,1fr); }
  .people-row .row-badges,.people-row .row-actions { grid-column:1; }

  /* جدول‌های چهارستونه به دو ستون خوانا تبدیل می‌شوند؛ داده‌ای حذف نمی‌شود. */
  .fin-row { grid-template-columns:minmax(0,1fr) minmax(96px,auto); gap:7px 12px; padding:12px; }
  .fin-row > * { overflow-wrap:normal; word-break:normal; }
  .fin-head { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .fin-contract-summary,.fin-contract-head,.acct-history-row,.prof-row,.pay-row { align-items:flex-start; flex-wrap:wrap; }
  .prof-l { white-space:normal; }
  .prof-v { flex:1 1 100%; text-align:right; }
  .offboard-summary,.staff-ledger-summary { grid-template-columns:1fr; }
  .jcal-pop { max-width:calc(100vw - 24px); }
}

@media (max-width:430px) {
  .page-title { font-size:clamp(21px,7vw,var(--fs-xl)); }
  .dash-stat,.dash-fin-item,.staff-account-card { padding:13px; }
  .dash-stat-v,.dash-fin-v,.staff-card-money { font-size:clamp(18px,6vw,24px); }
  .applicant-facts { grid-template-columns:1fr; }
  .applicant-head-actions { grid-template-columns:1fr; }
  .applicant-head-actions .btn-primary { grid-column:auto; }
}

@media (hover:none) and (pointer:coarse) {
  .nav-item,.menu-item,.ss-opt { min-height:44px; }
  .row-clickable,.health-tile,.request-status-card,.staff-account-card,.applicant-card { touch-action:manipulation; }
}
/* r104 — نصب و اعلان PWA: کارت‌های کوتاه، لمسی و پاسخ‌گو؛ نه فرمِ فنی و بلند. */
.pwa-intro{display:flex;align-items:center;gap:14px;margin-bottom:16px}.pwa-logo-wrap{flex:0 0 auto}.pwa-logo{width:64px;height:64px;border-radius:16px;display:block;box-shadow:0 8px 24px rgba(55,13,113,.26)}
.pwa-status-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}.pwa-status-card{display:grid;grid-template-columns:auto minmax(0,1fr) auto;align-items:center;gap:12px;border:1px solid var(--line);background:var(--sunken);border-radius:16px;padding:14px}.pwa-status-card>i{font-size:24px;color:var(--primary)}.pwa-status-card strong,.pwa-status-card span{display:block}.pwa-status-card span{color:var(--ink-3);font-size:12px;margin-top:3px}.pwa-actions{display:flex;align-items:center;gap:8px}.pwa-privacy{display:flex;align-items:flex-start;gap:8px;color:var(--ink-3);font-size:12px;line-height:1.9;margin-top:14px}.pwa-privacy i{font-size:18px;color:var(--ok)}
.pwa-feedback{display:flex;align-items:flex-start;gap:9px;margin-top:12px;padding:11px 13px;border:1px solid color-mix(in srgb,var(--primary) 35%,var(--line));border-radius:12px;background:color-mix(in srgb,var(--primary) 8%,var(--surface));font-size:12px;line-height:1.9}.pwa-feedback i{flex:0 0 auto;font-size:18px;margin-top:2px}.pwa-feedback.info{color:var(--primary)}.pwa-feedback.success{color:var(--ok);border-color:color-mix(in srgb,var(--ok) 38%,var(--line));background:color-mix(in srgb,var(--ok) 8%,var(--surface))}.pwa-feedback.warn{color:var(--warn);border-color:color-mix(in srgb,var(--warn) 38%,var(--line));background:color-mix(in srgb,var(--warn) 8%,var(--surface))}.pwa-feedback.error{color:var(--danger);border-color:color-mix(in srgb,var(--danger) 38%,var(--line));background:color-mix(in srgb,var(--danger) 8%,var(--surface))}
@media(max-width:720px){.pwa-status-grid{grid-template-columns:1fr}.pwa-status-card{grid-template-columns:auto minmax(0,1fr);padding:14px}.pwa-status-card>.btn,.pwa-status-card>.pwa-actions{grid-column:1/-1;width:100%}.pwa-status-card>.btn{justify-content:center}.pwa-actions .btn{flex:1}.pwa-intro{align-items:flex-start}.pwa-logo{width:56px;height:56px}}

/* r105 — مدارک خصوصی، روی همان پرونده و بدون منوی تازه. */
.record-doc-entry{width:100%;display:grid;grid-template-columns:auto minmax(0,1fr) auto auto;align-items:center;gap:12px;margin-top:12px;text-align:right;color:var(--ink);cursor:pointer;border-color:color-mix(in srgb,var(--primary) 24%,var(--line))}.record-doc-entry:hover{border-color:var(--primary);background:color-mix(in srgb,var(--primary) 5%,var(--surface))}.record-doc-icon{display:grid;place-items:center;width:42px;height:42px;border-radius:13px;background:color-mix(in srgb,var(--primary) 12%,var(--surface));color:var(--primary);font-size:23px}.record-doc-copy strong,.record-doc-copy small{display:block}.record-doc-copy small{color:var(--ink-3);font-size:12px;margin-top:3px}.doc-count{min-width:30px;text-align:center;border-radius:999px;padding:3px 8px;background:var(--sunken);color:var(--primary);font-weight:800}
.record-doc-modal{max-width:820px}.record-doc-head{display:flex;align-items:flex-start;justify-content:space-between;gap:14px;margin-bottom:14px}.record-doc-head-actions{display:flex;gap:8px;flex-wrap:wrap}.record-doc-row{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:14px;padding:15px;margin-bottom:10px;border:1px solid var(--line);border-radius:16px;background:var(--sunken)}.record-doc-row.archived{opacity:.68}.record-doc-main strong{display:block;font-size:15px;margin:7px 0}.record-doc-main p{margin:8px 0 0;color:var(--ink-2);font-size:13px;line-height:1.9}.record-doc-type{display:inline-flex;border-radius:999px;padding:3px 9px;background:color-mix(in srgb,var(--primary) 10%,var(--surface));color:var(--primary);font-size:11px}.record-doc-meta{color:var(--ink-3);font-size:12px;line-height:1.8}.record-doc-actions{display:flex;flex-direction:column;align-items:stretch;justify-content:center;gap:3px;min-width:112px}.record-doc-actions .btn-text{text-align:center;min-height:36px}.danger-text{color:var(--danger)!important}.doc-expired{display:inline-block;color:var(--danger);font-size:11px;margin-top:7px}.doc-form-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.doc-drop{position:relative;display:grid;place-items:center;gap:4px;border:1px dashed color-mix(in srgb,var(--primary) 45%,var(--line));border-radius:15px;padding:17px;margin:8px 0;color:var(--primary);cursor:pointer;background:color-mix(in srgb,var(--primary) 5%,var(--surface))}.doc-drop i{font-size:25px}.doc-drop small{color:var(--ink-3)}.doc-drop input{position:absolute;inset:0;opacity:0;cursor:pointer}.doc-version-list{display:grid;gap:8px}.doc-version{width:100%;display:flex;align-items:center;justify-content:space-between;gap:12px;text-align:right;padding:13px;border:1px solid var(--line);border-radius:13px;background:var(--sunken);color:var(--ink);cursor:pointer}.doc-version:hover{border-color:var(--primary)}.doc-version strong,.doc-version small{display:block}.doc-version small{color:var(--ink-3);font-size:11px;margin-top:4px}.doc-version-meta{display:flex;align-items:center;gap:7px;white-space:nowrap;color:var(--primary)}
@media(max-width:720px){.record-doc-head{align-items:stretch;flex-direction:column}.record-doc-head-actions{display:grid;grid-template-columns:1fr 1fr}.record-doc-row{grid-template-columns:1fr}.record-doc-actions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));min-width:0}.doc-form-grid{grid-template-columns:1fr}.record-doc-entry{grid-template-columns:auto minmax(0,1fr) auto}.record-doc-entry>i:last-child{display:none}.doc-version{align-items:flex-start}.doc-version-meta{flex-direction:column;align-items:flex-end}}

/* r111 — نمای روزِ محدودِ سرپرست، بدون فشرده‌شدن و بدون کنترل‌های برنامه‌ریز. */
@media(max-width:820px){
  .pl-scoped-stats{grid-template-columns:repeat(2,minmax(0,1fr))}
  .pl-scoped-card{grid-template-columns:94px minmax(0,1fr)}
  .pl-scoped-actions{grid-column:1/-1;display:grid;grid-template-columns:repeat(3,minmax(0,1fr))}
  .pl-scoped-actions .btn{width:100%;min-width:0;white-space:normal}
}
@media(max-width:520px){
  .pl-scoped-daychips{margin-inline:-4px}.pl-scoped-daychips .pl-daychip{flex:0 0 auto;min-height:40px}
  .pl-scoped-card{grid-template-columns:1fr;padding:13px;gap:10px}
  .pl-scoped-time{display:flex;align-items:center;justify-content:space-between;text-align:right}
  .pl-scoped-actions{grid-column:auto;grid-template-columns:1fr 1fr}
  .pl-scoped-actions .btn-primary{grid-column:1/-1;grid-row:1}
}

/* r106 — اسکرول فیلترهای مرکز کار روی موبایل بدون نوار مزاحم. */
.iw-filter-chips{scrollbar-width:none;-ms-overflow-style:none}.iw-filter-chips::-webkit-scrollbar{display:none}

/* r113 — فیلتر دو‌بعدیِ کارها و پنجرهٔ خوانای ثبت نتیجه؛ مشترک برای همهٔ نقش‌ها. */
.iw-center-filters{display:grid;gap:8px;padding:10px 22px 12px}
.iw-filter-section{display:grid;grid-template-columns:86px minmax(0,1fr);align-items:center;gap:10px;min-width:0}
.iw-filter-label{font-size:.76rem;color:var(--text-muted);font-weight:700}
.iw-center-filters .iw-filter-chips{margin:0;min-width:0}
.iw-center-filters .tk-chip{display:inline-flex;align-items:center;gap:7px}
.iw-center-filters .tk-chip b{display:grid;place-items:center;min-width:22px;height:22px;padding:0 6px;border-radius:999px;background:color-mix(in srgb,var(--text-muted) 12%,transparent);font-size:.72rem}
.iw-center-filters .tk-chip.active b{background:color-mix(in srgb,var(--surface) 34%,transparent);color:inherit}
.iw-decision{width:min(560px,94vw);max-width:min(560px,94vw);padding:0;overflow:hidden}
.iw-decision-head{display:flex;align-items:flex-start;gap:12px;padding:20px 22px 16px;background:linear-gradient(135deg,color-mix(in srgb,var(--primary) 10%,var(--surface)),var(--surface));border-bottom:1px solid var(--border)}
.iw-decision-head .modal-title{margin:0 0 3px}.iw-decision-icon{width:43px;height:43px;display:grid;place-items:center;flex:none;border-radius:14px;background:var(--primary-soft);color:var(--primary);font-size:1.25rem}
.iw-decision.blocked .iw-decision-icon{background:color-mix(in srgb,var(--warning) 14%,var(--surface));color:var(--warning)}
.iw-decision.cancelled .iw-decision-icon{background:color-mix(in srgb,var(--danger) 13%,var(--surface));color:var(--danger)}
.iw-decision-summary{margin:16px 22px 0;padding:14px 15px;border:1px solid var(--border);border-radius:15px;background:color-mix(in srgb,var(--sunken) 76%,var(--surface))}
.iw-decision-summary strong{display:block;font-size:1rem;line-height:1.7;overflow-wrap:anywhere}.iw-decision-summary p{margin:6px 0 0;color:var(--text-muted);font-size:.84rem;line-height:1.8;white-space:pre-wrap;overflow-wrap:anywhere}
.iw-decision-meta{display:flex;flex-wrap:wrap;gap:6px;margin-top:10px}.iw-decision-meta span{padding:4px 8px;border-radius:999px;background:var(--surface);border:1px solid var(--border);color:var(--text-muted);font-size:.75rem}
.iw-decision-field{margin:14px 22px 0}.iw-decision-label,.iw-decision-foot{display:flex;align-items:center;justify-content:space-between;gap:10px}.iw-decision-label{margin-bottom:7px}.iw-decision-label label{font-weight:700}.iw-decision-label small{color:var(--text-muted)}
.iw-decision-field textarea{display:block;width:100%;min-width:0;min-height:118px;max-height:220px;padding:12px 13px;border:1px solid var(--line-2);border-radius:14px;background:var(--sunken);color:var(--text);font:inherit;line-height:1.9;resize:vertical}
.iw-decision-field textarea:focus{outline:0;border-color:var(--primary);box-shadow:0 0 0 3px var(--ring);background:var(--surface)}
.iw-decision-foot{margin-top:7px;color:var(--text-muted)}.iw-decision-foot small{line-height:1.6}.iw-decision-count{font-size:.72rem;white-space:nowrap}.iw-decision-error{min-height:20px;margin:7px 22px 0}
.iw-decision-actions{margin:8px 0 0!important;padding:13px 22px 18px!important;border-top:1px solid var(--border);background:color-mix(in srgb,var(--surface) 96%,transparent)}
@media(max-width:760px){
  .iw-center-filters{padding:9px 16px 11px}.iw-filter-section{grid-template-columns:1fr;gap:5px}.iw-center-filters .iw-filter-chips{overflow-x:auto;flex-wrap:nowrap;padding-bottom:3px}.iw-center-filters .iw-filter-chips>*{flex:0 0 auto}
  .iw-decision-overlay{align-items:flex-end;padding:8px}.iw-decision{width:100%;max-width:100%;max-height:calc(100dvh - 16px);border-radius:22px 22px 14px 14px}.iw-decision-head{padding:17px 16px 14px}.iw-decision-summary{margin:13px 16px 0}.iw-decision-field{margin:13px 16px 0}.iw-decision-error{margin-inline:16px}.iw-decision-actions{display:grid!important;grid-template-columns:1fr 1fr;padding:12px 16px max(14px,env(safe-area-inset-bottom))!important}.iw-decision-actions .btn{width:100%}
}

/* r114 — گزارش کامل و فقط‌خواندنی تصویربرداری؛ مشترک برای مدیر/برنامه‌ریز/سرپرست مجاز. */
.sr-view-modal{max-width:780px}.sr-view-head{display:flex;align-items:flex-start;justify-content:space-between;gap:14px;margin-bottom:14px}.sr-view-head .modal-title{margin-bottom:4px}
.sr-view-details{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:9px;margin:12px 0}.sr-view-detail{display:flex;align-items:flex-start;gap:10px;min-width:0;padding:11px 12px;border:1px solid var(--line);border-radius:14px;background:var(--sunken)}.sr-view-detail>i{font-size:19px;color:var(--primary);margin-top:2px;flex:none}.sr-view-detail span,.sr-view-detail strong{display:block;overflow-wrap:anywhere}.sr-view-detail span{font-size:11px;color:var(--ink-3);margin-bottom:3px}.sr-view-detail strong{font-size:13px;line-height:1.7}
.sr-view-metrics,.sr-view-ratings{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:9px;margin:12px 0}.sr-view-ratings{grid-template-columns:repeat(2,minmax(0,1fr))}.sr-view-metric{padding:11px 12px;border:1px solid var(--line);border-radius:14px;background:var(--surface)}.sr-view-metric-label,.sr-view-metric strong{display:block}.sr-view-metric-label{font-size:11px;color:var(--ink-3);margin-bottom:5px}.sr-view-metric strong{font-size:17px}.sr-view-metric.is-good strong{color:var(--ok)}.sr-view-metric.is-bad strong{color:var(--danger)}
.sr-view-section{margin-top:16px}.sr-view-section h4{margin:0 0 8px;font-size:14px}.sr-view-outcomes{display:grid;gap:7px}.sr-view-outcome{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:11px 12px;border:1px solid var(--line);border-inline-start:3px solid var(--line-2);border-radius:13px;background:var(--sunken)}.sr-view-outcome.is-captured{border-inline-start-color:var(--ok)}.sr-view-outcome.is-missed{border-inline-start-color:var(--danger)}.sr-view-outcome-main{min-width:0}.sr-view-outcome-main strong,.sr-view-outcome-main span{display:block;overflow-wrap:anywhere}.sr-view-outcome-main strong{font-size:13px}.sr-view-outcome-main span{margin-top:3px;font-size:11px;color:var(--ink-3)}.sr-view-note{min-height:54px;padding:12px 13px;border:1px solid var(--line);border-radius:14px;background:var(--sunken);font-size:13px;line-height:1.9;white-space:pre-wrap;overflow-wrap:anywhere}
@media(max-width:720px){.sr-view-head{align-items:stretch;flex-direction:column}.sr-view-head>.badge{align-self:flex-start}.sr-view-details{grid-template-columns:1fr}.sr-view-metrics{grid-template-columns:repeat(3,minmax(0,1fr))}.sr-view-outcome{align-items:flex-start;flex-direction:column}.sr-view-outcome>.badge{align-self:flex-start}}
@media(max-width:430px){.sr-view-metrics,.sr-view-ratings{grid-template-columns:1fr}.sr-view-modal .modal-actions .btn{width:100%}}
.applicant-hiring-chip{margin-top:10px;color:var(--primary);display:flex;gap:6px;align-items:center;font-size:12px}.hiring-box{margin:18px 0;padding:18px;border:1px solid var(--line-2);border-radius:18px;background:linear-gradient(145deg,var(--surface),var(--sunken))}.hiring-box.empty-flow{display:flex;align-items:center;justify-content:space-between;gap:16px}.hiring-box p{margin:5px 0;color:var(--text-muted)}.hiring-box-head{display:flex;justify-content:space-between;gap:14px;align-items:flex-start}.hiring-box-head h3{margin:3px 0}.hire-mini-kicker{color:var(--primary);font-size:12px;font-weight:800}.hiring-steps{display:flex;gap:6px;overflow:auto;padding:14px 0 10px}.hiring-steps span{white-space:nowrap;border:1px solid var(--line);border-radius:999px;padding:6px 10px;font-size:11px;color:var(--text-muted)}.hiring-steps span.done{border-color:var(--ok);color:var(--ok)}.hiring-steps span.active{background:var(--primary-soft);border-color:var(--primary);color:white}.hiring-actions{display:flex;flex-wrap:wrap;gap:8px;margin-top:13px}.hiring-offer-summary{display:grid;grid-template-columns:repeat(3,1fr);gap:8px}.hiring-offer-summary>div{background:var(--surface);border:1px solid var(--line);border-radius:12px;padding:10px;display:flex;flex-direction:column}.hiring-offer-summary b{margin-top:5px}.hiring-attention{display:inline-flex;margin-top:10px;padding:7px 10px;border:1px solid var(--warn);background:var(--warn-soft);color:var(--warn);border-radius:10px}.hiring-files{display:flex;gap:7px;flex-wrap:wrap;margin-top:12px}.hiring-file{color:var(--primary);text-decoration:none;border:1px solid var(--line-2);border-radius:10px;padding:7px 9px}.hiring-events{display:grid;gap:7px;margin-top:13px}.hiring-event{display:flex;justify-content:space-between;gap:12px;border-top:1px solid var(--line);padding-top:8px}.hiring-event small{color:var(--text-muted)}.hiring-form{max-width:560px}.hiring-work-head{align-items:center}.hiring-work-stats{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:10px;margin:4px 0 14px}.hiring-work-stat{display:grid;grid-template-columns:auto 1fr;gap:2px 9px;align-items:center;text-align:right;color:var(--text);background:var(--surface);border:1px solid var(--line);border-radius:16px;padding:13px;cursor:pointer}.hiring-work-stat i{grid-row:1/3;color:var(--primary);font-size:20px}.hiring-work-stat strong{font-size:22px}.hiring-work-stat span{font-size:11px;color:var(--text-muted)}.hiring-work-stat.active{border-color:var(--primary);background:var(--primary-soft)}.hiring-work-toolbar{display:grid;grid-template-columns:minmax(220px,520px) auto;gap:12px;align-items:center;margin-bottom:14px}.hiring-work-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(270px,1fr));gap:14px}.hiring-work-card{text-align:right;color:var(--text);background:var(--surface);border:1px solid var(--line);border-inline-start:4px solid var(--primary);border-radius:17px;padding:17px;cursor:pointer;min-width:0;transition:.16s}.hiring-work-card:hover{transform:translateY(-2px);box-shadow:0 10px 28px rgba(0,0,0,.12)}.hiring-work-card.action{border-inline-start-color:var(--danger)}.hiring-work-card.waiting{border-inline-start-color:var(--warn)}.hiring-work-card.scheduled{border-inline-start-color:var(--primary)}.hiring-work-card.trial{border-inline-start-color:var(--ok)}.hiring-work-card-top{display:flex;justify-content:space-between;gap:8px;align-items:center}.hiring-work-card h3{margin:10px 0 5px}.hiring-work-card p{color:var(--text-muted);margin:0}.hiring-work-owner{display:block;margin-top:8px;color:var(--text-muted)}
.hiring-questions{display:grid;gap:9px;margin-top:12px}.hiring-question{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:12px;align-items:center;border:1px solid var(--warn);border-radius:14px;background:var(--warn-soft);padding:12px}.hiring-question b{display:block;color:var(--warn);font-size:12px}.hiring-question p{color:var(--text);white-space:pre-wrap;overflow-wrap:anywhere}.hiring-question small{color:var(--text-muted)}.hiring-message-history{margin-top:13px;border:1px solid var(--line);border-radius:13px;padding:10px 12px}.hiring-message-history summary{cursor:pointer;font-weight:700}.hiring-history-list{display:grid;gap:8px;margin-top:10px}.hiring-history-row{border-top:1px solid var(--line);padding-top:9px}.hiring-history-row small{color:var(--text-muted)}.hiring-history-row p{white-space:pre-wrap;overflow-wrap:anywhere;color:var(--text)}.hiring-question-preview{border:1px solid var(--warn);background:var(--warn-soft);border-radius:13px;padding:12px;margin:10px 0}.hiring-question-preview small{color:var(--warn);font-weight:700}.hiring-question-preview p{white-space:pre-wrap;overflow-wrap:anywhere;color:var(--text)}
@media(max-width:720px){.hiring-box.empty-flow,.hiring-box-head{align-items:stretch;flex-direction:column}.hiring-actions .btn{flex:1 1 46%;min-width:130px}.hiring-offer-summary{grid-template-columns:1fr}.hiring-event{flex-direction:column}.hiring-question{grid-template-columns:1fr}.hiring-question .btn{width:100%}.hiring-form{width:calc(100vw - 24px);max-height:90vh;overflow:auto}}
.hiring-next-action{display:flex;gap:10px;align-items:flex-start;padding:12px 14px;border:1px solid var(--line);border-radius:14px;background:color-mix(in srgb,var(--primary) 8%,transparent)}
.hiring-next-action p{margin:4px 0 0;color:var(--text-muted);line-height:1.8}.hiring-work-next{display:block;margin-top:8px;line-height:1.7;color:var(--text-muted)}
@media(max-width:900px){.hiring-work-stats{display:flex;overflow-x:auto;scroll-snap-type:x mandatory;padding-bottom:5px}.hiring-work-stat{min-width:145px;scroll-snap-align:start}.hiring-work-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:620px){.hiring-work-grid{grid-template-columns:1fr}.hiring-work-toolbar{grid-template-columns:1fr}.hiring-work-head .applicant-head-actions{display:grid;grid-template-columns:1fr 1fr}.hiring-work-card{padding:14px}.hiring-work-card-top{align-items:flex-start}.hiring-work-next{background:var(--sunken);border-radius:11px;padding:9px}}
.hiring-knowledge-modal{max-width:720px;max-height:92vh;overflow:auto}.hiring-knowledge-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;margin-top:12px}.hiring-knowledge-grid .wide{grid-column:1/-1}.hiring-knowledge-grid textarea{width:100%;resize:vertical}
.hiring-profile-summary{border:1px solid var(--line);border-radius:14px;padding:12px;background:var(--sunken)}.hiring-profile-summary summary{cursor:pointer;font-weight:800}.hiring-profile-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;margin-top:12px}.hiring-profile-grid>div{display:grid;gap:4px;padding:10px;border:1px solid var(--line);border-radius:12px;overflow-wrap:anywhere}.hiring-profile-grid small{color:var(--text-muted)}
@media(max-width:720px){.hiring-knowledge-grid,.hiring-profile-grid{grid-template-columns:1fr}.hiring-knowledge-grid .wide{grid-column:auto}.hiring-knowledge-modal{width:calc(100vw - 20px);max-height:calc(100dvh - 20px)}}
.hiring-section-title{display:flex;justify-content:space-between;gap:12px;align-items:center;margin:18px 0 9px}.hiring-section-title small{color:var(--text-muted)}.hiring-submission-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:9px}.hiring-submission-card{border:1px solid var(--line);border-radius:14px;padding:12px;background:var(--surface)}.hiring-submission-card>div:first-child{display:flex;justify-content:space-between;gap:10px}.hiring-submission-card small{color:var(--text-muted)}.hiring-submission-card p{white-space:pre-line;overflow-wrap:anywhere}.hiring-submission-links{display:flex;gap:7px;flex-wrap:wrap}.hiring-submission-links a{color:var(--primary)}.hiring-files-wrap,.hiring-event-wrap{margin-top:12px}.hiring-files-wrap>summary,.hiring-event-wrap>summary{cursor:pointer;color:var(--text-muted)}.hiring-file{display:flex;align-items:center;gap:7px}.hiring-file span{display:flex;flex-direction:column}.hiring-file small{color:var(--text-muted);font-size:10px}.hiring-file.voided{opacity:.55;text-decoration:line-through}.hiring-check-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}.hiring-check{display:grid;grid-template-columns:auto 1fr auto;align-items:center;gap:10px;text-align:right;background:var(--surface);color:var(--text);border:1px solid var(--line);border-radius:14px;padding:11px;cursor:pointer}.hiring-check i{font-size:20px;color:var(--text-muted)}.hiring-check span{display:flex;flex-direction:column}.hiring-check small{color:var(--text-muted)}.hiring-check em{font-style:normal;font-size:11px;color:var(--warn)}.hiring-check.done{border-color:var(--ok);background:var(--ok-soft)}.hiring-check.done i,.hiring-check.done em{color:var(--ok)}
@media(max-width:720px){.hiring-submission-grid,.hiring-check-grid{grid-template-columns:1fr}.hiring-section-title{align-items:flex-start;flex-direction:column}.hiring-submission-card>div:first-child{align-items:flex-start;flex-direction:column}.hiring-check{grid-template-columns:auto 1fr}.hiring-check em{grid-column:2}.hiring-file{width:100%}.hiring-file span{min-width:0}.hiring-file span:first-of-type{overflow-wrap:anywhere}}
