/* ERP1 · نمای برنامه — راست‌به‌چپ، روشن/تیره، موبایل */
@font-face {
  font-family: 'Vazirmatn';
  src: url('fonts/vazirmatn.woff2') format('woff2-variations'), url('fonts/vazirmatn.woff2') format('woff2');
  font-weight: 100 900;
  font-display: swap;
}

:root {
  /* تم NB (پیش‌فرض): سرمه‌ای اصلی، طلایی تأکید، قرمز فقط برای خطر و هشدار */
  --bg: #f3f4f7;
  --surface: #ffffff;
  --surface-2: #f7f8fb;
  --surface-3: #eef0f4;
  --border: #e1e4eb;
  --border-strong: #cdd2dc;
  --text: #1b2336;
  --text-2: #3f4859;
  --text-3: #6b7486;
  --primary: #1b2336;
  --primary-2: #27314a;
  --primary-soft: #e9ecf4;
  --primary-ink: #ffffff;
  --gold: #e7a900;
  --gold-2: #f2b705;
  --gold-soft: #fdf4d9;
  --gold-ink: #1b1400;
  --accent: #8a6100;
  --accent-soft: #fdf4d9;
  --danger: #c8361c;
  --danger-strong: #b42318;
  --danger-soft: #fdebe7;
  --ok: #157a3a;
  --ok-soft: #e6f4ea;
  --info: #1d4ed8;
  --info-soft: #e8eefc;
  --debit: #0f5e8c;
  --credit: #8a3b12;
  --shadow-sm: 0 1px 2px rgba(27, 35, 54, .06);
  --shadow: 0 1px 3px rgba(27, 35, 54, .08), 0 4px 16px rgba(27, 35, 54, .06);
  --shadow-lg: 0 10px 40px rgba(27, 35, 54, .18);
  --radius: 10px;
  --radius-sm: 7px;
  --sidebar: 248px;
  --topbar: 56px;
  --focus: 0 0 0 3px rgba(231, 169, 0, .35);
  color-scheme: light;
}

:root[data-theme='dark'] {
  --bg: #0e121b;
  --surface: #151b28;
  --surface-2: #1a2131;
  --surface-3: #212a3d;
  --border: #2a3448;
  --border-strong: #3a4660;
  --text: #e8ecf4;
  --text-2: #b8c1d3;
  --text-3: #8a95aa;
  --primary: #f2b705;
  --primary-2: #e7a900;
  --primary-soft: #2e2810;
  --primary-ink: #1b1400;
  --gold-soft: #2e2810;
  --accent: #f2b705;
  --accent-soft: #2e2810;
  --danger: #fb7a5c;
  --danger-strong: #f87171;
  --danger-soft: #3a1d14;
  --ok: #4ade80;
  --ok-soft: #12301d;
  --info: #93b4ff;
  --info-soft: #18233d;
  --debit: #7cc4f0;
  --credit: #f0a77c;
  --shadow: 0 1px 3px rgba(0, 0, 0, .4), 0 4px 16px rgba(0, 0, 0, .3);
  --shadow-lg: 0 10px 40px rgba(0, 0, 0, .55);
  --focus: 0 0 0 3px rgba(242, 183, 5, .3);
  color-scheme: dark;
}

/* تم خنثی (برای مشتری‌های دیگر) */
:root[data-brand='neutral'] {
  --bg: #f4f6f8;
  --surface-2: #f8fafb;
  --surface-3: #eef2f5;
  --border: #e2e7ec;
  --border-strong: #cfd7df;
  --text: #17212b;
  --text-2: #4a5866;
  --text-3: #7a8794;
  --primary: #0f766e;
  --primary-2: #0d9488;
  --primary-soft: #e6f4f2;
  --primary-ink: #ffffff;
  --gold: #b45309;
  --gold-2: #d97706;
  --gold-soft: #fdf3e5;
  --gold-ink: #ffffff;
  --accent: #b45309;
  --accent-soft: #fdf3e5;
  --danger: #c2410c;
  --danger-strong: #b91c1c;
  --focus: 0 0 0 3px rgba(13, 148, 136, .28);
}
:root[data-brand='neutral'][data-theme='dark'] {
  --bg: #0f1418;
  --surface: #161d23;
  --surface-2: #1b232a;
  --surface-3: #212b33;
  --border: #2a353f;
  --border-strong: #3a4753;
  --text: #e6edf2;
  --text-2: #b3c0cb;
  --text-3: #85939f;
  --primary: #2dd4bf;
  --primary-2: #14b8a6;
  --primary-soft: #12302d;
  --primary-ink: #04201c;
  --gold-soft: #3a2a10;
  --accent: #f59e0b;
  --accent-soft: #3a2a10;
  --danger: #fb923c;
  --focus: 0 0 0 3px rgba(45, 212, 191, .3);
}

* { box-sizing: border-box; }
/* ویژگی hidden همیشه پنهان کند، حتی روی عنصری که display دارد (برچسب‌ها، دکمه‌ها، کارت‌ها) */
[hidden] { display: none !important; }
html, body { margin: 0; height: 100%; }
body {
  font-family: 'Vazirmatn', Tahoma, sans-serif;
  font-size: 14px;
  line-height: 1.6;
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  font-feature-settings: 'ss01';
}
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
svg.i { width: 18px; height: 18px; flex: none; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.num, .mono { font-variant-numeric: tabular-nums; }
.muted { color: var(--text-3); }
.small { font-size: 12.5px; }
.nowrap { white-space: nowrap; }
.hidden { display: none !important; }
.ltr { direction: ltr; unicode-bidi: isolate; }
.grow { flex: 1; }
.row { display: flex; align-items: center; gap: 8px; }
.row.wrap { flex-wrap: wrap; }
.stack { display: flex; flex-direction: column; gap: 12px; }
.sep { height: 1px; background: var(--border); margin: 12px 0; }

/* ── پوسته ── */
.shell { display: grid; grid-template-columns: var(--sidebar) 1fr; grid-template-rows: var(--topbar) 1fr; min-height: 100vh; }
.topbar {
  grid-column: 1 / -1; display: flex; align-items: center; gap: 12px; padding: 0 16px;
  background: var(--surface); border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 30;
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 16px; min-width: calc(var(--sidebar) - 32px); }
.brand .logo {
  width: 32px; height: 32px; border-radius: 9px; display: grid; place-items: center;
  background: linear-gradient(135deg, var(--primary-2), var(--primary)); color: #fff; font-weight: 800; font-size: 13px; letter-spacing: .5px;
}
.brand small { display: block; font-weight: 500; font-size: 11px; color: var(--text-3); margin-top: -4px; }
.topbar .ctx { display: flex; align-items: center; gap: 8px; flex: 1; min-width: 0; }
.sidebar {
  background: var(--surface); color: var(--text); border-left: 1px solid var(--border); padding: 12px 10px 24px;
  position: sticky; top: var(--topbar); height: calc(100vh - var(--topbar)); overflow-y: auto;
}
/* گروه‌های جمع‌شوندهٔ منو */
.nav-sec { margin-top: 2px; }
.nav-group {
  display: flex; align-items: center; gap: 10px; width: 100%; margin: 0; padding: 8px 10px; border: 0; border-radius: 8px;
  background: none; font: inherit; font-size: 13px; font-weight: 700; color: var(--text-2); cursor: pointer; text-align: start;
}
.nav-group > .nav-ic { color: var(--text-3); }
.nav-group:hover { background: var(--surface-3); color: var(--text); }
.nav-sec.open > .nav-group { color: var(--text); }
.nav-sec.open > .nav-items { display: block; margin-inline-start: 12px; padding-inline-start: 6px; border-inline-start: 1px solid var(--border); }
.nav-sec.open > .nav-items a { padding-block: 7px; }
.nav-group:focus-visible { outline: 2px solid var(--primary); outline-offset: -2px; }
.nav-group-t { flex: 1; }
.nav-group .badge { font-size: 10.5px; padding: 0 6px; }
.nav-chev { display: inline-flex; transition: transform .15s ease; transform: rotate(90deg); opacity: .7; }
.nav-chev svg { width: 14px; height: 14px; }
.nav-sec.open > .nav-group .nav-chev { transform: none; }
.nav-sec.open > .nav-group .badge { display: none; }
.nav-sec.has-active > .nav-group, .nav-sec.has-active > .nav-group > .nav-ic { color: var(--primary); }
.nav-items { display: none; padding-bottom: 4px; }

.nav-all {
  display: flex; align-items: center; gap: 6px; margin: 10px 10px 2px auto; padding: 3px 8px; border: 0; border-radius: 6px;
  background: none; font: inherit; font-size: 11px; color: var(--text-3); cursor: pointer;
}
.nav-all:hover { background: var(--surface-3); color: var(--primary); }
.nav-all svg { width: 13px; height: 13px; }
.nav a {
  display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 8px; color: var(--text-2);
  font-weight: 500; text-decoration: none; margin-bottom: 2px;
}
.nav a:hover { background: var(--surface-3); color: var(--text); }
.nav a.active { background: var(--primary-soft); color: var(--primary); font-weight: 700; }
.nav a .badge { margin-inline-start: auto; }
.main { padding: 20px 24px 60px; min-width: 0; }
.main:focus { outline: none; }
.btn.menu-btn { display: none; }
.scrim { display: none; }

/* دسکتاپ: منو و محتوا هر کدام جدا جابه‌جا می‌شوند؛ نوار جابه‌جایی منو کنار لبهٔ راست صفحه
   و نوار جابه‌جایی محتوا کنار خود محتوا (چسبیده به منو) است، نه برعکس */
@media (min-width: 961px) {
  .shell { height: 100vh; height: 100dvh; min-height: 0; overflow: hidden; grid-template-rows: var(--topbar) minmax(0, 1fr); }
  .sidebar { position: relative; top: auto; height: auto; min-height: 0; direction: ltr; scrollbar-width: thin; scrollbar-color: transparent transparent; }
  .sidebar:hover, .sidebar:focus-within { scrollbar-color: var(--border-strong) transparent; }
  .sidebar > .nav { direction: rtl; }
  .main { overflow-y: auto; min-height: 0; direction: ltr; scrollbar-gutter: stable; }
  .main > * { direction: rtl; }
  .main .bi-panel { top: 10px; }
}

@media (max-width: 960px) {
  .shell { grid-template-columns: 1fr; }
  .sidebar {
    position: fixed; top: var(--topbar); right: 0; width: min(82vw, 300px); z-index: 40;
    transform: translateX(100%); transition: transform .2s ease; box-shadow: var(--shadow-lg);
  }
  .shell.nav-open .sidebar { transform: none; }
  .shell.nav-open .scrim { display: block; position: fixed; inset: var(--topbar) 0 0 0; background: rgba(0,0,0,.3); z-index: 35; }
  .btn.menu-btn { display: inline-flex; }
  .brand { min-width: 0; }
  .brand > div:last-child { display: none; }
  .topbar { gap: 8px; padding: 0 10px; }
  .select-pill { max-width: 150px; }
  .grid.k4 { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
  .kpi .value { font-size: 17px; }
  .page-head .actions { margin-inline-start: 0; }
  .main { padding: 16px 16px 60px; }
  .topbar .ctx .hide-sm { display: none; }
}
@media (max-width: 560px) {
  .topbar .theme-btn, .user-chip .hide-sm { display: none; }
  .select-pill { max-width: 128px; }
  /* بخش ۵و: با دو شرکت (مثلاً طلا و ارز) دو انتخابگر کنار هم؛ جا را تقسیم می‌کنند و نوار بالا از صفحه بیرون نمی‌زند */
  .topbar { min-width: 0; }
  .topbar .ctx { overflow: hidden; }
  .topbar .ctx > * { min-width: 0; flex: 0 1 auto; }
  .topbar .ctx > .badge { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
}

/* ── سرصفحه ── */
.page-head { display: flex; align-items: flex-start; gap: 12px; margin-bottom: 18px; flex-wrap: wrap; }
.page-head h1 { font-size: 20px; margin: 0; font-weight: 800; letter-spacing: -.2px; }
.page-head .sub { color: var(--text-3); font-size: 13px; margin-top: 2px; }
.page-head .actions { margin-inline-start: auto; display: flex; gap: 8px; flex-wrap: wrap; }
.crumbs { font-size: 12.5px; color: var(--text-3); margin-bottom: 4px; }
.crumbs a { color: var(--text-3); }

/* ── کارت ── */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-sm); }
.card-head { display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-bottom: 1px solid var(--border); }
.card-head h2, .card-head h3 { font-size: 15px; margin: 0; font-weight: 700; }
.card-body { padding: 16px; }
.card-foot { padding: 12px 16px; border-top: 1px solid var(--border); display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.grid { display: grid; gap: 16px; }
.grid.k4 { grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); }
.grid.c2 { grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); }
.kpi { padding: 14px 16px; }
.kpi .label { color: var(--text-3); font-size: 12.5px; display: flex; align-items: center; gap: 6px; }
.kpi .value { font-size: 21px; font-weight: 800; margin-top: 4px; font-variant-numeric: tabular-nums; }
.kpi .hint { font-size: 12px; color: var(--text-3); margin-top: 2px; }

/* ── دکمه ── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 36px; padding: 0 14px;
  border-radius: 8px; border: 1px solid var(--border-strong); background: var(--surface); color: var(--text);
  font-weight: 600; cursor: pointer; white-space: nowrap; text-decoration: none; transition: background .12s, border-color .12s;
}
.btn:hover { background: var(--surface-3); text-decoration: none; }
.btn:focus-visible { outline: none; box-shadow: var(--focus); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn.primary { background: var(--primary); border-color: var(--primary); color: var(--primary-ink); }
.btn.primary:hover { background: var(--primary-2); }
.btn.danger { color: var(--danger-strong); border-color: color-mix(in srgb, var(--danger-strong) 40%, var(--border)); }
.btn.danger:hover { background: var(--danger-soft); }
.btn.ghost { border-color: transparent; background: transparent; }
.btn.ghost:hover { background: var(--surface-3); }
.btn.sm { height: 30px; padding: 0 10px; font-size: 13px; }
.btn.icon { width: 36px; padding: 0; }
.btn.sm.icon { width: 30px; }
.btn .kbd { font-size: 11px; opacity: .7; font-weight: 500; }
.btn.loading { pointer-events: none; opacity: .7; }

/* ── فرم ── */
.field { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.field > label { font-size: 12.5px; font-weight: 600; color: var(--text-2); }
.field .req { color: var(--danger-strong); }
.field .help { font-size: 12px; color: var(--text-3); }
.field .err { font-size: 12px; color: var(--danger-strong); }
.input, select.input, textarea.input {
  height: 36px; padding: 0 10px; border: 1px solid var(--border-strong); border-radius: 8px; background: var(--surface);
  width: 100%; min-width: 0; transition: border-color .12s, box-shadow .12s;
}
textarea.input { height: auto; min-height: 70px; padding: 8px 10px; resize: vertical; }
.input:focus { outline: none; border-color: var(--primary-2); box-shadow: var(--focus); }
.input.invalid, .invalid .input { border-color: var(--danger-strong); box-shadow: 0 0 0 3px color-mix(in srgb, var(--danger-strong) 18%, transparent); }
.input[readonly] { background: var(--surface-2); }
.input.num { text-align: left; direction: ltr; }
.form-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; }
.form-grid .full { grid-column: 1 / -1; }
.check { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; user-select: none; }
.check input { width: 16px; height: 16px; accent-color: var(--primary); }
.seg { display: inline-flex; border: 1px solid var(--border-strong); border-radius: 8px; overflow: hidden; }
.seg button { border: 0; background: var(--surface); padding: 0 12px; height: 34px; cursor: pointer; color: var(--text-2); font-weight: 600; }
.seg button + button { border-inline-start: 1px solid var(--border-strong); }
.seg button.on { background: var(--primary-soft); color: var(--primary); }

/* ── جدول ── */
.table-wrap { overflow-x: auto; }
.usage-list { border: 1px solid var(--border); border-radius: 10px; overflow: hidden; }
.usage-row { display: flex; justify-content: space-between; gap: 12px; padding: 9px 14px; border-bottom: 1px solid var(--border); }
.usage-row:last-child { border-bottom: 0; }
.usage-row b { min-width: 2.5em; text-align: left; }
.tw-top { overflow-x: auto; overflow-y: hidden; height: 14px; margin-bottom: 2px; }
.tw-top > div { height: 1px; }
table.t { width: 100%; border-collapse: separate; border-spacing: 0; }
table.t th {
  text-align: right; font-size: 12.5px; font-weight: 700; color: var(--text-2); background: var(--surface-2);
  padding: 9px 12px; border-bottom: 1px solid var(--border); white-space: nowrap; position: sticky; top: 0; z-index: 1;
}
table.t td { padding: 9px 12px; border-bottom: 1px solid var(--border); vertical-align: middle; }
/* erp064: خط بین ستون‌ها در همهٔ جدول‌های ERP (کاربر: «مرتب‌تر است») */
table.t th + th, table.t td + td { border-inline-start: 1px solid var(--border); }
table.t tr:last-child td { border-bottom: 0; }
table.t tbody tr.click { cursor: pointer; }
table.t tbody tr.click:hover td { background: var(--surface-2); }
table.t td.num, table.t th.num { text-align: left; direction: ltr; font-variant-numeric: tabular-nums; white-space: nowrap; }
table.t tfoot td { font-weight: 800; background: var(--surface-2); border-top: 1px solid var(--border-strong); }
table.t tr.inactive td { color: var(--text-3); }
/* erp064: مرتب‌سازی با کلیک روی سرستون و فلش ستون‌ها */
table.t td.nw { white-space: nowrap; }
table.t td.nm { min-width: 210px; }
table th.sortable { cursor: pointer; user-select: none; }
.col-off { display: none !important; }
table:not(.t) th.has-colbtn { position: relative; padding-inline-end: 34px; }
table:not(.t) th .colbtn { position: absolute; inset-inline-end: 4px; top: 50%; transform: translateY(-50%); width: 26px; height: 26px; display: grid; place-items: center;
  border: 1px solid var(--border); border-radius: 8px; background: var(--surface); color: var(--muted); cursor: pointer; padding: 0; }
table:not(.t) th .colbtn svg { width: 14px; height: 14px; }
table:not(.t) th .sort-ar { font-size: 9px; margin-inline-start: 4px; }
table.t th.sortable:hover { color: var(--text); background: var(--surface-3); }
table.t th.sorted { color: var(--primary); }
table.t th .sort-ar { font-size: 9px; margin-inline-start: 4px; vertical-align: 1px; }
table.t th.has-colbtn { padding-inline-end: 34px; position: sticky; }
table.t th .colbtn { position: absolute; inset-inline-end: 4px; top: 50%; transform: translateY(-50%); width: 26px; height: 26px; display: grid; place-items: center;
  border: 1px solid var(--border); border-radius: 7px; background: var(--surface); color: var(--text-2); cursor: pointer; padding: 0; }
table.t th .colbtn:hover { color: var(--primary); border-color: var(--primary); }
table.t th .colbtn svg { width: 14px; height: 14px; }
.colmenu { max-height: 70vh; overflow: auto; min-width: 220px; }
.colmenu-row { display: flex; gap: 8px; align-items: center; padding: 6px 10px; border-radius: 7px; cursor: pointer; font-size: 13.5px; }
.colmenu-row:hover { background: var(--surface-3); }
.menu .colmenu-reset { color: var(--primary); font-size: 13px; border-top: 1px solid var(--border); border-radius: 0; margin-top: 4px; }
table.t tr.lvl1 td { font-weight: 800; background: var(--surface-2); }
table.t tr.lvl2 td { font-weight: 700; }
.dr { color: var(--debit); }
.cr { color: var(--credit); }
.amount-tag { font-size: 11px; font-weight: 700; padding: 0 5px; border-radius: 4px; margin-inline-start: 4px; }
.amount-tag.dr { background: color-mix(in srgb, var(--debit) 12%, transparent); }
.amount-tag.cr { background: color-mix(in srgb, var(--credit) 12%, transparent); }

/* ── نشان و برچسب ── */
.badge {
  display: inline-flex; align-items: center; gap: 4px; padding: 1px 8px; border-radius: 999px; font-size: 12px; font-weight: 600;
  background: var(--surface-3); color: var(--text-2); white-space: nowrap; line-height: 1.7;
}
.badge.ok { background: var(--ok-soft); color: var(--ok); }
.badge.warn { background: var(--accent-soft); color: var(--accent); }
.badge.bad { background: var(--danger-soft); color: var(--danger-strong); }
.badge.info { background: var(--info-soft); color: var(--info); }
.badge.primary { background: var(--primary-soft); color: var(--primary); }
.dot { width: 8px; height: 8px; border-radius: 50%; background: currentColor; display: inline-block; }

/* ── پیام‌ها ── */
.toasts { position: fixed; bottom: 18px; left: 18px; z-index: 100; display: flex; flex-direction: column; gap: 8px; max-width: min(420px, calc(100vw - 36px)); }
.toast {
  background: var(--surface); border: 1px solid var(--border); border-radius: 10px; box-shadow: var(--shadow-lg);
  padding: 12px 14px; display: flex; gap: 10px; align-items: flex-start; animation: pop .18s ease;
  border-inline-start: 4px solid var(--primary);
}
.toast.err { border-inline-start-color: var(--danger-strong); }
.toast.ok { border-inline-start-color: var(--ok); }
.toast .t-title { font-weight: 700; }
.toast .t-hint { font-size: 12.5px; color: var(--text-3); margin-top: 2px; }
.toast .t-code { font-size: 11px; color: var(--text-3); margin-top: 4px; direction: ltr; text-align: right; }
@keyframes pop { from { transform: translateY(8px); opacity: 0; } to { transform: none; opacity: 1; } }
.alert { padding: 12px 14px; border-radius: 9px; display: flex; gap: 10px; align-items: flex-start; font-size: 13.5px; }
.alert.info { background: var(--info-soft); color: var(--info); }
.alert.warn { background: var(--accent-soft); color: var(--accent); }
.alert.bad { background: var(--danger-soft); color: var(--danger-strong); }
.alert.ok { background: var(--ok-soft); color: var(--ok); }
.alert .body { color: var(--text); }

/* ── پنجره ── */
.modal-back { position: fixed; inset: 0; background: rgba(10, 16, 22, .45); z-index: 80; display: grid; place-items: center; padding: 16px; animation: fade .15s ease; }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
.modal {
  background: var(--surface); border-radius: 14px; box-shadow: var(--shadow-lg); width: min(560px, 100%);
  max-height: calc(100vh - 32px); max-height: calc(100dvh - 32px); display: flex; flex-direction: column; animation: pop .18s ease;
}
/* erp053 گام ۹: سرِ پنجره کشیدنی (رایانه)؛ بدنهٔ پنجره همیشه در صفحه و پاورقی (دکمه‌ها) همیشه دیده می‌شود */
.modal-head.drag { cursor: move; user-select: none; touch-action: none; }
.modal-body { min-height: 0; }
.modal-head, .modal-foot { flex: none; }
.modal.wide { width: min(820px, 100%); }
.modal-head { display: flex; align-items: center; gap: 10px; padding: 14px 18px; border-bottom: 1px solid var(--border); }
.modal-head h3 { margin: 0; font-size: 16px; font-weight: 800; flex: 1; }
.modal-body { padding: 18px; overflow-y: auto; }
.modal-foot { padding: 12px 18px; border-top: 1px solid var(--border); display: flex; gap: 8px; justify-content: flex-start; flex-direction: row-reverse; }

/* ── فهرست انتخاب (تکمیل خودکار) ── */
.ac { position: relative; }
.ac-list {
  position: fixed; z-index: 90; background: var(--surface); border: 1px solid var(--border-strong); border-radius: 9px;
  box-shadow: var(--shadow-lg); max-height: 320px; overflow-y: auto; padding: 4px; min-width: 260px;
}
.ac-item { padding: 7px 10px; border-radius: 6px; cursor: pointer; display: flex; gap: 8px; align-items: baseline; }
.ac-item .code { font-variant-numeric: tabular-nums; color: var(--text-3); font-size: 12.5px; min-width: 56px; }
.ac-item .sub { font-size: 12px; color: var(--text-3); margin-inline-start: auto; white-space: nowrap; }
.ac-item.on, .ac-item:hover { background: var(--primary-soft); }
.ac-item.add { color: var(--primary); font-weight: 600; border-top: 1px dashed var(--border); margin-top: 4px; }
.ac-empty { padding: 10px; color: var(--text-3); font-size: 13px; }
.ac-chip { display: inline-flex; gap: 6px; align-items: center; }

/* ── تقویم شمسی ── */
.dp { position: fixed; z-index: 95; background: var(--surface); border: 1px solid var(--border-strong); border-radius: 12px; box-shadow: var(--shadow-lg); padding: 10px; width: 272px; }
.dp-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; font-weight: 700; }
.dp-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; text-align: center; }
.dp-grid .wd { font-size: 11.5px; color: var(--text-3); padding: 4px 0; }
.dp-grid button { border: 0; background: transparent; height: 32px; border-radius: 7px; cursor: pointer; font-variant-numeric: tabular-nums; }
.dp-grid button:hover { background: var(--surface-3); }
.dp-grid button.today { box-shadow: inset 0 0 0 1px var(--primary-2); }
.dp-grid button.sel { background: var(--primary); color: var(--primary-ink); }
.dp-grid button.fri { color: var(--danger-strong); }
.dp-grid button.sel.fri { color: var(--primary-ink); }
.dp-foot { display: flex; justify-content: space-between; margin-top: 8px; }

/* ── درخت سرفصل ── */
.tree-row td:first-child { white-space: nowrap; }
.tree-toggle { width: 22px; height: 22px; border: 0; background: transparent; cursor: pointer; border-radius: 5px; display: inline-grid; place-items: center; color: var(--text-3); vertical-align: middle; }
.tree-toggle:hover { background: var(--surface-3); }
.tree-toggle svg { transition: transform .15s; }
.tree-toggle.open svg { transform: rotate(-90deg); }
.toasts .toast:nth-last-child(n+4) { display: none; }
.indent-2 { padding-inline-start: 26px !important; }
.indent-3 { padding-inline-start: 52px !important; }
.code-cell { font-variant-numeric: tabular-nums; color: var(--text-2); font-weight: 600; }

/* ── سند ── */
.v-head { display: grid; grid-template-columns: 170px 1fr 220px 170px; gap: 14px; }
@media (max-width: 900px) { .v-head { grid-template-columns: 1fr 1fr; } }
.v-lines { width: 100%; border-collapse: separate; border-spacing: 0; }
.v-lines th { font-size: 12px; color: var(--text-2); font-weight: 700; padding: 8px 6px; background: var(--surface-2); border-bottom: 1px solid var(--border); text-align: right; white-space: nowrap; }
.v-lines td { padding: 5px 4px; border-bottom: 1px solid var(--border); vertical-align: top; }
.v-lines td.idx { color: var(--text-3); text-align: center; width: 34px; padding-top: 12px; font-variant-numeric: tabular-nums; }
.v-lines .input { height: 34px; border-color: transparent; background: var(--surface-2); }
.v-lines .input:hover { border-color: var(--border); }
.v-lines .input:focus { background: var(--surface); border-color: var(--primary-2); }
.v-lines tr.row-err td { background: var(--danger-soft); }
.v-lines .dl-stack { display: flex; flex-direction: column; gap: 3px; }
.v-lines .dl-none { color: var(--text-3); font-size: 12px; padding: 8px 6px; }
.v-lines .need .input { border-color: color-mix(in srgb, var(--accent) 55%, transparent); }
.v-lines .acc-sub { font-size: 11.5px; color: var(--text-3); padding: 0 10px; }
.v-lines col.c-acc { width: 26%; }
.v-lines col.c-det { width: 22%; }
.v-lines col.c-amt { width: 13%; }
@media (max-width: 760px) {
  .v-lines colgroup, .v-lines thead { display: none; }
  .v-lines, .v-lines tbody { display: block; }
  .v-lines tr { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; padding: 10px 12px; border-bottom: 1px solid var(--border); }
  .v-lines td { display: block; padding: 0; border: 0; }
  .v-lines td.idx { grid-column: 1 / -1; text-align: right; padding: 0; width: auto; }
  .v-lines td:nth-child(2), .v-lines td:nth-child(3), .v-lines td:nth-child(4), .v-lines td:nth-child(5), .v-lines td:last-child { grid-column: 1 / -1; }
  .v-lines td:last-child { text-align: left; }
  .v-lines td.hidden { display: none; }
  .v-lines .input { background: var(--surface-2); border-color: var(--border); }
  .v-lines .dl-none:empty { display: none; }
}
.v-total { display: flex; gap: 18px; align-items: center; flex-wrap: wrap; padding: 12px 16px; background: var(--surface-2); border-top: 1px solid var(--border); border-radius: 0 0 var(--radius) var(--radius); }
.v-total .sum { font-variant-numeric: tabular-nums; font-weight: 800; }
.v-total .diff.bad { color: var(--danger-strong); }
.v-total .diff.ok { color: var(--ok); }
.kbd-help { font-size: 12px; color: var(--text-3); }
kbd { font-family: inherit; font-size: 11px; border: 1px solid var(--border-strong); border-bottom-width: 2px; border-radius: 4px; padding: 0 5px; background: var(--surface); }
.v-status { font-size: 13px; }

/* ── ورود ── */
.auth-wrap { min-height: 100vh; display: grid; place-items: center; padding: 20px; background:
  radial-gradient(1200px 500px at 85% -10%, color-mix(in srgb, var(--primary-2) 18%, transparent), transparent),
  radial-gradient(900px 500px at -10% 110%, color-mix(in srgb, var(--accent) 10%, transparent), transparent), var(--bg); }
.auth-card { width: min(400px, 100%); padding: 28px; }
.auth-card h1 { margin: 6px 0 4px; font-size: 21px; font-weight: 800; }
.auth-card .brand { margin-bottom: 18px; }

/* ── متفرقه ── */
.empty { text-align: center; padding: 40px 16px; color: var(--text-3); }
.empty svg.i { width: 40px; height: 40px; stroke-width: 1.3; margin-bottom: 6px; }
.empty .title { font-weight: 700; color: var(--text-2); font-size: 15px; }
.skeleton { background: linear-gradient(90deg, var(--surface-3), var(--surface-2), var(--surface-3)); background-size: 200% 100%; animation: sk 1.2s infinite; border-radius: 6px; height: 14px; }
@keyframes sk { from { background-position: 200% 0; } to { background-position: -200% 0; } }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--border); margin-bottom: 14px; overflow-x: auto; }
.tabs a, .tabs button { padding: 9px 14px; border: 0; background: none; cursor: pointer; color: var(--text-2); font-weight: 600; border-bottom: 2px solid transparent; white-space: nowrap; text-decoration: none; display: inline-flex; gap: 6px; align-items: center; }
.tabs .on { color: var(--primary); border-bottom-color: var(--primary); }
@media (min-width: 761px) { .tabs.wrap { flex-wrap: wrap; overflow-x: visible; } }
.checklist { display: flex; flex-direction: column; gap: 2px; }
.checklist .item { display: flex; gap: 12px; align-items: center; padding: 10px 12px; border-radius: 9px; }
.checklist .item:hover { background: var(--surface-2); }
.checklist .mark { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; border: 2px solid var(--border-strong); color: var(--text-3); font-weight: 800; font-size: 12px; flex: none; }
.checklist .item.done .mark { background: var(--ok); border-color: var(--ok); color: #fff; }
.checklist .item.done .ttl { color: var(--text-3); text-decoration: line-through; }
.checklist .ttl { font-weight: 600; }
.pw-box { font-size: 22px; font-weight: 800; letter-spacing: 2px; text-align: center; padding: 14px; border-radius: 10px; background: var(--surface-3); direction: ltr; user-select: all; }
.user-chip { display: flex; align-items: center; gap: 8px; padding: 4px 6px 4px 10px; border-radius: 999px; border: 1px solid var(--border); background: var(--surface); cursor: pointer; }
.avatar { width: 28px; height: 28px; border-radius: 50%; background: var(--primary-soft); color: var(--primary); display: grid; place-items: center; font-weight: 800; font-size: 13px; }
.menu { position: fixed; z-index: 90; background: var(--surface); border: 1px solid var(--border-strong); border-radius: 10px; box-shadow: var(--shadow-lg); padding: 6px; min-width: 200px; }
.menu button, .menu a { display: flex; width: 100%; gap: 10px; align-items: center; padding: 8px 10px; border: 0; background: none; border-radius: 7px; cursor: pointer; text-align: right; color: var(--text); text-decoration: none; }
.menu button:hover, .menu a:hover { background: var(--surface-3); }
.menu .head { padding: 8px 10px; border-bottom: 1px solid var(--border); margin-bottom: 4px; }
.select-pill { height: 34px; border-radius: 8px; border: 1px solid var(--border); background: var(--surface-2); padding: 0 10px; max-width: 220px; }
.health-row { display: flex; gap: 10px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--border); }
.health-row:last-child { border-bottom: 0; }
.loading-bar { position: fixed; top: 0; right: 0; left: 0; height: 2px; z-index: 200; background: var(--primary-2); transform-origin: right; animation: lb 1s ease infinite; }
@keyframes lb { 0% { transform: scaleX(0); } 50% { transform: scaleX(.6); } 100% { transform: scaleX(1); opacity: 0; } }

