@charset "UTF-8";

/* ---------------------------------------------------------------------------
   ۰) فونت — وزیرمتن (Vazirmatn، فونت آزاد و رایج فارسی؛ مجوز OFL)
      فایل‌ها داخل همین سایت هستند (assets/fonts)، پس بدون اینترنت هم کار می‌کند.
      «Vazir Digits» فقط ارقام را فارسی نشان می‌دهد (۰۱۲۳…)، بقیه‌ی متن با وزیرمتن.
   --------------------------------------------------------------------------- */
@font-face {
  font-family: "Vazirmatn Web";
  src: url("fonts/Vazirmatn-Variable.woff2") format("woff2-variations"),
       url("fonts/Vazirmatn-Variable.woff2") format("woff2");
  font-weight: 100 900; font-style: normal; font-display: swap;
}
@font-face { font-family: "Vazir Digits"; src: url("fonts/Vazirmatn-UI-FD-Regular.woff2") format("woff2");   font-weight: 100 449; font-display: swap; unicode-range: U+0030-0039; }
@font-face { font-family: "Vazir Digits"; src: url("fonts/Vazirmatn-UI-FD-Medium.woff2") format("woff2");    font-weight: 450 549; font-display: swap; unicode-range: U+0030-0039; }
@font-face { font-family: "Vazir Digits"; src: url("fonts/Vazirmatn-UI-FD-SemiBold.woff2") format("woff2");  font-weight: 550 649; font-display: swap; unicode-range: U+0030-0039; }
@font-face { font-family: "Vazir Digits"; src: url("fonts/Vazirmatn-UI-FD-Bold.woff2") format("woff2");      font-weight: 650 749; font-display: swap; unicode-range: U+0030-0039; }
@font-face { font-family: "Vazir Digits"; src: url("fonts/Vazirmatn-UI-FD-ExtraBold.woff2") format("woff2"); font-weight: 750 900; font-display: swap; unicode-range: U+0030-0039; }
/* ===========================================================================
   theme.css — سامانه‌ی خرید اعتباری تعاونی مصرف فرهنگیان
   نسخه ۱۴۰۵.۳

   چه چیزی در این نسخه درست شد (نسبت به ۱۴۰۵.۲):
     ۱) ۳۵ کلاس که صفحه‌ها استفاده می‌کردند ولی تم تعریفشان نکرده بود، اضافه شد
        (.alt، .header، .clock، .toolbar، .sep، .alert، .btn-mini و ...).
        نبودِ این‌ها دلیل اصلی بهم‌ریختگی بود.
     ۲) اندازه‌ی کنترل‌ها یکدست شد: هر فیلد و دکمه ۳۶ پیکسل، دکمه‌های داخل
        جدول ۲۸ پیکسل. قبلاً همه‌ی دکمه‌ها یک اندازه‌ی بزرگ می‌گرفتند.
     ۳) فیلدها دیگر بی‌قید «تمام عرض» نمی‌شوند؛ داخل فرم‌های چندستونی
        (.row / .inline / .search-row) به‌اندازه‌ی سهم خودشان پهن می‌شوند.
     ۴) صفحه‌های جدولی خودکار تمام‌عرض می‌شوند و متن سلول‌ها می‌شکند، تا
        اسکرول افقی لازم نباشد.

   جهت طراحی: یک مؤسسه‌ی اعتباری واقعی — سرمه‌ای نهادی، برنز به‌عنوان لهجه،
   سطوح تخت با خط مویی، بدون نئومورفیسم و بدون گرادیان تزئینی.
   =========================================================================== */

/* ---------------------------------------------------------------------------
   ۱) متغیرها — حالت روشن
   --------------------------------------------------------------------------- */
:root {
  color-scheme: light only;

  /* سطوح — پس‌زمینه‌ی سفید؛ کارت‌ها با خط مویی از هم جدا می‌شوند */
  --bg:        #FFFFFF;
  --bg-2:      #F6F8FB;
  --surface:   #FFFFFF;
  --surface-2: #F7F9FC;
  --surface-3: #EEF2F7;

  /* متن — خاکستری‌آبی سازمانی */
  --ink:    #111C2E;
  --ink-2:  #3B4658;
  --muted:  #6A7486;
  --line:   #E2E7EE;
  --line-2: #CBD3DE;

  /* برند — یک رنگ اصلی: سرمه‌ای عمیق */
  --brand:      #1D3557;
  --brand-2:    #2A4A76;
  --brand-3:    #132540;
  --brand-ink:  #FFFFFF;
  --brand-soft: #EEF2F7;
  --brand-line: #CBD5E2;

  /* لهجه‌ی برنزی — فقط برای نشان و ستاره‌ی امتیاز */
  --gold:      #9A7B3A;
  --gold-2:    #B08E4A;
  --gold-3:    #C9A961;
  --gold-ink:  #2E2410;
  --gold-soft: #F6F1E6;
  --gold-line: #E4D8BD;

  /* وضعیت‌ها — کم‌رنگ و آرام، نه رنگی‌رنگی */
  --ok:     #2F6A50; --ok-bg:     #F0F6F2; --ok-line:     #CFE2D6;
  --warn:   #876522; --warn-bg:   #FAF6EC; --warn-line:   #E8DDC2;
  --danger: #9C3036; --danger-bg: #FBF1F1; --danger-line: #EDD3D5;
  --info:   #2A4A76; --info-bg:   #F1F4F9; --info-line:   #D4DDEA;

  /* سایه — فقط برای بلند شدن از سطح */
  --sh-1: 0 1px 2px rgba(18,33,50,.04);
  --sh-2: 0 1px 3px rgba(18,33,50,.07), 0 6px 14px -8px rgba(18,33,50,.12);
  --sh-3: 0 2px 6px rgba(18,33,50,.10), 0 16px 30px -14px rgba(18,33,50,.20);

  /* هندسه — شبکه‌ی ۴ پیکسلی */
  --r-xs: 4px;
  --r-sm: 6px;
  --r:    8px;
  --r-lg: 12px;
  --r-pill: 999px;

  --sp:   16px;
  --maxw: 1140px;   /* صفحه‌های متنی */
  --maxw-wide: 1600px; /* صفحه‌هایی که جدول دارند */
  --t: .15s ease;

  /* اندازه‌ی یکدست کنترل‌ها */
  --ctl-h:    36px;
  --ctl-h-sm: 28px;
  --ctl-h-lg: 44px;
  --ctl-pad:  8px 13px;

  --font: "Vazir Digits", "Vazirmatn Web", "Vazirmatn", "IRANSansX", "IRANSans", Tahoma, "Segoe UI", sans-serif;
  --font-num: "SF Mono", "Segoe UI Mono", Consolas, "Courier New", monospace;

  --focus-ring: rgba(30, 71, 113, .20);
  --row-zebra:  rgba(23, 33, 47, .020);
}

