/* ============================================================================
   URG Suite — Design System v3
   یک سیستم طراحی واحد برای هر سه پوسته (عمومی / کاربر / مدیریت).
   اصول:
   • تک‌رنگ اصلی + رنگ‌های معنایی (success/warning/danger/info) — بدون تزئین
   • RTL واقعی با خصیصه‌های منطقی (inline-*)؛ مقادیر فنی LTR با کلاس .ltr
   • mobile-first؛ جدول دسکتاپ ↔ کارت موبایل با همان markup (data-col)
   • بدون !important، بدون overflow:hidden برای پنهان‌کردن سرریز
   ========================================================================= */

/* ─── 0. Fonts — Vazirmatn خودمیزبان ─────────────────────────────────────── */
@font-face { font-family: 'Vazirmatn'; font-style: normal; font-weight: 400; font-display: swap; src: url('../fonts/vazirmatn-regular.woff2') format('woff2'); }
@font-face { font-family: 'Vazirmatn'; font-style: normal; font-weight: 500; font-display: swap; src: url('../fonts/vazirmatn-medium.woff2') format('woff2'); }
@font-face { font-family: 'Vazirmatn'; font-style: normal; font-weight: 700; font-display: swap; src: url('../fonts/vazirmatn-bold.woff2') format('woff2'); }
@font-face { font-family: 'Vazirmatn'; font-style: normal; font-weight: 800; font-display: swap; src: url('../fonts/vazirmatn-bold.woff2') format('woff2'); }

/* ─── 1. Tokens ──────────────────────────────────────────────────────────── */
:root {
  color-scheme: light;

  /* Brand — تنها رنگ اصلی محصول */
  --brand-700: #1c47a8;
  --brand-600: #2456c4;
  --brand-500: #2c63e0;   /* base */
  --brand-100: #dfe9fb;
  --brand-50:  #f0f5fe;

  /* Neutral (graphite) */
  --ink-950: #0e1216;
  --ink-900: #171c22;
  --ink-800: #242b33;
  --ink-700: #3a434f;
  --ink-600: #55606e;
  --ink-500: #6f7a89;
  --ink-400: #98a2ae;
  --ink-300: #c3cad3;
  --ink-200: #e2e7ec;
  --ink-100: #edf0f4;
  --ink-50:  #f6f8fa;

  /* Semantic */
  --ok-600:#18794e; --ok-100:#e2f3ea; --ok-700:#115e3d;
  --warn-600:#a15c07; --warn-100:#fbf0dc; --warn-700:#7c4705;
  --bad-600:#b42318;  --bad-100:#fdeae8;  --bad-700:#921c13;
  --info-600:#0e639c; --info-100:#e4f0f9; --info-700:#0b4f7d;

  /* Roles */
  --bg:          var(--ink-50);
  --surface:     #ffffff;
  --surface-2:   var(--ink-50);
  --surface-3:   var(--ink-100);
  --line:        var(--ink-200);
  --line-soft:   var(--ink-100);
  --line-strong: var(--ink-300);
  --text:        var(--ink-900);
  --text-2:      var(--ink-700);
  --muted:       var(--ink-500);
  --accent:      var(--brand-500);
  --accent-hov:  var(--brand-600);
  --accent-act:  var(--brand-700);
  --accent-soft: var(--brand-50);
  --accent-line: var(--brand-100);

  /* Typography */
  --font: 'Vazirmatn', ui-sans-serif, 'Segoe UI', Tahoma, sans-serif;
  --mono: ui-monospace, 'SF Mono', 'Vazirmatn Mono', Menlo, Consolas, monospace;
  --fs-display: 1.625rem;   /* 26 */
  --fs-h1:      1.375rem;   /* 22 */
  --fs-h2:      1.0625rem;  /* 17 */
  --fs-h3:      0.9375rem;  /* 15 */
  --fs-body:    0.875rem;   /* 14 */
  --fs-sm:      0.8125rem;  /* 13 */
  --fs-xs:      0.75rem;    /* 12 */
  --lh: 1.7;

  /* Spacing (4px grid) */
  --s-1: 4px; --s-2: 8px; --s-3: 12px; --s-4: 16px;
  --s-5: 20px; --s-6: 24px; --s-8: 32px; --s-10: 40px; --s-12: 48px;

  /* Radius */
  --r-xs: 6px; --r-sm: 8px; --r-md: 10px; --r-lg: 14px; --r-xl: 18px; --r-full: 999px;

  /* Elevation — بسیار ملایم، بدون سایه‌های نمایشی */
  --sh-1: 0 1px 2px rgba(14,18,22,.05);
  --sh-2: 0 1px 2px rgba(14,18,22,.05), 0 2px 6px rgba(14,18,22,.05);
  --sh-3: 0 2px 4px rgba(14,18,22,.05), 0 8px 24px rgba(14,18,22,.08);
  --sh-pop: 0 4px 12px rgba(14,18,22,.10), 0 16px 40px rgba(14,18,22,.14);

  /* Motion */
  --t-fast: 120ms cubic-bezier(.2,.8,.3,1);
  --t: 180ms cubic-bezier(.2,.8,.3,1);

  /* Layout */
  --side-w: 256px;
  --top-h: 56px;
  --page-max: 1080px;
  --tap: 40px;

  --z-top: 50; --z-nav: 60; --z-pop: 70; --z-drawer: 80; --z-modal: 90; --z-toast: 95;
}

/* تراکم اداری — پوسته ادمین با همین توکن‌ها اما متراکم‌تر */
[data-tone="admin"] {
  --fs-h1: 1.1875rem;
  --fs-body: 0.8125rem;
  --s-6: 20px; --s-8: 24px;
  --top-h: 52px;
  --side-w: 236px;
  --page-max: 1320px;
  --r-lg: 10px; --r-md: 8px; --r-sm: 6px;
}

/* ─── 2. Base ────────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
html { font-size: 15px; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: var(--fs-body);
  line-height: var(--lh);
  color: var(--text);
  background: var(--bg);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
/* سرریز افقی ممنوع — علت واقعی در کامپوننت‌ها رفع شده است */
html, body { max-width: 100%; }
body.no-scroll { overflow: hidden; }

h1, h2, h3, h4, p, ul, ol, figure { margin: 0; }
h1 { font-size: var(--fs-h1); font-weight: 800; line-height: 1.4; letter-spacing: -.01em; }
h2 { font-size: var(--fs-h2); font-weight: 700; line-height: 1.5; }
h3 { font-size: var(--fs-h3); font-weight: 700; }
.display { font-size: var(--fs-display); font-weight: 800; line-height: 1.25; letter-spacing: -.02em; }

a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-hov); }

img, svg { display: block; max-width: 100%; }
small { font-size: var(--fs-xs); }
code, kbd, .mono { font-family: var(--mono); font-size: .92em; direction: ltr; unicode-bidi: embed; }

::selection { background: var(--brand-100); }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: var(--r-xs);
}
.skip-link {
  position: absolute; inset-block-start: -48px; inset-inline-start: 8px;
  background: var(--surface); color: var(--text); padding: 8px 14px;
  border-radius: var(--r-sm); box-shadow: var(--sh-2); z-index: 120;
  transition: inset-block-start var(--t);
}
.skip-link:focus { inset-block-start: 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;
}

/* اعداد — خوانایی مالی */
.num { font-variant-numeric: tabular-nums; letter-spacing: 0; }
.money { font-variant-numeric: tabular-nums; font-weight: 700; }
.money .unit { font-size: .72em; font-weight: 500; color: var(--muted); margin-inline-start: 3px; }
.ltr { direction: ltr; unicode-bidi: isolate; text-align: start; }
.ltr-center { direction: ltr; unicode-bidi: isolate; text-align: center; }

/* ─── 3. Layout shell ────────────────────────────────────────────────────── */
.shell { display: flex; min-height: 100vh; min-width: 0; }

.sidenav {
  width: var(--side-w);
  flex-shrink: 0;
  background: var(--surface);
  border-inline-end: 1px solid var(--line);
  display: flex; flex-direction: column;
  position: sticky; top: 0; height: 100vh;
  z-index: var(--z-nav);
}
[data-tone="admin"] .sidenav { background: var(--ink-900); border-inline-end-color: var(--ink-800); }

