:root {
  /* ── vault gold theme — global tokens (mirrors wizard-theme vault) ── */
  --bg: #f3f1ec;
  --surface: #ffffff;
  --surface-alt: #f7f5f1;
  --field: #f7f5f1;
  --chip: #f1eee8;
  --track-bg: #faf8f4;
  --text: #211d17;
  --ink: #211d17;
  --ink-2: #5f584c;
  --muted: #5f584c;
  --border: #ebe6dc;
  --line: #ebe6dc;
  --nav-bg: #ffffff;
  --gold: #a9803b;
  --gold-hover: #946b27;
  --gold-soft: #f6edda;
  --accent: #a9803b;
  --on-accent: #fff8ec;
  --accent-ink: #946b27;
  --accent-soft: #f6edda;
  --accent-ring: rgba(169, 128, 59, .18);
  --green: #1f7a52;
  --red: #b23a2b;
  --amber: #8c6727;
  --blue: #2f6bbf;
  /* semantic backgrounds + dark hero (tokenized so theme controls them) */
  --green-bg: #e8f5ee;
  --amber-bg: #fff3d7;
  --red-bg: #fdecec;
  --hero-1: #211d17;
  --hero-2: #3a3023;
  --hero-ink: #f7eede;
  --hero-mid: #2e2820;
  --hero-border: #4a3d28;
  --hero-empty-1: #2a2118;
  --hero-empty-2: #3a2c1c;
  /* cash / treasury navy accent (surface + accent pair, follows theme) */
  --cash: #33507a;
  --cash-strong: #0c447c;
  --cash-on: #b5d4f4;
  --cash-soft: #eef1f6;
  /* soft gold stat-icon gradient (brand surface, follows theme) */
  --gold-icon-1: #fff8e8;
  --gold-icon-2: #f5e4b8;
  /* category palette (transaction rows / badges) */
  --cat-sell: #1f7a52; --cat-sell-bg: #e9f4ee;
  --cat-buy:  #b23a2b; --cat-buy-bg:  #f9ebe8;
  --cat-recv: #2f6bbf; --cat-recv-bg: #ebf1fa;
  --cat-pay:  #7d54b8; --cat-pay-bg:  #f1ebfa;
  --cat-exp:  #8c6727; --cat-exp-bg:  #f3ead7;
  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 22px;
  --shadow-sm: 0 2px 5px rgba(72, 53, 28, .05), 0 8px 20px rgba(72, 53, 28, .06);
  --shadow: 0 2px 4px rgba(72, 53, 28, .04), 0 14px 34px rgba(72, 53, 28, .09);
  --shadow-lifted: 0 5px 10px rgba(72, 53, 28, .06), 0 20px 42px rgba(72, 53, 28, .13);
  --transition: 160ms ease;
}

/* Theme variant: مرکوری — applied app-wide via <html data-app-theme>. Vault is the
   :root default; this overrides token VALUES when mercury is selected so every
   page (not just the wizard) reflects the chosen theme. WCAG AA kept on text. */
[data-app-theme="mercury"] {
  --bg: #f4f6f8;
  --surface: #ffffff;
  --surface-alt: #f8fafc;
  --field: #f8fafc;
  --chip: #f1f4f7;
  --track-bg: #f8fafc;
  --text: #0e1726;
  --ink: #0e1726;
  --ink-2: #4d5867;
  --muted: #4d5867;
  --border: #e6eaef;
  --line: #e6eaef;
  --nav-bg: #ffffff;
  --gold: #1b2940;
  --gold-hover: #0e1726;
  --gold-soft: #eef1f5;
  --accent: #1b2940;
  --on-accent: #ffffff;
  --accent-ink: #97701f;
  --accent-soft: #faf3e3;
  --accent-ring: rgba(14, 23, 38, .13);
  --green: #1f8a5b;
  --red: #c0392b;
  --amber: #b97e10;
  --blue: #2a6fdb;
  --green-bg: #e8f5ee;
  --amber-bg: #fdf3df;
  --red-bg: #fbecea;
  --hero-1: #1b2433;
  --hero-2: #0e1726;
  --hero-ink: #eef2f7;
  --hero-mid: #141d2c;
  --hero-border: #2b3852;
  --hero-empty-1: #222d42;
  --hero-empty-2: #131c2e;
  --cash: #2d5aa0;
  --cash-strong: #1e4785;
  --cash-on: #cfe0f7;
  --cash-soft: #eaf1fc;
  --gold-icon-1: #eef1f5;
  --gold-icon-2: #d8e0ea;
  --cat-sell: #1f8a5b; --cat-sell-bg: #e8f5ee;
  --cat-buy:  #c0392b; --cat-buy-bg:  #fbecea;
  --cat-recv: #2a6fdb; --cat-recv-bg: #eaf1fc;
  --cat-pay:  #8a5cc4; --cat-pay-bg:  #f2ecfb;
  --cat-exp:  #b97e10; --cat-exp-bg:  #f3ead7;
}

* { box-sizing: border-box; }

html { min-height: 100%; }

body {
  min-height: 100%;
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: Vazirmatn, Tahoma, sans-serif;
  font-size: 15px;
  line-height: 1.65;
  letter-spacing: 0;
  overflow-x: clip;
}

a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; }

.app-header {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  height: 64px;
  padding: 0 18px;
  background: var(--nav-bg);
  border-bottom: 1px solid var(--border);
}

.brand-lockup { display: flex; align-items: center; gap: 10px; }
.brand-lockup strong { display: block; font-size: 17px; font-weight: 800; line-height: 1.2; }
.brand-lockup small { display: block; color: var(--muted); font-size: 11px; }

.brand-mark, .brand-orb {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: var(--gold);
}

.brand-mark::before, .brand-orb::before {
  content: "";
  width: 14px;
  height: 14px;
  border: 2px solid #fff;
  transform: rotate(45deg);
}

.brand-mark.large { width: 52px; height: 52px; margin-bottom: 14px; }
.brand-orb { background: var(--gold-soft); }
.brand-orb::before { border-color: var(--gold); }

.page-container {
  width: min(100%, 920px);
  margin: 0 auto;
  padding: 24px 16px calc(160px + env(safe-area-inset-bottom, 0px));
}

.hero-heading, .page-title {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 0 0 24px;
}

.hero-heading > div, .page-title > div { flex: 1; min-width: 0; }
.hero-heading h1, .page-title h1, .welcome-card h1 {
  margin: 0;
  font-size: clamp(27px, 7vw, 38px);
  font-weight: 850;
  line-height: 1.25;
}

.hero-heading p, .welcome-card p, .card-heading p, .receipt-header p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.eyebrow {
  display: block;
  margin-bottom: 3px;
  color: var(--gold);
  font-size: 12px;
  font-weight: 800;
}

.lux-card, .luxury-panel, .receipt-card, .filter-panel, .transaction-row,
.payment-summary, .stat-card, .operation-card, .welcome-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.lux-card, .luxury-panel, .receipt-card, .filter-panel {
  padding: 20px;
  margin-bottom: 16px;
}

.card-heading, .receipt-header {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 18px;
}

.section-title { margin-bottom: 16px; }
.section-title h2 { margin: 0; font-size: 18px; font-weight: 850; }
.section-title p { margin: 3px 0 0; color: var(--muted); font-size: 12px; }

.card-heading h2, .receipt-header h2, .ornament-title h2 {
  margin: 0;
  font-size: 19px;
  font-weight: 850;
}

.gold-icon, .operation-icon, .profile-orb {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: var(--gold-soft);
  color: var(--gold);
}

.gold-icon::before, .operation-icon::before, .profile-orb::before, .nav-symbol::before {
  content: "";
  width: 15px;
  height: 15px;
  border: 2px solid currentColor;
  border-radius: 4px;
}

.tag-icon::before, .gem-icon::before { transform: rotate(45deg); }
.user-icon::before, .account-icon::before, .profile-orb::before { border-radius: 50%; }

.stepper {
  position: sticky;
  top: 64px;
  z-index: 20;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin: -8px -16px 20px;
  padding: 12px 16px;
  background: var(--nav-bg);
  border-bottom: 1px solid var(--border);
}

.stepper-line { display: none; }
.stepper-item { display: grid; gap: 4px; color: var(--muted); font-weight: 750; }
.stepper-item span {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #fff;
  border: 1px solid var(--border);
  font-size: 13px;
}
.stepper-item small { font-size: 11px; }
.stepper-item.is-active { color: var(--text); }
.stepper-item.is-active span, .stepper-item.is-complete span {
  color: #fff;
  background: var(--gold);
  border-color: var(--gold);
}

/* Wizard stepper (form.html): completed mark drawn as a CSS character, not an
   SVG — prevents the oversized checkmark that was breaking page placement. */
.wizard-shell .step .dot-check { display: none !important; }
/* completed step = filled gold circle keeping its number; no checkmark */

/* Steps hide by default (no .wizard-ready dependency) so a JS-less/stale-JS
   render shows only the active step instead of dumping everything flat. */
.form-step { display: none; }
.form-step.is-active { display: block; }
.wizard-ready .form-step.is-active { animation: stepIn 150ms ease-out; }
@keyframes stepIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: translateY(0); } }

.field { min-width: 0; margin-bottom: 14px; }
label { display: block; margin-bottom: 6px; color: #4e4e4e; font-size: 13px; font-weight: 750; }
.field-label { margin-bottom: 7px; color: #4e4e4e; font-size: 13px; font-weight: 750; }
.required-mark { margin-inline-start: 2px; color: var(--red); font-weight: 900; }
.is-client-invalid { outline: 2px solid var(--red); outline-offset: 3px; border-radius: 8px; }
.draft-actions { display: inline-flex; align-items: center; gap: 8px; }
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
[hidden] { display: none !important; }

input:not([type="checkbox"]):not([type="radio"]):not([type="file"]):not([type="color"]), select, textarea {
  width: 100%;
  min-height: 52px;
  border: 1px solid #d8d6d0;
  border-radius: 8px;
  background: #fff;
  color: var(--text);
  padding: 11px 13px;
  font-size: 16px;
}
input[data-jalali-date], input[data-jalali-datetime] { text-align: left; }

textarea { min-height: 96px; resize: vertical; }
input:not([type="checkbox"]):not([type="radio"]):not([type="file"]):not([type="color"]):focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(173,123,34,.12);
}

.input-suffix { position: relative; }
.input-suffix input { padding-left: 70px; width: 100%; }
.input-suffix span {
  position: absolute;
  left: 10px;
  top: 50%;
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
  transform: translateY(-50%);
  pointer-events: none;
}

.operation-selector ul {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  padding: 0;
  margin: 0;
  list-style: none;
}
.operation-selector label {
  display: grid;
  place-items: center;
  gap: 5px;
  min-height: 76px;
  margin: 0;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fff;
  color: var(--text);
  cursor: pointer;
}
.operation-selector label::before {
  content: "";
  width: 18px;
  height: 18px;
  border: 2px solid var(--gold);
  border-radius: 4px;
}
.operation-selector label:has(input[value="buy"])::before { transform: rotate(45deg); }
.operation-selector label:has(input[value="sell"])::before { border-radius: 50%; }
.operation-selector label:has(input[value="payment"])::before { border-width: 2px 2px 5px; }
.operation-selector label:has(input[value="receipt"])::before { border-style: dashed; }
.operation-selector label:has(input:checked) {
  border-color: var(--gold);
  background: var(--gold-soft);
  color: var(--gold-hover);
}
.operation-selector input { position: absolute; opacity: 0; pointer-events: none; }

/* ─── Operation picker — redesign op-pick cards (icon + label) ─────── */
/* نوع عملیات — full-width navy pill selector that opens a bottom sheet.
   Radios stay in the DOM (.op-radio-store) so validation, flow config,
   draft-restore and the review summary keep working. */
.op-select { margin-top: 10px; }
.op-trigger {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 56px;
  padding: 12px 16px;
  cursor: pointer;
  text-align: right;
  color: var(--on-accent);
  background: var(--accent);
  border: 1.5px solid var(--accent);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  transition: filter var(--transition), transform var(--transition), box-shadow var(--transition);
}
.op-trigger:hover { filter: brightness(1.07); }
.op-trigger:active { transform: translateY(1px); }
.op-trigger:focus-visible { outline: none; box-shadow: 0 0 0 3px var(--accent-ring); }
.op-trigger-ic {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  flex: 0 0 auto;
  border-radius: 12px;
  background: rgba(255, 255, 255, .12);
  color: #c2a24a;
}
.op-trigger-ic:empty { display: none; }
.op-trigger-ic .ui-icon { width: 22px; height: 22px; color: inherit; }
.op-trigger-text {
  flex: 1 1 auto;
  min-width: 0;
  font-size: 16px;
  font-weight: 800;
  color: var(--on-accent);
}
.op-trigger.is-placeholder .op-trigger-text { font-weight: 700; opacity: .8; }
.op-trigger-chev {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  color: #c2a24a;
}
.op-trigger-chev .ui-icon { width: 20px; height: 20px; transform: rotate(-90deg); }
.op-select.is-client-invalid .op-trigger,
.op-select.is-invalid .op-trigger {
  border-color: var(--red);
  box-shadow: 0 0 0 3px var(--red-bg);
}
/* radios kept reachable for validation/flow but visually hidden (no [hidden]) */
.op-radio-store {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

.field-grid, .filter-grid, .detail-grid, .payment-card-fields {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

.segmented { margin: 8px 0 16px; }
.segmented ul {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(80px, 1fr));
  gap: 8px;
  padding: 0;
  margin: 0;
  list-style: none;
}
.segmented input[type="radio"],
.segmented input[type="checkbox"] {
  position: absolute;
  opacity: 0;
  pointer-events: none;
  width: 1px;
  height: 1px;
  margin: 0;
}
.segmented label {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 58px;
  margin: 0;
  padding: 10px 12px;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  background: #fff;
  color: var(--muted);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background var(--transition), border-color var(--transition), color var(--transition);
}
.segmented label:hover {
  border-color: var(--op-color);
  background: var(--op-soft);
  color: var(--op-color);
}
.segmented label:has(input:checked) {
  border-color: var(--op-color);
  color: var(--op-color);
  background: var(--op-soft);
  font-weight: 800;
}

.product-panel {
  margin-top: 14px;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface-alt);
}
.product-panel h3 { margin: 0 0 14px; font-size: 16px; font-weight: 800; }
.payment-card {
  margin-bottom: 12px;
  padding: 14px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: 0 1px 3px rgba(20,20,20,.06);
}
.payment-card input[type="checkbox"][name$="-DELETE"] { display: none; }
.payment-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
  padding-bottom: 9px;
  border-bottom: 1px solid var(--border);
}
.payment-card-header strong { font-size: 14px; }
.payment-delete {
  display: grid;
  place-items: center;
  width: 42px;
  min-height: 42px;
  padding: 0;
  border: 1px solid #efcaca;
  border-radius: 8px;
  background: #fff;
  color: var(--red);
  cursor: pointer;
}
.payment-delete span {
  width: 13px;
  height: 15px;
  border: 2px solid currentColor;
  border-top: 0;
  border-radius: 0 0 3px 3px;
}
.payment-delete:disabled { opacity: .35; cursor: not-allowed; }
.payment-core { display: grid; grid-template-columns: 1fr; gap: 8px 10px; }
@media (min-width: 480px) { .payment-core { grid-template-columns: 1fr 1fr; } }
.pc-amount-wrap[hidden] { display: none; }

.btn-primary, .btn-secondary, .btn-danger, .ghost-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  border-radius: 8px;
  border: 1px solid transparent;
  padding: 9px 16px;
  font-weight: 800;
  cursor: pointer;
}
.btn-primary { color: #fff; background: var(--gold); }
.btn-primary:hover { background: var(--gold-hover); }
.btn-secondary, .ghost-pill { color: var(--gold); background: #fff; border-color: #d6b97e; }
.btn-danger { color: #fff; background: var(--red); }
.btn-primary:active, .btn-secondary:active, .btn-danger:active { transform: translateY(1px); }
.tall { min-height: 54px; }
.compact { min-height: 40px; padding-inline: 13px; white-space: nowrap; }
.full { width: 100%; }

.wizard-actions {
  position: fixed;
  right: 0;
  bottom: 78px;
  left: 0;
  z-index: 60;
  display: flex;
  gap: 10px;
  padding: 12px 16px;
  background: var(--nav-bg);
  border-top: 1px solid var(--border);
  box-shadow: 0 -8px 24px rgba(20,20,20,.06);
}
.wizard-actions button {
  min-height: 46px;
  font-size: 15px;
  font-weight: 800;
  border-radius: var(--radius-md);
  gap: 8px;
}
.wizard-actions [data-prev-step] { flex: 0 0 34%; }
.wizard-actions [data-next-step],
.wizard-actions [data-submit-step] { flex: 1 1 auto; }
.wizard-actions [data-prev-step] {
  background: var(--surface-alt);
  color: var(--text);
  border-color: var(--border);
}
.wizard-actions [data-prev-step]:hover { background: #fff; border-color: var(--gold); color: var(--gold-hover); }
.wizard-actions .btn-icon { display: inline-flex; }
.wizard-actions .btn-icon .ui-icon { width: 18px; height: 18px; }
.wizard-actions.is-first-step [data-prev-step] { flex: 0 0 30%; }

.receipt-list, .detail-grid { display: grid; gap: 0; margin: 0; }
.receipt-list div, .detail-grid div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}
dt { color: var(--muted); font-size: 13px; }
dd { margin: 0; font-weight: 800; text-align: left; }
.receipt-total { color: var(--green); font-size: 18px; }
dd a { color: var(--gold-hover); text-decoration: underline; text-decoration-color: rgba(167,120,43,.35); }
dd a:hover { text-decoration-color: var(--gold-hover); }
.telegram-preview {
  margin-top: 16px;
  padding: 16px;
  border: 1px solid #cfe2d7;
  border-radius: 8px;
  background: #f7fbf8;
  white-space: pre-line;
}
.telegram-preview strong, .telegram-preview span { color: var(--blue); }

.welcome-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 20px;
  margin-bottom: 18px;
}
.operation-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 18px;
}
.operation-card {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 72px;
  padding: 14px;
}
.operation-card strong { font-size: 16px; font-weight: 800; }
.operation-icon { width: 38px; height: 38px; }

.stats-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 20px;
}
.stat-card { padding: 14px; }
.stat-card span, .transaction-row span, .payment-summary span { color: var(--muted); font-size: 12px; }
.stat-card strong { display: block; margin-top: 5px; font-size: 22px; font-weight: 850; }
.wide-stat { grid-column: 1 / -1; }
.receipt-total-card strong { color: var(--green); }

.ornament-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 22px 0 12px;
}
.ornament-title span { display: none; }
.ornament-title h2 { font-size: 18px; }

.list-stack, .stack-form, .lux-form { display: grid; gap: 10px; }
.transaction-row, .payment-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px;
}
.row-medallion {
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: var(--radius-sm);
  background: var(--op-soft);
  color: var(--op-color);
}
.row-medallion .ui-icon { width: 19px; height: 19px; }
.row-main { min-width: 0; flex: 1; }
.transaction-row strong, .payment-summary strong { display: block; font-weight: 800; }
.row-meta { display: grid; justify-items: end; gap: 5px; min-width: 84px; }

.badge {
  display: inline-flex;
  min-height: 23px;
  align-items: center;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
}
.success { color: var(--green); background: var(--green-bg); }
.warning { color: var(--amber); background: var(--amber-bg); }
.danger, .error { color: var(--red); background: var(--red-bg); }
.muted-row { opacity: .65; }