/* ---------------------------------------------------------------------------
   ۳) پایه
   --------------------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.72;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4 {
  margin: 0 0 .55em;
  line-height: 1.45;
  font-weight: 700;
  letter-spacing: -.01em;
  color: var(--ink);
}
h1 { font-size: clamp(18px, 2vw, 22px); }
h2 { font-size: clamp(16px, 1.6vw, 18px); }
h3 { font-size: 15px; }
h4 { font-size: 14px; }

p { margin: 0 0 .85em; }
p:last-child { margin-bottom: 0; }

a { color: var(--brand-2); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }

:focus-visible { outline: 2px solid var(--brand-2); outline-offset: 2px; border-radius: var(--r-xs); }

hr, .divider, .sep {
  border: 0;
  border-top: 1px solid var(--line);
  margin: var(--sp) 0;
  height: 0;
}

/* اعداد با عرض یکسان — ستون مبلغ نمی‌لرزد */
.mono, .num, .money, .ts, code, kbd, samp, .value,
td.currency, td.num, .stat-value, .sum-value {
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum" 1;
}
.mono { font-family: var(--font); direction: ltr; unicode-bidi: embed; }
code, kbd, samp { font-family: var(--font-num); font-size: .92em; direction: ltr; }

/* ---------------------------------------------------------------------------
   ۴) چیدمان
   --------------------------------------------------------------------------- */
.container {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding: var(--sp) 16px 52px;
}
.container-narrow { max-width: 740px; }
.container-wide   { max-width: var(--maxw-wide); }

/* صفحه‌ای که جدول دارد خودکار تمام‌عرض می‌شود، بدون دست‌زدن به کد صفحه.
   خواسته‌ی صاحب پروژه: جدول‌ها باید کامل دیده شوند و اسکرول افقی لازم نباشد. */
.container:has(.table-wrap),
.container:has(.wrap),
.container:has(table),
.shell:has(table) { max-width: var(--maxw-wide); }

/* .auth-wrap ستون باریک صفحه‌های ورود است.
   .wrap در صفحه‌های قدیمی به‌عنوان «ظرف اسکرول جدول» به‌کار رفته، پس همان می‌ماند
   — قبلاً این دو با هم قاتی شده بودند و جدول‌ها را له می‌کرد. */
.auth-wrap { width: 100%; max-width: 440px; margin-inline: auto; padding: clamp(24px, 6vh, 56px) 16px 48px; }
.wrap { width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }
.shell { width: 100%; max-width: var(--maxw); margin-inline: auto; padding: var(--sp) 16px 52px; }

.grid { display: grid; gap: 14px; }
.grid-2    { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.grid-auto { grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); }
.cards     { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); }

.flex, .inline, .row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.row { align-items: flex-end; }
.row-end { display: flex; align-items: center; gap: 10px; }
.stack { display: flex; flex-direction: column; gap: 10px; }
.grow  { flex: 1 1 220px; min-width: 0; }
.spacer { flex: 1 1 auto; }
.center { text-align: center; }
.hide  { display: none !important; }
.right { text-align: right; }

.small  { font-size: 12.5px; color: var(--muted); line-height: 1.7; }
.muted  { color: var(--muted); }
.label, label.label { display: block; font-size: 12.5px; font-weight: 600; color: var(--ink-2); margin-bottom: 5px; }
.title, .head { font-weight: 700; }
.subtitle, .sub { font-size: 12.5px; color: var(--muted); }
.hint, .field-note, .note {
  display: block; font-size: 11.5px; color: var(--muted); line-height: 1.7; margin-top: 4px;
}

.page-in, .fade-in { animation: pgIn .2s ease both; }
@keyframes pgIn { from { opacity: 0; transform: translateY(3px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; }
}

/* ---------------------------------------------------------------------------
   ۵) نوار بالای سایت
   --------------------------------------------------------------------------- */
.appbar {
  position: sticky; top: 0; z-index: 40;
  background: rgba(255,255,255,.96);
  -webkit-backdrop-filter: saturate(1.4) blur(8px);
  backdrop-filter: saturate(1.4) blur(8px);
  border-bottom: 1px solid var(--line);
  box-shadow: 0 1px 0 rgba(15,27,45,.02), 0 4px 14px -10px rgba(15,27,45,.18);
}
.appbar-in {
  max-width: var(--maxw-wide);
  margin-inline: auto;
  padding: 0 16px;
  min-height: 60px;
  display: flex; align-items: center; gap: 12px;
}

.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); min-width: 0; padding: 8px 0; }
.brand:hover { text-decoration: none; }
.brand-logo { width: 36px; height: 36px; flex: 0 0 auto; border-radius: var(--r-sm); }
.brand-name {
  display: block; font-size: 14.5px; font-weight: 800; letter-spacing: -.01em; color: var(--brand-3);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.brand-sub {
  display: block; font-size: 11px; color: var(--muted);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

.appbar-actions { margin-inline-start: auto; display: flex; align-items: center; gap: 6px; min-width: 0; }
.navlinks { display: flex; align-items: center; gap: 2px; flex-wrap: nowrap; justify-content: flex-end; }
.navlink {
  display: inline-flex; align-items: center;
  padding: 6px 12px; min-height: 34px;
  border-radius: var(--r-sm);
  font-size: 13px; font-weight: 600;
  color: var(--ink-2);
  border: 1px solid transparent;
  white-space: nowrap;
  transition: background var(--t), color var(--t), border-color var(--t);
}
.navlink:hover { background: var(--surface-3); color: var(--ink); text-decoration: none; }
.navlink.is-current { background: var(--brand-soft); color: var(--brand); }
.navlink.primary { background: var(--brand); color: #FFF; border-color: var(--brand); }
.navlink.primary:hover { background: var(--brand-2); border-color: var(--brand-2); color: #FFF; }
.navlink.navlink-exit { color: var(--danger); }
.navlink.navlink-exit:hover { background: var(--danger-bg); color: var(--danger); }

.appbar .menu-btn { display: none; }

@media (max-width: 1240px) {
  .appbar .menu-btn { display: inline-flex; }
  .appbar-in { position: relative; }
  .navlinks {
    display: none;
    position: absolute; inset-inline: 10px; top: calc(100% + 6px);
    flex-direction: column; align-items: stretch; gap: 2px; flex-wrap: nowrap;
    max-height: calc(100vh - 90px); overflow-y: auto;
    padding: 7px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--r);
    box-shadow: var(--sh-3);
  }
  .navlinks.open, .navlinks.is-open { display: flex; }
  .navlink { padding: 10px 12px; min-height: 42px; font-size: 13.5px; }
  .navlink.primary { justify-content: center; }
}

.appfoot, .footer {
  border-top: 1px solid var(--line);
  background: var(--surface);
  color: var(--muted);
  font-size: 12.5px;
  text-align: center;
  padding: 16px 16px 24px;
}

/* سربرگ داخلی صفحه (بالای کارت‌ها) — .header و .topbar و .storebar در صفحه‌ها */
.header, .topbar, .storebar {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; flex-wrap: wrap;
  margin-bottom: 14px;
}
.header h1, .header h2, .topbar h1, .storebar h1 { margin: 0; }
.clock {
  font-size: 12.5px; color: var(--muted);
  font-variant-numeric: tabular-nums;
  padding: 5px 11px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-pill);
  white-space: nowrap;
}

.toolbar {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  margin-bottom: 12px;
}

/* ---------------------------------------------------------------------------
   ۶) کارت
   --------------------------------------------------------------------------- */
.card, .section, .memberbox, .box {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r);
  box-shadow: var(--sh-1);
  padding: clamp(13px, 1.7vw, 18px);
  margin-bottom: 14px;
}
.card:last-child, .section:last-child { margin-bottom: 0; }

.card-flush { padding: 0; }
.card-sunken {
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  box-shadow: none;
  padding: 13px;
  margin: 0;
}
.card-hover { transition: box-shadow var(--t), border-color var(--t); }
.card-hover:hover { box-shadow: var(--sh-2); border-color: var(--line-2); }

.card-head, .titleRow, .rev-head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; flex-wrap: wrap;
}
.card-head + *, .titleRow + * { margin-top: 12px; }
.titleRow h2 { margin: 0; }