.brand {
  display: flex; align-items: center; gap: var(--s-3);
  padding: var(--s-4) var(--s-5);
  min-height: calc(var(--top-h) + 8px);
  border-bottom: 1px solid var(--line-soft);
}
[data-tone="admin"] .brand { border-bottom-color: var(--ink-800); }
.brand-mark {
  width: 34px; height: 34px; border-radius: var(--r-md);
  background: var(--accent) center/cover no-repeat; color: #fff;
  display: grid; place-items: center; font-weight: 800; font-size: .8rem;
  flex-shrink: 0; overflow: hidden;
}
.brand-mark img { width: 100%; height: 100%; object-fit: cover; }
.brand-name { font-weight: 800; font-size: .92rem; line-height: 1.3; }
.brand-sub { font-size: var(--fs-xs); color: var(--muted); line-height: 1.4; }
[data-tone="admin"] .brand-name { color: #fff; }
[data-tone="admin"] .brand-sub { color: var(--ink-400); }

.nav { padding: var(--s-3) var(--s-3) var(--s-5); flex: 1; overflow-y: auto; scrollbar-width: thin; }
.nav-label {
  font-size: var(--fs-xs); font-weight: 700; color: var(--ink-400);
  padding: var(--s-4) var(--s-3) var(--s-1);
  letter-spacing: .02em;
}
.nav-item {
  display: flex; align-items: center; gap: var(--s-3);
  min-height: var(--tap);
  padding: 7px var(--s-3);
  margin-block: 1px;
  border-radius: var(--r-md);
  color: var(--text-2); font-size: var(--fs-body); font-weight: 500;
  transition: background var(--t-fast), color var(--t-fast);
}
.nav-item .ic { width: 19px; height: 19px; color: var(--ink-400); flex-shrink: 0; }
.nav-item:hover { background: var(--surface-3); color: var(--text); }
.nav-item[aria-current="page"] { background: var(--accent-soft); color: var(--brand-700); font-weight: 700; }
.nav-item[aria-current="page"] .ic { color: var(--accent); }
.nav-count {
  margin-inline-start: auto;
  font-size: var(--fs-xs); font-weight: 700; line-height: 1;
  background: var(--bad-600); color: #fff;
  padding: 3px 7px; border-radius: var(--r-full);
}
.nav-foot { padding: var(--s-3) var(--s-4) var(--s-5); border-top: 1px solid var(--line-soft); }
[data-tone="admin"] .nav-foot { border-top-color: var(--ink-800); }
[data-tone="admin"] .nav-item { color: var(--ink-300); }
[data-tone="admin"] .nav-item .ic { color: var(--ink-500); }
[data-tone="admin"] .nav-item:hover { background: var(--ink-800); color: #fff; }
[data-tone="admin"] .nav-item[aria-current="page"] { background: var(--ink-800); color: #fff; }
[data-tone="admin"] .nav-item[aria-current="page"] .ic { color: var(--brand-100); }
[data-tone="admin"] .nav-label { color: var(--ink-500); }
[data-tone="admin"] .nav-foot a { color: var(--ink-400); }
[data-tone="admin"] .nav-foot a:hover { color: #fff; }

.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }

.topbar {
  position: sticky; top: 0;
  height: var(--top-h);
  display: flex; align-items: center; gap: var(--s-3);
  padding-inline: var(--s-5);
  background: color-mix(in srgb, var(--surface) 92%, transparent);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
  z-index: var(--z-top);
}
[data-tone="admin"] .topbar { background: var(--surface); }
.topbar-title { font-weight: 800; font-size: var(--fs-h3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topbar-spacer { flex: 1; min-width: 0; }

.icon-btn {
  display: inline-grid; place-items: center;
  width: var(--tap); height: var(--tap);
  border: 1px solid transparent; border-radius: var(--r-md);
  background: none; color: var(--text-2); cursor: pointer;
  position: relative; flex-shrink: 0;
  transition: background var(--t-fast), color var(--t-fast), border-color var(--t-fast);
}
.icon-btn:hover { background: var(--surface-3); color: var(--text); }
.icon-btn .ic { width: 20px; height: 20px; }
.icon-btn .dot {
  position: absolute; inset-block-start: 6px; inset-inline-end: 7px;
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--bad-600); border: 2px solid var(--surface);
}

.balance-chip {
  display: inline-flex; align-items: center; gap: var(--s-2);
  height: 34px; padding-inline: var(--s-3);
  border: 1px solid var(--line); border-radius: var(--r-full);
  background: var(--surface); color: var(--text-2);
  font-size: var(--fs-sm); font-weight: 600; white-space: nowrap;
}
.balance-chip b { color: var(--text); font-weight: 800; }
.balance-chip:hover { border-color: var(--line-strong); color: var(--text); }

.avatar {
  width: 32px; height: 32px; border-radius: var(--r-md);
  background: var(--ink-100); color: var(--ink-700);
  display: grid; place-items: center; font-weight: 800; font-size: .8rem;
  border: 1px solid var(--line);
}
[data-tone="admin"] .avatar { background: var(--brand-700); color: #fff; border-color: var(--brand-600); }

.page {
  width: 100%; max-width: var(--page-max);
  margin-inline: auto;
  padding: var(--s-6) var(--s-6) var(--s-12);
  min-width: 0;
}
.page-hd {
  display: flex; align-items: flex-start; gap: var(--s-4);
  flex-wrap: wrap; margin-bottom: var(--s-5);
}
.page-hd .grow { flex: 1; min-width: 220px; }
.page-hd p { color: var(--muted); font-size: var(--fs-sm); margin-top: 2px; }
.page-back { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-size: var(--fs-sm); font-weight: 600; }
.page-back:hover { color: var(--text); }
.page-back .ic { width: 16px; height: 16px; }

/* Grids */
.grid { display: grid; gap: var(--s-4); min-width: 0; }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid-side { display: grid; grid-template-columns: minmax(0, 1.9fr) minmax(0, 1fr); gap: var(--s-4); align-items: start; }
.stack { display: flex; flex-direction: column; gap: var(--s-4); min-width: 0; }

/* ─── 4. Card / panels ───────────────────────────────────────────────────── */
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: var(--sh-1);
  min-width: 0;
}
.card-hd {
  display: flex; align-items: center; gap: var(--s-3);
  padding: var(--s-4) var(--s-5);
  border-bottom: 1px solid var(--line-soft);
  min-height: 52px;
}
.card-hd h2, .card-hd h3 { font-size: var(--fs-h3); font-weight: 800; }
.card-hd .sub { color: var(--muted); font-size: var(--fs-xs); }
.card-hd .grow { flex: 1; min-width: 0; }
.card-bd { padding: var(--s-5); min-width: 0; }
.card-bd.flush { padding: 0; }
.card-ft {
  padding: var(--s-3) var(--s-5);
  border-top: 1px solid var(--line-soft);
  background: var(--surface-2);
  border-end-start-radius: var(--r-lg); border-end-end-radius: var(--r-lg);
  display: flex; align-items: center; gap: var(--s-3); flex-wrap: wrap;
}
.card-ft .grow { flex: 1; }
.card-hd + .card-ft, .card-bd + .card-ft { margin-top: 0; }

.hint-row { display: flex; gap: var(--s-2); align-items: flex-start; color: var(--muted); font-size: var(--fs-sm); line-height: 1.8; }
.hint-row .ic { width: 16px; height: 16px; flex-shrink: 0; margin-top: 4px; color: var(--ink-400); }

/* ─── 5. Buttons ─────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--s-2);
  min-height: 38px; padding: 7px 16px;
  border-radius: var(--r-md);
  border: 1px solid transparent;
  font: inherit; font-size: var(--fs-sm); font-weight: 700; line-height: 1.4;
  cursor: pointer; user-select: none; white-space: nowrap;
  transition: background var(--t-fast), border-color var(--t-fast), color var(--t-fast), box-shadow var(--t-fast);
}
.btn .ic { width: 17px; height: 17px; flex-shrink: 0; }
.btn-primary { background: var(--accent); color: #fff; box-shadow: var(--sh-1); }
.btn-primary:hover { background: var(--accent-hov); color: #fff; }
.btn-primary:active { background: var(--accent-act); }
.btn-outline { background: var(--surface); color: var(--text); border-color: var(--line-strong); }
.btn-outline:hover { border-color: var(--ink-400); background: var(--surface-2); color: var(--text); }
.btn-ghost { background: transparent; color: var(--text-2); }
.btn-ghost:hover { background: var(--surface-3); color: var(--text); }
.btn-danger { background: var(--bad-600); color: #fff; }
.btn-danger:hover { background: var(--bad-700); color: #fff; }
.btn-danger-soft { background: var(--bad-100); color: var(--bad-700); }
.btn-danger-soft:hover { background: #fbd9d5; color: var(--bad-700); }
.btn-sm { min-height: 32px; padding: 4px 10px; font-size: var(--fs-xs); border-radius: var(--r-sm); }
.btn-sm .ic { width: 15px; height: 15px; }
.btn-lg { min-height: 46px; padding: 11px 22px; font-size: var(--fs-body); border-radius: var(--r-md); }
.btn-block { width: 100%; }
.btn[disabled], .btn[aria-disabled="true"] { opacity: .55; cursor: not-allowed; pointer-events: none; }
.btn.is-loading { position: relative; color: transparent !important; pointer-events: none; }
.btn.is-loading::after {
  content: ""; position: absolute; inset-block: 0; inset-inline: 0; margin: auto;
  width: 16px; height: 16px; border-radius: 50%;
  border: 2px solid rgba(255,255,255,.4); border-top-color: #fff;
  animation: spin .7s linear infinite;
}
.btn-outline.is-loading::after, .btn-ghost.is-loading::after, .btn-danger-soft.is-loading::after {
  border-color: var(--ink-300); border-top-color: var(--ink-700);
}
@keyframes spin { to { transform: rotate(1turn); } }

.btn-group { display: inline-flex; gap: var(--s-2); flex-wrap: wrap; align-items: center; }
.seg {
  display: inline-flex; padding: 3px; gap: 2px;
  background: var(--surface-3); border-radius: var(--r-md);
  border: 1px solid var(--line-soft);
}
.seg button, .seg a {
  border: 0; background: none; cursor: pointer;
  font: inherit; font-size: var(--fs-xs); font-weight: 600; color: var(--muted);
  padding: 5px 12px; border-radius: var(--r-sm); white-space: nowrap;
  transition: background var(--t-fast), color var(--t-fast);
}
.seg .active { background: var(--surface); color: var(--text); box-shadow: var(--sh-1); font-weight: 700; }

/* ─── 6. Forms ───────────────────────────────────────────────────────────── */
.field { margin-bottom: var(--s-4); min-width: 0; }
.label { display: block; font-size: var(--fs-sm); font-weight: 700; margin-bottom: 6px; color: var(--text); }
.label .req { color: var(--bad-600); font-weight: 800; }
.input, .select, .textarea {
  width: 100%;
  font: inherit; font-size: var(--fs-body);
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: var(--r-md);
  padding: 9px 12px;
  min-height: 42px;
  transition: border-color var(--t-fast), box-shadow var(--t-fast);
  max-width: 100%;
}
.textarea { min-height: 104px; resize: vertical; line-height: 1.7; }
.input::placeholder, .textarea::placeholder { color: var(--ink-400); }
.input:hover, .select:hover, .textarea:hover { border-color: var(--ink-400); }
.input:focus, .select:focus, .textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-line);
}
.input[readonly] { background: var(--surface-2); color: var(--muted); }
.input.invalid, .select.invalid, .textarea.invalid { border-color: var(--bad-600); }
.input.invalid:focus, .textarea.invalid:focus { box-shadow: 0 0 0 3px var(--bad-100); }
.select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%236f7a89' stroke-width='2.4' stroke-linecap='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: left 12px center;
  padding-inline-end: 34px;
}
.hint { font-size: var(--fs-xs); color: var(--muted); margin-top: 6px; line-height: 1.7; }
.error-text { display: none; font-size: var(--fs-xs); color: var(--bad-600); margin-top: 6px; font-weight: 600; }
.field.has-error .error-text { display: block; }
.field.has-error .hint { display: none; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 var(--s-4); }
.input-affix { position: relative; display: block; }
.input-affix .suffix {
  position: absolute; inset-inline-end: 12px; inset-block-start: 50%; transform: translateY(-50%);
  color: var(--muted); font-size: var(--fs-sm); font-weight: 600; pointer-events: none;
}
.input-affix .input { padding-inline-end: 52px; }
.input-ltr { direction: ltr; text-align: start; font-family: var(--mono); font-size: var(--fs-sm); }

.check, .radio {
  display: flex; align-items: flex-start; gap: var(--s-3);
  font-size: var(--fs-sm); color: var(--text-2); cursor: pointer;
  padding: 4px 0;
}
.check input, .radio input { width: 17px; height: 17px; margin: 4px 0 0; accent-color: var(--accent); flex-shrink: 0; cursor: inherit; }

.switch { position: relative; display: inline-flex; align-items: center; cursor: pointer; }
.switch input { position: absolute; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.switch .track {
  width: 40px; height: 23px; border-radius: var(--r-full);
  background: var(--ink-300); transition: background var(--t);
  flex-shrink: 0;
}
.switch .track::after {
  content: ""; position: absolute; inset-inline-start: 3px; top: 3px;
  width: 17px; height: 17px; border-radius: 50%; background: #fff;
  box-shadow: var(--sh-1); transition: transform var(--t);
}
.switch input:checked + .track { background: var(--accent); }
.switch input:checked + .track::after { transform: translateX(-17px); }
.switch input:focus-visible + .track { outline: 2px solid var(--accent); outline-offset: 2px; }
.switch .sw-label { margin-inline-start: 10px; font-size: var(--fs-sm); font-weight: 600; }

/* انتخاب کارت‌های رادیویی (سرویس/روش پرداخت/…) */
.choices { display: grid; gap: var(--s-3); min-width: 0; }
.choices.cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.choices.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.choices.cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.choice {
  position: relative;
  display: flex; flex-direction: column; gap: 2px;
  border: 1px solid var(--line); border-radius: var(--r-lg);
  padding: var(--s-4); cursor: pointer; background: var(--surface);
  transition: border-color var(--t-fast), box-shadow var(--t-fast), background var(--t-fast);
  min-width: 0;
}
.choice input { position: absolute; opacity: 0; pointer-events: none; }
.choice .ch-ic { color: var(--ink-500); margin-bottom: 6px; }
.choice .ch-ic .ic, .choice .ch-ic svg { width: 21px; height: 21px; }
.choice .ch-t { font-weight: 700; font-size: var(--fs-body); color: var(--text); }
.choice .ch-s { font-size: var(--fs-xs); color: var(--muted); line-height: 1.7; }
.choice:hover { border-color: var(--line-strong); }
.choice.sel { border-color: var(--accent); background: var(--accent-soft); box-shadow: 0 0 0 1px var(--accent) inset; }
.choice.sel .ch-ic { color: var(--accent); }
.choice .ch-price { margin-top: 4px; font-size: var(--fs-xs); font-weight: 700; color: var(--text-2); font-variant-numeric: tabular-nums; }

/* چیپ مبلغ آماده */
.chips { display: flex; flex-wrap: wrap; gap: var(--s-2); }
.chip {
  border: 1px solid var(--line); background: var(--surface);
  border-radius: var(--r-full); padding: 7px 14px; cursor: pointer;
  font: inherit; font-size: var(--fs-sm); font-weight: 700; color: var(--text-2);
  font-variant-numeric: tabular-nums; min-height: 36px;
  transition: border-color var(--t-fast), background var(--t-fast), color var(--t-fast);
}
.chip:hover { border-color: var(--ink-400); }
.chip.sel { background: var(--accent-soft); border-color: var(--accent); color: var(--brand-700); }

/* انتخابگر ایموجی */
.emoji-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(44px, 1fr)); gap: var(--s-2); }
.emoji-btn {
  min-height: 44px; font-size: 20px; line-height: 1;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md);
  cursor: pointer; transition: border-color var(--t-fast), background var(--t-fast);
}
.emoji-btn:hover { border-color: var(--ink-400); background: var(--surface-2); }
.emoji-btn.sel { border-color: var(--accent); background: var(--accent-soft); box-shadow: 0 0 0 1px var(--accent); }