/* #معامله_باز — open deal: must read as urgent at a glance, not a subtle badge */
.transaction-row.is-open-deal {
  border-inline-start: 4px solid var(--red);
  background: #fdf4f4;
}
.badge.open-deal {
  display: flex;
  width: fit-content;
  align-items: center;
  gap: 5px;
  margin-top: 6px;
  padding: 3px 10px;
  color: #fff;
  background: var(--red);
  font-size: 11px;
  font-weight: 800;
  white-space: nowrap;
}
.badge.open-deal .ui-icon { width: 13px; height: 13px; }

.field-checkbox {
  display: flex;
  align-items: center;
}
.field-checkbox label {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-weight: 700;
}
.field-checkbox input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--red);
}
.receipt-line-card { background: var(--surface-alt); box-shadow: none; }
.mini-form { display: grid; grid-template-columns: minmax(90px,1fr) auto; gap: 8px; }
.inline-form { display: grid; gap: 10px; margin-bottom: 16px; }
.danger-zone { padding-top: 16px; border-top: 1px solid var(--border); }
.filter-grid { margin: 8px 0; }

.messages { display: grid; gap: 8px; margin-bottom: 14px; }
.message {
  border-radius: 8px;
  padding: 11px 13px;
  background: #eef7f1;
  color: var(--green);
  border: 1px solid currentColor;
  font-weight: 750;
}
.errorlist { margin: 5px 0 0; padding: 0; color: var(--red); list-style: none; font-size: 12px; }
.empty-state {
  margin: 0;
  padding: 22px;
  color: var(--muted);
  text-align: center;
  background: #fff;
  border: 1px dashed var(--border);
  border-radius: 8px;
}
.pagination { display: flex; justify-content: center; gap: 14px; margin-top: 18px; color: var(--muted); }

.login-shell { min-height: calc(100vh - 48px); display: grid; place-items: center; }
.login-panel { width: min(100%, 420px); }
.login-title { margin-bottom: 22px; text-align: center; }
.login-title h1 { margin: 0; font-size: 34px; font-weight: 850; }
.login-title p { margin: 6px 0 0; color: var(--muted); }

.bottom-nav {
  position: fixed;
  inset-inline: 0;
  bottom: 0;
  z-index: 50;
  width: min(100%, 920px);
  margin-inline: auto;
  box-sizing: border-box;
  display: grid;
  grid-template-columns: repeat(5,1fr);
  height: 78px;
  padding: 7px 8px;
  border-top: 1px solid var(--border);
  background: var(--nav-bg);
}
.nav-item { display: grid; place-items: center; gap: 2px; color: #5f5f5f; font-size: 11px; font-weight: 750; }
.nav-symbol { display: grid; place-items: center; width: 20px; height: 20px; color: currentColor; }
.home-symbol::before { transform: rotate(45deg); }
.nav-primary { color: var(--gold); }
.nav-plus {
  position: relative;
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--gold);
}
.nav-plus::before, .nav-plus::after {
  content: "";
  position: absolute;
  width: 18px;
  height: 3px;
  border-radius: 99px;
  background: #fff;
}
.nav-plus::after { transform: rotate(90deg); }
.settings-symbol::before { content: "⚙"; font-size: 20px; }