/* ── انبار ── */
.qty { white-space: nowrap; font-variant-numeric: tabular-nums; }
.qty .u { font-size: 12px; color: var(--text-3); }
.qty .pk { display: block; font-size: 11.5px; color: var(--text-3); direction: rtl; text-align: inherit; }
.qty.neg b { color: var(--danger-strong); }
table.t tr.row-neg td { background: color-mix(in srgb, var(--danger-soft) 55%, transparent); }
.sm-input { height: 32px !important; min-width: 70px; }
.scan-input { height: 48px; font-size: 18px; font-weight: 600; letter-spacing: .5px; flex: 1; }
.scan-icon { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 10px; background: var(--primary-soft); color: var(--primary); flex: none; }
.scan-icon svg.i { width: 22px; height: 22px; }
.scan-pending { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; padding: 10px 12px; border-radius: 10px; background: var(--surface-2); border: 1px dashed var(--primary-2); }
.scan-qty { width: 110px; height: 42px; font-size: 17px; font-weight: 700; }
.scan-flash { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: 10px; animation: pop .15s ease; }
.scan-flash .t { font-weight: 800; font-size: 15px; }
.scan-flash .s { font-size: 13px; margin-top: 2px; color: var(--text-2); }
.scan-flash.ok { background: var(--ok-soft); color: var(--ok); }
.scan-flash.bad { background: var(--danger-soft); color: var(--danger-strong); }
/* ت۴۰: کادر خواندن (همان ناحیه‌ای که بارکدخوان داخلی می‌خواند) و ابزار دوربین */
.scan-box { position: absolute; left: 8%; right: 8%; top: 22%; bottom: 22%; border: 2px solid rgba(255, 255, 255, .85); border-radius: 10px; box-shadow: 0 0 0 999px rgba(0, 0, 0, .28); pointer-events: none; }
.scan-tools { display: flex; gap: 8px; align-items: center; justify-content: center; flex-wrap: wrap; }
.scan-tools:empty { display: none; }
.scan-eng { text-align: center; font-size: 11.5px; }
.scan-frame { position: relative; border-radius: 12px; overflow: hidden; background: #000; aspect-ratio: 4 / 3; }
.scan-video { width: 100%; height: 100%; object-fit: cover; display: block; }
.scan-line { position: absolute; left: 10%; right: 10%; top: 50%; height: 2px; background: #ef4444; box-shadow: 0 0 8px #ef4444; animation: scanline 1.6s ease-in-out infinite alternate; }
@keyframes scanline { from { transform: translateY(-60px); } to { transform: translateY(60px); } }
.grid.tiles { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
.tile { display: flex; gap: 12px; align-items: center; padding: 16px; text-decoration: none !important; color: inherit; transition: border-color .12s, box-shadow .12s; }
.tile:hover { border-color: var(--primary-2); box-shadow: var(--shadow); }
.tile .ttl { font-weight: 700; }
.tile-icon { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: var(--primary-soft); color: var(--primary); flex: none; }
.tile-icon svg.i { width: 22px; height: 22px; }
details.card > summary { list-style: none; }
details.card > summary::-webkit-details-marker { display: none; }
details.card:not([open]) > summary { border-bottom: 0; }
.print-only { display: none; }
@media (max-width: 760px) {
  .scan-input { font-size: 16px; }
  .v-lines .sm-input { height: 36px !important; }
}

/* ── چاپ رسمی سند ── */
.print-page { background: #fff; color: #111; max-width: 210mm; margin: 0 auto; padding: 14mm 12mm; border: 1px solid var(--border); border-radius: 8px; position: relative; }
.print-page .muted { color: #666; }
.print-page.is-draft::after { content: 'پیش‌نویس'; position: absolute; inset: 0; display: grid; place-items: center; font-size: 90px; font-weight: 900; color: rgba(200, 30, 30, .08); transform: rotate(-20deg); pointer-events: none; }
.pp-head { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 12px; border-bottom: 2px solid #111; padding-bottom: 10px; margin-bottom: 10px; }
.pp-company { font-weight: 800; font-size: 16px; }
.pp-title { font-weight: 900; font-size: 20px; text-align: center; }
.pp-meta { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; font-size: 13px; }
.pp-desc { display: flex; gap: 24px; font-size: 13px; margin: 6px 0; }
.pp-table { width: 100%; border-collapse: collapse; margin: 10px 0; font-size: 12.5px; }
.pp-table th, .pp-table td { border: 1px solid #444; padding: 5px 6px; vertical-align: top; }
.pp-table th { background: #eee; font-weight: 700; }
.pp-table td.c { text-align: center; white-space: nowrap; }
.pp-table td.n { text-align: left; direction: ltr; white-space: nowrap; font-variant-numeric: tabular-nums; }
.pp-table tfoot td { font-weight: 800; background: #f4f4f4; }
.pp-words { font-size: 13px; margin: 8px 0 16px; padding: 8px; border: 1px dashed #888; border-radius: 6px; }
.pp-sign { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 24px; text-align: center; font-size: 13px; }
.pp-sign > div { border-top: 1px solid #444; padding-top: 6px; min-height: 70px; }
.pp-name { margin-top: 30px; font-weight: 700; }
.pp-foot { margin-top: 18px; text-align: center; }

/* رسید حرارتی ۸ سانتی و فاکتور A5 فروش */
.print-page.a5 { max-width: 148mm; }
.print-page.thermal { max-width: 72mm; padding: 4mm 3mm; font-size: 12px; line-height: 1.5; }
.th-head { text-align: center; border-bottom: 1px dashed #333; padding-bottom: 4px; margin-bottom: 4px; }
.th-co { font-weight: 800; font-size: 14px; }
.th-meta { display: grid; gap: 1px; border-bottom: 1px dashed #333; padding-bottom: 4px; margin-bottom: 4px; }
.th-table { width: 100%; border-collapse: collapse; }
.th-table td { padding: 1px 0; vertical-align: top; }
.th-table .th-sub td { color: #333; font-size: 11px; border-bottom: 1px dotted #bbb; padding-bottom: 3px; }
.th-table .n { text-align: left; white-space: nowrap; }
.th-tot { margin-top: 6px; border-top: 1px dashed #333; padding-top: 4px; }
.th-tot > div { display: flex; justify-content: space-between; gap: 8px; }
.th-grand { font-weight: 800; font-size: 14px; border-top: 1px solid #111; margin-top: 3px; padding-top: 3px; }
.th-foot { text-align: center; margin-top: 8px; border-top: 1px dashed #333; padding-top: 4px; }
.pay-row > .input { min-width: 0; }

@media print {
  .print-page { border: 0; padding: 0; max-width: none; }
  @page { size: A4; margin: 12mm; }
  .print-page.thermal { max-width: none; width: 72mm; padding: 2mm; }
  body:has(.print-page.thermal) { margin: 0; }
  .topbar, .sidebar, .page-head .actions, .no-print, .toasts { display: none !important; }
  .shell { display: block; height: auto !important; overflow: visible !important; }
  .main { padding: 0; overflow: visible !important; height: auto !important; direction: rtl !important; }
  body { background: #fff; color: #000; font-size: 12px; }
  .card { border: 0; box-shadow: none; }
  table.t th { background: #f0f0f0 !important; }
  .print-only { display: grid !important; }
  .tabs, .alert { display: none !important; }
  table.grid-count select { appearance: none; border: 0; background: none; padding: 0; }
  table.grid-count input { border: 1px solid #999 !important; background: #fff !important; }
}

/* ── خرید ── */
.pur-lines td:nth-child(2) { min-width: 180px; }
.pur-lines td:nth-child(3) { width: 130px; }
.pur-lines td:nth-child(4) { width: 96px; }
.pur-lines td:nth-child(5) { width: 150px; }
.pur-lines td:nth-child(7) { width: 120px; }
.pur-lines td.num, .pur-lines .num { white-space: nowrap; font-variant-numeric: tabular-nums; }
.pur-lines a { text-decoration: none; }
.pur-sum-row { display: flex; align-items: center; gap: 8px; font-size: 13.5px; min-height: 30px; }
.pur-sum-row b { font-variant-numeric: tabular-nums; }
.pur-sum-row.total { border-top: 1px dashed var(--border-strong); padding-top: 10px; margin-top: 4px; font-weight: 700; }
.big-total { font-size: 20px; font-weight: 800; font-variant-numeric: tabular-nums; color: var(--primary); }
.pur-sum .input.num { text-align: left; }
.att-list { display: flex; flex-direction: column; gap: 6px; }
.att { display: flex; align-items: center; gap: 10px; padding: 6px 8px; border: 1px solid var(--border); border-radius: 8px; }
.att-open { display: inline-flex; align-items: center; gap: 6px; background: none; border: 0; color: var(--primary); cursor: pointer; font: inherit; padding: 0; flex: 1; text-align: right; }
@media (max-width: 760px) {
  .pur-lines tr { grid-template-columns: 1fr 1fr; }
  .pur-lines td:nth-child(2) { grid-column: 1 / -1; min-width: 0; }
  .pur-lines td:nth-child(3), .pur-lines td:nth-child(4) { grid-column: auto; width: auto; }
  .pur-lines td:nth-child(5) { grid-column: 1 / -1; width: auto; }
  .pur-lines td:nth-child(6), .pur-lines td:nth-child(8) { padding-top: 0 !important; }
  .pur-lines td:nth-child(6)::before { content: 'مبلغ: '; color: var(--text-3); font-size: 12px; }
  .pur-lines td:nth-child(8)::before { content: 'خالص: '; color: var(--text-3); font-size: 12px; font-weight: 400; }
  .pur-lines td:nth-child(7) { grid-column: 1 / -1; width: auto; }
  .pur-lines td:last-child { grid-column: 1 / -1; }
}

/* ── دریافت و پرداخت ── */
.cash-lines td:nth-child(2) { width: 150px; }
.cash-lines td:nth-child(3) { min-width: 200px; }
.cash-lines td:nth-child(4) { width: 160px; }
.cash-lines td:nth-child(5), .cash-lines td:nth-child(6) { width: 130px; }

/* ── مرکز تنظیمات ── */
/* erp053 ت۱۱۰: سربرگ‌های افقی مرکز تنظیمات (رایانه: چند ردیف؛ موبایل: یک خط کشیدنی) */
.cfg { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; align-items: start; }
.cfg-nav { display: flex; flex-wrap: wrap; gap: 6px; padding: 8px; }
.cfg-nav a { display: inline-flex; gap: 8px; align-items: center; height: 42px; padding: 0 16px; border-radius: 10px; color: var(--text-2);
  text-decoration: none; border: 1px solid var(--border); background: var(--surface); font-size: 14px; white-space: nowrap; }
.cfg-nav a b { font-weight: 700; }
.cfg-nav a svg { flex: none; }
.cfg-nav a:hover { background: var(--surface-3); color: var(--text); }
.cfg-nav a.on { background: var(--primary); border-color: var(--primary); color: var(--primary-ink); }
.cfg-nav a.on b { color: inherit; }
.cfg-panel .card-head { flex-wrap: wrap; }  /* erp053 ت۱۱۰: سرکارت‌های پرمتن (سطح‌های قیمت) در موبایل از صفحه بیرون نزنند */
.cfg-hint { display: flex; gap: 8px; align-items: center; color: var(--text-3); font-size: 13px; margin: -4px 4px 0; }
@media (max-width: 900px) {
  .cfg-nav { flex-wrap: nowrap; overflow-x: auto; scroll-snap-type: x proximity; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
  .cfg-nav::-webkit-scrollbar { display: none; }
  .cfg-nav a { flex: 0 0 auto; height: 46px; min-width: 104px; justify-content: center; padding: 0 18px; border-radius: 10px; scroll-snap-align: center; font-size: 14.5px; }
}
@media (max-width: 760px) {
  .cash-lines td:nth-child(2), .cash-lines td:nth-child(4), .cash-lines td:nth-child(5), .cash-lines td:nth-child(6) { width: auto; }
  .cash-lines td:nth-child(3) { grid-column: 1 / -1; min-width: 0; }
  .cash-lines td:last-child { grid-column: 1 / -1; }
}

/* ── چک: خط زمانی رویدادها و دکمه چک در ردیف ── */
.tl { display: flex; flex-direction: column; gap: 0; }
.tl-item { display: flex; gap: 12px; align-items: flex-start; padding: 10px 0; position: relative; }
.tl-item + .tl-item { border-top: 1px dashed var(--border); }
.tl-dot { width: 30px; height: 30px; border-radius: 50%; background: var(--primary-soft); color: var(--primary); display: grid; place-items: center; flex: none; }
.tl-item.off { opacity: .55; }
.tl-item.off .tl-dot { background: var(--danger-soft); color: var(--danger-strong); }
.tl-item.off b { text-decoration: line-through; }
.cheque-btn { max-width: 100%; justify-content: flex-start; text-align: start; white-space: normal; }
.cheque-btn.warn { border-color: var(--accent); color: var(--accent); }
table.t tbody tr.on td { background: var(--primary-soft); }

/* ── گزارش‌ها ── */
.rpt-group { font-size: 14px; margin: 18px 2px 10px; color: var(--text-2); display: flex; align-items: center; gap: 6px; }
.rpt-tile { justify-content: space-between; }
.rpt-star { font-size: 18px; color: var(--text-3); }
.rpt-star.on { color: var(--accent); }
.rpt-filters { gap: 8px; align-items: center; }
.rpt-meter { display: inline-block; width: 70px; height: 6px; border-radius: 3px; background: var(--surface-2); overflow: hidden; vertical-align: middle; }
.rpt-meter i { display: block; height: 100%; background: var(--primary); border-radius: 3px; }
table.t tr.rpt-total td { background: var(--primary-soft); }
table.rpt-pl td:first-child { white-space: nowrap; }
.rpt-chart { width: 100%; height: auto; display: block; direction: ltr; }
.rpt-chart .grid { stroke: var(--border); stroke-width: 1; }
.rpt-chart .zero { stroke: var(--danger-strong); stroke-width: 1; stroke-dasharray: 4 4; }
.rpt-chart .line { fill: none; stroke: var(--primary); stroke-width: 2; stroke-linejoin: round; }
.rpt-chart .pt circle { fill: var(--primary); stroke: var(--surface); stroke-width: 2; }
.rpt-chart .pt circle.hit { fill: transparent; stroke: none; }
.rpt-chart .pt.neg circle:not(.hit) { fill: var(--danger-strong); }
.rpt-chart .pt:hover circle:not(.hit) { r: 6; }
.rpt-chart text { font-size: 11px; fill: var(--text-3); font-family: inherit; }
.rpt-chart .lbl { fill: var(--danger-strong); font-weight: 700; }
.rpt-print-head { gap: 2px; margin-bottom: 10px; }
@media print { .rpt-meter i { background: #555 !important; } }
@media (max-width: 760px) {
  .grid.k4.rpt-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .rpt-kpis .kpi { padding: 10px 12px; }
  .rpt-kpis .kpi .value { font-size: 16px; }
  .rpt-filters > * { flex: 1 1 140px; }
}

/* ── بستن دوره ── */
.cls-months { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 10px; }
.cls-month { display: flex; flex-direction: column; gap: 4px; padding: 12px 14px; border: 1px solid var(--border); border-radius: 10px; text-decoration: none !important; color: inherit; background: var(--surface); transition: border-color .12s, box-shadow .12s; border-inline-start: 4px solid var(--ok); }
.cls-month:hover { border-color: var(--primary-2); box-shadow: var(--shadow); }
.cls-month.closed { border-inline-start-color: var(--accent); }
.cls-month.locked { border-inline-start-color: var(--danger-strong); background: var(--surface-2); }
.cls-month.next { box-shadow: 0 0 0 2px var(--primary-soft); border-color: var(--primary); }
.cls-list { display: flex; flex-direction: column; gap: 6px; }
.cls-item { display: flex; gap: 10px; align-items: center; padding: 10px 12px; border-radius: 9px; background: var(--surface-2); }
.cls-item.block { background: var(--danger-soft); }
.cls-item.warn { background: var(--accent-soft); }
.cls-item .ttl { font-weight: 600; }
.cls-mark { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; flex: none; background: var(--surface); }
.cls-item.block .cls-mark { color: var(--danger-strong); }
.cls-item.warn .cls-mark { color: var(--accent); }
.cls-task { display: flex; gap: 10px; align-items: flex-start; padding: 8px 10px; border-radius: 8px; cursor: pointer; }
.cls-task:hover { background: var(--surface-2); }
.cls-task input { margin-top: 4px; }
.cls-task .ttl { font-weight: 600; display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.cls-task.done .ttl { color: var(--text-3); }
.cls-step { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; border: 2px solid var(--border-strong); font-weight: 800; font-size: 12px; flex: none; color: var(--text-3); }
.cls-step.ok { background: var(--ok); border-color: var(--ok); color: #fff; }
.cls-step.bad { border-color: var(--danger-strong); color: var(--danger-strong); }
.cls-legal .card-head { flex-wrap: wrap; }
.cls-legal.virtual { border-style: dashed; }
@media print { .cls-legal { break-inside: avoid; border: 1px solid #999; margin-bottom: 8px; } .cls-legal.virtual { border-style: dashed; } }
@media (max-width: 760px) { .cls-months { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; } .cls-month { padding: 10px; } }

/* ── گردش کار و تأیید ── */
.wf-bell { position: relative; }
.wf-bell .dot { position: absolute; top: 1px; inset-inline-end: 0; min-width: 17px; height: 17px; padding: 0 4px; border-radius: 9px;
  background: var(--danger); color: #fff; font-size: 10.5px; font-weight: 800; line-height: 17px; text-align: center; }
.wf-card { padding: 14px 16px; display: flex; flex-direction: column; gap: 8px; }
.wf-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.wf-head input[type=checkbox] { width: 17px; height: 17px; accent-color: var(--primary); }
.wf-sum { color: var(--text-2); }
.wf-needs { margin: 0; padding-inline-start: 18px; color: var(--text-2); }
.wf-meta { gap: 14px; }
.wf-meta span { display: inline-flex; align-items: center; gap: 4px; }
.wf-meta .ic, .wf-meta svg { width: 14px; height: 14px; }
.wf-actions { border-top: 1px solid var(--border); padding-top: 10px; }
.wf-cut { max-width: 360px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wf-tl { list-style: none; margin: 0; padding: 0; position: relative; }
.wf-tl li { position: relative; padding: 0 22px 14px 0; }
.wf-tl li::before { content: ''; position: absolute; right: 4px; top: 6px; width: 10px; height: 10px; border-radius: 50%; background: var(--border-strong); }
.wf-tl li::after { content: ''; position: absolute; right: 8px; top: 18px; bottom: 0; width: 2px; background: var(--border); }
.wf-tl li:last-child::after { display: none; }
.wf-tl li.done::before { background: var(--ok, #15803d); }
.wf-tl li.bad::before { background: var(--danger); }
.wf-tl li.cur::before { background: var(--info); box-shadow: 0 0 0 4px var(--info-soft); }
.wf-banners { margin-bottom: 16px; gap: 8px; }
.wf-banner { align-items: flex-start; }
.wf-banner .row { flex-shrink: 0; }
.wf-rule { display: flex; gap: 12px; align-items: center; justify-content: space-between; flex-wrap: wrap; padding: 10px 12px;
  border-radius: 9px; background: var(--surface-2); }
.wf-rule.on { background: var(--primary-soft); }
.wf-rule-name { align-items: flex-start; flex: 1 1 320px; }
.wf-rule-name input { margin-top: 3px; }
.wf-rule-ctl { gap: 8px; }
.wf-rule-ctl .input { height: 34px; }
.wf-rule-ctl input[name=threshold] { width: 170px; }
.wf-rule-ctl input[name=pct] { width: 70px; }
.wf-rule-ctl select { width: auto; }
@media (max-width: 640px) {
  .wf-banner { flex-wrap: wrap; }
  .wf-rule-ctl { width: 100%; }
  .wf-cut { max-width: 160px; }
}

/* ── دسترسی‌ها و ورود دومرحله‌ای ── */
.grid.c3 { grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }
.input.otp { font-size: 24px; letter-spacing: 6px; text-align: center; font-variant-numeric: tabular-nums; height: 52px; }
.mfa-steps { margin: 0; padding-inline-start: 20px; display: grid; gap: 6px; font-size: 13.5px; color: var(--text-2); }
.mfa-qr-wrap { display: flex; justify-content: center; }
.mfa-qr { width: 200px; height: 200px; background: #fff; padding: 8px; border-radius: 10px; border: 1px solid var(--border); image-rendering: pixelated; }
.mfa-key { font-size: 16px; letter-spacing: 1px; word-break: break-all; }
.mfa-codes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
.mfa-codes code { font-size: 15px; padding: 8px; text-align: center; border-radius: 8px; background: var(--surface-3); user-select: all; letter-spacing: 1px; }
.role-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 8px; }
.role-check { align-items: flex-start; padding: 10px; border: 1px solid var(--border); border-radius: 10px; }
.role-check:has(input:checked) { border-color: var(--primary); background: var(--primary-soft); }
.role-check input { margin-top: 3px; }
.scope-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 10px; }
.scope-part { border: 1px solid var(--border); border-radius: 10px; padding: 10px; display: grid; gap: 8px; align-content: start; }
.perm-groups { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 12px; }
.perm-group { border: 1px solid var(--border); border-radius: 10px; padding: 10px 12px; }
.perm-head { padding-bottom: 8px; margin-bottom: 6px; border-bottom: 1px solid var(--border); width: 100%; }
.perm-list { display: grid; gap: 8px; }
.perm-row { align-items: flex-start; }
.perm-row input { margin-top: 3px; }
.wf-steps .input { width: auto; min-width: 150px; }
@media (max-width: 560px) {
  .mfa-qr { width: 180px; height: 180px; }
  .perm-groups { grid-template-columns: minmax(0, 1fr); }
}
@media print {
  .mfa-codes code { background: none; border: 1px solid #999; }
}

/* ── اجرای موازی با نرم‌افزار قبلی ── */
.par-top { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 14px; margin-bottom: 16px; }
.par-hero { display: flex; gap: 14px; align-items: center; padding: 18px 20px; border-radius: 14px; border: 1px solid var(--border); background: var(--surface); box-shadow: var(--shadow-sm); position: relative; overflow: hidden; }
.par-hero::before { content: ''; position: absolute; inset-inline-start: 0; top: 0; bottom: 0; width: 5px; background: var(--info); }
.par-hero.ok::before { background: var(--ok); }
.par-hero.ready::before { background: var(--primary); }
.par-hero.warn::before { background: var(--accent); }
.par-hero-icon { width: 52px; height: 52px; border-radius: 14px; display: grid; place-items: center; flex: none; background: var(--info-soft); color: var(--info); }
.par-hero.ok .par-hero-icon { background: var(--ok-soft); color: var(--ok); }
.par-hero.ready .par-hero-icon { background: var(--primary-soft); color: var(--primary); }
.par-hero.warn .par-hero-icon { background: var(--accent-soft); color: var(--accent); }
.par-hero-icon svg.i { width: 26px; height: 26px; }
.par-hero-title { font-size: 16.5px; font-weight: 800; margin-bottom: 3px; }
.par-ready { display: flex; gap: 14px; align-items: center; padding: 14px 18px; }
.par-ready.done { background: linear-gradient(135deg, var(--ok-soft), var(--surface) 70%); border-color: var(--ok); }
.par-ring-wrap { position: relative; width: 84px; height: 84px; flex: none; }
.par-ring { width: 84px; height: 84px; }
.par-ring circle { fill: none; stroke-width: 8; }
.par-ring .bg { stroke: var(--surface-3); }
.par-ring .fg { stroke: var(--primary); stroke-linecap: round; transition: stroke-dashoffset .6s ease; }
.par-ready.done .par-ring .fg { stroke: var(--ok); }
.par-ring-label { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; line-height: 1.1; }
.par-ring-label b { font-size: 22px; }
.par-ring-label span { font-size: 11px; color: var(--text-3); }
.par-kinds { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; }
.par-kind { display: flex; flex-direction: column; gap: 10px; padding: 14px 16px; border-top: 3px solid var(--border-strong); transition: box-shadow .15s, transform .15s; }
.par-kind:hover { box-shadow: var(--shadow); transform: translateY(-1px); }
.par-kind.s-ok { border-top-color: var(--ok); }
.par-kind.s-diff { border-top-color: var(--danger); }
.par-kind-head { display: flex; gap: 12px; align-items: center; color: inherit; text-decoration: none !important; }
.par-kind-head .ttl { font-weight: 800; font-size: 15px; }
.par-figs { display: flex; gap: 8px; }
.par-figs > div { flex: 1; background: var(--surface-2); border-radius: 9px; padding: 8px 10px; min-width: 0; }
.par-figs span { display: block; font-size: 11.5px; color: var(--text-3); }
.par-figs b { font-size: 15px; font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: block; }
.par-bar { height: 6px; border-radius: 3px; background: var(--danger-soft); overflow: hidden; }
.par-bar i { display: block; height: 100%; background: var(--ok); border-radius: 3px; transition: width .4s ease; }
.par-src { min-height: 2.6em; }
.par-kind-foot { display: flex; gap: 6px; justify-content: space-between; margin-top: auto; }
.par-steps { margin: 0; padding-inline-start: 20px; display: grid; gap: 8px; font-size: 13.5px; color: var(--text-2); }
.par-diff { font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.par-diff.up { color: var(--debit); }
.par-diff.down { color: var(--danger-strong); }
table.t tr.par-row.s-ok td { color: var(--text-2); }
table.t tr.par-row.s-diff td:first-child, table.t tr.par-row.s-unmapped td:first-child, table.t tr.par-row.s-erp_only td:first-child { box-shadow: inset -3px 0 0 var(--danger); }
table.t tr.par-row.s-accepted td:first-child { box-shadow: inset -3px 0 0 var(--info); }
table.t tr.sel td { background: var(--primary-soft); }
.par-reason { max-width: 260px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.par-kpi-bad .value { color: var(--danger-strong); }
.par-kpi-ok .value { color: var(--ok); }
.modal.par-modal { width: min(980px, 100%); }
.par-drop { border: 2px dashed var(--border-strong); border-radius: 14px; padding: 22px; display: grid; justify-items: center; gap: 8px; text-align: center; background: var(--surface-2); transition: border-color .15s, background .15s; }
.par-drop.over { border-color: var(--primary); background: var(--primary-soft); }
.par-drop > svg.i { width: 30px; height: 30px; color: var(--primary); }
.par-drop .ttl { font-weight: 700; }
.par-drop.compact { padding: 10px; grid-template-columns: auto 1fr auto; justify-items: start; text-align: start; }
.par-drop.compact > svg.i { width: 20px; height: 20px; }
.par-drop.compact .small { display: none; }
.par-paste { font-family: inherit; resize: vertical; min-height: 64px; }
.par-preview { max-height: 260px; border: 1px solid var(--border); border-radius: 10px; }
.par-preview th, .par-preview td { white-space: nowrap; font-size: 12.5px; }
.par-preview th.on, .par-preview td.on { background: var(--primary-soft); }
@media (max-width: 860px) {
  .par-top { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 560px) {
  .par-kinds { grid-template-columns: minmax(0, 1fr); }
  .par-hero { flex-wrap: wrap; padding: 14px; }
  .par-hero .btn { width: 100%; }
  .par-drop.compact { grid-template-columns: auto 1fr; }
}

/* ── جابه‌جایی بین برنامه‌ها ── */
.apps-pop { position: fixed; z-index: 95; background: var(--surface); border: 1px solid var(--border-strong); border-radius: 16px; box-shadow: var(--shadow-lg);
  padding: 10px; animation: apps-in .14s ease-out; }
@keyframes apps-in { from { opacity: 0; transform: translateY(-4px); } }
.apps-pop-head { display: flex; align-items: center; gap: 8px; font-size: 12.5px; font-weight: 800; color: var(--text-3); padding: 4px 6px 10px; }
.apps-pop-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.apps-tile { display: grid; gap: 3px; padding: 12px; border-radius: 12px; border: 1px solid var(--border); background: var(--surface-2); color: var(--text);
  text-decoration: none !important; transition: border-color .12s, transform .12s; min-width: 0; }
.apps-tile:hover { border-color: var(--primary); transform: translateY(-1px); }
.apps-tile.on { border-color: var(--primary); background: var(--primary-soft); }
.apps-tile b { font-size: 13.5px; }
.apps-tile > span:last-child { font-size: 11.5px; color: var(--text-3); line-height: 1.5; }
.apps-ic { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; color: #fff; margin-bottom: 4px;
  background: linear-gradient(135deg, #14b8a6, #0f766e); }
.apps-ic .i { width: 18px; height: 18px; }
.apps-desk { background: linear-gradient(135deg, #f59e0b, #b45309); }
.apps-pos { background: linear-gradient(135deg, #6366f1, #4338ca); }
.apps-buy { background: linear-gradient(135deg, #0ea5e9, #0369a1); }
.apps-superapp { background: linear-gradient(135deg, #ec4899, #9d174d); }

/* ── میز مدیر ── */
.desk-hero { display: flex; gap: 18px; align-items: stretch; justify-content: space-between; flex-wrap: wrap; border-radius: 20px; padding: 22px 24px; margin-bottom: 16px;
  color: #fff; position: relative; overflow: hidden; background: radial-gradient(120% 160% at 100% 0%, #14b8a6 0%, #0f766e 42%, #0b3f3b 100%);
  box-shadow: 0 16px 44px rgba(15, 118, 110, .26); }
.desk-hero::before { content: ''; position: absolute; inset-inline-end: -70px; bottom: -110px; width: 300px; height: 300px; border-radius: 50%;
  background: radial-gradient(circle, rgba(224, 180, 92, .28), transparent 70%); }
.desk-hero > * { position: relative; z-index: 1; }
.desk-hero-main { min-width: 0; flex: 1 1 320px; }
.desk-eyebrow { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 800; letter-spacing: .2px; padding: 4px 10px; border-radius: 999px;
  background: rgba(255, 255, 255, .14); color: #fdf3e5; }
.desk-eyebrow .i { width: 14px; height: 14px; }
.desk-hero h1 { margin: 10px 0 4px; font-size: 24px; }
.desk-hero .sub { opacity: .85; font-size: 13.5px; }
.desk-pills { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.desk-link { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 12px; border-radius: 999px; font-size: 12.5px; font-weight: 700;
  background: rgba(255, 255, 255, .12); border: 1px solid rgba(255, 255, 255, .22); color: #fff !important; text-decoration: none !important; }
.desk-link:hover { background: rgba(255, 255, 255, .2); }
.desk-link .i { width: 15px; height: 15px; }
.desk-hero-fig { display: grid; align-content: center; gap: 4px; min-width: 240px; padding: 14px 18px; border-radius: 16px;
  background: rgba(255, 255, 255, .1); border: 1px solid rgba(255, 255, 255, .18); backdrop-filter: blur(4px); }
.desk-hero-fig > span:first-child { font-size: 12.5px; opacity: .85; }
.desk-hero-fig b { font-size: 30px; font-weight: 900; font-variant-numeric: tabular-nums; color: #fde9c4; line-height: 1.25; }
.desk-hero-fig b small { font-size: 13px; font-weight: 600; color: #fff; opacity: .8; }
.desk-hero-fig .small { opacity: .85; }
.desk-delta { font-size: 12.5px; font-weight: 800; }
.desk-delta.up { color: #a7f3d0; }
.desk-delta.down { color: #fecaca; }
.desk-delta.flat { color: #e2e8f0; opacity: .85; font-weight: 600; }
.desk-kpis { margin-bottom: 16px; }
.desk-kpi { text-decoration: none !important; color: inherit; transition: border-color .12s, transform .12s; }
.desk-kpi:hover { border-color: var(--primary); transform: translateY(-1px); }
.desk-kpi.neg .value { color: var(--danger-strong); }
.desk-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; margin-bottom: 16px; }
.desk-card { min-width: 0; }
.desk-unit { display: grid; gap: 6px; padding-bottom: 10px; border-bottom: 1px dashed var(--border); }
.desk-unit:last-child { border-bottom: 0; padding-bottom: 0; }
.desk-unit .num { font-weight: 800; font-variant-numeric: tabular-nums; }
.desk-bar { height: 8px; border-radius: 999px; background: var(--surface-3); overflow: hidden; }
.desk-bar span { display: block; height: 100%; border-radius: 999px; background: linear-gradient(90deg, var(--primary-2), var(--primary)); }
.desk-chart-wrap { position: relative; }
.desk-chart { width: 100%; height: auto; display: block; overflow: visible; }
.desk-chart .grid { stroke: var(--border); stroke-width: 1; stroke-dasharray: 3 4; }
.desk-chart .base { stroke: var(--border-strong); stroke-width: 1; }
.desk-chart .bar path { fill: var(--primary-2); opacity: .78; transition: opacity .12s; }
.desk-chart .bar.today path { fill: #c8962e; opacity: 1; }
.desk-chart .bar:hover path { opacity: 1; }
.desk-chart .hit { fill: transparent; cursor: pointer; }
.desk-chart text { font-family: inherit; text-anchor: middle; fill: var(--text-3); font-size: 11px; }
.desk-chart text.small { font-size: 9.5px; }
.desk-chart text.strong { fill: var(--text); font-weight: 800; }
.desk-chart text.val { fill: var(--text-2); font-size: 10.5px; font-weight: 700; }
.desk-tip { position: absolute; width: 150px; padding: 8px 10px; border-radius: 10px; background: var(--surface); border: 1px solid var(--border-strong);
  box-shadow: var(--shadow-lg); font-size: 12px; pointer-events: none; display: grid; gap: 2px; z-index: 5; }
.desk-req { display: flex; gap: 10px; align-items: center; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--border); background: var(--surface-2); }
.desk-req b { display: block; font-size: 13.5px; }
.desk-req-sum { color: var(--text-2); margin-top: 2px; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.desk-ok { display: flex; gap: 8px; align-items: center; color: var(--ok); font-weight: 700; padding: 8px 0; }
.desk-health { display: flex; gap: 12px; align-items: center; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--border); color: inherit; text-decoration: none !important; }
a.desk-health:hover { border-color: var(--primary); }
.desk-health .mk { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; flex-shrink: 0; }
.desk-health .mk .i { width: 16px; height: 16px; }
.desk-health.ok .mk { background: var(--ok-soft); color: var(--ok); }
.desk-health.bad .mk { background: var(--danger-soft); color: var(--danger-strong); }
.desk-health.warn .mk { background: var(--accent-soft); color: var(--accent); }
.desk-health b { font-size: 13.5px; }
.desk-ring { width: 30px; height: 30px; flex-shrink: 0; }
.desk-ring .bg { fill: none; stroke: var(--surface-3); stroke-width: 5; }
.desk-ring .fg { fill: none; stroke: var(--primary-2); stroke-width: 5; stroke-linecap: round; }
.desk-health.ok .desk-ring .fg { stroke: var(--ok); }
.desk-apps { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 10px; margin-bottom: 16px; }
:root[data-theme='dark'] .desk-hero { background: radial-gradient(120% 160% at 100% 0%, #0f766e 0%, #0b4f4a 45%, #072a27 100%); }
@media (max-width: 900px) {
  .desk-grid { grid-template-columns: minmax(0, 1fr); }
  .desk-hero { padding: 18px; border-radius: 16px; }
  .desk-hero h1 { font-size: 20px; }
  .desk-hero-fig { min-width: 0; flex: 1 1 100%; }
  .desk-hero-fig b { font-size: 26px; }
  .grid.k4.desk-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .desk-kpis .kpi { padding: 10px 12px; }
  .desk-kpis .kpi .value { font-size: 16px; }
  .desk-kpis .kpi .hint { font-size: 11px; }
  .desk-req { flex-wrap: wrap; }
}
.desk-kpi.warn .hint { color: var(--accent); }
.desk-chart text, .desk-chart path, .desk-chart line { pointer-events: none; }
.desk-chart .hit { pointer-events: all; }

/* ── قیمت‌گذاری و طرح‌های تشویقی ── */
.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); gap: 16px; margin-bottom: 16px; }
.grid-2 > .card { margin-bottom: 0; }
.kv-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 12px 18px; }
.kv-grid > div { display: grid; gap: 4px; align-content: start; }
.kv-grid > div > span:first-child { color: var(--text-3); font-size: 12px; }
.stat-row { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 12px; margin-bottom: 16px; }
.stat { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 12px 16px; display: grid; gap: 6px; align-content: start; }
.stat > span { color: var(--text-3); font-size: 12.5px; }
.stat > b { font-size: 20px; font-weight: 800; font-variant-numeric: tabular-nums; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--border); font-size: 12.5px; }
.chip.old { background: var(--accent-soft); border-color: transparent; }
.chip b { font-variant-numeric: tabular-nums; }
.icon-btn { border: 0; background: none; padding: 2px; cursor: pointer; color: var(--text-3); display: inline-grid; place-items: center; border-radius: 6px; }
.icon-btn:hover { background: var(--surface-3); color: var(--danger-strong); }
.icon-btn .i { width: 14px; height: 14px; }
.promo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; }
.promo-card { display: grid; gap: 10px; padding: 16px; margin: 0; text-decoration: none !important; color: inherit; border-top: 4px solid var(--primary-2); transition: transform .12s, box-shadow .12s; }
.promo-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.promo-card.k-tiered { border-top-color: #7c3aed; }
.promo-card.k-gift { border-top-color: #db2777; }
.promo-card.k-basket { border-top-color: #c8962e; }
.promo-ic { width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; background: var(--primary-soft); color: var(--primary); flex: none; }
.promo-ic .i { width: 19px; height: 19px; }
.promo-card.k-tiered .promo-ic { background: #ede9fe; color: #6d28d9; }
.promo-card.k-gift .promo-ic { background: #fce7f3; color: #be185d; }
.promo-card.k-basket .promo-ic { background: var(--accent-soft); color: var(--accent); }
.promo-rule { font-weight: 800; font-size: 15px; color: var(--primary); line-height: 1.6; }
.promo-rule.big { font-size: 20px; }
.promo-stats { display: flex; gap: 14px; font-size: 12.5px; color: var(--text-2); border-top: 1px dashed var(--border); padding-top: 8px; }
.promo-stats b { font-variant-numeric: tabular-nums; }
.promo-kinds { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 10px; }
.promo-kind { display: grid; gap: 4px; justify-items: start; text-align: start; padding: 14px; border-radius: 14px; border: 1.5px solid var(--border); background: var(--surface);
  cursor: pointer; font: inherit; color: inherit; transition: border-color .12s, box-shadow .12s; }
.promo-kind .i { width: 22px; height: 22px; color: var(--primary); }
.promo-kind:hover:not(:disabled) { border-color: var(--primary-2); }
.promo-kind.on { border-color: var(--primary); background: var(--primary-soft); box-shadow: 0 0 0 3px var(--primary-soft); }
.promo-kind:disabled:not(.on) { opacity: .45; cursor: default; }
:root[data-theme='dark'] .promo-card.k-tiered .promo-ic { background: rgba(124, 58, 237, .18); color: #c4b5fd; }
:root[data-theme='dark'] .promo-card.k-gift .promo-ic { background: rgba(219, 39, 119, .18); color: #f9a8d4; }
/* برچسب قیمت قفسه */
.label-sheet { display: grid; grid-template-columns: repeat(var(--cols, 3), minmax(0, 1fr)); gap: 8px; margin-top: 14px; }
.label-sheet:empty { display: none; }
.shelf-label { border: 1px dashed #9aa5a5; border-radius: 8px; padding: 8px 10px; display: grid; gap: 4px; background: #fff; color: #000;
  break-inside: avoid; min-height: 34mm; align-content: space-between; }
.sl-name { font-weight: 800; font-size: 13px; line-height: 1.45; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.sl-price { display: flex; align-items: baseline; gap: 6px; flex-wrap: wrap; }
.sl-price b { font-size: 24px; font-weight: 900; font-variant-numeric: tabular-nums; letter-spacing: -.3px; }
.sl-price s { color: #888; font-size: 13px; }
.sl-price span { font-size: 11px; color: #555; }
.sl-price .sl-off { margin-inline-start: auto; background: #b3261e; color: #fff; border-radius: 4px; padding: 0 5px; font-weight: 800; font-size: 11px; }
.sl-foot { display: flex; justify-content: space-between; align-items: center; font-size: 10px; color: #555; gap: 6px; }
.sl-promo { background: #c8962e; color: #fff; border-radius: 4px; padding: 0 6px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 60%; }
.shelf-label.promo { border: 2px solid #c8962e; }
.sl-bc svg { max-width: 100%; height: 34px; display: block; margin: 0 auto; }
.sl-code { font-family: monospace; font-size: 11px; text-align: center; color: #333; }
.label-sheet.sz-a4_14 .sl-price b { font-size: 34px; }
.label-sheet.sz-a4_14 .shelf-label { min-height: 52mm; }
.label-sheet.sz-a4_40 .sl-price b { font-size: 18px; }
.label-sheet.sz-a4_40 .shelf-label { min-height: 25mm; padding: 5px 6px; }
.label-sheet.sz-a4_40 .sl-name { font-size: 11px; }
/* خواستهٔ ۱ آبان: برچسب وسط‌چین (نام ← مصرف‌کننده ← فروش با درصد کوچک ← بارکد)؛ ۱۶تایی ۴ × ۴ */
.shelf-label { text-align: center; justify-items: center; }
.shelf-label .sl-name { width: 100%; }
.sl-cons { font-size: 12px; color: #666; }
.sl-cons s { font-variant-numeric: tabular-nums; }
.shelf-label .sl-price { justify-content: center; }
.shelf-label .sl-price .sl-off { margin-inline-start: 4px; font-size: 10px; padding: 0 4px; }
.shelf-label .sl-foot { width: 100%; }
.label-sheet.sz-a4_16 .shelf-label { min-height: 62mm; padding: 8px 6px; }
.label-sheet.sz-a4_16 .sl-name { font-size: 14px; }
.label-sheet.sz-a4_16 .sl-price b { font-size: 26px; }
.label-sheet.sz-a4_16 .sl-bc svg { height: 40px; }
@media print {
  body:has(.label-sheet:not(:empty)) .page-head { display: none !important; }
  .label-sheet.sz-a4_16 .shelf-label { height: 68mm; min-height: 0; padding: 6px 4px; }
  .label-sheet.sz-a4_16 .sl-price { flex-wrap: nowrap; gap: 3px; }
  .label-sheet.sz-a4_16 .sl-price b { font-size: 20px; letter-spacing: -.5px; }
  .label-sheet.sz-a4_16 .sl-price .sl-off { font-size: 9px; }
  .label-sheet.sz-a4_16 .sl-name { font-size: 13px; }
  .label-sheet { gap: 0; margin-top: 0; }
  .shelf-label { border: 1px solid #bbb; border-radius: 0; }
  .shelf-label.promo { border: 2px solid #000; }
  .sl-promo { background: #000 !important; }
}
/* دکمه‌های گزینه‌ای که در کارت باریک به چند سطر می‌روند (بدون شکستن متن دکمه) */
.seg.seg-wrap { display: flex; flex-wrap: wrap; gap: 6px; border: 0; overflow: visible; border-radius: 0; }
.seg.seg-wrap button { flex: 1 1 auto; white-space: nowrap; border: 1px solid var(--border-strong); border-radius: 8px; }
.seg.seg-wrap button + button { border-inline-start: 1px solid var(--border-strong); }
.seg.seg-wrap button.on { border-color: var(--primary); }
/* کالای بسته‌ای/عددی */
.pack-wh { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 8px 10px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface-2); }
.pk-sealed { color: var(--primary); font-weight: 700; }
.pk-loose { color: var(--accent); font-weight: 700; }
.pack-wh > .grow { flex: 1 1 200px; }
/* تبدیل و برش (قصابی) */
.conv-top { display: grid; grid-template-columns: minmax(280px, 1fr) minmax(280px, 1.2fr); gap: 16px; margin-bottom: 16px; }
.conv-top > .card { margin: 0; }
.conv-in { display: grid; gap: 6px; font-weight: 700; }
.input.big-num { font-size: 20px; font-weight: 800; height: 46px; max-width: 160px; text-align: center; font-variant-numeric: tabular-nums; }
.conv-bal { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-bottom: 10px; }
.conv-bal .stat small { font-size: 12px; }
.conv-loss.ok { border-color: color-mix(in srgb, var(--ok) 40%, var(--border)); }
.conv-loss.warn { border-color: var(--accent); background: var(--accent-soft); }
.conv-loss.bad { border-color: var(--danger); background: var(--danger-soft); }
.conv-loss.bad > b { color: var(--danger-strong); }
.conv-meter { position: relative; height: 6px; border-radius: 99px; background: var(--surface-2); overflow: visible; }
.conv-meter > i { position: absolute; inset-block: 0; inset-inline-start: 0; border-radius: 99px; background: var(--ok); }
.conv-loss.warn .conv-meter > i { background: var(--accent); }
.conv-loss.bad .conv-meter > i { background: var(--danger); }
.conv-meter > em { position: absolute; top: -3px; bottom: -3px; width: 2px; background: var(--text-2); }
.conv-table td { vertical-align: middle; }
.conv-table td.warn { color: var(--accent); font-weight: 700; }
.conv-tpls { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 16px; }
.conv-tpls > .card { margin: 0; }
.conv-tpl.off { opacity: .65; }
.conv-parts { display: flex; flex-wrap: wrap; gap: 6px; }
.conv-tl { padding: 6px 8px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface-2); flex-wrap: wrap; }
@media (max-width: 760px) {
  .conv-top { grid-template-columns: 1fr; }
  .conv-bal { grid-template-columns: 1fr 1fr; }
  .conv-bal > .conv-loss { grid-column: 1 / -1; }
  .input.big-num { max-width: 120px; font-size: 18px; }
}
.conv-table th.num, .conv-table td.num { width: 104px; white-space: nowrap; }
.conv-meter:empty, .conv-loss.idle .conv-meter > i { background: transparent; }
@media (max-width: 760px) {
  .conv-table thead { display: none; }
  .conv-table, .conv-table tbody { display: block; width: 100%; }
  .conv-table tr { display: grid; grid-template-columns: 1fr auto auto; gap: 6px 12px; align-items: center; padding: 10px 14px; border-bottom: 1px solid var(--border); }
  .conv-table td { display: block; padding: 0; border: 0; width: auto !important; }
  .conv-table td:first-child { grid-column: 1 / -1; }
  .conv-table td:nth-child(2) { grid-column: 1 / 2; }
  .conv-table td[data-l]::before { content: attr(data-l); display: block; font-size: 11px; color: var(--text-3); font-weight: 400; }
}
/* کافی‌شاپ: دستور ساخت */
.rcp-line { padding: 6px 8px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface-2); flex-wrap: wrap; }
.rcp-sum { display: flex; flex-wrap: wrap; gap: 8px 18px; font-size: 13px; padding: 10px 12px; border-radius: 10px; background: var(--primary-soft); }
/* هزینه و بودجه */
.grid.exp-two { display: grid; grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); gap: 14px; }
.grid.exp-two > .card { margin: 0; }
.exp-meter { display: inline-block; width: 80px; height: 7px; border-radius: 4px; background: var(--surface-3); overflow: hidden; vertical-align: middle; }
.exp-meter i { display: block; height: 100%; background: var(--ok); border-radius: 4px; }
.exp-meter.over i { background: var(--danger); }
.exp-bars { display: flex; align-items: flex-end; gap: 10px; height: 170px; padding-top: 18px; }
.exp-bar { flex: 1 1 0; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; height: 100%; min-width: 0; position: relative; }
.exp-bar i { display: block; width: 100%; max-width: 46px; min-height: 2px; background: var(--primary-soft); border: 1px solid var(--primary); border-radius: 6px 6px 2px 2px; }
.exp-bar.on i { background: var(--primary); }
.exp-bar .v { font-size: 11px; color: var(--text-2); margin-bottom: 3px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.exp-bar .l { font-size: 11.5px; color: var(--text-3); margin-top: 5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.exp-hbar { display: grid; grid-template-columns: minmax(90px, 160px) 1fr auto; gap: 10px; align-items: center; font-size: 13px; }
.exp-hbar .b { height: 10px; border-radius: 5px; background: var(--surface-3); overflow: hidden; }
.exp-hbar .b i { display: block; height: 100%; background: var(--primary); border-radius: 5px; }
.exp-hbar.neg .b i { background: var(--danger); }
.exp-hbar .v { font-variant-numeric: tabular-nums; min-width: 110px; text-align: left; }
.exp-rec { gap: 10px; align-items: center; padding: 8px 10px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface-2); }
.exp-lines td.exp-acc { min-width: 230px; }
.exp-lines td { vertical-align: middle; }
.exp-acc-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 4px 12px; max-height: 240px; overflow: auto; }
.exp-grid { max-height: 70vh; }
.exp-grid table { min-width: 1500px; }
.exp-grid th, .exp-grid td { padding: 6px 6px; }
.exp-grid .exp-sticky { position: sticky; inset-inline-start: 0; background: var(--surface); z-index: 1; min-width: 190px; box-shadow: -1px 0 0 var(--border) inset; }
.exp-grid thead th { position: sticky; top: 0; background: var(--surface-2); z-index: 2; }
.exp-grid thead th.exp-sticky { z-index: 3; }
.exp-grid .input.exp-cell { width: 96px; height: 30px; padding: 0 6px; font-size: 12.5px; }
.exp-grid tr.exp-inc .exp-sticky { background: var(--ok-soft); }
.exp-grid tfoot td { background: var(--surface-2); border-top: 2px solid var(--border-strong); }
.exp-pl-table tr.exp-pl td { border-top: 1px solid var(--border); }
.exp-pl-table tr.exp-pl.strong td { background: var(--surface-2); }
.exp-pl-table tr.exp-pl.net td { background: var(--primary-soft); font-size: 14px; }
.exp-pl-table tr.exp-sub td { background: var(--surface); padding-top: 3px; padding-bottom: 3px; }
.exp-pl-table tr.exp-sub td:first-child { padding-inline-start: 28px; }
.exp-caret { display: inline-block; width: 16px; color: var(--text-3); }
@media (max-width: 760px) {
  .grid.k4.exp-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .grid.exp-two { grid-template-columns: 1fr; }
  .exp-bars { gap: 5px; height: 150px; }
  .exp-bar .v { font-size: 9.5px; }
  .exp-hbar { grid-template-columns: 80px 1fr; }
  .exp-hbar .v { grid-column: 1 / -1; text-align: right; min-width: 0; font-size: 12px; }
  .exp-lines td.exp-acc { min-width: 200px; }
}

/* ── تطبیق بانکی (bnk) ── */
.bnk-chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0 12px; }
.bnk-chip { display: inline-flex; align-items: center; gap: 8px; padding: 7px 12px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); color: var(--text); text-decoration: none; transition: border-color .15s, background .15s; }
.bnk-chip:hover { border-color: var(--border-strong); }
.bnk-chip.on { border-color: var(--primary); background: var(--primary-soft); box-shadow: 0 0 0 1px var(--primary) inset; }
.bnk-chip.off { opacity: .6; }
.bnk-chip > svg.i { color: var(--primary); }
.bnk-two { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; align-items: start; }
@media (max-width: 1100px) { .bnk-two { grid-template-columns: minmax(0, 1fr); } }
.bnk-two .table-wrap { max-height: 62vh; overflow: auto; }
.bnk-two thead th { position: sticky; top: 0; background: var(--surface-2); z-index: 1; }
.bnk-amt { font-variant-numeric: tabular-nums; white-space: nowrap; direction: ltr; unicode-bidi: isolate; }
.bnk-amt.in { color: var(--ok); }
.bnk-amt.out { color: var(--danger); }
.bnk-desc { max-width: 340px; overflow-wrap: anywhere; font-size: 12.5px; line-height: 1.6; }
table.t tr.sel td { background: var(--primary-soft); }
table.t tr.bnk-hint td { background: var(--accent-soft); }
.bnk-bar { position: sticky; bottom: 0; z-index: 5; display: none; align-items: center; gap: 10px; flex-wrap: wrap; padding: 10px 14px; border: 1px solid var(--primary); border-radius: 14px; background: var(--surface); box-shadow: 0 -6px 20px rgba(0, 0, 0, .12); }
.bnk-bar.show { display: flex; }
.bnk-matches > summary { cursor: pointer; list-style: none; }
.bnk-matches > summary::-webkit-details-marker { display: none; }
.bnk-recon table.t td { padding: 9px 12px; }
.bnk-recon tr.strong td { background: var(--surface-2); font-size: 14px; border-top: 2px solid var(--border-strong); }
.bnk-raw { white-space: pre-wrap; background: var(--surface-2); padding: 6px 8px; border-radius: 8px; margin: 4px 0; }
@media print { .no-print, .bnk-chips, .tabs { display: none !important; } }
.bnk-ok { color: var(--ok); }
.bnk-bad { color: var(--danger-strong); }
.bnk-warn { color: var(--accent); }
.kpi .value.ok { color: var(--ok); }
.kpi .value.warn { color: var(--accent); }
.kpi .value.bad { color: var(--danger-strong); }

/* ── ویزیتوری و پورسانت (vis) ── */
.vis-num { font-variant-numeric: tabular-nums; white-space: nowrap; }
.vis-num.neg { color: var(--danger-strong); }
.vis-ok { color: var(--ok); }
.vis-meter { display: inline-block; width: 110px; height: 7px; border-radius: 4px; background: var(--surface-3); overflow: hidden; vertical-align: middle; }
.vis-meter i { display: block; height: 100%; background: var(--accent); border-radius: 4px; }
.vis-meter.ok i { background: var(--ok); }
.vis-bars { display: flex; align-items: flex-end; gap: 10px; height: 160px; padding-top: 18px; }
.vis-bar { flex: 1 1 0; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; height: 100%; min-width: 0; }
.vis-bar i { display: block; width: 100%; max-width: 46px; min-height: 2px; background: var(--primary-soft); border: 1px solid var(--primary); border-radius: 6px 6px 2px 2px; }
.vis-bar.on i { background: var(--primary); }
.vis-bar .v { font-size: 11px; color: var(--text-2); margin-bottom: 3px; white-space: nowrap; }
.vis-bar .l { font-size: 11.5px; color: var(--text-3); margin-top: 5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.vis-bulk { gap: 8px; align-items: center; padding: 10px 12px; margin-bottom: 10px; position: sticky; top: 0; z-index: 3; }
.vis-plan.off { opacity: .65; }
.vis-example { padding: 8px 10px; border-radius: 10px; background: var(--surface-2); }
.vis-total { text-align: left; font-size: 15px; padding: 6px 4px; }
.vis-grid { max-height: 70vh; }
.vis-grid table { min-width: 1450px; }
.vis-grid th, .vis-grid td { padding: 6px; vertical-align: top; }
.vis-grid .vis-sticky { position: sticky; inset-inline-start: 0; background: var(--surface); z-index: 1; min-width: 150px; box-shadow: -1px 0 0 var(--border) inset; }
.vis-grid thead th { position: sticky; top: 0; background: var(--surface-2); z-index: 2; }
.vis-grid thead th.vis-sticky { z-index: 3; }
.vis-grid .input.vis-cell { width: 100px; height: 30px; padding: 0 6px; font-size: 12.5px; }
.vis-me { max-width: 760px; margin: 0 auto; }
.vis-hero { padding: 16px; display: grid; gap: 14px; justify-items: stretch; }
.vis-hero h1 { margin: 0; font-size: 20px; }
.vis-ring { --p: 0; width: 150px; height: 150px; border-radius: 50%; justify-self: center; display: grid; place-items: center;
  background: conic-gradient(var(--primary) calc(var(--p) * 1%), var(--surface-3) 0); }
.vis-ring > div { width: 118px; height: 118px; border-radius: 50%; background: var(--surface); display: grid; place-content: center; text-align: center; gap: 2px; }
.vis-ring b { font-size: 24px; }
.vis-me-k { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.vis-me-k .kpi .value { font-size: 18px; }
.vis-cust { display: grid; }
.vis-cust-row { display: flex; gap: 10px; align-items: center; padding: 10px 14px; border-top: 1px solid var(--border); }
.vis-cust-row .num { text-align: left; font-variant-numeric: tabular-nums; }
@media (max-width: 520px) { .vis-me-k { grid-template-columns: minmax(0, 1fr); } }
.vis-ring.done { background: conic-gradient(var(--ok) calc(var(--p) * 1%), var(--surface-3) 0); }

/* ═════ نمودارها (charts.js) و گزارش‌ساز/داشبورد (bi) — گام ۲۹ ═════ */
:root { --series-1: #2a78d6; --series-2: #eb6834; --series-3: #1baf7a; --series-4: #eda100; }
:root[data-theme='dark'] { --series-1: #3987e5; --series-2: #d95926; --series-3: #199e70; --series-4: #c98500; }
.ch-nums { display: grid; gap: 10px; }
.ch-num-l { font-size: 12.5px; color: var(--text-3); }
.ch-num-v { font-size: 26px; font-weight: 800; font-variant-numeric: tabular-nums; letter-spacing: -.3px; line-height: 1.25; }
.ch-num.sub .ch-num-v { font-size: 17px; font-weight: 700; }
.ch-num-d { font-size: 12px; color: var(--text-3); font-variant-numeric: tabular-nums; }
.ch-num-d span { color: var(--text-3); }
.ch-num-d.good { color: var(--ok); } .ch-num-d.bad { color: var(--danger); } .ch-num-d.flat { color: var(--text-2); }
.ch-bars { display: grid; gap: 4px; }
.ch-bar-row { display: grid; grid-template-columns: minmax(80px, 34%) 1fr auto; gap: 10px; align-items: center; min-height: 26px; padding: 1px 4px; border-radius: 6px; }
.ch-bar-row:hover { background: var(--surface-2); }
.ch-bar-row.click { cursor: pointer; }
.ch-bar-l { font-size: 12.5px; color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ch-bar-t { height: 12px; position: relative; border-inline-start: 1px solid var(--border-strong); }
.ch-bar-t i { display: block; height: 100%; border-start-end-radius: 4px; border-end-end-radius: 4px; }
.ch-bar-t i.neg { background: var(--danger); opacity: .85; }
.ch-bar-v { font-size: 12.5px; font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; text-align: left; min-width: 64px; }
.ch-bar-x { display: block; font-size: 11px; font-weight: 400; color: var(--text-3); }
.ch-line-box { display: grid; gap: 6px; }
.ch-legend { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 12px; color: var(--text-2); }
.ch-legend span, .ch-tip div { display: inline-flex; align-items: center; gap: 6px; }
.ch-legend i, .ch-tip i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; flex: none; }
.ch-line-wrap { position: relative; direction: ltr; }
.ch-svg { width: 100%; height: 100%; display: block; overflow: visible; }
.ch-grid { stroke: var(--border); stroke-width: 1; }
.ch-zero { stroke: var(--border-strong); stroke-width: 1; }
.ch-ax { fill: var(--text-3); font-size: 11px; font-family: inherit; }
.ch-line { fill: none; stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.ch-dot, .ch-mark { stroke: var(--surface); stroke-width: 2; }
.ch-cross { stroke: var(--text-3); stroke-width: 1; stroke-dasharray: 3 3; }
.ch-tip { position: absolute; top: 4px; pointer-events: none; background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow); border-radius: 8px;
  padding: 6px 10px; font-size: 12px; direction: rtl; display: grid; gap: 2px; min-width: 120px; z-index: 2; color: var(--text); }
.ch-tip.hidden { display: none; }
.ch-tip b { font-variant-numeric: tabular-nums; }

.bi-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; align-items: start; grid-auto-flow: row dense; }
.bi-w { margin: 0; min-width: 0; }
.bi-w.size-s { grid-column: span 1; } .bi-w.size-m { grid-column: span 2; } .bi-w.size-l { grid-column: span 4; }
.bi-w .card-head { padding: 10px 14px; gap: 8px; }
.bi-w .card-head h2 { font-size: 14px; }
.bi-w-body { padding: 12px 14px 14px; min-height: 92px; }
.bi-w.editing { outline: 2px dashed var(--border-strong); outline-offset: 2px; }
.bi-w.editing .bi-w-body { min-height: 60px; }
.bi-w .card-head select.input { height: 30px; padding: 0 6px; font-size: 12.5px; }
.bi-skel { height: 70px; border-radius: 8px; background: linear-gradient(90deg, var(--surface-2), var(--surface-3), var(--surface-2)); background-size: 200% 100%; animation: bi-sk 1.2s linear infinite; }
@keyframes bi-sk { to { background-position: -200% 0; } }
.bi-empty { color: var(--text-3); font-size: 13px; padding: 18px 4px; text-align: center; }
.bi-totals { display: flex; flex-wrap: wrap; gap: 6px 18px; margin-top: 10px; padding-top: 8px; border-top: 1px solid var(--border); font-size: 12.5px; color: var(--text-2); }
.bi-totals b { color: var(--text); font-variant-numeric: tabular-nums; }
.bi-table td.bi-neg { color: var(--danger); }
.bi-table .bi-good { color: var(--ok); } .bi-table .bi-bad { color: var(--danger); } .bi-table .bi-flat { color: var(--text-2); }
.bi-table tfoot td { font-weight: 700; background: var(--surface-2); }
.bi-builder { display: grid; grid-template-columns: 330px minmax(0, 1fr); gap: 14px; align-items: start; }
.bi-panel { position: sticky; top: calc(var(--topbar) + 10px); margin: 0; }
.bi-preview { margin: 0; min-width: 0; }
.bi-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.bi-chip { border: 1px solid var(--border-strong); background: var(--surface); color: var(--text-2); border-radius: 999px; padding: 4px 11px; font: inherit; font-size: 12.5px; cursor: pointer; }
.bi-chip:hover { border-color: var(--primary); color: var(--text); }
.bi-chip.on { background: var(--primary-soft); border-color: var(--primary); color: var(--primary); font-weight: 700; }
:root[data-theme='dark'] .bi-chip.on { color: var(--text); }
.bi-chip:focus-visible { outline: none; box-shadow: var(--focus); }
.bi-filters summary { cursor: pointer; color: var(--text-2); font-weight: 600; font-size: 13px; }
.bi-rep { margin: 0; }
.bi-rep .card-head a { color: inherit; text-decoration: none; }
.bi-rep .card-head a:hover { color: var(--primary); }
@media (max-width: 1100px) { .bi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } .bi-w.size-l { grid-column: span 2; } .bi-builder { grid-template-columns: minmax(0, 1fr); } .bi-panel { position: static; } }
@media (max-width: 640px) { .bi-grid { grid-template-columns: minmax(0, 1fr); } .bi-w.size-s, .bi-w.size-m, .bi-w.size-l { grid-column: span 1; } .ch-bar-row { grid-template-columns: minmax(70px, 38%) 1fr auto; } .ch-num-v { font-size: 22px; } }
.bi-w-t { min-width: 0; }
.bi-w-t h2 { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bi-w-sub { font-size: 11.5px; color: var(--text-3); margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bi-2 { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 10px; }

/* ═════ حقوق و دستمزد (pay) — گام ۳۰ ═════ */
.pay-months { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; margin-top: 14px; }
.pay-month { margin: 0; padding: 12px 14px; display: grid; gap: 4px; }
.pay-month.future { opacity: .55; }
.pay-month.st-posted { border-inline-start: 3px solid var(--ok); }
.pay-month.st-draft { border-inline-start: 3px solid var(--accent); }
.pay-month-n { font-size: 18px; font-weight: 800; font-variant-numeric: tabular-nums; }
.pay-grid { max-height: 70vh; }
.pay-grid table { min-width: 1100px; }
.pay-grid th, .pay-grid td { padding: 6px; vertical-align: middle; }
.pay-grid .pay-sticky { position: sticky; inset-inline-start: 0; background: var(--surface); z-index: 1; min-width: 170px; box-shadow: -1px 0 0 var(--border) inset; }
.pay-grid thead th { position: sticky; top: 0; background: var(--surface-2); z-index: 2; }
.pay-grid thead th.pay-sticky { z-index: 3; }
.pay-grid tfoot td { font-weight: 700; background: var(--surface-2); }
.pay-grid .input.pay-cell { width: 110px; height: 32px; padding: 0 8px; font-size: 13px; }
.pay-grid .input.pay-cell.saving { border-color: var(--primary); box-shadow: var(--focus); }
.pay-slips { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 460px), 1fr)); gap: 14px; }
.pay-slip { margin: 0; padding: 16px; display: grid; gap: 8px; break-inside: avoid; }
.pay-slip-h { display: flex; justify-content: space-between; gap: 10px; border-bottom: 1px solid var(--border); padding-bottom: 8px; }
.pay-slip-b { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.pay-slip-t { font-weight: 700; font-size: 13px; margin-bottom: 4px; color: var(--text-2); }
.pay-slip-r { display: flex; justify-content: space-between; gap: 8px; font-size: 13px; padding: 2px 0; font-variant-numeric: tabular-nums; }
.pay-slip-r > span:first-child { white-space: nowrap; color: var(--text-2); }
.pay-slip-r.tot > span:first-child { color: var(--text); }
.pay-slip-r.tot { border-top: 1px dashed var(--border-strong); margin-top: 4px; padding-top: 4px; font-weight: 700; }
.pay-slip-net { display: flex; justify-content: space-between; align-items: center; padding: 10px 12px; border-radius: 10px; background: var(--primary-soft); color: var(--primary); font-size: 15px; }
:root[data-theme='dark'] .pay-slip-net { color: var(--text); }
.pay-me { max-width: 720px; margin: 0 auto; }
.pay-me-row { margin: 0; display: flex; align-items: center; gap: 10px; padding: 14px 16px; width: 100%; font: inherit; color: inherit; cursor: pointer; text-align: start; }
.pay-me-row:hover { border-color: var(--primary); }
@media (max-width: 560px) { .pay-slips { grid-template-columns: minmax(0, 1fr); } .pay-slip-b { grid-template-columns: minmax(0, 1fr); gap: 8px; } }
@media print { .pay-slips { display: block; } .pay-slip { margin-bottom: 12px; box-shadow: none; } }

/* ═════ دارایی ثابت (ast) — گام ۳۱ ═════ */
.ast-info { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 10px 16px; }
.ast-info > div { display: grid; gap: 2px; }
.ast-info span { font-size: 12px; }
.ast-sched { max-height: 420px; overflow: auto; }
.ast-group td { background: var(--surface-2); }

/* ═══════════ پایهٔ پلتفرم سوپر اپ (گام ۳۲) ═══════════ */
.brand .logo { background: var(--primary); color: var(--gold-2, #f2b705); }
:root[data-theme='dark'] .brand .logo { background: var(--gold-2); color: var(--gold-ink); }
.page-head .page-tools { display: flex; gap: 2px; align-items: center; margin-inline-end: -4px; }
.page-tools .help-btn { font-weight: 800; font-size: 16px; }
.notif-bell { position: relative; }
.notif-bell .dot { position: absolute; top: 1px; inset-inline-end: 0; min-width: 17px; height: 17px; padding: 0 4px; border-radius: 9px;
  background: var(--gold); color: var(--gold-ink); font-size: 10.5px; font-weight: 800; display: grid; place-items: center; width: auto; }
.notif-bell .dot.urgent { background: var(--danger); color: #fff; }
/* erp074: زنگ اعلان — هر چند ثانیه تکان می‌خورد و نشانِ عدد می‌تپد */
@keyframes bell-ring { 0%, 62%, 100% { transform: rotate(0); } 66% { transform: rotate(16deg); } 70% { transform: rotate(-14deg); } 74% { transform: rotate(11deg); }
  78% { transform: rotate(-8deg); } 82% { transform: rotate(5deg); } 86% { transform: rotate(-2deg); } }
@keyframes bell-dot { 0%, 100% { box-shadow: 0 0 0 0 rgba(242, 183, 5, .55); } 50% { box-shadow: 0 0 0 6px rgba(242, 183, 5, 0); } }
.ringing > .i, .ringing > svg { transform-origin: 50% 8%; animation: bell-ring 3.2s ease-in-out infinite; }
.notif-bell.ringing .dot, .bb-bell.ringing .bb-dot { animation: bell-dot 1.6s ease-out infinite; }
@media (prefers-reduced-motion: reduce) { .ringing > .i, .ringing > svg, .ringing .dot, .ringing .bb-dot { animation: none; } }
.bottom-bar { display: none; }
@media (max-width: 760px) {
  .bottom-bar {
    display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); position: fixed; inset-inline: 0; bottom: 0; z-index: 30;
    background: var(--surface); border-top: 1px solid var(--border); padding: 4px 4px calc(4px + env(safe-area-inset-bottom));
    box-shadow: 0 -2px 12px rgba(27, 35, 54, .06);
  }
  .bb-item {
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; min-height: 52px; position: relative;
    color: var(--text-3); font-size: 11.5px; font-weight: 600; text-decoration: none !important; background: none; border: 0; font-family: inherit; cursor: pointer;
  }
  .bb-item .i { width: 22px; height: 22px; }
  .bb-item.on { color: var(--primary); }
  .bb-dot { position: absolute; top: 4px; inset-inline-end: calc(50% - 22px); min-width: 18px; height: 18px; border-radius: 9px; padding: 0 5px;
    background: var(--gold); color: var(--gold-ink); font-size: 11px; font-weight: 800; display: grid; place-items: center; }
  .shell .main { padding-bottom: 84px; }
  .topbar .notif-bell { display: none; }
  /* نوار چسبان پایین صفحه‌ها (مثل تطبیق بانک) بالای نوار پایین می‌نشیند، نه زیرش */
  .bnk-bar { bottom: calc(66px + env(safe-area-inset-bottom)); }
}
/* خانه */
.plt-hello { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.plt-hello h1 { font-size: 21px; margin: 0; font-weight: 800; }
.plt-hand { width: 46px; height: 46px; border-radius: 14px; background: var(--gold-soft); color: var(--accent); display: grid; place-items: center; flex: none; }
.plt-hand .i { width: 26px; height: 26px; }
.plt-hello-act { margin-inline-start: auto; display: flex; gap: 6px; flex-wrap: wrap; }
.plt-msg { background: var(--primary); color: #fff; border-radius: 14px; padding: 14px 18px; margin-bottom: 12px; display: flex; flex-direction: column; gap: 6px; }
:root[data-theme='dark'] .plt-msg { background: #27314a; }
.plt-msg-k { color: var(--gold-2); font-weight: 700; font-size: 12.5px; display: flex; align-items: center; gap: 6px; }
.plt-msg-k .i { width: 16px; height: 16px; }
.plt-msg p { margin: 0; font-size: 16px; font-weight: 700; line-height: 1.9; }
.plt-msg-by { font-size: 12px; color: #b9c2d6; }
.plt-quote { display: flex; gap: 12px; align-items: center; padding: 12px 16px; margin-bottom: 14px; }
.plt-q-mark { font-size: 40px; line-height: 1; color: var(--gold); font-weight: 800; }
.plt-quote p { margin: 0; font-weight: 600; line-height: 1.8; }
.plt-quote small { color: var(--text-3); }
.plt-tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 18px; }
.plt-tile { position: relative; display: flex; flex-direction: column; gap: 6px; padding: 16px; min-height: 128px; text-decoration: none !important; color: inherit;
  transition: border-color .12s, box-shadow .12s, transform .12s; }
.plt-tile:hover { border-color: var(--primary-2); box-shadow: var(--shadow); }
.plt-tile .plt-ti { width: 44px; height: 44px; border-radius: 12px; background: var(--primary-soft); color: var(--primary); display: grid; place-items: center; }
.plt-tile .plt-ti .i { width: 22px; height: 22px; }
.plt-tile b { font-size: 15px; }
.plt-tile small { color: var(--text-3); font-size: 12.5px; line-height: 1.6; }
.plt-tile .plt-st { position: absolute; top: 12px; inset-inline-end: 12px; }
.plt-tile.lit { border-color: var(--gold); box-shadow: 0 0 0 1px var(--gold) inset; background: linear-gradient(180deg, var(--gold-soft), var(--surface) 60%); }
.plt-tile.lit .plt-ti { background: var(--gold); color: var(--gold-ink); }
.badge.plt-new { background: var(--gold); color: var(--gold-ink); }
.plt-seen { width: 26px; height: 26px; border-radius: 50%; background: var(--ok-soft); color: var(--ok); display: grid; place-items: center; }
.plt-seen .i { width: 16px; height: 16px; }
.plt-tile.locked { opacity: .62; cursor: default; }
.plt-tile.locked .plt-ti { background: var(--surface-3); color: var(--text-3); }
.plt-h2 { font-size: 15px; font-weight: 800; margin: 6px 0 10px; }
@media (max-width: 1100px) { .plt-tiles { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 760px) {
  .plt-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .plt-tile { min-height: 112px; padding: 12px; }
  .plt-hello-act { margin-inline-start: 0; width: 100%; }
}
/* اعلان‌ها */
.plt-notifs { padding: 4px 0; }
.plt-n { display: flex; gap: 12px; align-items: flex-start; padding: 12px 16px; border-bottom: 1px solid var(--border); color: inherit; text-decoration: none !important; }
.plt-n:last-child { border-bottom: 0; }
.plt-n:hover { background: var(--surface-2); }
.plt-n b { font-weight: 700; }
.plt-n.read b { font-weight: 500; color: var(--text-2); }
.plt-n:not(.read) { background: color-mix(in srgb, var(--gold-soft) 55%, transparent); }
.plt-n-ic { width: 34px; height: 34px; border-radius: 10px; background: var(--primary-soft); color: var(--primary); display: grid; place-items: center; flex: none; }
.plt-n.urgent:not(.read) .plt-n-ic { background: var(--gold); color: var(--gold-ink); }
.plt-n > div { flex: 1; min-width: 0; }
.plt-chk { display: flex; gap: 10px; align-items: flex-start; }
.plt-chk-i { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; flex: none; }
.plt-chk-i.ok { background: var(--ok-soft); color: var(--ok); }
.plt-chk-i.bad { background: var(--danger-soft); color: var(--danger-strong); }
.plt-chk-i.warn { background: var(--accent-soft); color: var(--accent); }
.plt-chk-i .i { width: 15px; height: 15px; }
.plt-tips { margin: 0; padding-inline-start: 18px; line-height: 2; }
/* دستگاه‌ها */
.plt-switch { align-items: flex-start; }
.plt-pending { border-color: var(--gold); }
.plt-dev { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.plt-dev-ic { width: 40px; height: 40px; border-radius: 12px; background: var(--gold-soft); color: var(--accent); display: grid; place-items: center; flex: none; }
.plt-roles { display: flex; gap: 14px; flex-wrap: wrap; align-items: center; }
.plt-order { display: flex; flex-direction: column; gap: 4px; }
.plt-order-row { display: flex; gap: 8px; align-items: center; padding: 6px 10px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); }
.plt-order-row.off { opacity: .55; }
.plt-order-n { width: 24px; text-align: center; color: var(--text-3); font-size: 12px; }
@media print { .page-tools, .bottom-bar { display: none !important; } }

/* ── مرکز تنظیمات ← صندوق فروش (گام ۳۳) ── */
.pos-lay-pick { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 10px; }
.pos-lay-opt { display: grid; gap: 6px; justify-items: start; text-align: start; padding: 12px; border-radius: 12px; border: 2px solid var(--border); background: var(--surface); color: var(--text); font: inherit; cursor: pointer; }
.pos-lay-opt:hover { border-color: var(--border-strong); }
.pos-lay-opt.on { border-color: var(--gold); box-shadow: 0 0 0 3px var(--gold-soft); }
.pos-lay-ic { width: 100%; height: 54px; border-radius: 8px; background: var(--surface-3); display: grid; gap: 4px; padding: 6px; box-sizing: border-box; }
.pos-lay-ic i { display: block; border-radius: 3px; background: var(--border-strong); }
.pos-lay-ic.l-compact { grid-template-columns: 2.4fr 1fr; grid-template-rows: 1fr 8px; }
.pos-lay-ic.l-compact i:nth-child(1) { grid-row: 1; }
.pos-lay-ic.l-compact i:nth-child(3) { grid-column: 1 / -1; background: var(--primary); }
.pos-lay-ic.l-mahak { grid-template-rows: 8px 1fr 12px; }
.pos-lay-ic.l-mahak i:nth-child(3) { background: var(--primary); }
.pos-lay-ic.l-erp { grid-template-columns: 1fr 1.6fr; grid-template-rows: 1fr 8px; }
.pos-lay-ic.l-erp i:nth-child(3) { grid-column: 1 / -1; background: var(--primary); }
.pos-qg { display: grid; gap: 8px; padding: 10px 12px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface-2); }
.pos-qg-n { min-width: 26px; height: 26px; border-radius: 7px; display: grid; place-items: center; background: var(--primary); color: var(--primary-ink); font-weight: 800; font-size: 13px; }

/* ── هشدار بزرگ (امنیت فاکتور، گام ۳۴): خودش محو نمی‌شود؛ Enter = «ثبت نکن» ── */
.bigwarn-back { z-index: 2000; background: rgba(15, 20, 35, .62); }
.bigwarn { width: min(640px, calc(100vw - 24px)); max-height: calc(100dvh - 24px); overflow: auto; background: var(--surface); color: var(--text);
  border: 3px solid var(--danger); border-radius: 16px; box-shadow: var(--shadow-lg); }
.bigwarn-head { background: var(--danger); color: #fff; padding: 16px 20px; display: flex; align-items: center; gap: 12px; font-size: 20px; }
.bigwarn-head .ico { width: 28px; height: 28px; }
.bigwarn-body { padding: 18px 20px 20px; display: flex; flex-direction: column; gap: 14px; }
.bigwarn-msg { font-size: 16px; line-height: 1.8; margin: 0; }
.bigwarn-cmp { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.bigwarn-cmp > div { border: 1px solid var(--border); border-radius: 12px; padding: 10px 12px; background: var(--surface-2); min-width: 0; }
.bigwarn-cmp small { display: block; color: var(--text-3); font-size: 12px; }
.bigwarn-cmp b { font-size: 16px; }
.bigwarn-lines { max-height: 220px; overflow: auto; border: 1px solid var(--border); border-radius: 12px; }
.bigwarn-acts { display: flex; gap: 10px; flex-wrap: wrap; }
.bigwarn-acts .btn { flex: 1 1 220px; min-height: 56px; font-size: 16px; justify-content: center; }
.bigwarn-yes .kbd { opacity: .8; }
.bigwarn.shake { animation: bigwarn-shake .35s; }
@keyframes bigwarn-shake { 0%, 100% { transform: none; } 25% { transform: translateX(-8px); } 75% { transform: translateX(8px); } }
@media (prefers-reduced-motion: reduce) { .bigwarn.shake { animation: none; outline: 4px solid var(--gold); } }
@media (max-width: 560px) { .bigwarn-cmp { grid-template-columns: 1fr; } .bigwarn-head { font-size: 17px; } }
.pos-lay-ic.l-auto { grid-template-columns: 1fr 1fr 1fr; background: repeating-linear-gradient(135deg, var(--surface-3) 0 6px, var(--surface-2) 6px 12px); }
.pos-lay-ic.l-auto i { background: var(--gold); opacity: .7; }

/* ── جستجوی سراسری و پنجرهٔ شناور (بستهٔ اصلاحی ۲، ت۴ و ت۱۳) ── */
.nav-search {
  display: flex; align-items: center; gap: 8px; width: 100%; margin: 0 0 10px; padding: 8px 10px; direction: rtl;
  border: 1px solid var(--border); border-radius: 9px; background: var(--surface-2); color: var(--text-3);
  font: inherit; font-size: 13px; cursor: text; text-align: start;
}
.nav-search:hover, .nav-search:focus-visible { border-color: var(--primary); color: var(--text-2); outline: none; }
.nav-search > span:nth-child(2) { flex: 1; }
.nav-search .kbd, .srch .kbd {
  font-size: 10.5px; padding: 1px 6px; border: 1px solid var(--border); border-radius: 5px; background: var(--surface);
  color: var(--text-3); font-family: inherit; white-space: nowrap; direction: ltr;
}
.srch-back {
  position: fixed; inset: 0; z-index: 85; background: rgba(10, 16, 22, .38); display: flex; justify-content: center;
  align-items: flex-start; padding: 9vh 16px 16px; animation: fade .12s ease;
}
.srch {
  width: min(640px, 100%); max-height: min(70vh, 620px); display: flex; flex-direction: column; overflow: hidden;
  background: var(--surface); border: 1px solid var(--border-strong); border-radius: 14px; box-shadow: var(--shadow-lg);
}
.srch-head { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-bottom: 1px solid var(--border); }
.srch-head > svg { color: var(--text-3); flex: none; }
.srch-in.input { border: 0; box-shadow: none; padding: 6px 0; font-size: 15px; background: transparent; min-width: 0; }
.srch-in.input:focus { box-shadow: none; outline: none; }
.srch-list { overflow-y: auto; padding: 6px; min-height: 0; }
.srch-sec { font-size: 11.5px; font-weight: 700; color: var(--text-3); padding: 8px 10px 4px; }
.srch-row { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 9px; cursor: pointer; }
.srch-row.on { background: var(--primary-soft); }
.srch-ic { width: 30px; height: 30px; flex: none; display: grid; place-items: center; border-radius: 8px; background: var(--surface-3); color: var(--text-2); }
.srch-row.on .srch-ic { color: var(--primary); background: var(--surface); }
.srch-t { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.srch-t > b { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.srch-t > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.srch-go { opacity: 0; }
.srch-row.on .srch-go, .srch-row:hover .srch-go { opacity: 1; }
.srch-status:not(:empty) { padding: 8px 16px; }
.srch-foot { display: flex; gap: 16px; padding: 8px 14px; border-top: 1px solid var(--border); background: var(--surface-2); }
@media (max-width: 720px) {
  .srch .hide-sm, .fw .hide-sm { display: none; }
  .srch-back { padding: 8px; }
  .srch { max-height: calc(100dvh - 16px); }
  .srch-go { opacity: 1; }
}
.fw {
  position: fixed; z-index: 60; display: flex; flex-direction: column; min-width: 320px; min-height: 220px;
  max-width: 100vw; max-height: 100vh; resize: both; overflow: hidden;
  background: var(--surface); border: 1px solid var(--border-strong); border-radius: 12px; box-shadow: var(--shadow-lg);
}
.fw.front { z-index: 61; }
.fw-head {
  display: flex; align-items: center; gap: 8px; padding: 6px 8px 6px 6px; cursor: move; user-select: none; touch-action: none;
  background: var(--surface-2); border-bottom: 1px solid var(--border);
}
.fw-head > svg { color: var(--text-3); margin-inline-start: 6px; }
.fw-title { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13.5px; }
.fw-frame { flex: 1; width: 100%; border: 0; background: var(--bg); }
.fw.max { inset: 8px !important; width: auto !important; height: auto !important; resize: none; }
.fw.max .fw-head { cursor: default; }
.fw-dragging .fw-frame { pointer-events: none; }
@media (max-width: 720px) { .fw.max { inset: 0 !important; border-radius: 0; } }
/* داخل پنجرهٔ شناور: بدون منو و نوار بالا */
.shell.embed { display: block; height: auto; min-height: 100vh; overflow: visible; }
.shell.embed .main { padding: 14px 16px 40px; overflow: visible; direction: rtl; }
/* فلش برگشت و «؟» روی صفحه‌های سرآغاز (بستهٔ اصلاحی ۲، ت۲۱) */
.desk-top { display: flex; align-items: center; gap: 8px; }
.desk-hero .page-tools .btn { color: #fff; }
.desk-hero .page-tools .btn:hover { background: rgba(255, 255, 255, .14); }
.plt-hello > .page-tools, .vis-hero .page-tools { align-self: flex-start; }
.page-head > .page-tools:first-child { flex: none; }
/* دستگاه‌ها: کارهای مجاز، قفل‌ها و راه‌اندازی اول (بستهٔ اصلاحی ۲) */
.dev-sec { display: flex; flex-direction: column; gap: 8px; padding-top: 12px; border-top: 1px solid var(--border); }
.dev-tasks, .dev-locks { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 10px 16px; }
.text-bad { color: var(--bad, #b42318); }
.dev-steps { list-style: none; display: flex; gap: 6px; padding: 0; margin: 0 0 14px; overflow-x: auto; scrollbar-width: none; }
.dev-steps li { display: flex; align-items: center; gap: 6px; padding: 6px 10px 6px 12px; border-radius: 999px; background: var(--surface-3); color: var(--text-3); font-size: 12.5px; white-space: nowrap; }
.dev-steps li > span { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; background: var(--surface); font-weight: 700; font-size: 11.5px; }
.dev-steps li > span svg { width: 13px; height: 13px; }
.dev-steps li.on { background: var(--primary); color: var(--primary-ink); }
.dev-steps li.on > span { color: var(--primary); }
.dev-steps li.done { background: var(--primary-soft); color: var(--primary); }
.dev-wizard { max-width: 760px; }
@media (max-width: 720px) { .dev-steps li:not(.on) b { display: none; } }

/* ── رسید حرارتی پنل فروش (۸۰ یا ۵۸ میلی‌متر) و تنظیمات چاپ رسید؛ مشترک پنل فروش و صفحهٔ «تنظیم صندوق» ERP (بستهٔ اصلاحی ۳) ──
   اندازهٔ کاغذ (@page) را خود چاپ رسید هنگام چاپ می‌گذارد تا چاپ‌های دیگر ERP (A4) دست نخورند */
/* ── چاپ رسید حرارتی ۸۰ میلی‌متری ── */
.pos-print { display: none; }
/* ت۷۱: نسخهٔ پنهان برای اندازه گرفتن بلندی رسید (همان پهنا و قلم چاپ) */
.pos-print.pos-print-measure { display: block; position: fixed; inset-inline-start: -10000px; top: 0; visibility: hidden; pointer-events: none; width: 72mm; font-size: 11.5px; line-height: 1.55; }
.pos-print.pos-print-measure.w58 { width: 50mm; font-size: 10px; }
@media print {
  body.pos-printing { background: #fff !important; color: #000 !important; overflow: visible; }
  body.pos-printing > *:not(.pos-print) { display: none !important; }
  body.pos-printing .pos-print { display: block; width: 72mm; font-size: 11.5px; line-height: 1.55; color: #000; }
}
.pos-print .c { text-align: center; }
.pos-print h2 { font-size: 15px; margin: 0 0 2px; text-align: center; }
.pos-print .muted { color: #333; }
.pos-print table { width: 100%; border-collapse: collapse; }
.pos-print td, .pos-print th { padding: 2px 0; vertical-align: top; }
.pos-print th { border-bottom: 1px solid #000; font-size: 10.5px; text-align: right; }
.pos-print td.n, .pos-print th.n { text-align: left; white-space: nowrap; font-variant-numeric: tabular-nums; }
.pos-print .sep { border-top: 1px dashed #000; margin: 5px 0; }
.pos-print .tot { font-size: 15px; font-weight: 900; }
.pos-print .big { font-size: 22px; font-weight: 900; text-align: center; margin: 4px 0; }
.pos-print .copy { border: 2px solid #000; text-align: center; font-size: 17px; font-weight: 900; padding: 3px 0; margin-bottom: 6px; }
.pos-print .copy small { font-size: 11px; font-weight: 700; }
/* ── بستهٔ اصلاحی ۳ (ت۱۶ح): تنظیمات چاپ رسید داخل پنل؛ فرم راست، پیش‌نمایش کاغذ ۸۰ میلی‌متری چپ ── */
.pos-prset { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 18px; align-items: start; }
.pos-prset-form textarea.input { resize: vertical; min-height: 72px; font: inherit; }
.pos-prset-note { display: flex; gap: 8px; align-items: flex-start; padding: 8px 10px; border-radius: 8px; background: var(--surface-2); color: var(--text-2); font-size: 13px; }
.pos-prset-note svg { flex: none; margin-top: 2px; }
.pos-prset-pv { display: grid; gap: 6px; justify-items: center; padding: 12px; border-radius: 10px; background: var(--surface-2); max-height: calc(100vh - 230px); overflow: auto; box-sizing: border-box; }
.pos-print.pos-print-preview { display: block; width: 72mm; box-sizing: content-box; padding: 4mm 3mm 6mm; background: #fff; color: #000; font-size: 11.5px; line-height: 1.55;
  box-shadow: 0 1px 2px rgba(0,0,0,.12), 0 6px 18px rgba(0,0,0,.10); border-radius: 2px; }
@media (max-width: 760px) { .pos-prset { grid-template-columns: 1fr; } }
.pos-prset-form { max-height: calc(100vh - 230px); overflow: auto; padding-inline-end: 4px; align-content: start; }
.pos-prset-sec { display: grid; gap: 10px; }
.pos-prset-sec.hidden { display: none; }
.pos-prset-tabs { align-self: start; }
.pos-prset-h select { flex: 1; }
.pos-prset-sec h4 { margin: 0; font-size: 14px; }
.pos-prset-h { display: flex; align-items: center; gap: 6px; }
.pos-prset-parts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px 14px; }
.pos-prset-parts .check { font-size: 13px; }
.pos-print .note { white-space: pre-line; font-weight: 700; margin-top: 3px; }
.pos-print .save { display: flex; justify-content: space-between; border: 1.5px solid #000; padding: 3px 5px; margin: 4px 0; font-weight: 900; font-size: 13px; }
.pos-print .pos-copy-break { break-before: page; page-break-before: always; }
.pos-print.pos-print-preview .pos-copy-break { margin-top: 10px; border-top: 2px dashed #999; padding-top: 8px; }
.pos-print.pos-print-preview.w58 { width: 50mm; font-size: 10px; }
.pos-print.w58 h2 { font-size: 13px; }
.pos-print.w58 .tot { font-size: 13px; }
.pos-print.w58 .save { font-size: 11.5px; }
@media print { body.pos-printing .pos-print.w58 { width: 50mm; font-size: 10px; } }
.pos-prset-form > * { flex-shrink: 0; }

/* ── پیش‌نمایش زندهٔ پنل فروش در «تنظیم صندوق» (بستهٔ اصلاحی ۳، ت۱۵) ── */
.pss-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; }
.pss-grid > .pspv { order: -1; }
.pspv .card-head { gap: 8px; flex-wrap: wrap; }
.pspv .seg button { height: 30px; font-size: 12.5px; }
.pspv-box { position: relative; overflow: hidden; border-radius: 10px; border: 1px solid var(--border); background: var(--surface-2); }
.pspv-frame { position: absolute; top: 0; right: 0; border: 0; transform-origin: top right; pointer-events: none; background: var(--bg); }
.pspv.big { position: fixed; inset: 12px; z-index: 60; overflow: auto; box-shadow: var(--shadow-lg); }
.pss-wrap { container-type: inline-size; }
@container (min-width: 1000px) {
  .pss-grid { grid-template-columns: minmax(0, 1fr) minmax(380px, 46%); align-items: start; }
  .pss-grid > .pspv { order: 0; position: sticky; top: 12px; }
  .pss-grid > .pspv.big { position: fixed; }
}

/* ── مرکز تنظیمات ← رنگ‌ها (بستهٔ اصلاحی ۳، ت۱) ── */
.clr-presets { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.clr-preset { display: grid; gap: 8px; padding: 10px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); color: var(--text); font: inherit; cursor: pointer; text-align: start; }
.clr-preset:hover { border-color: var(--border-strong); }
.clr-preset.on { border-color: var(--primary); box-shadow: 0 0 0 2px var(--primary-soft); }
.clr-preset b { font-size: 13px; }
.clr-sw { display: flex; height: 26px; border-radius: 7px; overflow: hidden; border: 1px solid rgba(0, 0, 0, .08); }
.clr-sw i { flex: 1; }
.clr-list, .clr-secs { display: grid; gap: 8px; }
.clr-secs { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.clr-row { display: grid; grid-template-columns: minmax(0, 1fr) 44px 96px auto; align-items: center; gap: 8px; padding: 6px 8px; border-radius: 8px; }
.clr-row.custom { background: var(--surface-2); }
.clr-lbl b { font-size: 13.5px; }
.clr-pick { width: 44px; height: 34px; padding: 2px; border: 1px solid var(--border-strong); border-radius: 8px; background: var(--surface); cursor: pointer; }
.clr-hex { height: 34px; font-size: 13px; text-align: left; }
.clr-warn { color: var(--danger-strong); }
.clr-warn:empty { display: none; }

/* ── بستهٔ اصلاحی ۳: مرکز سلامت کوتاه (ت۲۶) و ردپای تغییرات روزانه (ت۲۷) ── */
.health-more > summary { cursor: pointer; padding: 10px 0 4px; color: var(--text-2); font-weight: 600; }
.health-ok .health-row { padding: 6px 0; }
.audit-day { border-bottom: 1px solid var(--border); }
.audit-day > summary { display: flex; align-items: center; gap: 10px; padding: 12px 16px; cursor: pointer; background: var(--surface-2); }
.audit-day[open] > summary { border-bottom: 1px solid var(--border); }

/* گام ۳۵: میز مدیر — زبانه‌های تأییدیه */
.desk-approvals .desk-tabs { max-width: 100%; overflow-x: auto; }
.desk-approvals .desk-tabs .badge { margin-inline-start: 2px; }
.desk-approvals .desk-reqs { max-height: 440px; overflow-y: auto; padding-inline-end: 2px; }
@media (max-width: 640px) { .desk-approvals .desk-reqs { max-height: none; } }

/* ── گام ۳۵ بستهٔ ب: قالب چاپ (طراح فرم) — برگ‌ها به میلی‌متر ── */
.pf-page { position: relative; background: #fff; color: #111; overflow: hidden; box-sizing: border-box; font-family: 'Vazirmatn', system-ui, sans-serif; direction: rtl; flex: none; }
.pf-page.is-draft::after { content: 'پیش‌نویس'; position: absolute; inset: 0; display: grid; place-items: center; font-size: 60pt; font-weight: 900; color: rgba(200, 30, 30, .08); transform: rotate(-20deg); pointer-events: none; }
.pf-sheet { display: grid; gap: 0; align-content: start; justify-content: center; }
.pf-label { position: relative; overflow: hidden; background: #fff; box-sizing: border-box; }
.pf-b { overflow: hidden; }
.pf-b .pf-lbl { color: #555; font-weight: 600; }
.pf-table { width: 100%; border-collapse: collapse; table-layout: fixed; }
.pf-table th { background: #f1f1f1; font-weight: 800; padding: .6mm 1mm; text-align: center; white-space: nowrap; overflow: hidden; }
.pf-table td { padding: .5mm 1mm; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.pf-table td.n { text-align: left; direction: ltr; font-variant-numeric: tabular-nums; }
.pf-table td.c { text-align: center; }
.pf-table.bd th, .pf-table.bd td { border: .2mm solid #777; }
.pf-table.zb tbody tr:nth-child(even) td { background: #f7f7f7; }
.pf-totals .pf-tr, .pf-b .pf-tr { display: flex; justify-content: space-between; gap: 2mm; padding: .4mm 0; border-bottom: .15mm dotted #bbb; }
.pf-b .pf-tr.big b { font-size: 1.15em; }
.pf-sign-l { font-weight: 700; }
.pf-sign-n { margin-top: 1mm; min-height: 4mm; border-top: .2mm solid #999; padding-top: .8mm; color: #333; }
.pf-bc { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; }
.pf-bc svg { width: 100%; height: 100%; }
.pf-ph { width: 100%; height: 100%; display: grid; place-items: center; border: .3mm dashed #aaa; color: #888; font-size: 8pt; }
.pf-preview { display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 12px; background: var(--surface-3); border-radius: 12px; overflow: auto; }
.pf-preview .pf-pwrap { zoom: var(--pf-scale, 1); box-shadow: 0 4px 18px rgba(0, 0, 0, .18); }
.pf-print { display: none; }
@media print {
  body.pf-printing > *:not(.pf-print) { display: none !important; }
  body.pf-printing .pf-print { display: block; }
  body.pf-printing { margin: 0; background: #fff; }
  .pf-print .pf-page { break-after: page; page-break-after: always; box-shadow: none; }
  .pf-print .pf-page:last-child { break-after: auto; page-break-after: auto; }
}
/* طراح فرم */
.pf-bar { display: flex; align-items: end; flex-wrap: wrap; gap: 10px 16px; padding: 10px 14px !important; margin-bottom: 10px; }
.pf-bar .field { min-width: 220px; margin: 0; }
.pf-designer { display: grid; grid-template-columns: 210px minmax(0, 1fr) 290px; gap: 10px; min-height: 70vh; align-items: start; }
.pf-pal, .pf-props { padding: 10px !important; display: flex; flex-direction: column; gap: 8px; position: sticky; top: 10px; max-height: calc(100vh - 120px); overflow-y: auto; }
.pf-sec { font-size: 12.5px; font-weight: 800; color: var(--text-2); display: flex; align-items: center; gap: 6px; margin-top: 4px; }
.pf-tools { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.pf-tool { display: flex; align-items: center; gap: 6px; height: 34px; padding: 0 8px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface); color: var(--text); font: inherit; font-size: 12.5px; font-weight: 700; cursor: grab; }
.pf-tool:hover:not(:disabled) { background: var(--surface-2); border-color: var(--border-strong); }
.pf-tool svg.i { width: 15px; height: 15px; color: var(--accent); }
.pf-fields { display: flex; flex-wrap: wrap; gap: 4px; }
.pf-fld { height: 26px; padding: 0 8px; border: 1px dashed var(--border-strong); border-radius: 999px; background: var(--surface); color: var(--text-2); font: inherit; font-size: 11.5px; cursor: grab; }
.pf-fld:hover:not(:disabled) { background: var(--gold-soft); color: var(--text); border-style: solid; }
.pf-canvas { min-height: 60vh; background: var(--surface-3); border-radius: 12px; padding: 20px; overflow: auto; display: flex; justify-content: center; align-items: flex-start; }
.pf-stage { position: relative; flex: none; box-shadow: 0 6px 24px rgba(0, 0, 0, .18); }
.pf-stage.grid .pf-page { background-image: linear-gradient(rgba(60, 90, 160, .08) 1px, transparent 1px), linear-gradient(90deg, rgba(60, 90, 160, .08) 1px, transparent 1px),
  linear-gradient(rgba(60, 90, 160, .16) 1px, transparent 1px), linear-gradient(90deg, rgba(60, 90, 160, .16) 1px, transparent 1px);
  background-size: 1mm 1mm, 1mm 1mm, 10mm 10mm, 10mm 10mm; }
.pf-margin { position: absolute; border: 1px dashed rgba(200, 60, 40, .35); pointer-events: none; }
.pf-design .pf-b { cursor: move; outline: 1px dashed rgba(60, 90, 160, .28); outline-offset: 0; }
.pf-design .pf-b:hover { outline-color: rgba(60, 90, 160, .7); }
.pf-design .pf-b.sel { outline: 2px solid #2563eb; z-index: 5; overflow: visible; }
.pf-design .pf-line { min-height: 2mm; }
.pf-h { position: absolute; width: 2.4mm; height: 2.4mm; background: #2563eb; border: .3mm solid #fff; border-radius: .6mm; z-index: 6; }
.pf-h.br { right: -1.2mm; bottom: -1.2mm; cursor: nwse-resize; }
.pf-h.bl { left: -1.2mm; bottom: -1.2mm; cursor: nesw-resize; }
.pf-h.r { right: -1.2mm; top: calc(50% - 1.2mm); cursor: ew-resize; }
.pf-h.b { bottom: -1.2mm; left: calc(50% - 1.2mm); cursor: ns-resize; }
.pf-g2 { grid-template-columns: 1fr 1fr !important; gap: 6px !important; }
.pf-props .field { margin: 0; }
.pf-cols { display: grid; gap: 4px; }
.pf-col { display: grid; grid-template-columns: 20px 1fr 56px; gap: 4px; align-items: center; }
.pf-col.off .input { opacity: .5; }
.pf-row { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); }
.pf-row.off { opacity: .65; }
.pf-row .badge { margin-inline-start: 6px; }
@media (max-width: 1100px) {
  .pf-designer { grid-template-columns: 1fr; }
  .pf-pal, .pf-props { position: static; max-height: none; }
}
/* بازبینی بستهٔ ب */
.pf-page.is-cancelled::after { content: 'برگشت خورده'; position: absolute; inset: 0; display: grid; place-items: center; font-size: 48pt; font-weight: 900; color: rgba(200, 30, 30, .12); transform: rotate(-20deg); pointer-events: none; }
.pf-design .pf-b { touch-action: none; }
.pf-usebar { gap: 8px; align-items: center; margin-bottom: 10px; }
@media print {
  /* Ctrl+P روی صفحهٔ چاپ با قالب انتخابی: خود برگ‌ها به اندازهٔ واقعی */
  .pf-view .pf-preview { background: none; padding: 0; gap: 0; display: block; }
  .pf-view .pf-pwrap { zoom: 1 !important; box-shadow: none; }
  .pf-view .pf-page { break-after: page; }
}

/* ── گام ۳۵ بستهٔ ج: گزارش نوشتاری مدیر ── */
.narr-bar { gap: 10px; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.narr-nav { gap: 6px; flex-wrap: wrap; }
.narr-lines { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.narr-line { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--border); line-height: 1.9; }
.narr-line .mk { width: 28px; height: 28px; border-radius: 8px; display: grid; place-items: center; flex-shrink: 0; margin-top: 1px; }
.narr-line .mk .i { width: 15px; height: 15px; }
.narr-line.ok .mk { background: var(--ok-soft); color: var(--ok); }
.narr-line.bad .mk { background: var(--danger-soft); color: var(--danger-strong); }
.narr-line.warn .mk { background: var(--accent-soft); color: var(--accent); }
.narr-line.info .mk { background: var(--info-soft); color: var(--info); }
.narr-line .grow { min-width: 0; overflow-wrap: anywhere; }
.narr-more { white-space: nowrap; margin-top: 4px; }
.narr-cost { font-size: 11px; color: var(--text-3); border: 1px solid var(--border); border-radius: 6px; padding: 0 5px; margin-inline-start: 4px; }
.narr-kpis .kpi .value { font-size: 18px; }
@media (max-width: 640px) { .narr-bar { flex-direction: column; align-items: stretch; } .narr-line { padding: 8px 10px; } .narr-kpis { grid-template-columns: 1fr 1fr !important; gap: 8px; } .narr-kpis .kpi .value { font-size: 15px; } }
@media print {
  .narr-card { border: 0; box-shadow: none; }
  .narr-line { break-inside: avoid; border-color: #bbb; }
  .narr-line .mk { border: 1px solid #999; background: none !important; color: #000 !important; }
}
.desk-narr { margin-bottom: 16px; }

/* ── بستهٔ اصلاحی ۶: ماژول «نسیه» (ت۴۴ و ت۴۹؛ موبایل‌اول) ── */
.cr-page { max-width: 1100px; }
.cr-tabs { display: inline-flex; }
.cr-tabs a.seg-btn { display: inline-flex; align-items: center; gap: 6px; padding: 0 14px; height: 38px; background: var(--surface); color: var(--text-2); font-weight: 700; text-decoration: none; }
.cr-tabs a.seg-btn + a.seg-btn { border-inline-start: 1px solid var(--border-strong); }
.cr-tabs a.seg-btn.on { background: var(--primary-soft); color: var(--primary); }
.cr-tabs svg.i { width: 16px; height: 16px; }
.cr-policy { display: flex; gap: 10px; align-items: flex-start; cursor: pointer; }
.cr-policy input { width: 18px; height: 18px; margin-top: 2px; accent-color: var(--primary); flex: none; }
.cr-filter { gap: 8px; }
.cr-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 420px), 1fr)); gap: 10px; }
.cr-card { padding: 12px 14px; display: grid; gap: 8px; }
.cr-card.off { opacity: .65; }
.cr-card-h { display: flex; align-items: flex-start; gap: 8px; }
.cr-card-h b { font-size: 15px; }
.cr-nums { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 8px; }
.cr-nums > div { display: grid; gap: 2px; background: var(--surface-2); border-radius: 8px; padding: 6px 8px; min-width: 0; }
.cr-nums small { color: var(--text-3); font-size: 11.5px; }
.cr-nums b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cr-nums b.bad { color: var(--danger-strong); }
.cr-room { background: var(--gold-soft) !important; }
.cr-actions { display: flex; flex-wrap: wrap; gap: 6px; }
.cr-actions:empty { display: none; }
.cr-ok { color: var(--ok); }
.cr-lh { padding-inline: 0; flex-wrap: wrap; gap: 8px; }
.cr-photo { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.cr-photo img { max-height: 160px; max-width: 100%; border-radius: 10px; border: 1px solid var(--border); }
.cr-photo-big { max-width: 100%; max-height: 75vh; display: block; margin: 0 auto; border-radius: 10px; }
@media (max-width: 640px) {
  .cr-nums { grid-template-columns: 1fr 1fr; }
  .cr-actions .btn { flex: 1 1 auto; justify-content: center; min-height: 44px; }
  .cr-tabs { display: flex; } .cr-tabs a.seg-btn { flex: 1; justify-content: center; }
}

/* ═════════════ پرسنل (گام ۳۶، بخش ۱) — پیشوند stf- ═════════════ */
.stf-tabs { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 4px; margin-bottom: 12px; scrollbar-width: thin; }
.stf-tab { display: inline-flex; align-items: center; gap: 6px; padding: 0 12px; height: 36px; border-radius: 999px; border: 1px solid var(--border); background: var(--surface); color: var(--text-2); font-weight: 700; font-size: 13px; text-decoration: none; white-space: nowrap; flex: none; }
.stf-tab svg.i { width: 16px; height: 16px; }
.stf-tab.on { background: var(--primary); border-color: var(--primary); color: var(--primary-ink); }
.stf-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 14px; align-items: start; }
.stf-narrow { max-width: 760px; }
.stf-filter { gap: 8px; margin-bottom: 12px; align-items: flex-end; }
.stf-filter .field { margin: 0; }
.stf-acts { display: flex; flex-wrap: wrap; gap: 6px; }
.stf-acts:empty { display: none; }
.stf-me { padding: 16px; display: grid; gap: 14px; }
.stf-me-h { display: flex; align-items: flex-start; gap: 10px; justify-content: space-between; }
.stf-me-h h2 { margin: 0; font-size: 17px; }
.stf-punch { display: grid; place-items: center; gap: 2px; width: 100%; min-height: 128px; border: 0; border-radius: 18px; cursor: pointer; font-family: inherit; color: #fff;
  background: linear-gradient(135deg, #157a3a, #1f9a4c); box-shadow: 0 6px 20px rgba(21, 122, 58, .28); transition: transform .08s ease, filter .15s ease; }
.stf-punch.out { background: linear-gradient(135deg, var(--primary), var(--primary-2)); box-shadow: 0 6px 20px rgba(27, 35, 54, .28); }
:root[data-theme='dark'] .stf-punch.out { color: var(--primary-ink); }
.stf-punch svg.i { width: 34px; height: 34px; }
.stf-punch b { font-size: 28px; font-weight: 900; }
.stf-punch small { opacity: .9; font-size: 12.5px; }
.stf-punch:active { transform: scale(.985); }
.stf-punch:disabled { filter: grayscale(.9); opacity: .55; cursor: not-allowed; }
.stf-punch.loading { opacity: .7; pointer-events: none; }
.stf-today { display: grid; gap: 6px; }
.stf-sline { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.stf-plist { display: flex; flex-wrap: wrap; gap: 6px; }
.stf-pchip { display: inline-flex; align-items: center; gap: 4px; padding: 3px 9px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--border); font-size: 13px; font-variant-numeric: tabular-nums; }
.stf-pchip svg.i { width: 14px; height: 14px; }
.stf-pchip small { color: var(--text-3); }
.stf-pchip.void { text-decoration: line-through; opacity: .6; }
.stf-nums { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.stf-nums > div { display: grid; gap: 2px; background: var(--surface-2); border-radius: 8px; padding: 8px 10px; min-width: 0; }
.stf-nums small { color: var(--text-3); font-size: 11.5px; }
.stf-nums b { font-size: 16px; font-variant-numeric: tabular-nums; }
.stf-room { background: var(--gold-soft) !important; }
.stf-week { display: grid; grid-template-columns: minmax(0, 1fr); gap: 4px; }
.stf-wrow { display: flex; align-items: center; gap: 10px; padding: 7px 8px; border-radius: 8px; }
.stf-wrow.today { background: var(--gold-soft); }
.stf-wrow > b { white-space: nowrap; }
.stf-wrow > .grow { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.stf-wd { width: 108px; flex: none; color: var(--text-2); font-size: 13px; }
.stf-req { display: flex; align-items: center; gap: 8px; padding: 8px 0; border-bottom: 1px solid var(--border); }
.stf-req:last-child { border-bottom: 0; }
.stf-req .bad, .stf-ap .bad, .stf-paycard td.bad, .stf-table td.bad, .t td.bad { color: var(--danger-strong); }
.t td.warn { color: var(--accent); }
.stf-days { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 6px; }
.stf-day { display: grid; gap: 1px; padding: 6px 8px; border-radius: 8px; background: var(--surface-2); border-inline-start: 3px solid var(--border-strong); font-size: 12.5px; }
.stf-day.present { border-color: var(--ok); }
.stf-day.absent { border-color: var(--danger-strong); background: var(--danger-soft); }
.stf-day.leave { border-color: var(--info); }
.stf-day.no_out { border-color: var(--accent); background: var(--accent-soft); }
.stf-day small { color: var(--text-3); }
.stf-day small.bad { color: var(--danger-strong); }
.stf-aplist { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 380px), 1fr)); gap: 10px; }
.stf-ap { padding: 12px 14px; display: grid; gap: 8px; }
.stf-ap-h { display: flex; align-items: flex-start; gap: 8px; }
.stf-weekbar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.stf-weekbar b { font-variant-numeric: tabular-nums; }
.stf-weekbar select { width: auto; max-width: 220px; }
.stf-table th, .stf-table td { vertical-align: top; }
.stf-table thead th { text-align: center; white-space: nowrap; }
.stf-table thead th small { display: block; color: var(--text-3); font-weight: 600; }
.stf-table thead th.today { color: var(--accent); }
.stf-name { text-align: start; min-width: 120px; position: sticky; inset-inline-start: 0; background: var(--surface); z-index: 1; }
.stf-name b, .stf-name small { display: block; }
.stf-name small { color: var(--text-3); font-weight: 500; font-size: 11.5px; }
.stf-table tr.other .stf-name b { color: var(--text-2); }
.stf-cell { min-width: 96px; padding: 6px !important; }
.stf-cell.today { background: color-mix(in srgb, var(--gold-soft) 60%, transparent); }
.stf-cell.leave { background: var(--danger-soft); }
.stf-chip { display: grid; gap: 1px; width: 100%; padding: 5px 6px; margin-bottom: 4px; border-radius: 7px; border: 1px solid var(--border-strong); background: var(--surface); cursor: pointer; font-family: inherit; text-align: center; color: var(--text); font-variant-numeric: tabular-nums; }
.stf-chip.published { background: var(--primary-soft); border-color: transparent; }
.stf-chip.draft { border-style: dashed; background: var(--surface-2); color: var(--text-2); }
.stf-chip.mine { box-shadow: inset 0 0 0 2px var(--gold); }
.stf-chip small { font-size: 11px; color: var(--text-3); }
.stf-add { width: 100%; height: 26px; border: 1px dashed var(--border-strong); border-radius: 7px; background: transparent; color: var(--text-3); cursor: pointer; display: grid; place-items: center; opacity: .55; }
.stf-add:hover, .stf-add:focus-visible { opacity: 1; color: var(--primary); border-color: var(--primary); }
.stf-add svg.i { width: 14px; height: 14px; }
.stf-lv { display: flex; align-items: center; gap: 3px; justify-content: center; font-size: 11.5px; color: var(--danger-strong); margin-bottom: 4px; }
.stf-lv.pending { color: var(--accent); }
.stf-lv svg.i { width: 13px; height: 13px; }
.stf-mdays { display: none; }
.stf-mday { padding: 10px 12px; display: grid; gap: 6px; }
.stf-mday.today { box-shadow: inset 0 0 0 2px var(--gold); }
.stf-mday-h { display: flex; align-items: center; justify-content: space-between; }
.stf-mrow { display: flex; align-items: center; gap: 8px; width: 100%; padding: 8px 10px; border-radius: 8px; border: 1px solid var(--border); background: var(--surface-2); font-family: inherit; color: var(--text); cursor: pointer; text-align: start; }
.stf-mrow b { flex: 1; }
.stf-mrow span { font-variant-numeric: tabular-nums; }
.stf-mrow.draft { border-style: dashed; }
.stf-mrow.mine { box-shadow: inset 0 0 0 2px var(--gold); }
.stf-quick { display: flex; flex-wrap: wrap; gap: 6px; }
.stf-people, .stf-dir { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr)); gap: 10px; }
.stf-pcard, .stf-dcard { display: flex; align-items: center; gap: 12px; padding: 12px 14px; color: inherit; text-decoration: none; min-width: 0; }
.stf-pcard:hover { border-color: var(--border-strong); }
.stf-pcard.off { opacity: .6; }
.stf-pcard .grow, .stf-dcard .grow { min-width: 0; }
.stf-pcard .avatar, .stf-dcard .avatar { width: 40px; height: 40px; font-size: 16px; flex: none; }
.stf-dcard { flex-wrap: wrap; }
.stf-dcall { display: flex; flex-direction: column; gap: 4px; align-items: stretch; }
.stf-dcall .btn { justify-content: flex-start; }
.avatar.lg { width: 56px; height: 56px; font-size: 22px; flex: none; }
.stf-info { display: grid; gap: 14px; }
.stf-who { display: flex; gap: 12px; align-items: center; }
.stf-who h2 { margin: 0 0 2px; font-size: 18px; }
.stf-kvs { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 180px), 1fr)); gap: 8px; }
.stf-kv { display: grid; gap: 2px; background: var(--surface-2); border-radius: 8px; padding: 7px 10px; min-width: 0; }
.stf-kv small { color: var(--text-3); font-size: 11.5px; }
.stf-kv b, .stf-kv a { overflow-wrap: anywhere; }
.stf-hist { display: grid; gap: 2px; }
.stf-hrow { display: flex; gap: 10px; align-items: baseline; padding: 6px 0; border-bottom: 1px solid var(--border); }
.stf-hrow:last-child { border-bottom: 0; }
.stf-hrow > b { width: 70px; flex: none; font-size: 13px; }
.stf-doc { display: flex; align-items: center; gap: 10px; }
.stf-doc.off { opacity: .55; }
.stf-docimg { max-width: 100%; max-height: 75vh; display: block; margin: 0 auto; border-radius: 10px; }
.stf-board { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr)); gap: 12px; }
.stf-bunit.gap { box-shadow: inset 0 0 0 2px var(--danger); }
.stf-brow { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 6px 8px; border-radius: 8px; background: var(--surface-2); }
.stf-brow b { flex: 1 1 120px; }
.stf-brow .num { font-variant-numeric: tabular-nums; }
.stf-brow.gap { background: var(--danger-soft); }
.stf-brow.gap b { color: var(--danger-strong); text-decoration: line-through; }
.stf-free { display: grid; gap: 6px; }
.stf-free > div { display: flex; flex-wrap: wrap; gap: 4px; }
.stf-paycard { margin-top: 14px; }
@media (max-width: 960px) {
  .stf-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 760px) {
  .stf-gridwrap { display: none; }
  .stf-mdays { display: grid; gap: 10px; }
  .stf-nums { grid-template-columns: 1fr 1fr; }
  .stf-acts .btn { flex: 1 1 auto; justify-content: center; min-height: 44px; }
  .stf-dcall { flex-direction: row; flex-wrap: wrap; width: 100%; }
  .stf-dcall .btn { flex: 1 1 auto; min-height: 44px; }
  .stf-wd { width: 88px; }
}

/* ═════════════ یک نشانی (بخش ۱) ═════════════ */
.mv-card { text-align: center; }
.mv-ic { width: 56px; height: 56px; margin: 0 auto; border-radius: 16px; background: var(--gold-soft); color: var(--accent); display: grid; place-items: center; }
.mv-ic svg.i { width: 28px; height: 28px; }
.mv-url { font-size: 18px; font-weight: 800; padding: 10px; border-radius: 10px; background: var(--surface-2); border: 1px dashed var(--border-strong); }
.mv-card .alert { text-align: start; }
.mv-hint { margin-bottom: 12px; text-align: start; line-height: 1.8; }
.plt-groups { display: grid; gap: 4px; }
.plt-group .plt-tiles { margin-bottom: 10px; }

/* ── بخش ۲: عملیات فروشگاه (ops-) و ارتباطات (cm-) ── */
.ops-bar { gap: 8px; margin-bottom: 12px; align-items: center; }
.ops-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: 10px; }
.ops-task { display: grid; gap: 6px; padding: 12px 14px; color: inherit; text-decoration: none; min-width: 0; border-inline-start: 4px solid var(--border); }
a.ops-task:hover { border-color: var(--primary); }
.ops-task.hot { border-inline-start-color: var(--gold); }
.ops-task.late { border-inline-start-color: var(--danger); background: var(--danger-soft); }
.ops-task.ok { border-inline-start-color: var(--ok); }
.ops-task.off { opacity: .6; }
.ops-task-h { display: flex; align-items: flex-start; gap: 8px; min-width: 0; }
.ops-task-h > b { min-width: 0; overflow-wrap: anywhere; line-height: 1.6; }
.ops-meta { display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: center; min-width: 0; }
.ops-meta > span { display: inline-flex; align-items: center; gap: 4px; min-width: 0; overflow-wrap: anywhere; }
.ops-meta svg.i { width: 14px; height: 14px; flex: none; }
.ops-meta .warn { color: var(--accent); font-weight: 700; }
.ops-acts { display: flex; flex-wrap: wrap; gap: 6px; }
.ops-acts:empty { display: none; }
.ops-body { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.8; }
.ops-kv { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 180px), 1fr)); gap: 6px; }
.ops-kv > div { display: grid; gap: 2px; background: var(--surface-2); border-radius: 8px; padding: 7px 10px; min-width: 0; }
.ops-kv small { color: var(--text-3); font-size: 11.5px; }
.ops-photos { display: flex; flex-wrap: wrap; gap: 6px; }
.ops-photo { display: block; max-width: 100%; max-height: 72vh; margin: 0 auto; border-radius: 8px; object-fit: contain; }
.ops-thumb-lg { display: block; max-width: 100%; max-height: 40vh; border-radius: 8px; object-fit: contain; }
.ops-events { margin: 0; padding-inline-start: 20px; display: grid; gap: 4px; font-size: 13px; color: var(--text-2); }
.ops-events li { overflow-wrap: anywhere; }
.ops-sum { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-bottom: 12px; }
.ops-num { display: grid; gap: 2px; padding: 10px 12px; color: inherit; text-decoration: none; min-width: 0; }
.ops-num small { color: var(--text-3); font-size: 12px; }
.ops-num b { font-size: 22px; font-variant-numeric: tabular-nums; }
.ops-num.bad b { color: var(--danger-strong); }
.ops-num.warn b { color: var(--accent); }
.ops-wds { display: flex; flex-wrap: wrap; gap: 6px 12px; }
.ops-items { gap: 6px; }
.ops-item { gap: 8px; align-items: center; min-width: 0; }
.ops-item > .grow { min-width: 0; }
.ops-item .input { width: 100%; }
.ops-run { gap: 8px; }
.ops-ck { display: grid; gap: 8px; padding: 12px 14px; border-inline-start: 4px solid var(--border); min-width: 0; }
.ops-ck.ok { border-inline-start-color: var(--ok); }
.ops-ck.no { border-inline-start-color: var(--danger); }
.ops-ck > .seg, .ops-ck > .btn, .ops-ck > .badge { justify-self: start; }
.ops-yn button, .ops-score button { min-width: 44px; height: 40px; }
.ops-score { flex-wrap: wrap; }
.ops-foot { position: sticky; bottom: 0; display: flex; gap: 8px; justify-content: flex-end; padding: 10px 0; background: var(--bg); z-index: 2; }
.ops-h3 { margin: 6px 0 8px; font-size: 15px; color: var(--text-2); }
.ops-zone.mine { border-inline-start-color: var(--primary); }
.cm-targets { gap: 6px; }
.cm-chip { display: inline-flex; align-items: center; gap: 4px; max-width: 100%; }
.cm-x { border: 0; background: none; cursor: pointer; color: inherit; font-size: 16px; line-height: 1; padding: 0 2px; }
.cm-ann { display: grid; gap: 6px; padding: 12px 14px; color: inherit; text-decoration: none; min-width: 0; border-inline-start: 4px solid var(--border); }
.cm-ann.pin { border-inline-start-color: var(--gold); }
.cm-ann.unread { border-inline-start-color: var(--primary); background: var(--primary-soft); }
.cm-pre { white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.8; margin: 0; }
.cm-bar { position: relative; overflow: hidden; border-radius: 8px; background: var(--surface-2); padding: 8px 10px; display: flex; gap: 8px; justify-content: space-between; min-width: 0; }
.cm-bar > :not(.cm-bar-fill) { position: relative; overflow-wrap: anywhere; }
.cm-bar-fill { position: absolute; inset-block: 0; inset-inline-start: 0; background: var(--primary-soft); }
.cm-bar.mine { outline: 2px solid var(--primary); }
.cm-opt { padding: 6px 8px; border: 1px solid var(--border); border-radius: 8px; }
.cm-occ { gap: 8px; align-items: center; padding: 6px 8px; border-radius: 8px; flex-wrap: wrap; min-width: 0; }
.cm-occ.today { background: var(--gold-soft); }
.cm-occ.off { opacity: .55; }
.cm-chats { display: grid; gap: 8px; }
.cm-chat { display: flex; align-items: center; gap: 10px; padding: 10px 12px; color: inherit; text-decoration: none; min-width: 0; }
.cm-chat.unread { background: var(--primary-soft); }
.cm-av { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: var(--surface-2); flex: none; }
.cm-chat-b { min-width: 0; display: grid; gap: 2px; }
.cm-last { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cm-chat-s { display: grid; gap: 4px; justify-items: end; flex: none; }
.cm-room { display: flex; flex-direction: column; height: calc(100dvh - 230px); min-height: 360px; overflow: hidden; }
.cm-msgs { flex: 1; overflow-y: auto; display: flex; flex-direction: column; gap: 6px; padding: 12px; background: var(--surface-2); }
.cm-msg { align-self: flex-start; max-width: min(80%, 560px); background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 6px 10px; display: grid; gap: 2px; min-width: 0; }
.cm-msg.mine { align-self: flex-end; background: var(--primary-soft); border-color: transparent; }
.cm-msg.del { opacity: .65; }
.cm-by { color: var(--primary); font-weight: 700; }
.cm-text { white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.7; }
.cm-hm { color: var(--text-3); font-size: 11px; display: flex; gap: 4px; align-items: center; justify-content: flex-end; font-variant-numeric: tabular-nums; }
.cm-seen { color: var(--primary); }
.cm-del { border: 0; background: none; cursor: pointer; color: var(--danger); font-size: 15px; line-height: 1; padding: 0 2px; }
.cm-send { display: flex; gap: 6px; align-items: flex-end; padding: 8px; border-top: 1px solid var(--border); background: var(--surface); }
.cm-input { flex: 1; min-width: 0; resize: none; max-height: 120px; min-height: 40px; }
@media (max-width: 720px) {
  .ops-sum { gap: 6px; }
  .ops-num b { font-size: 18px; }
  .cm-room { height: calc(100dvh - 190px); }
  .cm-msg { max-width: 88%; }
  .ops-ck > .seg { justify-self: stretch; display: flex; }
  .ops-ck > .seg button { flex: 1; }
}

/* ── امتیاز پرسنل (گام ۳۹) ── */
.kp-hero { display: flex; align-items: center; gap: 16px; padding: 16px; min-width: 0; flex-wrap: wrap; }
.kp-hero-t { display: grid; gap: 6px; min-width: 0; flex: 1 1 180px; }
.kp-ring-wrap { position: relative; display: grid; place-items: center; flex: none; }
.kp-ring .bg { fill: none; stroke: var(--surface-3); stroke-width: 10; }
.kp-ring .fg { fill: none; stroke: var(--primary-2); stroke-width: 10; stroke-linecap: round; transition: stroke-dasharray .6s ease; }
.kp-ring.ok .fg { stroke: var(--ok); }
.kp-ring.warn .fg { stroke: var(--gold); }
.kp-ring.bad .fg { stroke: var(--danger); }
.kp-ring-v { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; }
.kp-ring-v b { font-size: 28px; font-variant-numeric: tabular-nums; line-height: 1.1; }
.kp-ring-v small { color: var(--text-3); font-size: 11.5px; }
.kp-rank { font-size: 20px; font-weight: 800; }
.kp-rank small { font-size: 13px; font-weight: 600; color: var(--text-3); }
.kp-medal { justify-self: start; display: inline-flex; align-items: center; gap: 4px; padding: 3px 10px; border-radius: 999px; font-weight: 800; font-size: 13px; background: var(--gold-soft); color: var(--accent); }
.kp-medal.silver { background: var(--surface-3); color: var(--text-2); }
.kp-medal.bronze { background: #f7e6d8; color: #8a4a17; }
.kp-badges { display: flex; flex-wrap: wrap; gap: 6px; }
.kp-bdg { display: inline-flex; align-items: center; gap: 4px; padding: 3px 9px; border-radius: 999px; background: var(--primary-soft); font-size: 12px; font-weight: 700; }
.kp-bdg svg.i { width: 14px; height: 14px; }
.kp-rows { display: grid; gap: 12px; }
.kp-row { display: grid; gap: 6px; min-width: 0; }
.kp-row.off { opacity: .6; }
.kp-row-h { display: flex; align-items: center; gap: 8px; min-width: 0; }
.kp-row-h svg.i { width: 16px; height: 16px; flex: none; color: var(--text-3); }
.kp-v { font-weight: 800; font-variant-numeric: tabular-nums; }
.kp-v.ok, .kp-table .ok, .kp-hist .ok { color: var(--ok); }
.kp-v.warn, .kp-table .warn, .kp-hist .warn { color: var(--accent); }
.kp-v.bad, .kp-table .bad, .kp-hist .bad { color: var(--danger-strong); }
.kp-bar { height: 8px; border-radius: 99px; background: var(--surface-3); overflow: hidden; min-width: 40px; }
.kp-bar > i { display: block; height: 100%; border-radius: 99px; background: var(--primary-2); }
.kp-bar > i.ok { background: var(--ok); }
.kp-bar > i.warn { background: var(--gold); }
.kp-bar > i.bad { background: var(--danger); }
.kp-pt { display: flex; gap: 10px; align-items: flex-start; padding: 8px 10px; border-radius: 8px; background: var(--surface-2); min-width: 0; }
.kp-pt > .grow { min-width: 0; overflow-wrap: anywhere; }
.kp-pt-n { min-width: 34px; text-align: center; font-variant-numeric: tabular-nums; }
.kp-pt.up .kp-pt-n { color: var(--ok); }
.kp-pt.down .kp-pt-n { color: var(--danger-strong); }
.kp-pt.void { opacity: .55; text-decoration: line-through; }
.kp-hist { display: grid; grid-template-columns: minmax(84px, auto) 1fr auto 22px; gap: 10px; align-items: center; color: inherit; text-decoration: none; }
.kp-hist-m { font-size: 13px; white-space: nowrap; }
.kp-table .kp-tr { cursor: pointer; }
.kp-table .kp-tr:hover td, .kp-table .kp-tr:focus-visible td { background: var(--surface-2); }
.kp-score-td { min-width: 90px; }
.kp-score-td .kp-bar { margin-top: 4px; }
.kp-prof { display: grid; gap: 4px; text-align: start; padding: 10px 12px; border: 1px solid var(--border); border-radius: 9px; background: var(--surface); color: inherit; font: inherit; cursor: pointer; min-width: 0; }
.kp-prof:hover { border-color: var(--primary); }
.kp-prof.off { opacity: .6; }
.kp-roles { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 150px), 1fr)); gap: 6px; }
.kp-month { width: auto; min-width: 170px; max-width: 260px; }
.ops-pick { width: 20px; height: 20px; flex: none; margin-top: 4px; accent-color: var(--primary); }

/* ── رسید کارت‌به‌کارت (گام ۴۰) ── */
.c2c-btns { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 150px), 1fr)); gap: 10px; margin-bottom: 16px; }
.c2c-btn { display: grid; justify-items: center; gap: 4px; padding: 18px 12px; border-radius: 14px; border: 1px solid var(--border); background: var(--surface); color: var(--text); font: inherit; cursor: pointer; box-shadow: var(--shadow-sm); min-width: 0; }
.c2c-btn:hover, .c2c-btn:focus-visible { border-color: var(--gold); box-shadow: var(--shadow); }
.c2c-btn svg.i { width: 30px; height: 30px; color: var(--accent); }
.c2c-btn b { font-size: 18px; overflow-wrap: anywhere; }
.c2c-btn small { color: var(--text-3); font-size: 12px; }
.c2c-amt { font-variant-numeric: tabular-nums; }
.c2c-thumb { display: grid; place-items: center; gap: 6px; min-height: 140px; border: 2px dashed var(--border-strong); border-radius: 12px; color: var(--text-3); cursor: pointer; background: var(--surface-2); overflow: hidden; }
.c2c-thumb svg.i { width: 32px; height: 32px; }
.c2c-thumb img { display: block; max-width: 100%; max-height: 38vh; object-fit: contain; }
.c2c-amount { font-size: 22px; font-weight: 800; letter-spacing: .5px; }
.c2c-words { margin-top: 4px; }
.c2c-more summary { cursor: pointer; color: var(--text-2); font-weight: 700; font-size: 13px; padding: 4px 0; }
.c2c-more[open] summary { margin-bottom: 8px; }
.c2c-done { display: grid; justify-items: center; gap: 6px; text-align: center; padding: 8px 0; }
.c2c-done > svg.i { width: 56px; height: 56px; padding: 10px; border-radius: 50%; background: var(--ok-soft); color: var(--ok); }
.c2c-done b { font-size: 18px; }
.c2c-done .ok { color: var(--ok); font-weight: 700; }
.c2c-date { width: min(100%, 170px); }
.c2c-big { font-size: 26px; font-weight: 800; font-variant-numeric: tabular-nums; }
.c2c-cand { display: flex; gap: 10px; align-items: center; padding: 8px 10px; border-radius: 8px; background: var(--surface-2); min-width: 0; flex-wrap: wrap; }
.c2c-cand > .grow { min-width: 0; overflow-wrap: anywhere; display: grid; gap: 2px; }
.c2c-night td.ok { color: var(--ok); }
.c2c-night td.warn { color: var(--accent); }
.c2c-night td.bad, .c2c-night .bad { color: var(--danger-strong); }
.c2c-inbox { display: grid; gap: 6px; padding: 8px 10px; border-radius: 8px; background: var(--surface-2); min-width: 0; }
.c2c-inbox .bnk-raw { max-height: 140px; overflow: auto; font-family: inherit; letter-spacing: normal; unicode-bidi: plaintext; text-align: start; }
.c2c-mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 12.5px; }
.c2c-guide summary { cursor: pointer; font-weight: 700; color: var(--info); font-size: 13px; }
.c2c-guide ol { margin: 8px 0 0; padding-inline-start: 20px; display: grid; gap: 6px; font-size: 13px; line-height: 1.8; }
@media (max-width: 720px) {
  .kp-hide-m { display: none; }
  .kp-hero { justify-content: center; text-align: center; }
  .kp-hero-t { justify-items: center; }
  .kp-medal { justify-self: center; }
  .c2c-btn { padding: 14px 10px; }
  .c2c-date { width: 100%; }
  .kp-month { flex: 1 1 160px; max-width: none; }
  .c2c-thumb img { max-height: 26vh; }
  .c2c-thumb { min-height: 110px; }
}

/* ── بخش ۴ (گام ۴۲): مخاطبین، ویزیتورها، باشگاه، پیامک ── */
.crm-search { flex: 1 1 260px; max-width: 420px; }
.crm-secs { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 170px), 1fr)); gap: 10px; }
.crm-sec { display: grid; justify-items: center; gap: 6px; padding: 18px 12px; color: inherit; text-decoration: none; text-align: center; min-width: 0; }
.crm-sec:hover, .crm-sec:focus-visible { border-color: var(--gold); box-shadow: var(--shadow); }
.crm-sec svg.i { width: 28px; height: 28px; color: var(--accent); }
.crm-sec b { overflow-wrap: anywhere; }
.crm-n { font-size: 22px; font-weight: 800; font-variant-numeric: tabular-nums; color: var(--text-2); }
.crm-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 360px), 1fr)); gap: 10px; }
.crm-card { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 12px; padding: 12px 14px; min-width: 0; }
.crm-card > .grow { min-width: 0; flex: 1 1 140px; overflow-wrap: anywhere; display: grid; gap: 2px; }
.crm-card .avatar { width: 40px; height: 40px; font-size: 16px; flex: none; }
.crm-phones { display: flex; flex-direction: column; gap: 4px; align-items: stretch; min-width: 0; }
.crm-phones .btn { justify-content: flex-start; gap: 6px; }
.crm-ph { display: flex; align-items: center; gap: 2px; min-width: 0; }
.crm-ph > a:first-child { flex: 1 1 auto; min-width: 0; }
.crm-phones small { font-size: 11px; }
.crm-acts { display: flex; gap: 2px; flex: none; }
.crm-ph-ed .row { flex-wrap: nowrap; }
.crm-ph-ed select { width: 110px; flex: none; }
.crm-ph-ed .input { flex: 1 1 auto; min-width: 0; }
.crm-days { display: flex; flex-wrap: wrap; gap: 6px; }
.crm-days .chip { cursor: pointer; font: inherit; font-size: 13px; color: var(--text-2); }
.crm-days .chip.on { background: var(--primary); border-color: var(--primary); color: var(--primary-ink); }
.crm-stars { display: inline-flex; gap: 1px; font-size: 15px; line-height: 1; letter-spacing: 0; }
.crm-stars i { font-style: normal; color: var(--border-strong); }
.crm-stars i.on { color: var(--gold); }
.crm-member { display: flex; align-items: center; gap: 12px; padding: 12px 14px; color: inherit; text-decoration: none; min-width: 0; }
.crm-member > .grow { min-width: 0; display: grid; gap: 4px; overflow-wrap: anywhere; }
.crm-mob { text-align: start; unicode-bidi: plaintext; }
.crm-pts { display: grid; justify-items: center; gap: 2px; flex: none; text-align: center; }
.crm-pts b { font-size: 20px; font-variant-numeric: tabular-nums; }
.crm-pts small { font-size: 11.5px; color: var(--text-3); }
.crm-findbox .row { flex-wrap: nowrap; }
.crm-find { font-size: 20px; letter-spacing: 1px; flex: 1 1 auto; min-width: 0; }
.crm-kpis { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 170px), 1fr)); gap: 10px; margin: 12px 0; }
.crm-kpi { display: grid; gap: 4px; padding: 12px 14px; min-width: 0; }
.crm-kpi > small:first-child { color: var(--text-3); font-size: 12px; }
.crm-kpi b { font-size: 20px; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.crm-stars-ed { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; }
.crm-stars-ed small { color: var(--text-3); }
.crm-ta { min-height: 84px; resize: vertical; line-height: 1.8; padding: 8px 10px; font: inherit; }
/* erp069.2: پیامک خودکار با قالب sms.ir */
.smt-intro { align-items: flex-start; }
.smt-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.smt-tpl { border: 1px dashed var(--border-strong); border-radius: 10px; padding: 10px 12px; background: var(--surface-2); display: flex; flex-direction: column; gap: 8px; }
.smt-tpl-row { display: flex; align-items: flex-end; gap: 10px; flex-wrap: wrap; }
.smt-tpl-row .field { flex: 0 1 220px; margin: 0; }
.smt-ready-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.smt-ready { background: var(--surface); border: 1px solid var(--border); border-radius: 8px; padding: 8px 10px; line-height: 1.9; font-size: 13px; overflow-wrap: anywhere; }
.crm-body { overflow-wrap: anywhere; white-space: pre-line; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.crm-sms { background: var(--surface-2); border: 1px solid var(--border); border-radius: 14px 14px 4px 14px; padding: 10px 12px; white-space: pre-line; overflow-wrap: anywhere; line-height: 1.9; }
.crm-pv { background: var(--surface-2); }

/* ── بخش ۴ (گام ۴۲): سوییت ── */
.rnt-board { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr)); gap: 10px; }
.rnt-suite { display: grid; gap: 8px; padding: 12px 14px; border-inline-start: 5px solid var(--border); min-width: 0; }
.rnt-suite.in { border-inline-start-color: var(--danger); }
.rnt-suite.res { border-inline-start-color: var(--gold); }
.rnt-suite.dirty { border-inline-start-color: var(--info); background: var(--info-soft); }
.rnt-suite.free { border-inline-start-color: var(--ok); }
.rnt-suite-h { display: flex; align-items: center; gap: 8px; min-width: 0; }
.rnt-suite-h b { font-size: 17px; overflow-wrap: anywhere; }
.rnt-dot { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 700; white-space: nowrap; }
.rnt-dot::before { content: ''; width: 9px; height: 9px; border-radius: 50%; background: var(--border-strong); }
.rnt-dot.in { color: var(--danger-strong); }
.rnt-dot.in::before { background: var(--danger); }
.rnt-dot.res::before { background: var(--gold); }
.rnt-dot.dirty { color: var(--info); }
.rnt-dot.dirty::before { background: var(--info); }
.rnt-dot.free::before { background: var(--ok); }
.rnt-bk { display: grid; gap: 2px; padding: 8px 10px; border-radius: 8px; background: var(--surface-2); color: inherit; text-decoration: none; min-width: 0; overflow-wrap: anywhere; }
.rnt-kx-t th, .rnt-kx-t td { vertical-align: top; }
.rnt-kx-t thead th { text-align: center; white-space: nowrap; }
.rnt-kx-t tbody th { white-space: nowrap; position: sticky; inset-inline-start: 0; background: var(--surface); z-index: 1; }
.rnt-kx-td { min-width: 112px; }
.rnt-kx { display: grid; gap: 1px; padding: 4px 6px; margin-bottom: 4px; border-radius: 6px; font-size: 12px; color: inherit; text-decoration: none; background: var(--gold-soft); border-inline-start: 3px solid var(--gold); }
.rnt-kx.in { background: var(--danger-soft); border-inline-start-color: var(--danger); }
.rnt-kx.out { background: var(--ok-soft); border-inline-start-color: var(--ok); }
.rnt-kx b { font-variant-numeric: tabular-nums; }
.rnt-kx span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 140px; }
.rnt-kx-add { display: block; text-align: center; color: var(--text-3); text-decoration: none; border: 1px dashed var(--border); border-radius: 6px; line-height: 22px; }
.rnt-kx-add:hover { color: var(--primary); border-color: var(--primary); }
.rnt-quote { min-height: 56px; }
.rnt-prop { font-size: 20px; font-variant-numeric: tabular-nums; }
.rnt-amount { font-size: 18px; font-weight: 800; }
.rnt-bk-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); gap: 10px; margin-bottom: 12px; }
.rnt-money { display: grid; grid-template-columns: 1fr auto; gap: 6px 12px; align-items: baseline; }
.rnt-money b { font-variant-numeric: tabular-nums; text-align: end; }
.rnt-money .rnt-span { grid-column: 1 / -1; }
.rnt-checks { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 150px), 1fr)); gap: 8px; }
.rnt-check { padding: 10px 12px; border: 1px solid var(--border); border-radius: 9px; background: var(--surface-2); }
.rnt-check input { width: 20px; height: 20px; }
.rnt-photos { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(46%, 150px), 1fr)); gap: 8px; }
.rnt-ph { margin: 0; border: 1px solid var(--border); border-radius: 9px; overflow: hidden; background: var(--surface-2); min-width: 0; }
.rnt-ph.main { border-color: var(--gold); box-shadow: 0 0 0 2px var(--gold-soft); }
.rnt-ph img { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; background: var(--surface-3); }
.rnt-ph figcaption { padding: 2px 6px; gap: 2px; }
.rnt-big { display: block; max-width: 100%; max-height: 70vh; margin: 0 auto; border-radius: 8px; }
/* erp063: عکس‌های بازدید سوییت (تا ۱۰) */
.rnt-shots { display: flex; flex-wrap: wrap; gap: 8px; }
.rnt-shots:empty { display: none; }
.rnt-shot { position: relative; width: 72px; height: 72px; border-radius: 10px; overflow: hidden; border: 1px solid var(--border); flex: none; }
.rnt-shot img { width: 100%; height: 100%; object-fit: cover; display: block; }
.rnt-shot-x { position: absolute; top: 2px; inset-inline-start: 2px; width: 22px; height: 22px; border-radius: 50%; border: 0; background: rgba(0, 0, 0, .6); color: #fff; font-size: 14px; line-height: 1; cursor: pointer; }
.rnt-shots.big { flex-direction: column; }
.rnt-shots.big img { width: 100%; height: auto; }
/* erp063: «روز خوش» و جملهٔ روز در تابلوی سوییت */
.rnt-hello { padding: 12px 14px; margin-bottom: 12px; display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.rnt-hello-h { display: flex; align-items: center; gap: 8px; font-size: 16px; }
.rnt-wave { font-size: 22px; display: inline-block; transform-origin: 70% 70%; animation: rnt-wave 1.6s ease-in-out 1; }
@keyframes rnt-wave { 0%, 100% { transform: rotate(0); } 20%, 60% { transform: rotate(16deg); } 40%, 80% { transform: rotate(-8deg); } }
@media (prefers-reduced-motion: reduce) { .rnt-wave { animation: none; } }
.rnt-hello-q { font-size: 13px; line-height: 1.8; overflow-wrap: anywhere; }
.rnt-me { display: flex; align-items: center; gap: 12px; padding: 12px 14px; margin-bottom: 12px; color: inherit; text-decoration: none; min-width: 0; }
.rnt-me .grow { display: grid; gap: 4px; min-width: 0; }
.rnt-me b { font-size: 18px; font-variant-numeric: tabular-nums; }
.rnt-medal { display: grid; justify-items: center; font-size: 30px; line-height: 1; flex: none; }
.rnt-medal small { font-size: 11px; color: var(--text-3); margin-top: 2px; }
.rnt-me-big { margin-bottom: 12px; }
.rnt-guest { display: grid; gap: 2px; padding: 8px 10px; border-radius: 8px; background: var(--surface-2); }
.rnt-guest .warn { color: var(--accent); }
.rnt-day { display: grid; gap: 6px; min-width: 680px; padding: 4px 0; }
.rnt-day-row { display: grid; grid-template-columns: 110px 1fr; gap: 8px; align-items: center; }
.rnt-day-row > b { font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rnt-day-hours { display: grid; grid-template-columns: repeat(24, 1fr); font-size: 10.5px; color: var(--text-3); text-align: center; }
.rnt-day-track { position: relative; height: 34px; border-radius: 6px; background: repeating-linear-gradient(to left, var(--surface-2) 0, var(--surface-2) calc(100% / 24 - 1px), var(--border) calc(100% / 24 - 1px), var(--border) calc(100% / 24)); }
.rnt-day-bk { position: absolute; top: 3px; bottom: 3px; border-radius: 5px; background: var(--gold-soft); border: 1px solid var(--gold); color: inherit; text-decoration: none; font-size: 11.5px; overflow: hidden; padding: 0 4px; display: flex; align-items: center; }
.rnt-day-bk.in { background: var(--danger-soft); border-color: var(--danger); }
.rnt-day-bk.out { background: var(--ok-soft); border-color: var(--ok); }
.rnt-day-bk span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 720px) {
  .crm-card .crm-phones { flex-basis: 100%; }
  .crm-stars-ed { grid-template-columns: repeat(5, minmax(56px, 1fr)); overflow-x: auto; }
  .rnt-suite-h b { font-size: 16px; }
}

/* ── بخش ۴ ب (گام ۴۳): فروشگاه آنلاین و پیک (کارمندان) ── */
.shp-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr)); gap: 10px; }
.shp-o.new { border-inline-start-color: var(--danger); }
.shp-o.accepted, .shp-o.picking { border-inline-start-color: var(--gold); }
.shp-o.ready, .shp-o.out { border-inline-start-color: var(--info); }
.shp-o.delivered { border-inline-start-color: var(--ok); }
.shp-o.cancelled { opacity: .7; }
.shp-addr { overflow-wrap: anywhere; line-height: 1.8; }
.shp-chips { gap: 6px; margin-bottom: 10px; }
.shp-n { min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; background: var(--surface-2); font-size: 11.5px; line-height: 20px; text-align: center; font-variant-numeric: tabular-nums; }
.shp-n.hot { background: var(--danger); color: #fff; }
.shp-filters { gap: 8px; margin-bottom: 10px; }
.shp-filters > * { flex: 1 1 160px; min-width: 0; }
.shp-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr)); gap: 12px; margin-bottom: 12px; }
.shp-head { gap: 6px; margin-bottom: 10px; }
.shp-sum { display: grid; grid-template-columns: 1fr auto; gap: 6px 12px; align-items: baseline; }
.shp-due { color: var(--accent); font-size: 17px; }
.shp-lines { display: grid; gap: 8px; }
.shp-line { display: flex; align-items: center; gap: 10px; padding: 10px 12px; min-width: 0; border-inline-start: 4px solid var(--border); }
.shp-line.ok { border-inline-start-color: var(--ok); }
.shp-line.miss { border-inline-start-color: var(--danger); opacity: .8; }
.shp-line .grow { min-width: 0; display: grid; gap: 2px; overflow-wrap: anywhere; }
.shp-th { width: 48px; height: 48px; border-radius: 8px; object-fit: cover; flex: none; background: var(--surface-2); display: grid; place-items: center; color: var(--text-3); }
.shp-pick { display: flex; gap: 4px; align-items: center; flex: none; }
.shp-pq { width: 72px; text-align: center; }
.shp-scanrow { gap: 8px; margin-bottom: 10px; }
.shp-scan { flex: 1; font-size: 16px; min-width: 0; }
.shp-tl { display: grid; gap: 8px; }
.shp-ev { display: flex; gap: 10px; align-items: flex-start; }
.shp-ev.priv { opacity: .75; }
.shp-ev > b { flex: none; min-width: 44px; font-variant-numeric: tabular-nums; }
.shp-run { display: grid; gap: 8px; padding: 12px 14px; min-width: 0; border-inline-start: 4px solid var(--border); }
.shp-run.out { border-inline-start-color: var(--info); }
.shp-run.ready { border-inline-start-color: var(--gold); }
.shp-run.delivered, .shp-run.off { opacity: .72; }
.shp-big { font-size: 20px; font-weight: 800; text-align: center; padding: 10px; background: var(--gold-soft); border-radius: 10px; }
.shp-prods { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: 10px; }
.shp-prod { display: flex; gap: 10px; align-items: center; padding: 10px; color: inherit; text-decoration: none; min-width: 0; }
.shp-prod.off { opacity: .6; }
.shp-prod img, .shp-noimg { width: 64px; height: 64px; border-radius: 8px; object-fit: cover; flex: none; background: var(--surface-2); display: grid; place-items: center; color: var(--text-3); }
.shp-prod .grow { min-width: 0; display: grid; gap: 3px; }
.shp-prod b { overflow-wrap: anywhere; }
.shp-phs { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; }
.shp-ph { display: grid; gap: 6px; }
.shp-ph img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 10px; border: 1px solid var(--border); }
.shp-banners { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); gap: 10px; }
.shp-banner { display: grid; gap: 6px; }
.shp-banner.off { opacity: .6; }
.shp-banner img { width: 100%; aspect-ratio: 3 / 1; object-fit: cover; border-radius: 10px; }
.shp-band { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; padding: 8px; border: 1px solid var(--border); border-radius: 10px; }
.shp-band .input { width: 110px; }
.shp-rcpt { max-width: 100%; max-height: 70vh; display: block; margin: auto; }
.shp-open { font-size: 15px; }
@media print { .shp-line { break-inside: avoid; } .shp-th { display: none; } }

/* ═════ بخش ۵ب: مرجوعی به تأمین‌کننده (rt-) و چاپ چک ═════ */
.rt-form { max-width: 720px; }
.rt-scan { gap: 8px; align-items: center; }
.rt-scan .grow { min-width: 0; }
.rt-item { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border-radius: 10px; background: var(--primary-soft); color: var(--text); min-width: 0; }
.rt-item b { overflow-wrap: anywhere; }
.rt-item.muted { background: var(--surface-2); }
.rt-qty { max-width: 140px; font-size: 18px; text-align: center; }
.rt-reasons button { min-height: 40px; }
.rt-thumb { width: 100%; font: inherit; }
.rt-thumb img { max-height: 30vh; }
.rt-go { min-width: 180px; justify-content: center; }
.rt-sr { margin-top: 14px; }
.rt-photo { padding: 10px; display: grid; place-items: center; }
.rt-photo img { max-width: 100%; max-height: 50vh; border-radius: 8px; object-fit: contain; }
.rt-tot { display: flex; flex-wrap: wrap; gap: 8px 24px; font-size: 14px; }
.rt-ho .input { min-width: 0; }
.rt-ho tr.inactive td { opacity: .5; }
.rt-notice { margin-bottom: 12px; align-items: center; }
.rt-notice .grow { min-width: 0; }
.rt-badge { display: inline-flex; align-items: center; gap: 4px; }
.rt-badge svg.i { width: 13px; height: 13px; }
.rt-slot:empty { display: none; }
.chq-pv .pf-preview { padding: 8px; }
@media (max-width: 640px) {
  .rt-go { width: 100%; }
  .rt-ho .t th:nth-child(5), .rt-ho .t td:nth-child(5) { min-width: 110px; }
}

/* ═════ بخش ۵د: دستیار هوشمند (aix-) ═════ */
.aix-chat { display: flex; flex-direction: column; min-height: 50vh; }
.aix-log { display: grid; gap: 14px; padding: 14px; max-height: 58vh; overflow-y: auto; }
.aix-qa { display: grid; gap: 6px; }
.aix-q, .aix-a { display: flex; gap: 8px; align-items: flex-start; padding: 10px 12px; border-radius: 12px; min-width: 0; }
.aix-q { background: var(--surface-2); justify-self: start; max-width: 85%; }
.aix-a { background: var(--primary-soft); justify-self: end; max-width: 92%; }
.aix-q svg.i, .aix-a svg.i { flex: none; margin-top: 3px; }
.aix-text { white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.9; }
.aix-samples { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 14px 10px; }
.aix-samples .chip { cursor: pointer; font: inherit; font-size: 12.5px; color: var(--text-2); }
.aix-samples .chip:hover { border-color: var(--primary); color: var(--primary); }
.aix-bar { display: flex; gap: 8px; align-items: flex-end; padding: 12px 14px; border-top: 1px solid var(--border); margin-top: auto; }
.aix-input { flex: 1; min-width: 0; resize: vertical; min-height: 44px; }
.aix-sup.urgent { border-inline-start: 4px solid var(--danger); }
.aix-chart { width: 100%; height: auto; display: block; overflow: visible; }
.aix-chart .base { stroke: var(--border-strong); stroke-width: 1; }
.aix-chart .grid { stroke: var(--border); stroke-width: 1; stroke-dasharray: 3 4; }
.aix-chart .bar rect { fill: var(--primary-2); opacity: .8; }
.aix-chart .bar.fc rect { fill: #c8962e; opacity: .55; }
.aix-chart .bar.fc rect.actual { fill: #c8962e; opacity: 1; }
.aix-chart .bar.low rect { fill: var(--danger); opacity: .75; }
.aix-chart .bar rect.hit { fill: transparent; opacity: 1; cursor: pointer; pointer-events: all; }
.aix-chart text { font-family: inherit; text-anchor: middle; fill: var(--text-3); font-size: 11px; pointer-events: none; }
.aix-chart text.strong { fill: var(--text); font-weight: 800; }
.aix-legend { display: flex; align-items: center; gap: 6px; margin-bottom: 6px; }
.aix-dot { display: inline-block; width: 10px; height: 10px; border-radius: 3px; background: var(--primary-2); margin-inline-start: 8px; }
.aix-dot.fc { background: #c8962e; opacity: .7; }
.aix-feats { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr)); gap: 8px; }
.aix-narr .aix-text { margin-bottom: 8px; }
.aix-slot:empty { display: none; }
@media (max-width: 640px) {
  .aix-log { max-height: 52vh; padding: 10px; }
  .aix-q, .aix-a { max-width: 100%; }
  .aix-chart text { font-size: 13px; }
}
@media (max-width: 640px) { .grid.k4.aix-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* ── بخش ۵ه: لایسنس و API عمومی ── */
.lic-facts { align-items: start; }
.lic-fact { min-width: 0; overflow-wrap: anywhere; }
.lic-meters { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; }
.lic-meter { display: flex; flex-direction: column; gap: 6px; }
.lic-bar { height: 8px; border-radius: 99px; background: var(--border); overflow: hidden; }
.lic-bar > span { display: block; height: 100%; background: var(--ok, #16a34a); border-radius: 99px; }
.lic-bar > span.near { background: var(--accent); }
.lic-bar > span.full { background: var(--danger); }
.lic-checks { display: flex; flex-wrap: wrap; gap: 8px 18px; }
.lic-pub, .ext-key { overflow-wrap: anywhere; word-break: break-all; font-size: 12px; }
.ext-key { display: block; padding: 10px 12px; border: 1px dashed var(--border); border-radius: 8px; user-select: all; }
.lic-hist ul { margin: 6px 0 0; padding-inline-start: 18px; display: flex; flex-direction: column; gap: 4px; }
.ext-scopes { display: flex; flex-wrap: wrap; gap: 4px; }
.ext-ex pre { margin: 0; padding: 10px 12px; border-radius: 8px; background: var(--surface-2); white-space: pre-wrap; overflow-wrap: anywhere; font-size: 12px; min-width: 0; }
.ext-ex .row { align-items: flex-start; gap: 8px; }
.ext-docs h4 { margin: 8px 0 4px; }
.lic-banner { margin-bottom: 12px; }
.lic-banner a { margin-inline-start: 8px; }

/* ── بخش ۵ج: طلا و ارز ── */
.gld-actions { gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.gld-up { color: var(--ok, #15803d); }
.gld-down { color: var(--danger); }
.gld-kpis .kpi.warn .value { color: var(--accent); }
.gld-vs b { font-size: 16px; }
.gld-prices { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 10px; }
.gld-price { border: 1px solid var(--border); border-radius: 10px; padding: 10px 12px; min-width: 0; }
.gld-price b { display: block; font-size: 15px; margin: 2px 0; }
.gld-price.stale { border-style: dashed; border-color: var(--accent); }
.gld-chart { width: 100%; }
.gld-svg { width: 100%; height: auto; display: block; }
.gld-svg .gld-grid { stroke: var(--border); stroke-width: 1; }
.gld-svg .gld-line { fill: none; stroke: var(--series-1, #b8860b); stroke-width: 2.2; stroke-linejoin: round; }
.gld-svg .gld-tick { fill: var(--text-3); font-size: 11px; }
.gld-svg .gld-buy { fill: var(--ok, #16a34a); stroke: var(--bg, #fff); stroke-width: 1.5; }
.gld-svg .gld-sell { fill: var(--danger); stroke: var(--bg, #fff); stroke-width: 1.5; }
.gld-dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; vertical-align: middle; }
.gld-dot.buy { background: var(--ok, #16a34a); }
.gld-dot.sell { background: var(--danger); }
.gld-total { font-size: 15px; padding: 8px 12px; border-radius: 8px; background: var(--surface-2); }
.gld-filters { margin-bottom: 12px; }
.gld-filters .field { min-width: 140px; }

/* ── مرکز آموزش (بخش ۵و) ── */
.hlp-search { display: flex; align-items: center; gap: 8px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 0 12px; margin-bottom: 12px; }
.hlp-search .input { border: 0; box-shadow: none; background: transparent; flex: 1; min-width: 0; }
.hlp-gh { margin: 6px 0 0; font-size: 15px; }
.hlp-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 10px; }
.hlp-card { display: flex; align-items: center; gap: 10px; padding: 12px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); color: inherit; text-decoration: none; min-width: 0; }
.hlp-card:hover, .hlp-card:focus-visible { border-color: var(--border-strong); box-shadow: var(--shadow-sm); }
.hlp-card > .grow { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.hlp-card b { font-size: 14px; }
.hlp-ic { flex: none; width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center; background: var(--primary-soft); color: var(--primary); }
:root[data-theme='dark'] .hlp-ic { color: var(--text); }
.hlp-lesson { display: flex; flex-direction: column; gap: 14px; max-width: 980px; }
.hlp-lead { margin: 0; line-height: 2; font-size: 15px; }
.hlp-lesson h3 { margin: 0 0 6px; font-size: 15px; display: flex; align-items: center; gap: 6px; }
.hlp-steps { margin: 0; padding-inline-start: 22px; display: flex; flex-direction: column; gap: 8px; line-height: 1.9; }
.hlp-steps li::marker { font-weight: 700; color: var(--accent); }
.hlp-box { border-radius: var(--radius); padding: 12px 14px; border: 1px solid var(--border); }
.hlp-box ul { margin: 0; padding-inline-start: 20px; line-height: 1.9; }
.hlp-box.ok { background: var(--ok-soft); border-color: transparent; }
.hlp-box.warn { background: var(--gold-soft); border-color: transparent; }
:root[data-theme='dark'] .hlp-box.ok, :root[data-theme='dark'] .hlp-box.warn { background: var(--surface-2); border-color: var(--border); }
.hlp-shot { margin: 0; display: flex; flex-direction: column; gap: 8px; }
.hlp-seg { display: flex; gap: 6px; }
.hlp-frame { border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; background: var(--surface-2); }
.hlp-frame img { display: block; width: 100%; height: auto; }
.hlp-shot.phone .hlp-frame { max-width: 340px; border-radius: 22px; border-width: 6px; border-color: var(--primary); }
.hlp-path { margin: 0; padding-inline-start: 26px; display: flex; flex-direction: column; gap: 8px; max-width: 640px; }
.hlp-path li::marker { font-weight: 700; color: var(--accent); }
@media print {
  .hlp-lesson { max-width: none; gap: 8px; }
  .hlp-print .hlp-lesson { break-before: page; }
  .hlp-print .hlp-lesson:first-child { break-before: auto; }
  .hlp-frame { break-inside: avoid; max-height: 120mm; }
  .hlp-frame img { max-height: 118mm; object-fit: contain; }
  .hlp-box { break-inside: avoid; background: none !important; border: 1px solid #999; }
}

/* ت۲۴: نوار ساعت کاری (روز بی‌شیفت، صندوق باز بعد از ساعت، پایان شیفت) */
.work-bar { position: sticky; top: 0; z-index: 60; display: flex; align-items: center; justify-content: center; gap: 8px; padding: 7px 14px; font-size: 13px; font-weight: 600; text-align: center; }
.work-bar.info { background: var(--info-soft); color: var(--info); }
.work-bar.warn { background: var(--accent-soft); color: var(--accent); }
.work-bar svg { width: 16px; height: 16px; flex: none; }

/* erp049: فروش آزاد تا انبارگردانی (تنظیمات انبار) */
.freesale-list { display: grid; }
.freesale-row { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--border); }
.freesale-row:last-child { border-bottom: 0; }
.freesale-row .grow { min-width: 0; }
@media (max-width: 560px) { .freesale-row { flex-wrap: wrap; } .freesale-row > .btn { margin-inline-start: auto; } }

/* erp050: مرتب‌سازی کالاها */
.tdy-kx { margin-bottom: 14px; }
.tdy-kx .card-head { flex-wrap: wrap; }
.tdy-warn { color: var(--accent); font-weight: 600; }
.tdy-kgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: 12px; }
.tdy-kt { border: 1px solid var(--border); border-radius: 10px; background: var(--surface); display: flex; flex-direction: column; min-width: 0; }
.tdy-kt.pending { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent-soft) inset; }
.tdy-kt-head { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-bottom: 1px solid var(--border); }
.tdy-kt-no { display: flex; flex-direction: column; align-items: center; justify-content: center; min-width: 44px; height: 44px; border-radius: 9px;
  background: var(--primary-soft); color: var(--primary); font-size: 20px; font-weight: 800; line-height: 1; }
.tdy-kt-no small { font-size: 10px; font-weight: 600; margin-bottom: 2px; }
.tdy-kt-foot { padding: 8px 12px; gap: 8px; align-items: center; border-top: 1px solid var(--border); margin-top: auto; }
table.t.tdy-sample th, table.t.tdy-sample td { padding: 5px 10px; font-size: 12.5px; }
.tdy-filters { gap: 8px; }
.tdy-flags { display: flex; flex-wrap: wrap; gap: 6px; }
.tdy-flag { display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 10px; border: 1px solid var(--border-strong); border-radius: 8px;
  font-size: 13px; cursor: pointer; white-space: nowrap; background: var(--surface); }
.tdy-flag:has(input:checked) { border-color: var(--primary); background: var(--primary-soft); color: var(--primary); font-weight: 600; }
.tdy-bulk { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 10px 16px; background: var(--primary-soft); border-bottom: 1px solid var(--border); }
.tdy-bulk[hidden], .tdy-bulk.hidden { display: none; }
table.t.tdy-t th { white-space: nowrap; vertical-align: bottom; }
table.t.tdy-t th.tdy-gh { text-align: center; border-bottom: 1px solid var(--border); font-size: 12px; color: var(--text-3); padding-bottom: 2px; }
table.t.tdy-t tr.picked td { background: var(--primary-soft); }
table.t.tdy-t .neg { color: var(--danger-strong); }
.tdy-sort { border: 0; background: none; padding: 0; font: inherit; color: inherit; cursor: pointer; display: inline-flex; align-items: center; gap: 3px; white-space: nowrap; }
.tdy-sort.on { color: var(--primary); }
.tdy-sort svg { width: 13px; height: 13px; }
.tdy-u { color: var(--text-3); font-size: 11.5px; }
.tdy-day { display: flex; align-items: center; gap: 6px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.tdy-src { font-size: 10.5px; font-weight: 700; padding: 1px 6px; border-radius: 999px; background: var(--surface-2); color: var(--text-3); border: 1px solid var(--border); }
.tdy-src.erp { background: var(--ok-soft); color: var(--ok); border-color: transparent; }
@media (max-width: 560px) { .tdy-kgrid { grid-template-columns: 1fr; } .tdy-flag { height: 32px; font-size: 12.5px; } }
table.t.tdy-t td:nth-child(3) { min-width: 200px; }
table.t.tdy-t td:nth-child(4) { min-width: 80px; }
/* ── ت۶۷ (erp051): نسیهٔ موقت ── */
.cr-card.cr-due { border-inline-start: 4px solid var(--accent); }
.cr-warn { color: var(--accent); font-weight: 700; }
.cr-policy.row { gap: 8px; align-items: center; }

/* ت۶۴ (erp052): برچسب با شعار و لوگو، صف برچسب */
.shelf-label.sl-branded { gap: 3px; }
.shelf-label.sl-branded .sl-cons { font-size: 11px; color: #9a9a9a; }
.shelf-label.sl-branded .sl-cons s { text-decoration-color: rgba(0, 0, 0, .35); }
.sl-brand { width: 100%; display: flex; align-items: center; justify-content: center; gap: 5px; margin-top: auto; padding-top: 3px; border-top: 1px solid #e3e3e3;
  font-size: 10px; font-weight: 700; color: #444; line-height: 1.4; text-align: center; }
.sl-brand img { max-height: 9mm; max-width: 22mm; object-fit: contain; }
.lq-names { line-height: 1.9; }
.lq-logo { width: 72px; height: 40px; display: flex; align-items: center; justify-content: center; border: 1px dashed var(--border); border-radius: 8px; }
.lq-logo img { max-width: 100%; max-height: 100%; object-fit: contain; }

/* ت۸۸ (erp052): سرستون مرتب‌شونده */
.th-sort { all: unset; cursor: pointer; display: inline-flex; align-items: center; gap: 4px; font: inherit; color: inherit; white-space: nowrap; }
.th-sort:hover { color: var(--accent); }
.th-sort.on { color: var(--accent); font-weight: 700; }
.th-sort .th-arrow { font-size: 10px; }
.th-sort:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }

/* ── erp056 ردیف ۲: الگوی کادربندی روی همهٔ کارت‌های ERP (سربرگ نواری مثل .bx-head؛ شماره فقط در فرم‌ها با boxer()) ── */
#main .card { border-radius: 12px; border-color: var(--bx-line); }
#main .card > .card-head { background: var(--bx-band); border-bottom-color: var(--bx-line); min-height: 42px; padding: 7px 12px; border-radius: 12px 12px 0 0; }
#main .card > .card-head h2, #main .card > .card-head h3 { color: var(--bx-ink); }
#main .card > .card-body { padding: 12px; }
#main .card > .card-head:only-child { border-bottom: 0; border-radius: 12px; }
#main .card > .card-head h2, #main .card > .card-head h3 { font-size: 14.5px; font-weight: 800; }
#main .card > .card-head > svg:first-child { color: var(--bx-ink); flex: none; }
#main .card > .card-foot { background: var(--surface-2); border-radius: 0 0 12px 12px; }
/* ── erp053 ت۱۱۲: پنل کادربندی‌شده (الگوی همهٔ صفحه‌ها) ── */
.bx-page { display: grid; gap: 10px; }
/* erp056: رنگ کادرها از رنگ گروه منو (--bx-c روی #main)؛ پررنگ‌تر و جمع‌وجورتر طبق نظر کاربر */
#main, .bx-page { --bx-c0: var(--bx-c, var(--primary)); --bx-band: color-mix(in srgb, var(--bx-c0) 13%, var(--surface)); --bx-line: color-mix(in srgb, var(--bx-c0) 28%, var(--border));
  --bx-ink: color-mix(in srgb, var(--bx-c0) 72%, var(--text)); }
.bx-page > :empty { display: none; }
.bx-row { display: grid; gap: 10px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr)); align-items: stretch; }
.bx-row.side { grid-template-columns: minmax(0, 1fr) minmax(320px, 440px); align-items: start; }
.bx { background: var(--surface); border: 1px solid var(--bx-line); border-radius: 12px; box-shadow: var(--shadow-sm); min-width: 0; display: flex; flex-direction: column; overflow: hidden; }
.bx-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 7px 12px; background: var(--bx-band); border-bottom: 1px solid var(--bx-line); min-height: 42px; }
.bx-head h2 { font-size: 14.5px; font-weight: 800; margin: 0; color: var(--bx-ink); }
.bx-head > svg { color: var(--bx-ink); flex: none; }
.bx-head .bx-sub { font-size: 12px; color: var(--text-3); }
.bx-num { width: 26px; height: 26px; border-radius: 8px; display: inline-grid; place-items: center; flex: none; font-size: 13px; font-weight: 800;
  background: var(--bx-c0, var(--primary)); color: #fff; border: 0; }
.bx-tools { margin-inline-start: auto; display: flex; flex-wrap: wrap; gap: 4px; align-items: center; }
.bx-body { padding: 10px 12px; flex: 1; }
.bx-body.flush { padding: 0; }
.bx-grid { display: grid; gap: 8px 12px; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); }
.bx-grid .full { grid-column: 1 / -1; }
.bx-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 8px 12px; border-bottom: 1px solid var(--border); background: color-mix(in srgb, var(--gold-soft) 45%, var(--surface)); }
.bx-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.bx-chip { flex: 1 1 140px; border: 1px solid var(--border); border-radius: 10px; padding: 8px 10px; background: var(--surface-2); min-width: 0; }
.bx-chip span { display: block; font-size: 11.5px; color: var(--text-3); }
.bx-chip b { font-size: 14px; font-variant-numeric: tabular-nums; }
.bx-foot { padding: 8px 14px; border-top: 1px solid var(--border); font-size: 12px; color: var(--text-3); background: var(--surface-2); }
.bx-total { margin: 6px -12px -10px; padding: 10px 12px; display: flex; align-items: center; gap: 8px; background: var(--primary); color: var(--primary-ink); }
.bx-total .big-total { color: inherit; }
.bx-body.flush .bx-total { margin: 0; }
.bx-total .small { color: inherit; opacity: .75; }
.bx .v-lines th:first-child, .bx .v-lines td:first-child { padding-inline-start: 10px; }
@media (max-width: 900px) { .bx-row.side { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 520px) { .bx-body { padding: 12px; } .bx-head { padding: 9px 12px; } .bx-total { margin: 6px -12px -12px; } }

/* ── erp053 ت۱۰۹: مرکز اعلان‌ها ── */
.nc-sw { position: relative; display: inline-block; width: 40px; height: 22px; flex: none; cursor: pointer; }
.nc-sw input { position: absolute; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; z-index: 1; }
.nc-sw span { position: absolute; inset: 0; border-radius: 11px; background: var(--border-strong); transition: background .15s; }
.nc-sw span::after { content: ''; position: absolute; top: 3px; inset-inline-start: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.25); transition: inset-inline-start .15s; }
.nc-sw input:checked + span { background: var(--ok); }
.nc-sw input:checked + span::after { inset-inline-start: 21px; }
.nc-sw input:focus-visible + span { box-shadow: var(--focus); }
.nc-sw.off { opacity: .55; cursor: not-allowed; }
.nc-t-tbl td { vertical-align: middle; }
.nc-t-tbl .nc-t { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.nc-t-tbl tr.nc-off td:not(.nc-sw-td):not(.nc-act) { opacity: .5; }
.nc-t-tbl .nc-who { font-size: 13px; min-width: 150px; }
.nc-t-tbl .nc-how { white-space: nowrap; }
.nc-t-tbl .nc-how .badge + .badge { margin-inline-start: 4px; }
.nc-t-tbl .nc-act { width: 1%; white-space: nowrap; }
.nc-pick { border: 1px solid var(--border); border-radius: 10px; padding: 12px; background: var(--surface-2); display: grid; gap: 8px; }
.nc-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); gap: 12px; }
.nc-cols > div { display: grid; gap: 6px; align-content: start; }
.nc-list { display: grid; gap: 2px; max-height: 220px; overflow: auto; border: 1px solid var(--border); border-radius: 8px; background: var(--surface); padding: 4px; }
.nc-chk { display: flex; align-items: center; gap: 8px; padding: 6px 8px; border-radius: 6px; cursor: pointer; font-size: 13.5px; min-height: 36px; }
.nc-chk:hover { background: var(--surface-2); }
.nc-mine { display: grid; gap: 2px; }
.nc-mine > b { font-size: 12.5px; color: var(--text-3); margin: 4px 0; }
@media (max-width: 700px) {
  table.t.nc-t-tbl thead { display: none; }
  table.t.nc-t-tbl tr { display: grid; grid-template-columns: 46px minmax(0, 1fr) auto; gap: 4px 8px; padding: 10px 12px; border-bottom: 1px solid var(--border); align-items: center; }
  table.t.nc-t-tbl tr:last-child { border-bottom: 0; }
  table.t.nc-t-tbl td { padding: 0; border: 0; display: block; min-width: 0; width: auto; }
  table.t.nc-t-tbl .nc-sw-td { grid-row: 1 / span 2; align-self: start; padding-top: 2px; }
  table.t.nc-t-tbl td:nth-child(2) { grid-column: 2 / 4; }
  table.t.nc-t-tbl .nc-who { grid-column: 2; grid-row: 2; font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  table.t.nc-t-tbl .nc-how { grid-column: 3; grid-row: 2; font-size: 12px; }
  table.t.nc-t-tbl td.num { display: none; }
  table.t.nc-t-tbl .nc-act { grid-column: 2 / 4; grid-row: 3; }
}



/* ── erp053 ت۱۱۱: منوی رنگی — نشانهٔ هر منو روی مربع گرد کم‌رنگ هم‌رنگ گروه (مثل اپ گوشی)؛ خاموش در «رنگ‌ها» ── */
.nav-ic { display: inline-grid; place-items: center; flex: none; }
.nav.tint { --nc: var(--primary); }
.nav.tint .nav-ic { width: 28px; height: 28px; border-radius: 8px; color: var(--nc); background: color-mix(in srgb, var(--nc) 13%, transparent); }
.nav.tint .nav-ic svg { width: 16px; height: 16px; }
.nav.tint .nav-items .nav-ic { width: 24px; height: 24px; border-radius: 7px; background: color-mix(in srgb, var(--nc) 9%, transparent); }
.nav.tint .nav-items .nav-ic svg { width: 14px; height: 14px; }
.nav.tint a, .nav.tint .nav-group { padding-block: 5px; }
.nav.tint .nav-sec.open > .nav-items { border-inline-start-color: color-mix(in srgb, var(--nc) 45%, transparent); }
.nav.tint .nav-sec.has-active > .nav-group { color: var(--nc); }
.nav.tint .nav-sec.has-active > .nav-group > .nav-ic { color: var(--nc); }
.nav.tint a.active { background: color-mix(in srgb, var(--nc) 12%, var(--surface)); color: var(--text); }
.nav.tint a.active .nav-ic { background: var(--nc); color: #fff; }
:root[data-theme='dark'] .nav.tint .nav-ic { background: color-mix(in srgb, var(--nc) 24%, transparent); color: color-mix(in srgb, var(--nc) 55%, #fff); }
:root[data-theme='dark'] .nav.tint a.active .nav-ic { background: color-mix(in srgb, var(--nc) 70%, #000); color: #fff; }
.nav-ord { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.nav-ord li { display: flex; align-items: center; gap: 10px; padding: 4px 8px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface); min-height: 40px; }
.nav-ord-n { width: 22px; text-align: center; color: var(--text-3); font-size: 12px; font-variant-numeric: tabular-nums; }

/* erp053 گام ۹: لایه‌ها — هر پنجرهٔ تازه بالاتر از قبلی (z از ۸۶ به بالا، در core.js)؛ فهرست‌های بازشو، تقویم و منو همیشه روی پنجره‌ها؛
   جستجوی سراسری روی همهٔ پنجره‌ها؛ پیام‌ها روی همه؛ هشدار بزرگ امنیت فاکتور بالاتر از همه */
.ac-list, .dp, .menu, .apps-pop, .pos-colmenu { z-index: 1000; }
.srch-back { z-index: 990; }
.toasts { z-index: 1100; }
.loading-bar { z-index: 1200; }

/* ── erp054: داشبورد یکپارچه (خانه + میز مدیر + خانهٔ سوپر اپ) ── */
:root {
  --tile-blue: #2563eb; --tile-teal: #0d9488; --tile-green: #16a34a; --tile-gold: #c08a00; --tile-orange: #ea580c;
  --tile-red: #dc2626; --tile-pink: #db2777; --tile-purple: #7c3aed; --tile-slate: #475569;
}
:root[data-theme='dark'] {
  --tile-blue: #60a5fa; --tile-teal: #2dd4bf; --tile-green: #4ade80; --tile-gold: #facc15; --tile-orange: #fb923c;
  --tile-red: #f87171; --tile-pink: #f472b6; --tile-purple: #a78bfa; --tile-slate: #94a3b8;
}
.tc-blue { --tc: var(--tile-blue); } .tc-teal { --tc: var(--tile-teal); } .tc-green { --tc: var(--tile-green); } .tc-gold { --tc: var(--tile-gold); }
.tc-orange { --tc: var(--tile-orange); } .tc-red { --tc: var(--tile-red); } .tc-pink { --tc: var(--tile-pink); } .tc-purple { --tc: var(--tile-purple); }
.tc-slate { --tc: var(--tile-slate); }
.dash-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; align-items: start; }
.dw { min-width: 0; }
.dw.full { grid-column: 1 / -1; }
.dw > .card, .dw > section, .dw > .grid, .dw > .stack { margin-bottom: 0 !important; }
.dw .desk-kpis { margin-bottom: 0; }
.dw .grid.k4 { grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); }
.dw-wait .skeleton, .dw-wait > * { min-height: 72px; }
.dash-plain .plt-h2 { display: flex; align-items: center; gap: 6px; }
.dash-plain .plt-h2 .i { width: 16px; height: 16px; color: var(--text-3); }
.dash-acts { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
button.desk-link { border: 0; cursor: pointer; font: inherit; font-size: 12.5px; font-weight: 700; }
.plt-hello .dash-acts { margin-top: 0; }
.plt-hello button.desk-link { background: var(--surface); border: 1px solid var(--border); color: var(--text-2); }
.plt-hello button.desk-link:hover { border-color: var(--primary-2); color: var(--primary); }
/* حالت چیدن */
.dash-editbar { position: sticky; top: 6px; z-index: 30; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; padding: 10px 14px;
  margin-bottom: 14px; border-radius: 14px; background: var(--surface); border: 1px solid var(--gold); box-shadow: var(--shadow-lg); }
.dash-editbar b { display: inline-flex; align-items: center; gap: 6px; }
.dash-editbar .dash-add { width: auto; min-width: 190px; height: 34px; }
.dash-grid.editing .dw { border: 1.5px dashed var(--border-strong); border-radius: 14px; padding: 6px; background: var(--surface-2); }
.dw-bar { display: flex; align-items: center; gap: 4px; padding: 2px 4px 8px; flex-wrap: wrap; }
.dw-bar b { display: inline-flex; align-items: center; gap: 4px; font-size: 13px; }
.dw-bar b .i { width: 15px; height: 15px; color: var(--text-3); }
.dw-grip { cursor: grab; display: grid; place-items: center; width: 30px; height: 30px; border-radius: 8px; color: var(--text-3); }
.dw-grip:hover { background: var(--surface-3); color: var(--text); }
.dw-bar .btn.danger { color: var(--danger-strong); }
.dw-empty { display: flex; gap: 12px; align-items: center; padding: 14px 16px; color: var(--text-2); }
.dw-empty > .i { width: 22px; height: 22px; color: var(--text-3); flex: none; }
/* کادر کاشی‌ها */
.dtiles-card .card-body { padding-top: 10px; }
.dtiles-seg button { display: inline-flex; align-items: center; gap: 4px; height: 30px; }
.dtiles-seg .i { width: 15px; height: 15px; }
.dtiles.view-grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); grid-auto-rows: minmax(118px, auto); grid-auto-flow: dense; gap: 12px; }
.dtiles.view-grid .plt-tile { min-height: 0; height: 100%; }
.dtile.sz-s { grid-column: span 2; padding: 12px 10px; align-items: center; text-align: center; gap: 8px; }
.dtile.sz-s small { display: none; }
.dtile.sz-s b { font-size: 13px; line-height: 1.5; }
.dtile.sz-m { grid-column: span 3; }
.dtile.sz-l { grid-column: span 6; grid-row: span 2; }
.dtile.sz-l .plt-ti { width: 54px; height: 54px; border-radius: 15px; }
.dtile.sz-l .plt-ti .i { width: 27px; height: 27px; }
.dtile.sz-l b { font-size: 17px; }
.dtile-big { margin-top: auto; font-size: 34px; font-weight: 900; line-height: 1; color: var(--tc, var(--primary)); }
.dtile[class*='tc-'] .plt-ti, .dtile-row[class*='tc-'] .plt-ti { background: color-mix(in srgb, var(--tc) 15%, var(--surface)); color: var(--tc); }
.dtile[class*='tc-'] { border-top: 3px solid var(--tc); }
.dtile.sz-l[class*='tc-'] { background: linear-gradient(160deg, color-mix(in srgb, var(--tc) 10%, var(--surface)), var(--surface) 70%); }
.dtiles.view-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.dtile-row { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface);
  color: inherit; text-decoration: none !important; min-width: 0; }
.dtile-row:hover { border-color: var(--primary-2); }
.dtile-row .plt-ti { width: 38px; height: 38px; border-radius: 11px; background: var(--primary-soft); color: var(--primary); display: grid; place-items: center; flex: none; }
.dtile-row .plt-ti .i { width: 20px; height: 20px; }
.dtile-row b { display: block; font-size: 14px; }
.dtile-row small { display: block; color: var(--text-3); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dtile-row > .i { width: 16px; height: 16px; color: var(--text-3); flex: none; }
.dtile-row.lit { border-color: var(--gold); }
.dtile-row[class*='tc-'] { border-inline-start: 4px solid var(--tc); }
/* ابزار کاشی در حالت چیدن */
.dtile.editing, .dtile-row.editing { cursor: grab; position: relative; }
.dtile.editing.off, .dtile-row.editing.off { opacity: .45; border-style: dashed; }
.dtile.dragging, .dtile-row.dragging { opacity: .35; }
.dtt { display: flex; gap: 2px; flex-wrap: wrap; justify-content: center; margin-top: auto; padding-top: 6px; position: relative; }
.dtile-row .dtt { margin: 0; padding: 0; flex: none; }
.dtt-b { width: 28px; height: 28px; border-radius: 8px; border: 1px solid var(--border); background: var(--surface); color: var(--text-2); display: grid; place-items: center;
  cursor: pointer; font: inherit; font-size: 12px; font-weight: 800; padding: 0; }
.dtt-b .i { width: 14px; height: 14px; }
.dtt-b:hover { border-color: var(--primary-2); color: var(--primary); }
.dtt-b.on { background: var(--gold-soft); color: var(--accent); }
.dtt-color { width: 28px; height: 28px; border-radius: 50%; border: 2px solid var(--surface); box-shadow: 0 0 0 1px var(--border-strong); cursor: pointer; padding: 0;
  background: var(--tc, var(--primary-soft)); }
.dtt-color.tc-none { background: conic-gradient(var(--tile-blue), var(--tile-green), var(--tile-gold), var(--tile-red), var(--tile-purple), var(--tile-blue)); }
.dtt-pal { position: absolute; z-index: 40; bottom: 34px; inset-inline-start: 50%; transform: translateX(50%); display: grid; grid-template-columns: repeat(5, 26px); gap: 6px;
  padding: 8px; border-radius: 12px; background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow-lg); }
.dtt-pal button { width: 26px; height: 26px; border-radius: 50%; border: 2px solid var(--surface); box-shadow: 0 0 0 1px var(--border-strong); cursor: pointer; padding: 0;
  background: var(--tc, var(--primary-soft)); }
.dtt-pal button.tc-none { background: var(--primary-soft); }
.dtt-pal button.on { box-shadow: 0 0 0 2px var(--text); }
@media (max-width: 1100px) { .dtiles.view-grid { grid-template-columns: repeat(12, minmax(0, 1fr)); } .dtile.sz-s { grid-column: span 3; } .dtile.sz-m { grid-column: span 4; } .dtile.sz-l { grid-column: span 8; } }
@media (max-width: 760px) {
  .dash-grid { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .dw .grid.k4 { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .dtiles.view-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); grid-auto-rows: minmax(98px, auto); gap: 8px; }
  .dtile.sz-s { grid-column: span 1; padding: 10px 4px; }
  .dtile.sz-m { grid-column: span 2; }
  .dtile.sz-l { grid-column: span 4; grid-row: span 1; }
  .dtile.sz-s b { font-size: 11.5px; }
  .dtile.sz-s .plt-ti { width: 38px; height: 38px; }
  .dtiles.view-list { grid-template-columns: minmax(0, 1fr); }
  .dash-editbar .dash-add { min-width: 0; flex: 1 1 100%; }
  .dw-bar .dw-width span, .dw-bar .dw-width { font-size: 12px; }
}

/* ── erp054: صندوق‌برگ (مثل برگهٔ کاغذی) ── */
.slip-paper { padding: 18px 20px; }
.slip-head { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding-bottom: 12px; margin-bottom: 12px; border-bottom: 2px solid var(--text); }
.slip-title { font-size: 22px; font-weight: 900; }
.slip-meta { display: grid; grid-template-columns: repeat(3, minmax(0, auto)); gap: 6px 22px; }
.slip-meta > div { display: flex; flex-direction: column; gap: 2px; }
.slip-meta span { font-size: 11.5px; color: var(--text-3); }
.slip-meta b { font-size: 14px; font-variant-numeric: tabular-nums; }
.slip-lines td, .slip-items td { vertical-align: middle; }
.slip-lines .slip-in { max-width: 180px; }
.slip-lines tfoot th { border-top: 2px solid var(--border-strong); font-size: 14px; }
.slip-diff { font-weight: 800; font-size: 13px; white-space: nowrap; }
.slip-diff.ok { color: var(--ok); }
.slip-diff.bad { color: var(--danger-strong); }
.slip-diff.warn { color: var(--accent); }
.slip-h3 { font-size: 14px; font-weight: 800; margin: 18px 0 8px; }
.slip-items .input { min-width: 90px; }
.slip-sigs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-top: 18px; }
.slip-sig { display: flex; flex-direction: column; gap: 4px; padding: 14px; min-height: 92px; border: 1.5px dashed var(--border-strong); border-radius: 12px; }
.slip-sig b { font-size: 15px; }
@media (max-width: 760px) {
  .slip-paper { padding: 12px; }
  .slip-meta { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .slip-sigs { grid-template-columns: minmax(0, 1fr); }
  .slip-lines .slip-in { max-width: 130px; }
}
@media print {
  .slip-paper { border: 0; box-shadow: none; padding: 0; }
  .slip-paper .input, .slip-paper textarea { border: 0; background: transparent; padding: 0; min-height: 0; height: auto; box-shadow: none; }
  .slip-sig { min-height: 80px; }
  .slip-filters { display: none !important; }
}
.slip-kpis { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)) !important; }
@media (max-width: 760px) { .slip-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; } }
/* erp055: حوالهٔ حساب‌ها */
.xf-sides { display: grid; grid-template-columns: minmax(0, 1fr) 36px minmax(0, 1fr); gap: 10px; align-items: start; }
.xf-side { display: flex; flex-direction: column; gap: 8px; padding: 12px; border: 1px solid var(--border); border-radius: 14px; background: var(--surface); }
.xf-side h3 { margin: 0; font-size: 15px; }
.xf-arrow { display: flex; align-items: center; justify-content: center; height: 100%; color: var(--text-3); }
.xf-seg button { min-width: 0; padding: 0 6px; }
.xf-amt { height: 52px; font-size: 22px; font-weight: 800; text-align: center; }
@media (max-width: 720px) { .xf-sides { grid-template-columns: minmax(0, 1fr); } .xf-arrow { height: 20px; transform: rotate(-90deg); } }
.xf-seg { display: flex; gap: 4px; padding: 4px; border-radius: 12px; background: var(--surface-3); flex-wrap: wrap; }
.xf-seg button { flex: 1; height: 38px; border: 0; border-radius: 9px; background: none; font: inherit; font-weight: 700; color: var(--text-2); cursor: pointer; white-space: nowrap; }
.xf-seg button.on { background: var(--surface); color: var(--primary); box-shadow: 0 1px 4px rgba(15, 23, 42, .12); }

/* erp056 ردیف ۲ — طرح دوم کادرها: سربرگ تمام‌رنگ با نوشتهٔ سفید (کلاس bx-solid روی body) */
body.bx-solid #main .card, body.bx-solid .bx { border: 1.5px solid color-mix(in srgb, var(--bx-c0) 55%, var(--border)); box-shadow: 0 2px 6px color-mix(in srgb, var(--bx-c0) 12%, transparent); }
body.bx-solid #main .card > .card-head, body.bx-solid .bx-head { background: linear-gradient(135deg, var(--bx-c0), color-mix(in srgb, var(--bx-c0) 78%, #000)); border-bottom: 0; color: #fff; }
body.bx-solid #main .card > .card-head h2, body.bx-solid #main .card > .card-head h3, body.bx-solid .bx-head h2,
body.bx-solid #main .card > .card-head > svg:first-child, body.bx-solid .bx-head > svg, body.bx-solid .bx-head .bx-sub { color: #fff; }
body.bx-solid .bx-num { background: #fff; color: var(--bx-c0); }
body.bx-solid #main .card > .card-head .muted, body.bx-solid #main .card > .card-head .small, body.bx-solid .bx-tools .small { color: rgba(255,255,255,.85); }
body.bx-solid .bx-tools .btn.ghost, body.bx-solid #main .card > .card-head .btn.ghost { color: #fff; }
body.bx-solid #main .card > .card-head :is(input, select, textarea, .seg button:not(.on)), body.bx-solid .bx-head :is(input, select, textarea) { color: var(--text); }

/* ── erp056 ردیف ۶: انبارگردانی سریع — دوربین روی صفحه، نام درشت، دکمه‌های تعداد ── */
.icam { display: grid; gap: 8px; }
.icam-frame { aspect-ratio: 16 / 9; max-height: 42vh; }
.icam-bar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.icam-st { font-size: 12.5px; color: var(--text-3); }
.scan-pending.cnt { display: grid; gap: 10px; }
.cnt-pend-name b { font-size: 17px; }
.cnt-quick { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; }
.cnt-quick button { height: 48px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); font: inherit; font-size: 19px; font-weight: 800; color: var(--text); cursor: pointer; }
.cnt-quick button:active, .cnt-quick button:hover { background: var(--primary-soft); border-color: var(--primary); }
.cnt-quick button.pack { grid-column: 1 / -1; font-size: 16px; color: var(--primary); background: var(--primary-soft); border-color: transparent; }
.scan-flash .t { font-size: 17px; }
/* erp056 ردیف ۱۰: جداکنندهٔ گروه در «نام مشابه» و «بارکد هم‌شکل» */
.q-grp { border-top: 2px solid var(--bx-line, var(--border)); padding-top: 4px; }
.seg.wrap { flex-wrap: wrap; }
/* erp056 (پیشنهاد طراح): دکمه‌های تعداد انبارگردانی پررنگ‌تر؛ کارت خلاصهٔ نوشتاری با رنگ خودش */
.cnt-quick button { background: color-mix(in srgb, var(--primary) 7%, var(--surface)); }
#main .desk-narr { --bx-c0: #db2777; --bx-band: color-mix(in srgb, #db2777 12%, var(--surface)); --bx-line: color-mix(in srgb, #db2777 30%, var(--border)); --bx-ink: color-mix(in srgb, #db2777 75%, var(--text)); }
#main .desk-narr > .card-head { background: var(--bx-band); }
/* بازبینی erp056: چاپ با طرح تمام‌رنگ — مرورگر پس‌زمینه را چاپ نمی‌کند، پس نوشتهٔ سربرگ تیره می‌شود */
@media print {
  body.bx-solid #main .card > .card-head, body.bx-solid .bx-head { background: none; color: var(--text); border-bottom: 1px solid var(--border); }
  body.bx-solid #main .card > .card-head :is(h2, h3, svg, .muted, .small), body.bx-solid .bx-head :is(h2, svg, .bx-sub) { color: var(--text); }
}

/* erp057 ت۱۲۳: کالاهای رو به اتمام */
.low-list { display: grid; }
.low-row { display: flex; gap: 12px; align-items: flex-start; padding: 10px 12px; border-bottom: 1px solid var(--border); }
.low-row:last-child { border-bottom: 0; }
.low-days { flex: none; min-width: 64px; text-align: center; padding: 4px 8px; border-radius: 8px; font-weight: 800; font-size: 13px; background: var(--warn-soft, #fef3c7); color: var(--warn, #b45309); }
.low-row.bad .low-days, .low-row.out .low-days { background: var(--danger-soft); color: var(--danger-strong); }
.low-row .small { color: var(--text-2); line-height: 1.9; }
/* erp057 ت۱۱۷: نظر سیستم دربارهٔ قیمت خرید */
.ins-line { display: flex; gap: 8px; align-items: flex-start; line-height: 1.9; font-size: 13.5px; }
.ins-line .badge { flex: none; margin-top: 3px; }
.ins-line.bad { color: var(--danger-strong); }

/* ═════════════ erp057: دسته‌های مشتری، کارت مهر، اثر طرح، کیوسک ═════════════ */
.seg-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.seg-card { padding: 14px; display: flex; flex-direction: column; gap: 10px; border-top: 3px solid var(--border-strong); }
.seg-card.seg-loyal { border-top-color: var(--ok); } .seg-card.seg-at_risk { border-top-color: var(--gold); } .seg-card.seg-lost { border-top-color: var(--danger); } .seg-card.seg-new { border-top-color: var(--info); }
.seg-top { display: flex; gap: 10px; align-items: center; }
.seg-ico { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; background: var(--surface-2); flex: none; }
.seg-loyal .seg-ico { background: var(--ok-soft); color: var(--ok); } .seg-at_risk .seg-ico { background: var(--gold-soft); color: var(--gold-ink); }
.seg-lost .seg-ico { background: var(--danger-soft); color: var(--danger); } .seg-new .seg-ico { background: var(--info-soft); color: var(--info); }
.seg-n { text-align: center; } .seg-n b { display: block; font-size: 1.6rem; line-height: 1.1; } .seg-n small { color: var(--text-3); }
.stp-dots { display: flex; flex-wrap: wrap; gap: 4px; margin: 6px 0; }
.stp-dots i { width: 26px; height: 26px; border-radius: 50%; border: 2px dashed var(--border-strong); display: grid; place-items: center; font-style: normal; font-size: 14px; }
.stp-dots i.on { border: 2px solid var(--gold); background: var(--gold-soft); }
.stp-card { padding: 8px 0; border-bottom: 1px solid var(--border); } .stp-card:last-child { border-bottom: 0; }
.stp-reward { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: var(--radius-sm); background: var(--surface-2); }
.stp-reward.open { background: var(--gold-soft); }
.stp-tabs { margin-bottom: 12px; display: inline-flex; } .stp-tabs a { display: inline-flex; gap: 6px; align-items: center; padding: 6px 12px; text-decoration: none; color: inherit; }
.stp-tabs a.on { background: var(--primary); color: #fff; border-radius: var(--radius-sm); }
.stp-bars { display: flex; align-items: flex-end; gap: 6px; height: 120px; }
.stp-bar { flex: 1; display: flex; flex-direction: column-reverse; align-items: stretch; min-width: 0; }
.stp-bar small { text-align: center; color: var(--text-3); margin-top: 4px; }
.stp-bar i { display: block; border-radius: 3px 3px 0 0; }
.stp-bar i.qr, .stp-key.qr::before { background: var(--gold); } .stp-bar i.buy, .stp-key.buy::before { background: var(--primary); }
.stp-key { display: inline-flex; align-items: center; gap: 6px; margin-inline-end: 14px; } .stp-key::before { content: ''; width: 12px; height: 12px; border-radius: 3px; }
.promo-eff-say { font-size: 1.05rem; line-height: 1.9; padding: 10px 12px; border-radius: var(--radius-sm); background: var(--info-soft); }
.promo-eff-t td, .promo-eff-t th { padding: 6px 8px; }

/* کیوسک (تمام‌صفحه، بی ورود) */
.ksk-body { margin: 0; background: var(--bg); min-height: 100vh; }
.ksk-body #app { min-height: 100vh; display: flex; flex-direction: column; }
.ksk-splash { margin: auto; color: var(--text-3); }
.ksk-head { display: flex; align-items: center; gap: 12px; padding: 12px 18px; background: #1b2336; color: #fff; }
.ksk-head small { display: block; opacity: .75; } .ksk-logo { font-weight: 800; background: #fff; color: #1b2336; border-radius: 8px; padding: 4px 8px; }
.ksk-clock { font-size: 1.4rem; font-weight: 700; }
.ksk-main { flex: 1; display: flex; align-items: center; justify-content: center; padding: 18px; }
.ksk-idle { text-align: center; color: var(--text-2); } .ksk-idle .i { width: 96px; height: 96px; opacity: .5; } .ksk-idle h1 { font-size: 2rem; margin: 10px 0 4px; }
.ksk-idle.bad .i { color: var(--danger); opacity: 1; }
.ksk-spin { width: 48px; height: 48px; border-radius: 50%; border: 5px solid var(--border); border-top-color: var(--primary); animation: spin 1s linear infinite; margin: 0 auto; }
@keyframes spin { to { transform: rotate(360deg); } }
.ksk-card { width: min(720px, 100%); background: var(--surface); border-radius: 18px; box-shadow: var(--shadow-lg); padding: 26px; text-align: center; display: flex; flex-direction: column; gap: 10px; }
.ksk-name { font-size: clamp(1.5rem, 4vw, 2.4rem); margin: 0; }
.ksk-price { display: flex; justify-content: center; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.ksk-price b { font-size: clamp(2.6rem, 9vw, 4.8rem); color: var(--primary); line-height: 1.1; } .ksk-price small { font-size: 1.2rem; color: var(--text-2); }
.ksk-price s { font-size: 1.6rem; color: var(--text-3); } .ksk-price.has-promo b { color: var(--danger); } .ksk-price.none { font-size: 1.2rem; color: var(--text-3); }
.ksk-promo-note { color: var(--danger); font-weight: 700; display: inline-flex; gap: 6px; align-items: center; justify-content: center; }
.ksk-cons { color: var(--text-2); } .ksk-save { margin-inline-start: 10px; background: var(--ok-soft); color: var(--ok); border-radius: 999px; padding: 2px 10px; font-weight: 700; }
.ksk-promos { display: flex; flex-direction: column; gap: 8px; text-align: start; }
.ksk-promo { display: flex; gap: 10px; align-items: center; background: var(--gold-soft); border-radius: 12px; padding: 10px 12px; }
.ksk-points { display: inline-flex; gap: 8px; align-items: center; justify-content: center; color: var(--gold-ink); }
.ksk-foot { padding: 10px 18px 18px; display: flex; justify-content: center; } .ksk-foot .icam { width: min(520px, 100%); }
.ksk-off { margin: auto; text-align: center; padding: 24px; } .ksk-off .i { width: 64px; height: 64px; opacity: .5; }
.ksk-stamp { text-align: center; display: flex; flex-direction: column; align-items: center; gap: 10px; }
.ksk-stamp h1 { font-size: clamp(1.8rem, 5vw, 2.8rem); margin: 0; } .ksk-stamp-how { font-size: 1.2rem; color: var(--text-2); margin: 0; }
.ksk-qr { background: #fff; padding: 14px; border-radius: 18px; box-shadow: var(--shadow-lg); } .ksk-qr svg { width: min(56vh, 80vw); height: auto; display: block; }
.ksk-stamp-dots, .stp-big-dots { display: flex; gap: 6px; flex-wrap: wrap; justify-content: center; }
.ksk-stamp-dots i, .stp-big-dots i { width: 34px; height: 34px; border-radius: 50%; border: 2px dashed var(--border-strong); display: grid; place-items: center; font-style: normal; font-size: 18px; color: var(--text-3); }
.stp-big-dots i.on { border: 2px solid var(--gold); background: var(--gold-soft); } .ksk-stamp-dots i.gift, .stp-big-dots i.gift { border-color: var(--danger); }
.ksk-stamp-reward { font-size: 1.3rem; font-weight: 700; margin: 0; }
/* صفحهٔ مشتری کارت مهر (گوشی) */
.stp-page { max-width: 460px; margin: 0 auto; padding: 18px 16px 30px; display: flex; flex-direction: column; gap: 14px; }
.stp-hero { text-align: center; padding: 18px; border-radius: 18px; background: var(--surface); box-shadow: var(--shadow-sm); }
.stp-hero .i { width: 54px; height: 54px; color: var(--gold-ink); } .stp-hero h1 { margin: 8px 0 4px; font-size: 1.5rem; } .stp-hero p { margin: 0; color: var(--text-2); }
.stp-hero.ok .i { color: var(--ok); } .stp-hero.won { background: var(--gold-soft); } .stp-hero.won .i { color: var(--danger); } .stp-hero.bad .i { color: var(--danger); }
.stp-box { background: var(--surface); border-radius: 14px; padding: 14px; box-shadow: var(--shadow-sm); display: flex; flex-direction: column; gap: 10px; text-align: center; }
.stp-box.warn { background: var(--gold-soft); } .stp-in { font-size: 1.1rem; text-align: center; } .stp-go { width: 100%; justify-content: center; }
.stp-step { display: flex; flex-direction: column; gap: 8px; } .stp-msg { color: var(--danger); min-height: 1.2em; }

.icam-torch { display: inline-flex; gap: 6px; align-items: center; }
.ksk-done .i { color: var(--ok); opacity: 1; }
.stp-names { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.stp-total { font-weight: 700; color: var(--gold-ink); }
.seg-cafe { margin-bottom: 12px; border-top-color: #8b5a2b; } .seg-cafe .seg-ico { background: #f3e6d8; color: #8b5a2b; }
.stp-smspv { background: var(--ok-soft); white-space: pre-wrap; line-height: 1.9; } .stp-smspv.off { opacity: .45; text-decoration: line-through; }
.stp-sticker { font-size: 60px; line-height: 1; width: 112px; height: 112px; margin: 0 auto; border-radius: 34%; display: grid; place-items: center; box-shadow: var(--shadow); background: var(--sf, #fdf3e3); animation: stp-pop .9s cubic-bezier(.2, 1.6, .4, 1) both, stp-float 3s ease-in-out .9s infinite; }
@keyframes stp-pop { from { transform: scale(.2) rotate(-20deg); opacity: 0; } to { transform: scale(1) rotate(0); opacity: 1; } }
@keyframes stp-float { 50% { transform: translateY(-6px) rotate(4deg); } }
.stp-sentence { margin-top: 8px !important; font-weight: 700; color: var(--gold-ink) !important; font-size: 1.05rem; }
.stp-todaytick { display: inline-flex; gap: 6px; align-items: center; justify-content: center; color: var(--ok); font-weight: 700; }
.stp-big-dots i.today { animation: stp-pulse 1.4s ease-in-out 3; box-shadow: 0 0 0 3px var(--ok-soft); border-color: var(--ok); }
@keyframes stp-pulse { 50% { transform: scale(1.18); } }
.stp-hint { text-align: center; }
@media (prefers-reduced-motion: reduce) { .stp-sticker, .stp-big-dots i.today { animation: none; } }
/* ۱۰ قاب استیکر (رنگ و حرکت) */
.sf-0 { --sf: radial-gradient(circle at 30% 30%, #fff7e0, #ffd27a); } .sf-1 { --sf: radial-gradient(circle at 30% 30%, #ffe6ef, #ff9ec0); border-radius: 50%; }
.sf-2 { --sf: linear-gradient(135deg, #d9f7ff, #7fd3f7); } .sf-3 { --sf: linear-gradient(135deg, #e6ffe9, #8be29a); border-radius: 50% 50% 50% 12%; }
.sf-4 { --sf: linear-gradient(135deg, #f1e6ff, #b996ff); } .sf-5 { --sf: conic-gradient(from 45deg, #ffd27a, #ff9ec0, #7fd3f7, #8be29a, #ffd27a); border-radius: 50%; }
.sf-6 { --sf: linear-gradient(160deg, #3b2a1a, #8b5a2b); } .sf-7 { --sf: radial-gradient(circle, #fff, #ffe9a8 60%, #ffb347); border-radius: 28% 72% 64% 36% / 40% 36% 64% 60%; }
.sf-8 { --sf: linear-gradient(135deg, #1b2336, #4b5d8a); } .sf-9 { --sf: repeating-linear-gradient(45deg, #fff3d6 0 10px, #ffe0a3 10px 20px); border-radius: 22%; }
.stp-sticker span { display: inline-block; filter: drop-shadow(0 4px 6px rgba(0,0,0,.18)); }
.sf-1 span, .sf-6 span { animation: stp-spin 2.4s ease-in-out .9s infinite; } .sf-2 span, .sf-8 span { animation: stp-beat 1.2s ease-in-out .9s infinite; }
.sf-3 span, .sf-9 span { animation: stp-wiggle 1.6s ease-in-out .9s infinite; }
@keyframes stp-spin { 50% { transform: rotate(14deg) scale(1.08); } } @keyframes stp-beat { 50% { transform: scale(1.18); } }
@keyframes stp-wiggle { 25% { transform: rotate(-10deg); } 75% { transform: rotate(10deg); } }
@media (prefers-reduced-motion: reduce) { .stp-sticker span { animation: none !important; } }

/* ── erp058: صندوق‌برگ شبانه، تقسیم «بدون پرداخت»، عکس رسید صندوق‌برگ ── */
.night-title { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 4px 0 10px; font-size: 16px; }
.night-sentence { margin: 0; line-height: 2; font-size: 15px; }
.night-unit .card-head h2 { flex: 1; }
.night-credit ul { margin: 4px 0 0; padding-inline-start: 22px; line-height: 1.9; }
.night-parties .night-sentence { padding: 6px 10px; border-radius: 8px; background: var(--surface-2); }
.night-alloc { display: flex; flex-direction: column; gap: 8px; }
.night-alloc-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 6px 8px; border: 1px solid var(--border); border-radius: 8px; }
.night-alloc-row > .grow { min-width: 160px; }
.night-alloc-row .input.num { width: 170px; }
.night-alloc-sum { display: flex; gap: 6px; flex-wrap: wrap; font-size: 14px; }
.night-tabs { max-width: 100%; overflow-x: auto; }
.night-tabs button { white-space: nowrap; }
.slip-photo { display: inline-flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-inline-start: 6px; }
@media (max-width: 600px) {
  .night-alloc-row .input.num { width: 100%; }
  .night-sentence { font-size: 14px; }
}

/* erp059 · سامانهٔ مؤدیان */
.tax-tabs { max-width: 100%; overflow-x: auto; }
.tax-tabs button { white-space: nowrap; }
.tax-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 8px; }
.tax-stat { border: 1px solid var(--border); border-radius: 10px; padding: 10px; display: flex; flex-direction: column; gap: 2px; text-align: center; }
.tax-stat b { font-size: 1.3em; }
.tax-stat span { font-size: .85em; opacity: .75; }
.tax-code { direction: ltr; unicode-bidi: embed; font-size: .85em; word-break: break-all; }
.tax-json { direction: ltr; text-align: left; max-height: 360px; overflow: auto; font-size: .8em; background: var(--bg); padding: 10px; border-radius: 8px; white-space: pre-wrap; word-break: break-all; }
.tax-pem { direction: ltr; min-height: 220px !important; height: auto !important; font-family: monospace; font-size: .8em; width: 100%; }
.tax-sstid { width: 150px; }
.tax-note { max-width: 320px; }

/* erp060 · بانک مشتریان ERP */
.cb-tools { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.cb-add { display: flex; gap: 8px; flex: 1 1 260px; min-width: 0; }
.cb-add .input { flex: 1; min-width: 0; }
.cb-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 10px; }
.cb-row { display: flex; flex-direction: column; gap: 4px; padding: 12px; color: inherit; text-decoration: none; }
.cb-row-head { display: flex; justify-content: space-between; gap: 8px; align-items: center; }
.cb-ltr { direction: ltr; unicode-bidi: plaintext; text-align: start; }
.cb-tabs { max-width: 100%; overflow-x: auto; }
.cb-tabs button { white-space: nowrap; }
.cb-progress { height: 6px; background: var(--border); border-radius: 3px; overflow: hidden; }
.cb-progress > div { height: 100%; background: var(--primary); transition: width .2s; }
.cb-qt { font-size: 1.25em; margin: 0; }
.cb-opts { display: flex; flex-wrap: wrap; gap: 8px; }
.cb-opt { min-height: 46px; padding: 8px 16px; border: 1px solid var(--border-strong); border-radius: 12px; background: var(--surface); color: var(--text); font: inherit; cursor: pointer; }
.cb-opt.on { background: var(--primary); border-color: var(--primary); color: var(--primary-ink); }
.cb-text { font-size: 1.05em; min-height: 46px; }
.cb-sent { display: flex; gap: 6px; align-items: center; color: var(--ok); }
.cb-nav { display: flex; gap: 8px; align-items: center; }
.cb-sents { display: flex; flex-direction: column; gap: 0; }
.cb-sents > * { margin: 0 !important; }
.cb-srow { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.cb-srow.empty .cb-sbtn { opacity: .55; }
.cb-sbtn { background: none; border: 0; padding: 7px 0; margin: 0; min-height: 0; height: auto; line-height: 1.7; font: inherit; color: var(--text); text-align: start; cursor: pointer; }
.cb-secret { font-family: monospace; word-break: break-all; min-width: 0; }
.cb-checks { display: flex; flex-direction: column; gap: 6px; }
.cb-check { display: flex; gap: 10px; align-items: center; min-height: 40px; font-size: 1.05em; }
.cb-check input { width: 22px; height: 22px; }
.cb-copy { width: 100%; min-height: 160px; }


/* ═════ erp061 ═════ */
/* ۳۳: هشدار بزرگ خرید گران‌تر از قیمت فروش */
.p61-over { display: flex; gap: 14px; align-items: flex-start; background: var(--danger); color: #fff; border-radius: 14px; padding: 16px 18px; margin: 0 0 14px; box-shadow: 0 6px 18px rgba(200, 54, 28, .25); }
.p61-over-ic { flex: none; width: 44px; height: 44px; border-radius: 12px; background: rgba(255, 255, 255, .18); display: grid; place-items: center; }
.p61-over-ic svg { width: 26px; height: 26px; }
.p61-over-b { flex: 1; min-width: 0; }
.p61-over-t { font-size: 18px; font-weight: 900; margin-bottom: 6px; }
.p61-over ul { margin: 0 0 6px; padding-inline-start: 18px; line-height: 1.9; }
.p61-over-pct { opacity: .9; }
.p61-over .small { opacity: .92; }
@media (max-width: 600px) { .p61-over { padding: 12px; gap: 10px; } .p61-over-t { font-size: 16px; } .p61-over-ic { width: 36px; height: 36px; } }
/* قیمت‌های خودکار */
.p61-auto-line { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; padding: 8px 0; border-bottom: 1px dashed var(--border); }
.p61-auto-line:last-child { border-bottom: 0; }
.p61-lv { display: flex; flex-wrap: wrap; gap: 6px; width: 100%; }
.p61-lv-i { font-size: 12px; background: var(--ok-soft); color: var(--ok); border-radius: 999px; padding: 2px 10px; }
.p61-lv-i.skip { background: var(--danger-soft); color: var(--danger); }
.p61-sugg { font-size: 11px; color: var(--info); display: block; margin-top: 2px; }
/* ۳۱: انبارگردانی روزانه (پنل خرید) */
.p61-prog { display: grid; gap: 4px; margin: 4px 0; }
.p61-prog-bar { height: 10px; border-radius: 999px; background: var(--surface-3); overflow: hidden; }
.p61-prog-bar span { display: block; height: 100%; background: var(--ok); transition: width .25s; }
.p61-cyc.late { border-color: var(--danger); }
.p61-cyc h3 .badge { margin-inline-start: auto; }
.p61-cyc-list { display: grid; gap: 6px; }
.p61-cyc-row { display: flex; gap: 10px; align-items: center; justify-content: space-between; padding: 10px 12px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); }
.p61-cyc-row.flash { outline: 3px solid var(--gold); }
.p61-cyc-n { min-width: 0; flex: 1; }
.p61-cyc-n b { display: block; }
.p61-cyc-n .badge { margin-top: 4px; }
.p61-cyc-q { display: flex; gap: 6px; align-items: center; flex: none; }
.p61-cyc-q .input { width: 96px; text-align: center; font-size: 17px; font-weight: 800; }
.p61-cyc-q .input.ok { border-color: var(--ok); background: var(--ok-soft); }
.p61-cyc-foot { position: sticky; bottom: 0; padding: 10px 0 4px; background: linear-gradient(transparent, var(--bg) 30%); display: grid; }
@media (max-width: 600px) { .p61-cyc-row { flex-wrap: wrap; } .p61-cyc-q { width: 100%; justify-content: flex-end; } }
/* ۶۸: بایگانی فاکتورها */
.p61-arch { display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.p61-arch-c { border: 1px solid var(--border); border-radius: 12px; background: var(--surface); padding: 12px; display: grid; gap: 6px; }
.p61-arch-c.off { opacity: .6; }
.p61-arch-h { display: flex; gap: 8px; align-items: baseline; }
.p61-thumbs { display: flex; gap: 6px; flex-wrap: wrap; }
.p61-thumb { width: 84px; height: 84px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface-2); padding: 0; overflow: hidden; display: grid; place-items: center; cursor: zoom-in; }
.p61-thumb img { width: 100%; height: 100%; object-fit: cover; }
.p61-thumb .skeleton { width: 100%; height: 100%; }
.p61-more { margin: 12px auto; display: block; }

/* ═════ erp061: هشدار بزرگ تغییر شرکت و سال مالی ═════ */
.p61-switch { position: fixed; inset: 0; z-index: 9000; display: grid; place-items: center; padding: 16px; background: rgba(10, 16, 32, .55); backdrop-filter: blur(3px); animation: p61-in .18s ease-out; }
.p61-switch.out { opacity: 0; transition: opacity .25s; }
.p61-switch-box { width: min(560px, 100%); background: var(--surface); color: var(--text); border-radius: 22px; padding: 28px 26px 22px; text-align: center; box-shadow: 0 24px 60px rgba(0, 0, 0, .35);
  border-top: 10px solid var(--primary-2, #2563eb); display: flex; flex-direction: column; align-items: center; gap: 12px; }
.p61-switch.fy .p61-switch-box { border-top-color: #0f766e; }
.p61-switch.old .p61-switch-box { border-top-color: #d97706; }
.p61-switch-ic { width: 72px; height: 72px; border-radius: 20px; display: grid; place-items: center; background: var(--primary-soft); color: var(--primary-2, #2563eb); }
.p61-switch.fy .p61-switch-ic { background: #ccfbf1; color: #0f766e; }
.p61-switch.old .p61-switch-ic { background: #fef3c7; color: #b45309; }
.p61-switch-ic svg { width: 40px; height: 40px; }
.p61-switch-t { font-size: 26px; font-weight: 900; }
.p61-switch-ft { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 10px; font-size: 20px; }
.p61-switch-ft .from { color: var(--text-3); text-decoration: line-through; }
.p61-switch-ft .to { font-size: 28px; font-weight: 900; color: var(--primary-2, #2563eb); }
.p61-switch.fy .p61-switch-ft .to { color: #0f766e; }
.p61-switch.old .p61-switch-ft .to { color: #b45309; }
.p61-switch-s { color: var(--text-2); font-size: 15px; line-height: 1.9; max-width: 440px; }
.p61-switch .btn { min-width: 160px; height: 46px; font-size: 16px; margin-top: 6px; }
@keyframes p61-in { from { opacity: 0; transform: scale(.97); } to { opacity: 1; transform: none; } }
select.select-pill.p61-fy-old { background-color: #fef3c7; border-color: #d97706; color: #92400e; font-weight: 800; }
:root[data-theme='dark'] select.select-pill.p61-fy-old { background-color: #422006; color: #fcd34d; }
@media (max-width: 600px) { .p61-switch-t { font-size: 22px; } .p61-switch-ft .to { font-size: 22px; } }

/* ═════ erp061: تقویم چک‌ها ═════ */
.p61-cal-card { overflow: hidden; }
.p61-cal-head { display: flex; align-items: center; gap: 8px; padding: 10px 14px; flex-wrap: wrap; }
.p61-cal-head h2 { margin: 0; font-size: 18px; min-width: 120px; text-align: center; }
.p61-cal-sum { font-size: 13px; padding: 4px 10px; border-radius: 999px; font-weight: 700; }
.p61-cal-sum.in { background: var(--ok-soft); color: var(--ok); }
.p61-cal-sum.out { background: var(--danger-soft); color: var(--danger); }
.p61-cal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); border-top: 1px solid var(--border); }
.p61-cal-wd { padding: 8px 4px; text-align: center; font-size: 12px; color: var(--text-3); font-weight: 700; border-bottom: 1px solid var(--border); background: var(--surface-2); }
.p61-cal-wd .abbr { display: none; }
.p61-cal-c { min-height: 96px; border: 0; border-bottom: 1px solid var(--border); border-inline-start: 1px solid var(--border); background: var(--surface); color: inherit; font: inherit;
  display: flex; flex-direction: column; align-items: stretch; gap: 3px; padding: 6px; text-align: start; cursor: pointer; min-width: 0; }
.p61-cal-c:nth-child(7n + 1) { border-inline-start: 0; }
.p61-cal-c.empty { background: var(--surface-2); cursor: default; }
.p61-cal-c.past { background: color-mix(in srgb, var(--surface-2) 60%, var(--surface)); }
.p61-cal-c.fri .p61-cal-n { color: var(--danger); }
.p61-cal-c.today .p61-cal-n { background: var(--primary-2, #2563eb); color: #fff; }
.p61-cal-c.sel { outline: 2px solid var(--primary-2, #2563eb); outline-offset: -2px; }
.p61-cal-c:hover:not(.empty) { background: var(--primary-soft); }
.p61-cal-n { align-self: flex-start; min-width: 26px; height: 26px; border-radius: 13px; display: grid; place-items: center; font-weight: 800; font-size: 14px; padding: 0 4px; }
.p61-cal-t { display: flex; align-items: center; gap: 3px; font-size: 11.5px; border-radius: 6px; padding: 2px 5px; overflow: hidden; white-space: nowrap; min-width: 0; }
.p61-cal-t .lbl { overflow: hidden; text-overflow: ellipsis; }
.p61-cal-t svg { width: 12px; height: 12px; flex: none; }
.p61-cal-t i { font-style: normal; margin-inline-start: auto; font-weight: 800; }
.p61-cal-t.in { background: var(--ok-soft); color: var(--ok); }
.p61-cal-t.out { background: var(--danger-soft); color: var(--danger); }
.p61-cal-t.rem { background: var(--info-soft); color: var(--info); }
.p61-cal-row { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--border); color: inherit; text-decoration: none; }
.p61-cal-row.in { border-inline-start: 4px solid var(--ok); }
.p61-cal-row.out { border-inline-start: 4px solid var(--danger); }
.p61-cal-row.rem { border-inline-start: 4px solid var(--info); }
.p61-cal-row:hover { background: var(--surface-2); }
@media (max-width: 700px) {
  .p61-cal-wd .full { display: none; } .p61-cal-wd .abbr { display: inline; }
  .p61-cal-c { min-height: 58px; padding: 3px; }
  .p61-cal-t { padding: 0; justify-content: center; } .p61-cal-t .lbl, .p61-cal-t i { display: none; }
  .p61-cal-t svg { width: 14px; height: 14px; }
  .p61-cal-head h2 { min-width: 0; }
}

/* ═════ erp061: یادآوری چک، شعبه‌ها، صندوقدارها، نظرسنجی ═════ */
.p61-prev { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border-radius: 12px; background: var(--surface-2); border: 1px dashed var(--border-strong); }
.p61-users { display: flex; flex-wrap: wrap; gap: 6px 16px; }
.p61-sentence { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; margin-bottom: 12px; border-radius: 14px; background: var(--primary-soft); line-height: 1.9; font-size: 15px; }
.p61-sentence svg { flex: none; color: var(--primary-2, #2563eb); margin-top: 4px; }
.p61-bar { position: relative; display: flex; align-items: center; justify-content: flex-end; min-width: 120px; height: 24px; }
.p61-bar span { position: absolute; inset-inline-start: 0; top: 4px; bottom: 4px; border-radius: 4px; background: color-mix(in srgb, var(--primary-2, #2563eb) 22%, transparent); }
.p61-bar b { position: relative; padding-inline: 6px; }
.p61-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 12px; }
.p61-cashier { border-inline-start: 5px solid var(--ok); }
.p61-cashier.warn { border-inline-start-color: #d97706; }
.p61-cashier.bad { border-inline-start-color: var(--danger); }
.p61-cashier-s { line-height: 1.9; }
.p61-mini { display: flex; flex-wrap: wrap; gap: 6px; font-size: 12px; color: var(--text-2); }
.p61-mini span { background: var(--surface-2); border-radius: 999px; padding: 2px 9px; }
.p61-opts { display: flex; flex-direction: column; gap: 8px; }
.p61-opt { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr) auto auto; gap: 8px; align-items: center; }
.p61-opt.off { opacity: .55; }
@media (max-width: 600px) { .p61-opt { grid-template-columns: 1fr auto; } .p61-opt .p61-bar { grid-column: 1 / -1; } }
.p61-models { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 8px; }
.p61-model { border: 1px solid var(--border); border-radius: 12px; padding: 10px 12px; display: flex; flex-direction: column; gap: 4px; align-items: flex-start; }
.p61-model.on { border-color: var(--primary-2, #2563eb); box-shadow: 0 0 0 2px var(--primary-soft); }
.p61-model.free { background: var(--ok-soft); border-color: transparent; }
.p61-h3 { margin: 6px 0 0; font-size: 15px; }
.p61-cost { display: flex; gap: 10px; align-items: center; padding: 10px 12px; border-radius: 12px; background: var(--surface-2); }
.p61-cost.bad { background: var(--danger-soft); color: var(--danger); }

/* ═════ erp061 (۷۰): صورت‌حساب شخص — جدول کادردار مستطیلی با خط ستون‌ها ═════ */
.p61-ledger-wrap { padding: 0; }
table.t.p61-ledger { border-collapse: collapse; border: 1.5px solid var(--border-strong); width: 100%; }
table.t.p61-ledger th, table.t.p61-ledger td { border: 1px solid var(--border-strong); padding: 7px 9px; }
table.t.p61-ledger thead th { background: var(--surface-2); font-weight: 800; text-align: center; }
table.t.p61-ledger tbody tr:nth-child(even) td { background: color-mix(in srgb, var(--surface-2) 45%, transparent); }
table.t.p61-ledger tfoot td { font-weight: 800; background: var(--surface-2); border-top: 2px solid var(--border-strong); }
@media print {
  table.t.p61-ledger { border: 1.5px solid #000 !important; }
  table.t.p61-ledger th, table.t.p61-ledger td { border: 1px solid #000 !important; color: #000 !important; background: none !important; }
  table.t.p61-ledger thead th, table.t.p61-ledger tfoot td { background: #eee !important; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}

/* ═════ erp061: دکمهٔ تقویم نوار بالا — پنجرهٔ روی صفحه ═════ */
.p61-calp { position: fixed; inset: 0; z-index: 8500; background: rgba(10, 16, 32, .45); display: flex; justify-content: center; align-items: flex-start; padding: 64px 16px 16px; animation: p61-in .15s ease-out; }
.p61-calp-box { width: min(980px, 100%); max-height: calc(100vh - 80px); overflow: auto; background: var(--bg); border-radius: 18px; box-shadow: 0 24px 60px rgba(0, 0, 0, .35); }
.p61-calp-head { position: sticky; top: 0; z-index: 2; display: flex; align-items: center; gap: 10px; padding: 12px 16px; background: var(--surface); border-bottom: 1px solid var(--border); }
.p61-calp-head > svg { color: var(--primary-2, #2563eb); }
.p61-calp-x { width: 40px; height: 40px; border-radius: 12px; border: 1px solid var(--border); background: var(--surface-2); color: var(--text); display: grid; place-items: center; cursor: pointer; }
.p61-calp-x:hover { background: var(--danger-soft); color: var(--danger); border-color: var(--danger); }
.p61-calp-body { padding: 12px; }
@media (max-width: 600px) { .p61-calp { padding: 0; } .p61-calp-box { max-height: 100vh; height: 100%; border-radius: 0; } }

/* ═════ erp061: تقویم با رنگ فصل (بهار سبز، تابستان طلایی، پاییز نارنجی، زمستان آبی) ═════ */
.p61-cal-card { --s1: #ea580c; --s2: #b45309; --s-soft: #fff4e6; --s-ink: #9a3412; border: 0; box-shadow: var(--shadow); }
.p61-cal-card.spring { --s1: #16a34a; --s2: #0d9488; --s-soft: #ecfdf3; --s-ink: #166534; }
.p61-cal-card.summer { --s1: #f59e0b; --s2: #e11d48; --s-soft: #fffbeb; --s-ink: #92400e; }
.p61-cal-card.winter { --s1: #2563eb; --s2: #7c3aed; --s-soft: #eef4ff; --s-ink: #1e3a8a; }
.p61-cal-card .p61-cal-head { position: relative; overflow: hidden; color: #fff; padding: 16px 18px; min-height: 76px;
  background: radial-gradient(circle at 12% 120%, rgba(255, 255, 255, .22) 0 60px, transparent 61px), radial-gradient(circle at 88% -40%, rgba(255, 255, 255, .18) 0 90px, transparent 91px),
    linear-gradient(120deg, var(--s1), var(--s2)); }
.p61-cal-card .p61-cal-head h2 { color: #fff; font-size: 22px; font-weight: 900; display: flex; flex-direction: column; align-items: center; line-height: 1.3; text-shadow: 0 1px 2px rgba(0, 0, 0, .15); }
.p61-cal-season { font-size: 12px; font-weight: 700; opacity: .9; letter-spacing: 1px; background: rgba(255, 255, 255, .2); border-radius: 999px; padding: 1px 10px; margin-bottom: 2px; }
.p61-cal-card .p61-cal-head .btn { color: #fff; background: rgba(255, 255, 255, .16); border-color: rgba(255, 255, 255, .3); }
.p61-cal-card .p61-cal-head .btn:hover { background: rgba(255, 255, 255, .28); }
.p61-cal-card .p61-cal-sum { background: rgba(255, 255, 255, .92); box-shadow: 0 2px 8px rgba(0, 0, 0, .12); }
.p61-cal-card .p61-cal-wd { background: var(--s-soft); color: var(--s-ink); font-weight: 800; border-bottom: 2px solid color-mix(in srgb, var(--s1) 35%, transparent); }
.p61-cal-card .p61-cal-wd:nth-child(7) { color: var(--danger); }
.p61-cal-card .p61-cal-c { background: var(--surface); transition: background .12s, transform .12s; }
.p61-cal-card .p61-cal-c.fri { background: color-mix(in srgb, var(--danger-soft) 55%, var(--surface)); }
.p61-cal-card .p61-cal-c.past { background: color-mix(in srgb, var(--surface-2) 75%, var(--surface)); }
.p61-cal-card .p61-cal-c.past .p61-cal-n { opacity: .55; }
.p61-cal-card .p61-cal-c.empty { background: repeating-linear-gradient(135deg, var(--surface-2) 0 6px, var(--surface) 6px 12px); }
.p61-cal-card .p61-cal-c:hover:not(.empty) { background: var(--s-soft); }
.p61-cal-card .p61-cal-c.today { background: color-mix(in srgb, var(--s-soft) 70%, var(--surface)); box-shadow: inset 0 0 0 2px var(--s1); }
.p61-cal-card .p61-cal-c.today .p61-cal-n { background: linear-gradient(135deg, var(--s1), var(--s2)); color: #fff; box-shadow: 0 2px 6px color-mix(in srgb, var(--s1) 45%, transparent); }
.p61-cal-card .p61-cal-c.sel { outline: 2px solid var(--s1); outline-offset: -2px; }
.p61-cal-card .p61-cal-t { font-weight: 700; border-inline-start: 3px solid currentColor; border-radius: 5px; }
.p61-cal-card .p61-cal-t.in { background: #dcfce7; color: #15803d; }
.p61-cal-card .p61-cal-t.out { background: #fee2e2; color: #b91c1c; }
.p61-cal-card .p61-cal-t.rem { background: #e0e7ff; color: #4338ca; }
:root[data-theme='dark'] .p61-cal-card { --s-soft: color-mix(in srgb, var(--s1) 16%, var(--surface)); --s-ink: color-mix(in srgb, var(--s1) 60%, #fff); }
:root[data-theme='dark'] .p61-cal-card .p61-cal-t.in { background: rgba(34, 197, 94, .18); color: #86efac; }
:root[data-theme='dark'] .p61-cal-card .p61-cal-t.out { background: rgba(239, 68, 68, .18); color: #fca5a5; }
:root[data-theme='dark'] .p61-cal-card .p61-cal-t.rem { background: rgba(99, 102, 241, .22); color: #c7d2fe; }
/* erp073: رزرو سوییت و تولد/سالگرد پرسنل در تقویم */
.p61-cal-card .p61-cal-t.bk { background: #fef3c7; color: #92400e; }
:root[data-theme='dark'] .p61-cal-card .p61-cal-t.bk { background: rgba(245, 158, 11, .2); color: #fde68a; }
.p61-cal-occ.ppl { color: #be185d; }
.p61-cal-row.bk { border-inline-start: 3px solid #f59e0b; }
.p61-cal-row.ppl { border-inline-start: 3px solid #ec4899; }
:root[data-theme='dark'] .p61-cal-card .p61-cal-sum { background: rgba(0, 0, 0, .35); }
.p61-calv .p61-cal-day .card-head { background: var(--surface-2); }
.p61-calp-head { background: linear-gradient(90deg, var(--surface), var(--surface-2)); }
@media (max-width: 700px) {
  .p61-cal-card .p61-cal-head { padding: 12px; min-height: 0; }
  .p61-cal-card .p61-cal-head h2 { font-size: 18px; }
  .p61-cal-card .p61-cal-t { border-inline-start: 0; }
}

/* ═════ erp061: تقویم جذاب‌تر — کاشی‌های گرد روی زمینهٔ فصل، نقش فصل در سرصفحه، تاریخ میلادی ریز ═════ */
.p61-cal-card { overflow: hidden; border-radius: 20px; }
.p61-cal-card .p61-cal-head { min-height: 104px; padding: 18px 20px; align-items: center; }
.p61-cal-art { position: absolute; inset-inline-start: 22%; top: 0; bottom: 0; width: 46%; pointer-events: none; display: flex; align-items: center; }
.p61-cal-art svg { width: 100%; height: 100%; }
.p61-cal-card .p61-cal-head > *:not(.p61-cal-art) { position: relative; z-index: 1; }
.p61-cal-card .p61-cal-head h2 { font-size: 28px; letter-spacing: -.3px; }
.p61-cal-sub { font-size: 12px; font-weight: 600; opacity: .92; margin-top: 2px; }
.p61-cal-card .p61-cal-sum.cnt { background: rgba(255, 255, 255, .22); color: #fff; box-shadow: none; border: 1px solid rgba(255, 255, 255, .35); }
.p61-cal-card .p61-cal { gap: 6px; padding: 10px; border-top: 0; background: linear-gradient(180deg, var(--s-soft), var(--surface) 70%); }
.p61-cal-card .p61-cal-wd { border: 0; background: transparent; padding: 4px 2px 2px; font-size: 12.5px; }
.p61-cal-card .p61-cal-c { border: 0; border-radius: 14px; min-height: 92px; box-shadow: 0 1px 2px rgba(15, 23, 42, .06), 0 0 0 1px color-mix(in srgb, var(--s1) 10%, var(--border)); padding: 7px; }
.p61-cal-card .p61-cal-c:hover:not(.empty) { transform: translateY(-2px); box-shadow: 0 6px 16px color-mix(in srgb, var(--s1) 22%, transparent), 0 0 0 1px color-mix(in srgb, var(--s1) 35%, transparent); background: var(--surface); }
.p61-cal-card .p61-cal-c.empty { box-shadow: none; background: transparent; opacity: .5; }
.p61-cal-card .p61-cal-c.today { background: linear-gradient(160deg, color-mix(in srgb, var(--s1) 14%, var(--surface)), var(--surface)); box-shadow: 0 0 0 2px var(--s1), 0 6px 18px color-mix(in srgb, var(--s1) 25%, transparent); }
.p61-cal-card .p61-cal-c.sel { outline: 0; box-shadow: 0 0 0 2px var(--s2), 0 6px 16px color-mix(in srgb, var(--s2) 25%, transparent); }
.p61-cal-top { display: flex; align-items: center; justify-content: space-between; gap: 4px; }
.p61-cal-card .p61-cal-n { font-size: 16px; }
.p61-cal-g { font-size: 10.5px; color: var(--text-3); font-weight: 600; }
.p61-cal-card .p61-cal-t { border-inline-start: 0; border-radius: 999px; padding: 3px 8px; box-shadow: 0 1px 2px rgba(0, 0, 0, .06); }
.p61-cal-card .p61-cal-t.in { background: linear-gradient(90deg, #dcfce7, #bbf7d0); }
.p61-cal-card .p61-cal-t.out { background: linear-gradient(90deg, #fee2e2, #fecaca); }
.p61-cal-card .p61-cal-t.rem { background: linear-gradient(90deg, #e0e7ff, #c7d2fe); }
:root[data-theme='dark'] .p61-cal-card .p61-cal-t.in { background: rgba(34, 197, 94, .2); }
:root[data-theme='dark'] .p61-cal-card .p61-cal-t.out { background: rgba(239, 68, 68, .2); }
:root[data-theme='dark'] .p61-cal-card .p61-cal-t.rem { background: rgba(99, 102, 241, .26); }
:root[data-theme='dark'] .p61-cal-card .p61-cal-c { box-shadow: 0 0 0 1px var(--border); }
.p61-calv .p61-cal-day { border-radius: 18px; overflow: hidden; }
.p61-calv .p61-cal-row { border-radius: 12px; background: var(--surface); box-shadow: 0 1px 2px rgba(15, 23, 42, .05); }
@media (max-width: 700px) {
  .p61-cal-card .p61-cal { gap: 3px; padding: 6px; }
  .p61-cal-card .p61-cal-c { min-height: 56px; border-radius: 10px; padding: 4px; }
  .p61-cal-card .p61-cal-head h2 { font-size: 20px; }
  .p61-cal-g { display: none; }
  .p61-cal-art { inset-inline-start: 30%; width: 60%; opacity: .8; }
  .p61-cal-card .p61-cal-t { padding: 1px 0; }
}

/* erp064: کادر گروه‌ها بالای فهرست کالاها — سربرگ (عنوان، مسیر، جست‌وجو) و خانه‌های مرتب گروه‌ها با شمار */
.gbar { padding: 0; margin-bottom: 12px; overflow: hidden; }
.gbar-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 8px 12px; background: var(--surface-2); border-bottom: 1px solid var(--border); }
.gbar-head > svg { width: 18px; height: 18px; color: var(--primary); }
.gbar-head > b { font-size: 14px; padding-inline-end: 6px; border-inline-end: 1px solid var(--border); }
.gbar-head .input { max-width: 220px; height: 34px; }
.gbar-crumbs { display: flex; align-items: center; gap: 2px; flex-wrap: wrap; }
.gcrumb { border: 0; background: none; padding: 4px 8px; border-radius: 7px; cursor: pointer; font: inherit; font-size: 13.5px; color: var(--text-2); display: inline-flex; gap: 6px; align-items: center; }
.gcrumb:hover { background: var(--surface-3); }
.gcrumb.on { color: var(--primary); font-weight: 700; }
.gsep { color: var(--text-3); }
.gbar-chips { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 8px; padding: 10px 12px; max-height: 196px; overflow: auto; }
.gchip { display: flex; align-items: center; gap: 6px; border: 1px solid var(--border); background: var(--surface); border-radius: 9px; padding: 7px 10px;
  cursor: pointer; font: inherit; font-size: 13.5px; color: var(--text); min-height: 38px; text-align: right; }
.gchip > span:first-child { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gchip:hover { border-color: var(--primary); color: var(--primary); }
.gchip.on { background: var(--primary-soft); border-color: var(--primary); color: var(--primary); font-weight: 700; }
.gchip-n { font-size: 12px; color: var(--text-3); font-variant-numeric: tabular-nums; background: var(--surface-2); border-radius: 6px; padding: 1px 6px; }
.gchip-k { color: var(--text-3); font-weight: 700; }
@media (max-width: 640px) {
  .gbar-head .input { max-width: none; flex: 1 1 100%; }
  .gbar-chips { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* erp064: ورودی مرجع — جفت کردن ستون‌ها */
.map-wrap { max-height: 360px; }
table.map-t th { padding: 6px; background: var(--surface-2); }
table.map-t .map-sel { min-width: 130px; font-weight: 600; }
table.map-t .map-sel.set { border-color: var(--primary); color: var(--primary); background: var(--primary-soft); }
table.map-t td { font-size: 13px; white-space: nowrap; max-width: 260px; overflow: hidden; text-overflow: ellipsis; }
table.map-t tr.map-head td { font-weight: 700; color: var(--text-2); background: var(--surface-2); }
table.t tr.row-bad td { background: var(--danger-soft); }

.imp-opts { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 8px; padding: 0 14px 12px; }
.imp-opt { display: flex; gap: 10px; align-items: flex-start; border: 1px solid var(--border); border-radius: 9px; padding: 10px 12px; cursor: pointer; background: var(--surface); flex-wrap: wrap; }
.imp-opt:has(> input:checked) { border-color: var(--primary); background: var(--primary-soft); }
.imp-radio { cursor: default; }
.imp-opt > input[type=checkbox] { margin-top: 3px; }
.imp-opt > div { flex: 1; min-width: 180px; }

/* erp064: مرتب‌سازی کالاها */
.sort-filters { margin-bottom: 10px; }
/* فیلترهای حرفه‌ای: جست‌وجو، کادرهای برچسب‌دار هر دسته، فیلترهای فعال با × */
.flt-top { display: flex; align-items: center; gap: 12px; padding: 10px 14px; border-bottom: 1px solid var(--border); background: var(--surface-2); }
.flt-search { display: flex; align-items: center; gap: 8px; flex: 1 1 360px; max-width: 520px; }
.flt-search > svg { width: 18px; height: 18px; color: var(--text-3); }
.flt-search .input { flex: 1; }
.flt-count { font-size: 13px; font-weight: 700; color: var(--text-2); font-variant-numeric: tabular-nums; }
.flt-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(165px, 1fr)); gap: 10px 12px; padding: 12px 14px; }
.flt-field { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.flt-field > span { font-size: 11.5px; font-weight: 700; color: var(--text-3); letter-spacing: .2px; }
.flt-field .input { height: 36px; font-size: 13.5px; }
.flt-field .input.on { border-color: var(--primary); background: var(--primary-soft); color: var(--primary); font-weight: 700; }
.flt-foot { display: flex; align-items: center; gap: 8px; padding: 8px 14px; border-top: 1px dashed var(--border); min-height: 44px; }
.flt-foot > svg { width: 16px; height: 16px; color: var(--text-3); flex: none; }
.flt-pills { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.flt-pill { display: inline-flex; align-items: center; gap: 4px; background: var(--primary-soft); color: var(--primary); border: 1px solid var(--primary); border-radius: 7px;
  padding: 2px 4px 2px 8px; font-size: 12.5px; font-weight: 600; }
.flt-pill button { border: 0; background: none; color: inherit; cursor: pointer; padding: 2px; display: grid; place-items: center; border-radius: 5px; }
.flt-pill button:hover { background: var(--surface); }
.flt-pill svg { width: 12px; height: 12px; }
.flt-clear { border: 0; background: none; color: var(--danger-strong); cursor: pointer; font: inherit; font-size: 12.5px; padding: 2px 6px; }
.flt-clear:hover { text-decoration: underline; }
@media (max-width: 640px) { .flt-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.sort-bar { position: sticky; top: 0; z-index: 5; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 10px 14px; margin-bottom: 10px;
  background: var(--primary-soft); border: 1px solid var(--primary); border-radius: 10px; }
table.t tr.picked td { background: var(--primary-soft); }

/* erp064: تقویم جمع‌وجور (بی‌اسکرول)، تعطیل قرمز، سوگواری مشکی، کادر شیشه‌ای روز */
.p61-cal-wrap { position: relative; }
.p61-calp-box { overflow: hidden; display: flex; flex-direction: column; }
.p61-calp-body { padding: 10px; overflow: auto; }
.p61-calp .p61-cal-card .p61-cal-head { min-height: 0; padding: 10px 14px; }
.p61-calp .p61-cal-card .p61-cal-head h2 { font-size: 19px; }
.p61-calp .p61-cal-wd { padding: 5px 4px; }
.p61-calp .p61-cal-c { min-height: 0; height: clamp(44px, calc((100vh - 330px) / 6), 84px); padding: 4px 6px; gap: 2px; }
.p61-cal-c { position: relative; }
.p61-cal-occ { font-size: 10.5px; line-height: 1.3; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; color: var(--text-2); font-weight: 600; }
.p61-cal-c.hol .p61-cal-n, .p61-cal-c.hol .p61-cal-occ { color: #dc2626; }
.p61-cal-card .p61-cal-c.hol { background: color-mix(in srgb, #fee2e2 70%, var(--surface)); }
.p61-cal-c.mourn { box-shadow: inset 0 3px 0 #111; }
.p61-cal-c.mourn .p61-cal-occ { color: #111; font-weight: 800; }
.p61-cal-c.mourn:not(.hol) .p61-cal-n { color: #111; }
.p61-cal-c.mourn::after { content: ''; position: absolute; top: 0; inset-inline-start: 0; width: 0; height: 0; border-top: 12px solid #111; border-inline-end: 12px solid transparent; }
:root[data-theme='dark'] .p61-cal-c.mourn { box-shadow: inset 0 3px 0 #e5e7eb; }
:root[data-theme='dark'] .p61-cal-c.mourn .p61-cal-occ, :root[data-theme='dark'] .p61-cal-c.mourn:not(.hol) .p61-cal-n { color: #f3f4f6; }
:root[data-theme='dark'] .p61-cal-c.mourn::after { border-top-color: #e5e7eb; }
:root[data-theme='dark'] .p61-cal-card .p61-cal-c.hol { background: color-mix(in srgb, #7f1d1d 35%, var(--surface)); }
.p61-cal-legend { display: flex; gap: 14px; justify-content: center; padding: 6px 10px 8px; font-size: 12px; color: var(--text-2); border-top: 1px solid var(--border); }
.p61-cal-legend span::before { content: ''; display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-inline-end: 5px; vertical-align: -1px; }
.p61-cal-legend .hol::before { background: #dc2626; }
.p61-cal-legend .mourn::before { background: #111; }
.p61-cal-legend .today::before { background: var(--primary-2, #2563eb); }
/* کادر شیشه‌ای روی تقویم */
.p61-glass { position: absolute; inset: 0; z-index: 5; display: none; align-items: center; justify-content: center; padding: 14px;
  background: rgba(15, 23, 42, .18); backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px); }
.p61-glass.on { display: flex; animation: p61-in .15s ease-out; }
.p61-glass-box { width: min(460px, 100%); max-height: 100%; overflow: auto; border-radius: 18px;
  background: rgba(255, 255, 255, .62); backdrop-filter: blur(18px) saturate(1.5); -webkit-backdrop-filter: blur(18px) saturate(1.5);
  border: 1px solid rgba(255, 255, 255, .7); box-shadow: 0 18px 50px rgba(15, 23, 42, .28), inset 0 1px 0 rgba(255, 255, 255, .8); color: #111827; }
:root[data-theme='dark'] .p61-glass-box { background: rgba(30, 34, 46, .6); border-color: rgba(255, 255, 255, .14); color: #f3f4f6; box-shadow: 0 18px 50px rgba(0, 0, 0, .5), inset 0 1px 0 rgba(255, 255, 255, .08); }
.p61-glass-head { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-bottom: 1px solid rgba(255, 255, 255, .5); }
.p61-glass-n { width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; font-size: 22px; font-weight: 900; color: #fff;
  background: linear-gradient(135deg, var(--s1, #2563eb), var(--s2, #7c3aed)); box-shadow: 0 4px 12px rgba(0, 0, 0, .18); }
.p61-glass-head.hol .p61-glass-n { background: linear-gradient(135deg, #ef4444, #b91c1c); }
.p61-glass-head.mourn .p61-glass-n { background: linear-gradient(135deg, #374151, #000); }
.p61-glass-x { width: 36px; height: 36px; border-radius: 11px; border: 1px solid rgba(0, 0, 0, .12); background: rgba(255, 255, 255, .5); color: inherit; display: grid; place-items: center; cursor: pointer; }
.p61-glass-x:hover { background: #fee2e2; color: #b91c1c; }
.p61-glass-body { padding: 12px 14px 14px; }
.p61-glass-body .p61-cal-row { background: rgba(255, 255, 255, .55); border-color: rgba(0, 0, 0, .08); }
:root[data-theme='dark'] .p61-glass-body .p61-cal-row { background: rgba(255, 255, 255, .06); border-color: rgba(255, 255, 255, .1); }
.p61-occ-tag { font-size: 12.5px; font-weight: 700; padding: 3px 10px; border-radius: 999px; background: rgba(0, 0, 0, .06); }
.p61-occ-tag.hol { background: #fee2e2; color: #b91c1c; }
.p61-occ-tag.mourn { background: #111; color: #fff; }
@media (max-width: 760px) {
  .p61-cal-occ { display: none; }
  .p61-calp .p61-cal-c { height: clamp(42px, calc((100vh - 300px) / 6), 70px); }
}
/* erp064: تقویم کوچک (اندازهٔ دوم؛ انتخاب کاربر می‌ماند) */
.p61-calp-size button { padding: 4px 10px; font-size: 12.5px; }
.p61-calp.small .p61-calp-box { width: min(620px, 100%); }
.p61-calp.small .p61-calp-head { padding: 8px 12px; gap: 8px; }
.p61-calp.small .p61-calp-x { width: 34px; height: 34px; }
.p61-calp.small .p61-calp-body { padding: 8px; }
.p61-calp.small .p61-cal-card .p61-cal-head { padding: 6px 10px; gap: 6px; }
.p61-calp.small .p61-cal-card .p61-cal-head h2 { font-size: 16px; }
.p61-calp.small .p61-cal-season, .p61-calp.small .p61-cal-sub, .p61-calp.small .p61-cal-art, .p61-calp.small .p61-cal-sum { display: none; }
.p61-calp.small .p61-cal-wd { padding: 3px 2px; font-size: 11px; }
.p61-calp.small .p61-cal-wd .full { display: none; }
.p61-calp.small .p61-cal-wd .abbr { display: inline; }
.p61-calp.small .p61-cal-c { height: clamp(34px, calc((100vh - 330px) / 7), 52px); padding: 2px 4px; }
.p61-calp.small .p61-cal-n { min-width: 22px; height: 22px; font-size: 13px; }
.p61-calp.small .p61-cal-g, .p61-calp.small .p61-cal-occ { display: none; }
.p61-calp.small .p61-cal-t { padding: 0; justify-content: center; }
.p61-calp.small .p61-cal-t .lbl, .p61-calp.small .p61-cal-t i { display: none; }
.p61-calp.small .p61-cal-legend { padding: 4px 8px; font-size: 11px; }
.p61-calp.small .p61-glass-box { width: min(380px, 100%); }

/* erp066: حضور هم‌زمان روی سند */
.presence-bar { margin: 0 0 10px; padding: 8px 12px; border-radius: 8px; font-size: 13px;
  background: color-mix(in srgb, var(--warn, #d97706) 14%, transparent); color: var(--text, inherit);
  border: 1px solid color-mix(in srgb, var(--warn, #d97706) 40%, transparent); display: flex; align-items: center; gap: 6px; }
@media print { .presence-bar { display: none !important; } }

/* erp067 (درخواست کاربر ۱۰ آبان): سرستون جدولِ داخل کادر هم‌رنگ گروه منو. طرح «کم‌رنگ»: نوار کم‌رنگ گروه با نوشتهٔ رنگ گروه؛
   طرح «سربرگ پررنگ»: تمام‌رنگ با نوشتهٔ سفید — صفحه‌های فقط‌جدول (واحدها، کالاها، اسناد…) هم سربرگ رنگی می‌گیرند */
#main :is(.card, .bx) table.t > thead > tr > th { background: var(--bx-band); color: var(--bx-ink); border-bottom-color: var(--bx-line); }
#main :is(.card, .bx) table.t > thead > tr > th + th { border-inline-start-color: var(--bx-line); }
#main :is(.card, .bx) table.t > thead > tr > th.sortable:hover { background: color-mix(in srgb, var(--bx-c0) 22%, var(--surface)); color: var(--bx-ink); }
#main :is(.card, .bx) table.t > thead > tr > th.sorted { color: var(--bx-c0); }
body.bx-solid #main :is(.card, .bx) table.t > thead > tr > th { background: var(--bx-c0); color: #fff; border-bottom-color: color-mix(in srgb, var(--bx-c0) 75%, #000); }
body.bx-solid #main :is(.card, .bx) table.t > thead > tr > th + th { border-inline-start-color: color-mix(in srgb, #fff 28%, var(--bx-c0)); }
body.bx-solid #main :is(.card, .bx) table.t > thead > tr > th.sortable:hover { background: color-mix(in srgb, var(--bx-c0) 82%, #000); color: #fff; }
body.bx-solid #main :is(.card, .bx) table.t > thead > tr > th.sorted { color: #fff; text-decoration: underline; text-underline-offset: 4px; }
body.bx-solid #main :is(.card, .bx) table.t > thead > tr > th .colbtn { background: rgba(255, 255, 255, .16); border-color: rgba(255, 255, 255, .5); color: #fff; }
@media print { #main :is(.card, .bx) table.t > thead > tr > th { background: #f0f0f0 !important; color: #000 !important; } }
#main .card > .table-wrap:first-child { border-radius: 11px 11px 0 0; }

/* erp070: پهنای ستون با کشیدن لبهٔ سرستون؛ اسکرول افقی جدول پهن */
.table-wrap { max-width: 100%; }
.card, .boxer, section { min-width: 0; }
.table-wrap.tw-x { max-height: calc(100vh - 150px); overflow: auto; }
table th { position: relative; }
.col-rs { position: absolute; top: 0; bottom: 0; inset-inline-end: -4px; width: 9px; cursor: col-resize; z-index: 3; touch-action: none; }
.col-rs:hover, body.col-resizing .col-rs:active { background: color-mix(in srgb, var(--primary) 35%, transparent); }
body.col-resizing { cursor: col-resize; user-select: none; }
table.cw { table-layout: fixed; }
table.cw td, table.cw th { overflow: hidden; text-overflow: ellipsis; }
table.cw td.nm { min-width: 0; }
@media (pointer: coarse) { .col-rs { width: 16px; inset-inline-end: -8px; } }

/* ═════ erp071: هوشمندی، بخش‌ها، پورتال تأمین‌کننده ═════ */
.t-ok { color: var(--ok); } .t-bad { color: var(--danger-strong); } .t-warn { color: var(--accent); }
.voice-btn.listening { color: #fff; background: var(--danger); animation: v71-pulse 1.1s ease-in-out infinite; }
@keyframes v71-pulse { 0%, 100% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--danger) 45%, transparent); } 50% { box-shadow: 0 0 0 7px transparent; } }
.p71-learn { background: var(--info-soft); border-color: transparent; }
.p71-learn-ic { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: var(--surface); color: var(--info); flex: none; }
.p71-sug { margin-bottom: 10px; border-inline-start: 4px solid var(--primary); }
.p71-sug.done { opacity: .62; border-inline-start-color: var(--border); }
.p71-sent { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.p71-bar { position: relative; height: 10px; border-radius: 999px; background: var(--surface-2); overflow: visible; min-width: 120px; }
.p71-bar > i { position: absolute; inset-block: 0; inset-inline-start: 0; border-radius: inherit; background: var(--primary); }
.p71-bar > b { position: absolute; top: -3px; width: 3px; height: 16px; border-radius: 2px; background: var(--accent); }
.p71-plan { border: 1px dashed var(--border); box-shadow: none; }
.p71-cold { border-inline-start: 4px solid var(--ok); }
.p71-cold.bad { border-inline-start-color: var(--danger); background: color-mix(in srgb, var(--danger-soft) 45%, var(--surface)); }
.p71-quad .p71-q { border-top: 4px solid var(--border); }
.p71-q.star { border-top-color: var(--ok); } .p71-q.plowhorse { border-top-color: var(--accent); } .p71-q.puzzle { border-top-color: var(--info); } .p71-q.dog { border-top-color: var(--danger); }
.prt-page { max-width: 640px; margin: 0 auto; padding: 18px 16px 30px; display: flex; flex-direction: column; gap: 12px; }
.prt-page h2 { font-size: 15px; margin: 8px 4px 0; }
.prt-hero { text-align: center; padding: 18px; border-radius: 16px; background: var(--surface); box-shadow: var(--shadow-sm); }
.prt-hero h1 { margin: 4px 0; font-size: 20px; } .prt-hero p { margin: 0; color: var(--text-3); }
.prt-hero.bad h1 { color: var(--danger-strong); }
.prt-box { background: var(--surface); border-radius: 14px; padding: 14px; box-shadow: var(--shadow-sm); display: flex; flex-direction: column; gap: 8px; }
.prt-bal { align-items: center; text-align: center; } .prt-bal b { font-size: 20px; font-variant-numeric: tabular-nums; }
.prt-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.prt-tbl { width: 100%; border-collapse: collapse; font-size: 13px; }
.prt-tbl td { padding: 6px 4px; border-bottom: 1px solid var(--border); } .prt-tbl td.num { text-align: left; direction: ltr; font-variant-numeric: tabular-nums; white-space: nowrap; }
.prt-ack { display: grid; grid-template-columns: 1fr 2fr auto; gap: 8px; align-items: center; }
.prt-ok { display: flex; align-items: center; gap: 6px; color: var(--ok); background: var(--ok-soft); border-radius: 10px; padding: 6px 10px; font-size: 13px; }
.prt-msg { grid-column: 1 / -1; color: var(--danger-strong); font-size: 13px; } .prt-msg:empty { display: none; }
.prt-foot { text-align: center; margin-top: 8px; }
@media (max-width: 560px) { .prt-ack { grid-template-columns: 1fr; } }
.rnt-dyn { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; padding: 6px 10px; border-radius: 10px; background: var(--info-soft); color: var(--info); }
.rnt-dyn .muted { color: var(--text-2); }
.d71-n { display: flex; align-items: flex-start; gap: 8px; padding: 8px 10px; border-radius: 10px; background: var(--surface-2); }
.d71-n.urgent { background: var(--danger-soft); }
.d71-sug { display: flex; align-items: center; gap: 8px; color: inherit; text-decoration: none; }
.d71-t { display: flex; flex-direction: column; gap: 4px; color: inherit; text-decoration: none; }

/* erp073: نسیه — ظاهر تازه (خلاصهٔ بالا، فیلتر یک‌خطی، جدول دسکتاپ، کارت گوشی) */
.cr2-stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 10px; }
.cr2-stat { display: flex; gap: 10px; align-items: center; padding: 12px 14px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-sm); }
.cr2-stat .ic { width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center; background: var(--primary-soft); color: var(--primary); flex: none; }
.cr2-stat.warn .ic { background: var(--gold-soft); color: var(--gold-ink, var(--gold)); } .cr2-stat.bad .ic { background: var(--danger-soft); color: var(--danger); }
.cr2-stat small { display: block; color: var(--text-3); font-size: 12px; } .cr2-stat b { font-size: 16px; }
.cr2-filter { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; padding: 10px 12px; }
.cr2-filter > .grow { min-width: 200px; } .cr2-filter select { width: auto; min-width: 160px; }
.cr2-policy { flex-basis: 100%; padding-top: 8px; border-top: 1px dashed var(--border); }
.cr2-table { overflow-x: auto; } .cr2-table table { width: 100%; } .cr2-table td { vertical-align: middle; } .cr2-table tr.off td { opacity: .6; }
.cr2-table th.num, .cr2-table td.num { text-align: left; direction: ltr; white-space: nowrap; }
.cr2-debt { color: var(--danger-strong, var(--danger)); }
.cr2-room { display: grid; gap: 4px; } .cr2-room small.bad { color: var(--danger-strong, var(--danger)); font-weight: 700; }
.cr2-bar { height: 7px; border-radius: 99px; background: var(--surface-3, var(--surface-2)); overflow: hidden; }
.cr2-bar span { display: block; height: 100%; background: var(--ok); border-radius: 99px; } .cr2-bar span.near { background: var(--gold); } .cr2-bar span.full { background: var(--danger); }
.cr2-cards { display: none; gap: 10px; }
.cr-list { display: block; }
.empty .btn svg.i { width: 18px; height: 18px; }
@media (max-width: 760px) { .cr2-table { display: none; } .cr2-cards { display: grid; } .cr2-stats { grid-template-columns: 1fr 1fr; } .cr2-stat b { font-size: 14px; } .cr2-filter select { flex: 1; } }
.cr-page .cr-tabs { width: fit-content; max-width: 100%; }
.cr2-table th, .cr2-table td { padding: 10px 12px; } .cr2-table th { white-space: nowrap; background: var(--surface-2); }
.cr2-table tbody tr + tr td { border-top: 1px solid var(--border); }
@media (max-width: 760px) { .cr-page .cr-tabs { width: 100%; } }
/* erp074: صورت‌حساب اتاق و پذیرش آنلاین */
.rnt-folio-sum { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; }
.rnt-ck-grid { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.rnt-ck-photo { width: 100%; max-height: 200px; object-fit: contain; border: 1px solid var(--border); border-radius: 10px; background: var(--surface-2, #f5f6f8); }
.rnt-ck-sign { width: 100%; max-height: 130px; object-fit: contain; border: 1px dashed var(--border); border-radius: 10px; background: #fff; }
@media (max-width: 760px) { .rnt-ck-grid { grid-template-columns: minmax(0, 1fr); } }
/* erp074: صفحه‌های عمومی رزرو و پذیرش */
.pb-body { margin: 0; background: linear-gradient(180deg, #e6f4f1, #f6f7f9 320px); min-height: 100vh; color: #0f172a; font-family: Vazirmatn, Tahoma, sans-serif; }
.pb-splash { padding: 40px; text-align: center; color: #64748b; }
.pb-wrap { max-width: 980px; margin: 0 auto; padding: 20px 16px 60px; display: flex; flex-direction: column; gap: 16px; }
.pb-head h1 { margin: 6px 0; font-size: 26px; font-weight: 900; color: #0f766e; }
.pb-head p { margin: 0 0 6px; }
.pb-card { background: #fff; border-radius: 16px; padding: 18px; box-shadow: 0 6px 24px rgba(15, 23, 42, .07); border: 1px solid #e2e8f0; }
.pb-search { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)) auto; gap: 12px; align-items: end; }
.pb-search label, .pb-form label { display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: #475569; font-weight: 600; }
.pb-in { font: inherit; font-size: 16px; padding: 10px 12px; border: 1.5px solid #cbd5e1; border-radius: 10px; background: #fff; min-width: 0; }
.pb-in:focus { outline: none; border-color: #14b8a6; box-shadow: 0 0 0 3px rgba(20, 184, 166, .18); }
.pb-btn { font: inherit; font-weight: 800; padding: 11px 18px; border-radius: 10px; border: 0; background: #0f766e; color: #fff; cursor: pointer; text-decoration: none; text-align: center; }
.pb-btn:disabled { opacity: .6; }
.pb-btn.ghost { background: #f1f5f9; color: #0f172a; }
.pb-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; }
.pb-suite { background: #fff; border-radius: 16px; overflow: hidden; border: 1px solid #e2e8f0; box-shadow: 0 6px 20px rgba(15, 23, 42, .06); display: flex; flex-direction: column; }
.pb-suite.off { opacity: .6; }
.pb-suite img, .pb-noimg { width: 100%; height: 170px; object-fit: cover; background: #e2e8f0; display: grid; place-items: center; font-size: 42px; }
.pb-sbody { padding: 14px; display: flex; flex-direction: column; gap: 8px; }
.pb-sbody h3 { margin: 0; font-size: 18px; }
.pb-price b { color: #0f766e; font-size: 18px; }
.pb-muted { color: #64748b; }
.pb-bad { color: #b91c1c; font-weight: 700; }
.pb-ok { color: #15803d; font-weight: 700; }
.pb-msg { position: fixed; inset-inline: 16px; bottom: 18px; z-index: 50; padding: 12px 16px; border-radius: 12px; background: #b91c1c; color: #fff; font-weight: 700; text-align: center; }
.pb-modal-back { position: fixed; inset: 0; background: rgba(15, 23, 42, .5); display: grid; place-items: center; padding: 16px; z-index: 40; }
.pb-modal { width: min(440px, 100%); display: flex; flex-direction: column; gap: 10px; }
.pb-modal h2 { margin: 0; }
.pb-row { display: flex; gap: 8px; flex-wrap: wrap; }
.pb-result { text-align: center; display: flex; flex-direction: column; gap: 10px; align-items: center; }
.pb-big { width: 72px; height: 72px; border-radius: 50%; display: grid; place-items: center; font-size: 36px; font-weight: 900; color: #fff; background: #b91c1c; }
.pb-result.ok .pb-big { background: #16a34a; } .pb-result.wait .pb-big { background: #d97706; }
.pb-sum { width: 100%; max-width: 420px; display: flex; flex-direction: column; gap: 6px; }
.pb-sum div { display: flex; justify-content: space-between; border-bottom: 1px dashed #e2e8f0; padding: 4px 0; }
.pb-form { display: flex; flex-direction: column; gap: 12px; }
.pb-form h2 { margin: 10px 0 0; font-size: 17px; color: #0f766e; }
.pb-comp { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1.4fr) minmax(0, 1fr); gap: 8px; }
.pb-prev { max-width: 100%; max-height: 220px; object-fit: contain; border-radius: 10px; border: 1px solid #e2e8f0; }
.pb-terms { white-space: pre-wrap; font: inherit; font-size: 14px; background: #f8fafc; border: 1px solid #e2e8f0; border-radius: 10px; padding: 12px; max-height: 260px; overflow: auto; margin: 0; }
.pb-check { flex-direction: row !important; align-items: center; gap: 8px; color: #0f172a !important; }
.pb-sig { width: 100%; height: 180px; border: 2px dashed #94a3b8; border-radius: 12px; background: #fff; touch-action: none; }
.pb-body .ltr { direction: ltr; text-align: left; }
@media (max-width: 700px) { .pb-search { grid-template-columns: minmax(0, 1fr); } .pb-comp { grid-template-columns: minmax(0, 1fr); } }