/* آپلود فایل */
.dropzone {
  border: 1.5px dashed var(--line-strong); border-radius: var(--r-lg);
  padding: var(--s-6) var(--s-4);
  display: flex; flex-direction: column; align-items: center; gap: var(--s-2);
  text-align: center; cursor: pointer; background: var(--surface-2);
  transition: border-color var(--t-fast), background var(--t-fast);
}
.dropzone:hover, .dropzone.drag { border-color: var(--accent); background: var(--accent-soft); }
.dropzone .dz-ic { color: var(--ink-400); }
.dropzone .dz-ic svg { width: 28px; height: 28px; }
.dropzone input[type=file] { position: absolute; opacity: 0; width: 1px; height: 1px; }
.dz-name { font-size: var(--fs-sm); font-weight: 700; color: var(--ok-600); }
.dz-preview { margin-top: var(--s-3); border-radius: var(--r-md); border: 1px solid var(--line); max-height: 200px; width: auto; max-width: 100%; margin-inline: auto; object-fit: contain; }

/* ─── 7. Tabs ────────────────────────────────────────────────────────────── */
.tabs { display: flex; gap: var(--s-5); border-bottom: 1px solid var(--line); overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tab {
  appearance: none; background: none; border: 0; cursor: pointer;
  font: inherit; font-size: var(--fs-sm); font-weight: 700; color: var(--muted);
  padding: 10px 2px; border-bottom: 2px solid transparent; white-space: nowrap;
  display: inline-flex; align-items: center; gap: 6px; min-height: 40px;
}
.tab:hover { color: var(--text); }
.tab[aria-selected="true"] { color: var(--text); border-bottom-color: var(--accent); }
.tab .cnt { font-size: var(--fs-xs); color: var(--muted); font-weight: 600; }
.tabpanes > [hidden] { display: none; }

/* ─── 8. Pills / badges ──────────────────────────────────────────────────── */
.pill {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: var(--fs-xs); font-weight: 700; line-height: 1;
  padding: 5px 10px; border-radius: var(--r-full);
  background: var(--surface-3); color: var(--text-2);
  white-space: nowrap;
}
.pill::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: .9; }
.pill.no-dot::before { display: none; }
.pill-ok   { background: var(--ok-100);   color: var(--ok-700); }
.pill-warn { background: var(--warn-100); color: var(--warn-700); }
.pill-bad  { background: var(--bad-100);  color: var(--bad-700); }
.pill-info { background: var(--info-100); color: var(--info-700); }
.pill-mute { background: var(--ink-100);  color: var(--ink-600); }
.pill-brand{ background: var(--accent-soft); color: var(--brand-700); }
.tag-id {
  font-family: var(--mono); font-size: var(--fs-xs); font-weight: 600;
  background: var(--surface-3); color: var(--text-2);
  border: 1px solid var(--line-soft); border-radius: var(--r-xs);
  padding: 2px 6px; direction: ltr; unicode-bidi: isolate;
}

