@font-face{font-family:"IRANSansXV";src:url("./fonts/IRANSansXV.woff2") format("woff2");font-weight:100 900;font-display:swap;}
/* ═══════════════════════════════════════════════════════════
   واسط نوتک — سیستم طراحی مشترک سایت و پنل (نسخه ۳)
   هویت بصری: نوتک — سبز کله‌غازی، جوهری تیره، سطوح روشن و خطوط مویی
   ═══════════════════════════════════════════════════════════ */






:root {
  /* رنگ‌های رسمی هویت بصری نوتک */
  --brand: #364f6b;        /* سرمه‌ای اصلی */
  --brand-ink: #2b415a;
  --brand-deep: #253649;   /* سرمه‌ای تیره */
  --brand-mid: #47688d;    /* آبی سرمه‌ای */
  --brand-soft: #e8edf3;
  --brand-tint: #f3f6f9;
  --brand-line: #c8d4e1;
  --accent: #c99383;       /* مسی */
  --accent-ink: #9a5b45;
  --accent-rose: #d8b2a7;  /* رز */
  --accent-soft: #f6ece8;
  /* جوهر و سطح */
  --ink: #1d2b39;
  --ink-2: #4b5c6c;
  --ink-3: #7d8a98;
  --paper: #f8f7f4;
  --surface: #ffffff;
  --line: #e6e2dc;
  --line-2: #f0ede9;
  --night: #1b2836;
  --field: radial-gradient(62% 74% at 88% -10%, rgba(201, 147, 131, .30), transparent 58%),
           radial-gradient(58% 66% at 2% 104%, rgba(120, 158, 205, .22), transparent 62%),
           linear-gradient(168deg, #3a5372 0%, #2b3f58 46%, #253649 100%);
  /* وضعیت‌ها */
  --ok: #1f7a55;    --ok-soft: #e7f3ec;
  --warn: #9a6205;  --warn-soft: #fcf3e1;
  --err: #b4382c;   --err-soft: #fbece9;
  --violet: #6a48b8; --violet-soft: #f1ecfb;
  --muted-soft: #f2f0ec;
  /* اندازه‌ها */
  --r-xs: 8px; --r-sm: 11px; --r-md: 14px; --r-lg: 20px; --r-xl: 28px;
  --e1: 0 1px 2px rgba(37, 54, 73, .045), 0 4px 12px -6px rgba(37, 54, 73, .10);
  --e2: 0 1px 2px rgba(37, 54, 73, .05), 0 12px 32px -14px rgba(37, 54, 73, .22);
  --e3: 0 2px 4px rgba(37, 54, 73, .06), 0 28px 60px -24px rgba(37, 54, 73, .30);
  --f-ui: "IRANSansXV", Tahoma, sans-serif;
  --f-code: "IRANSansXV", Tahoma, sans-serif;
  --sidebar: 264px;
  --workspace-gutter: 24px;
  --workspace-bottom: 40px;
  --ease: cubic-bezier(.22, .61, .36, 1);
  --focus: 0 0 0 3px rgba(54, 79, 107, .22);
}

*, *::before, *::after { box-sizing: border-box; }
html { font-size: 15px; -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font-family: var(--f-ui); line-height: 1.8; text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}
img, svg { max-width: 100%; }
a { color: var(--brand); text-decoration: none; transition: color .15s; }
a:hover { color: var(--brand-ink); }
:focus-visible { outline: none; box-shadow: var(--focus); border-radius: 6px; }
::selection { background: var(--brand-soft); color: var(--brand-deep); }
h1, h2, h3 { margin: 0; line-height: 1.45; color: var(--ink); letter-spacing: -.005em; }
h1 { font-size: 1.6rem; font-weight: 800; }
h2 { font-size: 1.13rem; font-weight: 700; }
h3 { font-size: 1rem; font-weight: 700; }
p { margin: 0 0 10px; }
ul, ol { margin: 0 0 10px; padding-inline-start: 20px; }
hr { border: 0; border-top: 1px solid var(--line); margin: 20px 0; }
.muted { color: var(--ink-2); }
.small { font-size: .86rem; }
.ltr, .mono { direction: ltr; unicode-bidi: isolate; font-family: var(--f-code); letter-spacing: .01em; font-variant-numeric: tabular-nums; }
.num { font-variant-numeric: tabular-nums; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; inset-inline-start: 12px; top: -60px; z-index: 100; background: var(--brand); color: #fff; padding: 8px 14px; border-radius: var(--r-xs); }
.skip:focus { top: 12px; color: #fff; }

/* ───────────── دکمه‌ها ───────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 40px; padding: 0 16px; border-radius: var(--r-sm);
  border: 1px solid var(--line); background: var(--surface); color: var(--ink);
  font: inherit; font-size: .93rem; font-weight: 600; line-height: 1; cursor: pointer; white-space: nowrap;
  transition: background-color .18s var(--ease), border-color .18s var(--ease), color .18s, box-shadow .18s, transform .1s;
}
.btn:hover { border-color: #c9d3d8; background: var(--paper); color: var(--ink); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .55; cursor: progress; }
.btn svg { width: 18px; height: 18px; flex: none; }
.btn.primary { background: var(--brand); border-color: var(--brand); color: #fff; box-shadow: 0 1px 0 rgba(255,255,255,.12) inset, 0 6px 16px -8px rgba(54, 79, 107, .55); }
.btn.primary:hover { background: var(--brand-ink); border-color: var(--brand-ink); color: #fff; }
.btn.danger { color: var(--err); border-color: #f0cdc9; }
.btn.danger:hover { background: var(--err-soft); border-color: var(--err); color: var(--err); }
.btn.ghost { border-color: transparent; background: transparent; color: var(--ink-2); box-shadow: none; }
.btn.ghost:hover { background: var(--muted-soft); color: var(--ink); }
.btn.light { background: #fff; border-color: #fff; color: var(--brand-deep); }
.btn.light:hover { background: var(--brand-soft); border-color: var(--brand-soft); color: var(--brand-deep); }
.btn.on-dark { background: transparent; border-color: rgba(255,255,255,.28); color: #fff; }
.btn.on-dark:hover { background: rgba(255,255,255,.08); color: #fff; }
.btn.small { min-height: 34px; padding: 0 12px; font-size: .86rem; border-radius: 10px; }
.btn.large { min-height: 50px; padding: 0 22px; font-size: 1rem; border-radius: 13px; }
.btn.full { width: 100%; }
.btn .arrow { transition: transform .2s var(--ease); }
.btn:hover .arrow { transform: translateX(-3px); }
.text-button { background: none; border: 0; padding: 4px 6px; font: inherit; color: var(--brand); cursor: pointer; font-weight: 600; }
.text-button:hover { color: var(--brand-ink); text-decoration: underline; text-underline-offset: 4px; }
form.inline { display: inline; margin: 0; }

/* ───────────── فرم ───────────── */
input, select, textarea {
  width: 100%; font: inherit; color: var(--ink); background: var(--surface);
  border: 1px solid #d6dee2; border-radius: var(--r-sm); padding: 8px 12px; min-height: 42px;
  transition: border-color .15s, box-shadow .15s, background-color .15s;
}
select { padding-inline-end: 34px; appearance: none; -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23536873' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-size: 16px; background-position: left 12px center; }
select[multiple] { background-image: none; padding-inline-end: 12px; }
textarea { min-height: 80px; resize: vertical; line-height: 1.7; }
input::placeholder, textarea::placeholder { color: #a3b1b8; }
input:hover, select:hover, textarea:hover { border-color: #b9c6cc; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--brand); box-shadow: var(--focus); }
input[readonly], input:disabled, select:disabled, textarea:disabled { background: var(--paper); color: var(--ink-2); }
input[type=checkbox], input[type=radio] { width: 18px; height: 18px; min-height: 0; padding: 0; accent-color: var(--brand); flex: none; margin: 0; }
input[type=file] { padding: 6px; background: var(--paper); cursor: pointer; border-style: dashed; }
input[type=file]::file-selector-button {
  font: inherit; font-size: .85rem; font-weight: 600; border: 1px solid var(--line); background: var(--surface);
  color: var(--ink); border-radius: 8px; padding: 5px 14px; margin-inline-end: 10px; cursor: pointer;
}
label { color: var(--ink-2); }
label.f, .f { display: flex; flex-direction: column; gap: 6px; font-size: .9rem; color: var(--ink-2); min-width: 0; }
label.f > span:first-child, .f > span:first-child { font-weight: 600; color: var(--ink); }
.f b, label b { color: var(--err); font-weight: 700; }
.hint, .form-hint { font-size: .82rem; color: var(--ink-3); line-height: 1.65; }
.form-stack { display: grid; gap: 16px; }
.form-stack > label { display: flex; flex-direction: column; gap: 6px; font-weight: 600; color: var(--ink); font-size: .92rem; }
.form-stack > label small { font-weight: 400; color: var(--ink-3); }
.grid { display: grid; gap: 16px 20px; grid-template-columns: repeat(auto-fit, minmax(min(230px, 100%), 1fr)); }
.grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; }
.grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.span-2 { grid-column: span 2; }
.span-all { grid-column: 1 / -1; }
.radio-row { display: flex; flex-wrap: wrap; gap: 8px; }
.radio-row label {
  display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border: 1px solid var(--line);
  border-radius: var(--r-sm); background: var(--surface); color: var(--ink); cursor: pointer; font-size: .9rem;
  transition: border-color .15s, background-color .15s;
}
.radio-row label:hover { border-color: #c4d0d5; }
.radio-row label:has(input:checked) { border-color: var(--brand); background: var(--brand-tint); color: var(--brand-deep); font-weight: 600; }
.check-row { display: flex; align-items: flex-start; gap: 10px; color: var(--ink); cursor: pointer; }
.check-row input { margin-top: 6px; }
.field-row { display: flex; gap: 8px; }
.field-row > :first-child { flex: 1; min-width: 0; }

/* ───────────── اعلان‌ها ───────────── */
.box, .notice, .flash {
  position: relative; border: 1px solid var(--brand-line); background: var(--brand-tint);
  color: var(--ink); border-radius: var(--r-md); padding: 13px 18px; padding-inline-start: 42px; font-size: .93rem;
}
.box::before, .notice::before, .flash::before {
  content: ""; position: absolute; inset-inline-start: 18px; top: 21px; width: 8px; height: 8px; border-radius: 50%;
  background: var(--brand); box-shadow: 0 0 0 4px rgba(54, 79, 107, .14);
}
.box ul, .flash ul { margin: 6px 0 0; }
.box p:last-child { margin-bottom: 0; }
.box.ok, .notice.ok, .flash.ok { background: var(--ok-soft); border-color: #c4e3d1; }
.box.ok::before, .notice.ok::before, .flash.ok::before { background: var(--ok); box-shadow: 0 0 0 4px rgba(21, 122, 76, .14); }
.box.warn, .notice.warn, .flash.warn { background: var(--warn-soft); border-color: #f1dcae; }
.box.warn::before, .notice.warn::before, .flash.warn::before { background: var(--warn); box-shadow: 0 0 0 4px rgba(154, 98, 5, .14); }
.box.error, .notice.error, .flash.error { background: var(--err-soft); border-color: #f2cbc6; }
.box.error::before, .notice.error::before, .flash.error::before { background: var(--err); box-shadow: 0 0 0 4px rgba(180, 47, 36, .14); }
.flashes, .notices { display: grid; gap: 8px; margin-bottom: 20px; }
.stack-gap { margin-bottom: 16px; }
.toast {
  position: fixed; bottom: 24px; inset-inline-start: 50%; transform: translateX(50%); z-index: 90;
  background: var(--ink); color: #fff; padding: 12px 20px; border-radius: var(--r-md); font-size: .93rem;
  box-shadow: var(--e3); max-width: min(560px, calc(100vw - 32px));
}

/* ───────────── برچسب وضعیت ───────────── */
.pill, .status {
  --c: var(--ink-2); --s: var(--muted-soft);
  display: inline-flex; align-items: center; gap: 7px; white-space: nowrap; vertical-align: middle;
  padding: 2px 11px 2px 12px; border-radius: 999px; font-size: .79rem; font-weight: 600; line-height: 1.85;
  color: var(--c); background: var(--s);
}
.pill::before, .status::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; flex: none; }
.pill.success, .status.success, .pill.ok { --c: var(--ok); --s: var(--ok-soft); }
.pill.pending, .status.pending { --c: var(--warn); --s: var(--warn-soft); }
.pill.failed, .status.failed, .status.error { --c: var(--err); --s: var(--err-soft); }
.pill.unknown, .status.unknown, .pill.external, .status.external { --c: var(--violet); --s: var(--violet-soft); }
.pill.draft, .status.draft, .pill.cancelled, .status.cancelled { --c: #5f6f78; --s: var(--muted-soft); }
.pill.cancelled { text-decoration: line-through; text-decoration-thickness: 1px; }
.pill.ins { --c: var(--brand-ink); --s: var(--brand-soft); }
.pill.ins::before { display: none; }
@media (prefers-reduced-motion: no-preference) {
  .pill.pending::before { animation: pulse 1.6s ease-in-out infinite; }
  @keyframes pulse { 50% { opacity: .35; } }
}

/* ───────────── نشان برند ───────────── */
.brand-mark { width: 40px; height: 40px; flex: none; display: block; border-radius: 11px; }
.brand-words { display: flex; flex-direction: column; line-height: 1.3; }
.brand-words b { font-size: 1.08rem; font-weight: 800; color: var(--ink); }
.brand-words small { font-size: .74rem; color: var(--ink-3); font-weight: 500; }

/* ───────────── پوستهٔ پنل ───────────── */
.app { display: grid; grid-template-columns: var(--sidebar) minmax(0, 1fr); min-height: 100vh; background: var(--paper); }
.sidebar {
  position: sticky; top: 0; height: 100vh; overflow-y: auto; background: var(--surface); color: var(--ink-2);
  display: flex; flex-direction: column; padding: 18px 14px 14px; z-index: 40;
  border-inline-end: 1px solid var(--line); scrollbar-width: thin; scrollbar-color: #d9e1e5 transparent;
}
.side-brand { display: flex; align-items: center; gap: 11px; padding: 4px 8px 20px; margin-bottom: 4px; border-bottom: 1px solid var(--line-2); color: var(--ink); }
.side-brand:hover { color: var(--ink); }
.side-group { margin-top: 14px; }
.side-group > span { display: block; padding: 0 10px 6px; font-size: .74rem; color: var(--ink-3); font-weight: 600; }
.side-nav a {
  display: flex; align-items: center; gap: 11px; padding: 8px 11px; border-radius: 10px; color: var(--ink-2);
  font-size: .92rem; font-weight: 500; position: relative; transition: background-color .15s, color .15s;
}
.side-nav a svg { width: 19px; height: 19px; flex: none; opacity: .7; }
.side-nav a:hover { background: var(--paper); color: var(--ink); }
.side-nav a.on { background: var(--brand-tint); color: var(--brand-deep); font-weight: 650; }
.side-nav a.on svg { opacity: 1; color: var(--brand); }
.side-nav a.on::before { content: ""; position: absolute; inset-inline-start: -14px; top: 9px; bottom: 9px; width: 3px; border-radius: 0 3px 3px 0; background: var(--brand); }
.side-foot { margin-top: auto; padding-top: 14px; border-top: 1px solid var(--line-2); display: grid; gap: 10px; }
.side-account { display: flex; align-items: center; gap: 10px; padding: 6px; min-width: 0; border-radius: 12px; background: var(--paper); }
.avatar {
  width: 36px; height: 36px; border-radius: 11px; flex: none; display: grid; place-items: center;
  background: var(--brand); color: #fff; font-weight: 700; font-size: .95rem;
}
.side-account div { display: flex; flex-direction: column; min-width: 0; line-height: 1.45; }
.side-account b { color: var(--ink); font-size: .88rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.side-account small { color: var(--ink-3); font-size: .76rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.side-logout { display: flex; }
.side-logout button {
  flex: 1; display: flex; align-items: center; gap: 10px; background: none; border: 0; color: var(--ink-3);
  border-radius: 10px; padding: 7px 11px; font: inherit; font-size: .86rem; cursor: pointer; transition: background-color .15s, color .15s;
}
.side-logout button:hover { background: var(--err-soft); color: var(--err); }
.side-logout svg { width: 17px; height: 17px; }

.main { min-width: 0; display: flex; flex-direction: column; }
.topbar {
  position: sticky; top: 0; z-index: 30; display: flex; align-items: center; gap: 14px;
  min-height: 64px; padding: 10px var(--workspace-gutter); background: rgba(247, 249, 250, .86);
  backdrop-filter: saturate(1.6) blur(12px); -webkit-backdrop-filter: saturate(1.6) blur(12px);
  border-bottom: 1px solid var(--line);
}
.topbar .crumb { font-size: .88rem; color: var(--ink-3); display: flex; align-items: center; gap: 8px; min-width: 0; }
.topbar .crumb b { color: var(--ink); font-weight: 650; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.topbar-actions { margin-inline-start: auto; display: flex; align-items: center; gap: 10px; }
.menu-toggle { display: none; }
.company-switch { display: flex; align-items: center; gap: 10px; }
.company-switch label { font-size: .8rem; color: var(--ink-3); white-space: nowrap; }
.company-switch select { min-width: 220px; max-width: 300px; min-height: 38px; font-weight: 600; background-color: var(--surface); }
.env-flag svg { width: 18px; height: 18px; flex: none; }
.env-flag {
  display: flex; align-items: center; gap: 10px; justify-content: center; padding: 8px var(--workspace-gutter); font-size: .87rem;
  background: var(--warn-soft); color: #74490a; border-bottom: 1px solid #f1dcae;
}
.page { width: 100%; min-width: 0; max-width: none; flex: 1; padding: 24px var(--workspace-gutter) var(--workspace-bottom); }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px 24px; flex-wrap: wrap; margin-bottom: 24px; }
.page-head h1 { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; font-size: 1.55rem; }
.page-head p { margin: 4px 0 0; color: var(--ink-2); max-width: 70ch; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.scrim { display: none; }

/* ───────────── کارت و جدول ───────────── */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 24px; margin-bottom: 18px; box-shadow: var(--e1); }
.card > h2, .card-title { margin-bottom: 16px; }
.card.flush { padding: 0; overflow: hidden; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 16px 22px; border-bottom: 1px solid var(--line-2); }
.card-head h2 { margin: 0; font-size: 1.04rem; }
.card-head p { margin: 2px 0 0; }
.card-head a { font-size: .87rem; font-weight: 600; }
.card-foot { padding: 16px 22px; border-top: 1px solid var(--line-2); background: #fbfcfc; }
.section-title { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.section-title h2 { font-size: 1.05rem; }
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
table.t, .data-table { width: 100%; border-collapse: collapse; font-size: .91rem; }
table.t th, .data-table th {
  text-align: start; font-weight: 600; color: var(--ink-3); font-size: .8rem; padding: 12px 18px;
  background: #fafbfc; border-bottom: 1px solid var(--line); white-space: nowrap;
}
table.t td, .data-table td { padding: 13px 18px; border-bottom: 1px solid var(--line-2); vertical-align: middle; }
table.t tbody tr:last-child td, .data-table tbody tr:last-child td { border-bottom: 0; }
table.t .n, .data-table .n { text-align: end; font-variant-numeric: tabular-nums; white-space: nowrap; }
table.t td a, .data-table td a { font-weight: 600; }
table.clickable tbody tr[data-href] { cursor: pointer; }
table.clickable tbody tr[data-href]:hover td, .data-table tbody tr:hover td { background: var(--brand-tint); }
.empty-cell { text-align: center; color: var(--ink-3); padding: 36px 16px !important; }
.cell-sub { display: block; font-size: .78rem; color: var(--ink-3); }

.empty { text-align: center; padding: 56px 24px; }
.empty .empty-icon { width: 56px; height: 56px; margin: 0 auto 16px; display: grid; place-items: center; border-radius: 16px; background: var(--brand-soft); color: var(--brand); }
.empty .empty-icon svg { width: 26px; height: 26px; }
.empty h2 { margin-bottom: 6px; }
.empty p { color: var(--ink-2); max-width: 52ch; margin: 0 auto 20px; }

.tabs { display: flex; gap: 4px; flex-wrap: wrap; padding: 4px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; }
.tabs a { padding: 6px 14px; border-radius: 9px; color: var(--ink-2); font-size: .87rem; font-weight: 600; white-space: nowrap; }
.tabs a:hover { color: var(--ink); background: var(--paper); }
.tabs a.on { background: var(--brand-soft); color: var(--brand-deep); }
.toolbar { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.search { display: flex; gap: 6px; }
.search input { width: 290px; }

dl.kv { display: grid; grid-template-columns: max-content 1fr; gap: 10px 24px; margin: 0; font-size: .93rem; }
dl.kv dt { color: var(--ink-3); }
dl.kv dd { margin: 0; color: var(--ink); font-weight: 500; min-width: 0; overflow-wrap: anywhere; }

.totals { display: grid; grid-template-columns: 1fr auto; gap: 8px 24px; font-size: .95rem; }
.totals > div:nth-child(even) { text-align: end; font-variant-numeric: tabular-nums; }
.totals .grand { font-weight: 800; font-size: 1.12rem; padding-top: 12px; border-top: 1px dashed var(--line); color: var(--ink); }

.sticky-actions {
  position: sticky; bottom: 0; z-index: 15; display: flex; justify-content: flex-end; gap: 8px; flex-wrap: wrap;
  margin: 8px calc(-1 * var(--workspace-gutter)) calc(-1 * var(--workspace-bottom)); padding: 14px var(--workspace-gutter); background: rgba(255,255,255,.92); backdrop-filter: blur(10px);
  border-top: 1px solid var(--line);
}
.sticky-actions .spacer { margin-inline-end: auto; }

ul.steps { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; }
ul.steps li { padding: 9px 14px; border-radius: var(--r-xs); background: var(--paper); border-inline-start: 3px solid var(--line); font-size: .92rem; }
ul.steps li.ok { background: var(--ok-soft); border-color: var(--ok); }
ul.steps li.warn { background: var(--warn-soft); border-color: var(--warn); }
ul.steps li.error { background: var(--err-soft); border-color: var(--err); }

/* جدول اقلام صورتحساب */
table.lines { width: 100%; border-collapse: separate; border-spacing: 0; font-size: .9rem; min-width: 980px; }
table.lines th { text-align: start; font-size: .79rem; font-weight: 600; color: var(--ink-3); padding: 9px 6px; border-bottom: 1px solid var(--line); white-space: nowrap; }
table.lines td { padding: 8px 6px; border-bottom: 1px solid var(--line-2); vertical-align: top; }
table.lines td.calc { color: var(--ink-2); font-variant-numeric: tabular-nums; padding-top: 17px; white-space: nowrap; text-align: end; }
table.lines td:first-child.calc { text-align: center; color: var(--ink-3); }
table.lines input, table.lines select { min-height: 38px; padding: 6px 9px; font-size: .9rem; }
table.lines select { padding-inline-end: 28px; background-position: left 8px center; }
table.lines .w-prod { min-width: 210px; }
table.lines .w-md { min-width: 112px; }
table.lines .w-sm { min-width: 76px; }
table.lines .w-xs { min-width: 64px; }
table.lines td.w-md select { min-width: 112px; }
table.lines th.n { text-align: end; }
table.lines tr.more-row td { background: var(--brand-tint); border-bottom: 1px solid var(--line); padding: 12px 8px; }
table.lines .btn.on { background: var(--brand-soft); border-color: var(--brand); color: var(--brand-deep); }
table.lines td [data-c=other] { min-width: 44px; }
.more-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 2fr 1fr 1fr; gap: 10px 12px; max-width: 980px; }
.more-grid .f > span:first-child { font-size: .8rem; font-weight: 600; }

details.card summary { cursor: pointer; font-weight: 650; }
pre.json { direction: ltr; text-align: left; background: var(--night); color: #dfe7f0; padding: 16px; border-radius: var(--r-sm); overflow: auto; font-size: .8rem; max-height: 420px; margin: 14px 0 0; }
.tag { display: inline-block; padding: 0 9px; border-radius: 6px; font-size: .77rem; font-weight: 600; background: var(--brand-soft); color: var(--brand-deep); vertical-align: middle; }
.beta-note { display: flex; gap: 10px; align-items: flex-start; }
#errbox, #msg { margin-bottom: 16px; }

/* الگوهای صورتحساب */
.pattern-picker { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.pattern-option { position: relative; display: flex; flex-direction: column; gap: 2px; padding: 14px 16px; padding-inline-start: 46px; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--surface); cursor: pointer; color: var(--ink); transition: border-color .15s, background-color .15s, box-shadow .15s; }
.pattern-option input { position: absolute; inset-inline-start: 17px; top: 18px; }
.pattern-option b { color: var(--ink); font-weight: 700; }
.pattern-option small { color: var(--ink-3); font-size: .8rem; line-height: 1.55; }
.pattern-option:hover { border-color: #c4d0d5; }
.pattern-option:has(input:checked) { border-color: var(--brand); background: var(--brand-tint); box-shadow: inset 0 0 0 1px var(--brand); }
.pattern-option:has(input:checked) b { color: var(--brand-deep); }

/* تقویم شمسی */
.jdp { position: absolute; z-index: 80; width: 286px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); padding: 12px; box-shadow: var(--e3); }
.jdp-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; font-weight: 700; }
.jdp-head button { width: 32px; height: 32px; border: 1px solid var(--line); background: var(--surface); border-radius: 9px; cursor: pointer; font-size: 1.1rem; color: var(--ink-2); }
.jdp-head button:hover { background: var(--paper); }
.jdp-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; text-align: center; }
.jdp-grid span { font-size: .75rem; color: var(--ink-3); padding: 4px 0; }
.jdp-grid button { height: 34px; border: 0; background: none; border-radius: 9px; cursor: pointer; font: inherit; font-size: .88rem; color: var(--ink); }
.jdp-grid button:hover { background: var(--brand-soft); }
.jdp-grid button.today { box-shadow: inset 0 0 0 1px var(--brand); }
.jdp-grid button.sel { background: var(--brand); color: #fff; }

/* ───────────── پیشخوان ───────────── */
.greeting { display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; flex-wrap: wrap; margin-bottom: 26px; }
.greeting .eyebrow { margin-bottom: 6px; }
.greeting h1 { font-size: 1.85rem; font-weight: 800; line-height: 1.45; }
.greeting p { color: var(--ink-2); margin: 4px 0 0; }
.ledger { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-bottom: 20px; }
.ledger > a, .ledger > div {
  display: flex; flex-direction: column; gap: 10px; padding: 18px 20px; color: inherit; min-width: 0;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--e1);
  transition: border-color .18s var(--ease), box-shadow .18s var(--ease), transform .18s var(--ease);
}
.ledger > a:hover { border-color: var(--brand-line); box-shadow: var(--e2); transform: translateY(-2px); color: inherit; }
.ledger .figure { font-size: 2.1rem; font-weight: 800; line-height: 1.1; font-variant-numeric: tabular-nums; color: var(--ink); }
.ledger small { color: var(--ink-3); font-size: .8rem; }
.ledger .pill { align-self: flex-start; }
.ledger .needs { border-color: #f2cbc6; background: linear-gradient(180deg, var(--err-soft), #fff 70%); }
.ledger .needs .figure { color: var(--err); }
.dash-grid { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 18px; align-items: start; }
.dash-grid aside { display: grid; gap: 18px; }
.dash-grid aside .card { margin-bottom: 0; }
.setup-list { display: grid; padding: 6px 0; }
.setup-list a { display: flex; align-items: center; gap: 13px; padding: 11px 22px; color: inherit; position: relative; }
.setup-list a:hover { background: var(--brand-tint); color: inherit; }
.setup-list a:not(:last-child)::after { content: ""; position: absolute; inset-inline-start: 37px; top: 45px; bottom: -11px; width: 1.5px; background: var(--line); }
.setup-list .step-no { position: relative; z-index: 1; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; flex: none; font-weight: 700; font-size: .86rem; border: 1.5px solid #cbd6db; background: var(--surface); color: var(--ink-3); }
.setup-list .step-no svg { width: 16px; height: 16px; }
.setup-list .step-no.done { border-color: var(--brand); background: var(--brand); color: #fff; }
.setup-list div { display: flex; flex-direction: column; line-height: 1.5; flex: 1; min-width: 0; }
.setup-list b { font-size: .92rem; }
.setup-list small { color: var(--ink-3); font-size: .8rem; }
.quick { display: grid; gap: 10px; }
.quick a { display: flex; align-items: center; gap: 13px; padding: 13px 15px; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--surface); color: var(--ink); transition: border-color .15s, background-color .15s; }
.quick a:hover { border-color: var(--brand-line); background: var(--brand-tint); color: var(--ink); }
.quick .q-icon { width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center; background: var(--brand-soft); color: var(--brand); flex: none; }
.quick .q-icon svg { width: 19px; height: 19px; }
.quick div { display: flex; flex-direction: column; line-height: 1.5; }
.quick b { font-size: .92rem; }
.quick small { color: var(--ink-3); font-size: .8rem; }
.activation { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-bottom: 20px; }
.activation > div { flex: 1; min-width: 240px; }

/* تنظیمات و ابزارها */
.team-list { display: grid; border: 1px solid var(--line); border-radius: var(--r-md); overflow: hidden; margin-bottom: 18px; }
.team-row { display: flex; align-items: center; gap: 12px; padding: 13px 16px; border-bottom: 1px solid var(--line-2); flex-wrap: wrap; }
.team-row:last-child { border-bottom: 0; }
.team-row .avatar { background: var(--brand-soft); color: var(--brand-deep); }
.team-row > div { display: flex; flex-direction: column; flex: 1; min-width: 160px; line-height: 1.5; }
.team-row small { color: var(--ink-3); }
.event-list { display: grid; }
.event-list > div { display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px dashed var(--line); font-size: .92rem; }
.event-list > div:last-child { border-bottom: 0; }
.event-list small { color: var(--ink-3); white-space: nowrap; }
.download-list { display: grid; gap: 8px; margin: 14px 0; }
.download-list a { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 13px 16px; border: 1px solid var(--line); border-radius: var(--r-sm); color: var(--ink); font-weight: 600; }
.download-list a:hover { border-color: var(--brand); background: var(--brand-tint); color: var(--ink); }
.download-list a span { color: var(--brand); font-weight: 600; font-size: .86rem; }
ol.numbered { padding: 0; list-style: none; counter-reset: n; display: grid; gap: 10px; margin: 0 0 14px; }
ol.numbered li { counter-increment: n; display: flex; gap: 12px; }
ol.numbered li::before { content: counter(n, persian); flex: none; width: 26px; height: 26px; border-radius: 50%; background: var(--brand-soft); color: var(--brand-deep); display: grid; place-items: center; font-weight: 700; font-size: .85rem; margin-top: 2px; }
.report-status { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 14px; margin-bottom: 20px; }
.report-status > div { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 18px 20px; display: flex; flex-direction: column; gap: 8px; align-items: flex-start; box-shadow: var(--e1); }
.report-status b { font-size: 1.75rem; font-weight: 800; line-height: 1.2; }
.report-status small { color: var(--ink-3); }
.filter-bar { display: flex; align-items: flex-end; gap: 10px; flex-wrap: wrap; }
.filter-bar label { display: flex; flex-direction: column; gap: 4px; font-size: .85rem; }
.filter-bar select { min-width: 240px; }

/* گزارش خرید و فروش PDF مودیان */
.moadian-report { --report-muted: #5f6c79; }
.report-page-head { margin-bottom: 18px; align-items: center; }
.report-page-head p { font-size: .92rem; }
.report-export { min-height: 44px; }
.workspace-tabs { display: flex; flex-wrap: wrap; gap: 4px 12px; border-bottom: 1px solid var(--line); margin-bottom: 22px; }
.workspace-tabs [role=tab] { display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 46px; padding: 9px 14px 12px; border: 0; border-bottom: 2px solid transparent; background: transparent; color: var(--ink-2); cursor: pointer; font: inherit; font-size: .87rem; font-weight: 500; }
.workspace-tabs [role=tab]:hover { background: var(--brand-tint); color: var(--brand-deep); }
.workspace-tabs [role=tab][aria-selected=true] { color: var(--brand-deep); border-bottom-color: var(--brand); font-weight: 700; }
.workspace-tabs svg { width: 18px; height: 18px; flex: none; }
[data-tab-panel] { min-width: 0; }
.report-pending-card .report-pending-list { max-height: none; }
@media (max-width: 600px) { .workspace-tabs { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 4px; } .workspace-tabs [role=tab] { padding-inline: 8px; font-size: .82rem; } }
.report-entry-grid { display: grid; gap: 18px; align-items: start; margin-bottom: 22px; }
.report-entry-grid.has-pending { grid-template-columns: minmax(0, 1.55fr) minmax(290px, 1fr); }
.moadian-report .card { border-radius: 16px; box-shadow: none; }
.report-entry-grid .card { margin: 0; padding: 22px; min-width: 0; }
.report-section-heading { display: flex; align-items: flex-start; gap: 12px; margin-bottom: 18px; }
.report-section-heading h2 { font-size: 1.05rem; }
.report-section-heading p { color: var(--report-muted); font-size: .84rem; margin: 3px 0 0; }
.report-section-icon { display: grid; place-items: center; width: 38px; height: 38px; background: var(--brand-tint); color: var(--brand); border-radius: 10px; flex: none; }
.report-section-icon svg { width: 20px; height: 20px; }
.report-section-icon.attention { background: var(--warn-soft); color: var(--warn); }
.report-sheet-options { display: grid; grid-template-columns: 1.3fr 1fr; gap: 12px; margin-bottom: 14px; }
.report-sheet-options label, .report-company-label, .report-filter label { display: grid; gap: 5px; font-size: .82rem; font-weight: 500; min-width: 0; }
.report-sheet-options select, .report-filter select { width: 100%; min-width: 0; }
.report-file-picker { position: relative; display: grid; justify-items: center; gap: 4px; text-align: center; border: 1px dashed #abbfd0; border-radius: 11px; padding: 18px 14px; background: var(--brand-tint); cursor: pointer; transition: background-color .15s, border-color .15s; }
.report-file-picker:hover { background: var(--brand-soft); border-color: var(--brand); }
.report-file-picker:focus-within { outline: 2px solid var(--brand); outline-offset: 3px; }
.report-file-picker input { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; height: 100%; }
.report-file-picker span { display: flex; gap: 8px; align-items: center; justify-content: center; color: var(--brand-deep); font-size: .9rem; }
.report-file-picker strong { font-weight: 600; }
.report-file-picker svg { width: 19px; height: 19px; flex: none; }
.report-file-picker small { color: var(--report-muted); font-size: .76rem; }
.report-file-picker:has(input:disabled) { opacity: .65; cursor: progress; }
.report-upload-footer { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 12px; }
.report-upload-footer p { color: var(--report-muted); font-size: .79rem; margin: 0; overflow-wrap: anywhere; min-width: 0; }
.report-upload-footer .btn { min-height: 42px; flex: none; }
.report-pdf-disclosure { margin-top: 18px; border-top: 1px solid var(--line-2); padding-top: 12px; }
.report-pdf-disclosure summary { cursor: pointer; display: flex; align-items: center; gap: 8px; font-size: .86rem; font-weight: 600; color: var(--ink-2); padding: 3px 0; }
.report-pdf-disclosure summary::after { content: '+'; font-size: 1.2rem; font-weight: 400; margin-inline-start: auto; }
.report-pdf-disclosure[open] summary::after { content: '−'; }
.report-pdf-disclosure summary svg { width: 17px; height: 17px; }
.report-pdf-disclosure summary span { color: var(--report-muted); font-size: .75rem; font-weight: 400; }
.report-pdf-hint { color: var(--report-muted); font-size: .82rem; margin: 10px 0 12px; }
.report-pdf-picker { margin-top: 12px; }
.report-count { display: inline-grid; place-items: center; min-width: 25px; min-height: 25px; padding: 0 7px; border-radius: 7px; color: var(--ink-2); background: var(--muted-soft); font-size: .78rem; vertical-align: middle; margin-inline-start: 5px; }
.report-pending-list { margin: 0; padding: 0; list-style: none; max-height: 255px; overflow: auto; }
.report-pending-list li { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 13px 0; border-top: 1px solid var(--line-2); }
.report-pending-list li > div { min-width: 0; }
.report-pending-list b { display: block; font-size: .87rem; font-weight: 600; overflow-wrap: anywhere; }
.report-pending-list small { display: block; color: var(--report-muted); font-size: .76rem; margin-top: 3px; }
.report-pending-list small span { display: block; font-variant-numeric: tabular-nums; }
.report-pending-list .btn svg { width: 15px; height: 15px; }
.report-filter-card { padding: 18px 22px; margin-bottom: 16px; }
.report-filter-heading { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; }
.report-filter-heading h2 { font-size: 1rem; }
.report-filter-heading > span, .report-unit { color: var(--report-muted); font-size: .78rem; }
.report-filter { display: grid; grid-template-columns: minmax(140px, 1.3fr) minmax(90px, .65fr) minmax(95px, .7fr) minmax(155px, 1.2fr) minmax(115px, .9fr) auto; gap: 12px; align-items: end; }
.report-filter .btn { min-height: 42px; }
.report-totals { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.report-total { min-width: 0; padding: 20px 24px 14px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); }
.report-total-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.report-total-heading > span { display: flex; align-items: center; gap: 8px; color: var(--ink-2); font-size: .9rem; font-weight: 600; }
.report-total-heading svg { width: 18px; height: 18px; color: var(--brand); }
.report-total.purchase .report-total-heading svg { color: var(--accent-ink); }
.report-total-heading small { color: var(--report-muted); font-size: .77rem; }
.report-total-value { display: flex; align-items: baseline; flex-wrap: wrap; gap: 8px; margin: 10px 0 16px; }
.report-total-value b { font-size: clamp(1.5rem, 2.3vw, 2.1rem); line-height: 1.45; font-weight: 800; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; min-width: 0; }
.report-total-value > span { font-size: .78rem; color: var(--report-muted); }
.report-total-meta { display: flex; justify-content: space-between; gap: 6px 14px; flex-wrap: wrap; border-top: 1px solid var(--line-2); padding-top: 10px; font-size: .78rem; color: var(--report-muted); }
.report-total-meta strong { color: var(--ink-2); font-weight: 600; margin-inline-start: 6px; font-variant-numeric: tabular-nums; }
.report-calculation { margin: 12px 2px 22px; color: var(--report-muted); font-size: .79rem; }
.report-calculation summary { cursor: pointer; width: fit-content; padding: 3px 0; }
.report-calculation p { margin: 8px 0 0; max-width: 120ch; line-height: 1.9; }
.moadian-report .card-head { padding: 17px 22px; }
.moadian-report .card-head p { color: var(--report-muted); font-size: .78rem; }
.moadian-report .data-table td { padding: 12px 18px; font-size: .85rem; }
.report-summary-table { min-width: 720px; }
.report-summary-table thead tr:first-child th { padding-top: 11px; padding-bottom: 7px; }
.report-summary-table thead tr:nth-child(2) th { padding-top: 6px; padding-bottom: 9px; font-size: .75rem; color: var(--report-muted); }
.report-summary-table .report-buy-group, .report-summary-table .report-sale-group { text-align: center; font-weight: 700; }
.report-summary-table .report-buy-group { background: #f7f1ec; color: #80513e; }
.report-summary-table .report-sale-group { background: var(--brand-tint); color: var(--brand); }
.report-summary-table tbody th { background: transparent; border-bottom: 1px solid var(--line-2); font-size: .83rem; color: var(--ink-2); font-weight: 500; padding: 10px 18px; }
.report-summary-table tbody td:nth-child(5), .report-summary-table tfoot td:nth-child(5), .report-summary-table thead tr:nth-child(2) th:nth-child(4) { border-inline-start: 1px solid var(--line); }
.report-summary-table .report-zero-row td { color: var(--report-muted); font-weight: 400; }
.report-summary-table .report-selected-row { background: var(--brand-tint); }
.report-summary-table tfoot { background: var(--brand-tint); font-weight: 700; }
.report-summary-table tfoot th { padding: 13px 18px; color: var(--brand-deep); }
.report-amount { font-weight: 600; }
.report-detail-table { min-width: 1150px; }
.report-detail-table td:nth-child(3) { min-width: 180px; max-width: 300px; }
.report-detail-table td:nth-child(3) b { font-size: .84rem; font-weight: 600; }
.report-detail-table .cell-sub { font-size: .75rem; color: var(--report-muted); line-height: 1.8; }
.report-date { display: inline-block; white-space: nowrap; }
.report-tax-id { display: inline-block; font-size: .76rem; }
.report-direction { display: inline-block; font-size: .76rem; padding: 2px 9px; border-radius: 6px; background: var(--brand-soft); color: var(--brand-deep); white-space: nowrap; }
.report-direction.purchase { background: #f7f1ec; color: #80513e; }
.report-source { font-size: .76rem; color: var(--report-muted); }
.report-pdf-link { display: inline-flex; gap: 4px; align-items: center; padding: 5px 3px; }
.report-pdf-link svg { width: 16px; height: 16px; }
.report-empty { display: grid; justify-items: center; text-align: center; gap: 8px; padding: 38px 20px; }
.report-empty > svg { width: 30px; height: 30px; color: var(--report-muted); margin-bottom: 4px; }
.report-empty h3 { font-size: .96rem; font-weight: 600; }
.report-empty p { color: var(--report-muted); font-size: .83rem; margin: 0; }
.report-upload-results, .report-sheet-results { display: grid; gap: 10px; margin-top: 16px; }
.report-upload-row { display: grid; gap: 4px; border: 1px solid var(--line); background: var(--paper); border-radius: 10px; padding: 11px 14px; font-size: .82rem; }
.report-upload-row b { overflow-wrap: anywhere; font-weight: 600; }
.report-upload-row span { color: var(--ink-2); }
.report-upload-row a { font-weight: 600; justify-self: start; }
.report-upload-row.success { border-color: #b8d8cc; background: var(--ok-soft); }
.report-upload-row.warning { border-color: #e7d6a2; background: var(--warn-soft); }
.report-upload-row.error { border-color: #e9bbb6; background: var(--err-soft); }
.report-upload-progress { margin-top: 14px; font-size: .8rem; color: var(--ink-2); }
.report-upload-progress progress { display: block; width: 100%; height: 6px; margin-top: 8px; accent-color: var(--brand); }
.report-sheet-stats { display: flex; flex-wrap: wrap; gap: 8px 20px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 10px; font-size: .82rem; background: var(--brand-tint); }
.report-sheet-stats strong { font-size: 1rem; margin-inline-end: 5px; }
.report-sheet-errors { padding: 12px 14px; border: 1px solid #e9bbb6; background: var(--err-soft); border-radius: 10px; font-size: .82rem; }
.report-sheet-errors p { margin-bottom: 7px; color: var(--err); font-weight: 600; }
.report-sheet-errors ul { margin: 0; max-height: 200px; overflow: auto; }
.report-sheet-note { color: var(--report-muted); font-size: .8rem; margin: 0; }
.report-sheet-results .btn { justify-self: start; }
.report-invoice-preview { min-width: 0; padding: 16px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); color: var(--ink); }
.report-preview-heading { display: flex; justify-content: space-between; align-items: start; gap: 8px 16px; flex-wrap: wrap; margin-bottom: 12px; }
.report-preview-heading > div { min-width: 0; flex: 1; }
.report-preview-label, .report-preview-heading small { display: block; font-size: .74rem; color: var(--report-muted); }
.report-preview-heading h3 { font-size: .94rem; margin: 2px 0 3px; font-weight: 700; overflow-wrap: anywhere; }
.report-invoice-preview .report-preview-date { font-size: .75rem; color: var(--report-muted); white-space: nowrap; }
.report-preview-number { display: flex; justify-content: space-between; gap: 4px 12px; flex-wrap: wrap; border-top: 1px solid var(--line-2); padding-top: 10px; margin-bottom: 12px; font-size: .75rem; }
.report-preview-number > span { color: var(--report-muted); }
.report-preview-number bdi { font-family: var(--f-code); font-variant-numeric: tabular-nums; overflow-wrap: anywhere; min-width: 0; }
.report-preview-amounts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin: 0; }
.report-preview-amounts > div { min-width: 0; padding: 10px; background: var(--paper); border-radius: 8px; }
.report-preview-amounts dt { font-size: .72rem; color: var(--report-muted); margin-bottom: 5px; }
.report-preview-amounts dd { margin: 0; font-size: .9rem; font-weight: 600; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.report-preview-amounts .final { background: var(--brand-tint); }
.report-preview-amounts .final dd { color: var(--brand-deep); font-weight: 800; }
.report-preview-other { font-size: .74rem; color: var(--report-muted); margin: 10px 0 0; }
.report-preview-bulk { display: flex; align-items: center; gap: 10px 16px; flex-wrap: wrap; border: 1px solid var(--brand-line); background: var(--brand-tint); border-radius: 11px; padding: 12px; }
.report-preview-bulk > label, .report-preview-actions label { display: inline-flex; align-items: center; gap: 8px; font-size: .8rem; color: var(--ink-2); cursor: pointer; min-height: 32px; }
.report-preview-bulk > label { flex-basis: 100%; font-weight: 600; }
.report-preview-bulk .btn { margin-inline-start: auto; white-space: normal; line-height: 1.6; padding-block: 8px; }
.report-sheet-preview-panel { scroll-margin-top: 84px; padding: 22px; margin-top: 0; margin-bottom: 22px; }
.report-sheet-preview-panel > h2 { margin-bottom: 0; font-size: 1.05rem; }
.report-sheet-preview-panel:focus { outline: none; }
.report-preview-cards { display: grid; gap: 12px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.report-preview-actions { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; border-top: 1px solid var(--line-2); padding-top: 12px; margin-top: 12px; }
.report-preview-pager { display: flex; justify-content: space-between; align-items: center; gap: 10px; font-size: .78rem; }
@media (max-width: 500px) { .report-preview-actions { align-items: stretch; flex-direction: column; } .report-preview-actions .btn { width: 100%; } .report-preview-bulk .btn { width: 100%; } }
@media (max-width: 1000px) { .report-preview-cards { grid-template-columns: 1fr; } }
@media (max-width: 600px) { .report-preview-amounts { grid-template-columns: repeat(2, minmax(0, 1fr)); } .report-preview-amounts .final { grid-column: 1 / -1; } }
@media (max-width: 360px) { .report-invoice-preview { padding: 12px; } .report-preview-amounts dd { font-size: .83rem; } }
@media (max-width: 1250px) { .report-filter { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 1150px) { .report-entry-grid.has-pending { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 700px) { .report-filter { grid-template-columns: repeat(2, minmax(0, 1fr)); } .report-total { padding: 18px; } .report-total-meta { flex-direction: column; } .moadian-report input, .moadian-report select { font-size: 16px; } }
@media (max-width: 500px) { .report-totals, .report-sheet-options { grid-template-columns: 1fr; } .report-entry-grid .card, .report-filter-card { padding: 18px; } .report-upload-footer { align-items: stretch; flex-direction: column; } .report-upload-footer .btn { align-self: stretch; } .report-nav { gap: 4px 16px; } .report-nav a { font-size: .8rem; white-space: normal; } .report-total-meta { flex-direction: row; } .report-page-head h1 { font-size: 1.35rem; } }
@media (max-width: 360px) { .report-filter { grid-template-columns: 1fr; } }
.report-review-layout { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(390px, .8fr); gap: 18px; align-items: start; }
.report-preview, .report-review-form { min-width: 0; }
.report-preview { position: sticky; top: 16px; }
.report-preview-pages { height: min(78vh, 980px); overflow: auto; border: 1px solid var(--line); border-radius: 10px; background: #e4e8e9; padding: 14px; display: grid; justify-items: center; align-content: start; gap: 14px; }
.report-preview-pages canvas { display: block; max-width: 100%; background: white; box-shadow: var(--e2); }
.report-preview-pages p { padding: 30px; color: var(--ink-2); }
.report-preview .section-title h2 { overflow-wrap: anywhere; }
.report-review-form > p { margin-bottom: 20px; }
.report-ocr { margin-top: 24px; border-top: 1px solid var(--line); padding-top: 14px; }
.report-ocr summary { cursor: pointer; color: var(--brand); font-weight: 600; }
.report-ocr pre { white-space: pre-wrap; overflow-wrap: anywhere; direction: rtl; line-height: 1.7; font: inherit; font-size: .78rem; max-height: 300px; overflow: auto; padding: 12px; background: var(--paper); border-radius: 8px; margin-top: 10px; }
@media (max-width: 1100px) { .report-review-layout { grid-template-columns: 1fr; } .report-preview { position: static; } }
@media (max-width: 800px) { .report-upload-controls { grid-template-columns: 1fr; } .report-upload-controls .btn { justify-self: start; } }
@media (max-width: 600px) { .report-totals { grid-template-columns: 1fr; } .report-review-form .grid.two { grid-template-columns: 1fr; } .report-review-form .span-2 { grid-column: auto; } .report-preview-pages { height: 60vh; } }
.admin-row { display: grid; grid-template-columns: minmax(0, 1.5fr) 160px 160px auto; gap: 12px; align-items: end; padding: 14px 22px; border-bottom: 1px solid var(--line-2); }
.admin-row:last-child { border-bottom: 0; }
.admin-row label { display: flex; flex-direction: column; gap: 4px; font-size: .82rem; }
.admin-row > div { display: flex; flex-direction: column; line-height: 1.5; min-width: 0; }
.admin-row small { color: var(--ink-3); overflow-wrap: anywhere; }

/* راهنما */
.prose { max-width: 78ch; }
.prose h2 { margin: 30px 0 10px; font-size: 1.12rem; }
.prose li { margin-bottom: 6px; }
.prose .lead { font-size: 1.03rem; color: var(--ink-2); }

/* منوی مرحله‌ای سایدبار */
.step-group { position: relative; }
.side-group > .step-head {
  display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 8px 10px;
  border-radius: 10px; font-size: .88rem; color: var(--ink-2); font-weight: 600;
  list-style: none; cursor: pointer; text-align: start;
}
.step-head::-webkit-details-marker { display: none; }
.step-head::marker { content: ""; }
.step-head:hover { background: var(--paper); color: var(--ink); }
.step-head > span { flex: 1; min-width: 0; }
.step-head .step-chevron { width: 16px; height: 16px; flex: none; }
.step-group[open] > .step-head .step-chevron { transform: rotate(-90deg); }
.side-submenu { position: relative; padding-block: 4px; }
.side-submenu::before { content: ""; position: absolute; inset-inline-start: 21px; top: 8px; bottom: 8px; width: 1.5px; background: var(--line); }
@media (prefers-reduced-motion: no-preference) {
  .step-head .step-chevron { transition: transform .16s var(--ease); }
}
.step-head i { position: relative; z-index: 1; width: 22px; height: 22px; flex: none; border-radius: 50%; display: grid; place-items: center; font-style: normal; font-size: .72rem; font-weight: 700; color: var(--ink-3); background: var(--surface); border: 1.5px solid #cfd9de; }
.step-group:has(a.on) .step-head i { background: var(--brand); border-color: var(--brand); color: #fff; }
.step-group:has(a.on) .step-head { color: var(--brand-deep); }
.step-group .side-nav a, .step-group a { padding-inline-start: 42px; }
.step-group a svg { margin-inline-start: -2px; }
.side-misc { margin-top: 18px; padding-top: 12px; border-top: 1px solid var(--line-2); }

/* ═══════════════════ سایت معرفی ═══════════════════ */
.site { background: var(--paper); }
.shell { width: min(1200px, calc(100% - 48px)); margin-inline: auto; }
.site-header { position: sticky; top: 0; z-index: 40; background: rgba(247, 249, 250, .82); backdrop-filter: saturate(1.6) blur(14px); -webkit-backdrop-filter: saturate(1.6) blur(14px); border-bottom: 1px solid transparent; transition: border-color .2s; }
.site-header.scrolled, .site-header:has(~ main .page-hero), .site-header:has(~ main .auth) { border-bottom-color: var(--line); }
.site-header .shell { display: flex; align-items: center; gap: 32px; min-height: 76px; }
.site-brand { display: flex; align-items: center; gap: 11px; color: var(--ink); }
.site-brand:hover { color: var(--ink); }
.site-nav { display: flex; gap: 2px; }
.site-nav a { position: relative; color: var(--ink-2); padding: 8px 13px; border-radius: 10px; font-weight: 500; font-size: .95rem; }
.site-nav a:hover { color: var(--ink); background: rgba(21, 45, 56, .045); }
.site-nav a.on { color: var(--brand-deep); font-weight: 600; }
.site-nav a.on::after { content: ""; position: absolute; inset-inline: 13px; bottom: 2px; height: 2px; border-radius: 2px; background: var(--brand); }
.site-actions { margin-inline-start: auto; display: flex; align-items: center; gap: 8px; }
.site-main { min-height: 60vh; }
.site-main > .notices { width: min(1200px, calc(100% - 48px)); margin: 18px auto 0; }

.eyebrow { display: inline-flex; align-items: center; gap: 9px; color: var(--accent-ink); font-weight: 600; font-size: .9rem; margin-bottom: 18px; }
.eyebrow::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 4px rgba(201, 147, 131, .2); }
.hl { color: var(--accent-ink); background: linear-gradient(100deg, #8a4e3a, #c99383 55%, #9a5b45); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }

/* هیرو */
.hero { display: grid; grid-template-columns: minmax(0, 1.02fr) minmax(0, .98fr); gap: 64px; align-items: center; padding: 72px 0 84px; }
.hero h1 { font-size: clamp(2.3rem, 4.6vw, 3.7rem); font-weight: 800; line-height: 1.42; margin-bottom: 22px; letter-spacing: -.015em; }
.hero .lead { font-size: 1.12rem; color: var(--ink-2); max-width: 52ch; margin-bottom: 32px; line-height: 2; }
.hero-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.hero-note { display: flex; align-items: center; gap: 8px; margin-top: 22px; color: var(--ink-3); font-size: .87rem; }
.hero-note svg { width: 17px; height: 17px; color: var(--brand); }
.hero-facts { display: flex; flex-wrap: wrap; gap: 8px 22px; margin: 26px 0 0; padding: 0; list-style: none; color: var(--ink-2); font-size: .9rem; }
.hero-facts li { display: flex; align-items: center; gap: 8px; }
.hero-facts svg { width: 17px; height: 17px; color: var(--brand); }

/* کارت جریان (نمونهٔ نمایشی محصول) */
.flow-demo { position: relative; }
.flow-demo::before { content: ""; position: absolute; inset: 8% -6% -6% 10%; background: radial-gradient(closest-side, rgba(54, 79, 107, .14), transparent); filter: blur(10px); z-index: 0; }
.fd-tabs { position: relative; z-index: 1; display: flex; gap: 4px; width: max-content; max-width: 100%; margin: 0 auto 14px; padding: 4px; background: var(--surface); border: 1px solid var(--line); border-radius: 13px; box-shadow: var(--e1); overflow-x: auto; }
.fd-tabs span { padding: 5px 14px; border-radius: 9px; font-size: .84rem; color: var(--ink-2); white-space: nowrap; }
.fd-tabs span.on { background: var(--brand-soft); color: var(--brand-deep); font-weight: 600; }
.fd-card { position: relative; z-index: 1; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-xl); box-shadow: var(--e3); overflow: hidden; }
.fd-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 22px; border-bottom: 1px solid var(--line-2); font-size: .88rem; }
.fd-head b { display: flex; align-items: center; gap: 9px; }
.fd-head b svg { width: 18px; height: 18px; color: var(--brand); }
.fd-head small { color: var(--ink-3); display: flex; align-items: center; gap: 7px; }
.fd-head small::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--ok); }
.fd-body { padding: 18px 22px 8px; display: grid; gap: 0; }
.fd-step { position: relative; display: flex; align-items: center; gap: 14px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); }
.fd-step + .fd-step { margin-top: 22px; }
.fd-step + .fd-step::before { content: ""; position: absolute; inset-inline-start: 50%; top: -23px; height: 22px; border-inline-start: 1.5px dashed #c4d2d7; }
.fd-step + .fd-step::after { content: ""; position: absolute; inset-inline-start: calc(50% - 3px); top: -5px; width: 7px; height: 7px; border-radius: 50%; background: var(--brand); }
.fd-ic { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; flex: none; background: var(--paper); color: var(--ink-2); border: 1px solid var(--line); }
.fd-ic svg { width: 20px; height: 20px; }
.fd-step div { display: flex; flex-direction: column; line-height: 1.55; min-width: 0; flex: 1; }
.fd-step small { color: var(--ink-3); font-size: .76rem; }
.fd-step b { font-size: .97rem; }
.fd-step em { font-style: normal; color: var(--ink-3); font-size: .8rem; }
.fd-step .pill { flex: none; }
.fd-step.active { background: linear-gradient(180deg, var(--brand-tint), var(--brand-soft)); border-color: var(--brand-line); box-shadow: 0 10px 24px -16px rgba(54, 79, 107, .6); }
.fd-step.active .fd-ic { background: var(--brand); border-color: var(--brand); color: #fff; }
.fd-step.active small { color: var(--accent-ink); font-weight: 600; letter-spacing: .02em; }
.fd-taxid { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin: 18px 0 14px; padding: 11px 14px; border-radius: 12px; background: var(--paper); border: 1px dashed #cfdade; font-size: .82rem; color: var(--ink-3); }
.fd-taxid .ltr { color: var(--ink); font-weight: 600; font-size: .86rem; }
.fd-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 13px 22px; border-top: 1px solid var(--line-2); background: #fbfcfc; font-size: .82rem; color: var(--ink-3); }
.fd-foot b { color: var(--ink); font-weight: 700; }
@media (prefers-reduced-motion: no-preference) {
  .fd-step { animation: rise .6s var(--ease) both; }
  .fd-step:nth-child(2) { animation-delay: .12s; }
  .fd-step:nth-child(3) { animation-delay: .24s; }
  .fd-taxid { animation: rise .6s var(--ease) .36s both; }
  @keyframes rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
}

/* نوار الگوها */
.strip { border-block: 1px solid var(--line); background: var(--surface); }
.strip .shell { display: flex; align-items: center; gap: 28px; padding: 22px 0; flex-wrap: wrap; }
.strip-label { display: flex; flex-direction: column; line-height: 1.5; color: var(--ink-3); font-size: .82rem; min-width: 170px; }
.strip-label b { color: var(--ink); font-size: .95rem; }
.strip-items { display: flex; flex-wrap: wrap; gap: 10px; flex: 1; }
.chip { display: inline-flex; align-items: center; gap: 8px; padding: 8px 15px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); color: var(--ink); font-size: .9rem; font-weight: 500; }
.chip svg { width: 16px; height: 16px; color: var(--brand); }
.chip.soft { background: var(--paper); border-color: transparent; color: var(--ink-2); }

/* بخش‌ها */
.band { background: var(--surface); border-block: 1px solid var(--line); }
.section { padding: 96px 0; }
.section-intro { max-width: 660px; margin-bottom: 44px; }
.section-intro.center { margin-inline: auto; text-align: center; }
.section-intro.center .eyebrow { justify-content: center; }
.section-intro h2, .split h2, .closing h2, .page-hero h1 { font-weight: 800; font-size: clamp(1.6rem, 2.7vw, 2.25rem); line-height: 1.55; margin-bottom: 12px; letter-spacing: -.01em; }
.section-intro p { color: var(--ink-2); font-size: 1.05rem; line-height: 1.95; }

.flow { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; counter-reset: s; }
.flow article { position: relative; padding: 26px; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--surface); counter-increment: s; }
.band .flow article { background: var(--paper); border-color: var(--line-2); }
.flow article::before { content: counter(s, persian); display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; margin-bottom: 18px; background: var(--brand-soft); color: var(--brand-deep); font-weight: 800; font-size: 1.05rem; }
.flow article:not(:last-child)::after { content: ""; position: absolute; top: 46px; inset-inline-end: -19px; width: 20px; border-top: 1.5px dashed #c4d2d7; }
.flow h3 { font-size: 1.12rem; margin-bottom: 8px; }
.flow p { color: var(--ink-2); margin: 0; line-height: 1.95; }

.bento { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.bento article { padding: 26px; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--surface); transition: border-color .2s var(--ease), box-shadow .2s var(--ease), transform .2s var(--ease); }
.bento article:hover { border-color: var(--brand-line); box-shadow: var(--e2); transform: translateY(-2px); }
.bento article.wide { grid-column: span 2; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 24px; align-items: center; }
.bento .f-icon, .feature-rows .f-icon { width: 46px; height: 46px; border-radius: 13px; background: var(--brand-soft); color: var(--brand); display: grid; place-items: center; margin-bottom: 18px; }
.bento .f-icon svg, .feature-rows .f-icon svg { width: 22px; height: 22px; }
.bento h3 { font-size: 1.1rem; margin-bottom: 8px; }
.bento p { color: var(--ink-2); margin: 0; line-height: 1.95; }
.mini-list { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.mini-list li { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 14px; border-radius: 12px; background: var(--paper); font-size: .88rem; }

.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 64px; align-items: center; }
.split p { color: var(--ink-2); font-size: 1.05rem; line-height: 1.95; }
.check-list { list-style: none; padding: 0; margin: 22px 0 28px; display: grid; gap: 12px; }
.check-list li { display: flex; gap: 11px; align-items: flex-start; color: var(--ink); }
.check-list svg { width: 20px; height: 20px; flex: none; color: var(--brand); margin-top: 4px; padding: 3px; border-radius: 50%; background: var(--brand-soft); }

.reject-demo { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-xl); overflow: hidden; box-shadow: var(--e3); }
.reject-demo .rd-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 16px 22px; border-bottom: 1px solid var(--line-2); }
.reject-demo .rd-body { padding: 22px; }
.reject-demo .rd-body b { display: block; margin-bottom: 8px; font-size: 1.02rem; }
.reject-demo .rd-body p { font-size: .93rem; margin: 0; }
.reject-demo .rd-code { display: inline-flex; align-items: center; gap: 7px; margin-bottom: 12px; padding: 3px 11px; border-radius: 999px; background: var(--err-soft); color: var(--err); font-size: .8rem; font-weight: 600; }
.reject-demo .rd-code svg { width: 15px; height: 15px; }
.reject-demo .rd-foot { display: flex; gap: 8px; padding: 14px 22px; background: #fbfcfc; border-top: 1px solid var(--line-2); }
.rd-history { display: grid; gap: 0; margin-top: 18px; padding-top: 16px; border-top: 1px dashed var(--line); font-size: .84rem; color: var(--ink-3); }
.rd-history span { display: flex; align-items: center; gap: 9px; padding: 3px 0; }
.rd-history i { width: 7px; height: 7px; border-radius: 50%; background: #c5d0d5; flex: none; }
.rd-history i.e { background: var(--err); }

.trust { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--surface); overflow: hidden; }
.trust > div { padding: 26px; display: flex; gap: 14px; align-items: flex-start; }
.trust > div + div { border-inline-start: 1px solid var(--line-2); }
.trust svg { width: 22px; height: 22px; flex: none; color: var(--brand); margin-top: 3px; }
.trust b { display: block; margin-bottom: 4px; }
.trust p { color: var(--ink-2); margin: 0; font-size: .92rem; line-height: 1.85; }

.feature-rows { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; padding-bottom: 24px; }
.feature-rows article { padding: 28px; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--surface); }
.feature-rows h2 { font-size: 1.12rem; margin-bottom: 8px; }
.feature-rows p { color: var(--ink-2); margin: 0; line-height: 1.95; }

.faqs { display: grid; gap: 10px; max-width: 820px; margin-inline: auto; }
.faqs details { border: 1px solid var(--line); border-radius: var(--r-md); background: var(--surface); padding: 0 22px; transition: border-color .2s, box-shadow .2s; }
.faqs details[open] { border-color: var(--brand-line); box-shadow: var(--e1); }
.faqs summary { list-style: none; cursor: pointer; padding: 18px 0; font-weight: 600; font-size: 1.01rem; display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.faqs summary::-webkit-details-marker { display: none; }
.faqs summary::after { content: ""; flex: none; width: 26px; height: 26px; border-radius: 8px; background: var(--paper) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23364f6b' stroke-width='2.2' stroke-linecap='round'%3E%3Cpath d='M12 6v12M6 12h12'/%3E%3C/svg%3E") center / 14px no-repeat; transition: transform .25s var(--ease); }
.faqs details[open] summary::after { transform: rotate(45deg); background-color: var(--brand-soft); }
.faqs details p { color: var(--ink-2); padding-bottom: 20px; margin: 0; line-height: 1.95; }

.closing { padding: 0 0 96px; }
.closing .shell { position: relative; overflow: hidden; display: flex; align-items: center; justify-content: space-between; gap: 28px; flex-wrap: wrap; padding: 52px 56px; border-radius: var(--r-xl);
  background: var(--field); color: #fff; }
.closing h2 { color: #fff; margin: 0; max-width: 26ch; }
.closing p { color: rgba(228, 238, 249, .84); margin: 8px 0 0; }
.closing .hero-actions .btn.light .arrow { color: var(--brand); }

.page-hero { padding: 72px 0 40px; max-width: 780px; }
.page-hero.center { margin-inline: auto; text-align: center; }
.page-hero.center .eyebrow { justify-content: center; }
.page-hero p { color: var(--ink-2); font-size: 1.07rem; line-height: 1.95; }

.plan-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; padding-bottom: 24px; align-items: stretch; }
.plan { position: relative; display: flex; flex-direction: column; gap: 20px; padding: 28px; border: 1px solid var(--line); border-radius: var(--r-xl); background: var(--surface); }
.plan.featured { border-color: var(--brand); box-shadow: var(--e3), inset 0 0 0 1px var(--brand); }
.plan.featured::before { content: "پیشنهاد نوتک"; position: absolute; top: -13px; inset-inline-start: 24px; padding: 2px 12px; border-radius: 999px; background: var(--accent); color: #fff; font-size: .76rem; font-weight: 600; }
.plan .plan-name { display: inline-block; font-weight: 700; color: var(--accent-ink); font-size: .9rem; margin-bottom: 4px; }
.plan h2 { font-size: 1.3rem; }
.plan p { color: var(--ink-2); margin: 6px 0 0; }
.plan ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 11px; }
.plan li { display: flex; gap: 10px; align-items: flex-start; font-size: .94rem; }
.plan li svg { width: 18px; height: 18px; color: var(--brand); flex: none; margin-top: 5px; }
.plan-bottom { margin-top: auto; display: grid; gap: 12px; padding-top: 20px; border-top: 1px dashed var(--line); }
.plan-bottom strong { font-size: .95rem; }
.plan-bottom form { margin: 0; }
.plan-bottom .btn { width: 100%; }
.plans-note { margin: 10px auto 96px; }

/* ورود و ثبت‌نام */
.auth { min-height: calc(100vh - 77px); display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.auth-aside { position: relative; overflow: hidden; padding: 64px clamp(28px, 6vw, 88px); display: flex; flex-direction: column; justify-content: center; color: rgba(228, 238, 249, .86);
  background: var(--field); }
.auth-aside::after { content: ""; position: absolute; inset-inline-end: -60px; bottom: -40px; width: 300px; height: 380px; background: url("./brand/kt-symbol-white.png") center / contain no-repeat; opacity: .06; pointer-events: none; }
.auth-aside .eyebrow { color: #f0c4ae; }
.auth-aside .eyebrow::before { background: #f0c4ae; box-shadow: 0 0 0 4px rgba(240, 196, 174, .2); }
.auth-aside h1 { color: #fff; font-size: clamp(1.75rem, 2.9vw, 2.4rem); font-weight: 800; line-height: 1.55; margin-bottom: 14px; max-width: 14em; }
.auth-aside p { max-width: 46ch; font-size: 1.03rem; line-height: 1.95; }
.auth-steps { list-style: none; padding: 0; margin: 28px 0 0; display: grid; gap: 14px; counter-reset: a; }
.auth-steps li { position: relative; z-index: 1; counter-increment: a; display: flex; align-items: center; gap: 12px; color: #eef4fb; }
.auth-steps li::before { content: counter(a, persian); width: 32px; height: 32px; border-radius: 10px; background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.18); display: grid; place-items: center; font-size: .88rem; color: #fff; }
.auth-main { display: grid; place-items: center; padding: 48px 24px; background: var(--paper); }
.auth-card { width: min(440px, 100%); padding: 36px; border: 1px solid var(--line); border-radius: var(--r-xl); background: var(--surface); box-shadow: var(--e2); }
.auth-card h2 { font-size: 1.5rem; font-weight: 800; margin-bottom: 4px; }
.auth-card > p { color: var(--ink-2); margin-bottom: 26px; }
.auth-switch { margin-top: 22px; text-align: center; color: var(--ink-2); font-size: .93rem; }

/* فوتر */
.site-footer { border-top: 1px solid var(--line); background: var(--surface); padding: 56px 0 28px; font-size: .92rem; }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr; gap: 32px; }
.footer-grid p { color: var(--ink-2); max-width: 42ch; margin-top: 14px; line-height: 1.95; }
.footer-grid nav { display: flex; flex-direction: column; gap: 8px; }
.footer-grid nav b { margin-bottom: 4px; color: var(--ink); }
.footer-grid nav a { color: var(--ink-2); }
.footer-grid nav a:hover { color: var(--brand); }
.footer-bottom { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 36px; padding-top: 20px; border-top: 1px solid var(--line-2); color: var(--ink-3); font-size: .85rem; }
.made-by { display: inline-flex; align-items: center; gap: 10px; color: var(--ink-3); }
.made-by img { height: 26px; width: auto; display: block; }
.made-by b { font-family: var(--f-code); font-weight: 600; color: var(--ink); letter-spacing: .01em; direction: ltr; }
.made-by:hover { color: var(--ink); }

/* ───────────── واکنش‌گرا ───────────── */
@media (max-width: 1100px) {
  .dash-grid { grid-template-columns: 1fr; }
  .dash-grid aside { grid-template-columns: 1fr 1fr; }
  .hero { grid-template-columns: 1fr; gap: 44px; padding: 52px 0 64px; }
  .flow-demo { max-width: 560px; }
  .bento { grid-template-columns: 1fr 1fr; }
  .bento article.wide { grid-column: 1 / -1; }
}
@media (max-width: 960px) {
  .app { --workspace-gutter: 16px; --workspace-bottom: 32px; grid-template-columns: 1fr; }
  .sidebar { position: fixed; inset-block: 0; inset-inline-start: 0; width: min(296px, 86vw); transform: translateX(105%); transition: transform .24s var(--ease); box-shadow: var(--e3); }
  body.nav-open .sidebar { transform: none; }
  body.nav-open .scrim { display: block; position: fixed; inset: 0; background: rgba(16, 42, 51, .4); backdrop-filter: blur(2px); z-index: 35; }
  .menu-toggle { display: inline-flex; }
  .topbar { padding: 10px 16px; }
  .page { padding-top: 20px; }
  .env-flag { padding: 8px 16px; }
  .sticky-actions { padding-block: 12px; }
  .company-switch label { display: none; }
  .company-switch select { min-width: 0; max-width: 48vw; }
  .ledger { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .site-nav { display: none; }
  .split, .auth { grid-template-columns: 1fr; gap: 40px; }
  .auth-aside { padding: 40px 24px; }
  .plan-grid { grid-template-columns: 1fr; gap: 24px; }
  .flow { grid-template-columns: 1fr; }
  .flow article:not(:last-child)::after { display: none; }
  .trust { grid-template-columns: 1fr; }
  .trust > div + div { border-inline-start: 0; border-top: 1px solid var(--line-2); }
  .feature-rows { grid-template-columns: 1fr; }
  .admin-row { grid-template-columns: 1fr 1fr; }
  .admin-row > div { grid-column: 1 / -1; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-grid > div:first-child { grid-column: 1 / -1; }
  .pattern-picker { grid-template-columns: 1fr 1fr; }
  .closing .shell { padding: 40px 28px; }
}
@media (max-width: 700px) {
  html { font-size: 14.5px; }
  .grid.two, .grid.three { grid-template-columns: 1fr; }
  .span-2 { grid-column: auto; }
  .field-row { flex-wrap: wrap; }
  .field-row > :first-child { flex-basis: 100%; }
  .search, .search input { width: 100%; }
  .toolbar > * { width: 100%; }
  .greeting h1 { font-size: 1.6rem; }
  .shell { width: calc(100% - 32px); }
  .site-header .shell { gap: 12px; min-height: 64px; }
  .site-brand .brand-words small { display: none; }
  .site-actions .text-link { display: none; }
  .hero { padding: 36px 0 52px; }
  .hero h1 { font-size: 2.05rem; }
  .section { padding: 64px 0; }
  .bento { grid-template-columns: 1fr; }
  .bento article.wide { grid-template-columns: 1fr; }
  .strip .shell { gap: 14px; }
  .topbar .crumb { display: none; }
  .dash-grid aside { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .filter-bar select { min-width: 0; width: 100%; }
  .filter-bar label { flex: 1; }
  dl.kv { grid-template-columns: 1fr; gap: 2px; }
  dl.kv dd { margin-bottom: 8px; }
  .sticky-actions .btn { flex: 1; }
  table.t td, .data-table td { white-space: nowrap; }
  .auth-card { padding: 26px 22px; }
  .closing { padding-bottom: 64px; }
  .fd-step .pill { display: none; }
}
@media (max-width: 520px) { .pattern-picker { grid-template-columns: 1fr; } .ledger .figure { font-size: 1.8rem; } }

/* ───────────── چاپ ───────────── */
@media print {
  .sidebar, .topbar, .no-print, .sticky-actions, .env-flag, .toast { display: none !important; }
  .app { display: block; }
  body { background: #fff; }
  .card { border-color: #999; box-shadow: none; }
}

/* ── لمسه‌های مسی هویت نوتک ── */
.closing .shell::after { content: ""; position: absolute; inset-inline-start: 4%; top: 50%; width: 220px; height: 280px; transform: translateY(-50%); background: url("./brand/kt-symbol-white.png") center / contain no-repeat; opacity: .07; pointer-events: none; }
.closing .shell > * { position: relative; z-index: 1; }
.closing .btn.light { color: var(--brand-deep); }
.closing .btn.light .arrow { color: var(--accent-ink); }
.flow article::before { background: var(--accent-soft); color: var(--accent-ink); }
.check-list svg { color: var(--accent-ink); background: var(--accent-soft); }
.chip svg { color: var(--accent-ink); }
.hero-note svg { color: var(--accent-ink); }
.fd-step + .fd-step::after { background: var(--accent); }
.side-brand .brand-words small, .site-brand .brand-words small { color: var(--ink-3); }
/* Shared list controls */
.table-tools{display:flex;align-items:end;gap:12px;flex-wrap:wrap;padding:16px 20px;background:var(--paper,#fff);border-bottom:1px solid var(--line,#e5e2dc)}
.table-search{display:grid;gap:6px;font-size:12px;min-width:220px;flex:1;max-width:460px}.table-search input,.table-filters input{width:100%;min-height:38px;padding:7px 10px;border:1px solid var(--line,#d6d4ce);border-radius:6px;background:#fff;color:var(--ink,#222);font:inherit}
.table-result-count{font-size:12px;color:var(--ink-2,#555);padding:10px 0}.table-filter-hint{width:100%;font-size:11px;color:var(--ink-2,#555)}
.table-sort{display:inline-flex;align-items:center;justify-content:space-between;gap:10px;min-height:36px;border:0;background:transparent;color:inherit;font:inherit;font-weight:inherit;text-align:start;cursor:pointer;padding:0}.table-sort span{opacity:.75}.table-sort:hover{color:var(--brand-deep,#236358)}
.table-filters td{padding:6px 10px!important;background:#f6f6f2}.table-filters input{min-width:115px;font-size:12px}.table-no-results td{text-align:center;padding:28px!important;color:var(--ink-2,#555)}
.table-sort:focus-visible,.table-tools input:focus-visible,.table-filters input:focus-visible{outline:2px solid #266a60;outline-offset:3px}
.vat-balance{font-weight:700;white-space:nowrap}.vat-balance small{display:block;font-size:11px;font-weight:500}.vat-debit{color:#167044}.vat-credit{color:#b42332}.vat-zero{color:#62665f}
@media(max-width:600px){.table-tools{padding:12px;gap:8px}.table-search{min-width:180px;max-width:none}.table-search input,.table-filters input{font-size:16px}.table-filter-hint{line-height:1.8}}
@media print{.table-tools,.table-filters,.table-sort span{display:none!important}.table-sort{display:inline}.table-no-results{display:none!important}}
@media(max-width:1100px){body:has(.app){overflow-x:clip}}

/* ───────────── یافتن شناسهٔ کالا ───────────── */
.finder-card { padding: 22px; }
.finder-bar { display: flex; gap: 10px; align-items: center; }
.finder-input { position: relative; flex: 1; display: block; }
.finder-input svg { position: absolute; inset-inline-start: 14px; top: 50%; transform: translateY(-50%); width: 20px; height: 20px; color: var(--ink-3); pointer-events: none; }
.finder-input input { min-height: 50px; padding-inline-start: 44px; font-size: 1.02rem; border-radius: 14px; }
.finder-hint { margin: 10px 2px 0; }
.finder-results { list-style: none; margin: 12px 0 0; padding: 0; display: grid; gap: 8px; }
.finder-item { display: flex; align-items: center; gap: 14px; padding: 13px 16px; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--surface); transition: border-color .15s, background-color .15s; }
.finder-item:hover { border-color: var(--brand-line); background: var(--brand-tint); }
.fi-main { flex: 1; min-width: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; }
.fi-main b { font-weight: 650; line-height: 1.7; }
.fi-main small { flex-basis: 100%; color: var(--ink-3); font-size: .82rem; }
.fi-reason { flex-basis: 100%; margin: 4px 0 0; color: var(--accent-ink); font-size: .86rem; }
.fi-acts { display: flex; gap: 6px; flex: none; }
.tag-hi { background: var(--ok-soft); color: var(--ok); }
.tag-lo { background: var(--muted-soft); color: var(--ink-3); }
.tag-mem { background: var(--accent-soft); color: var(--accent-ink); }
.finder-ai { margin-top: 14px; padding: 14px; border-radius: var(--r-md); background: var(--accent-soft); border: 1px solid #ecd3ca; }
.finder-ai h3 { font-size: .95rem; color: var(--accent-ink); }
.finder-ai .finder-results { margin-top: 8px; }
.review-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; }
.review-list li { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 9px 12px; border-radius: 10px; background: var(--paper); }
.review-list a { display: flex; flex-direction: column; color: var(--ink); min-width: 0; }
.review-list a .small { color: var(--ink-3); }
.bulk-table td { vertical-align: top; }
.bulk-name { width: 28%; }
.bulk-opts { display: grid; gap: 6px; }
.bulk-opt { display: flex; gap: 10px; align-items: flex-start; padding: 8px 12px; border: 1px solid var(--line); border-radius: 10px; cursor: pointer; color: var(--ink); }
.bulk-opt input { margin-top: 6px; }
.bulk-opt span { display: flex; flex-direction: column; line-height: 1.6; }
.bulk-opt small { color: var(--ink-3); }
.bulk-opt em { font-style: normal; color: var(--accent-ink); }
.bulk-opt:has(input:checked) { border-color: var(--brand); background: var(--brand-tint); }
.bulk-opt.none { color: var(--ink-3); }
.find-id { display: block; margin-top: 4px; min-height: 26px; padding: 0 6px; font-size: .76rem; color: var(--brand); }
.stuff-modal { position: fixed; inset: 0; z-index: 120; display: grid; place-items: start center; padding: 6vh 16px 16px; }
.stuff-modal[hidden] { display: none; }
.sm-backdrop { position: absolute; inset: 0; background: rgba(27, 40, 54, .45); backdrop-filter: blur(2px); }
.sm-panel { position: relative; width: min(760px, 100%); max-height: 86vh; overflow: auto; background: var(--surface); border-radius: var(--r-xl); box-shadow: var(--e3); padding: 18px 20px 20px; }
.sm-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
body.modal-open { overflow: hidden; }
@media (max-width: 700px) { .finder-item { flex-direction: column; align-items: stretch; } .fi-acts { justify-content: flex-end; } .finder-bar { flex-wrap: wrap; } }
.form-stack > label.check-row { flex-direction: row; align-items: flex-start; font-weight: 500; }
.bulk-opt b, .review-list b { color: var(--ink); font-weight: 650; }

.tag-own { background: var(--brand-soft); color: var(--brand-deep); }
.finder-groups { margin-top: 18px; padding-top: 16px; border-top: 1px dashed var(--line); }
.finder-groups h3 { font-size: .98rem; margin-bottom: 4px; }
.group-list { list-style: none; padding: 0; margin: 10px 0 0; display: grid; gap: 8px; }
.group-list li { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 14px; border-radius: var(--r-md); background: var(--paper); border: 1px solid var(--line-2); }
.group-list li > div { display: flex; flex-direction: column; line-height: 1.7; min-width: 0; }
.group-list small { color: var(--ink-3); }
.g-ex { color: var(--ink-2); font-size: .84rem; }
.bulk-cat { display: block; margin-top: 6px; color: var(--accent-ink); font-size: .82rem; }
.bulk-cat b { color: var(--accent-ink); }

/* ───── فیلتر دوره، کارهای گروهی، الگوهای اکسل، مغایرت‌گیری ───── */
.period-bar { padding: 14px 16px; margin-bottom: 14px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); box-shadow: var(--e1); }
.period-bar label { display: flex; flex-direction: column; gap: 6px; font-size: .82rem; color: var(--ink-2); min-width: 130px; }
.period-bar label.grow { flex: 1 1 240px; }
.period-bar select:disabled { opacity: .55; }
.card .period-bar { box-shadow: none; padding: 0 0 16px; border: 0; border-bottom: 1px solid var(--line-2); border-radius: 0; }
th.sel, td.sel { width: 44px; text-align: center; padding-inline: 8px !important; }
th.sel input, td.sel input { width: 17px; height: 17px; accent-color: var(--brand); cursor: pointer; vertical-align: middle; }
.bulk-bar { position: sticky; top: 8px; z-index: 5; display: flex; align-items: center; flex-wrap: wrap; gap: 8px; padding: 10px 14px; margin-bottom: 12px;
  background: var(--brand-deep); color: #fff; border-radius: var(--r-md); box-shadow: var(--e2); }
.bulk-bar[hidden] { display: none; }
.bulk-bar b { margin-inline-end: auto; font-weight: 600; }
.bulk-bar .btn { background: rgba(255,255,255,.1); color: #fff; border-color: rgba(255,255,255,.18); }
.bulk-bar .btn:hover { background: rgba(255,255,255,.18); }
.bulk-bar .btn.primary { background: var(--accent); border-color: var(--accent); color: var(--brand-deep); }
.bulk-bar .btn.danger { color: #ffd9d3; }
.bulk-report { font-size: .88rem; }
.bulk-report ul { margin: 6px 0 0; padding-inline-start: 18px; }
.map-table td { vertical-align: middle; }
.map-table select, .map-table input { width: 100%; min-width: 150px; }
.map-table td:last-child { max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.req { color: var(--err); }
.muted { color: var(--ink-3); }
.pad { padding: 10px 18px; margin: 0; }
.rec-form { margin-bottom: 22px; }
.rec-sources { margin-top: 16px; }
.rec-src { margin: 0; padding: 16px 18px 6px; border: 1px dashed var(--brand-line); border-radius: var(--r-md); background: var(--brand-tint); display: grid; gap: 12px; }
.rec-src legend { display: inline-flex; align-items: center; gap: 8px; padding: 0 8px; font-weight: 600; color: var(--brand-deep); }
.rec-src legend svg { width: 18px; height: 18px; color: var(--accent-ink); }
.rec-src .hint { margin: 0; }
.rec-submit { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 16px; }
.rec-head { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; margin: 6px 0 12px; }
.rec-head h2 { margin: 0; font-size: 1.15rem; }
.rec-drafts { display: flex; align-items: flex-end; flex-wrap: wrap; gap: 12px; padding: 16px 18px; border-top: 1px solid var(--line-2); background: var(--brand-tint); }
.rec-drafts .f { flex: 1 1 320px; }
.rec-drafts .hint { flex-basis: 100%; margin: 0; }
.warn-num { color: var(--err) !important; font-weight: 600; }
section.card.flush + section.card.flush { margin-top: 16px; }
.period-switch { display: inline-flex; gap: 4px; padding: 4px; background: var(--muted-soft); border-radius: var(--r-sm); }
.period-switch a { padding: 6px 12px; border-radius: var(--r-xs); color: var(--ink-2); font-size: .86rem; }
.period-switch a.on { background: var(--surface); color: var(--brand-deep); box-shadow: var(--e1); font-weight: 600; }
.period-title { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin: 4px 0 12px; }
.period-title h2 { margin: 0; font-size: 1.05rem; }
@media (max-width: 760px) { .bulk-bar b { flex-basis: 100%; } .rec-submit { flex-direction: column-reverse; align-items: stretch; } }
.ledger .figure.money-figure { font-size: 1.35rem; letter-spacing: 0; }
.empty-cell svg { width: 18px; height: 18px; vertical-align: -4px; color: var(--ok); }
p.empty-cell { margin: 0; padding: 22px 18px; text-align: center; }

/* ───── ربات بله ───── */
.bale-steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-bottom: 18px; }
.bale-step { display: flex; gap: 12px; align-items: flex-start; padding: 16px 18px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); box-shadow: var(--e1); }
.bale-step .step-no { flex: none; display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--brand-soft); color: var(--brand-deep); font-weight: 700; }
.bale-step b { display: block; margin-bottom: 3px; }
.bale-step small { color: var(--ink-3); line-height: 1.7; }
.bale-code { display: grid; gap: 6px; justify-items: center; padding: 20px; margin-bottom: 14px; border: 1px dashed var(--accent); border-radius: var(--r-md); background: var(--accent-soft); }
.bale-code span { color: var(--ink-2); font-size: .88rem; }
.bale-code b { font-size: 2rem; letter-spacing: .28em; color: var(--brand-deep); font-family: var(--f-code); }
.bale-code small { color: var(--ink-3); }
.bale-sample { padding: 14px 16px; border-radius: var(--r-sm); background: var(--brand-tint); border: 1px solid var(--brand-line); line-height: 2; margin-bottom: 12px; }
.bale-log { margin-top: 14px; }
.bale-log pre { max-height: 220px; overflow: auto; font-size: .78rem; background: var(--muted-soft); padding: 10px; border-radius: var(--r-xs); white-space: pre-wrap; }
@media (max-width: 760px) { .bale-steps { grid-template-columns: 1fr; } }
.box + .bale-steps { margin-top: 14px; }

/* ───── ورود هوشمند، کنترل کالا، ابزار کلید ───── */
.keyform:has(input[name=kind][value=natural]:checked) .legal-only { display: none; }
.keyform:not(:has(input[name=kind][value=natural]:checked)) .natural-only { display: none; }
.map-card { padding: 0; margin-bottom: 16px; }
.map-card > summary { cursor: pointer; padding: 16px 20px; list-style: none; }
.map-card > summary::-webkit-details-marker { display: none; }
.map-card[open] > summary { border-bottom: 1px solid var(--line-2); }
.map-form { padding: 16px 20px; display: grid; gap: 14px; }
.map-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; }
.fix-table td { vertical-align: top; padding: 6px 8px !important; }
.fix-table input, .fix-table select { font-size: .85rem; padding: 6px 8px; min-width: 90px; width: 100%; }
.fix-table input[type=checkbox] { width: auto; min-width: 0; padding: 0; }
.fix-table .check-row { margin-top: 6px; align-items: center; }
.fix-table tr.fix-row td { border-bottom: 0 !important; }
.fix-table tr.fix-msg td { padding-top: 0 !important; font-size: .82rem; line-height: 1.8; }
.fix-table tr.fix-row.error td:first-child { box-shadow: inset -3px 0 0 var(--err); }
.fix-table tr.fix-row.warn td:first-child { box-shadow: inset -3px 0 0 var(--warn); }
.cell-bad input, .cell-bad select { border-color: var(--err) !important; background: var(--err-soft); }
.cell-warn input, .cell-warn select { border-color: #d9a441 !important; background: var(--warn-soft); }
.msg-err { color: var(--err); }
.msg-warn { color: var(--warn); }
.msg-info { color: var(--ink-3); }
.import-actions { display: flex; justify-content: space-between; align-items: center; gap: 14px; flex-wrap: wrap; margin-top: 16px; }
.import-opts { display: grid; gap: 8px; }
.check-card { margin-bottom: 14px; display: grid; gap: 10px; }
.check-box { margin: 0; }
.check-box ul { margin: 6px 0 0; padding-inline-start: 20px; }
.check-box .check-row { margin-top: 10px; }
.official-line { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: .9rem; }

/* One interface family, including form controls, codes and signing previews. */
body,input,select,textarea,button,code,pre,bdi,.mono,.ltr,.key-text textarea,.key-history-text textarea{font-family:"IRANSansXV",Tahoma,sans-serif!important;}