/* کاشی میانبر */
.tile {
  display: block;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 16px;
  color: inherit;
  box-shadow: var(--sh-1);
  transition: box-shadow var(--t), border-color var(--t), transform var(--t);
}
.tile:hover {
  text-decoration: none;
  box-shadow: var(--sh-2);
  border-color: var(--brand-line);
  transform: translateY(-1px);
}
.tile h3 { margin: 0 0 4px; font-size: 14.5px; }
.tile p  { margin: 0; font-size: 12.5px; color: var(--muted); line-height: 1.7; }
.tile-ico {
  display: inline-grid; place-items: center;
  width: 36px; height: 36px;
  border-radius: var(--r-sm);
  background: var(--brand-soft); color: var(--brand);
  margin-bottom: 10px;
}
.tile-ico svg { width: 19px; height: 19px; }
.tile .btn { margin-top: 10px; }

/* ---------------------------------------------------------------------------
   ۷) کاشی عدد و مبلغ
   --------------------------------------------------------------------------- */
.stats { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.stat {
  display: flex; flex-direction: column; gap: 3px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 14px 16px;
  box-shadow: var(--sh-1);
  position: relative;
  min-width: 0;
}
.stat::before {
  content: ""; position: absolute; inset-block-start: 14px; inset-inline-start: 0;
  width: 3px; height: 20px; border-radius: 0 3px 3px 0; background: var(--brand);
}
.stat-label { font-size: 12px; color: var(--muted); font-weight: 600; }
.stat-value { font-size: 22px; font-weight: 800; color: var(--ink); line-height: 1.35; overflow-wrap: anywhere; }
.stat-value.gold { color: var(--gold); }
.stat-note  { font-size: 11px; color: var(--muted); line-height: 1.65; }

.money { display: inline-flex; flex-direction: column; line-height: 1.32; }
.money-main { font-weight: 700; font-size: 14px; }
.money-unit { font-size: 10px; color: var(--muted); font-weight: 600; margin-inline-start: 3px; }
.money-alt  { font-size: 10.5px; color: var(--muted); }

/* ---------------------------------------------------------------------------
   ۸) دکمه — همه یک اندازه، مگر جایی که عمداً کوچک/بزرگ خواسته شده
   --------------------------------------------------------------------------- */
.btn, button, input[type="submit"], input[type="button"], .linkbtn, .toggle-btn, .theme {
  --btn-bg:   var(--surface);
  --btn-ink:  var(--ink);
  --btn-line: var(--line-2);

  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: var(--ctl-pad);
  height: var(--ctl-h);
  min-height: var(--ctl-h);
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  line-height: 1;
  color: var(--btn-ink);
  background: var(--btn-bg);
  border: 1px solid var(--btn-line);
  border-radius: var(--r-sm);
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
  transition: background var(--t), border-color var(--t), color var(--t);
}
.btn:hover, button:hover, input[type="submit"]:hover, .theme:hover {
  background: var(--surface-3);
  border-color: var(--ink-2);
  text-decoration: none;
}
.btn:active, button:active { transform: translateY(.5px); }
.btn[disabled], button[disabled], .btn.is-busy, .is-busy {
  opacity: .5; cursor: not-allowed; pointer-events: none;
}

/* اصلی */
.btn-primary, button.push, button[name="add_member"], button[name="add_store"] {
  --btn-bg: var(--brand); --btn-ink: var(--brand-ink); --btn-line: var(--brand);
}
.btn-primary:hover, button.push:hover { background: var(--brand-2); border-color: var(--brand-2); color: var(--brand-ink); }

/* ثانویه — «alt» در صفحه‌ها همین است */
.btn.alt, button.alt, .alt {
  --btn-bg: var(--surface-2); --btn-ink: var(--ink-2); --btn-line: var(--line);
}
.btn.alt:hover, button.alt:hover { background: var(--surface-3); border-color: var(--line-2); color: var(--ink); }

.btn-gold { --btn-bg: var(--gold-3); --btn-ink: #2E2205; --btn-line: #B6912E; }
.btn-gold:hover { background: #CDA744; border-color: #9C7B24; }

.btn-ok, button.approved { --btn-bg: var(--ok-bg); --btn-ink: var(--ok); --btn-line: var(--ok-line); }
.btn-ok:hover { background: var(--ok); border-color: var(--ok); color: #FFF; }

.btn-danger, button.danger, button.stop, button.rejected, button.fail {
  --btn-bg: var(--danger-bg); --btn-ink: var(--danger); --btn-line: var(--danger-line);
}
.btn-danger:hover, button.danger:hover, button.stop:hover { background: var(--danger); border-color: var(--danger); color: #FFF; }

.btn-ghost { --btn-bg: transparent; --btn-line: transparent; --btn-ink: var(--ink-2); }
.btn-ghost:hover { background: var(--surface-3); border-color: var(--line); }

/* دکمه‌ای که شکل لینک دارد (مثل «ارسال دوباره کد») */
.linkbtn {
  --btn-bg: transparent; --btn-line: transparent; --btn-ink: var(--brand-2);
  padding: 0 4px; height: auto; min-height: 0; font-weight: 600;
}
.linkbtn:hover { background: transparent; border-color: transparent; text-decoration: underline; text-underline-offset: 3px; }

.btn-sm, .btn-mini, .toggle-btn {
  height: var(--ctl-h-sm); min-height: var(--ctl-h-sm);
  padding: 4px 10px; font-size: 12px;
}
.btn-lg, .big { height: var(--ctl-h-lg); min-height: var(--ctl-h-lg); padding: 10px 20px; font-size: 14.5px; }
.btn-block { width: 100%; }
.btn-icon, .theme { padding: 0; width: var(--ctl-h); flex: 0 0 auto; }

.btn-group { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }

/* دکمه‌ی آیکنی نوار بالا (منوی موبایل) */
.appbar .btn-icon {
  --btn-bg: var(--surface); --btn-ink: var(--ink-2); --btn-line: var(--line-2);
  width: 40px; height: 40px; min-height: 40px;
}
.appbar .btn-icon:hover { background: var(--surface-3); border-color: var(--ink-2); }

/* ---------------------------------------------------------------------------
   ۹) فیلد
   --------------------------------------------------------------------------- */
input[type="text"], input[type="tel"], input[type="number"], input[type="password"],
input[type="search"], input[type="email"], input[type="date"], input[type="url"],
select, textarea, .input {
  width: 100%;
  font-family: inherit;
  font-size: 13.5px;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--line-2);
  border-radius: var(--r-sm);
  padding: var(--ctl-pad);
  height: var(--ctl-h);
  transition: border-color var(--t), box-shadow var(--t);
}
select { padding-inline-end: 8px; }
textarea { height: auto; min-height: 80px; line-height: 1.8; resize: vertical; padding: 9px 12px; }

input[type="file"] {
  width: 100%;
  font-family: inherit;
  font-size: 12.5px;
  color: var(--ink-2);
  background: var(--surface-2);
  border: 1px dashed var(--line-2);
  border-radius: var(--r-sm);
  padding: 9px 12px;
  cursor: pointer;
}
input[type="file"]:hover { border-color: var(--brand-2); background: var(--brand-soft); }

input:hover, select:hover, textarea:hover { border-color: var(--ink-2); }
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--brand-2);
  box-shadow: 0 0 0 3px var(--focus-ring);
}
input::placeholder, textarea::placeholder { color: var(--muted); opacity: .85; }
input[readonly], input[disabled], select[disabled], textarea[disabled] {
  background: var(--surface-2); color: var(--muted); cursor: not-allowed;
}

input[type="checkbox"], input[type="radio"] {
  width: 16px; height: 16px;
  accent-color: var(--brand);
  cursor: pointer;
  flex: 0 0 auto;
  margin: 0;
}

label { font-size: 13px; color: var(--ink-2); }

.field { margin-bottom: 13px; }
.field:last-child { margin-bottom: 0; }

/* فرم‌های چندستونی: فیلد به‌اندازه‌ی سهم خودش، نه تمام عرض.
   این همان چیزی است که قبلاً همه‌ی فرم‌ها را بهم می‌ریخت. */
.inline > input, .inline > select,
.row > input, .row > select,
.search-row > input, .search-row > select,
.searchbar > input, .searchbar > select,
.toolbar > input, .toolbar > select {
  width: auto;
  flex: 1 1 170px;
  min-width: 140px;
}
.inline > input[type="checkbox"], .inline > input[type="radio"],
.row > input[type="checkbox"], .row > input[type="radio"] { flex: 0 0 auto; min-width: 0; }

/* فیلدی که داخل یک ظرف دیگر (نه مستقیم زیر .row) است هم نباید له شود */
.row select, .inline select, .search-row select, .searchbar select { min-width: 130px; }
.row .field, .inline .field, .search-row .field, .searchbar .field { flex: 1 1 170px; min-width: 140px; margin-bottom: 0; }

.search-row, .searchbar {
  display: flex; align-items: flex-end; gap: 10px; flex-wrap: wrap;
}
.search-row > .field, .searchbar > .field { margin-bottom: 0; }

.copybox {
  width: 100%;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  padding: 11px;
  font-family: var(--font-num);
  font-size: 12px;
  line-height: 1.75;
  direction: ltr; text-align: left;
  white-space: pre;
  overflow: auto;
  height: auto;
}

.switch, .toggle {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; flex-wrap: wrap;
  padding: 11px 13px;
  border-radius: var(--r-sm);
  border: 1px solid var(--line);
  background: var(--surface-2);
}
.switch.on,  .toggle.on  { border-color: var(--ok-line);     background: var(--ok-bg); }
.switch.off, .toggle.off { border-color: var(--danger-line); background: var(--danger-bg); }
.switch .state { font-weight: 700; font-size: 13px; }

.file-list { display: flex; flex-direction: column; gap: 5px; font-size: 12.5px; }

/* ---------------------------------------------------------------------------
   ۱۰) جدول — تمام‌عرض، متن شکسته، بدون اسکرول افقی روی دسکتاپ
   --------------------------------------------------------------------------- */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; border-radius: var(--r-sm); }
.card.table-wrap { padding: 0; overflow-x: auto; }
.card.table-wrap > table { border: 0; border-radius: 0; }

table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  table-layout: auto;
  font-size: 12.5px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  overflow: hidden;
}
thead th {
  background: var(--surface-2);
  color: var(--ink-2);
  font-size: 11.5px;
  font-weight: 700;
  text-align: right;
  white-space: nowrap;
  padding: 9px 10px;
  border-bottom: 1px solid var(--line-2);
}
tbody td {
  padding: 8px 10px;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
  /* متن بلند می‌شکند تا ستون‌ها پهن نشوند و جدول از صفحه بیرون نزند */
  overflow-wrap: break-word;
  word-break: normal;
}
tbody tr:last-child td { border-bottom: 0; }
tbody tr:nth-child(even) > td { background: var(--row-zebra); }
tbody tr:hover > td { background: var(--brand-soft); }