/* ─── 9. Alert ───────────────────────────────────────────────────────────── */
.alert {
  display: flex; gap: var(--s-3); align-items: flex-start;
  border: 1px solid var(--line); border-radius: var(--r-lg);
  padding: var(--s-3) var(--s-4);
  font-size: var(--fs-sm); line-height: 1.75;
  background: var(--surface);
  margin-bottom: var(--s-4);
}
.alert .ic { width: 18px; height: 18px; flex-shrink: 0; margin-top: 3px; }
.alert b { font-weight: 700; }
.alert-ok    { background: var(--ok-100);   border-color: transparent; color: var(--ok-700); }
.alert-warn  { background: var(--warn-100); border-color: transparent; color: var(--warn-700); }
.alert-bad   { background: var(--bad-100);  border-color: transparent; color: var(--bad-700); }
.alert-info  { background: var(--info-100); border-color: transparent; color: var(--info-700); }
.alert .grow { flex: 1; min-width: 0; }

/* ─── 10. Table ──────────────────────────────────────────────────────────── */
.table-wrap { width: 100%; overflow-x: auto; min-width: 0; }
.table { width: 100%; border-collapse: collapse; font-size: var(--fs-sm); min-width: 640px; }
.table th {
  text-align: start; font-size: var(--fs-xs); font-weight: 700; color: var(--muted);
  padding: 10px var(--s-4); background: var(--surface-2);
  border-bottom: 1px solid var(--line); white-space: nowrap;
}
.table td { padding: 12px var(--s-4); border-bottom: 1px solid var(--line-soft); vertical-align: middle; }
.table tbody tr:last-child td { border-bottom: 0; }
.table tbody tr { transition: background var(--t-fast); }
.table tbody tr:hover { background: var(--surface-2); }
.table .t-title { font-weight: 700; color: var(--text); display: flex; align-items: center; gap: 7px; }
.table .t-title .ic { width: 16px; height: 16px; color: var(--ink-400); flex-shrink: 0; }
.table .t-sub { color: var(--muted); font-size: var(--fs-xs); margin-top: 1px; max-width: 260px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.table .t-end { text-align: end; }
.table .t-mid { text-align: center; }
.table-dense td, .table-dense th { padding-block: 8px; }

.cell-progress { display: flex; align-items: center; gap: var(--s-2); min-width: 120px; }
.cell-progress .progress { flex: 1; }
.cell-progress .pct { font-size: var(--fs-xs); font-weight: 700; color: var(--text-2); min-width: 34px; text-align: end; font-variant-numeric: tabular-nums; }

/* کارت‌های موبایل — نسخه متناظر هر ردیف جدول (CSS فقط markup مشترک را تبدیل می‌کند) */
.m-cards { display: none; }

/* ─── 11. Progress / meters ──────────────────────────────────────────────── */
/* پیشرفت با کلاس‌های kuantize (گام ۵٪) رندر می‌شود — بدون style درون‌خطی (CSP تمیز). */
.progress {
  height: 7px; border-radius: var(--r-full);
  background: var(--ink-100); overflow: hidden; min-width: 40px;
}
.progress > span {
  display: block; height: 100%; width: 0;
  background: var(--accent); border-radius: inherit;
  transition: width .4s var(--t);
}
.progress.ok > span { background: var(--ok-600); }
.progress.warn > span { background: var(--warn-600); }
.progress.bad > span { background: var(--bad-600); }
.pw0{width:0}.pw5{width:5%}.pw10{width:10%}.pw15{width:15%}.pw20{width:20%}.pw25{width:25%}
.pw30{width:30%}.pw35{width:35%}.pw40{width:40%}.pw45{width:45%}.pw50{width:50%}.pw55{width:55%}
.pw60{width:60%}.pw65{width:65%}.pw70{width:70%}.pw75{width:75%}.pw80{width:80%}.pw85{width:85%}
.pw90{width:90%}.pw95{width:95%}.pw100{width:100%}

/* ویزارد — پایه (دسکتاپ) */
.wz-foot {
  display: flex; justify-content: space-between; align-items: center; gap: var(--s-2);
  padding-top: var(--s-4); margin-top: var(--s-4);
  border-top: 1px solid var(--line-soft);
}
.wz-foot .spacer { flex: 1; }

/* ─── 12. Empty / loading / skeleton ─────────────────────────────────────── */
.empty {
  display: flex; flex-direction: column; align-items: center; gap: var(--s-2);
  text-align: center; padding: var(--s-10) var(--s-5);
}
.empty .e-ic {
  width: 52px; height: 52px; border-radius: var(--r-lg);
  background: var(--surface-3); color: var(--ink-400);
  display: grid; place-items: center; margin-bottom: var(--s-2);
}
.empty .e-ic svg { width: 26px; height: 26px; }
.empty h3 { font-size: var(--fs-h3); font-weight: 800; }
.empty p { color: var(--muted); font-size: var(--fs-sm); max-width: 40ch; line-height: 1.8; }
.empty .btn { margin-top: var(--s-3); }

.skeleton { background: var(--ink-100); border-radius: var(--r-sm); position: relative; overflow: hidden; }
.skeleton::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.65), transparent);
  animation: shimmer 1.3s infinite;
}
@keyframes shimmer { 0% { transform: translateX(100%); } 100% { transform: translateX(-100%); } }
.skel-row { display: flex; gap: var(--s-3); padding: 14px var(--s-5); border-bottom: 1px solid var(--line-soft); align-items: center; }
.skel-row .skeleton:nth-child(1) { width: 34px; height: 34px; border-radius: var(--r-md); flex-shrink: 0; }
.skel-row .s1 { flex: 2; height: 12px; }
.skel-row .s2 { flex: 1; height: 12px; }
.skel-row .s3 { width: 64px; height: 20px; border-radius: var(--r-full); }
/* در بارگذاری: اسکلton نمایان، محتوای واقعی پنهان (JS data-loading را ست/ریست می‌کند) */
.skeleton-wrap { display: none; }
[data-loading="true"] .skeleton-wrap { display: block; }
[data-loading="true"] .content-live { display: none; }

.burger { display: none; }


/* ─── 13. Dropdown ───────────────────────────────────────────────────────── */
.dd { position: relative; }
.dd-menu {
  position: absolute; inset-block-start: calc(100% + 8px); inset-inline-end: 0;
  min-width: 216px; max-width: min(320px, calc(100vw - 24px));
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg);
  box-shadow: var(--sh-pop); padding: 6px; z-index: var(--z-pop);
  display: none;
}
.dd.open .dd-menu { display: block; animation: pop var(--t); }
@keyframes pop { from { opacity: 0; transform: translateY(-4px); } }
.dd-head { padding: 10px 12px 6px; border-bottom: 1px solid var(--line-soft); margin-bottom: 6px; }
.dd-head .u { font-weight: 800; font-size: var(--fs-sm); }
.dd-head .s { color: var(--muted); font-size: var(--fs-xs); margin-top: 2px; }
.dd-menu a, .dd-menu button {
  display: flex; align-items: center; gap: 10px; width: 100%;
  padding: 8px 12px; border-radius: var(--r-sm);
  color: var(--text-2); font-size: var(--fs-sm); font-weight: 600; background: none; border: 0;
  font-family: inherit; text-align: start; cursor: pointer; min-height: 38px;
}
.dd-menu a:hover, .dd-menu button:hover { background: var(--surface-3); color: var(--text); }
.dd-menu a .ic, .dd-menu button .ic { width: 16px; height: 16px; color: var(--ink-400); flex-shrink: 0; }
.dd-menu .sep { height: 1px; background: var(--line-soft); margin: 6px 4px; }
.dd-menu .danger, .dd-menu .danger .ic { color: var(--bad-600); }
.dd-menu a:hover.danger { background: var(--bad-100); }

