/* ════════════════════════════════════════════════════════════════
   کارنیک — رابط کاربری ۲۰۲۵ (راست‌چین، حالت روشن/تیره، بدون style درون‌خطی)
   ════════════════════════════════════════════════════════════════ */
@font-face {
  font-family: "Vazirmatn";
  src: url("../fonts/Vazirmatn-Variable.woff2") format("woff2-variations"), url("../fonts/Vazirmatn-Variable.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --font: "Vazirmatn", "Segoe UI", Tahoma, "Noto Sans Arabic", sans-serif;
  --bg: #f3f5f8;
  --bg-grad: radial-gradient(1200px 600px at 100% -10%, rgba(20,184,166,.10), transparent 60%), radial-gradient(900px 500px at -10% 0%, rgba(79,70,229,.08), transparent 55%);
  --surface: #ffffff;
  --surface-2: #f8fafc;
  --surface-3: #eef2f6;
  --text: #0f172a;
  --text-2: #334155;
  --muted: #556274;
  --border: #e3e8ef;
  --border-strong: #cbd5e1;
  --primary: #0e6b64;
  --primary-2: #0f766e;
  --primary-soft: #ccfbf1;
  --primary-ink: #ffffff;
  --accent: #4f46e5;
  --accent-soft: #e0e7ff;
  --ok: #036b4d; --ok-soft: #d1fae5;
  --warn: #9a4a07; --warn-soft: #fef3c7;
  --bad: #b91c1c; --bad-soft: #fee2e2;
  --info: #1d4ed8; --info-soft: #dbeafe;
  --shadow-sm: 0 1px 2px rgba(15,23,42,.06);
  --shadow: 0 1px 3px rgba(15,23,42,.06), 0 6px 24px -8px rgba(15,23,42,.10);
  --shadow-lg: 0 20px 50px -20px rgba(15,23,42,.30);
  --radius: 16px;
  --radius-sm: 10px;
  --radius-xs: 8px;
  --sidebar-w: 272px;
  --ring: 0 0 0 2px var(--surface), 0 0 0 4px var(--primary);
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root[data-theme="auto"] {
    --bg: #0a0f1a; --bg-grad: radial-gradient(1200px 600px at 100% -10%, rgba(45,212,191,.08), transparent 60%), radial-gradient(900px 500px at -10% 0%, rgba(99,102,241,.10), transparent 55%);
    --surface: #111827; --surface-2: #0f172a; --surface-3: #1e293b; --text: #e5e7eb; --text-2: #cbd5e1; --muted: #94a3b8;
    --border: #1f2a3b; --border-strong: #334155; --primary: #2dd4bf; --primary-2: #14b8a6; --primary-soft: rgba(45,212,191,.14); --primary-ink: #042f2e;
    --accent: #818cf8; --accent-soft: rgba(129,140,248,.16); --ok: #34d399; --ok-soft: rgba(52,211,153,.14); --warn: #fbbf24; --warn-soft: rgba(251,191,36,.14);
    --bad: #f87171; --bad-soft: rgba(248,113,113,.14); --info: #60a5fa; --info-soft: rgba(96,165,250,.14);
    --shadow: 0 1px 2px rgba(0,0,0,.4), 0 8px 30px -12px rgba(0,0,0,.6); --shadow-lg: 0 24px 60px -24px rgba(0,0,0,.8); --placeholder: #8b98ab; color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0a0f1a; --bg-grad: radial-gradient(1200px 600px at 100% -10%, rgba(45,212,191,.08), transparent 60%), radial-gradient(900px 500px at -10% 0%, rgba(99,102,241,.10), transparent 55%);
  --surface: #111827; --surface-2: #0f172a; --surface-3: #1e293b; --text: #e5e7eb; --text-2: #cbd5e1; --muted: #94a3b8;
  --border: #1f2a3b; --border-strong: #334155; --primary: #2dd4bf; --primary-2: #14b8a6; --primary-soft: rgba(45,212,191,.14); --primary-ink: #042f2e;
  --accent: #818cf8; --accent-soft: rgba(129,140,248,.16); --ok: #34d399; --ok-soft: rgba(52,211,153,.14); --warn: #fbbf24; --warn-soft: rgba(251,191,36,.14);
  --bad: #f87171; --bad-soft: rgba(248,113,113,.14); --info: #60a5fa; --info-soft: rgba(96,165,250,.14);
  --shadow: 0 1px 2px rgba(0,0,0,.4), 0 8px 30px -12px rgba(0,0,0,.6); --shadow-lg: 0 24px 60px -24px rgba(0,0,0,.8); --placeholder: #8b98ab; color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; font-family: var(--font); font-size: 15px; line-height: 1.75; color: var(--text);
  background: var(--bg); background-image: var(--bg-grad); background-attachment: fixed;
  font-feature-settings: "ss01"; -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
img, svg { max-width: 100%; }
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
h1, h2, h3, h4 { margin: 0 0 .4em; line-height: 1.4; font-weight: 750; letter-spacing: -.01em; }
h1 { font-size: 1.55rem; }
h2, .h2 { font-size: 1.2rem; }
h3, .h3 { font-size: 1.05rem; display: flex; align-items: center; gap: .45rem; }
p { margin: 0 0 .6em; }
p:last-child { margin-bottom: 0; }
hr { border: 0; border-top: 1px solid var(--border); margin: 1.2rem 0; }
code, .mono { font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace; font-size: .92em; letter-spacing: .01em; }
.num { font-variant-numeric: tabular-nums; }
.latin { font-feature-settings: normal; font-variant-numeric: tabular-nums; }
[dir=ltr] { font-feature-settings: normal; }
.muted { color: var(--muted); }
.small { font-size: .85rem; }
.center { text-align: center; justify-content: center; }
.nowrap { white-space: nowrap; }
.mt { margin-top: 1.25rem; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid var(--primary); outline-offset: 2px; }
input:focus-visible, select:focus-visible, textarea:focus-visible { outline: none; }
::selection { background: var(--primary-soft); }

/* ─── آیکون ─── */
.i { width: 1.15em; height: 1.15em; flex: none; vertical-align: -.2em; }
.i-xs { width: .95em; height: .95em; }
.i-xl { width: 2.6rem; height: 2.6rem; }

/* ─── دکمه‌ها ─── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .45rem; padding: .55rem 1rem; min-height: 40px;
  border: 1px solid var(--border); background: var(--surface); color: var(--text); border-radius: 12px;
  font: inherit; font-weight: 600; font-size: .92rem; cursor: pointer; text-decoration: none !important; white-space: nowrap;
  transition: background .15s, border-color .15s, transform .05s, box-shadow .15s; box-shadow: var(--shadow-sm);
}
.btn:hover { border-color: var(--border-strong); background: var(--surface-2); }
.btn:active { transform: translateY(1px); }
.btn[disabled], .btn.is-disabled { opacity: .55; pointer-events: none; }
.btn-primary { background: linear-gradient(180deg, var(--primary-2), var(--primary)); border-color: transparent; color: var(--primary-ink); box-shadow: 0 6px 18px -8px rgba(13,148,136,.7); }
.btn-primary:hover { background: var(--primary); color: var(--primary-ink); filter: brightness(1.05); }
.btn-dark { background: var(--text); color: var(--surface); border-color: transparent; }
.btn-dark:hover { background: var(--text-2); color: var(--surface); }
.btn-ghost { background: transparent; box-shadow: none; border-color: transparent; color: var(--text-2); }
.btn-ghost:hover { background: var(--surface-3); }
.btn-ghost.danger, .btn.danger { color: var(--bad); }
.btn-danger { background: var(--bad); border-color: transparent; color: #fff; }
.btn-danger:hover { background: var(--bad); filter: brightness(1.08); }
.btn-danger-ghost { background: var(--bad-soft); color: var(--bad); border-color: transparent; box-shadow: none; }
.btn-sm { min-height: 32px; padding: .3rem .7rem; font-size: .84rem; border-radius: 10px; }
.btn-lg { min-height: 48px; padding: .7rem 1.4rem; font-size: 1rem; }
.btn-block { width: 100%; }
.btn-icon { display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: 10px; border: 1px solid transparent; background: transparent; color: var(--muted); cursor: pointer; }
.btn-icon:hover { background: var(--surface-3); color: var(--text); }
.btn-row { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; }
.btn-row form { display: inline-flex; margin: 0; }

/* ─── چیدمان پنل ─── */
.app { display: flex; min-height: 100vh; }
.sidebar {
  position: fixed; inset-block: 0; inset-inline-start: 0; width: var(--sidebar-w); z-index: 40;
  display: flex; flex-direction: column; background: var(--surface); border-inline-end: 1px solid var(--border);
}
.main { flex: 1; min-width: 0; margin-inline-start: var(--sidebar-w); display: flex; flex-direction: column; }
.sidebar-head { padding: 1.1rem 1rem .6rem; display: grid; gap: .8rem; }
.brand-id { display: flex; align-items: center; gap: .7rem; color: var(--text); text-decoration: none !important; }
.brand-logo { width: 42px; height: 42px; border-radius: 12px; object-fit: cover; flex: none; background: var(--surface-3); }
.brand-logo-text { display: grid; place-items: center; font-weight: 800; font-size: 1.2rem; color: #fff; background: linear-gradient(135deg, #0f766e, #4f46e5); }
.brand-logo-lg { width: 64px; height: 64px; border-radius: 18px; }
.brand-meta { display: grid; min-width: 0; line-height: 1.35; }
.brand-name { font-weight: 800; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.brand-host { font-size: .74rem; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-align: end; }
.module-switch { display: flex; flex-wrap: wrap; gap: .35rem; padding: .3rem; background: var(--surface-3); border-radius: 12px; }
.module-switch a { flex: 1 1 40%; display: flex; align-items: center; justify-content: center; gap: .35rem; padding: .4rem .3rem; border-radius: 9px; font-size: .8rem; font-weight: 650; color: var(--text-2); text-decoration: none; white-space: nowrap; }
.module-switch a.is-current { background: var(--surface); color: var(--primary); box-shadow: var(--shadow-sm); }
.module-switch a.is-locked { color: var(--muted); }
.module-switch .tag { font-size: .65rem; padding: 0 .3rem; border-radius: 6px; background: var(--warn-soft); color: var(--warn); }
.sub-meter { display: grid; gap: .25rem; padding: .6rem .7rem; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--border); font-size: .8rem; }
.sub-meter-row { display: flex; justify-content: space-between; }
.sub-meter meter { width: 100%; height: 6px; }
.nav { flex: 1; overflow-y: auto; padding: .3rem .7rem 1rem; scrollbar-width: thin; }
.nav-group { display: grid; gap: 2px; margin-top: .8rem; }
.nav-caption { font-size: .72rem; color: var(--muted); font-weight: 700; padding: 0 .65rem; margin: 0 0 .2rem; letter-spacing: .02em; }
.nav-link { display: flex; align-items: center; gap: .65rem; padding: .5rem .65rem; border-radius: 10px; color: var(--text-2); font-weight: 550; font-size: .92rem; text-decoration: none !important; transition: background .12s; }
.nav-link .i { color: var(--muted); }
.nav-link:hover { background: var(--surface-3); color: var(--text); }
.nav-link.is-active { background: var(--primary-soft); color: var(--primary); font-weight: 700; }
.nav-link.is-active .i { color: var(--primary); }
.sidebar-foot { padding: .75rem 1rem; border-top: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; gap: .5rem; }
.who { display: flex; align-items: center; gap: .55rem; color: var(--text); text-decoration: none !important; min-width: 0; line-height: 1.3; }
.who b { display: block; font-size: .88rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.who small { color: var(--muted); font-size: .74rem; }
.avatar { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; background: var(--accent-soft); color: var(--accent); flex: none; }
.foot-actions { display: flex; gap: .15rem; }
.foot-actions form { margin: 0; }
.scrim { position: fixed; inset: 0; background: rgba(2,6,23,.45); z-index: 35; backdrop-filter: blur(2px); }
.topbar {
  position: sticky; top: 0; z-index: 30; display: flex; align-items: center; gap: .75rem; padding: .7rem 1.6rem; min-height: 60px;
  background: color-mix(in srgb, var(--bg) 78%, transparent); backdrop-filter: saturate(1.6) blur(12px); border-bottom: 1px solid var(--border);
}
.topbar-title { font-weight: 700; color: var(--text-2); flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.menu-toggle { display: none; width: 40px; height: 40px; border-radius: 11px; border: 1px solid var(--border); background: var(--surface); color: var(--text); cursor: pointer; place-items: center; }
.content { padding: 1.5rem 1.6rem 3rem; width: 100%; max-width: 1320px; margin: 0 auto; display: grid; gap: 1.1rem; align-content: start; }

.banner { display: flex; align-items: center; gap: .7rem; padding: .65rem 1.6rem; font-size: .9rem; border-bottom: 1px solid var(--border); }
.banner p { margin: 0; flex: 1; }
.banner-warn { background: var(--warn-soft); color: var(--warn); }
.banner-bad { background: var(--bad-soft); color: var(--bad); }
.banner-muted { background: var(--surface-3); color: var(--text-2); }

/* ─── سربرگ صفحه ─── */
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.page-head h1 { margin: 0; }
.page-head .lead { margin: .15rem 0 0; }
.lead { color: var(--muted); font-size: .98rem; }
.crumbs { font-size: .82rem; color: var(--muted); margin-bottom: .1rem; }
.crumbs a { color: var(--muted); }
.crumbs a::after { content: " ‹"; }

/* ─── کارت و شبکه ─── */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); min-width: 0; }
.card-pad { padding: 1.15rem 1.25rem; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: .6rem; padding: .95rem 1.25rem; border-bottom: 1px solid var(--border); }
.card-head h2 { margin: 0; font-size: 1rem; display: flex; align-items: center; gap: .45rem; }
.card-head form { margin: 0; }
.grid { display: grid; gap: 1.1rem; }
.grid.cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid.cols-3-1 { grid-template-columns: minmax(0, 2.2fr) minmax(280px, 1fr); }
.grid.align-start { align-items: start; }
.stack { display: grid; gap: 1rem; align-content: start; }
.narrow { max-width: 860px; width: 100%; }
.sticky { position: sticky; top: 76px; }
.accent-card { border-color: var(--primary); box-shadow: 0 0 0 4px var(--primary-soft); }

/* ─── آمار ─── */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 1rem; }
.stat { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 1rem 1.15rem; display: grid; gap: .15rem; box-shadow: var(--shadow); position: relative; overflow: hidden; }
.stat-label { color: var(--muted); font-size: .84rem; font-weight: 600; }
.stat-value { font-size: 1.55rem; font-weight: 800; letter-spacing: -.02em; line-height: 1.35; }
.stat-sub { color: var(--muted); font-size: .8rem; }
.stat-split { display: flex; gap: .6rem; font-size: 1.15rem; }
.stat-split span + span { color: var(--muted); }
.stat-split span + span::before { content: "· "; }
.stat-accent { background: linear-gradient(135deg, #0f766e, #4338ca); color: #fff; border-color: transparent; }
.stat-accent .stat-label, .stat-accent .stat-sub { color: #fff; }
.stat-accent::after { content: ""; position: absolute; width: 160px; height: 160px; border-radius: 50%; inset-inline-end: -50px; top: -60px; background: rgba(255,255,255,.08); }
.stat-warn { border-color: color-mix(in srgb, var(--warn) 40%, var(--border)); }
.stat-warn .stat-value { color: var(--warn); }
.mini-stats { display: flex; flex-wrap: wrap; gap: .5rem 1.4rem; color: var(--muted); font-size: .85rem; padding: .2rem .3rem; }
.mini-stats span { display: inline-flex; align-items: center; gap: .35rem; }

/* ─── جدول ─── */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.table th, .table td { padding: .7rem 1.1rem; text-align: start; border-bottom: 1px solid var(--border); vertical-align: middle; }
.table thead th { font-size: .78rem; font-weight: 700; color: var(--muted); background: var(--surface-2); white-space: nowrap; position: sticky; top: 0; }
.table tbody tr:hover { background: var(--surface-2); }
.table tbody tr[data-href] { cursor: pointer; }
.table tbody tr:last-child td { border-bottom: 0; }
.table tfoot td, .table tfoot th { background: var(--surface-2); font-weight: 700; border-top: 1px solid var(--border); border-bottom: 0; }
.table .actions { text-align: end; white-space: nowrap; }
.table .actions > * { margin-inline-start: .2rem; }
.table .actions form { display: inline; }
.table-compact th, .table-compact td { padding: .5rem .9rem; }
tr.is-dim td { opacity: .55; }
.link-strong { font-weight: 700; color: var(--text); }
.link-strong:hover { color: var(--primary); }

/* ─── نشان‌ها ─── */
.badge { display: inline-flex; align-items: center; gap: .25rem; padding: .12rem .55rem; border-radius: 999px; font-size: .76rem; font-weight: 650; background: var(--surface-3); color: var(--text-2); white-space: nowrap; line-height: 1.6; }
.badge-ok { background: var(--ok-soft); color: var(--ok); }
.badge-warn { background: var(--warn-soft); color: var(--warn); }
.badge-bad { background: var(--bad-soft); color: var(--bad); }
.badge-info { background: var(--info-soft); color: var(--info); }
.badge-muted { background: var(--surface-3); color: var(--muted); }

/* ─── پیام‌ها ─── */
.flash { display: flex; align-items: flex-start; gap: .65rem; padding: .8rem 1rem; border-radius: 14px; border: 1px solid transparent; font-size: .92rem; }
.flash > .i { margin-top: .25rem; }
.flash p, .flash > div { flex: 1; margin: 0; }
.flash ul { margin: .3rem 0 0; }
.flash .btn { flex: none; }
.flash-success { background: var(--ok-soft); color: var(--ok); }
.flash-error { background: var(--bad-soft); color: var(--bad); }
.flash-warning { background: var(--warn-soft); color: var(--warn); }
.flash-info { background: var(--info-soft); color: var(--info); }
.flash a { color: inherit; font-weight: 700; text-decoration: underline; }
.flash-close { background: none; border: 0; color: inherit; opacity: .6; cursor: pointer; padding: 0; }
.flash-close:hover { opacity: 1; }
.callout { padding: .9rem 1.1rem; border-radius: 14px; background: var(--surface-2); border: 1px dashed var(--border-strong); color: var(--text-2); font-size: .9rem; }

/* ─── فرم ─── */
.form-grid { display: grid; gap: .9rem 1rem; grid-template-columns: 1fr; }
.form-grid.cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.form-grid.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.span-2 { grid-column: span 2; }
.span-all { grid-column: 1 / -1; }
.field { display: grid; gap: .3rem; align-content: start; min-width: 0; }
.field > label { font-size: .86rem; font-weight: 650; color: var(--text-2); }
.req { color: var(--bad); margin-inline-start: .15rem; }
.field-stack { display: grid; gap: .4rem; align-content: center; }
.field-link { align-content: end; }
input[type=text], input[type=search], input[type=password], input[type=number], input[type=email], input[type=tel], input:not([type]), select, textarea {
  width: 100%; font: inherit; font-size: .94rem; color: var(--text); background: var(--surface); border: 1px solid var(--border-strong);
  border-radius: 11px; padding: .55rem .8rem; min-height: 42px; transition: border-color .12s, box-shadow .12s; appearance: none;
}
select { -webkit-appearance: none; appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%238a94a6' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E"); background-position: left 12px center; background-size: 12px 12px; background-repeat: no-repeat; padding-left: 32px; }
textarea { min-height: auto; resize: vertical; line-height: 1.7; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--primary-2); box-shadow: var(--ring); }
input[readonly], textarea[readonly] { background: var(--surface-2); }
input[type=file] { font: inherit; font-size: .88rem; padding: .4rem; border: 1px dashed var(--border-strong); border-radius: 11px; background: var(--surface-2); width: 100%; }
input::placeholder, textarea::placeholder { color: var(--placeholder, #6b7280); opacity: 1; }
input[dir=ltr]::placeholder { text-align: left; }
.has-error input, .has-error select, .has-error textarea { border-color: var(--bad); }
.field-error { color: var(--bad); font-size: .8rem; margin: 0; }
.help { color: var(--muted); font-size: .8rem; margin: 0; }
.check, .radio { display: inline-flex; align-items: flex-start; gap: .5rem; cursor: pointer; font-size: .92rem; }
.check input, .radio input { width: 18px; height: 18px; margin: .3rem 0 0; accent-color: var(--primary); flex: none; }
.radio-row { display: flex; flex-wrap: wrap; gap: .5rem 1.2rem; }
.radio-col { display: grid; gap: .45rem; }
.pass-wrap { position: relative; }
.pass-wrap input { padding-left: 2.6rem; }
.pass-toggle { position: absolute; left: .35rem; top: 50%; transform: translateY(-50%); background: none; border: 0; color: var(--muted); cursor: pointer; padding: .3rem; border-radius: 8px; }
.money-words { font-size: .78rem; color: var(--primary); min-height: 1.2em; }
.form-actions { display: flex; flex-wrap: wrap; gap: .6rem; align-items: center; padding-top: .3rem; }
.fieldset { border: 0; padding: 0; margin: 0; display: grid; gap: .8rem; }
.fieldset legend { font-weight: 800; font-size: 1rem; margin-bottom: .6rem; padding: 0; }
.inline-form { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; margin: 0; }
.inline-form input, .inline-form select { width: auto; min-height: 34px; padding: .3rem .6rem; }
.w-sm { width: 90px !important; }
.w-md { width: 160px !important; }
.code-box { width: 100%; font-family: ui-monospace, Menlo, Consolas, monospace; font-size: .78rem; line-height: 1.6; background: var(--surface-2); border: 1px solid var(--border); border-radius: 11px; padding: .7rem .8rem; white-space: pre-wrap; word-break: break-all; text-align: left; direction: ltr; overflow-x: auto; }
.code-chip { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: .8rem; background: var(--surface-3); border-radius: 6px; padding: .05rem .4rem; direction: ltr; display: inline-block; }
.log-box { margin: 0; padding: 1rem; font-size: .76rem; line-height: 1.7; max-height: 70vh; overflow: auto; white-space: pre-wrap; word-break: break-all; text-align: left; }

/* ─── ابزار و فیلتر ─── */
.toolbar { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; margin: 0; }
.toolbar select, .toolbar input { width: auto; min-width: 140px; }
.toolbar.compact select { min-width: 110px; }
.search-box { position: relative; flex: 1 1 260px; max-width: 420px; }
.search-box .i { position: absolute; right: .75rem; top: 50%; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
.search-box input { padding-right: 2.4rem; width: 100%; }
.search-box.has-tools input { padding-left: 7.2rem; }
.search-box input::-webkit-search-cancel-button { -webkit-appearance: none; appearance: none; }
.search-clear, .search-go { position: absolute; top: 50%; transform: translateY(-50%); border: 0; cursor: pointer; font: inherit; }
.search-clear { left: 4.9rem; width: 2rem; height: 2rem; border-radius: 50%; background: var(--surface-3, #eef1f5); color: var(--muted); font-size: 1.15rem; line-height: 1; }
.search-clear:hover { color: var(--text); }
.search-go { left: .3rem; height: calc(100% - .6rem); min-height: 2rem; padding: 0 .8rem; border-radius: .55rem; background: var(--primary); color: var(--primary-ink); font-weight: 700; font-size: .85rem; }
.date-input { width: 130px !important; min-width: 0 !important; }
.chips { display: flex; flex-wrap: wrap; gap: .45rem; }
.chip { display: inline-flex; align-items: center; gap: .35rem; padding: .35rem .8rem; border-radius: 999px; background: var(--surface); border: 1px solid var(--border); color: var(--text-2); font-size: .85rem; font-weight: 600; text-decoration: none !important; }
.chip.is-active, .chip:hover { border-color: var(--primary); color: var(--primary); }

/* ─── حالت خالی و صفحه‌بندی ─── */
.empty { display: grid; justify-items: center; gap: .6rem; text-align: center; padding: 2.4rem 1rem; color: var(--muted); }
.empty .i-xl { color: var(--border-strong); }
.empty.small { padding: 1.3rem 1rem; font-size: .9rem; }
.pager { display: flex; justify-content: space-between; align-items: center; gap: .8rem; flex-wrap: wrap; font-size: .86rem; }
.pager-info { color: var(--muted); }
.pager-links { display: flex; gap: .3rem; }
.pager-link { min-width: 36px; height: 36px; display: grid; place-items: center; border-radius: 10px; border: 1px solid var(--border); background: var(--surface); color: var(--text-2); text-decoration: none !important; padding: 0 .5rem; }
.pager-link.is-current { background: var(--primary); color: var(--primary-ink); border-color: transparent; font-weight: 700; }
.pager-gap { padding: 0 .3rem; color: var(--muted); align-self: center; }

/* ─── فهرست مقدار ─── */
.kv { display: grid; gap: .55rem; margin: 0; }
.kv > div { display: flex; justify-content: space-between; gap: 1rem; border-bottom: 1px dashed var(--border); padding-bottom: .45rem; }
.kv > div:last-child { border-bottom: 0; padding-bottom: 0; }
.kv dt { color: var(--muted); font-size: .86rem; }
.kv dd { margin: 0; font-weight: 600; text-align: end; overflow-wrap: anywhere; }
.kv-grid { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: .8rem 1.4rem; }
.kv-grid > div { display: grid; gap: .1rem; border: 0; padding: 0; }
.kv-grid dd { text-align: start; }
.kv-inline { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; font-size: .88rem; }
.kv-inline span { color: var(--muted); }
.note-box { border-top: 1px solid var(--border); color: var(--text-2); font-size: .92rem; }
.timeline { list-style: none; margin: 0; padding: 0; display: grid; gap: .65rem; }
.timeline li { display: grid; gap: .1rem; padding-inline-start: 1rem; border-inline-start: 3px solid var(--border-strong); }
.timeline .tl-ok { border-color: var(--ok); }
.timeline .tl-bad { border-color: var(--bad); }
.timeline .tl-warn { border-color: var(--warn); }
.timeline .tl-info { border-color: var(--info); }
.timeline a { color: var(--text); }
.tl-err { color: var(--bad); }
.rank { list-style: none; margin: 0; padding: .4rem 0; }
.rank li { display: flex; align-items: center; gap: .6rem; padding: .55rem 1.25rem; border-bottom: 1px solid var(--border); font-size: .9rem; }
.rank li:last-child { border-bottom: 0; }
.rank-n { width: 26px; height: 26px; border-radius: 8px; display: grid; place-items: center; background: var(--surface-3); font-weight: 800; font-size: .8rem; flex: none; }
.rank-t { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text); }
.check-list { list-style: none; padding: 0; margin: 0 0 1rem; display: grid; gap: .45rem; }
.check-list li { display: flex; gap: .5rem; align-items: flex-start; }
.check-list .i { color: var(--primary); margin-top: .3rem; }
.dots { margin: .3rem 0 0; padding-inline-start: 1.2rem; }
.steps { margin: 0; padding-inline-start: 1.4rem; display: grid; gap: .45rem; }
.onboard { border: 1px solid color-mix(in srgb, var(--primary) 40%, var(--border)); background: linear-gradient(135deg, var(--primary-soft), transparent 60%), var(--surface); }
.checks { list-style: none; margin: 0; padding: .3rem 0; }
.checks li { display: flex; gap: .7rem; padding: .6rem 1.25rem; border-bottom: 1px solid var(--border); align-items: flex-start; }
.checks li:last-child { border-bottom: 0; }
.checks li > div { display: grid; min-width: 0; }
.checks li span { color: var(--muted); overflow-wrap: anywhere; }
.checks .check-ok > .i { color: var(--ok); }
.checks .check-warn > .i { color: var(--warn); }
.checks .check-bad > .i { color: var(--bad); }
.checks .i { margin-top: .25rem; }
.danger-zone summary { color: var(--bad); font-weight: 700; cursor: pointer; }
.confirm-card { text-align: center; display: grid; gap: .6rem; justify-items: center; }
.danger-ico { color: var(--bad); }
.confirm-label { font-size: 1.05rem; }

/* ─── نمودار ─── */
.bar-chart { width: 100%; height: auto; display: block; }
.bar-chart .axis { stroke: var(--border-strong); stroke-width: 1; }
.bar-chart .bar rect { fill: color-mix(in srgb, var(--primary-2) 35%, var(--surface-3)); transition: fill .15s; }
.bar-chart .bar:hover rect { fill: var(--primary-2); }
.bar-chart .bar.is-current rect { fill: var(--primary); }
.bar-chart .bar-val { font-size: 12px; fill: var(--text-2); font-weight: 700; font-family: var(--font); }
.bar-chart .bar-label { font-size: 12px; fill: var(--muted); font-family: var(--font); }

/* ─── داشبورد ماژول و اشتراک ─── */
.module-card { display: flex; align-items: center; gap: 1rem; padding: 1.2rem; color: var(--text); text-decoration: none !important; transition: transform .12s, box-shadow .12s; }
.module-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.module-ico, .hub-ico { width: 54px; height: 54px; border-radius: 16px; display: grid; place-items: center; background: var(--primary-soft); color: var(--primary); flex: none; }
.module-ico .i, .hub-ico .i { width: 28px; height: 28px; }
.module-body { flex: 1; display: grid; gap: .25rem; justify-items: start; }
.module-body h2 { margin: 0; }
.sub-card { padding: 1.2rem; display: grid; gap: 1.1rem; }
.sub-card-head { display: flex; align-items: center; gap: 1.1rem; flex-wrap: wrap; }
.sub-card-title { flex: 1; min-width: 220px; }
.sub-card-title h2 { display: flex; align-items: center; gap: .5rem; margin-bottom: .3rem; }
.dial { position: relative; width: 92px; height: 92px; flex: none; }
.dial svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.dial-track { fill: none; stroke: var(--surface-3); stroke-width: 9; }
.dial-bar { fill: none; stroke: var(--primary-2); stroke-width: 9; stroke-linecap: round; transition: stroke-dashoffset .6s; }
.dial.is-warn .dial-bar { stroke: var(--warn); }
.dial.is-bad .dial-bar { stroke: var(--bad); }
.dial-num { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; font-weight: 800; font-size: 1.3rem; line-height: 1.1; }
.dial-num small { font-size: .7rem; color: var(--muted); font-weight: 600; }

/* ─── پلن‌ها ─── */
.plans { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1rem; }
.plans-compact { grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }
.plan { padding: 1.3rem 1.2rem; display: grid; gap: .35rem; align-content: start; position: relative; }
.plan h4 { margin: 0; font-size: 1.05rem; }
.plan.is-featured { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-soft), var(--shadow); }
.plan-tag { position: absolute; top: -12px; inset-inline-start: 1rem; background: var(--primary); color: var(--primary-ink); font-size: .74rem; font-weight: 700; padding: .1rem .65rem; border-radius: 999px; }
.price { font-size: 1.7rem; font-weight: 850; letter-spacing: -.02em; }
.price small { font-size: .8rem; color: var(--muted); font-weight: 600; }
.plans-compact .price { font-size: 1.3rem; }
.was { color: var(--muted); text-decoration: line-through; font-size: .85rem; }
.save { align-self: start; justify-self: start; background: var(--ok-soft); color: var(--ok); font-size: .78rem; font-weight: 700; padding: .1rem .55rem; border-radius: 999px; }
.per-month { margin: 0; }

/* ─── فاکتور ─── */
.totals-card .card-pad { display: grid; gap: .45rem; }
.tot-row { display: flex; justify-content: space-between; gap: 1rem; font-size: .92rem; }
.tot-row span { color: var(--muted); }
.tot-grand { padding: .65rem 0; margin: .25rem 0; border-block: 1px dashed var(--border-strong); font-size: 1.1rem; }
.tot-grand span { color: var(--text); font-weight: 700; }
.tot-grand b { color: var(--primary); font-size: 1.3rem; }
.tot-due b { color: var(--bad); }
.items-head, .item-row { display: grid; grid-template-columns: minmax(0, 3fr) 70px 140px 70px 120px 36px; gap: .5rem; align-items: center; }
.items-head { padding: .6rem 1.1rem; font-size: .76rem; color: var(--muted); font-weight: 700; background: var(--surface-2); border-bottom: 1px solid var(--border); }
.item-row { padding: .65rem 1.1rem; border-bottom: 1px solid var(--border); }
.item-row.has-error { background: var(--bad-soft); }
.item-main { display: grid; gap: .35rem; min-width: 0; }
.item-main input { min-height: 36px; font-size: .86rem; padding: .35rem .7rem; }
.item-row > input { min-height: 40px; padding: .45rem .5rem; text-align: center; }
.line-total { font-weight: 700; text-align: end; font-size: .9rem; }
.item-err { grid-column: 1 / -1; }
.items-foot { display: flex; align-items: center; gap: 1rem; padding: .8rem 1.1rem; flex-wrap: wrap; }
.tax-box .card-pad { gap: .8rem; }

/* ─── صفحه‌های مرکزی (ورود، خطا) ─── */
.center-body { min-height: 100vh; }
.center-shell { min-height: 100vh; display: grid; place-content: center; justify-items: center; gap: 1rem; padding: 2rem 1rem; }
.center-brand { display: flex; align-items: center; gap: .6rem; font-weight: 800; font-size: 1.15rem; }
.center-card { width: min(440px, 92vw); background: var(--surface); border: 1px solid var(--border); border-radius: 22px; padding: 1.8rem; box-shadow: var(--shadow-lg); display: grid; gap: 1rem; }
.center-foot { max-width: 440px; text-align: center; }
.login-head { display: grid; justify-items: center; gap: .6rem; text-align: center; }
.error-card { text-align: center; justify-items: center; }
.error-code { font-size: 3.4rem; font-weight: 900; line-height: 1; background: linear-gradient(135deg, var(--primary-2), var(--accent)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.debug { text-align: left; direction: ltr; font-size: .72rem; white-space: pre-wrap; background: var(--surface-2); padding: 1rem; border-radius: 10px; max-height: 40vh; overflow: auto; }
.result { display: grid; gap: .8rem; justify-items: center; text-align: center; }
.result .kv { width: 100%; }
.result-ico { width: 72px; height: 72px; border-radius: 50%; display: grid; place-items: center; }
.result-ico.ok { background: var(--ok-soft); color: var(--ok); }
.result-ico.warn { background: var(--warn-soft); color: var(--warn); }
.result-ico.bad { background: var(--bad-soft); color: var(--bad); }
.result form { width: 100%; }

/* ─── پلاک ─── */
.plate, .plate-input { display: inline-flex; align-items: stretch; border: 2px solid #111827; border-radius: 10px; background: #fff; color: #111827; overflow: hidden; box-shadow: var(--shadow-sm); }
.plate-band { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; background: #1e40af; color: #fff; padding: 2px 6px; font-size: .5rem; line-height: 1.15; font-weight: 700; font-family: Arial, sans-serif; text-align: center; }
.plate-flag { display: block; width: 18px; height: 12px; background: linear-gradient(#16a34a 0 33%, #fff 33% 66%, #dc2626 66%); border-radius: 1px; }
.plate-text { display: flex; align-items: baseline; padding: .3rem .8rem; font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 1.05rem; direction: ltr; }
.plate-text small { color: #6b7280; font-size: .78rem; }
.plate-sm .plate-text { font-size: .9rem; padding: .2rem .6rem; }
.plate-input { width: 100%; }
.plate-input input { border: 0 !important; box-shadow: none !important; border-radius: 0; background: #fff; color: #111827; font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 1.15rem; min-height: 52px; text-align: left; flex: 1; min-width: 0; }
.plate-input .suffix { display: flex; align-items: center; padding: 0 .8rem; color: #6b7280; font-family: ui-monospace, Menlo, Consolas, monospace; font-size: .85rem; background: #f3f4f6; white-space: nowrap; direction: ltr; }
.plate-input-sm input { min-height: 44px; font-size: 1rem; }
.plate-input:focus-within { box-shadow: var(--ring); }
.sub-status { font-size: .84rem; color: var(--muted); margin: 0; }
.sub-status.is-ok { color: var(--ok); }
.sub-status.is-bad { color: var(--bad); }

/* ─── سایت عمومی ─── */
.wrap { width: min(1180px, 100% - 2.5rem); margin-inline: auto; }
.narrow-wrap { width: min(860px, 100% - 2.5rem); }
.site-header { position: sticky; top: 0; z-index: 30; background: color-mix(in srgb, var(--bg) 80%, transparent); backdrop-filter: blur(14px) saturate(1.5); border-bottom: 1px solid var(--border); }
.site-header-row { display: flex; align-items: center; gap: 1.5rem; min-height: 66px; }
.site-logo { display: flex; align-items: center; gap: .55rem; font-weight: 850; font-size: 1.15rem; color: var(--text); text-decoration: none !important; }
.site-logo img { border-radius: 10px; }
.site-nav { display: flex; gap: 1.2rem; flex: 1; }
.site-nav a { color: var(--text-2); font-weight: 600; font-size: .93rem; }
.site-actions { display: flex; align-items: center; gap: .4rem; }
.site-main { min-height: 60vh; }
.site-footer { border-top: 1px solid var(--border); padding: 2rem 0; margin-top: 3rem; background: var(--surface); }
.site-footer-row { display: flex; justify-content: space-between; gap: 2rem; flex-wrap: wrap; }
.hero { padding: 4.5rem 0 3.5rem; }
.hero-grid { display: grid; grid-template-columns: 1.15fr 1fr; gap: 3rem; align-items: center; }
.hero h1 { font-size: clamp(1.9rem, 3.6vw, 3rem); line-height: 1.35; font-weight: 850; letter-spacing: -.03em; }
.hero h1 em { font-style: normal; background: linear-gradient(90deg, var(--primary-2), var(--accent)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.eyebrow { display: inline-flex; align-items: center; gap: .4rem; background: var(--primary-soft); color: var(--primary); padding: .3rem .8rem; border-radius: 999px; font-weight: 700; font-size: .82rem; margin-bottom: 1rem; }
.hero .lead { font-size: 1.08rem; max-width: 34em; }
.ltr-chip { direction: ltr; display: inline-block; background: var(--surface-3); padding: 0 .4rem; border-radius: 6px; font-family: ui-monospace, Menlo, Consolas, monospace; font-size: .9em; }
.hero-facts { list-style: none; padding: 0; margin: 1.4rem 0 0; display: flex; flex-wrap: wrap; gap: .6rem 1.4rem; }
.hero-facts li { display: inline-flex; gap: .4rem; align-items: center; font-weight: 600; color: var(--text-2); }
.hero-facts .i { color: var(--primary); }
.claim { padding: 1.6rem; display: grid; gap: .8rem; border-radius: 22px; box-shadow: var(--shadow-lg); }
.claim-label { font-weight: 800; font-size: 1.05rem; }
.section { padding: 3.5rem 0; }
.section-alt { background: linear-gradient(180deg, transparent, var(--surface-2) 30%, var(--surface-2) 70%, transparent); }
.section-head { text-align: center; max-width: 720px; margin: 0 auto 2rem; }
.section-head h1, .section-head h2 { font-size: 1.7rem; }
.section-head p { color: var(--muted); }
.hub { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 1.2rem; margin-bottom: 1.2rem; }
.hub-card { padding: 1.6rem; display: grid; gap: .6rem; align-content: start; }
.hub-card .btn { justify-self: start; }
.tax-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 2.5rem; align-items: center; }
.tax-demo { padding: 1.4rem; display: grid; gap: .8rem; }
.tax-demo-row { display: flex; justify-content: space-between; gap: 1rem; padding-bottom: .7rem; border-bottom: 1px dashed var(--border); }
.tax-demo-row:last-child { border: 0; padding: 0; }
.tax-demo-row span { color: var(--muted); }
.pricing-title { display: flex; align-items: center; gap: .5rem; margin: 2rem 0 1rem; font-size: 1.15rem; }
.faq { max-width: 820px; display: grid; gap: .7rem; }
.faq details { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: .9rem 1.1rem; }
.faq summary { font-weight: 700; cursor: pointer; }
.faq details p { margin-top: .6rem; color: var(--text-2); }
.prose h3 { margin-top: 1.3rem; }
.prose p { color: var(--text-2); }
.choice-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: .8rem; }
.choice-card { position: relative; cursor: pointer; }
.choice-card input { position: absolute; opacity: 0; }
.choice-body { display: grid; gap: .25rem; padding: 1rem 1.1rem; border: 2px solid var(--border); border-radius: 14px; background: var(--surface); transition: border-color .12s, box-shadow .12s; }
.choice-body .i { width: 26px; height: 26px; color: var(--primary); }
.choice-body small { color: var(--muted); }
.choice-card input:checked + .choice-body { border-color: var(--primary); box-shadow: 0 0 0 4px var(--primary-soft); }
.choice-card input:focus-visible + .choice-body { box-shadow: var(--ring); }
.plan-pick { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: .7rem; }
.plan-option { position: relative; cursor: pointer; }
.plan-option input { position: absolute; opacity: 0; }
.plan-option-body { display: grid; gap: .1rem; padding: .85rem 1rem; border: 2px solid var(--border); border-radius: 14px; background: var(--surface); }
.plan-option input:checked + .plan-option-body { border-color: var(--primary); box-shadow: 0 0 0 4px var(--primary-soft); }
.plan-option.is-hidden { display: none; }

/* ─── تقویم شمسی ─── */
.jdp { position: absolute; z-index: 100; width: 290px; background: var(--surface); border: 1px solid var(--border); border-radius: 16px; box-shadow: var(--shadow-lg); padding: .7rem; font-size: .86rem; }
.jdp-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: .4rem; font-weight: 800; }
.jdp-head button, .jdp-foot button { background: none; border: 0; cursor: pointer; color: var(--text-2); border-radius: 8px; padding: .25rem .5rem; font: inherit; }
.jdp-head button:hover, .jdp-foot button:hover { background: var(--surface-3); }
.jdp-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; text-align: center; }
.jdp-grid span { color: var(--muted); font-size: .74rem; padding: .2rem 0; }
.jdp-grid button { border: 0; background: none; padding: .35rem 0; border-radius: 9px; cursor: pointer; font: inherit; color: var(--text); }
.jdp-grid button:hover { background: var(--surface-3); }
.jdp-grid button.is-today { box-shadow: inset 0 0 0 1px var(--primary-2); }
.jdp-grid button.is-sel { background: var(--primary); color: var(--primary-ink); }
.jdp-foot { display: flex; justify-content: space-between; margin-top: .4rem; }

/* ─── واکنش‌گرا ─── */
@media (max-width: 1100px) {
  .grid.cols-3-1 { grid-template-columns: 1fr; }
  .sticky { position: static; }
  .form-grid.cols-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 960px) {
  .sidebar { transform: translateX(100%); transition: transform .22s ease; box-shadow: var(--shadow-lg); }
  .app.nav-open .sidebar { transform: none; }
  .main { margin-inline-start: 0; }
  .menu-toggle { display: grid; }
  .content { padding: 1.1rem 1rem 2.5rem; }
  .topbar { padding: .6rem 1rem; }
  .banner { padding: .6rem 1rem; }
  .hero-grid, .tax-grid { grid-template-columns: 1fr; gap: 2rem; }
  .site-nav { display: none; }
}
@media (max-width: 720px) {
  .grid.cols-2, .form-grid.cols-2, .form-grid.cols-3 { grid-template-columns: 1fr; }
  .span-2 { grid-column: auto; }
  .page-head { align-items: stretch; flex-direction: column; }
  .stat-value { font-size: 1.3rem; }
  .items-head { display: none; }
  .item-row { grid-template-columns: 1fr 1fr 1fr; }
  .item-main { grid-column: 1 / -1; }
  .line-total { text-align: start; }
  .table th, .table td { padding: .6rem .75rem; }
  .topbar-cta span { display: none; }
  .hero { padding: 2.5rem 0; }
  .center-card { padding: 1.3rem; }
}

/* ─── چاپ ─── */
.print-body { background: #e5e7eb; color: #111; padding: 1rem; }
.print-toolbar { display: flex; gap: .5rem; justify-content: center; margin-bottom: 1rem; }
.print-warn { max-width: 210mm; margin: 0 auto 1rem; background: #fef3c7; color: #92400e; padding: .7rem 1rem; border-radius: 10px; font-size: .85rem; }
.sheet { background: #fff; color: #111; width: 210mm; min-height: 287mm; margin: 0 auto; padding: 14mm; box-shadow: 0 10px 40px rgba(0,0,0,.15); font-size: 12.5px; line-height: 1.8; }
.sheet h1 { font-size: 18px; text-align: center; margin: 0; }
.sheet h2 { font-size: 13px; margin: 12px 0 6px; padding: 4px 8px; background: #f3f4f6; border-radius: 4px; }
.sheet table { width: 100%; border-collapse: collapse; margin-bottom: 6px; }
.sheet th, .sheet td { border: 1px solid #9ca3af; padding: 5px 7px; text-align: start; vertical-align: top; }
.sheet th { background: #f9fafb; font-weight: 700; white-space: nowrap; }
.sheet tr.sum td, .sheet tr.sum th { font-weight: 800; background: #f3f4f6; }
.sheet-head { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 10px; border-bottom: 2px solid #111; padding-bottom: 10px; margin-bottom: 10px; }
.sheet-head .who { display: flex; align-items: center; gap: 8px; }
.sheet-head .who img { width: 56px; height: 56px; object-fit: contain; }
.sheet-head .who div { display: grid; }
.sheet-head .meta { display: grid; gap: 2px; justify-items: end; }
.sheet-head .meta span { color: #555; margin-left: 4px; }
.sheet .words { margin: 6px 0; font-weight: 700; }
.sheet .note { color: #333; margin: 4px 0; }
.signs { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-top: 30px; text-align: center; }
.signs div { border-top: 1px dashed #666; padding-top: 6px; min-height: 60px; }
.sheet-foot { display: flex; justify-content: space-between; margin-top: 20px; color: #666; font-size: 11px; border-top: 1px solid #ddd; padding-top: 6px; }
.sheet-official { font-size: 11px; }
.official-head { display: grid; grid-template-columns: 1.3fr 2fr .8fr; gap: 8px; align-items: center; border: 2px solid #111; padding: 8px; }
.official-head h1 { font-size: 15px; line-height: 1.6; }
.official-head h1 small { font-size: 12px; font-weight: 600; }
.official-meta { display: grid; gap: 2px; font-size: 11px; }
.official-meta span { color: #444; margin-left: 4px; }
.official-logo { text-align: left; }
.official-logo img { max-height: 54px; }
.band { text-align: center; background: #e5e7eb !important; }
.kv-table th { width: 1%; }
.items-table th { font-size: 10px; white-space: normal; text-align: center; }
.items-table td { text-align: center; font-size: 10.5px; }
.items-table td.desc { text-align: start; }
.items-table tfoot td { font-weight: 800; background: #f3f4f6; }
@media print {
  @page { size: A4; margin: 8mm; }
  body.print-body { background: #fff; padding: 0; }
  .print-toolbar, .no-print, .print-warn { display: none !important; }
  .sheet { box-shadow: none; width: auto; min-height: 0; padding: 0; margin: 0; }
}
@media (max-width: 860px) {
  .sheet { width: 100%; padding: 6mm; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}
.install-card { width: min(760px, 94vw); }

/* ════════════════════════════════════════════════════════════════
   ۳.۱ — ساده، بزرگ و موبایل‌محور
   ════════════════════════════════════════════════════════════════ */
.brand-logo-sm { width: 32px; height: 32px; border-radius: 10px; font-size: .95rem; }
.topbar-brand { display: flex; align-items: center; gap: .55rem; flex: 1; min-width: 0; color: var(--text); text-decoration: none !important; }
.topbar-title { display: grid; line-height: 1.25; font-weight: 800; color: var(--text); }
.topbar-title small { font-size: .74rem; font-weight: 600; color: var(--muted); }
.topbar-help { width: 40px; height: 40px; }
.nav-cta { display: flex; align-items: center; justify-content: center; gap: .5rem; margin: .2rem 0 .5rem; padding: .75rem 1rem; border-radius: 14px; font-weight: 800; color: var(--primary-ink); background: linear-gradient(180deg, var(--primary-2), var(--primary)); box-shadow: 0 8px 20px -10px rgba(13,148,136,.8); text-decoration: none !important; }
.nav-cta:hover { filter: brightness(1.06); }
.nav-main .nav-link { padding: .62rem .75rem; font-size: .98rem; }
.nav-more { margin-top: .6rem; border-top: 1px solid var(--border); padding-top: .4rem; }
.nav-more > summary { list-style: none; display: flex; align-items: center; gap: .65rem; padding: .55rem .65rem; border-radius: 10px; cursor: pointer; color: var(--muted); font-weight: 700; font-size: .88rem; }
.nav-more > summary::-webkit-details-marker { display: none; }
.nav-more > summary::after { content: "›"; margin-inline-start: auto; transform: rotate(90deg); transition: transform .15s; }
.nav-more[open] > summary::after { transform: rotate(-90deg); }
.nav-more > summary:hover { background: var(--surface-3); }
.nav-more .nav-group { margin-top: .1rem; }
a.sub-meter { margin-top: 1rem; color: var(--text-2); text-decoration: none !important; }
a.sub-meter b { color: var(--text); }

/* ─── منوی پایین موبایل ─── */
.bottom-nav { display: none; }
@media (max-width: 960px) {
  body.panel-body { font-size: 16px; }
  .bottom-nav {
    display: grid; grid-template-columns: repeat(5, 1fr); align-items: end; position: fixed; inset-inline: 0; bottom: 0; z-index: 34;
    padding: .35rem .4rem calc(.35rem + env(safe-area-inset-bottom)); background: color-mix(in srgb, var(--surface) 92%, transparent);
    backdrop-filter: blur(14px) saturate(1.5); border-top: 1px solid var(--border); box-shadow: 0 -8px 24px -18px rgba(15,23,42,.5);
  }
  .bottom-nav a, .bottom-nav button { display: grid; justify-items: center; gap: 1px; padding: .3rem 0; border: 0; background: none; font: inherit; font-size: .72rem; font-weight: 650; color: var(--muted); text-decoration: none !important; cursor: pointer; }
  .bottom-nav .i { width: 24px; height: 24px; }
  .bottom-nav .is-active { color: var(--primary); }
  .bottom-nav .bn-fab { justify-self: center; width: 58px; height: 58px; margin-top: -26px; border-radius: 50%; place-items: center; color: var(--primary-ink); background: linear-gradient(180deg, var(--primary-2), var(--primary)); box-shadow: 0 10px 24px -8px rgba(13,148,136,.9), 0 0 0 5px var(--bg); }
  .bottom-nav .bn-fab .i { width: 30px; height: 30px; }
  .panel-body .content { padding-bottom: calc(96px + env(safe-area-inset-bottom)); }
  .panel-body.has-form-bar .content { padding-bottom: calc(110px + env(safe-area-inset-bottom)); }
  .topbar-cta { display: none; }
  .topbar { padding: .55rem .9rem; min-height: 56px; }
  .sidebar { width: min(310px, 86vw); }
  input[type=text], input[type=search], input[type=password], input[type=number], input[type=email], input[type=tel], input:not([type]), select, textarea { font-size: 16px; min-height: 46px; }
  .btn { min-height: 44px; }
  .btn-sm { min-height: 36px; }
}

/* ─── خانه ─── */
.hello { display: flex; align-items: flex-end; justify-content: space-between; gap: 1rem; }
.hello h1 { margin: 0; font-size: 1.45rem; }
.hello-date { margin: 0; color: var(--muted); font-size: .88rem; }
.big-cta { display: flex; align-items: center; gap: 1rem; padding: 1.1rem 1.2rem; border-radius: 20px; color: #fff; text-decoration: none !important;
  background: linear-gradient(135deg, #0f766e, #0e6b64 45%, #4338ca); box-shadow: 0 18px 40px -20px rgba(15,118,110,.9); }
.big-cta:hover { filter: brightness(1.05); }
.big-cta > span:nth-child(2) { flex: 1; display: grid; line-height: 1.5; }
.big-cta b { font-size: 1.25rem; }
.big-cta small { color: #fff; font-size: .86rem; }
.big-cta-ico { width: 52px; height: 52px; border-radius: 16px; display: grid; place-items: center; background: rgba(255,255,255,.18); flex: none; }
.big-cta-ico .i { width: 30px; height: 30px; }
.big-cta > .i { width: 26px; height: 26px; opacity: .8; }
.today-grid { display: grid; grid-template-columns: 1.3fr 1fr 1fr; gap: .8rem; }
.today-card { display: grid; gap: .1rem; padding: 1rem 1.1rem; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow); color: var(--text); text-decoration: none !important; }
.today-card span { color: var(--muted); font-size: .84rem; font-weight: 650; }
.today-card b { font-size: 1.35rem; font-weight: 850; letter-spacing: -.02em; }
.today-card b small { font-size: .75rem; color: var(--muted); font-weight: 600; }
.today-card em { font-style: normal; color: var(--muted); font-size: .8rem; }
.today-card.today-main { border-color: color-mix(in srgb, var(--primary) 40%, var(--border)); background: linear-gradient(135deg, var(--primary-soft), transparent 70%), var(--surface); }
.today-card.today-main b { color: var(--primary); font-size: 1.6rem; }
.today-card.is-warn b { color: var(--warn); }
.setup-card { border-color: color-mix(in srgb, var(--info) 35%, var(--border)); }
.setup-steps { list-style: none; margin: 0; padding: .3rem 0; }
.setup-steps li { display: flex; align-items: center; gap: .8rem; padding: .75rem 1.2rem; border-bottom: 1px solid var(--border); }
.setup-steps li:last-child { border-bottom: 0; }
.setup-steps li > div { flex: 1; display: grid; line-height: 1.5; min-width: 0; }
.setup-steps small { color: var(--muted); }
.setup-steps form { margin: 0; }
.setup-dot { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; border: 2px dashed var(--border-strong); flex: none; }
.setup-steps .is-done .setup-dot { border: 0; background: var(--ok); color: #fff; }
.setup-steps .is-done b { text-decoration: line-through; color: var(--muted); }
.people { list-style: none; margin: 0; padding: .2rem 0; }
.people li { display: flex; align-items: center; gap: .6rem; padding: .65rem 1.15rem; border-bottom: 1px solid var(--border); }
.people li:last-child { border-bottom: 0; }
.people-main { flex: 1; min-width: 0; display: grid; line-height: 1.45; color: var(--text); text-decoration: none !important; }
.people-main b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.people-main small { color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.people-amount { font-weight: 750; }
.btn-icon.call { background: var(--ok-soft); color: var(--ok); width: 40px; height: 40px; border-radius: 50%; }
.more-card > summary { list-style: none; cursor: pointer; border-bottom: 0; }
.more-card > summary::-webkit-details-marker { display: none; }
.more-card[open] > summary { border-bottom: 1px solid var(--border); }
.more-card > summary h2::after { content: " ▾"; color: var(--muted); font-size: .8em; }
.head-actions { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; }
.head-actions form { margin: 0; }

/* ─── فرم‌ها ─── */
details.more { margin-top: 1rem; border-top: 1px dashed var(--border-strong); padding-top: .8rem; }
details.more > summary { cursor: pointer; display: inline-flex; align-items: center; gap: .45rem; color: var(--text-2); font-weight: 700; font-size: .92rem; margin-bottom: .8rem; list-style: none; }
details.more > summary::-webkit-details-marker { display: none; }
details.more > summary::after { content: "▾"; color: var(--muted); }
details.more[open] > summary::after { content: "▴"; }
.big-input { font-size: 1.12rem !important; font-weight: 700; min-height: 50px !important; letter-spacing: .02em; }
.lookup-box { padding: .75rem 1rem; border-radius: 14px; background: var(--ok-soft); color: var(--text); border: 1px solid color-mix(in srgb, var(--ok) 30%, transparent); display: grid; gap: .2rem; font-size: .9rem; }
.lookup-head b { color: var(--ok); }
.lookup-box p { margin: 0; }
.lookup-box small { color: var(--muted); }
.seg { display: grid; grid-template-columns: repeat(3, 1fr); gap: .35rem; padding: .3rem; background: var(--surface-3); border-radius: 14px; }
.seg.seg-2 { grid-template-columns: repeat(2, 1fr); }
.seg label { position: relative; cursor: pointer; }
.seg input { position: absolute; opacity: 0; pointer-events: none; }
.seg span { display: grid; place-items: center; min-height: 44px; padding: .3rem .4rem; border-radius: 11px; font-weight: 700; font-size: .9rem; color: var(--text-2); text-align: center; line-height: 1.3; }
.seg input:checked + span { background: var(--surface); color: var(--primary); box-shadow: var(--shadow-sm); }
.seg input:focus-visible + span { box-shadow: var(--ring); }
.quick-chips { display: flex; flex-wrap: wrap; gap: .45rem; padding: .9rem 1.1rem .2rem; }
.qchip { display: inline-flex; align-items: center; gap: .3rem; padding: .5rem .85rem; border-radius: 999px; border: 1px solid color-mix(in srgb, var(--primary) 35%, var(--border)); background: var(--primary-soft); color: var(--primary); font: inherit; font-size: .88rem; font-weight: 700; cursor: pointer; transition: transform .1s; }
.qchip:hover { filter: brightness(.97); }
.qchip:active, .qchip.is-added { transform: scale(.94); background: var(--primary); color: var(--primary-ink); }
.ws-form .items-head { display: none; }
.ws-form .item-row { grid-template-columns: minmax(0, 1fr) 84px 150px 120px 40px; align-items: end; }
.ws-form .items.has-vat .item-row { grid-template-columns: minmax(0, 1fr) 84px 150px 74px 120px 40px; }
.ws-form .item-row .item-main { align-self: end; }
.item-cell { display: grid; gap: .15rem; }
.item-cell span { font-size: .72rem; color: var(--muted); font-weight: 650; }
.item-cell input { min-height: 42px; padding: .45rem .5rem; text-align: center; }
.ws-form .line-total { padding-bottom: .65rem; }
.ws-form .drop { align-self: end; margin-bottom: .2rem; }
.stock-hint { grid-column: 1 / -1; margin: 0; color: var(--warn); font-size: .82rem; font-weight: 650; }
.form-bar { display: none; }
@media (max-width: 960px) {
  .has-form-bar .form-bar {
    display: flex; align-items: center; gap: .8rem; position: fixed; inset-inline: 0; bottom: 0; z-index: 34; padding: .6rem 1rem calc(.6rem + env(safe-area-inset-bottom));
    background: color-mix(in srgb, var(--surface) 95%, transparent); backdrop-filter: blur(14px); border-top: 1px solid var(--border); box-shadow: 0 -10px 30px -20px rgba(15,23,42,.6);
  }
  .form-bar-total { flex: 1; display: grid; line-height: 1.3; }
  .form-bar-total small { color: var(--muted); font-size: .76rem; }
  .form-bar-total b { font-size: 1.3rem; color: var(--primary); font-weight: 850; }
  .form-bar .btn { min-width: 46%; }
  .ws-form .totals-aside > .btn, [data-gallery-invoice] .totals-aside > .btn { display: none; }
  .totals-aside { position: static; }
  .ws-form .item-row, .ws-form .items.has-vat .item-row { grid-template-columns: 1fr 1fr; }
  .ws-form .item-main { grid-column: 1 / -1; }
  .ws-form .line-total { padding: 0; text-align: start; font-size: 1rem; }
  .ws-form .drop { justify-self: end; margin: 0; }
  .sticky-actions { position: sticky; bottom: calc(76px + env(safe-area-inset-bottom)); background: color-mix(in srgb, var(--surface) 94%, transparent); backdrop-filter: blur(10px); padding: .7rem 0; margin-bottom: -.4rem; z-index: 5; }
  .today-grid { grid-template-columns: 1fr 1fr; }
  .today-grid .today-main { grid-column: 1 / -1; }
}

/* ─── فهرست‌های لمسی ─── */
.inv-list, .stock-list, .line-list, .visit-list, .move-list { list-style: none; margin: 0; padding: 0; }
.inv-list li { border-bottom: 1px solid var(--border); }
.inv-list li:last-child { border-bottom: 0; }
.inv-list a { display: flex; align-items: center; gap: .8rem; padding: .8rem 1.15rem; color: var(--text); text-decoration: none !important; }
.inv-list a:hover { background: var(--surface-2); }
.inv-l { flex: 1; min-width: 0; display: grid; line-height: 1.5; }
.inv-l b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.inv-l small { color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.inv-r { display: grid; justify-items: end; gap: .15rem; flex: none; }
.inv-r > b { font-size: 1.02rem; font-weight: 800; }
.inv-badges { display: flex; gap: .25rem; }
.due { color: var(--bad); font-size: .76rem; font-weight: 700; }
.list-foot { padding: .7rem 1.15rem; border-top: 1px solid var(--border); background: var(--surface-2); border-radius: 0 0 var(--radius) var(--radius); }
.stock-list li { display: flex; align-items: center; gap: .6rem; padding: .7rem 1.15rem; border-bottom: 1px solid var(--border); }
.stock-list li:last-child { border-bottom: 0; }
.stock-list li.is-dim { opacity: .55; }
.stock-main { flex: 1; min-width: 0; display: grid; line-height: 1.45; color: var(--text); text-decoration: none !important; }
.stock-main small { color: var(--muted); }
.stock-price { font-weight: 700; color: var(--text-2); }
.line-list li { display: flex; align-items: center; gap: 1rem; padding: .75rem 1.15rem; border-bottom: 1px solid var(--border); }
.line-list li:last-child { border-bottom: 0; }
.ll-t { flex: 1; display: grid; line-height: 1.5; min-width: 0; }
.ll-t small { color: var(--muted); }
.visit-list li { border-bottom: 1px solid var(--border); }
.visit-list li:last-child { border-bottom: 0; }
.visit-list a { display: flex; align-items: center; gap: .8rem; padding: .75rem 1.15rem; color: var(--text); text-decoration: none !important; }
.visit-list a:hover { background: var(--surface-2); }
.visit-date { flex: none; font-weight: 700; color: var(--primary); font-size: .88rem; }
.visit-body { flex: 1; min-width: 0; display: grid; line-height: 1.5; }
.visit-body small { color: var(--muted); }
.move-list li { display: flex; align-items: center; gap: .7rem; padding: .6rem 1.15rem; border-bottom: 1px solid var(--border); flex-wrap: wrap; }
.move-list li:last-child { border-bottom: 0; }
.mv-t { flex: 1; min-width: 160px; font-size: .9rem; }
.action-bar { display: flex; gap: .5rem; overflow-x: auto; padding-bottom: .2rem; scrollbar-width: none; }
.action-bar::-webkit-scrollbar { display: none; }
.act { flex: 1 0 auto; min-width: 84px; display: grid; justify-items: center; gap: .2rem; padding: .7rem .8rem; border-radius: 14px; background: var(--surface); border: 1px solid var(--border); color: var(--text-2); font-weight: 700; font-size: .84rem; text-decoration: none !important; box-shadow: var(--shadow-sm); }
.act .i { width: 22px; height: 22px; color: var(--primary); }
.act:hover { border-color: var(--primary); }
.act.primary { background: var(--primary); color: var(--primary-ink); border-color: transparent; }
.act.primary .i { color: var(--primary-ink); }
.act.danger .i { color: var(--bad); }
.filters { position: relative; }
.filters > summary { list-style: none; }
.filters > summary::-webkit-details-marker { display: none; }
.filters-body { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; margin-top: .5rem; width: 100%; }
.toolbar:has(.filters[open]) .filters { flex-basis: 100%; }
.tax-off-note { display: flex; align-items: center; gap: .35rem; margin: 0; }
@media (max-width: 720px) {
  .table-cards thead { display: none; }
  .table-cards, .table-cards tbody, .table-cards tr, .table-cards td { display: block; width: 100%; }
  .table-cards tr { padding: .7rem 1rem; border-bottom: 1px solid var(--border); }
  .table-cards td { border: 0; padding: .1rem 0; display: flex; justify-content: space-between; gap: 1rem; }
  .table-cards td::before { content: attr(data-label); color: var(--muted); font-size: .8rem; }
  .table-cards td.cell-main { font-size: 1.02rem; font-weight: 700; }
  .table-cards td.cell-main::before { content: none; }
  .table-cards td.actions { justify-content: flex-end; }
  .hello h1 { font-size: 1.25rem; }
  .big-cta b { font-size: 1.12rem; }
  .stock-in span { display: none; }
  .stock-price { display: none; }
  .search-box { max-width: none; flex-basis: 100%; }
}

/* ─── تور راهنما ─── */
.tour { position: fixed; inset: 0; z-index: 200; }
.tour-hole { position: fixed; border-radius: 14px; box-shadow: 0 0 0 9999px rgba(2,6,23,.62); transition: all .25s ease; pointer-events: none; outline: 3px solid rgba(45,212,191,.9); outline-offset: 2px; }
.tour-card { position: fixed; width: min(340px, calc(100vw - 20px)); background: var(--surface); color: var(--text); border-radius: 18px; padding: 1rem 1.1rem .9rem; box-shadow: var(--shadow-lg); display: grid; gap: .35rem; transition: top .25s ease, left .25s ease; }
.tour-card b { font-size: 1.08rem; }
.tour-card p { margin: 0; color: var(--text-2); font-size: .94rem; line-height: 1.8; }
.tour-count { color: var(--primary); font-weight: 700; }
.tour-actions { display: flex; align-items: center; gap: .4rem; margin-top: .4rem; }
.tour-actions span { flex: 1; }

/* ─── راهنما ─── */
.help-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 1rem; }
.help-card { padding: 1.2rem; display: grid; gap: .5rem; align-content: start; }
.help-card h2 { display: flex; align-items: center; gap: .5rem; font-size: 1.05rem; margin: 0; }
.help-card ol { margin: 0; padding-inline-start: 1.2rem; display: grid; gap: .3rem; color: var(--text-2); }
.module-pick { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: .55rem; }
.module-pick-item { position: relative; cursor: pointer; }
.module-pick-item input { position: absolute; opacity: 0; }
.module-pick-item span { display: grid; justify-items: center; gap: .35rem; padding: .9rem .5rem; border: 2px solid var(--border); border-radius: 16px; background: var(--surface); text-align: center; font-size: .92rem; transition: border-color .12s, box-shadow .12s; }
.module-pick-item .i { width: 30px; height: 30px; color: var(--primary); }
.module-pick-item input:checked + span { border-color: var(--primary); box-shadow: 0 0 0 4px var(--primary-soft); background: linear-gradient(180deg, var(--primary-soft), var(--surface)); }
.module-pick-item input:focus-visible + span { box-shadow: var(--ring); }
@media (max-width: 720px) { .module-pick { grid-template-columns: repeat(2, 1fr); } .module-pick-item:last-child:nth-child(odd) { grid-column: 1 / -1; } }

/* ─── سایت عمومی ۳.۱ ─── */
.hero-cta { display: flex; flex-wrap: wrap; gap: .6rem; margin-top: 1.2rem; }
.phone-mock { justify-self: center; width: min(320px, 86vw); padding: 12px; border-radius: 38px; background: #0f172a; box-shadow: 0 30px 60px -25px rgba(15,23,42,.6); }
.phone-screen { border-radius: 28px; background: var(--bg); padding: 1rem .9rem 1.1rem; display: grid; gap: .55rem; font-size: .8rem; min-height: 480px; align-content: start; }
.pm-top { display: grid; line-height: 1.3; padding-bottom: .4rem; border-bottom: 1px solid var(--border); }
.pm-top small { color: var(--muted); }
.pm-card { padding: .55rem .7rem; border-radius: 12px; background: var(--surface); border: 1px solid var(--border); }
.pm-ok { background: var(--ok-soft); color: var(--ok); font-weight: 700; }
.pm-ok small { color: var(--text-2); font-weight: 500; }
.pm-field { display: grid; gap: .1rem; padding: .5rem .7rem; border-radius: 12px; background: var(--surface); border: 1px solid var(--border-strong); }
.pm-field span { color: var(--muted); font-size: .7rem; }
.pm-chips { display: flex; flex-wrap: wrap; gap: .3rem; }
.pm-chips span { padding: .2rem .55rem; border-radius: 999px; background: var(--primary-soft); color: var(--primary); font-weight: 700; font-size: .72rem; }
.pm-line, .pm-total { display: flex; justify-content: space-between; gap: .5rem; padding: .45rem .7rem; border-radius: 10px; background: var(--surface); }
.pm-total { background: transparent; font-size: .95rem; }
.pm-total b { color: var(--primary); }
.pm-btn { text-align: center; padding: .7rem; border-radius: 14px; color: var(--primary-ink); font-weight: 800; background: linear-gradient(180deg, var(--primary-2), var(--primary)); }
.who-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 1rem; }
.who-card { padding: 1.2rem; display: grid; gap: .6rem; align-content: start; color: var(--text); text-decoration: none !important; transition: transform .12s, box-shadow .12s; }
.who-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.who-card > b { font-size: 1.05rem; }
.who-card .check-list { margin: 0; }
.who-go { display: inline-flex; align-items: center; gap: .35rem; color: var(--primary); font-weight: 800; margin-top: auto; }
.tour-steps { list-style: none; margin: 0 auto 1.5rem; padding: 0; max-width: 760px; display: grid; gap: .8rem; }
.tour-steps li { display: flex; gap: 1rem; align-items: flex-start; padding: 1rem 1.2rem; background: var(--surface); border: 1px solid var(--border); border-radius: 18px; box-shadow: var(--shadow); }
.tour-steps p { margin: .2rem 0 0; color: var(--text-2); }
.ts-n { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; flex: none; font-weight: 900; font-size: 1.2rem; color: #fff; background: linear-gradient(135deg, #0f766e, #4f46e5); }
.price-group { margin-bottom: .6rem; }
.price-group > summary { list-style: none; cursor: pointer; padding: .8rem 1rem; border-radius: 14px; background: var(--surface); border: 1px solid var(--border); margin: 0 0 .8rem; }
.price-group > summary::-webkit-details-marker { display: none; }
.price-group > summary small { margin-inline-start: auto; color: var(--muted); font-size: .85rem; font-weight: 600; }
.price-group > summary::after { content: "▾"; color: var(--muted); margin-inline-start: .5rem; }
.price-group[open] > summary::after { content: "▴"; }
@media (max-width: 960px) { .phone-mock { display: none; } }

/* ─── سربرگ: پس‌زمینه‌ی کامل؛ روی موبایل همراه صفحه بالا می‌رود تا روی محتوا نیفتد ─── */
.topbar { background: var(--surface); backdrop-filter: none; }
@media (max-width: 960px) {
  .topbar { position: relative; top: auto; box-shadow: none; }
}
.site-header { background: var(--surface); backdrop-filter: none; }

/* ════════ ۳.۱.۱ — بازبینی دقیق موبایل ════════ */
/* جدول‌ها روی موبایل: کارت جمع‌وجور (عنوان پررنگ، بقیه در یک خط، دکمه‌ها گوشه) */
@media (max-width: 720px) {
  .table-cards thead { display: none; }
  .table-cards, .table-cards tbody, .table-cards tfoot { display: block; width: 100%; }
  .table-cards tr { display: flex; flex-wrap: wrap; align-items: baseline; gap: .1rem .9rem; padding: .75rem 1rem; border-bottom: 1px solid var(--border); position: relative; width: 100%; }
  .table-cards tr:last-child { border-bottom: 0; }
  .table-cards td { display: inline-flex; align-items: baseline; gap: .3rem; width: auto; border: 0; padding: 0; font-size: .86rem; color: var(--text-2); justify-content: flex-start; }
  .table-cards td::before { content: attr(data-label); color: var(--muted); font-size: .78rem; }
  .table-cards td[data-label=""]::before { content: none; }
  .table-cards td.cell-main { flex: 1 1 100%; font-size: 1rem; font-weight: 700; color: var(--text); padding-inline-end: 5.6rem; }
  .table-cards td.cell-main::before { content: none; }
  .table-cards td.actions { position: absolute; top: .5rem; inset-inline-end: .5rem; }
  .table-cards td.actions::before { content: none; }
  .table-cards td.actions .btn { min-height: 38px; min-width: 38px; }
  .table-cards tfoot tr { background: var(--surface-2); }
  .table-cards .badge { font-size: .74rem; }
  .table-wrap:has(.table-cards) { overflow: visible; }
  /* کارت‌های خلاصه دو ستونه */
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .6rem; }
  .stat { padding: .8rem .9rem; }
  .kv-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .7rem 1rem; }
  .kv-grid dd { overflow-wrap: anywhere; }
}
/* دکمه‌های اقدام: هم‌عرض و بدون بیرون‌زدگی */
.action-bar { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); overflow: visible; }
.act { min-width: 0; padding: .65rem .3rem; }
.act span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
/* عددهای بزرگ (میلیارد) در کارت‌ها */
.today-card { min-width: 0; }
.today-card b { font-size: clamp(1.02rem, 4.6vw, 1.35rem); overflow-wrap: anywhere; }
.today-card.today-main b { font-size: clamp(1.25rem, 6vw, 1.6rem); }
.today-grid { grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr) minmax(0, 1fr); }
@media (max-width: 960px) { .today-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } }
/* نوار ذخیره‌ی چسبان: پس‌زمینه‌ی کامل */
.sticky-actions { background: var(--surface) !important; backdrop-filter: none !important; }
@media (max-width: 960px) { .sticky-actions { border-top: 1px solid var(--border); padding-inline: 1rem; margin-inline: -1rem; } }
/* دکمه‌ی نمایش رمز بزرگ‌تر برای انگشت */
.pass-toggle { min-width: 40px; min-height: 40px; display: grid; place-items: center; }
.pass-wrap input { padding-left: 3rem; }
/* ردیف انبار: کل ردیف لمس‌پذیر */
.stock-main { padding: .25rem 0; min-height: 44px; align-content: center; }
.stock-in { min-height: 40px; min-width: 40px; }
/* دکمه‌های سریع فاکتور: روی موبایل دو ردیف افقی قابل کشیدن */
@media (max-width: 720px) {
  .quick-chips { display: grid; grid-auto-flow: column; grid-template-rows: auto auto; grid-auto-columns: max-content; overflow-x: auto; padding-bottom: .6rem; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
  .quick-chips::-webkit-scrollbar { display: none; }
  .qchip { white-space: nowrap; }
}
/* جستجوی کار/کالا در فاکتور */
.item-search { padding: .8rem 1.1rem 0; display: grid; gap: .5rem; }
.item-search .search-box { max-width: none; }
.item-results { display: grid; gap: .35rem; }
.item-results button { display: flex; align-items: center; justify-content: space-between; gap: .6rem; width: 100%; padding: .6rem .8rem; border-radius: 12px; border: 1px solid var(--border); background: var(--surface-2); color: var(--text); font: inherit; font-size: .92rem; text-align: start; cursor: pointer; min-height: 46px; }
.item-results button:hover, .item-results button:focus-visible { border-color: var(--primary); background: var(--primary-soft); }
.item-results small { color: var(--muted); white-space: nowrap; }
.item-results .none { color: var(--muted); font-size: .88rem; padding: .3rem .2rem; }
.lookup-actions { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: .35rem; }
/* ارسال برای مشتری */
.share-row { display: flex; flex-wrap: wrap; gap: .5rem; }
.btn-wa { background: #25d366; color: #fff; border-color: transparent; }
.btn-wa:hover { background: #1ebe5b; color: #fff; }
.people .btn-icon.sms { background: var(--info-soft); color: var(--info); width: 40px; height: 40px; border-radius: 50%; }
.topbar-help { display: inline-flex; align-items: center; gap: .35rem; min-height: 40px; padding: .3rem .8rem; border-radius: 999px; border: 1px solid var(--border); background: var(--surface-2); color: var(--text-2); font: inherit; font-size: .85rem; font-weight: 700; cursor: pointer; width: auto; height: auto; }
.topbar-help:hover { border-color: var(--primary); color: var(--primary); }
.topbar-help .i { color: var(--primary); }

/* ═══ 3.2 — ورود یکپارچه با موبایل و آدرس پوشه‌ای ═══ */
.hero-login-wrap .hero-grid { grid-template-columns: 1.1fr minmax(320px, 420px); align-items: start; }
.hero-login { padding: 1.4rem; display: grid; gap: 1rem; border-radius: 22px; box-shadow: var(--shadow-lg); border: 1px solid var(--border); background: var(--surface); scroll-margin-top: 1rem; }
.hero-login-head { display: flex; align-items: center; gap: .8rem; }
.hero-login-head h2 { margin: 0; font-size: 1.25rem; }
.hero-login-head p { margin: .1rem 0 0; }
.hl-ico { display: grid; place-items: center; width: 46px; height: 46px; border-radius: 14px; background: var(--primary-soft); color: var(--primary); flex: none; }
.hl-ico .i { width: 24px; height: 24px; }
.hero-login-new { margin: 0; text-align: center; padding-top: .8rem; border-top: 1px dashed var(--border); }
.hero-login-new a { font-weight: 700; }

.quick-panel { display: flex; align-items: center; gap: .8rem; padding: .85rem 1rem; border-radius: 16px; background: var(--primary); color: #fff; text-decoration: none; box-shadow: var(--shadow); min-height: 64px; }
.quick-panel:hover { color: #fff; filter: brightness(1.06); }
.quick-panel .pp-text small { color: #fff; }
.quick-panel .pp-text b { color: #fff; }
.quick-panel .pp-initial { background: rgba(255,255,255,.2); color: #fff; }
.quick-go { margin-inline-start: auto; display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: rgba(255,255,255,.18); flex: none; }
.pp-logo { width: 42px; height: 42px; border-radius: 12px; object-fit: cover; flex: none; background: var(--surface-2); }
.pp-initial { display: grid; place-items: center; font-weight: 800; font-size: 1.15rem; background: var(--primary-soft); color: var(--primary); }
.pp-text { display: grid; gap: .1rem; min-width: 0; }
.pp-text b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 1.02rem; }
.pp-text small { color: var(--muted); font-size: .8rem; }

.or-line { display: flex; align-items: center; gap: .6rem; margin: 0; color: var(--muted); font-size: .82rem; }
.or-line::before, .or-line::after { content: ""; flex: 1; height: 1px; background: var(--border); }

.login-form { gap: .85rem; }
.login-links { display: grid; gap: .5rem; justify-items: center; text-align: center; }
.link-btn { background: none; border: 0; padding: .35rem .5rem; color: var(--primary); font: inherit; font-weight: 600; cursor: pointer; border-radius: 8px; min-height: 36px; }
.link-btn:hover { background: var(--primary-soft); }
.forgot { width: 100%; }
.forgot summary { cursor: pointer; color: var(--text-2); list-style: none; padding: .35rem; min-height: 36px; }
.forgot summary::-webkit-details-marker { display: none; }
.forgot[open] summary { color: var(--text); font-weight: 700; }
.forgot p { margin: .35rem 0; padding: .6rem .8rem; background: var(--surface-2); border-radius: 12px; text-align: start; line-height: 1.8; }

.login-pick { display: grid; gap: .8rem; }
.login-pick-title { display: flex; gap: .5rem; align-items: center; margin: 0; font-weight: 700; color: var(--ok); }
.panel-pick { list-style: none; margin: 0; padding: 0; display: grid; gap: .55rem; }
.panel-pick a { display: flex; align-items: center; gap: .8rem; padding: .8rem 1rem; border: 1px solid var(--border); border-radius: 16px; background: var(--surface); color: var(--text); text-decoration: none; min-height: 64px; }
.panel-pick a:hover { border-color: var(--primary); background: var(--primary-soft); }
.panel-pick a > .i:last-child { margin-inline-start: auto; color: var(--muted); }

.url-input { display: flex; align-items: stretch; width: 100%; border: 1.5px solid var(--border-strong); border-radius: 12px; overflow: hidden; background: var(--surface); }
.url-input:focus-within { box-shadow: var(--ring); border-color: var(--primary); }
.url-prefix { display: flex; align-items: center; padding: 0 .7rem; background: var(--surface-2); color: var(--muted); font-family: ui-monospace, Menlo, Consolas, monospace; font-size: .85rem; white-space: nowrap; border-inline-end: 1px solid var(--border); max-width: 55%; overflow: hidden; text-overflow: ellipsis; }
.url-input input { border: 0 !important; box-shadow: none !important; border-radius: 0; flex: 1; min-width: 0; min-height: 48px; font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 1.05rem; text-align: left; background: transparent; }

.tour-grid { display: grid; grid-template-columns: auto 1fr; gap: 2.5rem; align-items: center; max-width: 1000px; margin: 0 auto 1.5rem; }
.tour-grid .tour-steps { margin: 0; }
.site-login .i { width: 18px; height: 18px; }

@media (max-width: 960px) {
  .hero-login-wrap .hero-grid { grid-template-columns: 1fr; gap: 1.4rem; }
  .tour-grid { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .hero-login-wrap { padding-top: 1.2rem; }
  .hero-login-wrap .hero-copy .eyebrow, .hero-login-wrap .hero-facts { display: none; }
  .hero-login-wrap .hero-copy h1 { font-size: 1.55rem; margin: 0 0 .4rem; }
  .hero-login-wrap .hero-copy .lead { font-size: .95rem; margin: 0; }
  .hero-login-wrap .hero-cta { margin-top: .8rem; }
  .hero-login-wrap .hero-cta .btn-ghost { display: none; }
  .hero-login-wrap .hero-cta .btn { width: 100%; }
  .hero-login { padding: 1.1rem; border-radius: 20px; }
  .site-actions .site-login { padding-inline: .6rem; }
}
@media (max-width: 380px) {
  .site-actions .btn-icon { display: none; }
}
@media (max-width: 960px) {
  /* کاربری که قبلاً وارد شده: اول دکمه‌ی ورود سریع */
  .hero-login-wrap.is-returning .hero-login { order: -1; }
}

/* ═══ 3.2 — کارت‌های «کار شما» و تعرفه‌ها: یکدست و هم‌تراز ═══ */
.who-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 1rem; align-items: stretch; }
.who-card { display: flex; flex-direction: column; align-items: stretch; gap: .5rem; padding: 1.3rem 1.1rem 1.1rem; background: var(--surface); border: 1px solid var(--border); border-radius: 20px; box-shadow: var(--shadow-sm); color: var(--text); text-decoration: none !important; text-align: center; transition: transform .12s, box-shadow .12s, border-color .12s; }
.who-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); border-color: var(--primary); }
.who-ico { align-self: center; display: grid; place-items: center; width: 56px; height: 56px; border-radius: 16px; background: var(--primary-soft); color: var(--primary); }
.who-ico .i { width: 28px; height: 28px; }
.who-title { font-size: 1.12rem; margin-top: .2rem; }
.who-pitch { color: var(--text-2); font-size: .86rem; min-height: 2.6em; line-height: 1.5; }
.who-list { list-style: none; margin: .2rem 0 0; padding: .75rem 0 0; border-top: 1px dashed var(--border); display: grid; gap: .45rem; text-align: start; font-size: .86rem; }
.who-list li { display: flex; align-items: center; gap: .4rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.who-list .i { width: 16px; height: 16px; color: var(--ok); flex: none; }
.who-foot { margin-top: auto; padding-top: .9rem; display: grid; gap: .55rem; }
.who-price { font-size: .82rem; color: var(--muted); min-height: 1.4em; }
.who-price b { color: var(--text); font-size: .95rem; }
.who-btn { pointer-events: none; }
.who-btn .i { width: 18px; height: 18px; }

.ptabs { display: grid; gap: 1.2rem; }
.pt-radio { position: absolute; opacity: 0; pointer-events: none; }
.pt-labels { display: flex; flex-wrap: wrap; justify-content: center; gap: .5rem; padding: .35rem; background: var(--surface-2); border-radius: 18px; justify-self: center; max-width: 100%; }
.pt-label { display: inline-flex; align-items: center; gap: .4rem; padding: .6rem 1.1rem; border-radius: 14px; font-weight: 700; color: var(--text-2); cursor: pointer; min-height: 44px; user-select: none; }
.pt-label .i { width: 20px; height: 20px; }
.pt-label:hover { color: var(--text); background: var(--surface); }
.pt-panel { display: none; }
.pt-caption { display: flex; align-items: center; justify-content: center; gap: .4rem; margin: 0 0 1.4rem; color: var(--text-2); }
.pt-caption .i { color: var(--primary); }
#pt-gallery:checked ~ .pt-p-gallery, #pt-tire:checked ~ .pt-p-tire, #pt-oil:checked ~ .pt-p-oil,
#pt-mechanic:checked ~ .pt-p-mechanic, #pt-suspension:checked ~ .pt-p-suspension { display: block; }
#pt-gallery:checked ~ .pt-labels .pt-l-gallery, #pt-tire:checked ~ .pt-labels .pt-l-tire, #pt-oil:checked ~ .pt-labels .pt-l-oil,
#pt-mechanic:checked ~ .pt-labels .pt-l-mechanic, #pt-suspension:checked ~ .pt-labels .pt-l-suspension { background: var(--primary); color: var(--primary-ink); box-shadow: var(--shadow); }
.pt-radio:focus-visible ~ .pt-labels { box-shadow: var(--ring); }

.plan-row { grid-template-columns: repeat(4, minmax(0, 1fr)); align-items: stretch; }
.plan-row .plan { display: flex; flex-direction: column; gap: .3rem; text-align: center; padding: 1.5rem 1.1rem 1.1rem; border-radius: 20px; }
.plan-row .plan.is-featured { border: 2px solid var(--primary); box-shadow: var(--shadow-lg); }
.plan-row .plan-tag { inset-inline-start: 50%; transform: translateX(50%); white-space: nowrap; }
.plan-row h4 { font-size: 1.05rem; color: var(--text-2); }
.plan-price { display: flex; align-items: baseline; justify-content: center; gap: .3rem; margin-top: .2rem; }
.plan-price .price { font-size: 1.65rem; font-weight: 800; line-height: 1.2; }
.plan-price small { color: var(--muted); }
.plan-sub { margin: 0; color: var(--muted); font-size: .84rem; }
.plan-save { margin: .2rem auto 0; background: var(--ok-soft); color: var(--ok); font-size: .78rem; font-weight: 700; padding: .12rem .7rem; border-radius: 999px; }
.plan-save.is-empty { visibility: hidden; }
.plan-list { list-style: none; margin: .7rem 0 0; padding: .8rem 0 0; border-top: 1px dashed var(--border); display: grid; gap: .45rem; text-align: start; font-size: .88rem; }
.plan-list li { display: flex; align-items: center; gap: .4rem; }
.plan-list .i { width: 16px; height: 16px; color: var(--ok); flex: none; }
.plan-btn { margin-top: auto; }
.plan-row .plan-list { margin-bottom: 1rem; }

@media (max-width: 1100px) {
  .who-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .plan-row { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 1.4rem; }
}
@media (max-width: 640px) {
  .who-grid { grid-template-columns: 1fr; gap: .7rem; }
  /* روی گوشی: کارت افقی و جمع‌وجور، همه هم‌قد */
  .who-card { display: grid; grid-template-columns: 52px 1fr; grid-template-areas: "ico title" "ico pitch" "foot foot"; text-align: start; column-gap: .9rem; row-gap: .15rem; padding: 1rem; }
  .who-ico { grid-area: ico; width: 52px; height: 52px; align-self: start; }
  .who-title { grid-area: title; margin: 0; }
  .who-pitch { grid-area: pitch; min-height: 0; }
  .who-list { display: none; }
  .who-foot { grid-area: foot; grid-template-columns: 1fr auto; align-items: center; padding-top: .7rem; }
  .who-btn { width: auto; padding-inline: 1rem; }
  .pt-labels { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .3rem; width: 100%; }
  .pt-label { flex-direction: column; justify-content: center; gap: .15rem; padding: .5rem .2rem; font-size: .78rem; text-align: center; }
  .plan-row { grid-template-columns: 1fr 1fr; gap: .7rem; row-gap: 1.2rem; }
  .plan-row .plan { padding: 1.3rem .7rem .8rem; }
  .plan-price .price { font-size: 1.25rem; }
  .plan-list { font-size: .8rem; }
  .plan-list li { gap: .25rem; }
}
@media (max-width: 339px) {
  .plan-row { grid-template-columns: 1fr; }
}
@media (max-width: 400px) {
  .plan-price { flex-direction: column; align-items: center; gap: 0; }
  .plan-sub, .plan-list { font-size: .76rem; }
}
.plan-row .plan-btn.btn-ghost { border: 1.5px solid var(--primary); color: var(--primary); background: transparent; }
.plan-row .plan-btn.btn-ghost:hover { background: var(--primary-soft); }
.pt-panel .plans { margin-top: .6rem; }
.pricing-note { margin-top: 1.6rem; }
@media (max-width: 640px) {
  .pt-labels { grid-template-columns: repeat(5, minmax(0, 1fr)); padding: .25rem; gap: .2rem; }
  .pt-label { font-size: .7rem; padding: .45rem .1rem; line-height: 1.3; border-radius: 12px; }
  .pt-label .i { width: 22px; height: 22px; }
}

/* ═══ 3.3 — کمیسیون نمایشگاه ═══ */
.field-label { margin: .2rem 0 .45rem; font-weight: 700; font-size: .9rem; }
.rate-row { display: grid; grid-template-columns: minmax(0, 150px) 1fr; gap: .8rem; align-items: end; }
.rate-chips { display: flex; flex-wrap: wrap; gap: .4rem; padding-bottom: .3rem; }
.rate-chips .chip { min-height: 42px; min-width: 52px; border-radius: 12px; border: 1.5px solid var(--border-strong); background: var(--surface); font: inherit; font-weight: 700; cursor: pointer; color: var(--text); }
.rate-chips .chip:hover { border-color: var(--primary); color: var(--primary); }
.calc-note { display: flex; align-items: center; gap: .4rem; margin: .6rem 0 0; padding: .7rem .9rem; border-radius: 12px; background: var(--primary-soft); color: var(--text); }
.calc-note b { font-size: 1.1rem; color: var(--primary); }
.calc-note .i { color: var(--primary); }
.party-more { margin: 0 1.2rem 1.1rem; }
.tot-muted { color: var(--muted); }
.other-party { display: flex; align-items: center; gap: .8rem; padding: .9rem 1rem; margin-bottom: 1rem; text-decoration: none; color: var(--text); border: 1.5px dashed var(--primary); background: var(--primary-soft); }
.other-party > span:nth-child(2) { display: grid; gap: .1rem; }
.other-party small { color: var(--text-2); }
.other-party > .i:last-child { margin-inline-start: auto; color: var(--primary); }
.op-ico { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 12px; background: var(--primary); color: #fff; flex: none; }
@media (max-width: 640px) { .rate-row { grid-template-columns: 1fr; } .party-more { margin: 0 1rem 1rem; } }

/* ═══ 3.3 — قیمت‌گذاری سریع ═══ */
.head-actions form { display: inline; }
.pct-grid { display: grid; grid-template-columns: 160px 1fr 170px 170px auto; gap: .8rem 1rem; align-items: end; }
.pct-input { display: flex; align-items: stretch; border: 1.5px solid var(--border-strong); border-radius: 12px; overflow: hidden; background: var(--surface); }
.pct-input:focus-within { box-shadow: var(--ring); border-color: var(--primary); }
.pct-input input { border: 0 !important; box-shadow: none !important; flex: 1; min-width: 0; text-align: center; }
.pct-input span { display: grid; place-items: center; padding: 0 .8rem; background: var(--surface-2); font-weight: 800; color: var(--muted); }
.pct-quick { display: flex; flex-wrap: wrap; gap: .35rem; padding-bottom: .4rem; }
.pct-quick .chip { min-height: 40px; min-width: 52px; border-radius: 12px; border: 1.5px solid var(--border-strong); background: var(--surface); font: inherit; font-weight: 700; color: var(--text); cursor: pointer; }
.pct-quick .chip:hover { border-color: var(--primary); color: var(--primary); }
.pct-apply { min-height: 50px; }
.pct-apply:disabled { opacity: .45; cursor: not-allowed; }
.price-rows { list-style: none; margin: 0; padding: 0; }
.price-rows li { display: grid; grid-template-columns: 40px 1fr auto; grid-template-areas: "chk name prices" "chk prev prev"; align-items: center; gap: .2rem .8rem; padding: .7rem 1rem; border-top: 1px solid var(--border); }
.price-rows li.is-selected { background: var(--primary-soft); }
.pr-check { grid-area: chk; display: grid; place-items: center; min-height: 44px; cursor: pointer; }
.pr-check input { width: 22px; height: 22px; accent-color: var(--primary); }
.pr-name { grid-area: name; display: grid; min-width: 0; }
.pr-name b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pr-name small { color: var(--muted); font-size: .8rem; }
.pr-prices { grid-area: prices; display: flex; gap: .5rem; }
.pr-field { display: grid; gap: .1rem; font-size: .72rem; color: var(--muted); }
.pr-field input { width: 130px; min-height: 42px; text-align: left; font-weight: 700; }
.pr-field input.is-empty { border-color: var(--warn); background: var(--warn-soft); }
.pr-buy input { width: 110px; font-weight: 500; }
.pr-preview { grid-area: prev; color: var(--primary); font-weight: 700; font-size: .8rem; }
.pricing-save-desk { display: flex; justify-content: flex-end; margin: 1rem 0 2rem; }
@media (max-width: 1100px) { .pct-grid { grid-template-columns: 1fr 1fr; } .pct-quick { grid-column: 1 / -1; order: 2; } .pct-apply { grid-column: 1 / -1; } }
@media (max-width: 960px) { .pricing-save-desk { display: none; } }
@media (max-width: 640px) {
  .pct-grid { grid-template-columns: 1fr 1fr; gap: .6rem; }
  .pct-grid > .field:first-child { grid-column: 1 / -1; }
  .price-rows li { grid-template-columns: 36px 1fr; grid-template-areas: "chk name" "chk prices" "chk prev"; padding: .7rem .8rem; }
  .pr-prices { gap: .4rem; }
  .pr-field input { width: 100%; }
  .pr-field { flex: 1; }
  .pr-buy { flex: .8; }
}

/* ═══ 3.3 — پلاک ایرانی ═══ */
.plate-w-wrap { position: relative; display: grid; gap: .35rem; justify-items: start; }
.plate-w { display: inline-flex; align-items: stretch; height: 58px; border: 2.5px solid #111827; border-radius: 10px; background: #fff; color: #111827; overflow: hidden; box-shadow: var(--shadow-sm); max-width: 100%; }
.plate-w:focus-within { box-shadow: var(--ring); }
.pw-band { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; width: 30px; background: #1e40af; color: #fff; font: 700 .48rem/1.15 Arial, sans-serif; text-align: center; flex: none; }
.plate-w input { border: 0 !important; box-shadow: none !important; background: transparent !important; color: #111827 !important; font-size: 1.55rem !important; font-weight: 800; text-align: center; padding: 0 !important; min-height: 0 !important; height: 100%; border-radius: 0 !important; }
.plate-w input::placeholder { color: #6b7280; opacity: 1; font-weight: 600; }
.pw-a { width: 50px; }
.pw-b { width: 70px; }
.pw-l { width: 52px; border: 0; border-inline: 1px dashed #cbd5e1; background: #f8fafc; color: #111827; font: inherit; font-size: 1.35rem; font-weight: 800; cursor: pointer; flex: none; }
.pw-l.is-empty { font-size: .8rem; color: #0e6b64; font-weight: 700; }
.pw-l:hover, .pw-l[aria-expanded="true"] { background: #e0f2f1; }
.pw-iran { display: flex; flex-direction: column; align-items: center; justify-content: center; width: 56px; border-inline-start: 2px solid #111827; flex: none; }
.pw-iran small { font-size: .62rem; font-weight: 800; line-height: 1; padding-top: 4px; color: #111827; }
.pw-iran input { width: 100%; font-size: 1.3rem !important; height: auto; }
.pw-pop { position: absolute; top: 64px; inset-inline-start: 0; z-index: 30; display: grid; grid-template-columns: repeat(6, 46px); gap: 6px; padding: 10px; background: var(--surface); border: 1px solid var(--border); border-radius: 16px; box-shadow: var(--shadow-lg); direction: rtl; }
.pw-pop button { height: 46px; border-radius: 10px; border: 1.5px solid var(--border); background: var(--surface-2); color: var(--text); font: inherit; font-size: 1.15rem; font-weight: 800; cursor: pointer; }
.pw-pop button:hover, .pw-pop button:focus-visible { border-color: var(--primary); background: var(--primary-soft); color: var(--primary); }
.pw-free { font-size: .8rem; padding: .15rem .3rem; min-height: 30px; color: var(--muted); }
.plate-w-wrap.is-free { justify-items: stretch; }
@media (max-width: 380px) {
  .pw-a { width: 44px; } .pw-b { width: 62px; } .pw-l { width: 46px; } .pw-iran { width: 50px; }
  .plate-w input { font-size: 1.35rem !important; }
  .pw-pop { grid-template-columns: repeat(6, 1fr); width: calc(100vw - 48px); }
}

/* ═══ 3.3.1 — تور راهنمای دو مرحله‌ای، امن برای گوشی ═══ */
.tour-hole { transition: top .2s ease, left .2s ease, width .2s ease, height .2s ease, opacity .15s ease; }
.tour-card { gap: .45rem; z-index: 1; max-height: calc(100vh - 24px); overflow: auto; }
.tour-card.is-center { top: 50% !important; left: 50% !important; transform: translate(-50%, -50%); }
.tour-meta { display: flex; justify-content: space-between; align-items: center; gap: .5rem; }
.tour-group { background: var(--primary-soft); color: var(--primary); font-weight: 800; font-size: .74rem; padding: .15rem .6rem; border-radius: 999px; }
.tour-count { font-size: .78rem; }
.tour-actions .btn { min-height: 42px; }
.tour-actions .btn-primary { min-width: 110px; }
@media (max-width: 960px) {
  .tour-card { left: 10px !important; right: 10px; width: auto; top: auto !important; bottom: calc(10px + env(safe-area-inset-bottom)); transition: none; border-radius: 20px; padding: 1rem 1.1rem calc(.9rem); box-shadow: 0 -10px 40px -10px rgba(2,6,23,.5); }
  .tour-card.is-top { top: calc(10px + env(safe-area-inset-top)) !important; bottom: auto; }
  .tour-card.is-center { top: 50% !important; bottom: auto; left: 10px !important; transform: translateY(-50%); }
  .tour-card b { font-size: 1.12rem; }
  .tour-card p { font-size: .98rem; }
  .tour-actions .btn { min-height: 46px; font-size: .95rem; }
  .tour-actions .btn-primary { flex: 1.4; }
  .tour-actions span { display: none; }
  .tour-actions .btn-ghost { padding-inline: .7rem; }
}
.tour-on .bottom-nav { z-index: 35; }

/* ═══ 3.4 — باتری‌سازی ═══ */
#pt-battery:checked ~ .pt-p-battery { display: block; }
#pt-battery:checked ~ .pt-labels .pt-l-battery { background: var(--primary); color: var(--primary-ink); box-shadow: var(--shadow); }
.who-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 1100px) { .who-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) {
  .who-grid { grid-template-columns: 1fr; }
  .pt-labels { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
.seg-warranty { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); }
.seg-warranty label span { padding-inline: .2rem; white-space: nowrap; }
.lookup-w { margin: .35rem 0 0; font-weight: 700; font-size: .9rem; }
.lookup-w.is-ok { color: var(--ok); }
.lookup-w.is-bad { color: var(--bad); }
@media (max-width: 380px) { .seg-warranty label span { font-size: .78rem; } }
.warranty-dd { display: grid; gap: .25rem; }

/* ═══ 3.5 — ثبت‌نام ساده، کد معرف، کارت به کارت ═══ */
.start-pick { display: grid; grid-template-columns: 1fr 1fr; gap: .7rem; }
.start-opt { position: relative; cursor: pointer; }
.start-opt input { position: absolute; opacity: 0; pointer-events: none; }
.start-opt > span { display: grid; justify-items: center; gap: .2rem; text-align: center; padding: 1rem .6rem; border: 2px solid var(--border); border-radius: 18px; background: var(--surface); transition: border-color .12s, background .12s; min-height: 108px; align-content: center; }
.start-opt > span .i { width: 28px; height: 28px; color: var(--muted); }
.start-opt b { font-size: 1.05rem; }
.start-opt small { color: var(--muted); font-size: .8rem; }
.start-opt input:checked + span { border-color: var(--primary); background: var(--primary-soft); box-shadow: var(--shadow); }
.start-opt input:checked + span .i { color: var(--primary); }
.start-opt input:focus-visible + span { box-shadow: var(--ring); }
.pay-box { display: grid; gap: .6rem; padding: 1rem; border-radius: 16px; background: var(--surface-2); }
.ref-card { padding: 1.1rem 1.2rem; display: grid; gap: .9rem; margin-bottom: 1rem; border: 1.5px dashed var(--primary); background: linear-gradient(135deg, var(--primary-soft), var(--surface) 70%); }
.ref-main { display: flex; gap: .8rem; align-items: center; }
.ref-main h2 { margin: 0; font-size: 1.05rem; }
.ref-main p { margin: .2rem 0 0; }
.ref-ico { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 14px; background: var(--primary); color: #fff; flex: none; }
.ref-code-row { display: flex; flex-wrap: wrap; gap: .5rem; align-items: stretch; }
.ref-code { display: grid; padding: .4rem 1rem; border-radius: 12px; background: var(--surface); border: 1px solid var(--border); flex: 1; min-width: 150px; }
.ref-code small { color: var(--muted); font-size: .72rem; }
.ref-code b { font-size: 1.35rem; letter-spacing: .12em; color: var(--primary); }
.ref-stats { display: flex; flex-wrap: wrap; gap: .4rem 1rem; margin: 0; color: var(--text-2); }
.ref-stats span::before { content: "• "; color: var(--primary); }
.ref-wait { display: flex; gap: .4rem; align-items: center; margin: 0; color: var(--text-2); }
.ref-inline { background: var(--primary-soft); padding: .6rem .8rem; border-radius: 12px; font-size: .9rem; }
.pay-method { margin: 0 0 1rem; max-width: 520px; }
.card-pay { display: grid; gap: 1rem; }
.cp-head { display: flex; gap: .8rem; align-items: center; }
.cp-head h1 { margin: 0; }
.cp-ico { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 14px; background: var(--primary-soft); color: var(--primary); flex: none; }
.cp-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 1rem; }
.cp-steps > li { display: grid; gap: .5rem; }
.cp-amount { display: flex; align-items: baseline; gap: .4rem; font-size: 1.6rem; font-weight: 800; color: var(--primary); }
.cp-amount small { font-size: .85rem; color: var(--muted); font-weight: 600; }
.bank-card { position: relative; display: grid; gap: .4rem; padding: 1.1rem 1.2rem; border-radius: 18px; color: #fff; background: linear-gradient(135deg, #0f766e, #1e3a8a); box-shadow: var(--shadow-lg); }
.bc-bank { font-size: .85rem; opacity: .9; }
.bc-num { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 1.35rem; letter-spacing: .06em; font-weight: 700; text-align: center; padding: .3rem 0; }
.bc-holder { font-size: .9rem; }
.bc-copy { justify-self: start; background: rgba(255,255,255,.18) !important; color: #fff !important; border-color: transparent !important; }
.cp-sheba { margin: 0; display: flex; align-items: center; gap: .3rem; flex-wrap: wrap; }
.reject-form { display: inline-flex; gap: .3rem; align-items: center; }
.reject-form input { width: 140px; min-height: 34px; font-size: .8rem; }
@media (max-width: 420px) { .bc-num { font-size: 1.12rem; } .start-opt > span { min-height: 96px; padding: .8rem .4rem; } }

/* ═══ 3.5 — نصب روی گوشی ═══ */
.nav-install { width: 100%; border: 0; background: none; font: inherit; cursor: pointer; text-align: start; }
.inst-layer { position: fixed; inset: 0; z-index: 210; background: rgba(2,6,23,.55); display: flex; align-items: flex-end; justify-content: center; padding: 10px; padding-bottom: calc(10px + env(safe-area-inset-bottom)); animation: inst-fade .18s ease; }
.inst-card { width: min(460px, 100%); background: var(--surface); color: var(--text); border-radius: 22px; padding: 1.1rem 1.1rem 1rem; box-shadow: var(--shadow-lg); display: grid; gap: .9rem; max-height: calc(100vh - 20px); overflow: auto; animation: inst-up .22s ease; }
.inst-head { display: flex; gap: .8rem; align-items: center; }
.inst-head img { border-radius: 14px; box-shadow: var(--shadow); flex: none; }
.inst-head b { display: block; font-size: 1.1rem; }
.inst-head small { display: block; color: var(--text-2); font-size: .88rem; line-height: 1.7; margin-top: .15rem; }
.inst-body:empty { display: none; }
.inst-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: .55rem; counter-reset: st; }
.inst-steps li { display: flex; gap: .7rem; align-items: center; padding: .65rem .75rem; border-radius: 14px; background: var(--surface-2); font-size: .95rem; line-height: 1.7; }
.inst-ico { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; background: var(--primary-soft); color: var(--primary); flex: none; }
.inst-ico .i { width: 22px; height: 22px; }
.inst-note { margin: .5rem 0; color: var(--text-2); font-size: .9rem; line-height: 1.8; }
.inst-actions { display: flex; gap: .5rem; }
.inst-actions .btn-primary { flex: 1; }
@media (min-width: 961px) { .inst-layer { align-items: center; } }
@keyframes inst-up { from { transform: translateY(24px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes inst-fade { from { opacity: 0; } to { opacity: 1; } }

/* ---------- ۳.۶ صفحه‌های قانونی و پانویس ---------- */
.legal-page h2 { margin-top: 1.6rem; }
.legal-page ul, .legal-page ol { padding-inline-start: 1.3rem; display: grid; gap: .35rem; color: var(--text-2); }
.legal-page .table { font-size: .86rem; }
.legal-page .table td { vertical-align: top; }
.legal-seller { display: grid; gap: .35rem; margin: .6rem 0 1rem; padding: .8rem 1rem; border: 1px solid var(--border); border-radius: 12px; background: var(--surface-2); }
.legal-seller > div { display: flex; gap: .6rem; flex-wrap: wrap; }
.legal-seller dt { font-weight: 700; min-width: 9rem; }
.legal-seller dd { margin: 0; color: var(--text-2); }
.sf-brand { margin: 0 0 .3rem; }
.sf-muted { color: var(--text-2); }
.site-footer p { margin: .25rem 0; }
.sf-links { display: flex; gap: .4rem 1rem; flex-wrap: wrap; margin-top: .5rem; }
.sf-links a, .center-legal a { text-decoration: underline; text-underline-offset: 3px; }
.sf-seal img { display: block; }
.center-legal { display: flex; justify-content: center; gap: .4rem 1rem; flex-wrap: wrap; margin-top: .6rem; }
.consent-check { display: flex; align-items: flex-start; gap: .6rem; padding: .75rem .9rem; border: 1px solid var(--border); border-radius: 12px; background: var(--surface-2); cursor: pointer; line-height: 1.8; }
.consent-check input { width: 1.25rem; height: 1.25rem; margin-top: .3rem; flex: none; accent-color: var(--primary); }
.consent-check a { text-decoration: underline; text-underline-offset: 3px; }
.consent-wrap.has-error .consent-check { border-color: var(--danger, #b91c1c); }
.skip-link { position: absolute; inset-inline-start: .75rem; top: -60px; z-index: 1000; padding: .6rem 1rem; border-radius: 10px; background: #0e6b64; color: #fff; font-weight: 700; }
.skip-link:focus { top: .75rem; text-decoration: none; }
main[tabindex="-1"]:focus { outline: none; }
.phone-mock-fig { margin: 0; display: grid; gap: .5rem; justify-items: center; }
@media (max-width: 960px) { .phone-mock-fig { display: none; } }

/* ---------- ۳.۷ وضعیت خودرو: رنگ و ضربه ---------- */
.sw-f62cc2 { background: #ffffff; }
.sw-f326a7 { background: #f4f1e8; }
.sw-c4de6e { background: #111111; }
.sw-a15db5 { background: #c0c4c8; }
.sw-c8f96b { background: #8a8f96; }
.sw-f01120 { background: #4a4f55; }
.sw-687bf3 { background: #7d8a96; }
.sw-f71cb1 { background: #9a9590; }
.sw-79f832 { background: #2563eb; }
.sw-949358 { background: #1e2a4a; }
.sw-433044 { background: #c81e1e; }
.sw-13c6fb { background: #7a1f2b; }
.sw-2c1594 { background: #6b1022; }
.sw-bfd790 { background: #6b4423; }
.sw-ad4db9 { background: #d9c7a6; }
.sw-8b1c73 { background: #c9a227; }
.sw-7948ec { background: #2f7d32; }
.sw-179844 { background: #3f7f6e; }
.sw-8eadfd { background: #ea7317; }
.sw-3070d7 { background: #f3c613; }
.sw-32e682 { background: #6d3fa8; }
.color-chips { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: .5rem; }
.color-chip { display: inline-flex; align-items: center; gap: .4rem; min-height: 38px; padding: .3rem .7rem; border: 1px solid var(--border-strong); border-radius: 999px; background: var(--surface); color: var(--text); font: inherit; font-size: .86rem; cursor: pointer; }
.color-chip:hover { border-color: var(--primary); }
.color-chip.is-on { border-color: var(--primary); background: var(--primary-soft); font-weight: 700; }
.color-chip .sw { width: 16px; height: 16px; border-radius: 50%; border: 1px solid rgba(0,0,0,.25); flex: none; }
.damage-box { border: 1px dashed var(--border-strong); border-radius: 14px; padding: .8rem; background: var(--surface-2); }
.damage-group { border: 0; margin: .4rem 0 0; padding: 0; }
.damage-group legend { font-weight: 800; font-size: .9rem; margin-bottom: .4rem; }
.damage-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .4rem .8rem; }
.damage-row { display: flex; align-items: center; justify-content: space-between; gap: .5rem; padding: .25rem .5rem; border-radius: 10px; }
.damage-row label { font-size: .88rem; margin: 0; }
.damage-row select { width: auto; min-width: 9.5rem; min-height: 38px; padding-block: .2rem; }
.damage-row.is-bad { background: var(--warn-soft); }
.damage-row.is-bad label { font-weight: 700; }
@media (max-width: 640px) { .damage-grid { grid-template-columns: 1fr; } }
.seg-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }

/* ---------- ۳.۷ خرید و فروش خودرو، گزارش‌ها ---------- */
.tabs { display: flex; gap: .3rem; padding: .3rem; background: var(--surface-3); border-radius: 14px; margin: 1rem 0 .6rem; overflow-x: auto; }
.tab { flex: 1; min-width: max-content; text-align: center; padding: .55rem 1rem; border-radius: 11px; font-weight: 700; color: var(--text-2); text-decoration: none !important; }
.tab.is-active { background: var(--surface); color: var(--primary); box-shadow: var(--shadow-sm); }
.ok-text { color: var(--ok); font-weight: 700; font-size: .78rem; }
.span-3 { grid-column: 1 / -1; }
.field-inline { display: flex; align-items: center; gap: .5rem; }
.field-inline label { white-space: nowrap; font-weight: 700; font-size: .9rem; }
.field-inline select { min-width: 12rem; }
.partner-house { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: .6rem 1rem; padding: .7rem .9rem; border-radius: 12px; background: var(--primary-soft); }
.partner-house > span { display: inline-flex; align-items: center; gap: .4rem; font-weight: 700; }
.partner-house-pct { margin: 0; min-width: 12rem; }
.partner-list { display: grid; gap: .6rem; }
.partner-row { display: grid; grid-template-columns: 1.3fr 1fr 1fr .9fr auto; gap: .5rem; align-items: end; padding: .6rem; border: 1px solid var(--border); border-radius: 12px; }
.partner-row .field { margin: 0; }
.partner-del { align-self: center; color: var(--bad); }
@media (max-width: 760px) { .partner-row { grid-template-columns: 1fr 1fr; } .partner-del { justify-self: start; } }
.cost-list { list-style: none; margin: 0; padding: 0 1.1rem; }
.cost-list li { display: flex; align-items: center; justify-content: space-between; gap: .6rem; padding: .55rem 0; border-bottom: 1px solid var(--border); }
.cost-list li > span:first-child { flex: 1; display: grid; }
.cost-list small { color: var(--muted); }
.row-house td { background: var(--primary-soft); }
.damage-sum { border-top: 1px solid var(--border); font-size: .9rem; }
.sell-card > summary { cursor: pointer; list-style: none; }
.sell-card > summary::-webkit-details-marker { display: none; }
.mini-links { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .6rem; margin: .9rem 0; }
.mini-link { display: flex; align-items: center; gap: .6rem; padding: .75rem .9rem; border: 1px solid var(--border); border-radius: 14px; background: var(--surface); color: var(--text); text-decoration: none !important; box-shadow: var(--shadow-sm); }
.mini-link:hover { border-color: var(--primary); }
.mini-link > .i { color: var(--primary); flex: none; }
.mini-link span { display: grid; line-height: 1.5; }
.mini-link small { color: var(--muted); font-size: .8rem; }
@media (max-width: 760px) { .mini-links { grid-template-columns: 1fr; } }
.chart-scroll { overflow-x: auto; }
.pl-chart { min-width: 640px; width: 100%; height: auto; }
.pl-chart .axis { stroke: var(--border-strong); }
.pl-chart .bar-in { fill: var(--primary-2); }
.pl-chart .bar-out { fill: #c2410c; }
.pl-chart .bar-label { font-size: 12px; fill: var(--text-2); font-family: var(--font); }
.pl-chart .bar-val { font-size: 11px; fill: var(--text-2); font-weight: 700; font-family: var(--font); }
.pl-chart .bar-val.neg { fill: var(--bad); }
.legend { display: inline-flex; align-items: center; gap: .35rem; color: var(--text-2); }
.legend .lg { display: inline-block; width: 12px; height: 12px; border-radius: 3px; margin-inline-start: .5rem; }
.legend .lg-in { background: var(--primary-2); }
.legend .lg-out { background: #c2410c; }
:root[data-theme="dark"] .pl-chart .bar-out, :root[data-theme="dark"] .legend .lg-out { fill: #fb923c; background: #fb923c; }
@media (prefers-color-scheme: dark) { :root[data-theme="auto"] .pl-chart .bar-out { fill: #fb923c; } :root[data-theme="auto"] .legend .lg-out { background: #fb923c; } }
.pl-table th { font-weight: 500; }
.pl-table .pl-head th { background: var(--surface-2); font-weight: 800; color: var(--text); }
.pl-table .pl-sum th, .pl-table .pl-sum td { font-weight: 800; border-top: 1px solid var(--border-strong); }
.pl-table .pl-net th, .pl-table .pl-net td { font-weight: 900; font-size: 1.05rem; background: var(--ok-soft); color: var(--ok); }
.pl-table .pl-net.is-neg th, .pl-table .pl-net.is-neg td { background: var(--bad-soft); color: var(--bad); }
.pl-table td.num { text-align: end; white-space: nowrap; }
.acc-tree { list-style: none; margin: 0; padding: .4rem 0; }
.acc-row { display: grid; grid-template-columns: 4.2rem 1fr auto auto; align-items: center; gap: .6rem; padding: .5rem 1.1rem; border-bottom: 1px solid var(--border); }
.acc-row:last-child { border-bottom: 0; }
.acc-row.lvl-0 { background: var(--surface-2); font-weight: 800; }
.acc-row.lvl-1 .acc-code { padding-inline-start: .9rem; }
.acc-row.lvl-2 .acc-code { padding-inline-start: 1.8rem; }
.acc-row.lvl-2 .acc-name { padding-inline-start: 1rem; }
.acc-code { color: var(--muted); font-weight: 700; }
.acc-name { display: flex; flex-wrap: wrap; align-items: center; gap: .35rem .5rem; }
.acc-name small { font-weight: 400; }
.acc-edit { position: relative; }
.acc-edit > summary { list-style: none; cursor: pointer; }
.acc-edit > summary::-webkit-details-marker { display: none; }
.acc-edit-box { position: absolute; inset-inline-end: 0; top: 2.4rem; z-index: 20; display: grid; gap: .5rem; padding: .7rem; min-width: 18rem; background: var(--surface); border: 1px solid var(--border-strong); border-radius: 12px; box-shadow: var(--shadow-lg); }
.acc-add-btn { align-self: end; }
.entry-list li { gap: .4rem; }
@media (max-width: 640px) { .acc-row { grid-template-columns: 3.4rem 1fr auto; } .acc-kind { display: none; } }

/* ---------- ۳.۷ انتخاب با جستجو برای فهرست‌های بزرگ ---------- */
.ss-native { position: absolute !important; width: 1px !important; height: 1px !important; opacity: 0 !important; pointer-events: none !important; overflow: hidden; clip: rect(0 0 0 0); }
.ss-btn { display: flex; align-items: center; justify-content: space-between; gap: .5rem; width: 100%; min-height: 46px; padding: .55rem .85rem; border: 1.5px solid var(--border-strong); border-radius: 12px; background: var(--surface); color: var(--text); font: inherit; text-align: start; cursor: pointer; }
.ss-btn:hover { border-color: var(--primary); }
.ss-btn:focus-visible { outline: 3px solid var(--primary); outline-offset: 2px; }
.ss-btn[aria-invalid="true"] { border-color: var(--bad); }
.ss-btn.is-empty .ss-text { color: var(--muted); }
.ss-btn[disabled] { opacity: .6; cursor: not-allowed; }
.ss-text { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ss-ico { color: var(--muted); flex: none; }
.inline-form .ss-btn, .toolbar .ss-btn, .field-inline .ss-btn { width: auto; min-width: 12rem; min-height: 38px; }
.ss-panel { position: fixed; z-index: 1200; display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--border-strong); border-radius: 14px; box-shadow: var(--shadow-lg); overflow: hidden; }
.ss-head { display: none; align-items: center; justify-content: space-between; padding: .7rem .9rem .2rem; }
.ss-search { padding: .6rem .6rem .3rem; }
.ss-input { width: 100%; min-height: 44px; }
.ss-count { margin: 0; padding: 0 .9rem .3rem; }
.ss-list { list-style: none; margin: 0; padding: .2rem .35rem .5rem; overflow-y: auto; flex: 1; overscroll-behavior: contain; }
.ss-group { position: sticky; top: 0; z-index: 1; padding: .45rem .6rem .25rem; font-size: .78rem; font-weight: 800; color: var(--muted); background: var(--surface); }
.ss-opt { padding: .6rem .7rem; border-radius: 10px; cursor: pointer; line-height: 1.5; }
.ss-opt:hover { background: var(--surface-3); }
.ss-opt.is-active { background: var(--primary-soft); outline: 2px solid var(--primary); outline-offset: -2px; }
.ss-opt[aria-selected="true"] { font-weight: 800; color: var(--primary); }
.ss-opt[aria-selected="true"]::after { content: " ✓"; }
.ss-opt.ss-none { color: var(--muted); }
.ss-panel.is-sheet { inset: auto 0 0 0; max-height: 78vh; border-radius: 20px 20px 0 0; border-bottom: 0; padding-bottom: env(safe-area-inset-bottom); }
.ss-panel.is-sheet .ss-head { display: flex; }
.ss-panel.is-sheet .ss-opt { padding: .8rem .8rem; font-size: 1rem; }
@media (max-width: 640px) { body.ss-on::after { content: ""; position: fixed; inset: 0; z-index: 1100; background: rgba(15, 23, 42, .45); } }
.neg-num { unicode-bidi: isolate; white-space: nowrap; }
.row-house td { background: none; }
.row-house td:first-child b { color: var(--primary); }
.tip-box { display: flex; gap: .55rem; align-items: flex-start; padding: .7rem .9rem; border-radius: 12px; background: var(--info-soft); color: var(--text); font-size: .88rem; line-height: 1.8; }
.tip-box > .i { color: var(--info); flex: none; margin-top: .25rem; }
.tip-box p { margin: 0 0 .3rem; }
.tip-box p:last-child { margin-bottom: 0; }
.tip-box.tip-warn { background: var(--warn-soft); }
.tip-box.tip-warn > .i { color: var(--warn); }
.help-card .tip-box { margin-top: .8rem; }

/* ─── ۳.۸: قیمت و موجودی، پارت‌ها ─── */
.price-stock { border: 1px solid var(--border); border-radius: 14px; padding: .9rem; margin: 1rem 0 0; display: grid; gap: .8rem; }
.price-stock legend { display: inline-flex; align-items: center; gap: .35rem; padding: 0 .4rem; font-weight: 700; }
.lot-list { list-style: none; margin: .3rem 0 0; padding: 0; display: grid; gap: .35rem; }
.lot-list li { display: flex; flex-wrap: wrap; gap: .3rem .9rem; align-items: baseline; padding: .5rem .7rem; border: 1px solid var(--border); border-radius: 10px; background: var(--surface-2); }
.lot-list li.is-next { border-color: var(--primary); }
.cat-chips { margin-top: .4rem; }
.search-note { flex-basis: 100%; margin: .2rem 0 0; }
.fit-box { display: flex; flex-wrap: wrap; gap: .4rem; padding: .7rem .9rem; margin: 0 .9rem .6rem; border-radius: 12px; border: 1px dashed var(--primary); background: var(--surface-2); }
.fit-title { flex-basis: 100%; margin: 0; font-weight: 700; font-size: .9rem; }
.fit-box .qchip:disabled { opacity: .55; cursor: not-allowed; }
.tot-vat { margin: .2rem 0 .4rem; font-size: .9rem; }
.tot-profit { margin-top: .7rem; padding-top: .6rem; border-top: 1px dashed var(--border-strong); }
.tot-profit .tot-row b { color: var(--ok); }
.tot-profit .tot-row b.neg-num { color: var(--bad, #b42318); }
.inst-list { list-style: none; margin: 0; padding: 0; display: grid; gap: .5rem; }
.inst-list li { display: grid; grid-template-columns: 1fr auto; gap: .4rem .8rem; align-items: center; padding: .7rem .8rem; border: 1px solid var(--border); border-radius: 12px; }
.inst-list li.inst-paid { background: var(--ok-soft); border-color: transparent; }
.inst-list li.is-late, .inst-list li.inst-bounced { border-color: var(--bad); }
.inst-main { display: grid; gap: .15rem; }
.inst-acts { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: .4rem; align-items: center; }
.inst-add { border-top: 1px dashed var(--border-strong); padding-top: .8rem; }
.print-gray .sheet { filter: grayscale(1); }
.print-toolbar [aria-pressed="true"] { background: var(--text); color: var(--surface); }
.spec-box { border: 1px solid var(--border); border-radius: 14px; padding: .8rem .9rem; margin: 0; }
.spec-box legend { padding: 0 .4rem; font-weight: 700; font-size: .92rem; }
.spec-list { display: flex; flex-wrap: wrap; gap: .35rem; margin: .3rem 0 0; padding: 0; list-style: none; }
.spec-list li { padding: .25rem .6rem; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--border); font-size: .85rem; }
.spec-list li.is-bad { border-color: var(--warn, #b45309); }
.rate-chips .chip.is-active { background: var(--primary); border-color: var(--primary); color: var(--primary-ink); }
[data-comm-block] { padding: .8rem; border-radius: 14px; background: var(--surface-2); border: 1px solid var(--border); }
.file-list { list-style: none; margin: 0; padding: 0; display: grid; gap: .4rem; }
.file-list li { display: flex; align-items: center; gap: .5rem; padding: .55rem .7rem; border: 1px solid var(--border); border-radius: 12px; }
.file-list li > a { flex: 1; display: flex; align-items: center; gap: .6rem; color: inherit; text-decoration: none; min-width: 0; }
.file-list li > a span { display: grid; min-width: 0; }
.file-list li small { color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-up { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; }
.file-up input[type=file] { flex: 1 1 200px; min-width: 0; }
.parties { gap: 1rem; }
.party-card.is-payer { border-color: var(--primary); }
.sheet h1 small { display: block; font-size: 12px; font-weight: 500; color: #444; margin-top: 2px; }
.parties-t th small { font-weight: 400; }
.inv-profit { color: var(--ok); }
.seg.seg-col { display: grid; grid-template-columns: 1fr; }
.seg.seg-col label span { justify-content: flex-start; text-align: start; }