/* اعداد و ستون اقدام نمی‌شکنند */
td.currency, td.num, .num, td.actions, .actionscell, td .btn-group {
  white-space: nowrap;
}
td.currency, td.num { text-align: right; }

/* دکمه‌های داخل جدول کوچک‌اند — دلیل «همه دکمه‌ها بزرگ‌اند» همین بود */
td .btn, td button, td input[type="submit"],
.actionscell .btn, .actionscell button {
  height: var(--ctl-h-sm);
  min-height: var(--ctl-h-sm);
  padding: 4px 9px;
  font-size: 11.5px;
}
td input[type="text"], td input[type="number"], td select {
  height: var(--ctl-h-sm);
  padding: 4px 8px;
  font-size: 12px;
}
td.actions form, .actionscell form { display: inline-block; margin: 0 0 0 4px; }
td form { margin: 0; }

/* وضعیت ردیف — نوار باریک، بدون رنگ‌آمیزی کل ردیف */
tr.row-active > td:first-child { box-shadow: inset 3px 0 0 var(--warn); }
tr.row-done   > td:first-child { box-shadow: inset 3px 0 0 var(--ok); }

/* کادر جستجوی فوری بالای جدول‌ها (assets/ui.js) */
.table-search {
  display: flex; align-items: center; gap: 10px;
  margin: 0 0 10px;
}
.card.table-wrap > .table-search { margin: 12px; }
.table-search input { max-width: 360px; }
.table-search-count { font-size: 12px; color: var(--muted); white-space: nowrap; }