/* ─── 14. Modal / dialog / drawer ────────────────────────────────────────── */
dialog.modal {
  border: 0; padding: 0; margin: auto; max-width: 480px; width: calc(100vw - 32px);
  background: var(--surface); border-radius: var(--r-xl); box-shadow: var(--sh-pop);
  color: var(--text); max-height: calc(100vh - 48px); overflow: hidden;
}
dialog.modal::backdrop { background: rgba(14,18,22,.55); }
dialog.modal[open] { animation: pop var(--t); }
.modal-hd { display: flex; align-items: center; gap: var(--s-3); padding: var(--s-4) var(--s-5); border-bottom: 1px solid var(--line-soft); }
.modal-hd h2 { font-size: var(--fs-h3); font-weight: 800; flex: 1; }
.modal-bd { padding: var(--s-5); font-size: var(--fs-sm); line-height: 1.9; overflow-y: auto; }
.modal-ft { display: flex; gap: var(--s-2); justify-content: flex-end; padding: var(--s-4) var(--s-5); border-top: 1px solid var(--line-soft); background: var(--surface-2); flex-wrap: wrap; }
.modal-ft .btn { min-width: 92px; }

.scrim {
  position: fixed; inset: 0; background: rgba(14,18,22,.5);
  z-index: var(--z-drawer); opacity: 0; pointer-events: none; transition: opacity var(--t);
}
body.nav-open .scrim { opacity: 1; pointer-events: auto; }