.brand-logo {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  object-fit: contain;
  background: #fff;
  border: 1px solid var(--border);
  flex: 0 0 auto;
}
.logo-preview {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px;
  background: var(--surface-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  margin-bottom: 10px;
}
.logo-preview img { width: 64px; height: 64px; object-fit: contain; border-radius: 8px; background: #fff; border: 1px solid var(--border); }
.logo-preview p { margin: 0; color: var(--muted); font-size: 12px; }
.settings-form { display: grid; gap: 12px; padding-bottom: 30px; }
.settings-tabs { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 8px; margin-bottom: 16px; }
.settings-subtabs { grid-template-columns: 1fr 1fr; margin-top: -6px; }
.settings-subtabs a { font-size: 13px; min-height: 40px; }
.workflow-settings-card .card-heading { margin-bottom: 8px; }
.toggle-list { display: grid; gap: 0; }
.requirement-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-height: 62px;
  margin: 0;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
}
.requirement-toggle:last-child { border-bottom: 0; }
.requirement-toggle strong { display: block; color: var(--text); font-size: 14px; }
.requirement-toggle small { display: block; margin-top: 3px; color: var(--muted); font-size: 11px; }
.requirement-toggle input {
  width: 44px;
  height: 24px;
  min-height: 24px;
  accent-color: var(--gold);
}
.core-fields-note {
  padding: 14px 16px;
  color: #5c4a25;
  background: #fbf7ee;
  border: 1px solid #e6d6b5;
  border-radius: 8px;
  font-size: 12px;
  line-height: 1.9;
}

@media (min-width: 720px) {
  .page-container { padding-inline: 24px; }
  .field-grid, .filter-grid, .payment-card-fields { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .detail-grid { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 0 18px; }
  .stats-grid { grid-template-columns: repeat(4,minmax(0,1fr)); }
  .operation-grid { grid-template-columns: repeat(4,minmax(0,1fr)); }
  .operation-selector ul { grid-template-columns: repeat(4,minmax(0,1fr)); }
  .inline-form { grid-template-columns: 1fr auto; }
  .wizard-actions {
    right: auto;
    bottom: 16px;
    left: 50%;
    width: min(calc(100% - 32px), 920px);
    transform: translateX(-50%);
    border: 1px solid var(--border);
    border-radius: 8px;
  }
}

/* Premium visual refinement: shared surfaces, icons, and interaction states. */
.icon-sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.ui-icon {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

body {
  background:
    radial-gradient(circle at 85% -10%, rgba(195, 158, 91, .15), transparent 34rem),
    linear-gradient(180deg, #faf7f1 0, var(--bg) 32rem);
}

.app-header {
  background: var(--nav-bg);
  box-shadow: 0 1px 0 rgba(255,255,255,.6), 0 8px 24px rgba(33,29,23,.06);
}

.brand-mark, .brand-orb {
  border: 1px solid rgba(255,255,255,.55);
  border-radius: 12px;
  background: linear-gradient(145deg, var(--gold), var(--gold-hover));
  color: var(--on-accent, #fffaf0);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.5), 0 7px 16px rgba(112,76,26,.2);
}
.brand-mark::before, .brand-orb::before,
.gold-icon::before, .operation-icon::before, .profile-orb::before, .nav-symbol::before { content: none; }
.brand-mark.large .ui-icon { width: 27px; height: 27px; }
.brand-orb {
  background: var(--gold-soft);
  color: var(--gold-hover);
  border-color: rgba(167,120,43,.2);
}

.lux-card, .luxury-panel, .receipt-card, .filter-panel, .transaction-row,
.payment-summary, .stat-card, .operation-card, .welcome-card {
  background: var(--surface);
  border-color: var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}

.gold-icon, .operation-icon, .profile-orb {
  border: 1px solid rgba(167,120,43,.2);
  border-radius: 12px;
  background: linear-gradient(145deg, #fffaf1, #ecddbf);
  color: var(--gold-hover);
  box-shadow: inset 0 1px 0 #fff, 0 6px 14px rgba(112,76,26,.1);
}
.profile-orb { width: 44px; height: 44px; }

.stepper {
  background: var(--nav-bg);
}

input:not([type="checkbox"]):not([type="radio"]):not([type="file"]):not([type="color"]), select, textarea {
  border-color: var(--border);
  border-radius: var(--radius-sm);
  background: var(--field);
  transition: border-color var(--transition), box-shadow var(--transition), background var(--transition);
}
input:not([type="checkbox"]):not([type="radio"]):not([type="file"]):not([type="color"]):focus, select:focus, textarea:focus {
  background: #fff;
  box-shadow: 0 0 0 4px rgba(167,120,43,.13), 0 5px 15px rgba(72,53,28,.06);
}

.operation-selector label {
  min-height: 86px;
  border-radius: var(--radius-md);
  background: linear-gradient(145deg, #fff, #fbf6ed);
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition), border-color var(--transition), box-shadow var(--transition), background var(--transition);
}
.operation-selector label::before {
  width: 24px;
  height: 24px;
  border: 0;
  border-radius: 0;
  background: var(--gold);
  transform: none !important;
  mask: var(--operation-icon) center / contain no-repeat;
}
.operation-selector label:has(input[value="buy"]) { --operation-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 4h2l2.4 11.2a2 2 0 0 0 2 1.6H18a2 2 0 0 0 2-1.6L21 8H7'/%3E%3Cpath d='M15 3v6M12 6h6'/%3E%3C/svg%3E"); }
.operation-selector label:has(input[value="sell"]) { --operation-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 13 12 21 3 12V4h8Z'/%3E%3Cpath d='M13 8h7M17 4l4 4-4 4'/%3E%3C/svg%3E"); }
.operation-selector label:has(input[value="payment"]) { --operation-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 6h15a2 2 0 0 1 2 2v11H5a2 2 0 0 1-2-2V6a3 3 0 0 1 3-3h11'/%3E%3Cpath d='m12 10 4 4m0-4v4h-4'/%3E%3C/svg%3E"); }
.operation-selector label:has(input[value="receipt"]) { --operation-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 6h15a2 2 0 0 1 2 2v11H5a2 2 0 0 1-2-2V6a3 3 0 0 1 3-3h11'/%3E%3Cpath d='m16 10-4 4m0-4v4h4'/%3E%3C/svg%3E"); }
.operation-selector label:has(input:checked) {
  background: linear-gradient(145deg, #fffaf0, #f0dfbd);
  box-shadow: inset 0 1px 0 #fff, 0 10px 24px rgba(112,76,26,.14);
}
.operation-selector label:active { transform: translateY(1px); box-shadow: var(--shadow-sm); }

.segmented label, .product-panel, .payment-card, .payment-delete, .core-fields-note { border-radius: var(--radius-md); }
.product-panel { background: linear-gradient(145deg, var(--surface-alt), #fffdf9); }
.payment-card { box-shadow: var(--shadow-sm); }
.payment-delete {
  background: #fffafa;
  transition: background var(--transition), transform var(--transition), box-shadow var(--transition);
}
.payment-delete span { width: auto; height: auto; border: 0; }
.payment-delete:hover { background: #fff0f0; box-shadow: 0 5px 12px rgba(159,69,69,.12); }

.btn-primary, .btn-secondary, .btn-danger, .ghost-pill {
  gap: 7px;
  border-radius: var(--radius-sm);
  transition: transform var(--transition), box-shadow var(--transition), background var(--transition), border-color var(--transition);
}
.btn-primary {
  color: var(--on-accent);
  background: linear-gradient(145deg, var(--gold), var(--gold-hover));
  box-shadow: inset 0 1px 0 rgba(255,255,255,.32), 0 8px 18px rgba(112,76,26,.2);
}
.btn-primary:hover { background: linear-gradient(145deg, var(--gold-hover), var(--gold)); transform: translateY(-1px); box-shadow: var(--shadow-lifted); }
.btn-secondary, .ghost-pill { color: var(--accent-ink); background: var(--surface); border-color: var(--border); box-shadow: 0 3px 9px rgba(72,53,28,.05); }
.btn-secondary:hover, .ghost-pill:hover { background: var(--accent-soft); border-color: var(--gold); transform: translateY(-1px); }
.btn-danger { background: linear-gradient(145deg, #ad5555, #8f3737); }
.btn-primary:focus-visible, .btn-secondary:focus-visible, .btn-danger:focus-visible, .ghost-pill:focus-visible,
.operation-card:focus-visible, .transaction-row:focus-visible, .nav-item:focus-visible, .payment-delete:focus-visible {
  outline: 3px solid var(--accent-ring);
  outline-offset: 3px;
}

.welcome-card {
  overflow: hidden;
  background:
    radial-gradient(circle at 8% 0%, var(--gold-soft), transparent 15rem),
    linear-gradient(145deg, var(--surface), var(--gold-soft));
}
.operation-card {
  min-height: 84px;
  padding: 14px 13px;
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
}
.operation-card span:last-child { min-width: 0; }
.operation-card strong { display: block; }
.operation-card small { display: block; margin-top: 1px; color: var(--muted); font-size: 10px; font-weight: 650; white-space: nowrap; }
.operation-card:hover { transform: translateY(-2px); border-color: var(--accent); box-shadow: var(--shadow-lifted); }
.operation-card:active { transform: translateY(0); box-shadow: var(--shadow-sm); }
.operation-icon { width: 42px; height: 42px; }
.stat-card { box-shadow: var(--shadow-sm); }

.transaction-row, .payment-summary { transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition); }
.transaction-row:hover { transform: translateY(-1px); border-color: var(--accent); box-shadow: var(--shadow-lifted); }
.row-medallion { box-shadow: inset 0 1px 0 rgba(255,255,255,.5); }

.bottom-nav {
  height: 80px;
  background: var(--nav-bg);
  box-shadow: 0 -10px 30px rgba(33,29,23,.08);
}
.nav-item {
  align-content: center;
  gap: 3px;
  min-width: 48px;
  color: #716a60;
  border-radius: 14px;
  transition: color var(--transition), background var(--transition), transform var(--transition);
}
.nav-item.is-current { color: var(--gold-hover); background: linear-gradient(180deg, rgba(245,234,212,.75), rgba(245,234,212,.18)); }
.nav-item:active { transform: scale(.97); }
.nav-symbol { width: 22px; height: 22px; }
.nav-plus {
  background: linear-gradient(145deg, #c3974c, #8d6222);
  color: #fff;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.4), 0 7px 16px rgba(112,76,26,.25);
}
.nav-plus::before, .nav-plus::after { content: none; }
.nav-plus .ui-icon { width: 22px; height: 22px; stroke-width: 2.1; }

@media (hover: none) {
  .operation-card:hover, .transaction-row:hover, .btn-primary:hover, .btn-secondary:hover, .ghost-pill:hover { transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    scroll-behavior: auto !important;
    transition-duration: .01ms !important;
    animation-duration: .01ms !important;
  }
}

/* Second-pass mobile and RTL polish. */
dd, .stat-card strong, .transaction-row strong, .payment-summary strong, .receipt-total {
  font-variant-numeric: tabular-nums;
}
.settings-tabs a { min-height: 48px; }

@media (max-width: 520px) {
  .hero-heading {
    align-items: flex-start;
    flex-wrap: wrap;
  }
  .hero-heading > .compact {
    min-height: 44px;
    margin-inline-start: auto;
  }
  .payment-summary {
    align-items: stretch;
    flex-direction: column;
  }
  .payment-summary .mini-form { width: 100%; }
  .settings-tabs { gap: 6px; }
  .settings-tabs a { padding-inline: 8px; font-size: 12px; text-align: center; }
}

@media (max-width: 380px) {
  .operation-grid { gap: 8px; }
  .operation-card { gap: 9px; padding-inline: 10px; }
  .operation-icon { width: 38px; height: 38px; }
  .operation-card strong { font-size: 14px; }
  .operation-card small { font-size: 9px; }
  .nav-item { font-size: 10px; }
}

/* ─── Payment tracker ─────────────────────────────────────────────────────── */
#payment-tracker {
  margin-bottom: 16px;
  padding: 14px 16px;
  background: var(--surface-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
}
.payment-tracker-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 5px 0;
  font-size: 13px;
}
.payment-tracker-row span { color: var(--muted); }
.payment-tracker-row strong { font-variant-numeric: tabular-nums; font-size: 14px; }
.payment-tracker-divider { height: 1px; background: var(--border); margin: 6px 0; }
.payment-tracker-remaining strong { font-size: 17px; font-weight: 900; }
.tracker-zero strong { color: var(--green); }
.tracker-positive strong { color: var(--red); }
.tracker-negative strong { color: var(--amber); }

/* ─── Amount in words (زیرِ فیلدهای پولیِ کلیدی) ────────────────────────── */
.amount-words {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
  direction: rtl;
  font-variant-numeric: normal;
}
.amount-words[hidden] { display: none; }

/* ─── Per-operation accent colors ─────────────────────────────────────────── */
:root {
  --op-color: var(--gold);
  --op-hover: var(--gold-hover);
  --op-soft: var(--gold-soft);
  --op-shadow: rgba(112,76,26,.18);
}
[data-op="buy"]     { --op-color:#2f6bbf; --op-hover:#1e4f96; --op-soft:#e8f0fc; --op-shadow:rgba(30,70,150,.16); }
[data-op="sell"]    { --op-color:#2e7d5a; --op-hover:#1e5c40; --op-soft:#e6f5ee; --op-shadow:rgba(20,80,50,.16); }
[data-op="payment"] { --op-color:#a03535; --op-hover:#7c2424; --op-soft:#fdeaea; --op-shadow:rgba(130,40,40,.16); }
[data-op="receipt"] { --op-color:#2a7a7a; --op-hover:#1d5a5a; --op-soft:#e6f5f5; --op-shadow:rgba(20,90,90,.16); }
[data-op="expense"] { --op-color:#8c6727; --op-hover:#6e4f1d; --op-soft:#efe4d2; --op-shadow:rgba(140,103,39,.16); }

/* Operation selector: unique per-type color when selected */
.operation-selector label:has(input[value="buy"]:checked)     { background:linear-gradient(145deg,#e8f0fc,#cfe0f7); border-color:#2f6bbf; color:#1e4f96; }
.operation-selector label:has(input[value="sell"]:checked)    { background:linear-gradient(145deg,#e6f5ee,#c9ecdb); border-color:#2e7d5a; color:#1e5c40; }
.operation-selector label:has(input[value="payment"]:checked) { background:linear-gradient(145deg,#fdeaea,#f6c9c9); border-color:#a03535; color:#7c2424; }
.operation-selector label:has(input[value="receipt"]:checked) { background:linear-gradient(145deg,#e6f5f5,#c5e9e9); border-color:#2a7a7a; color:#1d5a5a; }

/* Stepper uses op accent */
.stepper-item.is-active span, .stepper-item.is-complete span {
  background: var(--op-color);
  border-color: var(--op-color);
}

/* Focus ring uses op accent */
#transaction-form input:focus,
#transaction-form select:focus,
#transaction-form textarea:focus {
  border-color: var(--op-color);
  box-shadow: 0 0 0 4px rgba(from var(--op-color) r g b / .12), 0 5px 15px rgba(from var(--op-color) r g b / .06);
}

/* Primary button uses op accent */
#transaction-form .btn-primary {
  background: linear-gradient(145deg, color-mix(in srgb, var(--op-color) 85%, white), var(--op-hover));
  box-shadow: inset 0 1px 0 rgba(255,255,255,.28), 0 8px 18px var(--op-shadow);
}
#transaction-form .btn-primary:hover {
  background: linear-gradient(145deg, var(--op-color), var(--op-hover));
  box-shadow: 0 12px 28px var(--op-shadow);
}

/* Product panels get a colored top border */
.product-panel {
  border-top: 3px solid var(--op-color);
}

/* Section card top strip */
.lux-card#gold-operation-section { border-top: 3px solid var(--op-color); }

/* Gold total in review */
.review-calc-total { color: var(--op-color) !important; font-size: 20px; }

/* Review receipt op badge */
.review-receipt { position: relative; }
.review-op-badge {
  display: inline-flex;
  align-items: center;
  margin-bottom: 12px;
  min-height: 28px;
  padding: 3px 12px;
  border-radius: 999px;
  background: var(--op-soft);
  border: 1px solid var(--op-color);
  color: var(--op-hover);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: .02em;
}

/* Dashboard op cards: unique colors */
.operation-grid .operation-icon {
  border-radius: 12px;
  display: grid;
  place-items: center;
  border: 1px solid transparent;
  flex: 0 0 42px;
  padding: 4px;
}
.operation-grid a[href*="type=sell"]    .operation-icon { background:linear-gradient(145deg,#e6f5ee,#c9ecdb); color:#2e7d5a; border-color:rgba(46,125,90,.2); }
.operation-grid a[href*="type=buy"]     .operation-icon { background:linear-gradient(145deg,#e8f0fc,#cfe0f7); color:#2f6bbf; border-color:rgba(47,107,191,.2); }
.operation-grid a[href*="type=receipt"] .operation-icon { background:linear-gradient(145deg,#e6f5f5,#c5e9e9); color:#2a7a7a; border-color:rgba(42,122,122,.2); }
.operation-grid a[href*="type=payment"] .operation-icon { background:linear-gradient(145deg,#fdeaea,#f6c9c9); color:#a03535; border-color:rgba(160,53,53,.2); }
.operation-grid a[href*="type=sell"]    { border-color:rgba(46,125,90,.2); }
.operation-grid a[href*="type=buy"]     { border-color:rgba(47,107,191,.2); }
.operation-grid a[href*="type=receipt"] { border-color:rgba(42,122,122,.2); }
.operation-grid a[href*="type=payment"] { border-color:rgba(160,53,53,.2); }

.dashboard-section-label {
  font-size: 13px;
  font-weight: 800;
  color: var(--muted);
  margin: 16px 0 8px;
  letter-spacing: .02em;
}

.quick-links-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 20px;
}
.quick-link-card {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 11px 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  transition: all var(--transition);
}
.quick-link-card:hover { border-color: var(--gold); color: var(--gold-hover); transform: translateY(-1px); }
.quick-link-icon { display: grid; place-items: center; width: 18px; height: 18px; flex: 0 0 18px; }

/* Section title accent bar */
.lux-card .section-title h2::before {
  content: "";
  display: inline-block;
  width: 3px;
  height: 1em;
  margin-inline-end: 8px;
  border-radius: 2px;
  background: var(--op-color);
  vertical-align: middle;
  transition: background 200ms ease;
}

/* ─── Dashboard hero ────────────────────────────────────────────────────────── */
.dash-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 22px 20px 18px;
  margin-bottom: 4px;
  border-radius: var(--radius-lg);
  background:
    radial-gradient(circle at 8% 0%, var(--gold-soft), transparent 15rem),
    linear-gradient(145deg, var(--surface), var(--gold-soft));
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}
.dash-hero-text { min-width: 0; }
.dash-date {
  display: inline-flex;
  align-items: center;
  margin: 0 0 8px;
  padding: 3px 11px;
  border-radius: 999px;
  background: var(--gold-soft);
  font-size: 11px;
  font-weight: 800;
  color: var(--gold-hover);
  letter-spacing: .03em;
}
.dash-hero-text h1 {
  margin: 0 0 4px;
  font-size: 21px;
  font-weight: 850;
  line-height: 1.25;
}
.dash-sub { margin: 0; font-size: 13px; color: var(--muted); }
.dash-avatar {
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border-radius: 16px;
  background: linear-gradient(145deg, #fff9ee, #ead8b6);
  border: 1px solid rgba(167,120,43,.22);
  box-shadow: inset 0 1px 0 #fff;
  color: var(--gold);
}

.dash-ops-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 18px 0 8px;
  font-size: 13px;
  font-weight: 800;
  color: var(--muted);
  letter-spacing: .02em;
  text-transform: uppercase;
}
.dash-see-all {
  font-size: 12px;
  font-weight: 700;
  color: var(--gold);
  text-decoration: none;
  letter-spacing: 0;
}
.dash-see-all:hover { color: var(--gold-hover); text-decoration: underline; }
.dash-see-all-group { display: flex; align-items: center; gap: 10px; }

/* ─── Op cards: solid accent left border ────────────────────────────────────── */
.operation-card {
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-start;
  gap: 12px;
  min-height: 104px;
  border-inline-start: 3px solid transparent;
}
.op-sell  { border-color: #2e7d5a; }
.op-buy   { border-color: #2f6bbf; }
.op-receipt { border-color: #2a7a7a; }
.op-payment { border-color: #a03535; }
.op-expense { border-color: var(--amber); }
.op-tool { border-color: var(--gold); }

.op-card-body { min-width: 0; width: 100%; }
.op-card-body strong { display: block; font-size: 14px; font-weight: 800; }
.op-card-body small  { display: block; margin-top: 2px; font-size: 11px; font-weight: 650; color: var(--muted); }

/* ─── Dashboard stats ────────────────────────────────────────────────────────── */
.dash-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 4px;
}
.dstat {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  text-decoration: none;
  color: inherit;
  transition: transform var(--transition), box-shadow var(--transition);
}
.dstat:is(a):hover { transform: translateY(-2px); box-shadow: var(--shadow-lifted); }
.dstat-icon {
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: var(--surface-alt);
  border: 1px solid var(--border);
  color: var(--muted);
}
.dstat-body { min-width: 0; }
.dstat-body span { display: block; font-size: 11px; font-weight: 700; color: var(--muted); margin-bottom: 3px; }
.dstat-body strong { display: block; font-size: 20px; font-weight: 850; font-variant-numeric: tabular-nums; line-height: 1.1; }
.dstat-wide { grid-column: 1 / -1; }
.dstat-gold .dstat-icon  { background: linear-gradient(145deg,var(--gold-icon-1, #fff8e8),var(--gold-icon-2, #f5e4b8)); color: var(--gold); border-color: rgba(167,120,43,.2); }
.dstat-sell .dstat-icon  { background: linear-gradient(145deg,#e6f5ee,#c9ecdb); color: #2e7d5a; border-color: rgba(46,125,90,.2); }
.dstat-warn .dstat-icon  { background: linear-gradient(145deg,#fff4e0,#ffe0a0); color: #8c6727; border-color: rgba(140,103,39,.2); }
.dstat-green .dstat-icon { background: linear-gradient(145deg,#e6f5ee,#c9ecdb); color: #2e7d5a; border-color: rgba(46,125,90,.2); }
.dstat-green .dstat-body strong { color: var(--green); }

/* Feature stat — today's receipts get extra visual weight */
.dstat-wide.dstat-green {
  padding: 18px;
  gap: 14px;
  background: linear-gradient(145deg, #eef8f2, #dbf0e3);
  border-color: rgba(46,125,90,.25);
}
.dstat-wide.dstat-green .dstat-icon { width: 46px; height: 46px; border-radius: 12px; }
.dstat-wide.dstat-green .dstat-body strong { font-size: 26px; }

/* Feature stat — open deals (#معامله_باز) demand immediate attention */
.dstat-wide.dstat-red {
  padding: 18px;
  gap: 14px;
  background: linear-gradient(145deg, #fdeeee, #fad6d6);
  border-color: rgba(159,69,69,.3);
}
.dstat-wide.dstat-red .dstat-icon { width: 46px; height: 46px; border-radius: 12px; background: linear-gradient(145deg,#fdeeee,#f8c9c9); color: var(--red); border-color: rgba(159,69,69,.25); }
.dstat-wide.dstat-red .dstat-body strong { font-size: 26px; color: var(--red); }

/* ─── Empty state card ───────────────────────────────────────────────────────── */
.empty-state-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  padding: 30px 20px;
  border-radius: var(--radius-md);
  border: 1px dashed var(--border);
  background: var(--surface);
  color: var(--muted);
  text-align: center;
}
.empty-state-card p { margin: 0; font-size: 14px; }

/* ─── Draft restored bar ────────────────────────────────────────────────────── */
.draft-restored-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.draft-clear-btn {
  padding: 4px 10px;
  border-radius: 6px;
  border: 1px solid currentColor;
  background: transparent;
  color: inherit;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  transition: opacity var(--transition);
}
.draft-clear-btn:hover { opacity: .75; }

/* ─── Segmented sub (gold sub-type) ──────────────────────────────────────────── */
.segmented-sub { margin: 0 0 14px; }
.segmented-sub .segmented ul,
.segmented-sub ul {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.segmented-sub label {
  flex-direction: column;
  gap: 4px;
  min-height: 52px;
  font-size: 13px;
  padding: 8px 6px;
  text-align: center;
}
.segmented-sub label:has(input:checked) {
  box-shadow: 0 2px 8px rgba(0,0,0,.07);
}

@media (min-width: 640px) {
  .dash-hero-text h1 { font-size: 26px; }
  .dash-stats { grid-template-columns: repeat(4, 1fr); }
  .dstat-wide { grid-column: auto; }
}

/* ─── In-app navigation (nav.js) ─────────────────────────────────────────────── */

/* Slim top progress bar shown while a page is being fetched. */
#nav-progress {
  position: fixed;
  top: 0;
  inset-inline: 0;
  height: 3px;
  width: 0;
  z-index: 100;
  background: linear-gradient(90deg, var(--gold), var(--gold-hover));
  box-shadow: 0 0 8px rgba(167, 120, 43, .5);
  opacity: 0;
  transition: width 220ms ease, opacity 220ms ease;
  pointer-events: none;
}
#nav-progress.is-active { opacity: 1; }

/* Gently dim the outgoing content while the next page loads. */
body.is-navigating main.page-container {
  opacity: .55;
  transition: opacity 160ms ease;
}

/* Cross-document fallback for browsers that support it natively. */
@view-transition { navigation: auto; }

/* Same-document transition (document.startViewTransition in nav.js):
   a quick crossfade + subtle rightward slide that respects RTL. */
@keyframes nav-fade-in {
  from { opacity: 0; transform: translateX(12px); }
  to   { opacity: 1; transform: translateX(0); }
}
@keyframes nav-fade-out {
  from { opacity: 1; transform: translateX(0); }
  to   { opacity: 0; transform: translateX(-8px); }
}
::view-transition-old(root) {
  animation: nav-fade-out 180ms ease both;
}
::view-transition-new(root) {
  animation: nav-fade-in 220ms ease both;
}

@media (prefers-reduced-motion: reduce) {
  ::view-transition-old(root),
  ::view-transition-new(root) {
    animation: none;
  }
  body.is-navigating main.page-container { transition: none; }
}

/* ─── User & role management ─────────────────────────────────────────────────── */
.user-list { margin-top: 14px; }
.user-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition), box-shadow var(--transition);
}
.user-row:hover { transform: translateY(-1px); box-shadow: var(--shadow); }
.user-row.muted-row { opacity: .6; }
.user-avatar {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: var(--gold-soft);
  color: var(--gold-hover);
}
.user-avatar svg { width: 22px; height: 22px; }
.user-row-main { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.user-row-main strong { font-size: 15px; font-weight: 700; }
.user-meta { color: var(--muted); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-row-side { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; flex: 0 0 auto; }
.badge.role-owner { background: var(--gold-soft); color: var(--gold-hover); }
.badge.role-accountant { background: #e4edf1; color: var(--blue); }
.badge.role-seller { background: var(--surface-alt); color: var(--muted); }

.checkbox-grid ul { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr; gap: 10px; }
.checkbox-grid li { margin: 0; }
.checkbox-grid label {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface-alt);
  cursor: pointer;
  font-size: 14px;
  transition: border-color var(--transition), background var(--transition);
}
.checkbox-grid label:hover { border-color: var(--gold); }
.checkbox-grid input { width: 18px; height: 18px; accent-color: var(--gold); }

.inline-check { display: flex; align-items: center; gap: 10px; cursor: pointer; font-size: 14px; }
.inline-check input { width: 18px; height: 18px; accent-color: var(--gold); }

@media (min-width: 640px) {
  .checkbox-grid ul { grid-template-columns: repeat(2, 1fr); }
}

/* ===== نرخ روز طلا (manual gold rate) ===== */
.rate-banner {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 0 0 18px;
  padding: 16px 18px;
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, var(--hero-1) 0%, var(--hero-mid, #2e2820) 60%, var(--hero-2) 100%);
  color: var(--hero-ink);
  box-shadow: var(--shadow);
  border: 1px solid var(--hero-border, #4a3d28);
  text-decoration: none;
}
.rate-banner-empty { background: linear-gradient(135deg, var(--hero-empty-1, #2a2118) 0%, var(--hero-empty-2, #3a2c1c) 100%); }
.rate-banner-icon {
  flex: 0 0 auto;
  width: 44px; height: 44px;
  display: grid; place-items: center;
  border-radius: 14px;
  background: rgba(167, 120, 43, .22);
  color: #e8c98a;
}
.rate-banner-icon .ui-icon { width: 24px; height: 24px; }
.rate-banner-body { display: flex; flex-direction: column; gap: 2px; flex: 1 1 auto; min-width: 0; }
.rate-banner-label { font-size: 12px; color: #d8c6a6; font-weight: 700; }
.rate-banner-value { font-size: 22px; font-weight: 850; color: #fff; line-height: 1.1; }
.rate-banner-value small { font-size: 12px; font-weight: 600; color: #cbb78f; }
.rate-banner-meta { font-size: 11px; color: #b6a585; }
.rate-banner-cta { flex: 0 0 auto; font-size: 12px; font-weight: 750; color: #e8c98a; }

/* current-rate hero on the نرخ روز page */
.rate-hero {
  display: flex; flex-direction: column; gap: 4px;
  margin: 0 0 18px; padding: 22px;
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, var(--hero-1) 0%, var(--hero-2) 100%);
  color: var(--hero-ink); box-shadow: var(--shadow); border: 1px solid var(--hero-border, #4a3d28);
}
.rate-hero-empty { background: linear-gradient(135deg, var(--hero-empty-1, #2a2118) 0%, var(--hero-empty-2, #3a2c1c) 100%); }
.rate-hero-label { font-size: 13px; color: #d8c6a6; font-weight: 700; }
.rate-hero-value { font-size: 34px; font-weight: 850; color: #fff; line-height: 1.1; }
.rate-hero-value small { font-size: 14px; font-weight: 600; color: #cbb78f; }
.rate-hero-meta { font-size: 12px; color: #b6a585; }
.rate-hero-note { font-size: 12px; color: #e8c98a; margin-top: 4px; }

/* rate history list */
.rate-history { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.rate-row {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  padding: 12px 14px; border-radius: var(--radius-sm);
  background: var(--surface-alt); border: 1px solid var(--border);
}
.rate-row-current { border-color: var(--gold); background: var(--gold-soft); }
.rate-row-value { font-weight: 800; color: var(--text); }
.rate-row-value small { font-size: 11px; font-weight: 600; color: var(--muted); }
.rate-row-time { font-size: 12px; color: var(--muted); margin-inline-start: auto; }
.rate-row-note { flex-basis: 100%; font-size: 12px; color: var(--muted); }

/* ===== مخارج / ابزارها / اتیکت / آبشده ===== */
.operation-card.op-expense .operation-icon { background: #efe4d2; color: var(--amber); }
.operation-card.op-tool .operation-icon { background: var(--gold-soft); color: var(--gold-hover); }

.tag-search-bar { display: flex; gap: 8px; margin: 0 0 14px; }
.tag-search-bar input[type="search"] {
  flex: 1 1 auto; padding: 12px 14px; border-radius: var(--radius-sm);
  border: 1px solid var(--border); background: var(--surface); font: inherit;
}
.tag-search-bar .btn-secondary { flex: 0 0 auto; }

.tag-badge {
  font-size: 11px; font-weight: 700; padding: 3px 10px; border-radius: 999px;
  margin-inline-start: auto;
}
.tag-badge-available { background: #e3f0e8; color: var(--green); }
.tag-badge-used { background: #efe4e4; color: var(--red); }
.rate-row-used { opacity: .72; }

/* ─── Counterparty wallet (کیف‌پول طرف‌حساب) ───────────────────────── */
.wallet-balances {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 6px;
}
.wallet-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 16px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}
.wallet-card::before {
  content: "";
  position: absolute;
  inset-block-start: 0;
  inset-inline: 0;
  height: 4px;
  background: var(--muted);
}
.wallet-card.is-plus::before { background: var(--green); }
.wallet-card.is-minus::before { background: var(--red); }
.wallet-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.wallet-ic {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: linear-gradient(145deg, #fffaf1, #ecddbf);
  border: 1px solid rgba(167, 120, 43, .2);
  color: var(--gold-hover);
}
.wallet-ic .ui-icon { width: 21px; height: 21px; }
.wallet-dir {
  font-size: 11px;
  font-weight: 800;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--surface-alt);
  color: var(--muted);
  white-space: nowrap;
}
.wallet-card.is-plus .wallet-dir { background: #e8f5ee; color: var(--green); }
.wallet-card.is-minus .wallet-dir { background: #fdecec; color: var(--red); }
.wallet-val {
  display: flex;
  align-items: baseline;
  gap: 5px;
  font-variant-numeric: tabular-nums;
}
.wallet-val b { font-size: 28px; font-weight: 850; letter-spacing: -.5px; line-height: 1.1; }
.wallet-card.is-plus .wallet-val b { color: var(--green); }
.wallet-card.is-minus .wallet-val b { color: var(--red); }
.wallet-val small { font-size: 13px; font-weight: 700; color: var(--muted); }
.wallet-sub { font-size: 12px; color: var(--muted); font-weight: 600; }
.wallet-legend {
  margin: 4px 2px 16px;
  font-size: 11.5px;
  color: var(--muted);
  text-align: center;
}
.wallet-opendeal {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
  padding: 14px 16px;
  border-radius: var(--radius-md);
  border: 1px solid rgba(159, 69, 69, .3);
  background: linear-gradient(145deg, #fdeeee, #fad6d6);
  color: var(--red);
}
.wallet-opendeal-ic {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 11px;
  background: #fff;
  color: var(--red);
  flex: 0 0 auto;
}
.wallet-opendeal-ic .ui-icon { width: 20px; height: 20px; }
.wallet-opendeal-body { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.wallet-opendeal-body strong { font-size: 14px; font-weight: 800; }
.wallet-opendeal-body small { font-size: 12px; color: #8a4a4a; font-variant-numeric: tabular-nums; }

/* sold items — اتیکت‌دار cards (image placeholder for now) */
.sold-items-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 8px;
}
.sold-item-card {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 12px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
}
.sold-item-card:hover { transform: translateY(-2px); border-color: var(--accent); box-shadow: var(--shadow); }
.sold-item-thumb {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  flex: 0 0 auto;
  border-radius: 12px;
  background: linear-gradient(145deg, #fffaf1, #ecddbf);
  border: 1px solid rgba(167, 120, 43, .2);
  color: var(--gold-hover);
}
.sold-item-thumb .ui-icon { width: 23px; height: 23px; }
.sold-item-thumb.has-img { padding: 0; overflow: hidden; background: var(--surface-alt); }
.sold-item-thumb.has-img img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* اتیکت image upload field inside the tagged card */
.tagged-image-field { margin-top: 10px; }
.tagged-image-field label { display: block; margin-bottom: 6px; color: #4e4e4e; font-size: 13px; font-weight: 750; }
.tagged-image-field input[type="file"] {
  width: 100%;
  min-height: 48px;
  padding: 11px 13px;
  border: 1px dashed var(--gold);
  border-radius: var(--radius-sm);
  background: var(--gold-soft);
  color: var(--gold-hover);
  font-size: 13px;
}
.sold-item-body { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.sold-item-body strong { font-size: 13.5px; font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sold-item-meta { font-size: 12px; color: var(--gold-hover); font-weight: 700; font-variant-numeric: tabular-nums; }
.sold-item-date { font-size: 11px; color: var(--muted); }

@media (max-width: 380px) {
  .wallet-val b { font-size: 24px; }
}

/* ─── Store treasury card (موجودی صندوق گالری — owner-only) ────────── */
.treasury { margin-bottom: 18px; }
.treasury-hero {
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding: 18px 20px;
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, var(--hero-1) 0%, var(--hero-2) 100%);
  color: var(--hero-ink);
  border: 1px solid var(--hero-border, #4a3d28);
  box-shadow: var(--shadow);
  margin-bottom: 10px;
}
.treasury-hero-label { font-size: 12.5px; color: #d8c6a6; font-weight: 700; }
.treasury-hero-val {
  font-size: 30px;
  font-weight: 850;
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
}
.treasury-hero-val small { font-size: 13px; font-weight: 600; color: #cbb78f; }
.treasury-hero.is-plus .treasury-hero-val { color: #7fe0b0; }
.treasury-hero.is-minus .treasury-hero-val { color: #f3a6a6; }
.treasury-hero-val.is-muted { font-size: 16px; color: #cbb78f; font-weight: 700; }
.treasury-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 10px;
}
.treasury-cell {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 13px 14px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}
.treasury-cell .t-ic {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  flex: 0 0 auto;
  border-radius: 11px;
  background: linear-gradient(145deg, #fffaf1, #ecddbf);
  border: 1px solid rgba(167, 120, 43, .2);
  color: var(--gold-hover);
}
.treasury-cell .t-ic .ui-icon { width: 20px; height: 20px; }
.treasury-cell .t-body { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.treasury-cell .t-body span { font-size: 11.5px; color: var(--muted); font-weight: 600; }
.treasury-cell .t-body strong { font-size: 16px; font-weight: 850; font-variant-numeric: tabular-nums; }
.treasury-cell.is-plus .t-body strong { color: var(--green); }
.treasury-cell.is-minus .t-body strong { color: var(--red); }
.treasury-note { margin: 8px 2px 0; font-size: 11.5px; color: var(--muted); }
.treasury-convert-btn {
  margin-top: 12px;
  gap: 8px;
}
.treasury-convert-btn .ui-icon { width: 18px; height: 18px; }

/* ════════════════════════════════════════════════════════════════════
   صفحات دارایی — منتقل‌شده از <style>های inline به فایل اصلی تا مثل بقیهٔ
   صفحات (کارت عملیات) قابل‌اعتماد لود شوند. (داشبورد گیت‌ها / دارایی طلا /
   نقدی و کارت‌ها / جزئیات کارت بانکی)
   ════════════════════════════════════════════════════════════════════ */

/* ─ داشبورد: گیت‌ها و کاشی‌های صندوق (.vlt) ─ */
.vlt { display:grid; gap:10px; margin:2px 0 10px; }
.vlt-row { display:grid; grid-template-columns:1fr 1fr; gap:10px; }
.vlt-tile { background:#fff; border:1px solid #ececec; border-radius:14px; padding:11px 13px; display:flex; align-items:center; gap:10px; }
.vlt-ic { flex:none; width:34px; height:34px; border-radius:10px; display:flex; align-items:center; justify-content:center; background:#f3f1ea; color:#8a6a2a; }
.vlt-ic .ui-icon { width:18px; height:18px; }
.vlt-bd { display:flex; flex-direction:column; min-width:0; }
.vlt-bd > span { font-size:.7rem; color:#8d8d8d; }
.vlt-bd > strong { font-size:.9rem; color:#222; white-space:nowrap; }
.vlt-tile.is-minus .vlt-bd > strong { color:#a32d2d; }
.vlt-tile.is-minus .vlt-ic { background:#fcebeb; color:#a32d2d; }
.vlt-tile.is-plus .vlt-bd > strong { color:#1c6b3a; }
.vlt-gate { display:flex; align-items:center; gap:12px; background:#faeeda; border:1px solid #ef9f27; border-radius:16px; padding:13px 15px; text-decoration:none; margin-bottom:10px; }
.vlt-gate:active { background:#f6e3c2; }
.vlt-gate-ic { flex:none; width:44px; height:44px; border-radius:12px; background:#ef9f27; color:#fff; display:flex; align-items:center; justify-content:center; }
.vlt-gate-ic .ui-icon { width:24px; height:24px; }
.vlt-gate-bd { display:flex; flex-direction:column; flex:1; min-width:0; }
.vlt-gate-top { font-size:.74rem; color:#854f0b; }
.vlt-gate-val { font-size:1.2rem; font-weight:700; color:#412402; }
.vlt-gate-val small { font-size:.68rem; font-weight:500; }
.vlt-gate-cta { flex:none; display:flex; align-items:center; gap:5px; background:#412402; color:#fac775; font-size:.74rem; font-weight:600; padding:7px 12px; border-radius:999px; }
.vlt-gate-cta .ui-icon { width:14px; height:14px; }
.vlt-gate.is-cash { background:var(--cash-soft, #eef1f6); border-color:var(--cash, #33507a); }
.vlt-gate.is-cash:active { background:#e0e6ef; }
.vlt-gate.is-cash .vlt-gate-ic { background:var(--cash, #33507a); }
.vlt-gate.is-cash .vlt-gate-top { color:#22334d; }
.vlt-gate.is-cash .vlt-gate-val { color:#042c53; }
.vlt-gate.is-cash .vlt-gate-cta { background:var(--cash-strong, #0c447c); color:var(--cash-on, #b5d4f4); }

/* ─ سوییچ هاب طلا/نقدی (مشترک بین صفحات دارایی) ─ */
.hub { display:grid; grid-template-columns:1fr 1fr; gap:4px; background:#f0efe9; border-radius:12px; padding:4px; margin-bottom:14px; }
.hub a { text-align:center; padding:9px; border-radius:8px; font-size:.84rem; font-weight:600; text-decoration:none; color:#6b6b6b; display:flex; align-items:center; justify-content:center; gap:6px; }
.hub a .ui-icon { width:16px; height:16px; }
.hub a.is-active.gold { background:#2c2c2a; color:#fac775; }
.hub a.is-active.cash { background:var(--cash-strong, #0c447c); color:var(--cash-on, #b5d4f4); }

/* ─ دارایی طلا (.ga) ─ */
.ga-wrap { max-width: 520px; margin: 0 auto; }
.ga-head { display:flex; align-items:center; gap:8px; margin: 4px 2px 14px; }
.ga-head h1 { font-size:1.05rem; font-weight:700; margin:0; }
.ga-head .ga-back { color:var(--muted, #6b6b6b); display:flex; }
.ga-head .ga-cog { margin-inline-start:auto; color:var(--muted, #6b6b6b); display:flex; }
.ga-head .ga-cog .ui-icon { width:20px; height:20px; }
.ga-hero { background:#faeeda; border:1px solid #ef9f27; border-radius:16px; overflow:hidden; margin-bottom:16px; }
.ga-hero-cells { display:grid; grid-template-columns:1fr 1fr; }
.ga-hero-cell { padding:16px 10px; text-align:center; }
.ga-hero-cell.is-scale { background:#f7dfb0; }
.ga-hero-cell small.lbl { display:block; font-size:.72rem; color:#854f0b; margin-bottom:6px; }
.ga-hero-cell strong.num { font-size:1.7rem; font-weight:700; color:#412402; line-height:1; }
.ga-hero-cell small.unit { display:block; font-size:.68rem; color:#854f0b; margin-top:4px; }
.ga-hero-val { text-align:center; padding:9px; background:#ef9f27; color:#412402; font-size:.85rem; font-weight:600; }
.ga-hero-val.is-empty { background:#f1e2c4; color:#7a5a1c; }
.ga-label { font-size:.82rem; font-weight:600; color:var(--muted,#6b6b6b); margin:0 2px 8px; }
.ga-colhead { display:flex; justify-content:flex-end; gap:14px; padding:0 14px; margin-bottom:4px; }
.ga-colhead span { font-size:.62rem; color:#9a9a9a; width:54px; text-align:left; }
.ga-card { background:#fff; border:1px solid #ececec; border-radius:14px; margin-bottom:8px; overflow:hidden; }
.ga-row { display:flex; align-items:center; justify-content:space-between; padding:12px 14px; }
.ga-cat-name { display:flex; align-items:center; gap:8px; font-weight:600; font-size:.92rem; color:#1c1c1c; }
.ga-tag { font-size:.62rem; background:#f1efe8; color:#5f5e5a; padding:1px 7px; border-radius:6px; }
.ga-tag.is-wage { background:#faeeda; color:#854f0b; }
.ga-nums { display:flex; gap:14px; text-align:left; }
.ga-nums span { width:54px; font-weight:700; color:#412402; font-size:.82rem; }
.ga-sub { background:#faf9f6; border-top:1px solid #ececec; }
.ga-subrow { display:flex; align-items:center; justify-content:space-between; padding:10px 14px; font-size:.78rem; }
.ga-subrow + .ga-subrow { border-top:1px dashed #e6e6e6; }
.ga-subrow .ga-nums span { font-weight:500; font-size:.78rem; color:#412402; }
.ga-key { display:flex; align-items:center; gap:6px; color:#3a3a3a; }
details.ga-card > summary { list-style:none; cursor:pointer; }
details.ga-card > summary::-webkit-details-marker { display:none; }
details.ga-card > summary .ga-chev { transition:transform .15s; color:#ba7517; display:flex; }
details.ga-card[open] > summary .ga-chev { transform:rotate(90deg); }
.ga-unsettled .ga-card { border-color:#f0c0c0; }
.ga-unsettled summary .ga-row { background:#fcebeb; }
.ga-unsettled .is-credit summary .ga-row { background:#eaf3de; }
.ga-credit-name { color:#27500a; font-weight:600; font-size:.84rem; display:flex; align-items:center; gap:6px; }
.ga-debit-name { color:#791f1f; font-weight:600; font-size:.84rem; display:flex; align-items:center; gap:6px; }
.ga-amt-credit { color:#3b6d11; font-weight:700; }
.ga-amt-debit { color:#a32d2d; font-weight:700; }
.ga-footer { background:#2c2c2a; border-radius:16px; padding:16px; color:#fff; margin-top:6px; }
.ga-footer-cap { font-size:.72rem; color:#b4b2a9; margin-bottom:12px; }
.ga-tot { display:flex; align-items:center; justify-content:space-between; padding:12px 14px; background:#3a3a37; border-radius:10px; margin-bottom:8px; }
.ga-tot:last-child { margin-bottom:0; }
.ga-tot .lbl { font-size:.82rem; color:#d3d1c7; }
.ga-tot.is-gold .lbl { color:#fac775; }
.ga-tot .val { font-size:1.2rem; font-weight:700; }
.ga-tot.is-gold .val { color:#fac775; }
.ga-tot .val small { font-size:.68rem; font-weight:500; }
.ga-empty { background:#fff; border:1px dashed #ddd; border-radius:14px; padding:28px 16px; text-align:center; color:#7a7a7a; }
.ga-hist { background:#fff; border:1px solid #ececec; border-radius:14px; overflow:hidden; }
.ga-hist-head, .ga-hist-row { display:grid; grid-template-columns:1fr 1.1fr 1.4fr; gap:8px; padding:10px 14px; font-size:.78rem; }
.ga-hist-head { background:#faf9f6; color:#8d8d8d; font-size:.68rem; }
.ga-hist-row + .ga-hist-row { border-top:1px dashed #eee; }
.ga-hist-row .d { color:#3a3a3a; }
.ga-hist-row .g { color:#412402; font-weight:500; text-align:left; }
.ga-hist-row .m { color:#222; text-align:left; }
.ga-hist-head span:nth-child(2), .ga-hist-head span:nth-child(3) { text-align:left; }

/* ─ موجودی نقدی (.csh) ─ */
.csh-wrap { max-width:520px; margin:0 auto; }
.csh-head { display:flex; align-items:center; gap:8px; margin:4px 2px 12px; }
.csh-head h1 { font-size:1.05rem; font-weight:700; margin:0; }
.csh-head .csh-back { color:#6b6b6b; display:flex; }
/* هم‌خانوادهٔ صفحهٔ طلا (M-3): سرمه‌ای گرم به‌جای آبیِ خارج از پالت. */
.csh-hero { background:var(--cash-soft, #eef1f6); border:1px solid var(--cash, #33507a); border-radius:16px; padding:16px; text-align:center; margin-bottom:16px; }
.csh-hero-lbl { font-size:.74rem; color:var(--cash, #33507a); }
.csh-hero-val { font-size:1.5rem; font-weight:700; color:#22334d; }
.csh-hero-val small { font-size:.7rem; font-weight:500; }
.csh-hero-note { margin-top:10px; padding-top:10px; border-top:1px dashed var(--cash, #33507a); font-size:.74rem; color:var(--cash, #33507a); }
.csh-split { margin:-4px 0 14px; }
.csh-split-cap { font-size:.74rem; font-weight:600; color:#6b6b6b; margin:0 2px 6px; }
.csh-split-row { display:flex; gap:8px; }
.csh-split-item { flex:1; min-width:0; background:#fff; border:1px solid #ececec; border-radius:14px; padding:12px 14px; display:flex; flex-direction:column; gap:6px; }
.csh-split-item .lbl { font-size:.78rem; font-weight:600; color:#444; display:flex; align-items:center; gap:5px; }
.csh-split-item .lbl small { font-size:.64rem; color:#9a9a9a; font-weight:400; }
.csh-split-item .val { font-size:1.05rem; font-weight:700; }
.csh-split-item .val small { font-size:.64rem; font-weight:500; }
.csh-split-item.is-credit { border-color:#c9d3e2; background:#f4f6fa; }
.csh-split-item.is-credit .val { color:var(--cash, #33507a); }
.csh-split-item.is-debt { border-color:#f0cccc; background:#fdf5f5; }
.csh-split-item.is-debt .val { color:#a32d2d; }
.csh-label { display:flex; align-items:center; justify-content:space-between; margin:0 2px 8px; }
.csh-label > span { font-size:.82rem; font-weight:600; color:#6b6b6b; }
.csh-new { font-size:.76rem; color:#185fa5; text-decoration:none; display:flex; align-items:center; gap:4px; }
.csh-new .ui-icon { width:14px; height:14px; }
.csh-card { display:flex; align-items:center; justify-content:space-between; background:#fff; border:1px solid #ececec; border-radius:14px; padding:12px 14px; margin-bottom:8px; text-decoration:none; }
.csh-card .nm { display:flex; flex-direction:column; }
.csh-card .nm strong { font-size:.92rem; color:#1c1c1c; }
.csh-card .nm span { font-size:.7rem; color:#9a9a9a; direction:ltr; text-align:right; }
.csh-card .bal { font-weight:700; color:#042c53; font-size:.92rem; }
.csh-card .bal.is-neg { color:#a32d2d; }
.csh-cash-tile { display:flex; align-items:center; gap:10px; background:#fff; border:1px solid #ececec; border-radius:14px; padding:12px 14px; margin-bottom:18px; }
.csh-cash-tile .ic { width:34px;height:34px;border-radius:10px;background:#f3f1ea;color:#8a6a2a;display:flex;align-items:center;justify-content:center; }
.csh-cash-tile .ic .ui-icon { width:18px;height:18px; }
.csh-cash-tile .bd { display:flex;flex-direction:column;flex:1; }
.csh-cash-tile .bd span { font-size:.7rem;color:#8d8d8d; }
.csh-cash-tile .bd strong { font-size:.92rem;color:#222; }
.csh-cash-tile .bd strong.is-neg { color:#a32d2d; }
.csh-empty { background:#fff;border:1px dashed #ddd;border-radius:14px;padding:22px 16px;text-align:center;color:#7a7a7a;margin-bottom:18px; }
.csh-footer { background:#2c2c2a; border-radius:16px; padding:16px; color:#fff; }
.csh-footer-cap { font-size:.72rem; color:#b4b2a9; margin-bottom:12px; }
.csh-tot { display:flex; align-items:center; justify-content:space-between; padding:12px 14px; background:#3a3a37; border-radius:10px; margin-bottom:8px; }
.csh-tot:last-child { margin-bottom:0; }
.csh-tot .lbl { font-size:.82rem; color:#d3d1c7; }
.csh-tot.is-gold .lbl { color:#fac775; }
.csh-tot .val { font-size:1.2rem; font-weight:700; }
.csh-tot.is-gold .val { color:#fac775; }
.csh-tot .val small { font-size:.68rem; font-weight:500; }

/* ─ جزئیات کارت بانکی (.bcd) ─ */
.bcd-wrap { max-width:520px; margin:0 auto; }
.bcd-head { display:flex; align-items:center; gap:8px; margin:4px 2px 12px; }
.bcd-head h1 { font-size:1.05rem; font-weight:700; margin:0; }
.bcd-head .bk { color:#6b6b6b; display:flex; }
.bcd-hero { background:var(--cash-soft, #eef1f6); border:1px solid var(--cash, #33507a); border-radius:16px; padding:16px; margin-bottom:8px; }
.bcd-hero .nm { font-size:.84rem; color:#0c447c; }
.bcd-hero .num { font-size:.72rem; color:#185fa5; direction:ltr; text-align:right; }
.bcd-hero .bal { font-size:1.5rem; font-weight:700; color:#042c53; margin-top:6px; }
.bcd-hero .bal small { font-size:.7rem; font-weight:500; }
.bcd-hero .bal.is-neg { color:#a32d2d; }
.bcd-del { display:flex; justify-content:flex-start; align-items:center; gap:16px; margin:0 2px 14px; }
.bcd-del button { background:none; border:none; color:#a32d2d; font-family:inherit; font-size:.78rem; display:flex; align-items:center; gap:5px; cursor:pointer; }
.bcd-edit-link { color:#7a5c17; font-size:.78rem; display:flex; align-items:center; gap:5px; text-decoration:none; font-weight:600; }
.bcd-edit-link:hover { color:#5d460f; }

/* M-5: فلش‌های spinner فیلدهای عددی حذف — لمس/کلیک تصادفی‌شان عدد حسابداری را
   بی‌صدا تغییر می‌داد (۲۰ → ۱۹.۹۹). ورود عدد فقط با تایپ. */
input[type="number"]::-webkit-outer-spin-button,
input[type="number"]::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
input[type="number"] { -moz-appearance: textfield; appearance: textfield; }
.bcd-label { font-size:.82rem; font-weight:600; color:#6b6b6b; margin:0 2px 8px; }
.bcd-row { display:flex; align-items:center; justify-content:space-between; background:#fff; border:1px solid #ececec; border-radius:12px; padding:11px 14px; margin-bottom:8px; text-decoration:none; }
.bcd-row .lt { display:flex; flex-direction:column; }
.bcd-row .lt strong { font-size:.86rem; color:#1c1c1c; }
.bcd-row .lt span { font-size:.7rem; color:#9a9a9a; }
.bcd-row .rt { display:flex; flex-direction:column; text-align:left; }
.bcd-row .rt .delta { font-weight:700; font-size:.86rem; }
.bcd-row .rt .delta.pos { color:#3b6d11; }
.bcd-row .rt .delta.neg { color:#a32d2d; }
.bcd-row .rt .run { font-size:.68rem; color:#9a9a9a; }
.bcd-empty { background:#fff;border:1px dashed #ddd;border-radius:14px;padding:22px 16px;text-align:center;color:#7a7a7a; }

/* ─── Treasury convert page ───────────────────────────────────────── */
.convert-summary {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 16px;
}
.convert-summary-cell {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 14px 16px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}
.convert-summary-cell span { font-size: 12px; color: var(--muted); font-weight: 600; }
.convert-summary-cell strong { font-size: 19px; font-weight: 850; font-variant-numeric: tabular-nums; }
.convert-summary-cell strong small { font-size: 12px; font-weight: 600; color: var(--muted); }
.convert-preview {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 6px 0 4px;
  padding: 14px 16px;
  border-radius: var(--radius-md);
  border: 1.5px dashed var(--gold);
  background: var(--gold-soft);
}
.convert-preview span { font-size: 13px; font-weight: 700; color: var(--gold-hover); }
.convert-preview strong { font-size: 20px; font-weight: 850; color: var(--gold-hover); font-variant-numeric: tabular-nums; }
.convert-cancel { margin-top: 10px; }
.convert-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px 14px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}
.convert-row-ic {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  flex: 0 0 auto;
  border-radius: 11px;
  background: linear-gradient(145deg, #fffaf1, #ecddbf);
  border: 1px solid rgba(167, 120, 43, .2);
  color: var(--gold-hover);
}
.convert-row-ic .ui-icon { width: 20px; height: 20px; }
.convert-row-main { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1; }
.convert-row-main strong { font-size: 13.5px; font-weight: 800; font-variant-numeric: tabular-nums; }
.convert-row-main span { font-size: 12px; color: var(--muted); }
.convert-row-date { font-size: 11px; color: var(--muted); white-space: nowrap; }

/* ─── Wizard theme picker (site settings) ─────────────────────────── */
.theme-picker { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.theme-option {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0;
  padding: 14px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface);
  cursor: pointer;
  transition: border-color var(--transition), box-shadow var(--transition);
}
.theme-option input { position: absolute; opacity: 0; pointer-events: none; }
.theme-swatch {
  flex: 0 0 auto;
  width: 40px;
  height: 40px;
  border-radius: 11px;
  border: 1px solid rgba(0, 0, 0, .08);
}
.theme-option-vault .theme-swatch { background: linear-gradient(150deg, #a9803b 0 50%, #f3f1ec 50% 100%); }
.theme-option-mercury .theme-swatch { background: linear-gradient(150deg, #0e1726 0 50%, #f4f6f8 50% 100%); }
.theme-option-body strong { display: block; font-size: 14px; font-weight: 800; }
.theme-check {
  flex: 0 0 auto;
  width: 22px;
  height: 22px;
  margin-inline-start: auto;
  border-radius: 50%;
  border: 1.5px solid var(--border);
}
.theme-option:has(input:checked) {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(167, 120, 43, .14);
}
.theme-option:has(input:checked) .theme-check {
  border-color: var(--gold);
  background: var(--gold) radial-gradient(circle, #fff 32%, transparent 36%);
}

/* ════════════════════════════════════════════════════════════════════
   سوابق معاملات (transaction history) — approved redesign
   Search + filter chips + txn cards. Mobile-first (375px).
   ════════════════════════════════════════════════════════════════════ */

.tnum { font-variant-numeric: tabular-nums; }

/* ─── page head ───────────────────────────────────────────────────── */
.page-head { margin: 0 0 6px; }
.page-head .ph-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.page-head .eyebrow {
  display: block;
  margin-bottom: 2px;
  color: var(--gold);
  font-size: 12px;
  font-weight: 800;
}
.page-head h1 {
  margin: 0;
  font-size: clamp(22px, 6vw, 28px);
  font-weight: 850;
  line-height: 1.25;
}
.ph-new {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex: 0 0 auto;
  padding: 11px 16px;
  font-size: 14px;
  font-weight: 800;
  border-radius: 12px;
  background: var(--gold);
  color: #fff8ec;
  box-shadow: 0 10px 22px -8px rgba(167, 120, 43, .55);
}
.ph-new .ui-icon { width: 18px; height: 18px; }
.ph-new:hover { background: var(--gold-hover); }

/* ─── search field ────────────────────────────────────────────────── */
.search-form { margin-bottom: 4px; }
.search {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 14px;
  padding: 0 14px;
  height: 50px;
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: 14px;
  transition: border-color var(--transition), box-shadow var(--transition);
}
.search svg { width: 19px; height: 19px; color: var(--muted); flex: none; }
.search input {
  flex: 1;
  height: 100%;
  min-height: 0;
  border: 0;
  outline: 0;
  background: transparent;
  padding: 0;
  font-size: 15px;
}
.search input:focus { box-shadow: none; }
.search:focus-within { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(167, 120, 43, .14); }

/* advanced filters (filter بیشتر) */
.adv-filter { margin-top: 12px; }
.adv-filter summary {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 4px;
  color: var(--gold-hover);
  font-size: 13px;
  font-weight: 750;
  cursor: pointer;
  list-style: none;
}
.adv-filter summary::-webkit-details-marker { display: none; }
.adv-filter summary::before {
  content: "+";
  font-weight: 900;
  font-size: 15px;
  line-height: 1;
}
.adv-filter[open] summary::before { content: "−"; }
.adv-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  margin: 8px 0 12px;
}

/* ─── filter chips ────────────────────────────────────────────────── */
.chips {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 12px 0 4px;
  scrollbar-width: none;
}
.chips::-webkit-scrollbar { display: none; }
.chip {
  flex: none;
  padding: 9px 16px;
  border-radius: 99px;
  border: 1.5px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  transition: background var(--transition), border-color var(--transition), color var(--transition);
}
.chip:hover { border-color: var(--gold); }
.chip.on {
  background: var(--text);
  border-color: var(--text);
  color: var(--surface);
}
.chip-open.on { background: #e67e22; border-color: #e67e22; color: #fff; }
.chip:focus-visible { outline: 3px solid rgba(167, 120, 43, .28); outline-offset: 2px; }

/* U3: دو گروهِ چیپِ سریع (نوع عملیات / وضعیت و بازه) که هرکدام یک ردیفِ اسکرول‌شوندهٔ RTL است. */
.chip-groups { display: flex; flex-direction: column; gap: 2px; }
/* نوارِ ابزارِ بالای فهرست: شمارش در راست، دکمهٔ اکسل در چپ (RTL). */
.list-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
.btn-sm { padding: 7px 14px; font-size: 13px; display: inline-flex; align-items: center; gap: 6px; }
.btn-sm svg { width: 16px; height: 16px; }

.section-label {
  margin: 10px 0 8px;
  font-size: 12.5px;
  color: var(--muted);
  font-weight: 700;
}

/* ─── txn card (redesigned transaction row) ───────────────────────── */
.txn {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 13px 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  text-align: start;
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
}
.txn:hover { transform: translateY(-1px); border-color: var(--accent); box-shadow: var(--shadow-lifted); }
.txn:focus-visible { outline: 3px solid rgba(167, 120, 43, .28); outline-offset: 3px; }
.txn-ic {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  flex: none;
  border-radius: 13px;
  background: var(--cat-bg, #eee);
  color: var(--cat, #555);
}
.txn-ic .ui-icon { width: 20px; height: 20px; }
.txn.t-sell    { --cat: var(--cat-sell);    --cat-bg: var(--cat-sell-bg); }
.txn.t-buy     { --cat: var(--cat-buy);     --cat-bg: var(--cat-buy-bg); }
.txn.t-receipt { --cat: var(--cat-recv);    --cat-bg: var(--cat-recv-bg); }
.txn.t-payment { --cat: var(--cat-pay);     --cat-bg: var(--cat-pay-bg); }
.txn.t-expense { --cat: var(--cat-exp);     --cat-bg: var(--cat-exp-bg); }

.txn-main { flex: 1; min-width: 0; display: grid; gap: 3px; }
.t-top { display: flex; gap: 8px; align-items: baseline; }
.t-name {
  font-weight: 800;
  font-size: 14.5px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.t-id { color: var(--muted); font-size: 12px; direction: ltr; flex: none; }
.t-sub {
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.txn-meta {
  display: grid;
  justify-items: end;
  gap: 5px;
  flex: none;
}
.t-amt { font-weight: 800; font-size: 14px; white-space: nowrap; }

/* open deal must read as urgent at a glance */
.txn.is-open-deal {
  border-inline-start: 4px solid #e67e22;
  background: #fdf6ee;
}
.txn .badge.open-deal {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  gap: 5px;
  margin-top: 4px;
  padding: 3px 10px;
  color: #fff;
  background: #e67e22;
  font-size: 11px;
  font-weight: 800;
  white-space: nowrap;
}
.txn .badge.open-deal .ui-icon { width: 13px; height: 13px; }

@media (min-width: 720px) {
  .adv-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

/* ════════════════════════════════════════════════════════════════════
   افزودن تصویر (اتیکت‌دار / چک) — دکمه + پیش‌نمایش + شیت انتخاب
   ════════════════════════════════════════════════════════════════════ */

.img-attach { margin-top: 6px; }
.img-attach > label { margin-bottom: 7px; }
.img-attach-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}
.img-attach input[type="file"] { display: none; }

.img-attach-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex: 1 1 auto;
  min-width: 0;
  min-height: 48px;
  padding: 12px 14px;
  background: var(--surface-alt, #faf6ef);
  color: var(--gold-hover, #8c6727);
  border: 1.5px dashed var(--gold, #a7782b);
  border-radius: 13px;
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
  transition: filter var(--transition);
}
.img-attach-btn .ui-icon { width: 18px; height: 18px; }
.img-attach-btn:hover { filter: brightness(.98); }
.img-attach-btn:active { transform: translateY(1px); }

/* ─── thumbnail preview ───────────────────────────────────────────── */
.img-thumb {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1 1 auto;
  min-width: 0;
  padding: 6px 10px 6px 6px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 13px;
}
.img-thumb img {
  width: 64px;
  height: 64px;
  flex: none;
  object-fit: cover;
  border-radius: 10px;
  background: var(--surface-alt, #f3ead7);
}
.img-thumb-name {
  flex: 1;
  min-width: 0;
  font-size: 12.5px;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.img-thumb-remove {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  flex: none;
  border: 1px solid #efcaca;
  border-radius: 10px;
  background: #fff;
  color: var(--red);
  font-size: 18px;
  font-weight: 900;
  line-height: 1;
  cursor: pointer;
}
.img-thumb-remove:hover { background: var(--buy-bg, #f9ebe8); }

/* ─── action sheet (bottom sheet, two big options) ────────────────── */
.img-sheet {
  position: fixed;
  inset: 0;
  z-index: 1000;
}
.img-sheet[hidden] { display: none; }
.img-sheet-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(20, 16, 8, .45);
  animation: imgSheetFade .15s ease-out;
}
.img-sheet-panel {
  position: absolute;
  inset-inline: 0;
  bottom: 0;
  display: grid;
  gap: 10px;
  padding: 16px 16px calc(16px + env(safe-area-inset-bottom));
  background: var(--surface);
  border-radius: 18px 18px 0 0;
  box-shadow: var(--shadow-lifted);
  animation: imgSheetUp .18s ease-out;
}
.img-sheet-option {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 48px;
  padding: 13px 16px;
  background: var(--surface-alt, #faf6ef);
  border: 1.5px solid var(--border);
  border-radius: 13px;
  font-size: 15px;
  font-weight: 800;
  color: var(--text);
  cursor: pointer;
}
.img-sheet-option .ui-icon { width: 20px; height: 20px; color: var(--gold); }
.img-sheet-option:hover { border-color: var(--gold); }
.img-sheet-cancel {
  min-height: 48px;
  padding: 13px 16px;
  background: transparent;
  border: 0;
  border-radius: 13px;
  font-size: 14px;
  font-weight: 800;
  color: var(--muted);
  cursor: pointer;
}
.img-sheet-cancel:hover { color: var(--text); }

@keyframes imgSheetFade { from { opacity: 0; } to { opacity: 1; } }
@keyframes imgSheetUp { from { transform: translateY(100%); } to { transform: translateY(0); } }

/* ─── drawer select (bottom sheet replacement for <select data-drawer-select>) ─── */
.drawer-sheet { position: fixed; inset: 0; z-index: 1000; }
.drawer-sheet-panel { max-height: 80vh; overflow-y: auto; }
.img-sheet-option.is-current {
  border-color: var(--gold);
  color: var(--gold-hover);
}
.drawer-check {
  margin-inline-start: auto;
  color: var(--gold);
  font-weight: 900;
}
.drawer-define {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 13px 16px;
  background: var(--gold-soft);
  color: var(--gold-hover);
  border: 1.5px dashed var(--gold);
  border-radius: 13px;
  font-size: 15px;
  font-weight: 800;
  cursor: pointer;
}
.drawer-define .ui-icon { width: 18px; height: 18px; color: var(--gold); }
.drawer-define:hover { filter: brightness(.98); }

/* نوع عملیات bottom-sheet options — category-tinted icon chip per operation */
.drawer-sheet-title {
  padding: 2px 4px 6px;
  font-size: 13px;
  font-weight: 800;
  color: var(--muted);
  text-align: right;
}
.op-sheet-option .op-opt-ic {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  flex: 0 0 auto;
  border-radius: 11px;
  background: var(--op-bg, var(--gold-soft));
  color: var(--op-fg, var(--gold-hover));
}
.op-sheet-option .op-opt-ic .ui-icon { width: 20px; height: 20px; color: inherit; }
.op-sheet-option.t-buy     { --op-fg: var(--cat-buy);  --op-bg: var(--cat-buy-bg); }
.op-sheet-option.t-sell    { --op-fg: var(--cat-sell); --op-bg: var(--cat-sell-bg); }
.op-sheet-option.t-payment { --op-fg: var(--cat-pay);  --op-bg: var(--cat-pay-bg); }
.op-sheet-option.t-receipt { --op-fg: var(--cat-recv); --op-bg: var(--cat-recv-bg); }
.op-sheet-option.t-expense { --op-fg: var(--cat-exp);  --op-bg: var(--cat-exp-bg); }
.op-sheet-option.is-current { border-color: var(--op-fg); color: var(--op-fg); }

/* ─── detail page: tagged item / cheque image thumbnails ──────────── */
.detail-thumb-link {
  display: inline-flex;
  margin-top: 6px;
}
.detail-thumb-link img {
  width: 64px;
  height: 64px;
  object-fit: cover;
  border-radius: 10px;
  border: 1px solid var(--border);
}

/* ════════════════════════════════════════════════════════════════════
   Wizard step dots — simple filled/empty circles. Hardcoded color fallback
   so they render correctly on the very first paint (no theme dependency,
   no icon, no flash bug).
   ════════════════════════════════════════════════════════════════════ */
.step-dots {
  position: sticky;
  top: 64px;
  z-index: 20;
  display: flex;
  gap: 12px;
  justify-content: center;
  align-items: center;
  margin: -8px -16px 20px;
  padding: 14px 16px;
  background: var(--nav-bg, rgba(255, 255, 255, .95));
  border-bottom: 1px solid var(--border, #ebe6dc);
}
.step-dots .sdot {
  width: 13px;
  height: 13px;
  border-radius: 50%;
  border: 2px solid var(--gold, #a9803b);
  background: transparent;
  transition: background .2s ease;
}
.step-dots .sdot.is-active,
.step-dots .sdot.is-complete { background: var(--gold, #a9803b); }
.step-dots .sdot[hidden] { display: none; }

/* ════════════════════════════════════════════════════════════════════
   گزارش — داشبورد (موجود در transaction.css تا همیشه بارگذاری شود)
   ════════════════════════════════════════════════════════════════════ */
.rep-controls {
  margin: 4px 0 18px;
  padding: 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}
.rep-controls .chips { padding-top: 0; }
.rep-controls .adv-filter { margin-top: 6px; }
.rep-date-form { display: flex; gap: 8px; margin-top: 8px; }
.rep-date-form input { flex: 1; }
.rep-filter-label { margin: 12px 0 6px; font-size: 12px; font-weight: 800; color: var(--muted); }
.rep-locked {
  display: inline-flex; align-items: center; gap: 6px; margin-top: 10px;
  padding: 8px 14px; border-radius: 999px; border: 1.5px solid var(--border);
  background: var(--surface-alt); color: var(--muted); font-size: 12.5px; font-weight: 750;
}
.rep-locked .ui-icon { width: 16px; height: 16px; }

.rep-chart { display: grid; gap: 13px; margin-top: 4px; }
.rep-chart-row, .rep-leader-row { display: flex; align-items: center; gap: 12px; }
.rep-chart-label {
  flex: 0 0 84px; font-size: 12.5px; font-weight: 700; color: var(--muted);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.rep-leader-name {
  flex: 0 0 108px; font-size: 12.5px; font-weight: 750;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.rep-bar {
  flex: 1; height: 12px; min-width: 0;
  background: var(--surface-alt);
  border: 1px solid var(--border);
  border-radius: 999px; overflow: hidden;
}
.rep-bar > i {
  display: block; height: 100%; width: 0;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--gold-hover), var(--gold));
  box-shadow: inset 0 1px 0 rgba(255,255,255,.25);
  transition: width .4s ease;
}
.rep-bar.is-receipt > i { background: linear-gradient(90deg, #1e5c40, #2e7d5a); }
.rep-chart-value, .rep-pct {
  flex: 0 0 70px; font-size: 12.5px; font-weight: 800; color: var(--gold-hover);
  text-align: left; font-variant-numeric: tabular-nums; white-space: nowrap;
}
.rep-pct { flex-basis: 48px; font-weight: 850; }

.rep-seller-list { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--border); display: grid; gap: 8px; }
.rep-seller-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.rep-seller-row strong { font-size: 13.5px; font-weight: 800; }
.rep-seller-row span { font-size: 12px; color: var(--muted); }

@media (max-width: 480px) {
  .rep-chart-label { flex-basis: 64px; }
  .rep-leader-name { flex-basis: 82px; }
  .rep-chart-value { flex-basis: 60px; }
}

/* ════════════════════════════════════════════════════════════════════
   Number overflow guard — large tabular numbers must always stay inside
   their card. Allow the value to shrink (clamp by viewport) and, worst
   case, wrap instead of spilling out of the box.
   ════════════════════════════════════════════════════════════════════ */
.wallet-val b,
.treasury-hero-val,
.rate-hero-value,
.rate-banner-value,
.amount-hero .ah-val,
.dstat-body strong,
.dstat-body,
.convert-summary-cell strong,
.convert-preview strong,
.stat-card strong,
.wallet-val,
.t-amt,
.r-row dd,
dd,
.receipt-total,
.txn-meta,
.payment-summary strong {
  min-width: 0;
  max-width: 100%;
  overflow-wrap: anywhere;
}
.txn-meta, .payment-summary, .r-row, .receipt-list div { min-width: 0; }
.wallet-val { flex-wrap: wrap; }
.wallet-val b      { font-size: clamp(19px, 6.2vw, 28px); }
.treasury-hero-val { font-size: clamp(20px, 6.5vw, 30px); }
.rate-hero-value   { font-size: clamp(22px, 7vw, 34px); }
.amount-hero .ah-val { font-size: clamp(19px, 6vw, 26px); }
.dstat-body strong { font-size: clamp(16px, 5vw, 20px); }
.dstat-wide.dstat-green .dstat-body strong,
.dstat-wide.dstat-red .dstat-body strong { font-size: clamp(19px, 6vw, 26px); }
.stat-card strong  { font-size: clamp(17px, 5.5vw, 22px); }
.convert-summary-cell strong { font-size: clamp(15px, 5vw, 19px); }
.t-amt { white-space: normal; }

/* ════════════ بَچ ۸ — پولیشِ UI (تسک‌های #12–#15) ════════════ */

/* #12 — «نوع دارایی» (طلا/پول): پیل‌های دوتاییِ RTL به‌جای رادیوهای خام */
.transfer-asset-seg > div { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.transfer-asset-seg input[type="radio"] {
  position: absolute; opacity: 0; width: 1px; height: 1px; margin: 0; pointer-events: none;
}
.transfer-asset-seg > div > div { display: flex; }
.transfer-asset-seg label {
  display: flex; align-items: center; justify-content: center; width: 100%;
  min-height: 56px; margin: 0; padding: 10px 14px;
  border: 1.5px solid var(--border); border-radius: var(--radius-md);
  background: #fff; color: var(--muted); font-weight: 700; cursor: pointer;
  transition: border-color var(--transition), background var(--transition), color var(--transition);
}
.transfer-asset-seg label:hover { border-color: var(--gold); }
.transfer-asset-seg label:has(input:checked) {
  border-color: var(--gold); color: var(--gold); background: rgba(173,123,34,.10); font-weight: 800;
}

/* #13 / B-3 — اعدادِ بزرگ پشتِ چیپِ «تومان» پنهان نشوند */
.input-suffix input { padding-left: 54px; font-variant-numeric: tabular-nums; }
.input-suffix span { font-size: 11px; left: 8px; }
@media (max-width: 460px) { .input-suffix input { font-size: 15px; padding-left: 50px; } }

/* #14 — فیلدهای پولیِ گرید تمام‌عرض می‌شوند تا عددِ بزرگ جا شود (درصدها دو‌ستونه می‌مانند) */
#transaction-form .field-grid .field:has(.input-suffix) { grid-column: 1 / -1; }

/* #15 / P2-2 — سلکت‌های native (gold_status/misc_type/bank_card) متنِ گزینه را نشان دهند
   و یک‌دست شوند: رنگِ متنِ صریح + فلشِ سفارشیِ سمتِ چپِ RTL */
#transaction-form select, .settings-form select {
  -webkit-appearance: none; appearance: none;
  color: var(--text); line-height: 1.6; padding-left: 38px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%237a6a4a' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: left 12px center; background-size: 16px;
}
#transaction-form select::-ms-expand, .settings-form select::-ms-expand { display: none; }

/* P2-4 — چیپِ «اطلاعات ثبت» در بالای فرم (جلوی تیتر)، کمی فاصله از خلاصهٔ خطاها */
.reg-chip-top { margin-top: 2px; margin-bottom: 14px; }

/* P2-5 — «موجودی اولیه» در هیروِ کارت بانکی */
.bcd-opening {
  display: flex; align-items: baseline; justify-content: space-between; gap: 10px;
  margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--border);
  font-size: 13px; color: var(--muted);
}
.bcd-opening strong { color: var(--text); font-weight: 800; font-variant-numeric: tabular-nums; }
.bcd-opening small { font-weight: 600; color: var(--muted); }

/* #48 — وقتی تصویری انتخاب شد (تامبِ نمایان)، دکمهٔ «افزودن تصویر» مخفی شود؛ با حذف برمی‌گردد. */
[data-img-attach]:has([data-img-thumb]:not([hidden])) [data-img-attach-trigger] { display: none; }

/* P1-18 — نمایشِ هر دو درصد در آیتم‌های انبارِ اتیکت (شیتِ انتخاب). */
.tss-item { flex-wrap: wrap; }
.tss-item .tss-pct { flex-basis: 100%; margin-top: 3px; color: var(--muted, #666); font-size: 12px; font-weight: 600; }

/* ── P1-4 (گزینه B مصوب): «نوع طلا» و «نقد/طلا» در پیکرِ «نوع عملیات» ادغام شدند.
   گرید و کارتِ نوع دارایی فقط «بصری» مخفی‌اند — رادیوها منبع حقیقت باقی می‌مانند
   (اعتبارسنجی، پیش‌نویس، مرور، بله). درسِ hidden-control-validation. */
#gold-operation-section > .field-label { display: none; }
#gold-type-grid { display: none; }
#transfer-asset-section { display: none !important; }

/* ── گزارش روز (بازطراحی ۱۴۰۵/۰۴/۱۸) — هیرو، کاشی‌ها، پیگیری، ستون‌های ۷روزه ──
   dataviz: مارک‌های نازک، گپِ ۲px سطح، برچسبِ انتخابی، متن با توکنِ متن نه رنگِ سری.
   سری‌ها: دریافتی #3b6db3 / پرداختی #b8811a (اعتبارسنجی‌شده: ΔE>100، کنتراست ≥3). */
.rep2-hero { background: linear-gradient(160deg, var(--card, #fff), var(--gold-icon-1, #fff8e8)); border: 1px solid var(--line, #e7e1d6); border-radius: 18px; padding: 18px 16px 14px; margin-bottom: 12px; }
.rep2-hero.is-neg { background: linear-gradient(160deg, var(--card, #fff), #fdf1ef); }
.rep2-hero-label { display: block; font-size: 12.5px; font-weight: 700; color: var(--muted, #5f584c); margin-bottom: 6px; }
.rep2-hero-value { font-size: 44px; font-weight: 800; line-height: 1.1; color: var(--ink, #2b2620); letter-spacing: -0.5px; }
.rep2-hero.is-neg .rep2-hero-value { color: #a33a2e; }
.rep2-hero-value small { font-size: 15px; font-weight: 700; color: var(--muted, #5f584c); margin-inline-start: 4px; }
.rep2-hero-sub { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; margin-top: 8px; font-size: 12px; color: var(--muted, #5f584c); }
.rep2-delta { font-size: 12px; font-weight: 800; }
.rep2-delta.is-good { color: #1a7f4b; }
.rep2-delta.is-bad { color: #b3261e; }
.rep2-delta.is-flat { color: var(--muted, #5f584c); font-weight: 600; }
.rep2-tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-bottom: 12px; }
.rep2-tile { background: var(--card, #fff); border: 1px solid var(--line, #e7e1d6); border-radius: 14px; padding: 12px; display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.rep2-tile-label { display: flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 700; color: var(--muted, #5f584c); }
.rep2-tile-value { font-size: 19px; font-weight: 800; color: var(--ink, #2b2620); overflow-wrap: anywhere; }
.rep2-tile-value small { font-size: 12px; font-weight: 700; color: var(--muted, #5f584c); }
.rep2-key { display: inline-block; width: 10px; height: 10px; border-radius: 3px; flex: none; }
.rep2-key.is-in { background: #3b6db3; }
.rep2-key.is-out { background: #b8811a; }
.rep2-followups { padding-bottom: 8px; }
.rep2-task { display: flex; align-items: center; gap: 10px; padding: 11px 4px; border-top: 1px solid var(--line, #efe9dd); text-decoration: none; color: inherit; }
.rep2-task:first-of-type { border-top: 0; }
.rep2-task-ic { width: 36px; height: 36px; border-radius: 10px; display: flex; align-items: center; justify-content: center; flex: none; }
.rep2-task-ic .ui-icon { width: 18px; height: 18px; }
.rep2-task-ic.is-warn { background: #fdf3e2; color: #a86a08; }
.rep2-task-ic.is-wait { background: #eef3fa; color: #3b6db3; }
.rep2-task-ic.is-mute { background: #f3f0ea; color: var(--muted, #5f584c); }
.rep2-task-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.rep2-task-body strong { font-size: 13.5px; color: var(--ink, #2b2620); }
.rep2-task-body small { font-size: 11.5px; color: var(--muted, #5f584c); }
.rep2-task-go { color: var(--muted, #5f584c); font-weight: 700; }
.rep2-allclear { margin: 4px 2px 10px; font-size: 13px; color: #1a7f4b; font-weight: 700; }
.rep2-legend { display: flex; gap: 16px; margin: 2px 2px 10px; font-size: 12px; color: var(--muted, #5f584c); font-weight: 700; }
.rep2-legend span { display: flex; align-items: center; gap: 6px; }
.rep2-cols { display: flex; align-items: stretch; gap: 6px; height: 148px; padding: 0 2px; }
.rep2-col { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.rep2-col-bars { flex: 1; display: flex; align-items: flex-end; justify-content: center; gap: 2px; border-bottom: 1px solid var(--line, #e7e1d6); }
.rep2-col-bars i { display: block; width: 100%; max-width: 16px; border-radius: 4px 4px 0 0; min-height: 2px; }
.rep2-col-bars i.is-in { background: #3b6db3; }
.rep2-col-bars i.is-out { background: #b8811a; }
.rep2-col-day { text-align: center; font-size: 11px; color: var(--muted, #5f584c); font-variant-numeric: tabular-nums; }
.rep2-col.is-today .rep2-col-day { font-weight: 800; color: var(--ink, #2b2620); }
.rep2-table { margin-top: 10px; }
.rep2-table summary { cursor: pointer; font-size: 12px; font-weight: 700; color: var(--muted, #5f584c); }
.rep2-table table { width: 100%; margin-top: 8px; border-collapse: collapse; font-size: 12.5px; }
.rep2-table th, .rep2-table td { padding: 6px 4px; border-bottom: 1px solid var(--line, #efe9dd); text-align: right; font-variant-numeric: tabular-nums; }
.rep2-table th { color: var(--muted, #5f584c); font-weight: 700; }
.rep2-sellers { display: flex; flex-direction: column; gap: 10px; }
.rep2-seller { display: grid; grid-template-columns: 22px minmax(70px, auto) 1fr auto; align-items: center; gap: 8px; }
.rep2-seller-rank { width: 22px; height: 22px; border-radius: 7px; background: var(--gold-icon-1, #fff8e8); color: #8a6410; font-size: 11.5px; font-weight: 800; display: flex; align-items: center; justify-content: center; }
.rep2-seller-name { font-size: 13px; font-weight: 700; color: var(--ink, #2b2620); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rep2-seller-meta { font-size: 11.5px; color: var(--muted, #5f584c); white-space: nowrap; }
@media (min-width: 560px) { .rep2-tiles { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
/* اصلاحاتِ حلقهٔ نقدِ طراحی — کارت‌ها/فلش‌ها/ستون‌های صفر/خطِ طلاییِ هیرو */
.rep2-hero { position: relative; overflow: hidden; }
.rep2-hero::before { content: ""; position: absolute; inset-inline-start: 16px; top: 0; width: 46px; height: 3px; border-radius: 0 0 3px 3px; background: linear-gradient(90deg, #ef9f27, #b8811a); }
.rep2-delta.dir-up::before, .rep2-delta.dir-down::before { content: ""; display: inline-block; width: 0; height: 0; margin-inline-end: 3px; border-inline-start: 4px solid transparent; border-inline-end: 4px solid transparent; }
.rep2-delta.dir-up::before { border-bottom: 6px solid currentColor; }
.rep2-delta.dir-down::before { border-top: 6px solid currentColor; }
.rep2-col-bars i.is-zero { display: none; }
.rep2-task-go .ui-icon { width: 16px; height: 16px; transform: rotate(90deg); }
/* بستهٔ آ — سررسید چک‌ها در «پیگیری امروز» */
.rep2-cheques { border-bottom: 1px solid var(--line, #efe9dd); padding-bottom: 8px; margin-bottom: 4px; }
.rep2-cheques-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; padding: 2px 2px 8px; }
.rep2-cheques-head strong { font-size: 13.5px; color: var(--ink, #2b2620); }
.rep2-cheques-head span { font-size: 11.5px; color: var(--muted, #5f584c); }
.rep2-cheques-head .is-overdue { color: #b3261e; }
.rep2-cheque { display: grid; grid-template-columns: 74px 1fr auto; align-items: center; gap: 8px; padding: 8px 4px; border-radius: 10px; text-decoration: none; color: inherit; }
.rep2-cheque:nth-child(odd) { background: color-mix(in srgb, var(--card, #fff) 60%, transparent); }
.rep2-cheque-when { font-size: 11.5px; font-weight: 800; color: var(--muted, #5f584c); font-variant-numeric: tabular-nums; }
.rep2-cheque.is-overdue .rep2-cheque-when { color: #b3261e; }
.rep2-cheque.is-today .rep2-cheque-when { color: #a86a08; }
.rep2-cheque-who { font-size: 13px; font-weight: 700; color: var(--ink, #2b2620); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rep2-cheque-amt { font-size: 12.5px; color: var(--ink, #2b2620); font-variant-numeric: tabular-nums; }
/* بستهٔ ت — بستن روز */
.dc-notice { background: #fdf3e2; border: 1px solid #ecd9b3; color: #7a5c17; border-radius: 12px; padding: 10px 12px; font-size: 12.5px; margin-bottom: 12px; }
.dc-expected { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 12px; }
.dc-exp-tile { background: var(--card, #fff); border: 1px solid var(--line, #e7e1d6); border-radius: 14px; padding: 14px 12px; display: flex; flex-direction: column; gap: 6px; }
.dc-exp-tile span { font-size: 12px; font-weight: 700; color: var(--muted, #5f584c); }
.dc-exp-tile strong { font-size: 20px; font-weight: 800; color: var(--ink, #2b2620); overflow-wrap: anywhere; }
.dc-exp-tile strong small { font-size: 12px; font-weight: 700; color: var(--muted, #5f584c); }
.dc-live { margin: -4px 2px 8px; font-size: 12.5px; color: var(--muted, #5f584c); }
.dc-live b.is-ok { color: #1a7f4b; }
.dc-live b.is-over { color: #a86a08; }
.dc-live b.is-short { color: #b3261e; }
.dc-history { display: flex; flex-direction: column; gap: 8px; }
.dc-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.dc-row-date { font-size: 12.5px; font-weight: 800; color: var(--ink, #2b2620); min-width: 84px; font-variant-numeric: tabular-nums; }
.dc-chip { font-size: 11.5px; font-weight: 800; padding: 3px 8px; border-radius: 999px; }
.dc-chip.is-ok { background: #e8f4ec; color: #1a7f4b; }
.dc-chip.is-over { background: #fdf3e2; color: #a86a08; }
.dc-chip.is-short { background: #fbeae8; color: #b3261e; }
.dc-row-by { margin-inline-start: auto; font-size: 11.5px; color: var(--muted, #5f584c); }
.dc-row-note { font-size: 11.5px; color: var(--muted, #5f584c); padding: 0 4px 4px; border-bottom: 1px dashed var(--line, #efe9dd); }
/* بستهٔ ب — نشانِ شکستِ ارسالِ بله + ارسال دوباره */
.bale-fail { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; background: #fdf3e2; border: 1px solid #ecd9b3; border-radius: 12px; padding: 10px 12px; margin-bottom: 12px; }
.bale-fail-body { flex: 1; min-width: 200px; display: flex; flex-direction: column; gap: 2px; }
.bale-fail-body strong { font-size: 13px; color: #7a5c17; }
.bale-fail-body small { font-size: 11px; color: #a08040; overflow-wrap: anywhere; }

/* ── partner_share.html (منتقل‌شده از extra_css — nav.js فقط main را عوض می‌کند و head نمی‌آید) ── */
  /* ── پروفایلِ سرمایه‌گذار — RTL، هم‌راستا با پالتِ طلاییِ گالری ─────────────── */
  .pf-hero { display:flex; flex-direction:column; gap:14px; }
  .pf-hero-cells { display:grid; grid-template-columns:1fr 1fr; gap:12px; }
  .pf-cell { background:#fbf6ea; border:1px solid #ecd9a6; border-radius:14px; padding:14px 12px; text-align:center; }
  .pf-cell .lbl { display:block; font-size:12px; color:#7a5c12; font-weight:700; margin-bottom:6px; }
  .pf-cell .num { display:block; font-size:22px; font-weight:800; color:#2a2317; font-variant-numeric:tabular-nums; line-height:1.2; }
  .pf-cell .unit { display:block; font-size:11px; color:#9a8a63; margin-top:2px; }
  .pf-delta { font-variant-numeric:tabular-nums; font-weight:800; }
  .pf-delta.is-up { color:#1a7f4b; }
  .pf-delta.is-down { color:#b3261e; }
  .pf-delta-chip { display:inline-flex; align-items:center; gap:6px; border-radius:999px; padding:4px 12px; font-size:13px; font-weight:800; }
  .pf-delta-chip.is-up { background:#e6f4ec; color:#1a7f4b; }
  .pf-delta-chip.is-down { background:#fbe9e7; color:#b3261e; }
  .pf-delta-chip.is-flat { background:#f0ece2; color:#6b5f45; }
  /* دفترِ رویدادها */
  .pf-timeline { display:flex; flex-direction:column; gap:10px; margin-top:6px; }
  .pf-event { display:flex; align-items:flex-start; gap:12px; padding:12px; border:1px solid #eadfc6; border-radius:12px; background:#fff; }
  .pf-ev-badge { flex:none; width:40px; height:40px; border-radius:10px; display:flex; align-items:center; justify-content:center; font-weight:800; font-size:18px; font-variant-numeric:tabular-nums; }
  .pf-ev-badge.is-up { background:#e6f4ec; color:#1a7f4b; }
  .pf-ev-badge.is-down { background:#fbe9e7; color:#b3261e; }
  .pf-ev-body { flex:1; min-width:0; }
  .pf-ev-top { display:flex; justify-content:space-between; gap:8px; align-items:baseline; }
  .pf-ev-kind { font-weight:800; color:#2a2317; font-size:14px; }
  .pf-ev-grams { font-weight:800; font-variant-numeric:tabular-nums; }
  .pf-ev-grams.is-up { color:#1a7f4b; }
  .pf-ev-grams.is-down { color:#b3261e; }
  .pf-ev-meta { display:flex; flex-wrap:wrap; gap:6px 12px; margin-top:4px; font-size:12px; color:#7a6b45; }
  .pf-ev-date { font-variant-numeric:tabular-nums; }
  .pf-ev-balance { font-weight:800; color:#5f5136; font-variant-numeric:tabular-nums; }
  /* فرم‌ها */
  .pf-inline-grid { display:grid; grid-template-columns:1fr 1fr; gap:10px; }
  @media (max-width:400px){ .pf-inline-grid { grid-template-columns:1fr; } }
  .pf-danger { border:1px solid #f0c8c2; background:#fdf4f3; }
  .pf-danger .card-heading h2 { color:#b3261e; }
  .btn-danger-soft { width:100%; min-height:48px; border-radius:12px; border:1px solid #d9534f; background:#fff; color:#b3261e; font-weight:800; cursor:pointer; }
  .btn-danger-soft:disabled { opacity:.5; cursor:not-allowed; }
  .pf-left-note { font-size:12px; color:#9a8a63; margin-top:8px; }
  .pf-empty { text-align:center; color:#8a7c5a; padding:18px 8px; }
  /* ── بازطراحی ۰۴/۱۹: هیرو مثل «دارایی طلا»، فرمِ نادر جمع‌شونده، پنل‌های بدهی/طلب ── */
  .pf-hero2 { position:relative; overflow:hidden; display:flex; flex-direction:column; gap:10px; }
  .pf-hero2::before { content:""; position:absolute; inset-inline-start:0; top:0; width:46px; height:3px; border-radius:0 0 3px 3px; background:linear-gradient(90deg,#ef9f27,#b8811a); }
  .pf-hero2-label { font-size:12.5px; font-weight:700; color:var(--muted,#5f584c); }
  .pf-hero2-num { font-size:40px; font-weight:800; line-height:1.1; letter-spacing:-.5px; font-variant-numeric:normal; }
  .pf-hero2-num.is-up { color:#1a7f4b; }
  .pf-hero2-num.is-down { color:#b3261e; }
  .pf-hero2-num small { font-size:14px; font-weight:700; color:var(--muted,#5f584c); margin-inline-start:4px; }
  .pf-stats { display:flex; flex-wrap:wrap; gap:8px 18px; padding-top:8px; border-top:1px dashed #eadfc6; }
  .pf-stat { display:flex; flex-direction:column; gap:2px; }
  .pf-stat .lbl { font-size:11.5px; color:#9a8a63; font-weight:700; }
  .pf-stat .val { font-size:15px; font-weight:800; color:#2a2317; font-variant-numeric:tabular-nums; }
  .pf-collapse { border:1px solid var(--line,#e7e1d6); border-radius:16px; background:var(--card,#fff); margin-bottom:14px; }
  .pf-collapse > summary { list-style:none; cursor:pointer; display:flex; align-items:center; justify-content:space-between; gap:10px; padding:14px; }
  .pf-collapse > summary::-webkit-details-marker { display:none; }
  .pf-collapse-title { display:flex; flex-direction:column; gap:2px; }
  .pf-collapse-title b { font-size:14.5px; color:#2a2317; }
  .pf-collapse-title small { font-size:12px; color:#8a7c5a; font-variant-numeric:tabular-nums; }
  .pf-collapse-cta { flex:none; font-size:12.5px; font-weight:800; color:#7a5c17; background:#fbf3df; border:1px solid #ecd9a6; border-radius:999px; padding:5px 12px; }
  .pf-collapse[open] .pf-collapse-cta { background:#f0ece2; color:#6b5f45; }
  .pf-collapse .lux-card { border:0; box-shadow:none; margin:0; border-radius:0 0 16px 16px; border-top:1px solid #f0e9d8; }
  .oc-block { border:1px solid #efe7d2; background:#fdfaf3; border-radius:12px; padding:12px; margin-top:12px; }
  .oc-block .field-label { font-size:12.5px; font-weight:800; color:#7a5c17; margin-bottom:8px; }
  .oc-block .field { margin-bottom:8px; }

/* ── opening_state.html (منتقل‌شده از extra_css — nav.js فقط main را عوض می‌کند و head نمی‌آید) ── */
  /* ── مقدار اولیه — بازطراحی ۰۴/۱۹ (این صفحه پیش‌تر بدونِ استایل بود) ── */
  .cmp-grid { display:grid; grid-template-columns:1fr; gap:10px; }
  @media (min-width:560px){ .cmp-grid { grid-template-columns:1fr 1fr; } }
  .cmp-hero { position:relative; overflow:hidden; background:#fbf6ea; border:1px solid #ecd9a6; border-radius:14px; padding:14px; display:flex; flex-direction:column; gap:4px; }
  .cmp-hero::before { content:""; position:absolute; inset-inline-start:0; top:0; width:38px; height:3px; border-radius:0 0 3px 3px; background:linear-gradient(90deg,#ef9f27,#b8811a); }
  .cmp-hero.cmp-secondary { background:var(--card,#fff); border-color:var(--line,#e7e1d6); }
  .cmp-hero.cmp-secondary::before { background:#d8d2c4; }
  .cmp-label { font-size:12px; font-weight:700; color:#7a5c12; }
  .cmp-secondary .cmp-label { color:var(--muted,#5f584c); }
  .cmp-num { font-size:19px; font-weight:800; color:#2a2317; font-variant-numeric:tabular-nums; overflow-wrap:anywhere; }
  .cmp-sub { font-size:11.5px; color:#9a8a63; font-variant-numeric:tabular-nums; }
  .partner-row { display:grid; grid-template-columns:1fr 1fr; gap:10px 12px; border:1px solid var(--line,#e7e1d6); border-radius:14px; padding:12px; margin-bottom:12px; background:var(--card,#fff); }
  .partner-row .field { margin:0; }
  .partner-row .del-check { grid-column:1 / -1; }
  @media (max-width:420px){ .partner-row { grid-template-columns:1fr; } }
  .partner-row:last-of-type { border-style:dashed; background:#fdfbf6; }
  .oc-grid { display:grid; grid-template-columns:1fr; gap:12px; }
  @media (min-width:560px){ .oc-grid { grid-template-columns:1fr 1fr; } }
  .oc-block { border:1px solid #efe7d2; background:#fdfaf3; border-radius:12px; padding:12px; }
  .oc-block .field-label { font-size:12.5px; font-weight:800; color:#7a5c17; margin-bottom:8px; }
  .oc-block .field { margin-bottom:8px; }
  .del-check { display:inline-flex; align-items:center; gap:8px; font-size:12.5px; font-weight:700; color:#8a4a42; cursor:pointer; }
  .del-check input { width:18px; height:18px; accent-color:#b3261e; }
  .capture-row { display:flex; align-items:center; gap:10px; background:#f3efe6; border:1px solid #e3dcc9; border-radius:12px; padding:12px; margin:14px 0; font-size:13.5px; font-weight:700; color:#4a4132; }
  .capture-row input { width:20px; height:20px; accent-color:var(--accent); }


/* ── لینکِ طرف‌حساب — ظریف، طلایی، بدونِ زیرخطِ قدیمی ── */
a.cp-link { color:var(--accent-ink); font-weight:800; text-decoration:none; border-bottom:1.5px dotted var(--border); padding-bottom:1px; transition:color .15s ease, border-color .15s ease; }
a.cp-link:hover, a.cp-link:active { color:var(--accent); border-bottom-style:solid; border-bottom-color:var(--accent); }

/* ── نمودارِ روندِ «دارایی طلا» — از extra_css منتقل شد (nav.js فقط <main> را عوض می‌کند) ── */
.ga-delta { display:flex; align-items:center; justify-content:space-between; gap:8px; margin-top:8px; padding:10px 14px; border-radius:10px; font-weight:800; font-variant-numeric:tabular-nums; }
.ga-delta.is-up { background:#22402e; color:#7ddba4; }
.ga-delta.is-down { background:#462623; color:#f2a09a; }
.ga-delta-lbl { font-size:12px; font-weight:700; opacity:.85; }
.ga-label-hint { font-weight:500; color:#9a9a9a; font-size:.7rem; }
.ga-trend { background:#fff; border:1px solid #ececec; border-radius:14px; padding:12px 12px 8px; margin-bottom:10px; }
.ga-trend svg { display:block; width:100%; height:auto; }
.ga-grid { stroke:#eee7da; stroke-width:1; }
.ga-area { fill:#b8811a; opacity:.10; }
.ga-line { stroke:#b8811a; stroke-width:2; stroke-linecap:round; stroke-linejoin:round; fill:none; }
.ga-dot { fill:#b8811a; stroke:#fff; stroke-width:2; }
.ga-txt { font-size:9px; fill:#8d8578; font-family:inherit; }
.ga-txt-end { font-size:10px; font-weight:700; fill:#5a4a22; }
.ga-trend-meta { display:flex; align-items:center; justify-content:space-between; margin-top:6px; font-size:.68rem; color:#9a9a9a; }
.ga-trend-meta b { font-size:.76rem; }
.ga-trend-meta b.is-up { color:#1a7f4b; }
.ga-trend-meta b.is-down { color:#b3261e; }
.ga-hist-details { margin-bottom:10px; }
.ga-hist-details summary { cursor:pointer; font-size:.78rem; color:#7a5c17; font-weight:600; margin:0 2px 8px; list-style-position:inside; }

/* ── نوارِ تب‌های تنظیمات — چیپ‌های اسکرول‌شونده به‌جای گریدِ دکمه‌های اداری ── */
.st-tabs { display:flex; gap:8px; overflow-x:auto; padding:2px 2px 10px; margin:0 -2px 14px; scrollbar-width:none; -webkit-overflow-scrolling:touch; scroll-snap-type:x proximity; }
.st-tabs::-webkit-scrollbar { display:none; }
.st-tab { flex:0 0 auto; scroll-snap-align:start; display:inline-flex; align-items:center; min-height:40px; padding:8px 16px; border-radius:999px; border:1px solid var(--border,#ebe6dc); background:var(--surface,#fff); color:var(--muted,#5f584c); font-size:13px; font-weight:700; white-space:nowrap; text-decoration:none; transition:color .15s ease, border-color .15s ease, background .15s ease; }
.st-tab:active { transform:scale(.97); }
.st-tab.is-current { background:var(--gold,#a9803b); border-color:var(--gold,#a9803b); color:#fff; font-weight:800; box-shadow:0 4px 12px rgba(169,128,59,.28); }

/* ── نمودارِ آبشاریِ گزارشِ روزانه — دریافتی → پرداختی → مخارج → خالص ── */
.rep2-wf svg { display:block; width:100%; height:auto; max-width:430px; margin-inline:auto; }
.rep2-wf-bar.is-zero { opacity:.4; }
.rep2-wf-val { font-weight:800; }
.rep2-wf-zero { stroke:#ded5c2; stroke-width:1; }
.rep2-wf-conn { stroke:#c9bfa8; stroke-width:1; stroke-dasharray:3 3; }
.rep2-wf-bar.is-in { fill:#3b6db3; }
.rep2-wf-bar.is-out { fill:#b8811a; }
.rep2-wf-bar.is-net { fill:#1a7f4b; }
.rep2-wf-bar.is-net.is-neg { fill:#b3261e; }
.rep2-wf-val { font-size:10px; font-weight:700; fill:#5a4a22; font-family:inherit; font-variant-numeric:tabular-nums; }
.rep2-wf-lbl { font-size:10.5px; fill:#8d8578; font-family:inherit; }

/* ── صورتحساب — از extra_css منتقل شد؛ .stmt-who جایگزینِ سلکتورِ خرابِ «span» (که brand-orb را block می‌کرد و آیکن بالا-راست می‌افتاد) ── */
.stmt-header { display:flex; align-items:center; justify-content:space-between; gap:14px; margin-bottom:18px; flex-wrap:wrap; }
.stmt-id { display:flex; align-items:center; gap:12px; }
.stmt-who strong { display:block; font-size:20px; font-weight:850; }
.stmt-who span { display:block; color:var(--muted); font-size:12px; margin-top:2px; }
.stmt-date { color:var(--muted); font-size:12px; text-align:left; }
.stmt-table-wrap { overflow-x:auto; border:1px solid var(--border); border-radius:var(--radius-sm,12px); background:var(--surface); }
table.stmt-table { width:100%; border-collapse:collapse; font-size:13px; min-width:560px; }
table.stmt-table th, table.stmt-table td { padding:10px 12px; text-align:center; border-bottom:1px solid var(--border); white-space:nowrap; font-variant-numeric:tabular-nums; }
table.stmt-table th { background:var(--surface-alt,#faf7f1); color:var(--muted); font-size:12px; font-weight:750; }
table.stmt-table tbody tr:last-child td { border-bottom:none; }
table.stmt-table td.stmt-label { text-align:right; white-space:normal; }
table.stmt-table td a { color:var(--gold-hover,#8a6a31); text-decoration:none; }
table.stmt-table td a:hover { text-decoration:underline; }
.stmt-pos { color:#2e7d5a; }
.stmt-neg { color:var(--red,#b3261e); }
.stmt-totals { margin-top:18px; display:grid; gap:10px; grid-template-columns:repeat(2,1fr); }
@media (max-width:520px){ .stmt-totals { grid-template-columns:1fr; } }
.stmt-empty { padding:24px; text-align:center; color:var(--muted); }

/* دانلود: شیتِ انتخابِ اکسل/PDF */
.stmt-dl { margin-top:18px; }
.stmt-dl > summary { list-style:none; cursor:pointer; }
.stmt-dl > summary::-webkit-details-marker { display:none; }
.stmt-dl-opts { display:grid; gap:10px; margin-top:10px; }
.stmt-dl-opt { display:block; width:100%; text-align:right; padding:14px 16px; border:1px solid var(--border); border-radius:14px; background:var(--surface); cursor:pointer; text-decoration:none; color:var(--text); transition:border-color .15s ease, box-shadow .15s ease; }
.stmt-dl-opt:hover { border-color:var(--gold,#a9803b); box-shadow:0 4px 14px rgba(169,128,59,.15); }
.stmt-dl-opt b { display:block; font-size:14.5px; color:#2a2317; }
.stmt-dl-opt small { display:block; margin-top:2px; font-size:12px; color:var(--muted); }

/* سربرگ و مهرِ چاپی — روی صفحه پنهان */
.stmt-letterhead, .stmt-print-foot { display:none; }

/* اعلانِ اختلافِ بستنِ روز در «پیگیری» گزارش */
.rep2-close-alert { display:block; padding:12px 14px; margin-bottom:12px; border-radius:12px; border:1px solid #f0c8c2; background:#fdf4f3; text-decoration:none; color:inherit; }
.rep2-close-alert b { display:block; font-size:13.5px; color:#8c2a23; }
.rep2-close-alert span { display:block; margin-top:2px; font-size:12.5px; color:#7a5148; font-variant-numeric:tabular-nums; }

/* ── جا شدنِ اعدادِ بلند: ظرف‌ها اجازهٔ جمع‌شدن دارند؛ fit-num در JS اندازه را کم می‌کند ── */
.vlt-bd, .dstat-body, .op-card-body, .pf-ev-body { min-width:0; }
.vlt-bd strong, .dstat-body strong, .rep2-tile-value, .cmp-num, .pf-hero2-num,
.ga-hero-cell .num, .dc-exp-tile strong, .stat-card strong, .pf-stat .val {
  display:block; overflow:hidden; white-space:nowrap; min-width:0;
}

/* ── چاپ/PDF صورتحساب — سندِ رسمیِ جواهری ── */
@media print {
  .app-header, .bottom-nav, .messages, .stmt-dl, .stmt-header, .wallet-legend { display:none !important; }
  body { background:#fff !important; }
  .page-container { padding:0; max-width:none; width:100%; }
  .stmt-letterhead {
    display:flex; align-items:center; justify-content:space-between; gap:16px;
    padding:0 2px 14px; margin-bottom:16px;
    border-bottom:3px double #a9803b;
  }
  .stmt-lh-brand { display:flex; align-items:center; gap:12px; }
  .stmt-lh-logo { width:52px; height:52px; object-fit:contain; }
  .stmt-lh-brand strong { display:block; font-size:19px; font-weight:850; color:#211d17; }
  .stmt-lh-brand small { display:block; font-size:11px; color:#7a5c17; letter-spacing:.06em; }
  .stmt-lh-meta { text-align:left; font-size:11.5px; color:#5f584c; }
  .stmt-lh-meta b { display:block; font-size:13px; color:#7a5c17; margin-bottom:2px; }
  .stmt-lh-meta span { display:block; }
  table.stmt-table { font-size:11.5px; min-width:0; }
  .stmt-table-wrap { border-color:#d9c08a; }
  table.stmt-table th { background:#f5eedf !important; color:#7a5c17; -webkit-print-color-adjust:exact; print-color-adjust:exact; }
  table.stmt-table tbody tr:nth-child(even) td { background:#faf7f1 !important; -webkit-print-color-adjust:exact; print-color-adjust:exact; }
  .stmt-totals .stat-card { border:1px solid #d9c08a; border-radius:10px; }
  .stmt-print-foot {
    display:flex; align-items:center; gap:12px; margin-top:22px;
    font-size:10.5px; color:#9a8a63; text-align:center; white-space:nowrap;
  }
  .stmt-foot-rule { flex:1; height:0; border-top:1px solid #d9c08a; }
}

/* ── گام ۲ (شورا): انصرافِ ویزارد — بالای صفحه، دور از شستِ ثبت ── */
.wiz-head { display:flex; align-items:flex-start; justify-content:space-between; gap:10px; }
.wiz-cancel { min-height:36px; padding:6px 14px; font-size:12.5px; color:var(--muted,#5f584c); flex:0 0 auto; }

/* ── گام ۳ (شورا): خانهٔ بازچیده — سرصفحهٔ فشرده، پیگیری، نرخِ کهنه، دارایی تک‌کارت، لانچر ── */
.dash-hero-slim { padding:4px 2px 10px; }
.dash-hero-slim h1 { margin:0; font-size:19px; }
.dash-hero-slim .dash-date { margin:2px 0 0; font-size:12px; color:var(--muted,#5f584c); }

.rate-banner.is-stale { background:#fdf6e7; border-color:#e7c877; }
.rate-banner.is-stale .rate-banner-meta { color:#9a6b00; font-weight:800; }
  /* رفعِ کنتراست (۰۴/۲۰): در حالتِ «نرخِ کهنه» زمینه کِرِم می‌شود؛ متنِ سفید نامرئی بود. */
  .rate-banner.is-stale .rate-banner-label { color:#8a6d2e; }
  .rate-banner.is-stale .rate-banner-value { color:#2a2010; }
  .rate-banner.is-stale .rate-banner-value small { color:#7a5c17; }
  .rate-banner.is-stale .rate-banner-cta { color:#8a6a31; }
  .rate-banner.is-stale .rate-banner-icon { background:#f3e2b6; color:#8a6a31; }

.fu-strip { display:flex; gap:8px; overflow-x:auto; padding:2px 2px 10px; margin:0 -2px 6px; scrollbar-width:none; -webkit-overflow-scrolling:touch; }
.fu-strip::-webkit-scrollbar { display:none; }
.fu-chip { flex:0 0 auto; display:flex; flex-direction:column; gap:1px; min-width:132px; padding:10px 14px; border-radius:14px; border:1px solid var(--border,#ebe6dc); background:var(--surface,#fff); text-decoration:none; color:inherit; }
.fu-chip b { font-size:13px; color:#2a2317; }
.fu-chip span { font-size:11.5px; color:var(--muted,#5f584c); }
.fu-chip.is-amber { background:#fdf6e7; border-color:#eeda9f; }
.fu-chip.is-amber b { color:#8a6200; }
.fu-chip.is-red { background:#fdf4f3; border-color:#f0c8c2; }
.fu-chip.is-red b { color:#8c2a23; }

.trz-cols { display:grid; grid-template-columns:1fr 1fr 1fr; gap:8px; margin-top:12px; }
.trz-col { display:flex; flex-direction:column; gap:2px; min-width:0; padding:10px 12px; border-radius:12px; background:rgba(255,255,255,.08); border:1px solid rgba(255,255,255,.14); text-decoration:none; color:inherit; }
.trz-col .lbl { font-size:11px; opacity:.8; }
.trz-col strong { font-size:14.5px; font-weight:800; font-variant-numeric:tabular-nums; display:block; overflow:hidden; white-space:nowrap; }
.trz-col .go { font-size:10.5px; opacity:.75; }
.trz-col.is-minus strong { color:#f2a09a; }
@media (max-width:420px){ .trz-cols { grid-template-columns:1fr 1fr; } .trz-cols .trz-col:last-child { grid-column:1 / -1; } }

.dash-today-line { display:block; margin:-4px 0 10px; font-size:12.5px; color:var(--muted,#5f584c); text-decoration:none; font-variant-numeric:tabular-nums; }
.dash-today-line:hover { color:var(--gold,#a9803b); }

.launch-grid { display:grid; grid-template-columns:repeat(4,1fr); gap:8px; margin-bottom:14px; }
.launch-tile { display:flex; flex-direction:column; align-items:center; gap:6px; padding:12px 6px; border-radius:14px; border:1px solid var(--border,#ebe6dc); background:var(--surface,#fff); text-decoration:none; color:var(--text,#211d17); font-size:11.5px; font-weight:700; text-align:center; }
.launch-tile:active { transform:scale(.96); }
.launch-ic { display:flex; align-items:center; justify-content:center; width:34px; height:34px; border-radius:10px; background:var(--gold-soft,#f5eedf); color:var(--gold-hover,#8a6a31); }
.launch-ic .ui-icon { width:18px; height:18px; }


/* ── رفعِ درهم‌ریختگیِ سربرگِ صفحهٔ رسید (۰۴/۲۰): دکمه‌ها عرضِ عنوان را می‌دزدیدند ── */
.hero-heading.dh-head { flex-wrap: wrap; align-items: flex-start; }
.hero-heading.dh-head > .dh-title { flex: 1 1 100%; display: flex; align-items: center; gap: 12px; min-width: 0; }
.hero-heading.dh-head > .dh-title > div { min-width: 0; }
.hero-heading.dh-head .dh-actions { display: flex; flex-wrap: wrap; gap: 8px; width: 100%; }
.hero-heading.dh-head .dh-actions .btn-secondary { flex: 0 0 auto; }

/* ── بازسازیِ شیتِ انتخابِ طرف‌حساب (۰۴/۲۰): سربرگِ چسبان + جستجو + فهرستِ اسکرول‌شونده
   + پاورقیِ چسبان؛ ردیف‌های تمام‌عرضِ راست‌چین با نام + موبایل. روی .img-sheet سوار است
   (position:fixed;inset:0;z-index:1000 → کلِ صفحه و هدر را می‌پوشاند). ── */
.img-sheet-panel.cp-sheet {
  gap: 0;
  padding: 0;
  max-height: 85vh;
  grid-template-rows: auto 1fr auto;
}
.cp-sheet-head {
  position: sticky; top: 0; z-index: 2;
  display: grid; gap: 10px;
  padding: 16px 16px 12px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  border-radius: 18px 18px 0 0;
}
.cp-sheet-head::before {
  content: ""; display: block; width: 40px; height: 4px; border-radius: 3px;
  background: var(--border); margin: 0 auto 4px;
}
.cp-sheet-title { font-size: 15px; font-weight: 850; color: var(--text); text-align: right; }
.cp-sheet-search {
  width: 100%; min-height: 46px; padding: 10px 14px;
  border: 1.5px solid var(--border); border-radius: 12px;
  background: var(--surface-alt, #faf6ef); color: var(--text);
  font-size: 15px; text-align: right;
}
.cp-sheet-search:focus { outline: none; border-color: var(--gold); }
.cp-sheet-list {
  display: grid; gap: 8px;
  overflow-y: auto; -webkit-overflow-scrolling: touch;
  padding: 12px 16px;
  min-height: 0;
}
.cp-sheet-foot {
  position: sticky; bottom: 0; z-index: 2;
  display: grid; gap: 8px;
  padding: 10px 16px calc(12px + env(safe-area-inset-bottom));
  background: var(--surface);
  border-top: 1px solid var(--border);
}
/* ردیفِ طرف‌حساب: تمام‌عرض، راست‌چین، نام بولد + موبایل خاکستری زیرش */
.cp-sheet-list .cp-opt { width: 100%; justify-content: flex-start; text-align: right; }
.cp-opt-body { display: flex; flex-direction: column; gap: 2px; align-items: flex-start; min-width: 0; }
.cp-opt-name { font-size: 15px; font-weight: 800; color: var(--text); }
.cp-opt-tel { font-size: 12.5px; font-weight: 600; color: var(--muted); font-variant-numeric: tabular-nums; }
.cp-sheet-list .tss-empty { text-align: center; color: var(--muted); padding: 20px 8px; font-size: 13.5px; }

/* ── بستهٔ ث (۰۴/۲۰): جست‌وجوی سراسری + کاشیِ پهنِ سود به گرم + صافیِ چینشِ روزِ صفر ── */
.gs-form { display: flex; gap: 8px; margin: 0 0 16px; }
.gs-form .gs-input { flex: 1 1 auto; min-width: 0; min-height: 48px; padding: 10px 14px;
  border: 1.5px solid var(--border); border-radius: 14px; background: var(--surface);
  color: var(--text); font-size: 15px; }
.gs-form .gs-input:focus { outline: none; border-color: var(--gold); }
.gs-form .btn-secondary, .gs-form .btn-primary { flex: 0 0 auto; }
.gs-home { margin-top: -6px; }
.gs-row { display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 13px 16px; background: var(--surface); border: 1px solid var(--border);
  border-radius: 14px; text-decoration: none; color: inherit; margin-bottom: 8px; }
.gs-row-body { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.gs-row-body small { color: var(--muted); font-size: 12px; }
.gs-row-go { color: var(--gold); font-weight: 800; }
.gs-hit { display: inline-flex; margin-bottom: 12px; }
.gs-excel { margin-top: 8px; font-size: 12.5px; }

.rep2-tile-wide { grid-column: 1 / -1; }
.rep2-tile-value.is-neg { color: #b3261e; }

/* «روز صفر ثبت شده است» و همتاها: در موبایل، آمارها دوستونه به‌جای چینِ ناهموار */
@media (max-width: 480px) {
  .pf-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; padding-top: 10px; }
  .pf-stats .pf-stat:last-child:nth-child(odd) { grid-column: 1 / -1; }
}

/* ── شیتِ انصرافِ ویزارد (۰۴/۲۰): جایگزینِ confirmِ خامِ مرورگر — فقط در ثبتِ نو ── */
.wcx-panel { justify-items: center; text-align: center; gap: 6px; padding-top: 10px; }
.wcx-handle { width: 42px; height: 4px; border-radius: 999px; background: var(--border); margin-bottom: 6px; }
.wcx-icon { display: grid; place-items: center; width: 52px; height: 52px; border-radius: 16px;
  background: var(--gold-soft, #f4ead8); color: var(--gold); margin-bottom: 2px; }
.wcx-icon .ui-icon { width: 24px; height: 24px; transform: rotate(45deg); }
.wcx-title { font-size: 17px; font-weight: 800; color: var(--text); }
.wcx-text { font-size: 13.5px; line-height: 1.9; color: var(--muted); max-width: 34ch; margin-bottom: 8px; }
.wcx-panel .btn-primary { width: 100%; }
.wcx-leave { width: 100%; min-height: 46px; padding: 11px 16px; background: transparent; border: 0;
  border-radius: 13px; font-size: 14px; font-weight: 800; color: #b3261e; cursor: pointer; }
.wcx-leave:hover { background: var(--buy-bg, #f9ebe8); }

/* حالتِ «در حال ارسال به بله» — خنثی، نه هشدار (۰۴/۲۰: بنر «نرفت» در پنجرهٔ ارسالِ پس‌زمینه دروغ بود) */
.bale-fail.is-pending { background: #f2f4f7; border-color: #e0e4ea; }
.bale-fail.is-pending strong { color: #46505e; }
.bale-fail.is-pending small { color: #6b7484; }

/* ── پروندهٔ طرف‌حساب (نقشهٔ راه ۰۵/۰۴) — بازطراحیِ ۰۴/۲۰: رنگی، خوانا، معنی‌دار ── */
.cpx-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; }
.cpx-badge { display: inline-flex; align-items: center; gap: 6px; padding: 5px 13px; border-radius: 999px;
  font-size: 12.5px; font-weight: 800; border: 1px solid transparent; }
.cpx-badge::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.cpx-badge.is-clear { background: #e8f4ec; color: #1a7f4b; border-color: #cbe6d5; }
.cpx-badge.is-fresh { background: #f5eedf; color: #8a6a31; border-color: #ecd9b3; }
.cpx-badge.is-warn { background: #fdf3e2; color: #9a6a00; border-color: #ecd9b3; }
.cpx-badge.is-risk { background: #f9ebe8; color: #b3261e; border-color: #efcfc9; }
.cpx-age { font-size: 13px; font-weight: 800; color: var(--text); }
.cpx-rank-link { margin-inline-start: auto; }

/* کاشی‌های آماری رنگی: آیکنِ رنگ‌آمیزی‌شده + عددِ درشت */
.cpx-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.cpx-stat { display: flex; align-items: center; gap: 10px; padding: 12px;
  border-radius: 14px; border: 1px solid var(--border); background: var(--surface-alt, #faf6ef); }
.cpx-ic { display: grid; place-items: center; flex: 0 0 40px; width: 40px; height: 40px;
  border-radius: 12px; background: #efe9dc; color: var(--gold); }
.cpx-ic .ui-icon, .cpx-ic svg { width: 20px; height: 20px; }
.cpx-body { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.cpx-body b { font-size: 16px; font-weight: 800; color: var(--text); font-variant-numeric: tabular-nums;
  overflow-wrap: anywhere; }
.cpx-body small { font-size: 11.5px; font-weight: 700; color: var(--muted); }
.cpx-stat.is-gold { background: #f9f4e9; border-color: #eadfc6; }
.cpx-stat.is-gold .cpx-ic { background: #f0e5cc; color: #8a6a31; }
.cpx-stat.is-green { background: #eef7f1; border-color: #cfe8d9; }
.cpx-stat.is-green .cpx-ic { background: #d9efe2; color: #1a7f4b; }
.cpx-stat.is-green .cpx-body b { color: #14663c; }
.cpx-stat.is-blue { background: #eef3f9; border-color: #d4e2f0; }
.cpx-stat.is-blue .cpx-ic { background: #dde9f5; color: #2c5f96; }
.cpx-stat.is-blue .cpx-body b { color: #274f7c; }
.cpx-stat.is-red { background: #fbeeec; border-color: #efd0ca; }
.cpx-stat.is-red .cpx-ic { background: #f5ddd8; color: #b3261e; }
.cpx-stat.is-red .cpx-body b { color: #b3261e; }
@media (max-width: 520px) { .cpx-stats { grid-template-columns: 1fr 1fr; } }

/* روندِ ۱۲ماهه: ستون‌های واقعی با ریلِ پس‌زمینه، عددِ بالای ستون و ماهِ خوانا */
.cpx-trend-head { display: flex; align-items: baseline; gap: 8px; margin: 16px 0 8px;
  padding-top: 12px; border-top: 1px dashed var(--border); }
.cpx-trend-head span { font-size: 13.5px; font-weight: 800; color: var(--text); }
.cpx-trend-head small { font-size: 11.5px; color: var(--muted); }
/* سه ماهِ اخیر در قاب؛ کشیدن/اسکرول = ماه‌های قبل (تازه‌ترین ماه ابتدای RTL است) */
.cpx-trend { display: flex; align-items: stretch; gap: 8px; overflow-x: auto;
  scroll-snap-type: x mandatory; padding-bottom: 6px; cursor: grab;
  -webkit-overflow-scrolling: touch; scrollbar-width: thin; scrollbar-color: #d8cdb6 transparent; }
.cpx-trend.is-dragging { cursor: grabbing; scroll-snap-type: none; }
.cpx-bar { flex: 0 0 calc((100% - 16px) / 3); scroll-snap-align: start;
  display: flex; flex-direction: column; align-items: center; gap: 5px; min-width: 0;
  padding: 10px 6px 8px; border-radius: 12px; background: var(--surface-alt, #faf6ef);
  border: 1px solid var(--border); user-select: none; }
.cpx-bar.has-data { background: #f9f4e9; border-color: #eadfc6; }
.cpx-bar b { font-size: 12px; font-weight: 800; color: #8a6a31; height: 17px; line-height: 17px;
  font-variant-numeric: tabular-nums; white-space: nowrap; }
.cpx-track { display: flex; align-items: flex-end; width: 100%; max-width: 44px; height: 72px;
  border-radius: 8px; background: #f1ece1; overflow: hidden; }
.cpx-bar.has-data .cpx-track { background: #efe7d6; }
.cpx-track i { display: block; width: 100%; border-radius: 8px 8px 0 0;
  background: linear-gradient(180deg, #c9a45e, var(--gold)); }
.cpx-bar.has-data .cpx-track i { min-height: 12px; }
.cpx-bar small { font-size: 12.5px; font-weight: 800; color: var(--text); white-space: nowrap; }
.cpx-bar:not(.has-data) small { color: var(--muted); font-weight: 700; }

.cpx-notes { margin-top: 14px; padding-top: 12px; border-top: 1px dashed var(--border);
  display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }
.cpx-notes textarea { width: 100%; padding: 10px 12px; border: 1px solid var(--border);
  border-radius: 12px; background: #fff; color: var(--text); resize: vertical; min-height: 56px; }
.cpx-notes textarea:focus { outline: none; border-color: var(--gold); }
.cpx-notes-ro { margin: 12px 0 0; padding-top: 12px; border-top: 1px dashed var(--border);
  font-size: 13px; color: var(--muted); }

/* ── صفحهٔ رتبه‌بندی: خلاصهٔ بالای صفحه + کارت‌های رتبه‌دار ── */
.cprk-summary { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 16px; }
.cprk-sum { display: flex; align-items: center; gap: 10px; padding: 13px 14px;
  border-radius: 14px; border: 1px solid var(--border); background: var(--surface); }
.cprk-sum-ic { display: grid; place-items: center; flex: 0 0 40px; width: 40px; height: 40px;
  border-radius: 12px; }
.cprk-sum-ic .ui-icon, .cprk-sum-ic svg { width: 20px; height: 20px; }
.cprk-sum-body { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.cprk-sum-body b { font-size: 16px; font-weight: 800; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.cprk-sum-body small { font-size: 11px; font-weight: 700; color: var(--muted); }
.cprk-sum.is-red { background: #fbeeec; border-color: #efd0ca; }
.cprk-sum.is-red .cprk-sum-ic { background: #f5ddd8; color: #b3261e; }
.cprk-sum.is-red b { color: #b3261e; }
.cprk-sum.is-gold { background: #f9f4e9; border-color: #eadfc6; }
.cprk-sum.is-gold .cprk-sum-ic { background: #f0e5cc; color: #8a6a31; }
.cprk-sum.is-gold b { color: #8a6a31; }
.cprk-sum.is-plain .cprk-sum-ic { background: #efe9dc; color: var(--gold); }
@media (max-width: 520px) {
  .cprk-summary { grid-template-columns: 1fr 1fr; }
  .cprk-summary .cprk-sum:last-child { grid-column: 1 / -1; }
}

.cprk-row { display: flex; align-items: center; gap: 12px; padding: 13px 14px;
  background: var(--surface); border: 1px solid var(--border); border-right: 4px solid var(--border);
  border-radius: 14px; margin-bottom: 8px; text-decoration: none; color: inherit; }
.cprk-row.is-risk { border-right-color: #b3261e; }
.cprk-row.is-warn { border-right-color: #d99a1b; }
.cprk-row.is-fresh { border-right-color: var(--gold); }
.cprk-row.is-clear { border-right-color: #1a7f4b; }
.cprk-row:hover { border-color: var(--gold); }
.cprk-rank { flex: 0 0 auto; min-width: 26px; height: 26px; padding: 0 6px; display: grid;
  place-items: center; border-radius: 9px; background: #efe9dc; color: #8a6a31;
  font-size: 12.5px; font-weight: 800; font-variant-numeric: tabular-nums; }
.cprk-avatar { flex: 0 0 44px; width: 44px; height: 44px; display: grid; place-items: center;
  border-radius: 50%; background: linear-gradient(135deg, #c9a45e, var(--gold)); color: #fff;
  font-size: 18px; font-weight: 800; }
.cprk-main { display: flex; flex-direction: column; gap: 4px; min-width: 0; flex: 1 1 auto; }
.cprk-name { font-size: 15px; font-weight: 800; color: var(--text); }
.cprk-tags { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.cprk-chip { display: inline-flex; padding: 3px 9px; border-radius: 999px; font-size: 11px;
  font-weight: 800; background: #f1ece1; color: #6b6152; }
.cprk-chip.is-warn { background: #f9ebe8; color: #b3261e; }
.cprk-meta { font-size: 12px; color: var(--muted); }
.cprk-balances { display: flex; flex-direction: column; gap: 5px; align-items: flex-end; flex-shrink: 0; }
.cprk-bal { display: inline-flex; align-items: baseline; gap: 5px; padding: 4px 11px;
  border-radius: 999px; font-size: 12.5px; font-weight: 800; font-variant-numeric: tabular-nums; }
.cprk-bal small { font-size: 10px; font-weight: 700; }
.cprk-bal.is-minus { background: #fbeeec; color: #b3261e; }
.cprk-bal.is-plus { background: #eef7f1; color: #1a7f4b; }
@media (max-width: 480px) {
  .cprk-rank { display: none; }
  .cprk-avatar { flex-basis: 38px; width: 38px; height: 38px; font-size: 15px; }
}

/* ── فهرست طرف‌حساب‌ها: آواتارِ حرفِ اول + چیپِ رنگیِ نوع ── */
.ph-actions { display: flex; align-items: center; gap: 8px; }
.cpl-row { display: flex; align-items: center; gap: 12px; padding: 12px 14px;
  background: var(--surface); border: 1px solid var(--border); border-radius: 14px;
  margin-bottom: 8px; text-decoration: none; color: inherit; }
.cpl-row:hover { border-color: var(--gold); }
.cpl-avatar { flex: 0 0 44px; width: 44px; height: 44px; display: grid; place-items: center;
  border-radius: 50%; font-size: 18px; font-weight: 800; color: #fff;
  background: linear-gradient(135deg, #c9a45e, var(--gold)); }
.cpl-avatar.is-colleague { background: linear-gradient(135deg, #5d87b8, #2c5f96); }
.cpl-avatar.is-wholesaler { background: linear-gradient(135deg, #9c7fc0, #6a4d96); }
.cpl-avatar.is-melted_gold_seller { background: linear-gradient(135deg, #e0a04a, #c07617); }
.cpl-avatar.is-gold_bank { background: linear-gradient(135deg, #4ca877, #1a7f4b); }
.cpl-main { display: flex; flex-direction: column; gap: 4px; min-width: 0; flex: 1 1 auto; }
.cpl-name { font-size: 15px; font-weight: 800; color: var(--text); }
.cpl-sub { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.cpl-type { display: inline-flex; padding: 3px 10px; border-radius: 999px;
  font-size: 11px; font-weight: 800; background: #f5eedf; color: #8a6a31; }
.cpl-type.is-colleague { background: #eef3f9; color: #2c5f96; }
.cpl-type.is-wholesaler { background: #f2edf8; color: #6a4d96; }
.cpl-type.is-melted_gold_seller { background: #fdf3e2; color: #a3670f; }
.cpl-type.is-gold_bank { background: #eef7f1; color: #1a7f4b; }
.cpl-tel { font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; direction: ltr; }
.cpl-go { flex: 0 0 auto; color: var(--muted); display: grid; place-items: center; }
.cpl-go .ui-icon, .cpl-go svg { width: 16px; height: 16px; transform: rotate(180deg); }


/* opening state — owner/capital cards */
.opening-partners { display:grid; gap:14px; }
.opening-partner-card { border:1px solid var(--line,#e7e1d6); border-radius:18px; padding:16px; background:linear-gradient(180deg,#fff 0%,#fdfbf7 100%); box-shadow:0 8px 24px rgba(67,52,22,.045); }
.opening-partner-card.is-new { border-style:dashed; border-color:#d9c08a; background:#fffdf8; }
.opening-partner-head { display:flex; align-items:center; gap:11px; padding-bottom:13px; margin-bottom:14px; border-bottom:1px solid #f0eadf; }
.opening-partner-head > span:last-child { display:flex; flex-direction:column; gap:2px; min-width:0; }
.opening-partner-head b { color:var(--text,#29241b); font-size:14px; }
.opening-partner-head small { color:var(--muted,#746c60); font-size:11.5px; line-height:1.6; }
.opening-partner-icon { display:grid; place-items:center; flex:0 0 38px; height:38px; border-radius:12px; color:#fff; background:linear-gradient(145deg,#b8924d,#80601f); font-weight:900; box-shadow:0 5px 14px rgba(128,96,31,.2); }
.opening-owner-grid,.opening-capital-grid { display:grid; grid-template-columns:1fr; gap:11px 14px; }
.opening-owner-grid .field,.opening-capital-grid .field { margin:0; }
.opening-owner-help { grid-column:1 / -1; margin:0; color:var(--muted,#746c60); font-size:11px; line-height:1.7; }
.opening-capital-box { margin-top:14px; border:1px solid #eadfca; border-radius:14px; padding:13px; background:#fbf6ea; }
.opening-capital-title { display:flex; align-items:baseline; justify-content:space-between; gap:8px; margin-bottom:11px; }
.opening-capital-title b { color:#755719; font-size:12.5px; }
.opening-capital-title small { color:#9a8a63; font-size:10.5px; }
.opening-partner-delete { margin-top:13px; padding-top:12px; border-top:1px solid #f0e5e1; }
@media (min-width:620px) {
  .opening-owner-grid,.opening-capital-grid { grid-template-columns:1fr 1fr; }
  .opening-partner-card { padding:18px; }
}
