/* ════════════════════════════════════════════════════════════════════
   دردسترس — سیستم طراحی
   ایده: «همیشه در دسترس». زمرّدی عمیق برای اعتماد، زعفرانی برای اقدام و فوریت.
   فونت نمایشی لاله‌زار (هویت محلی و گرم) + وزیرمتن متغیر برای رابط.
   همهٔ رنگ‌ها توکن‌اند؛ حالت تاریک کامل؛ افکت‌ها با prefers-reduced-motion خاموش می‌شوند.
   ════════════════════════════════════════════════════════════════════ */
@font-face {
  font-family: "Vazirmatn";
  src: url("/fonts/Vazirmatn-Variable.woff2") format("woff2-variations"), url("/fonts/Vazirmatn-Variable.woff2") format("woff2");
  font-weight: 100 900; font-display: swap;
}
@font-face {
  font-family: "Lalezar";
  src: url("/fonts/Lalezar-Arabic.woff2") format("woff2");
  font-weight: 400; font-display: swap;
  unicode-range: U+0600-06FF, U+0750-077F, U+200C-200E, U+FB50-FDFF, U+FE70-FEFF;
}

:root {
  /* رنگ */
  --bg: #f2f6f4;
  --surface: #ffffff;
  --surface-2: #f6faf8;
  --ink: #12201c;
  --ink-2: #3a4b46;
  --muted: #687a74;
  --line: #e0e8e4;
  --brand: #0b7a66;
  --brand-600: #075f4f;
  --brand-400: #19a084;
  --brand-50: #e2f4ee;
  --accent: #f0a01a;
  --accent-ink: #855200;
  --accent-50: #fff3d9;
  --ok: #16834a;   --ok-50: #e4f5eb;
  --warn: #a86a05; --warn-50: #fdf3dc;
  --err: #c43a2c;  --err-50: #fdeceb;
  --info: #2763ad; --info-50: #e7f0fb;
  --on-brand: #ffffff;
  --glass: color-mix(in srgb, var(--surface) 74%, transparent);
  --shadow-sm: 0 1px 2px rgb(14 40 33 / .06);
  --shadow: 0 1px 2px rgb(14 40 33 / .05), 0 6px 18px -6px rgb(14 40 33 / .12);
  --shadow-lg: 0 2px 4px rgb(14 40 33 / .05), 0 18px 40px -14px rgb(14 40 33 / .28);
  --glow: 0 8px 24px -8px color-mix(in srgb, var(--brand) 60%, transparent);
  /* فرم */
  --r-lg: 20px; --r: 14px; --r-sm: 10px;
  --tap: 48px;
  --ease: cubic-bezier(.2, .8, .2, 1);
  /* تایپ */
  --font-ui: "Vazirmatn", Tahoma, "Segoe UI", sans-serif;
  --font-display: "Lalezar", "Vazirmatn", Tahoma, sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #08110f;
    --surface: #0f1b18;
    --surface-2: #142420;
    --ink: #e6f0ec;
    --ink-2: #b3c4be;
    --muted: #82958e;
    --line: #20322d;
    --brand: #2fc4a2;
    --brand-600: #5bd8ba;
    --brand-400: #2fc4a2;
    --brand-50: #11312a;
    --accent: #f6b63e;
    --accent-ink: #f8c868;
    --accent-50: #33260c;
    --ok: #4fd08a;   --ok-50: #0f2e1d;
    --warn: #f0b84a; --warn-50: #33270c;
    --err: #ff7c6e;  --err-50: #3a1714;
    --info: #79aef0; --info-50: #13253b;
    --on-brand: #04201a;
    --shadow-sm: 0 1px 2px rgb(0 0 0 / .4);
    --shadow: 0 1px 2px rgb(0 0 0 / .35), 0 8px 22px -8px rgb(0 0 0 / .6);
    --shadow-lg: 0 2px 4px rgb(0 0 0 / .35), 0 20px 44px -14px rgb(0 0 0 / .75);
    color-scheme: dark;
  }
}