/* ─── 15. Toast ──────────────────────────────────────────────────────────── */
.toasts {
  position: fixed; inset-inline: 0; bottom: 0; z-index: var(--z-toast);
  display: flex; flex-direction: column; align-items: center; gap: var(--s-2);
  padding: var(--s-3) var(--s-4) calc(var(--s-3) + env(safe-area-inset-bottom));
  pointer-events: none;
}
.toast {
  pointer-events: auto;
  display: flex; align-items: center; gap: 10px;
  background: var(--ink-900); color: #fff;
  font-size: var(--fs-sm); font-weight: 600;
  padding: 11px 16px; border-radius: var(--r-md);
  box-shadow: var(--sh-3); max-width: min(480px, 100%);
  animation: toast-in var(--t);
}
.toast.out { animation: toast-out 160ms forwards; }
.toast .ic { width: 17px; height: 17px; flex-shrink: 0; }
.toast.ok .ic { color: #4ade80; }
.toast.err .ic { color: #fca5a5; }
.toast.warn .ic { color: #fcd34d; }
@keyframes toast-in { from { opacity: 0; transform: translateY(8px); } }
@keyframes toast-out { to { opacity: 0; transform: translateY(8px); } }

/* ─── 16. Stepper (wizard) ───────────────────────────────────────────────── */
.steps { display: flex; align-items: center; gap: 0; margin-bottom: var(--s-5); }
.steps li { display: flex; align-items: center; gap: 10px; list-style: none; color: var(--muted); font-size: var(--fs-sm); font-weight: 600; min-width: 0; }
.steps ol { display: flex; gap: 0; margin: 0; padding: 0; width: 100%; }
.steps .bullet {
  width: 26px; height: 26px; border-radius: 50%; flex-shrink: 0;
  display: grid; place-items: center; font-size: var(--fs-xs); font-weight: 800;
  background: var(--surface); border: 1.5px solid var(--line-strong); color: var(--muted);
}
.steps .bar { flex: 1; height: 1.5px; background: var(--line); margin-inline: var(--s-3); min-width: 16px; }
.steps li.done { color: var(--text-2); }
.steps li.done .bullet { background: var(--accent); border-color: var(--accent); color: #fff; }
.steps li.done .bar { background: var(--accent); }
.steps li.cur { color: var(--text); font-weight: 800; }
.steps li.cur .bullet { border-color: var(--accent); color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.wz-panel[hidden] { display: none; }
.wz-actions { display: flex; gap: var(--s-2); }

/* خلاصه هزینه چسبان */
.summary { position: sticky; top: calc(var(--top-h) + var(--s-4)); }
.sum-line { display: flex; justify-content: space-between; gap: var(--s-3); padding: 9px 0; border-bottom: 1px dashed var(--line-soft); font-size: var(--fs-sm); }
.sum-line dt { color: var(--muted); font-weight: 500; }
.sum-line dd { margin: 0; font-weight: 700; font-variant-numeric: tabular-nums; text-align: end; }
.sum-line.total { border-bottom: 0; border-top: 1.5px solid var(--line); margin-top: 4px; padding-top: 12px; }
.sum-line.total dt { color: var(--text); font-weight: 800; }
.sum-line.total dd { font-size: 1.05rem; font-weight: 800; color: var(--brand-700); }
.sum-line.after dd.short { color: var(--bad-600); }

/* ─── 17. KV / lists ─────────────────────────────────────────────────────── */
.kv { display: grid; grid-template-columns: minmax(84px, 40%) 1fr; gap: 0; }
.kv > dt { color: var(--muted); font-size: var(--fs-sm); padding: 9px 0; border-bottom: 1px solid var(--line-soft); }
.kv > dd { margin: 0; font-size: var(--fs-sm); font-weight: 600; padding: 9px 0; border-bottom: 1px solid var(--line-soft); text-align: end; min-width: 0; overflow-wrap: anywhere; }
.kv > dd .num { font-weight: 700; }
.kv.plain > dt, .kv.plain > dd { border-bottom: 0; padding-block: 5px; }

.list { display: flex; flex-direction: column; }
.list-row {
  display: flex; align-items: center; gap: var(--s-3);
  padding: 13px var(--s-5); border-bottom: 1px solid var(--line-soft);
  color: var(--text); min-width: 0;
  transition: background var(--t-fast);
}
a.list-row:hover { background: var(--surface-2); }
.list-row:last-child { border-bottom: 0; }
.list-row .grow { flex: 1; min-width: 0; }
.list-row .r-t { font-weight: 700; font-size: var(--fs-sm); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.list-row .r-s { color: var(--muted); font-size: var(--fs-xs); margin-top: 1px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.list-row .r-a { color: var(--ink-400); flex-shrink: 0; }
.list-row .ic-circle {
  width: 34px; height: 34px; border-radius: var(--r-md); flex-shrink: 0;
  display: grid; place-items: center; background: var(--surface-3); color: var(--ink-500);
}
.list-row .ic-circle svg { width: 17px; height: 17px; }

/* تراکنش */
.txn-amount { font-weight: 800; font-variant-numeric: tabular-nums; white-space: nowrap; text-align: end; }
.txn-amount.plus { color: var(--ok-600); }
.txn-amount.minus { color: var(--ink-700); }
.txn-amount small { display: block; font-size: var(--fs-xs); font-weight: 500; color: var(--muted); }

/* گفتگوی تیکت */
.thread { display: flex; flex-direction: column; gap: var(--s-3); padding: var(--s-5); background: var(--surface-2); max-height: 60vh; overflow-y: auto; }
.thread .msg { max-width: min(78%, 560px); display: flex; flex-direction: column; gap: 4px; }
.thread .msg .bubble {
  padding: 10px 14px; border-radius: var(--r-lg);
  font-size: var(--fs-sm); line-height: 1.9; white-space: pre-wrap; overflow-wrap: anywhere;
  border: 1px solid var(--line); background: var(--surface);
}
.thread .msg .meta { font-size: 11px; color: var(--ink-400); padding-inline: 4px; }
.thread .msg.user { align-self: flex-end; align-items: flex-end; }
.thread .msg.user .bubble { background: var(--accent); border-color: var(--accent); color: #fff; border-end-end-radius: 4px; }
.thread .msg.admin { align-self: flex-start; }
.thread .msg.admin .bubble { border-start-end-radius: 4px; }
.thread .msg.ai .bubble { border-style: dashed; }
.composer { display: flex; gap: var(--s-2); padding: var(--s-3) var(--s-4); border-top: 1px solid var(--line); background: var(--surface); align-items: flex-end; }
.composer .textarea { min-height: 44px; max-height: 160px; }

/* تایم‌لاین وضعیت سفارش */
.tl { display: flex; align-items: flex-start; gap: 0; margin: 0; padding: 0; list-style: none; }
.tl li { display: flex; align-items: center; gap: var(--s-2); color: var(--muted); font-size: var(--fs-xs); font-weight: 600; min-width: 0; }
.tl .dot { width: 9px; height: 9px; border-radius: 50%; background: var(--ink-300); flex-shrink: 0; }
.tl .line { flex: 1; height: 2px; background: var(--line); min-width: 14px; }
.tl li.done { color: var(--ok-600); }
.tl li.done .dot { background: var(--ok-600); }
.tl li.done .line { background: var(--ok-600); }
.tl li.cur { color: var(--brand-700); }
.tl li.cur .dot { background: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }

/* ─── 18. Wallet hero / stat ─────────────────────────────────────────────── */
.balance-hero {
  background: linear-gradient(180deg, var(--ink-900), var(--ink-800));
  color: #fff; border-radius: var(--r-xl);
  padding: var(--s-6);
  display: flex; flex-wrap: wrap; align-items: flex-end; gap: var(--s-4);
  border: 1px solid var(--ink-800);
}
.balance-hero .bh-label { font-size: var(--fs-xs); color: var(--ink-400); font-weight: 600; }
.balance-hero .bh-num { font-size: 2rem; font-weight: 800; letter-spacing: -.02em; font-variant-numeric: tabular-nums; line-height: 1.3; }
.balance-hero .bh-num small { font-size: .9rem; color: var(--ink-300); font-weight: 500; }
.balance-hero .grow { flex: 1; min-width: 180px; }
.balance-hero .btn-outline { background: rgba(255,255,255,.08); border-color: rgba(255,255,255,.22); color: #fff; }
.balance-hero .btn-outline:hover { background: rgba(255,255,255,.16); color: #fff; }
.balance-hero .btn-primary { box-shadow: none; }

.stat {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg);
  padding: var(--s-4) var(--s-5); display: flex; flex-direction: column; gap: 2px; min-width: 0;
}
.stat .s-label { font-size: var(--fs-xs); color: var(--muted); font-weight: 600; display: flex; align-items: center; gap: 6px; }
.stat .s-label .ic { width: 15px; height: 15px; }
.stat .s-value { font-size: 1.3rem; font-weight: 800; font-variant-numeric: tabular-nums; letter-spacing: -.01em; line-height: 1.35; }
.stat .s-value .unit { font-size: var(--fs-xs); color: var(--muted); font-weight: 500; }
.stat .s-sub { font-size: var(--fs-xs); color: var(--muted); }
.stat.warn .s-value { color: var(--warn-600); }
.stat.bad .s-value { color: var(--bad-600); }
.stat.ok .s-value { color: var(--ok-600); }
.stat-link { transition: border-color var(--t-fast), box-shadow var(--t-fast); }
.stat-link:hover { border-color: var(--line-strong); box-shadow: var(--sh-2); }

/* کارت شماره کارت — بدون gradient نمایشی */
.cardno {
  border: 1px solid var(--line); border-radius: var(--r-xl);
  background: var(--surface); padding: var(--s-5);
}
.cardno .cn-num {
  font-family: var(--mono); font-size: 1.35rem; font-weight: 700; letter-spacing: .06em;
  direction: ltr; text-align: center; user-select: all;
  padding: var(--s-4) 0; margin: var(--s-3) 0;
  background: var(--surface-2); border-radius: var(--r-md); border: 1px solid var(--line-soft);
  overflow-wrap: anywhere;
}
.cardno .cn-row { display: flex; justify-content: space-between; gap: var(--s-3); align-items: center; flex-wrap: wrap; }
.cardno .cn-label { font-size: var(--fs-xs); color: var(--muted); }
.cardno .cn-v { font-weight: 800; font-size: var(--fs-body); }

/* ─── 19. Misc ───────────────────────────────────────────────────────────── */
.divider { height: 1px; background: var(--line-soft); margin: var(--s-4) 0; border: 0; }
.sep-dot { color: var(--ink-300); padding-inline: 4px; }

.breadcrumb { display: flex; align-items: center; gap: 6px; font-size: var(--fs-xs); color: var(--muted); flex-wrap: wrap; }
.breadcrumb a { color: var(--muted); font-weight: 600; }
.breadcrumb a:hover { color: var(--text); }
.breadcrumb .ic { width: 13px; height: 13px; }

.pagination { display: flex; align-items: center; justify-content: center; gap: 4px; padding: var(--s-3) var(--s-4); flex-wrap: wrap; }
.pg {
  min-width: 34px; height: 34px; display: inline-grid; place-items: center;
  border-radius: var(--r-sm); border: 1px solid transparent;
  font-size: var(--fs-sm); font-weight: 700; color: var(--text-2); padding-inline: 8px;
  font-variant-numeric: tabular-nums;
}
a.pg:hover { background: var(--surface-3); color: var(--text); }
.pg.cur { background: var(--accent); color: #fff; }
.pg.off { opacity: .4; pointer-events: none; }
.pg .ic { width: 15px; height: 15px; }

.filterbar { display: flex; gap: var(--s-2); flex-wrap: wrap; align-items: center; }
.filterbar .input, .filterbar .select { min-height: 38px; padding-block: 6px; font-size: var(--fs-sm); width: auto; }
.filterbar .search { flex: 1; min-width: 180px; }

.notice { display: flex; gap: var(--s-3); align-items: flex-start; padding: var(--s-4); border-radius: var(--r-lg); }
.linkbox { border: 1px solid var(--line); border-radius: var(--r-md); padding: var(--s-3); background: var(--surface-2); direction: ltr; overflow-x: auto; }
.linkbox code { color: var(--text-2); font-size: var(--fs-xs); word-break: break-all; }

.copy-btn.ok { color: var(--ok-600); }

/* ربات‌کارت‌های صفحه انتخاب سرویس */
.order-types { display: grid; gap: var(--s-4); grid-template-columns: repeat(2, minmax(0,1fr)); }
.otype {
  display: flex; flex-direction: column; gap: var(--s-2);
  padding: var(--s-6); border: 1px solid var(--line); border-radius: var(--r-xl);
  background: var(--surface); position: relative; min-width: 0;
  transition: border-color var(--t-fast), box-shadow var(--t-fast);
}
.otype:hover { border-color: var(--accent); box-shadow: var(--sh-2); }
.otype .ot-ic { width: 44px; height: 44px; border-radius: var(--r-lg); background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; margin-bottom: var(--s-2); }
.otype .ot-ic svg { width: 22px; height: 22px; }
.otype h3 { font-size: var(--fs-h2); font-weight: 800; }
.otype p { color: var(--muted); font-size: var(--fs-sm); line-height: 1.9; }
.otype .ot-go { margin-top: var(--s-3); display: inline-flex; align-items: center; gap: 6px; font-weight: 700; font-size: var(--fs-sm); color: var(--accent); }

/* وضعیت اتصال/سرویس در ادمین */
.sysdot { display: inline-flex; align-items: center; gap: 8px; font-size: var(--fs-sm); font-weight: 600; }
.sysdot::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--ok-600); }
.sysdot.off::before { background: var(--bad-600); }
.sysdot.warn::before { background: var(--warn-600); }

/* لاگ‌ها */
.logline { display: flex; gap: var(--s-3); padding: 9px var(--s-4); border-bottom: 1px solid var(--line-soft); font-size: var(--fs-xs); align-items: baseline; direction: ltr; text-align: start; }
.logline:last-child { border-bottom: 0; }
.logline .lv { font-weight: 800; flex-shrink: 0; width: 62px; }
.logline .lv.error, .logline .lv.security { color: var(--bad-600); }
.logline .lv.payments, .logline .lv.audit { color: var(--info-600); }
.logline .lmsg { font-family: var(--mono); overflow-wrap: anywhere; color: var(--text-2); word-break: break-word; }

/* ─── 20. Auth / public ──────────────────────────────────────────────────── */
.auth {
  min-height: 100vh; display: grid; place-items: center;
  padding: var(--s-6) var(--s-4);
  background:
    radial-gradient(1200px 500px at 80% -10%, var(--brand-50), transparent 60%),
    var(--bg);
}
.auth-card { width: 100%; max-width: 420px; }
.auth-logo { display: flex; align-items: center; justify-content: center; gap: var(--s-3); margin-bottom: var(--s-6); }
.auth-card .card { box-shadow: var(--sh-3); }
.auth-alt { text-align: center; font-size: var(--fs-sm); color: var(--muted); margin-top: var(--s-4); }
.captcha-row { display: flex; align-items: center; gap: var(--s-3); }
.captcha-q {
  direction: rtl; font-weight: 800; font-size: 1rem; letter-spacing: .04em;
  background: var(--surface-3); border-radius: var(--r-md); padding: 9px 14px; white-space: nowrap;
  border: 1px solid var(--line-soft);
}
.captcha-row .input { flex: 1; }

.gnav {
  display: flex; align-items: center; gap: var(--s-4);
  padding: var(--s-4) var(--s-6);
  border-bottom: 1px solid var(--line); background: var(--surface);
  position: sticky; top: 0; z-index: var(--z-top);
}
.gnav .brand { border: 0; min-height: 0; padding: 0; }
.gnav .grow { flex: 1; }
.gmain { min-height: calc(100vh - 61px); }

/* لندینگ */
.hero { padding: var(--s-12) var(--s-6); text-align: center; }
.hero .display { max-width: 22ch; margin-inline: auto; }
.hero .lede { color: var(--muted); max-width: 52ch; margin: var(--s-4) auto var(--s-6); font-size: var(--fs-body); line-height: 2; }
.sect { padding: var(--s-12) var(--s-5); border-top: 1px solid var(--line); background: var(--surface); }
.sect.alt { background: var(--bg); }
.sect-in { max-width: 1024px; margin-inline: auto; }
.sect h2 { font-size: var(--fs-h1); font-weight: 800; text-align: center; margin-bottom: var(--s-2); }
.sect .sub { color: var(--muted); text-align: center; font-size: var(--fs-sm); margin-bottom: var(--s-8); }
.feature { padding: var(--s-5); border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--surface); min-width: 0; }
.feature .f-ic { width: 40px; height: 40px; border-radius: var(--r-md); background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; margin-bottom: var(--s-3); }
.feature .f-ic svg { width: 20px; height: 20px; }
.feature h3 { font-size: var(--fs-body); font-weight: 800; margin-bottom: 4px; }
.feature p { color: var(--muted); font-size: var(--fs-sm); line-height: 1.9; }
.faq { max-width: 720px; margin-inline: auto; }
.faq details { border: 1px solid var(--line); border-radius: var(--r-md); background: var(--surface); margin-bottom: var(--s-2); }
.faq summary { cursor: pointer; padding: 14px var(--s-4); font-weight: 700; font-size: var(--fs-sm); list-style: none; display: flex; justify-content: space-between; align-items: center; gap: var(--s-3); }
.faq summary::-webkit-details-marker { display: none; }
.faq summary .ic { width: 16px; height: 16px; color: var(--ink-400); transition: transform var(--t); flex-shrink: 0; }
.faq details[open] summary .ic { transform: rotate(180deg); }
.faq .ans { padding: 0 var(--s-4) var(--s-4); color: var(--muted); font-size: var(--fs-sm); line-height: 2; }
.foot { border-top: 1px solid var(--line); padding: var(--s-8) var(--s-6); color: var(--muted); font-size: var(--fs-sm); background: var(--surface); }
.foot-in { max-width: 1024px; margin-inline: auto; display: flex; gap: var(--s-6); flex-wrap: wrap; justify-content: space-between; align-items: center; }

/* بات‌ها */
.botcard { display: flex; flex-direction: column; gap: var(--s-4); }
.botcard .bc-top { display: flex; align-items: center; gap: var(--s-4); }
.botcard img { width: 56px; height: 56px; border-radius: var(--r-lg); object-fit: cover; border: 1px solid var(--line); }

/* ─── 21. Mobile nav (bottom) ────────────────────────────────────────────── */
.mobile-bottom-nav {
  display: none;
  position: fixed; inset-inline: 0; bottom: 0;
  align-items: stretch;
  background: var(--surface);
  border-top: 1px solid var(--line);
  padding-bottom: env(safe-area-inset-bottom);
  z-index: var(--z-top);
}
.mobile-bottom-nav .bnav-item {
  flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  color: var(--muted); font-size: 10.5px; font-weight: 600;
  min-height: 54px; padding: 6px 2px;
  transition: color var(--t-fast);
}
.mobile-bottom-nav .bnav-icon { display: inline-flex; width: 24px; height: 24px; }
.mobile-bottom-nav .bnav-icon svg { width: 22px; height: 22px; }
.mobile-bottom-nav .bnav-item[aria-current="page"], .mobile-bottom-nav .bnav-item.active { color: var(--accent); }
.mobile-bottom-nav .bnav-item:hover { color: var(--text); }

/* ─── 22. Responsive ─────────────────────────────────────────────────────── */
@media (max-width: 1100px) {
  .grid-side { grid-template-columns: 1fr; }
  .summary { position: static; }
}
@media (max-width: 1023px) {
  .sidenav {
    position: fixed; inset-block: 0; inset-inline-start: 0; inset-inline-end: auto;
    transform: translateX(100%); /* RTL: استارت=راست فیزیکی؛ کشو از راست بیرون می‌رود */
    transition: transform var(--t);
    box-shadow: none; height: 100vh;
    max-width: min(300px, 86vw);
    z-index: var(--z-drawer);
  }
  [dir="ltr"] .sidenav { inset-inline-start: auto; inset-inline-end: 0; transform: translateX(-100%); }
  body.nav-open .sidenav { transform: translateX(0); box-shadow: var(--sh-pop); }
  .burger { display: inline-grid; }
  .page { padding: var(--s-4) var(--s-4) var(--s-8); }
  .g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .g3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .order-types { grid-template-columns: 1fr; }
}
@media (min-width: 1024px) { .burger { display: none; } .mobile-nav-backdrop { display: none; } }

@media (max-width: 820px) {
  html { font-size: 14.5px; }
  .balance-chip, .topbar-hide-m { display: none; }
  .table-wrap, .table { display: none; }
  .m-cards { display: flex; flex-direction: column; gap: var(--s-3); padding: var(--s-4); }
  .mcard {
    background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg);
    padding: var(--s-4); display: flex; flex-direction: column; gap: 10px;
    min-width: 0;
  }
  a.mcard { color: var(--text); }
  .mcard .mc-top { display: flex; align-items: flex-start; gap: 10px; }
  .mcard .mc-t { font-weight: 800; font-size: var(--fs-body); min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 1; }
  .mcard .mc-s { color: var(--muted); font-size: var(--fs-xs); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; direction: ltr; text-align: start; margin-top: 1px; }
  .mcard .mc-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px var(--s-3); }
  .mcard .mc-k { color: var(--muted); font-size: var(--fs-xs); }
  .mcard .mc-v { font-size: var(--fs-sm); font-weight: 700; font-variant-numeric: tabular-nums; }
  .mcard .mc-foot { display: flex; align-items: center; gap: var(--s-2); justify-content: space-between; border-top: 1px solid var(--line-soft); padding-top: 10px; }
  .g2 { grid-template-columns: 1fr; }
  .form-grid { grid-template-columns: 1fr; }
  .choices.cols-3, .choices.cols-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .balance-hero { padding: var(--s-5); }
  .balance-hero .bh-num { font-size: 1.7rem; }
  .steps li .st-label { display: none; }
  .steps li.cur .st-label { display: inline; }
  .cardno .cn-num { font-size: 1.05rem; }
  .thread { max-height: none; padding: var(--s-4); }
  .msg { max-width: 88%; }
  .modal-ft { flex-direction: column-reverse; }
  .modal-ft .btn { width: 100%; }
  .toasts { padding-bottom: calc(72px + env(safe-area-inset-bottom)); }
  body.has-mnav .page { padding-bottom: calc(var(--s-12) + 58px + env(safe-area-inset-bottom)); }
  .mobile-bottom-nav { display: flex; }
  .wz-foot {
    position: sticky; bottom: 0;
    background: color-mix(in srgb, var(--surface) 94%, transparent);
    backdrop-filter: blur(8px);
    border-top: 1px solid var(--line);
    padding: var(--s-3); margin-top: var(--s-3);
    border-radius: 0;
  }
  body.has-mnav .wz-foot { bottom: calc(52px + env(safe-area-inset-bottom)); }
  .kv { grid-template-columns: 1fr 1.4fr; }
}
@media (max-width: 420px) {
  .wz-foot { flex-wrap: wrap; }
  .wz-foot > .grow, .wz-foot > .spacer { flex: 1 1 100%; }
  .wz-foot .btn { flex: 1 1 auto; min-width: 0; }
  .page { padding-inline: var(--s-3); }
  .g4, .g3 { grid-template-columns: 1fr; }
  .choices.cols-2 { grid-template-columns: 1fr; }
  .btn-lg { width: 100%; }
  .card-bd { padding: var(--s-4); }
  .topbar { padding-inline: var(--s-3); gap: 4px; }
}
@media (min-width: 821px) and (max-width: 1023px) {
  .m-cards { display: none; }
}

/* ─── 23. A11y / utilities ───────────────────────────────────────────────── */
.center { text-align: center; }
.end { text-align: end; }
.muted { color: var(--muted); }
.strong { font-weight: 700; }
.tiny { font-size: var(--fs-xs); }
.small { font-size: var(--fs-sm); }
.nowrap { white-space: nowrap; }
.trunc { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.flex { display: flex; align-items: center; gap: var(--s-2); }
.flex1 { flex: 1; min-width: 0; }
.wrap { flex-wrap: wrap; }
.mt-2 { margin-top: var(--s-2); }
.mt-4 { margin-top: var(--s-4); }
.mt-6 { margin-top: var(--s-6); }
.mb-2 { margin-bottom: var(--s-2); }
.mb-4 { margin-bottom: var(--s-4); }
.g1 { grid-template-columns: 1fr; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
@media print {
  .sidenav, .topbar, .mobile-bottom-nav, .toasts { display: none; }
  .page { padding: 0; max-width: none; }
  body { background: #fff; }
}

/* ─── 24. Link checker / qty stepper (JS hooks) ─────────────────────────── */
.link-check { margin-top: 8px; font-size: var(--fs-xs); font-weight: 700; border-radius: var(--r-sm); padding: 7px 10px; line-height: 1.7; }
.link-check:empty { display: none; }
.link-check.ok   { background: var(--ok-100);   color: var(--ok-700); }
.link-check.bad  { background: var(--bad-100);  color: var(--bad-700); }
.link-check.wait { background: var(--surface-3); color: var(--muted); }
.link-check.warn { background: var(--warn-100); color: var(--warn-700); }
.link-preview { display: flex; gap: 10px; align-items: center; border: 1px solid var(--line); background: var(--surface-2); border-radius: var(--r-md); padding: 10px 12px; margin-top: var(--s-3); font-size: var(--fs-sm); min-width: 0; }
.link-preview .lp-ic { width: 34px; height: 34px; border-radius: var(--r-md); background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; flex-shrink: 0; }
.link-preview .lp-t { font-weight: 700; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.link-preview .lp-id { color: var(--muted); font-size: var(--fs-xs); font-family: var(--mono); direction: ltr; }

.qty { display: flex; align-items: stretch; border: 1px solid var(--line-strong); border-radius: var(--r-md); background: var(--surface); width: 100%; overflow: hidden; }
.qty .input { border: 0; border-radius: 0; box-shadow: none; background: none; text-align: center; font-weight: 700; font-variant-numeric: tabular-nums; }
.qty .input:focus { outline: none; box-shadow: none; }
.qty:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-line); }
.qty button { width: 44px; flex-shrink: 0; border: 0; background: var(--surface-3); color: var(--text-2); cursor: pointer; font-size: 1.2rem; font-weight: 800; display: grid; place-items: center; min-height: 42px; }
.qty button:hover { background: var(--ink-200); color: var(--text); }
.qty button[data-qty-delta="-1"] { border-inline-end: 1px solid var(--line); }
.qty button[data-qty-delta="1"] { border-inline-start: 1px solid var(--line); }

.is-muted { opacity: .55; }
.card-hd .pill, .list-row .pill { flex-shrink: 0; }
.guest-shell { display: block; min-height: 100vh; }

.field-inline { flex: 1 1 220px; min-width: 200px; margin-bottom: 0; }
.page-hd .hd-img { width: 46px; height: 46px; border-radius: var(--r-lg); border: 1px solid var(--line); flex-shrink: 0; }
.list-none { list-style: none; padding: 0; margin: 0; }
[hidden] { display: none !important; }
.progress.lg { height: 12px; }
.tl { flex-wrap: wrap; gap: 6px 0; }
#amount.input, .big-amount { font-size: 1.25rem; font-weight: 800; }

.inline-form { display: inline; }
.otp { text-align: center; font-size: 1.6rem; letter-spacing: .5em; font-weight: 800; font-family: var(--mono); }
.strength-bar { height: 5px; border-radius: var(--r-full); background: var(--ink-100); overflow: hidden; margin-top: 8px; }
.strength-bar > i { display: block; height: 100%; width: 20%; background: var(--bad-600); transition: width var(--t), background var(--t); }
.strength-bar.s2 > i { width: 40%; background: var(--warn-600); }
.strength-bar.s3 > i { width: 60%; background: var(--warn-600); }
.strength-bar.s4 > i { width: 80%; background: var(--ok-600); }
.strength-bar.s5 > i { width: 100%; background: var(--ok-600); }

.bnav-label { font-size: .62rem; line-height: 1.2; font-weight: 600; }

/* ══════════ Admin support layer — legacy names mapped onto v3 tokens ══════════ */
.admin .card-body { padding: var(--s-4); }
.admin .card-head { display: flex; align-items: center; gap: var(--s-3); padding: var(--s-3) var(--s-4); border-bottom: 1px solid var(--line); }
.admin .card-head > h2:first-child { font-size: var(--fs-h2); font-weight: 800; margin: 0; flex: 1; min-width: 0; }
.admin .card-foot { display: flex; align-items: center; gap: var(--s-3); flex-wrap: wrap; padding: var(--s-3) var(--s-4); border-top: 1px solid var(--line); background: var(--surface-2); border-end-start-radius: var(--r-lg); border-end-end-radius: var(--r-lg); }
.admin .page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: var(--s-4); flex-wrap: wrap; margin-bottom: var(--s-5); }
.admin .page-head h1 { font-size: var(--fs-h1); font-weight: 900; margin: 0; letter-spacing: -.01em; }
.admin .page-head p { color: var(--ink-500); font-size: var(--fs-sm); margin: 4px 0 0; }
.admin .page-head > div:first-child { min-width: 0; }
.admin .form-row { margin-bottom: 0; }
.admin .form-label { display: block; font-size: var(--fs-sm); font-weight: 700; margin-bottom: 6px; color: var(--ink-700); }
.admin .form-hint { font-size: var(--fs-xs); color: var(--ink-500); margin-top: 5px; }
.admin .grid-2, .admin .grid-3, .admin .grid-4 { display: grid; gap: var(--s-4); }
.admin .grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.admin .grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.admin .grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.admin .form-grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 var(--s-4); }
.admin .grid-sidebar { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: var(--s-4); align-items: start; }
.admin .stat-card { display: flex; align-items: center; gap: var(--s-3); padding: var(--s-4); background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); min-width: 0; }
.admin .stat-icon { flex: 0 0 auto; width: 40px; height: 40px; border-radius: var(--r-md); display: inline-flex; align-items: center; justify-content: center; background: var(--brand-50); color: var(--brand-600); }
.admin .stat-icon svg { width: 20px; height: 20px; }
.admin .stat-label { font-size: var(--fs-xs); color: var(--ink-500); font-weight: 600; }
.admin .stat-value { font-size: var(--fs-h2); font-weight: 800; letter-spacing: -.01em; }
.admin .stat-value, .admin .num { font-variant-numeric: tabular-nums; }
.admin .filter-bar { display: flex; gap: var(--s-2); flex-wrap: wrap; align-items: center; }
.admin .filter-item { display: inline-flex; align-items: center; gap: 6px; }
.admin .table-sub { color: var(--ink-500); font-size: var(--fs-xs); }
.admin .table-title { font-weight: 700; }
.admin .alert-icon { flex: 0 0 auto; display: inline-flex; }
.admin .checkbox-row { display: flex; align-items: center; gap: var(--s-2); font-size: var(--fs-sm); }
.admin .pill-warning { background: var(--warn-100); color: var(--warn-700); }
.admin .pill-danger { background: var(--bad-100); color: var(--bad-700); }
.admin .pill-primary { background: var(--brand-50); color: var(--brand-700); }
.admin .alert-warning { background: var(--warn-100); color: var(--warn-700); border-color: var(--warn-100); }
.admin .alert-error { background: var(--bad-100); color: var(--bad-700); border-color: var(--bad-100); }
.admin .btn-danger { background: var(--bad-600); color: #fff; border-color: transparent; }
.admin .btn-danger:hover { background: var(--bad-700); }
.admin .progress-cell { min-width: 130px; }
.admin .kv-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); gap: 0 var(--s-6); font-size: var(--fs-sm); margin: 0; }
.admin .kv-list dt { color: var(--ink-500); font-weight: 600; }
.admin .kv-list dd { margin: 0; font-weight: 700; overflow-wrap: anywhere; }
.admin .bubble-text { display: block; }
.admin .bubble-meta { display: block; font-size: var(--fs-xs); color: var(--ink-400); margin-top: 4px; }
.admin .bubble-time { font-size: var(--fs-xs); opacity: .75; }
.admin .text-muted { color: var(--ink-500); }
.admin .small { font-size: var(--fs-xs); }
.admin .muted { color: var(--ink-500); }
.admin .nowrap { white-space: nowrap; }
@media (max-width: 1100px) {
  .admin .grid-sidebar { grid-template-columns: minmax(0, 1fr); }
  .admin .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 720px) {
  .admin .grid-2, .admin .grid-3, .admin .grid-4, .admin .form-grid-2 { grid-template-columns: minmax(0, 1fr); }
  .admin .page-head { align-items: stretch; }
}

/* ادمین = پنل عملیاتی داده‌محور: جدول‌ها روی موبایل هم با اسکرول افقی می‌مانند (جایگزین m-cards) */
@media (max-width: 820px) {
  .admin .table-wrap { display: block !important; }
  .admin .table { display: table !important; }
  .admin .m-cards { display: none; }
}

.admin .kv-list > div { min-width: 0; }
.admin .kv { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 2px var(--s-4); padding: 7px 0; border-bottom: 1px dashed var(--line-soft); min-width: 0; }
.admin .kv:last-child { border-bottom: none; }
.admin .kv dt { color: var(--muted); font-size: var(--fs-xs); font-weight: 600; flex: 0 1 auto; min-width: 0; overflow-wrap: anywhere; }
.admin .kv dd { margin: 0; font-weight: 700; font-size: var(--fs-sm); text-align: start; flex: 1 1 auto; min-width: 0; overflow-wrap: anywhere; }
.admin .kv dd .pill { max-width: 100%; }
.admin .card, .admin .card-body, .admin .card-head, .admin .card-foot, .admin .page { min-width: 0; }
.admin .table-wrap { min-width: 0; }

/* ── Touch targets ≥40px روی دستگاه‌های لمسی (بدون تغییر چگالی دسکتاپ) ── */
@media (pointer: coarse) {
  .btn-sm { min-height: 40px; padding-block: 9px; }
  .icon-btn { min-height: 40px; min-width: 40px; }
  .chip { min-height: 38px; }
  .faq summary { padding-block: var(--s-4); }
}