/* نمودار توزیع امتیاز */
.dist-row { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; }
.dist-label { width: 56px; flex: 0 0 auto; font-size: 12.5px; color: var(--ink-2); }
.dist-bar { flex: 1 1 auto; height: 8px; border-radius: 99px; background: var(--surface-3); overflow: hidden; min-width: 60px; }
.dist-bar > span { display: block; height: 100%; background: var(--gold-2); border-radius: 99px; }
.dist-count { width: 36px; flex: 0 0 auto; text-align: left; font-size: 12px; font-variant-numeric: tabular-nums; }

table.table { border: 1px solid var(--line); box-shadow: none; font-size: 12px; }
table.table thead th { background: var(--surface-3); }

details > summary {
  cursor: pointer; font-size: 12.5px; font-weight: 600;
  color: var(--brand-2); padding: 3px 0;
}
details > summary:hover { text-decoration: underline; text-underline-offset: 3px; }
details[open] > summary { margin-bottom: 8px; }

.summary {
  display: flex; flex-wrap: wrap; gap: 8px 20px;
  margin-top: 13px; padding-top: 13px;
  border-top: 1px solid var(--line);
  font-size: 12.5px; color: var(--ink-2);
}
.pill, .tag {
  display: inline-flex; align-items: center;
  padding: 1px 9px;
  border-radius: var(--r-pill);
  background: var(--surface-3);
  border: 1px solid var(--line);
  font-size: 12px; font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.pagination { display: flex; align-items: center; gap: 5px; flex-wrap: wrap; justify-content: center; }

/* ---------------------------------------------------------------------------
   ۱۱) نشان و برچسب
   --------------------------------------------------------------------------- */
.badge, .chip {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 1px 8px;
  border-radius: var(--r-pill);
  font-size: 11px; font-weight: 700; line-height: 1.85;
  background: var(--surface-3); color: var(--ink-2);
  border: 1px solid var(--line);
  white-space: nowrap;
}
.badge-gold, .chip.gold, .chip.words, .badge.words {
  background: var(--gold-soft); color: var(--gold); border-color: var(--gold-line);
}
.badge.on,  .chip-ok,     .badge.approved { background: var(--ok-bg);     color: var(--ok);     border-color: var(--ok-line); }
.badge.off, .chip-danger, .badge.rejected, .badge.fail {
  background: var(--danger-bg); color: var(--danger); border-color: var(--danger-line);
}
.chip-warn, .badge.pending, .badge.warn { background: var(--warn-bg); color: var(--warn); border-color: var(--warn-line); }
.chip-info, .badge.info { background: var(--info-bg); color: var(--info); border-color: var(--info-line); }
.badge.active { background: var(--brand-soft); color: var(--brand); border-color: var(--brand-line); }

.paid { color: var(--ok); font-weight: 700; }

/* ---------------------------------------------------------------------------
   ۱۲) پیام
   --------------------------------------------------------------------------- */
.msg, .notice, .alert, .info {
  display: block;
  padding: 10px 13px;
  border-radius: var(--r-sm);
  border: 1px solid var(--line);
  border-inline-start: 3px solid var(--muted);
  background: var(--surface-2);
  color: var(--ink-2);
  font-size: 13px;
  line-height: 1.78;
  margin-bottom: 13px;
}
.notice, .info {
  background: var(--info-bg); border-color: var(--info-line);
  border-inline-start-color: var(--info); color: var(--info);
  margin-bottom: 0;
}
.msg-ok, .msg.ok, .alert.ok {
  background: var(--ok-bg); border-color: var(--ok-line);
  border-inline-start-color: var(--ok); color: var(--ok);
}
.msg-err, .msg.err, .alert.err, .alert.error, .error {
  background: var(--danger-bg); border-color: var(--danger-line);
  border-inline-start-color: var(--danger); color: var(--danger);
}
.msg-warn, .msg.warn, .alert.warn {
  background: var(--warn-bg); border-color: var(--warn-line);
  border-inline-start-color: var(--warn); color: var(--warn);
}
/* .info به‌عنوان نشان هم استفاده شده (span.badge.info) — آن حالت بالاتر تعریف شد */
span.info, span.error { display: inline-flex; padding: 1px 8px; font-size: 11px; border-inline-start-width: 1px; margin: 0; }

/* ---------------------------------------------------------------------------
   ۱۳) ستاره و امتیاز
   --------------------------------------------------------------------------- */
.stars { display: inline-flex; gap: 1px; direction: ltr; line-height: 1; }
.star  { color: var(--line-2); font-size: 14px; }
.star.on { color: var(--gold-2); }

.rating-input { display: flex; flex-wrap: wrap; gap: 7px; }
.rating-opt {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 11px;
  border: 1px solid var(--line-2);
  border-radius: var(--r-sm);
  background: var(--surface);
  cursor: pointer;
  font-size: 12.5px;
  transition: border-color var(--t), background var(--t);
}
.rating-opt:hover { border-color: var(--ink-2); background: var(--surface-2); }
.rating-opt:has(input:checked) {
  border-color: var(--brand); background: var(--brand-soft);
  box-shadow: inset 0 0 0 1px var(--brand);
}

.reviews { margin-top: 13px; padding-top: 13px; border-top: 1px solid var(--line); }
.rev-head { margin-bottom: 11px; }
.rev-list { display: flex; flex-direction: column; gap: 9px; }
.rev-item {
  padding: 11px 13px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
}
.rev-item .who  { font-weight: 700; font-size: 13px; }
.rev-item .meta { font-size: 11px; color: var(--muted); margin-bottom: 5px; }
.rev-item .text { font-size: 13px; line-height: 1.85; white-space: pre-line; }
.rev-form { margin-top: 13px; }

/* ---------------------------------------------------------------------------
   ۱۴) معرفی فروشگاه
   --------------------------------------------------------------------------- */
.store-card { position: relative; }
.cover {
  display: block; width: 100%;
  aspect-ratio: 16 / 6;
  max-height: 200px;
  object-fit: cover;
  border-radius: var(--r-sm);
  border: 1px solid var(--line);
  margin-bottom: 13px;
  background: var(--surface-2);
}
.avatar {
  width: 62px; height: 62px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid var(--line);
  background: var(--surface-3);
  margin-bottom: 8px;
}
.name   { font-size: 14px; font-weight: 700; margin: 0 0 2px; }
.role   { font-size: 12px; color: var(--brand-2); font-weight: 600; }
.branch { font-size: 11.5px; color: var(--muted); }
.bio    { font-size: 12.5px; color: var(--ink-2); line-height: 1.8; margin-top: 5px; }
.intro  { font-size: 13px; line-height: 1.88; color: var(--ink-2); }

.clamp { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.details { display: none; margin-top: 13px; }
.details.open { display: block; }
.store-summary-actions { margin-top: 11px; }

/* گالری عکس فروشگاه — ابعاد ثابت تا ظاهر سایت بهم نریزد */
.shot-grid {
  display: grid; gap: 9px;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
}
.shot {
  position: relative;
  aspect-ratio: 4 / 3;
  border-radius: var(--r-sm);
  border: 1px solid var(--line);
  background: var(--surface-2);
  overflow: hidden;
}
.shot img { width: 100%; height: 100%; object-fit: cover; display: block; }
.shot .shot-del {
  position: absolute; inset-block-start: 5px; inset-inline-end: 5px;
  height: 24px; min-height: 24px; width: 24px; padding: 0;
  border-radius: var(--r-xs);
  background: rgba(160,34,42,.92); color: #FFF; border-color: transparent;
  font-size: 13px;
}
.shot .shot-del:hover { background: #8C1C24; color: #FFF; }

/* ---------------------------------------------------------------------------
   ۱۵) متفرقه‌های موروثی
   --------------------------------------------------------------------------- */
.hello  { font-size: 14.5px; font-weight: 700; }
.member { font-size: 13px; color: var(--ink-2); }
.links, .link { font-size: 12.5px; }
.logout { color: var(--danger); font-weight: 600; }
.icon   { display: inline-grid; place-items: center; }
.eye    { cursor: pointer; }
.value  { font-weight: 700; }
.step   { font-size: 13px; color: var(--ink-2); }
.sched  { font-size: 12px; color: var(--muted); }
.ts     { font-size: 12px; color: var(--muted); }
.showSel { min-width: 130px; }
.rowChk  { width: 16px; height: 16px; }
.close   { cursor: pointer; }

/* پنجره‌ی بازشو — پیش‌فرض پنهان؛ اسکریپت صفحه با style.display آن را باز می‌کند.
   (در ۱۴۰۵.۳ پیش‌فرض نمایان بود و روی کل صفحه‌ی درخواست‌های اعتبار می‌افتاد
    و جلوی کلیک روی دکمه‌های تایید/رد را می‌گرفت.) */
.modal {
  position: fixed; inset: 0; z-index: 60;
  display: none; align-items: center; justify-content: center; padding: 20px;
  background: rgba(10,20,32,.55);
}
.modal > .box { max-width: 560px; width: 100%; max-height: 85vh; overflow: auto; margin: 0; }


/* ---------------------------------------------------------------------------
   ۱۵-ب) صفحه‌های ورود
        کارت باریک و وسط‌چین، فیلدها روی هم، دکمه‌ی اصلی تمام‌عرض.
        روی موبایل هم بدون تغییر ساختار درست کار می‌کند.
   --------------------------------------------------------------------------- */
.auth-card {
  max-width: 420px;
  margin-inline: auto;
  padding: clamp(20px, 4vw, 30px);
  box-shadow: var(--sh-2);
}
.auth-head { text-align: center; margin-bottom: 20px; }
.auth-head h1 { font-size: 19px; margin: 0 0 4px; }
.auth-head .small { margin: 0; }
.auth-ico {
  display: inline-grid; place-items: center;
  width: 46px; height: 46px;
  border-radius: var(--r);
  background: var(--brand-soft);
  color: var(--brand);
  margin-bottom: 12px;
}
.auth-card .clock {
  display: block;
  text-align: center;
  margin: 0 auto 16px;
  width: fit-content;
}
.auth-card .clock:empty, .auth-card .clock:has(span:empty) { display: none; }

/* کادر کد یک‌بارمصرف — بزرگ و با فاصله‌ی حروف، راحت برای موبایل */
.otp-input {
  text-align: center;
  font-family: var(--font-num);
  font-size: 22px;
  font-weight: 700;
  letter-spacing: .38em;
  text-indent: .38em;
  height: 52px;
}

.auth-foot {
  display: flex; align-items: center; justify-content: space-between;
  gap: 10px; flex-wrap: wrap;
  margin-top: 16px; padding-top: 14px;
  border-top: 1px solid var(--line);
}

/* فیلدی که یک دکمه‌ی کوچک کنارش دارد (نمایش رمز) */
.field.has-affix { position: relative; }
.field.has-affix > input { padding-inline-end: 62px; }
.affix-btn, .eye {
  position: absolute;
  inset-block-end: 0;
  inset-inline-end: 0;
  height: var(--ctl-h); min-height: var(--ctl-h);
  padding: 0 12px;
  background: transparent;
  border: 0;
  color: var(--brand-2);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}
.affix-btn:hover, .eye:hover { background: transparent; border: 0; text-decoration: underline; text-underline-offset: 3px; }

/* ---------------------------------------------------------------------------
   ۱۶) چاپ
   --------------------------------------------------------------------------- */
@media print {
  body { background: #FFF; color: #000; }
  .appbar, .appfoot, .footer, .btn, button, .navlinks, .btn-group,
  .search-row, .searchbar, .toolbar, .pagination, .clock { display: none !important; }
  .card, .section, table { box-shadow: none; border-color: #999; break-inside: avoid; }
  .container, .shell { max-width: none; padding: 0; }
  a { color: #000; text-decoration: none; }
  thead th { background: #EEE !important; color: #000; }
}

/* ---------------------------------------------------------------------------
   ۱۷) جدول روی موبایل: هر ردیف یک کارت
        برچسب‌ها را assets/ui.js به‌صورت data-label می‌گذارد.
   --------------------------------------------------------------------------- */
@media (max-width: 1100px) {
  table.responsive { border: 0; background: transparent; }
  table.responsive thead { display: none; }
  table.responsive tbody tr {
    display: block;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--r-sm);
    margin-bottom: 9px;
    padding: 3px 0;
    box-shadow: var(--sh-1);
  }
  table.responsive tbody tr:nth-child(even) > td,
  table.responsive tbody tr:hover > td { background: transparent; }
  table.responsive tbody td {
    display: flex; align-items: baseline; justify-content: space-between;
    gap: 12px; text-align: left;
    padding: 6px 12px;
    border-bottom: 1px dashed var(--line);
    white-space: normal;
  }
  table.responsive tbody td:last-child { border-bottom: 0; }
  table.responsive tbody td::before {
    content: attr(data-label);
    flex: 0 0 auto;
    font-size: 11px; font-weight: 700; color: var(--muted);
    text-align: right;
  }
  table.responsive tbody td:empty { display: none; }
  table.responsive tr.row-active > td:first-child,
  table.responsive tr.row-done   > td:first-child { box-shadow: none; }
  table.responsive tr.row-active { border-inline-start: 3px solid var(--warn); }
  table.responsive tr.row-done   { border-inline-start: 3px solid var(--ok); }
  table.responsive tbody td:has(table),
  table.responsive tbody td:has(details),
  table.responsive tbody td.actions { display: block; }
  table.responsive tbody td:has(table)::before,
  table.responsive tbody td:has(details)::before,
  table.responsive tbody td.actions::before { display: none; }
}

/* ---------------------------------------------------------------------------
   ۱۸) موبایل
   --------------------------------------------------------------------------- */
@media (max-width: 640px) {
  :root { --sp: 13px; --ctl-h: 40px; --ctl-h-lg: 46px; }
  body { font-size: 14px; }
  .container, .shell { padding: 13px 12px 44px; }
  .card, .section { padding: 13px; }
  .stat-value { font-size: 18px; }
  .card-head, .titleRow, .header { gap: 9px; }
  .auth-wrap { padding: 20px 14px 44px; }
  /* روی موبایل فیلدها تمام عرض بهتر است — انگشت باید راحت بزند */
  .inline > input, .inline > select,
  .row > input, .row > select,
  .search-row > input, .search-row > select,
  .searchbar > input, .searchbar > select { flex: 1 1 100%; width: 100%; }
  .btn-group > .btn, .btn-group > button { flex: 1 1 auto; }
  .grow { flex: 1 1 100%; }
}

/* ---------------------------------------------------------------------------
   ۱۹) اصلاحات نسخه ۱۴۰۵.۴ — پوسته‌ی سفید، چیدمان بدون تداخل
   --------------------------------------------------------------------------- */
.hero-grid { grid-template-columns: minmax(0,1.35fr) minmax(0,1fr); }
@media (max-width: 760px) { .hero-grid { grid-template-columns: minmax(0,1fr); } }

/* شبکه‌ها و بخش‌ها با بخش بعدی فاصله دارند */
section.grid, .grid.grid-auto, .stats { margin-bottom: 14px; }
section.grid:last-child { margin-bottom: 0; }

.appfoot { background: var(--surface-2); }
@media (max-width: 640px) { .appfoot [aria-hidden="true"] { display: none; } }

/* ستون اقدام: دکمه‌ها کنار هم و در صورت کمبود جا در سطر بعد — هیچ دکمه‌ای زیر دیگری نمی‌رود */
td.actions, td.actionscell, .actionscell { white-space: normal; min-width: 150px; }
td.actions > form, td.actions > .btn, td.actions > button, td.actions > a.btn,
.actionscell > form, .actionscell > .btn, .actionscell > button {
  display: inline-flex; align-items: center; gap: 4px; vertical-align: middle;
  margin: 2px 0 2px 4px;
}
td.actions form input[type="password"], td.actions form input[type="text"],
td.actions form input[type="number"] { width: 130px; min-width: 0; flex: 0 0 auto; }
td .btn, td button { white-space: nowrap; }

/* فرم تصمیم (تأیید/رد) داخل جدول درخواست‌ها */
td.decide-cell { min-width: 250px; white-space: normal; }
form.decide { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 3px 0; }
form.decide + form.decide { margin-top: 8px; padding-top: 8px; border-top: 1px dashed var(--line); }
form.decide input[type="text"] { flex: 1 1 120px; width: auto; min-width: 110px; }
label.check { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--ink-2); cursor: pointer; white-space: nowrap; }

/* فرم جستجوی قدیمی که بچه‌هایش div ساده‌اند */
.search-row > div:not(.btn-group):not(:has(> button)):not(:has(> a > button)) { flex: 1 1 170px; min-width: 140px; }
.search-row > div > label.small { display: block; font-weight: 600; color: var(--ink-2); margin-bottom: 5px; }
.search-row > div:has(> button) { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.search-row > div > a { text-decoration: none !important; margin: 0 !important; }

@media (max-width: 1100px) {
  /* ردیف سرستون‌هایی که داخل thead نیستند هم در حالت کارتی پنهان شوند */
  table.responsive tr:has(> th) { display: none; }
  table.responsive { display: block; }
  table.responsive > tbody { display: block; }
  table.responsive tbody td > .btn, table.responsive tbody td > button, table.responsive tbody td > form { max-width: 100%; }
  table.responsive tbody td.actions, table.responsive tbody td.decide-cell { display: block; min-width: 0; }
  table.responsive tbody td.decide-cell::before { display: none; }
  td.actions form input[type="password"], td.actions form input[type="text"] { width: 150px; flex: 1 1 130px; }
}
@media (max-width: 640px) {
  .search-row > div, .search-row > .field { flex: 1 1 100% !important; }
  .header { align-items: flex-start; }
}

span.copybox { display: inline-block; width: auto; max-width: 100%; padding: 3px 8px; white-space: pre-wrap; overflow-wrap: anywhere; vertical-align: middle; }

/* فوتر همیشه پایین صفحه — در صفحه‌های کوتاه (ورود) وسط صفحه معلق نمی‌ماند */
body { min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; }
body > .appfoot, body > .footer { margin-top: auto; }
body > main, body > .container, body > .shell, body > .auth-wrap { flex: 0 0 auto; }
input[type="file"]::file-selector-button {
  font-family: inherit; font-size: 12.5px; font-weight: 600;
  margin-inline-end: 10px; padding: 6px 12px; height: 30px;
  border: 1px solid var(--line-2); border-radius: var(--r-sm);
  background: var(--surface); color: var(--brand); cursor: pointer;
}
input[type="file"]::file-selector-button:hover { background: var(--brand-soft); }
/* چک‌باکس‌ها هیچ‌وقت کش نمی‌آیند (قبلاً روی موبایل تمام‌عرض می‌شد و متن زیرش می‌افتاد) */
.inline > input[type="checkbox"], .inline > input[type="radio"],
.row > input[type="checkbox"], .row > input[type="radio"],
.search-row > input[type="checkbox"], .toolbar > input[type="checkbox"] {
  flex: 0 0 auto !important; width: 16px !important; min-width: 0 !important;
}
@media (max-width: 640px) {
  section.grid:has(> .stat) { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .stat { padding: 12px; }
}
td.actions > a { display: inline-flex; vertical-align: middle; margin: 2px 0 2px 4px; text-decoration: none; }
td span.copybox { white-space: nowrap; overflow-wrap: normal; }
/* محتوای غیرجدولی داخل کارتِ جدول‌دار فاصله‌ی داخلی داشته باشد */
.card.table-wrap > h2, .card.table-wrap > h3, .card.table-wrap > form,
.card.table-wrap > .toolbar, .card.table-wrap > p, .card.table-wrap > .small,
.card.table-wrap > .hint, .card.table-wrap > .msg, .card.table-wrap > .notice,
.card.table-wrap > .card-head, .card.table-wrap > .summary { margin-inline: 16px; }
.card.table-wrap > h2:first-child, .card.table-wrap > h3:first-child, .card.table-wrap > .card-head:first-child { margin-top: 14px; }
.card.table-wrap > :last-child:not(table) { margin-bottom: 14px; }
td.money-cell { min-width: 118px; font-variant-numeric: tabular-nums; }
td.decide-cell { min-width: 230px; }
@media (min-width: 1101px) and (max-width: 1400px) {
  thead th { padding: 8px 7px; font-size: 11px; }
  tbody td { padding: 7px 7px; font-size: 12px; }
}
@media (max-width: 1100px) {
  /* جدولِ کارتی داخل کارت: کارت‌های ردیف به لبه نچسبند */
  .card.table-wrap { padding: 12px; }
  .card.table-wrap > h2, .card.table-wrap > h3, .card.table-wrap > form,
  .card.table-wrap > .toolbar, .card.table-wrap > p, .card.table-wrap > .small,
  .card.table-wrap > .hint, .card.table-wrap > .msg, .card.table-wrap > .notice,
  .card.table-wrap > .card-head, .card.table-wrap > .summary { margin-inline: 0; }
  .card.table-wrap > .table-search { margin: 0 0 10px; }
  .card.table-wrap > h2:first-child, .card.table-wrap > h3:first-child { margin-top: 2px; }
  table.responsive tbody td { overflow-wrap: anywhere; }
  table.responsive tbody td > * { max-width: 100%; }
}
@media (max-width: 640px) {
  .search-row input, .search-row select { width: 100%; }
  .table-search input { max-width: none; }
}

/* ---------------------------------------------------------------------------
   ۲۰) یکدست‌سازی رنگ — ظاهر سازمانی؛ فقط سرمه‌ای + خاکستری، رنگ وضعیت کم‌رنگ
   --------------------------------------------------------------------------- */
.tile-ico { background: var(--brand-soft) !important; color: var(--brand) !important; border: 1px solid var(--brand-line); }
.stat-value.gold { color: var(--brand); }
.badge-gold, .chip.gold, .chip.words, .badge.words { background: var(--surface-2); color: var(--ink-2); border-color: var(--line); }
.dist-bar > span { background: var(--brand); }
.badge, .chip { font-weight: 600; }
.btn-ok, button.approved { --btn-bg: var(--surface); --btn-ink: var(--ok); --btn-line: var(--ok-line); }
.btn-danger, button.danger, button.stop, button.rejected, button.fail { --btn-bg: var(--surface); --btn-ink: var(--danger); --btn-line: var(--danger-line); }
.btn-gold { --btn-bg: var(--brand); --btn-ink: #FFF; --btn-line: var(--brand); }
.switch.on,  .toggle.on  { border-color: var(--line); background: var(--surface-2); }
.switch.off, .toggle.off { border-color: var(--line); background: var(--surface-2); }
.status-dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; vertical-align: middle; margin-inline-end: 4px; background: var(--muted); }
.status-dot.on { background: var(--ok); box-shadow: 0 0 0 3px var(--ok-bg); }
.status-dot.off { background: var(--danger); box-shadow: 0 0 0 3px var(--danger-bg); }
.star { color: #D5DAE2; } .star.on { color: var(--gold-2); }
svg.star { display: inline-block; vertical-align: middle; }
.ico { flex: 0 0 auto; vertical-align: -3px; }
.btn .ico, button .ico, .badge .ico, .navlink .ico { vertical-align: 0; }
.badge .ico { width: 12px; height: 12px; }
tr.row-active > td:first-child { box-shadow: inset 3px 0 0 var(--brand-line); }
table.responsive tr.row-active { border-inline-start-color: var(--brand-line); }
/* نشانگر پرسش‌های متداول — شِورون خطی به‌جای مثلث پیش‌فرض */
details > summary { list-style: none; display: flex; align-items: center; gap: 8px; }
details > summary::-webkit-details-marker { display: none; }
details > summary::before {
  content: ""; width: 7px; height: 7px; flex: 0 0 auto;
  border-inline-start: 1.8px solid currentColor; border-bottom: 1.8px solid currentColor;
  transform: rotate(45deg); transition: transform var(--t); margin-inline-start: 2px;
}
details[open] > summary::before { transform: rotate(-45deg); }

/* تایپوگرافی با وزیرمتن */
body { font-size: 14px; line-height: 1.8; letter-spacing: 0; font-feature-settings: "ss01" 0; }
h1, h2, h3, h4, .brand-name, .stat-value { letter-spacing: 0; }
h1 { font-weight: 800; } h2, h3 { font-weight: 700; }
.btn, button, .navlink, .badge, .chip, .label, label.label, thead th { font-family: var(--font); }
.otp-input { font-family: var(--font); letter-spacing: .45em; }
input, select, textarea, button { font-family: var(--font); }