/* ── پایه ── */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; font-family: var(--font-ui); font-size: 15px; line-height: 1.8; font-weight: 400;
  color: var(--ink); background: var(--bg); direction: rtl; text-align: right;
  background-image:
    radial-gradient(60rem 30rem at 110% -10%, color-mix(in srgb, var(--brand) 9%, transparent), transparent 60%),
    radial-gradient(40rem 26rem at -20% 10%, color-mix(in srgb, var(--accent) 7%, transparent), transparent 60%);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
  -webkit-tap-highlight-color: transparent;
}
a { color: var(--brand); text-decoration: none; transition: color .15s; }
a:hover { color: var(--brand-600); }
img { max-width: 100%; display: block; }
h1, h2, h3 { line-height: 1.45; margin: 0 0 .6rem; text-wrap: balance; letter-spacing: -.005em; }
h1 { font-family: var(--font-display); font-weight: 400; font-size: 1.75rem; line-height: 1.5; }
h2 { font-size: 1.1rem; font-weight: 800; }
h3 { font-size: 1rem; font-weight: 700; }
p { margin: 0 0 .6rem; }
small, .small { font-size: .85rem; }
.muted { color: var(--muted); }
.ink2 { color: var(--ink-2); }
::selection { background: color-mix(in srgb, var(--brand) 25%, transparent); }

.ic { width: 1.15em; height: 1.15em; flex-shrink: 0; vertical-align: -.2em; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* ── گذار صفحه‌ها (View Transitions بین صفحه‌ها) ── */
@view-transition { navigation: auto; }
.topbar { view-transition-name: topbar; }
.bottom-nav { view-transition-name: bottomnav; }
::view-transition-old(root) { animation: vt-out .18s var(--ease) both; }
::view-transition-new(root) { animation: vt-in .32s var(--ease) both; }
@keyframes vt-out { to { opacity: 0; transform: translateY(-6px); } }
@keyframes vt-in { from { opacity: 0; transform: translateY(10px); } }

/* ── نوار بالا (شیشه‌ای) ── */
.topbar {
  position: sticky; top: 0; z-index: 30;
  background: var(--glass);
  -webkit-backdrop-filter: saturate(170%) blur(16px); backdrop-filter: saturate(170%) blur(16px);
  border-bottom: 1px solid color-mix(in srgb, var(--line) 70%, transparent);
  padding-top: env(safe-area-inset-top, 0px);
  transition: box-shadow .25s var(--ease);
}
.topbar.scrolled { box-shadow: var(--shadow); }
.topbar .wrap { display: flex; align-items: center; gap: .75rem; min-height: 60px; }
.brand { display: flex; align-items: center; gap: .6rem; color: var(--ink); }
.brand:hover { color: var(--ink); }
.brand .logo {
  width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; color: #fff;
  background: linear-gradient(140deg, var(--brand-400), var(--brand-600));
  box-shadow: var(--glow), inset 0 1px 0 rgb(255 255 255 / .35);
  transition: transform .3s var(--ease);
}
.brand:hover .logo { transform: rotate(-8deg) scale(1.05); }
.brand .logo .ic { width: 20px; height: 20px; }
.brand .name { display: grid; line-height: 1.2; }
.brand .name b { font-family: var(--font-display); font-weight: 400; font-size: 1.3rem; letter-spacing: .01em; }
.brand .name small { color: var(--muted); font-size: .7rem; }
.topbar nav { margin-inline-start: auto; display: flex; gap: .15rem; align-items: center; }
.topbar nav a { color: var(--ink-2); padding: .4rem .7rem; border-radius: 999px; font-size: .9rem; font-weight: 600; transition: background .2s, color .2s; }
.topbar nav a:hover, .topbar nav a.active { background: var(--brand-50); color: var(--brand-600); }
.icon-btn { position: relative; display: inline-grid !important; place-items: center; width: 42px; height: 42px; padding: 0 !important; }
.icon-btn .ic { width: 21px; height: 21px; }
.bell .dot {
  position: absolute; top: 4px; left: 4px; min-width: 18px; height: 18px; border-radius: 9px; padding: 0 5px;
  background: var(--accent); color: #3b2500; font-size: .68rem; font-weight: 800; display: grid; place-items: center;
  box-shadow: 0 0 0 2px var(--surface); animation: pop .4s var(--ease) both;
}
@keyframes pop { from { transform: scale(.4); } }
#installBtn[hidden] { display: none !important; }

.wrap { width: 100%; max-width: 980px; margin: 0 auto; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
main.wrap { padding-block: 18px 110px; }
.page-head { display: flex; align-items: center; justify-content: space-between; gap: .75rem; margin-bottom: 14px; flex-wrap: wrap; }
.page-head h1 { margin: 0; }
.back { display: inline-flex; align-items: center; gap: .3rem; font-size: .88rem; font-weight: 600; margin-bottom: 8px; color: var(--muted); }
.back:hover { color: var(--brand); }

/* ورود نرم محتوا */
main.wrap > * { animation: rise .45s var(--ease) both; }
main.wrap > *:nth-child(2) { animation-delay: .04s; }
main.wrap > *:nth-child(3) { animation-delay: .08s; }
main.wrap > *:nth-child(4) { animation-delay: .12s; }
main.wrap > *:nth-child(5) { animation-delay: .16s; }
main.wrap > *:nth-child(n+6) { animation-delay: .2s; }
@keyframes rise { from { opacity: 0; transform: translateY(12px); } }

/* ── کارت ── */
.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg);
  padding: 18px; box-shadow: var(--shadow-sm); margin-bottom: 14px;
}
.card.flat { box-shadow: none; background: var(--surface-2); }
.card h2 { margin-bottom: .8rem; }
a.card, .quote, .stat[href] { transition: transform .25s var(--ease), box-shadow .25s var(--ease), border-color .25s; }
a.card:hover, .quote:hover, .stat[href]:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); border-color: color-mix(in srgb, var(--brand) 30%, var(--line)); }
.card-row { display: flex; align-items: center; justify-content: space-between; gap: .75rem; flex-wrap: wrap; }
.stack > * + * { margin-top: 10px; }
.grid { display: grid; gap: 12px; }
.grid-2 { grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fill, minmax(min(100%, 210px), 1fr)); }

/* ── هیرو ── */
.hero {
  position: relative; overflow: hidden; isolation: isolate;
  border-radius: 26px; padding: 30px 22px 26px; margin-bottom: 22px; color: #fff;
  background: linear-gradient(150deg, #0d8a72 0%, #075f4f 55%, #063f36 100%);
  box-shadow: var(--shadow-lg);
}
.hero::before, .hero::after {
  content: ""; position: absolute; z-index: -1; border-radius: 50%; filter: blur(42px); opacity: .7;
  animation: drift 14s ease-in-out infinite alternate;
}
.hero::before { width: 260px; height: 260px; background: #ffc14d; top: -130px; left: -70px; opacity: .32; }
.hero::after { width: 320px; height: 320px; background: #2fd3ae; bottom: -160px; right: -80px; animation-duration: 18s; opacity: .45; }
@keyframes drift { to { transform: translate(40px, 30px) scale(1.15); } }
.hero .pattern { position: absolute; inset: 0; z-index: -1; opacity: .12; background-image: radial-gradient(rgb(255 255 255 / .9) 1px, transparent 1.2px); background-size: 18px 18px; -webkit-mask-image: linear-gradient(to left, #000, transparent 75%); mask-image: linear-gradient(to left, #000, transparent 75%); }
.hero h1 { font-size: clamp(1.9rem, 6vw, 2.7rem); line-height: 1.35; margin-bottom: .5rem; text-shadow: 0 2px 18px rgb(0 0 0 / .18); }
.hero h1 em { font-style: normal; color: #ffd27a; }
.hero p { opacity: .92; max-width: 54ch; font-size: 1rem; }
.hero .actions { margin-top: 16px; }
.hero .btn { background: #fff; color: #075f4f; box-shadow: 0 10px 24px -10px rgb(0 0 0 / .45); }
.hero .btn:hover { background: #fff; color: #063f36; }
.hero .btn.ghost { background: rgb(255 255 255 / .12); color: #fff; border-color: rgb(255 255 255 / .35); box-shadow: none; -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.hero .btn.ghost:hover { background: rgb(255 255 255 / .2); }
.trust { display: flex; flex-wrap: wrap; gap: 8px 16px; margin-top: 18px; font-size: .85rem; opacity: .95; }
.trust span { display: inline-flex; align-items: center; gap: 6px; }
.trust .ic { color: #ffd27a; }

.section-title { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; margin: 6px 0 12px; }
.section-title h2 { margin: 0; font-size: 1.2rem; }

/* ── تخصص‌ها ── */
.cats { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(min(46%, 150px), 1fr)); margin-bottom: 22px; }
.cat {
  position: relative; display: flex; flex-direction: column; align-items: flex-start; justify-content: space-between; gap: 14px; min-height: 120px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); color: var(--ink); padding: 14px;
  box-shadow: var(--shadow-sm); overflow: hidden;
  transition: transform .25s var(--ease), box-shadow .25s var(--ease), border-color .25s;
}
.cat::after { content: ""; position: absolute; inset: auto -30% -60% auto; width: 120px; height: 120px; border-radius: 50%; background: var(--brand-50); opacity: 0; transition: opacity .3s, transform .4s var(--ease); transform: scale(.6); }
.cat:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); border-color: color-mix(in srgb, var(--brand) 35%, var(--line)); color: var(--ink); }
.cat:hover::after { opacity: 1; transform: scale(1); }
.cat .ico {
  position: relative; z-index: 1; width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center;
  color: var(--brand); background: var(--brand-50); transition: transform .35s var(--ease), background .25s, color .25s;
}
.cat .ico .ic { width: 24px; height: 24px; }
.cat:hover .ico { transform: rotate(-8deg) scale(1.08); background: var(--brand); color: var(--on-brand); }
.cat b { position: relative; z-index: 1; font-weight: 700; font-size: .95rem; line-height: 1.5; }
.cat small { position: relative; z-index: 1; display: block; font-weight: 500; }

.how { counter-reset: how; }
.how .card { position: relative; padding-top: 22px; }
.how .step-n { display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 11px; background: var(--accent-50); color: var(--accent-ink); margin-bottom: 8px; }
.how .step-n .ic { width: 18px; height: 18px; }

/* ── دکمه ── */
.btn {
  position: relative; display: inline-flex; align-items: center; justify-content: center; gap: .45rem;
  min-height: var(--tap); padding: 0 20px; border-radius: var(--r); border: 1px solid transparent;
  background: linear-gradient(180deg, var(--brand-400), var(--brand)); color: var(--on-brand);
  font: inherit; font-weight: 700; cursor: pointer; text-decoration: none; white-space: nowrap;
  box-shadow: var(--glow), inset 0 1px 0 rgb(255 255 255 / .22);
  transition: transform .15s var(--ease), box-shadow .2s, filter .2s, background .2s;
}
.btn:hover { color: var(--on-brand); filter: brightness(1.06); box-shadow: 0 12px 26px -10px color-mix(in srgb, var(--brand) 70%, transparent), inset 0 1px 0 rgb(255 255 255 / .22); }
.btn:active { transform: scale(.97); }
.btn.secondary { background: var(--surface); color: var(--brand); border-color: color-mix(in srgb, var(--brand) 45%, var(--line)); box-shadow: var(--shadow-sm); }
.btn.secondary:hover { background: var(--brand-50); color: var(--brand-600); }
.btn.ghost { background: transparent; color: var(--ink-2); border-color: var(--line); box-shadow: none; }
.btn.ghost:hover { background: var(--surface-2); color: var(--ink); }
.btn.danger { background: linear-gradient(180deg, #e0574a, var(--err)); color: #fff; box-shadow: 0 8px 22px -10px color-mix(in srgb, var(--err) 70%, transparent); }
.btn.accent { background: linear-gradient(180deg, #ffbe4d, var(--accent)); color: #3b2500; box-shadow: 0 8px 22px -10px color-mix(in srgb, var(--accent) 80%, transparent); }
.btn.sm { min-height: 36px; padding: 0 13px; font-size: .86rem; border-radius: var(--r-sm); }
.btn.block { width: 100%; }
.btn[disabled] { opacity: .55; cursor: not-allowed; transform: none; }
.btn.is-loading { color: transparent !important; pointer-events: none; }
.btn.is-loading::after { content: ""; position: absolute; width: 18px; height: 18px; border-radius: 50%; border: 2.5px solid currentColor; border-color: var(--on-brand) var(--on-brand) transparent transparent; animation: spin .7s linear infinite; }
.btn.secondary.is-loading::after, .btn.ghost.is-loading::after { border-color: var(--brand) var(--brand) transparent transparent; }
@keyframes spin { to { transform: rotate(360deg); } }
.actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
form.inline { display: inline; }

/* ── فرم ── */
label { display: block; font-weight: 700; font-size: .9rem; margin-bottom: 6px; color: var(--ink); }
.field { margin-bottom: 16px; }
.hint { font-size: .82rem; color: var(--muted); margin-top: 4px; }
input[type=text], input[type=tel], input[type=number], input[type=search], select, textarea {
  width: 100%; min-height: var(--tap); padding: 10px 14px; font: inherit; color: var(--ink);
  border: 1.5px solid var(--line); border-radius: var(--r); background: var(--surface);
  transition: border-color .2s, box-shadow .2s, background .2s;
}
input::placeholder, textarea::placeholder { color: color-mix(in srgb, var(--muted) 80%, transparent); }
textarea { min-height: 104px; resize: vertical; }
select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: 18px 50%, 13px 50%; background-size: 5px 5px; background-repeat: no-repeat; padding-left: 34px; }
input:hover, select:hover, textarea:hover { border-color: color-mix(in srgb, var(--brand) 30%, var(--line)); }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 4px color-mix(in srgb, var(--brand) 18%, transparent); }
.btn:focus-visible, a:focus-visible, .chip input:focus-visible + span, .cat:focus-visible { outline: 3px solid color-mix(in srgb, var(--brand) 55%, transparent); outline-offset: 2px; }
input.ltr { direction: ltr; text-align: left; letter-spacing: .06em; font-variant-numeric: tabular-nums; }
input[type=file] { font: inherit; max-width: 100%; padding: 10px; border: 1.5px dashed var(--line); border-radius: var(--r); width: 100%; background: var(--surface-2); cursor: pointer; }
input[type=file]::file-selector-button { font: inherit; font-weight: 700; border: 0; border-radius: var(--r-sm); background: var(--brand-50); color: var(--brand-600); padding: 7px 14px; margin-inline-end: 10px; cursor: pointer; }
input[type=checkbox] { width: 20px; height: 20px; accent-color: var(--brand); }
.row { display: grid; gap: 12px; grid-template-columns: 1fr 1fr; }
@media (max-width: 560px) { .row { grid-template-columns: 1fr; } }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { position: relative; margin: 0; }
.chip input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.chip span {
  display: inline-flex; align-items: center; gap: 6px; min-height: 42px; padding: 0 15px;
  border: 1.5px solid var(--line); border-radius: 999px; background: var(--surface);
  font-weight: 600; font-size: .88rem; cursor: pointer; color: var(--ink-2);
  transition: background .2s, border-color .2s, color .2s, transform .15s var(--ease);
}
.chip span .ic { color: var(--brand); }
.chip:hover span { border-color: color-mix(in srgb, var(--brand) 40%, var(--line)); }
.chip input:active + span { transform: scale(.96); }
.chip input:checked + span { background: var(--brand); border-color: var(--brand); color: var(--on-brand); box-shadow: var(--glow); }
.chip input:checked + span .ic { color: var(--on-brand); }

/* ── برچسب و نشان ── */
.badge { display: inline-flex; align-items: center; gap: 5px; padding: 3px 11px; border-radius: 999px; font-size: .76rem; font-weight: 700; background: var(--brand-50); color: var(--brand-600); white-space: nowrap; }
.badge .ic { width: .95em; height: .95em; }
.badge.ok { background: var(--ok-50); color: var(--ok); }
.badge.warn { background: var(--warn-50); color: var(--warn); }
.badge.err { background: var(--err-50); color: var(--err); }
.badge.info { background: var(--info-50); color: var(--info); }
.badge.muted { background: var(--surface-2); color: var(--muted); border: 1px solid var(--line); }
.badge.accent { background: var(--accent-50); color: var(--accent-ink); }
.badge.brand { background: var(--brand-50); color: var(--brand-600); }
.badges { display: flex; flex-wrap: wrap; gap: 6px; }

/* ── پیام‌ها (توست) ── */
.toasts { position: fixed; z-index: 40; top: calc(70px + env(safe-area-inset-top, 0px)); inset-inline: 0; display: grid; justify-items: center; gap: 8px; pointer-events: none; padding-inline: 16px; }
.alert { display: flex; align-items: flex-start; gap: 10px; padding: 12px 14px; border-radius: var(--r); margin-bottom: 12px; border: 1px solid; font-size: .92rem; font-weight: 500; }
.alert .ic { margin-top: .25em; }
.toasts .alert { pointer-events: auto; width: min(520px, 100%); margin: 0; box-shadow: var(--shadow-lg); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); animation: toast-in .45s var(--ease) both; }
.toasts .alert.leaving { animation: toast-out .3s var(--ease) both; }
.alert .close { margin-inline-start: auto; background: none; border: 0; color: inherit; cursor: pointer; opacity: .7; padding: 0 2px; font: inherit; font-size: 1.1rem; line-height: 1; }
@keyframes toast-in { from { opacity: 0; transform: translateY(-14px) scale(.97); } }
@keyframes toast-out { to { opacity: 0; transform: translateY(-10px) scale(.97); } }
.alert.ok { background: color-mix(in srgb, var(--ok-50) 92%, transparent); border-color: color-mix(in srgb, var(--ok) 25%, transparent); color: var(--ok); }
.alert.err { background: color-mix(in srgb, var(--err-50) 92%, transparent); border-color: color-mix(in srgb, var(--err) 25%, transparent); color: var(--err); }
.alert.info { background: color-mix(in srgb, var(--info-50) 92%, transparent); border-color: color-mix(in srgb, var(--info) 25%, transparent); color: var(--info); }
.alert.warn { background: color-mix(in srgb, var(--warn-50) 92%, transparent); border-color: color-mix(in srgb, var(--warn) 25%, transparent); color: var(--warn); }
.alert b { color: inherit; }

/* ── فهرست و جدول ── */
.list { list-style: none; margin: 0; padding: 0; }
.list > li { padding: 12px 0; border-bottom: 1px solid var(--line); }
.list > li:last-child { border-bottom: 0; }
.item-link { display: block; color: inherit; border-radius: var(--r); margin: -6px -10px; padding: 6px 10px; transition: background .2s; }
.item-link:hover { color: inherit; background: var(--surface-2); }
.kv { display: grid; grid-template-columns: max-content 1fr; gap: 6px 16px; font-size: .92rem; margin: 0; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; font-weight: 600; min-width: 0; overflow-wrap: anywhere; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: .9rem; }
th, td { padding: 10px 8px; border-bottom: 1px solid var(--line); text-align: right; vertical-align: top; }
th { color: var(--muted); font-weight: 700; font-size: .78rem; letter-spacing: .02em; }
tbody tr { transition: background .15s; }
tbody tr:hover { background: var(--surface-2); }
td.num, th.num { text-align: left; direction: ltr; font-variant-numeric: tabular-nums; }
tfoot td { font-weight: 800; }

.stats { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(min(46%, 190px), 1fr)); margin-bottom: 14px; }
.stat { position: relative; overflow: hidden; display: block; color: inherit; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 14px 16px; box-shadow: var(--shadow-sm); }
.stat:hover { color: inherit; }
.stat::before { content: ""; position: absolute; inset: 0 0 auto auto; width: 70px; height: 70px; border-radius: 0 0 0 70px; background: var(--brand-50); opacity: .7; }
.stat .v { position: relative; font-size: clamp(1.02rem, 4.2vw, 1.25rem); font-weight: 900; overflow-wrap: anywhere; font-variant-numeric: tabular-nums; letter-spacing: -.01em; }
.stat .l { position: relative; font-size: .8rem; color: var(--muted); font-weight: 600; }

/* ── مراحل وضعیت ── */
.steps { list-style: none; margin: 0; padding: 0; display: flex; gap: 5px; overflow-x: auto; }
.steps li { flex: 1; min-width: 60px; text-align: center; font-size: .72rem; color: var(--muted); font-weight: 600; }
.steps li::before { content: ""; display: block; height: 7px; border-radius: 4px; background: var(--line); margin-bottom: 7px; transition: background .4s; }
.steps li.done::before { background: linear-gradient(90deg, var(--brand-400), var(--brand)); }
.steps li.now { color: var(--accent-ink); font-weight: 800; }
.steps li.now::before { background: linear-gradient(90deg, #ffc65c, var(--accent)); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 25%, transparent); animation: pulse 2s ease-in-out infinite; }
@keyframes pulse { 50% { box-shadow: 0 0 0 6px color-mix(in srgb, var(--accent) 0%, transparent); } }

/* ── پیشنهادها ── */
.quotes { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 270px), 1fr)); }
.quote { display: flex; flex-direction: column; margin-bottom: 0; }
.quote .price { font-family: var(--font-display); font-weight: 400; font-size: 1.45rem; color: var(--ink); letter-spacing: .01em; }
.quote .who { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; }
.avatar {
  width: 48px; height: 48px; border-radius: 16px; display: grid; place-items: center; flex-shrink: 0;
  font-family: var(--font-display); font-size: 1.35rem; color: #fff;
  background: linear-gradient(140deg, var(--brand-400), var(--brand-600)); box-shadow: var(--glow);
}
.quote form { margin-top: auto; padding-top: 12px; }
.stars { color: var(--accent); letter-spacing: 1px; }

.photos { display: grid; gap: 8px; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); }
.photos img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: var(--r); border: 1px solid var(--line); transition: transform .3s var(--ease); }
.photos a:hover img { transform: scale(1.04); }

.thread { display: flex; flex-direction: column; gap: 8px; margin-bottom: 12px; }
.msg { max-width: 85%; padding: 9px 14px; border-radius: 16px 16px 16px 4px; background: var(--surface-2); border: 1px solid var(--line); font-size: .92rem; animation: rise .3s var(--ease) both; }
.msg.me { align-self: flex-start; background: var(--brand-50); border-color: transparent; border-radius: 16px 16px 4px 16px; }
.msg time { display: block; font-size: .7rem; color: var(--muted); }

.lines td input { min-height: 40px; }
.invoice { border: 1.5px dashed color-mix(in srgb, var(--brand) 35%, var(--line)); }
.invoice .total { font-family: var(--font-display); font-weight: 400; font-size: 1.35rem; color: var(--brand); }
.warranty { position: relative; overflow: hidden; background: linear-gradient(140deg, var(--surface), var(--accent-50)); border-color: color-mix(in srgb, var(--accent) 35%, var(--line)); }
.warranty::after { content: ""; position: absolute; width: 140px; height: 140px; border-radius: 50%; border: 18px solid color-mix(in srgb, var(--accent) 18%, transparent); top: -50px; left: -40px; }
.warranty h2 { display: flex; align-items: center; gap: 8px; color: var(--accent-ink); }

.empty { text-align: center; padding: 34px 12px; color: var(--muted); }
.empty .ico { display: inline-grid; place-items: center; width: 64px; height: 64px; border-radius: 22px; background: var(--brand-50); color: var(--brand); margin-bottom: 10px; }
.empty .ico .ic { width: 30px; height: 30px; }

.rating-input { display: flex; gap: 6px; flex-direction: row-reverse; justify-content: flex-end; }
.rating-input input { position: absolute; opacity: 0; }
.rating-input label { font-size: 1.8rem; color: var(--line); cursor: pointer; margin: 0; font-weight: 400; transition: color .15s, transform .2s var(--ease); }
.rating-input label:hover { transform: scale(1.15); }
.rating-input input:checked ~ label, .rating-input label:hover, .rating-input label:hover ~ label { color: var(--accent); }

/* ── ناوبری پایین شناور (موبایل) ── */
.bottom-nav {
  position: fixed; z-index: 30; bottom: calc(10px + env(safe-area-inset-bottom, 0px)); inset-inline: 12px;
  max-width: 520px; margin: 0 auto;
  display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 4px; padding: 6px;
  background: var(--glass); -webkit-backdrop-filter: saturate(170%) blur(18px); backdrop-filter: saturate(170%) blur(18px);
  border: 1px solid color-mix(in srgb, var(--line) 80%, transparent); border-radius: 22px; box-shadow: var(--shadow-lg);
}
.bottom-nav a { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; min-height: 52px; border-radius: 16px; font-size: .7rem; font-weight: 700; color: var(--muted); transition: color .2s, background .25s var(--ease); }
.bottom-nav a .ic { width: 22px; height: 22px; transition: transform .3s var(--ease); }
.bottom-nav a.active { color: var(--brand-600); background: var(--brand-50); }
.bottom-nav a.active .ic { transform: translateY(-1px) scale(1.08); }
.bottom-nav a .dot { position: absolute; top: 6px; inset-inline-end: calc(50% - 20px); min-width: 16px; height: 16px; border-radius: 8px; background: var(--accent); color: #3b2500; font-size: .62rem; display: grid; place-items: center; padding: 0 4px; box-shadow: 0 0 0 2px var(--surface); }
@media (min-width: 900px) { .bottom-nav { display: none; } main.wrap { padding-bottom: 40px; } }
@media (max-width: 899px) { .topbar nav .desk { display: none; } }

/* ── نوار نصب و به‌روزرسانی PWA ── */
.pwa-bar {
  position: fixed; z-index: 35; inset-inline: 12px; bottom: calc(86px + env(safe-area-inset-bottom, 0px)); max-width: 520px; margin: 0 auto;
  display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 18px;
  background: var(--ink); color: var(--bg); box-shadow: var(--shadow-lg); animation: toast-in .45s var(--ease) both;
}
.pwa-bar[hidden] { display: none; }
.pwa-bar .logo { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: linear-gradient(140deg, var(--brand-400), var(--brand-600)); color: #fff; flex-shrink: 0; }
.pwa-bar p { margin: 0; font-size: .85rem; line-height: 1.6; flex: 1; min-width: 0; }
.pwa-bar p b { display: block; font-size: .92rem; }
.pwa-bar .btn { min-height: 38px; padding: 0 14px; }
.pwa-bar .x { background: none; border: 0; color: inherit; opacity: .6; cursor: pointer; font-size: 1.2rem; padding: 4px; }
@media (min-width: 900px) { .pwa-bar { bottom: 20px; } }

.devnote { background: var(--accent-50); border: 1px dashed color-mix(in srgb, var(--accent) 50%, transparent); color: var(--accent-ink); padding: 10px 12px; border-radius: var(--r); font-size: .84rem; }
footer.site { color: var(--muted); font-size: .8rem; text-align: center; padding: 22px 16px 120px; }
footer.site b { font-family: var(--font-display); font-weight: 400; font-size: 1rem; color: var(--ink-2); }

/* ── صفحهٔ ورود ── */
.auth { max-width: 430px; margin: 18px auto; }
.auth .badge-hero { width: 64px; height: 64px; border-radius: 20px; display: grid; place-items: center; color: #fff; margin-bottom: 12px; background: linear-gradient(140deg, var(--brand-400), var(--brand-600)); box-shadow: var(--glow); }
.auth .badge-hero .ic { width: 30px; height: 30px; }
.otp { font-size: 1.5rem !important; text-align: center !important; letter-spacing: .5em !important; font-weight: 800; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-delay: 0s !important; animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
  @view-transition { navigation: none; }
}

@media print {
  .topbar, .bottom-nav, .no-print, footer.site, .toasts, .pwa-bar { display: none !important; }
  body { background: #fff; color: #000; }
  .card { box-shadow: none; }
}

/* نقطهٔ زندهٔ وضعیت فعال تعمیرکار */
.live-dot { position: relative; width: 10px; height: 10px; border-radius: 50%; background: #5ff0b8; box-shadow: 0 0 0 3px rgb(95 240 184 / .3); }
.live-dot::after { content: ""; position: absolute; inset: -4px; border-radius: 50%; border: 2px solid #5ff0b8; animation: ping 1.8s var(--ease) infinite; }
@keyframes ping { to { transform: scale(1.9); opacity: 0; } }
