/* ===== Tokens ===== */
:root {
  --bg: #f5f6f8;
  --surface: #ffffff;
  --surface-2: #f2f4f7;
  --surface-3: #eaecf0;
  --line: #e4e7ec;
  --line-strong: #d0d5dd;
  --text: #101828;
  --text-2: #475467;
  --text-3: #667085;
  --primary: #16181d;
  --primary-hover: #2b2f38;
  --primary-soft: #eff0f2;
  --brand-accent: #ff5800;
  --brand-accent-soft: #fff0e8;
  --brand-accent-ink: #b03a00;
  --on-accent: #16181d;
  --side-bg: #16181d;
  --side-text: #c9ccd3;
  --side-dim: #8c919c;
  --side-hover: #242830;
  --side-line: #2b2f38;
  --side-strong: #ffffff;
  --logo-plate: #ffffff;
  --on-primary: #ffffff;
  --good: #0f8a5f;
  --good-soft: #e7f6ef;
  --warn: #8a5a00;
  --warn-soft: #fff8e1;
  --bad: #b42318;
  --bad-soft: #fef3f2;
  --dealer: #9c4221;
  --dealer-soft: #fff4ed;
  --star: #f59e0b;
  --scrim: rgba(16, 24, 40, .45);
  --shadow-sm: 0 1px 2px rgba(16, 24, 40, .05);
  --shadow-md: 0 4px 12px rgba(16, 24, 40, .08), 0 1px 3px rgba(16, 24, 40, .06);
  --shadow-lg: 0 20px 40px -8px rgba(16, 24, 40, .18);
  --r-sm: 8px;
  --r-md: 12px;
  --r-lg: 16px;
  --ease: cubic-bezier(.2, .8, .2, 1);
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0c111d;
    --surface: #161b26;
    --surface-2: #1f242f;
    --surface-3: #293040;
    --line: #2a3140;
    --line-strong: #394152;
    --text: #f5f5f6;
    --text-2: #cecfd2;
    --text-3: #94969c;
    --primary: #e6e8ec;
    --primary-hover: #ffffff;
    --primary-soft: #232832;
    --brand-accent: #ff6a1f;
    --brand-accent-soft: #35200f;
    --brand-accent-ink: #ff9a5c;
    --on-accent: #16181d;
    --side-bg: #0a0d14;
    --side-text: #cecfd2;
    --side-dim: #94969c;
    --side-hover: #1a1f2b;
    --side-line: #232832;
    --side-strong: #ffffff;
    --logo-plate: #e6e8ec;
    --on-primary: #0c111d;
    --good: #47cd89;
    --good-soft: #0f2a1d;
    --warn: #f5c542;
    --warn-soft: #2b2410;
    --bad: #f97066;
    --bad-soft: #3a1612;
    --dealer: #f7b27a;
    --dealer-soft: #3a2314;
    --scrim: rgba(0, 0, 0, .6);
    --shadow-sm: none;
    --shadow-md: 0 4px 16px rgba(0, 0, 0, .35);
    --shadow-lg: 0 20px 40px rgba(0, 0, 0, .5);
  }
}

/* ===== Base ===== */
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { background: var(--bg); overflow-x: clip; }
body {
  margin: 0;
  min-height: 100dvh;
  background: var(--bg);
  color: var(--text);
  font: 15px/1.65 Vazirmatn, Tahoma, sans-serif;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; }
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 2px solid var(--brand-accent); outline-offset: 2px; border-radius: 6px; }
.icon { width: 18px; height: 18px; flex: none; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.icon.sm { width: 15px; height: 15px; }
.icon.lg { width: 22px; height: 22px; }
.muted { color: var(--text-3); }
.num { font-feature-settings: "tnum" 1; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }

/* ===== Buttons ===== */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 40px; padding: 0 16px; border-radius: var(--r-sm);
  border: 1px solid var(--line-strong); background: var(--surface); color: var(--text);
  font-weight: 500; text-decoration: none; white-space: nowrap;
  transition: background .15s, border-color .15s, color .15s, transform .1s;
}
.btn:hover { background: var(--surface-2); }
.btn:active { transform: scale(.98); }
.btn.primary { background: var(--primary); border-color: var(--primary); color: var(--on-primary); font-weight: 700; }
.btn.primary:hover { background: var(--primary-hover); border-color: var(--primary-hover); }
.btn.ghost { border-color: transparent; background: transparent; color: var(--text-2); }
.btn.ghost:hover { background: var(--surface-2); color: var(--text); }
.btn.sm { min-height: 34px; padding: 0 12px; font-size: 14px; }
.btn.lg { min-height: 52px; padding: 0 24px; font-size: 16px; border-radius: var(--r-md); }
.btn.icon-only { width: 40px; padding: 0; }
.btn.icon-only.sm { width: 34px; }
.btn:disabled { opacity: .45; cursor: not-allowed; }

/* ===== Top bar ===== */
.topbar { position: sticky; top: 0; z-index: 30; height: 64px; display: flex; align-items: center; gap: 8px; padding: 0 24px; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: saturate(1.4) blur(10px); border-bottom: 1px solid var(--line); }
.topbar-inner { max-width: 1400px; margin: 0 auto; height: 64px; padding: 0 24px; display: flex; align-items: center; gap: 16px; }
.logo { display: flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 700; font-size: 18px; }
.logo img { border-radius: 9px; }
.topbar .run-title { min-width: 0; display: flex; align-items: center; gap: 8px; color: var(--text-2); font-size: 14px; }
.topbar .run-title b { color: var(--text); font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topbar .spacer { flex: 1; }
.account { display: inline-flex; align-items: center; gap: 8px; height: 36px; padding: 0 12px; border-radius: 99px; background: var(--surface-2); color: var(--text-2); font-size: 13.5px; border: 0; }
.account .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--bad); }
.account.on .dot { background: var(--good); }
.popover { position: absolute; top: 56px; inset-inline-end: 16px; z-index: 40; width: 360px; max-height: 70vh; overflow: auto; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); box-shadow: var(--shadow-lg); padding: 8px; }
.popover h3 { margin: 6px 10px 8px; font-size: 13px; color: var(--text-3); font-weight: 500; }

/* ===== Home ===== */
.home { max-width: 880px; margin: 0 auto; padding: 56px 24px 64px; }
.home h1 { font-size: 32px; line-height: 1.35; margin: 0 0 8px; letter-spacing: -.01em; }
.home .lead { color: var(--text-2); margin: 0 0 28px; font-size: 16px; }
.search-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow-md); padding: 20px; }
.search-main { display: flex; gap: 10px; align-items: stretch; }
.search-main .field-big { flex: 1; position: relative; }
.search-main .field-big .icon { position: absolute; inset-inline-start: 16px; top: 50%; transform: translateY(-50%); color: var(--text-3); }
.search-main input { width: 100%; height: 56px; padding-inline: 48px 16px; font-size: 17px; border-radius: var(--r-md); border: 1px solid var(--line-strong); background: var(--surface); }
.search-main input:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 4px var(--primary-soft); }
.search-row { display: grid; grid-template-columns: 1.3fr 1fr 1fr; gap: 12px; margin-top: 14px; }
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field > span { font-size: 13px; color: var(--text-2); font-weight: 500; }
.field input, .field select {
  height: 42px; width: 100%; padding: 0 12px; border-radius: var(--r-sm);
  border: 1px solid var(--line-strong); background: var(--surface);
}
.field input:focus, .field select:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-soft); }
.field .help { font-size: 12.5px; color: var(--text-3); }
.field input[dir=ltr] { font-family: ui-monospace, Consolas, monospace; font-size: 13px; }
.adv { margin-top: 14px; border-top: 1px dashed var(--line); padding-top: 12px; }
.adv summary { cursor: pointer; color: var(--text-2); font-size: 14px; display: inline-flex; align-items: center; gap: 6px; list-style: none; }
.adv summary::-webkit-details-marker { display: none; }
.adv[open] summary .icon { transform: rotate(180deg); }
.adv-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin-top: 12px; }
.adv-grid .wide { grid-column: 1 / -1; }
.check { display: flex; align-items: center; gap: 8px; font-size: 14px; color: var(--text-2); cursor: pointer; }
.check input { width: 18px; height: 18px; accent-color: var(--primary); }
.form-error { color: var(--bad); font-size: 14px; margin: 10px 0 0; min-height: 1em; }
.notice { display: flex; gap: 12px; align-items: center; margin-top: 16px; padding: 12px 14px; border-radius: var(--r-md); background: var(--warn-soft); color: var(--text); border: 1px solid color-mix(in srgb, var(--warn) 30%, transparent); font-size: 14px; }
.notice .icon { color: var(--warn); }
.notice .grow { flex: 1; }
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-top: 28px; }
.step { display: flex; gap: 12px; align-items: flex-start; padding: 14px; border-radius: var(--r-md); background: var(--surface); border: 1px solid var(--line); }
.step .n { flex: none; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: var(--primary-soft); color: var(--primary); font-weight: 700; font-size: 14px; }
.step b { display: block; font-size: 14.5px; }
.step span { font-size: 13px; color: var(--text-3); }
.section-title { font-size: 15px; margin: 36px 0 12px; display: flex; align-items: center; gap: 8px; color: var(--text-2); }
.history { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 10px; }
.history-item { display: flex; gap: 12px; align-items: center; padding: 12px 14px; border-radius: var(--r-md); background: var(--surface); border: 1px solid var(--line); text-decoration: none; transition: border-color .15s, box-shadow .15s; }
.history-item:hover { border-color: var(--line-strong); box-shadow: var(--shadow-sm); }
.history-item .icon { color: var(--text-3); }
.history-item b { display: block; font-size: 14.5px; }
.history-item small { color: var(--text-3); font-size: 12.5px; }
.popover .history-item { border: 0; }
.popover .history-item:hover { background: var(--surface-2); box-shadow: none; }

/* ===== Status strip ===== */
.status { border-bottom: 1px solid var(--line); background: var(--surface); }
.status-inner { max-width: 1400px; margin: 0 auto; padding: 12px 24px; display: flex; align-items: center; gap: 16px; }
.status .state-icon { flex: none; width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: var(--primary-soft); color: var(--primary); }
.status .text { flex: 1; min-width: 0; }
.status .text b { display: block; font-size: 15px; }
.status .text span { display: block; color: var(--text-3); font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.status .meta { color: var(--text-2); font-size: 13.5px; white-space: nowrap; }
.status .actions { display: flex; gap: 8px; }
.status .bar { height: 3px; background: var(--surface-3); }
.status .bar > div { height: 100%; width: 0; background: var(--primary); transition: width .4s var(--ease); }
.status.attn { background: var(--warn-soft); }
.status.attn .state-icon { background: color-mix(in srgb, var(--warn) 18%, transparent); color: var(--warn); }
.status.done .state-icon { background: var(--good-soft); color: var(--good); }
.status.done .bar > div { background: var(--good); }
.status.err .state-icon { background: var(--bad-soft); color: var(--bad); }
.pulse { position: relative; }
.pulse::after { content: ""; position: absolute; inset: 0; border-radius: 50%; border: 2px solid currentColor; opacity: .5; animation: pulse 1.8s var(--ease) infinite; }
@keyframes pulse { from { transform: scale(.9); opacity: .55; } to { transform: scale(1.35); opacity: 0; } }

/* ===== Run layout ===== */
.run { max-width: 1400px; margin: 0 auto; padding: 16px 0 120px; display: grid; grid-template-columns: 280px minmax(0, 1fr); gap: 24px; align-items: start; }
.filters { position: sticky; top: 84px; max-height: calc(100dvh - 100px); overflow: auto; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 6px 16px 16px; }
.filters-head { display: flex; align-items: center; justify-content: space-between; padding: 10px 0; }
.filters-head b { font-size: 15px; display: flex; gap: 8px; align-items: center; }
.fgroup { border-top: 1px solid var(--line); padding: 14px 0; }
.fgroup > .label { font-size: 13px; color: var(--text-2); font-weight: 500; margin-bottom: 8px; display: block; }
.seg { display: grid; grid-template-columns: repeat(3, 1fr); background: var(--surface-2); border-radius: var(--r-sm); padding: 3px; gap: 3px; }
.seg button { border: 0; background: transparent; border-radius: 6px; min-height: 34px; font-size: 13.5px; color: var(--text-2); display: flex; flex-direction: column; align-items: center; justify-content: center; line-height: 1.3; padding: 4px 2px; }
.seg button small { font-size: 11.5px; color: var(--text-3); }
.seg button[aria-pressed="true"] { background: var(--surface); color: var(--text); font-weight: 700; box-shadow: var(--shadow-sm); }
.range { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.range input, .fgroup > input { width: 100%; height: 38px; border: 1px solid var(--line-strong); border-radius: var(--r-sm); padding: 0 10px; background: var(--surface); font-size: 14px; }
.range input:focus, .fgroup > input:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-soft); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip-btn { border: 1px solid var(--line-strong); background: var(--surface); border-radius: 99px; padding: 4px 12px; font-size: 13px; color: var(--text-2); min-height: 32px; display: inline-flex; align-items: center; gap: 6px; }
.chip-btn small { color: var(--text-3); font-size: 11.5px; }
.chip-btn[aria-pressed="true"] { border-color: var(--primary); background: var(--primary-soft); color: var(--primary); font-weight: 500; }
.fgroup .check { margin: 6px 0; }
.active-filters { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.tag { display: inline-flex; align-items: center; gap: 4px; padding: 3px 6px 3px 10px; border-radius: 99px; background: var(--primary-soft); color: var(--primary); font-size: 13px; border: 0; }
.tag .icon { width: 14px; height: 14px; }

/* ===== Results header ===== */
.results-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 14px; }
.results-head h2 { margin: 0; font-size: 22px; }
.results-head .summary { color: var(--text-2); font-size: 14px; margin-top: 2px; }
.results-head .summary b { color: var(--text); }
.toolbar { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.run > main { min-width: 0; }
.toolbar select { height: 40px; border: 1px solid var(--line-strong); border-radius: var(--r-sm); background: var(--surface); padding: 0 10px; }
.toggle { display: flex; border: 1px solid var(--line-strong); border-radius: var(--r-sm); overflow: hidden; }
.toggle button { border: 0; background: var(--surface); width: 40px; height: 38px; display: grid; place-items: center; color: var(--text-3); }
.toggle button[aria-pressed="true"] { background: var(--surface-2); color: var(--text); }

/* ===== Listing rows ===== */
.list { display: flex; flex-direction: column; gap: 12px; }
.more-row { align-self: center; margin: 4px auto 8px; }
.row {
  position: relative; display: grid; grid-template-columns: 208px minmax(0, 1fr) 190px; gap: 16px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 12px;
  cursor: pointer; transition: border-color .15s, box-shadow .2s var(--ease);
  animation: rise .25s var(--ease) both;
}
.row:hover { border-color: var(--line-strong); box-shadow: var(--shadow-md); }
.row.out { opacity: .55; }
@keyframes rise { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.thumb { position: relative; aspect-ratio: 4 / 3; border-radius: var(--r-md); overflow: hidden; background: var(--surface-2); display: grid; place-items: center; color: var(--text-3); }
.thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.thumb .count { position: absolute; bottom: 6px; inset-inline-start: 6px; background: rgba(16, 24, 40, .65); color: #fff; font-size: 11.5px; border-radius: 6px; padding: 0 6px; display: inline-flex; gap: 4px; align-items: center; }
.row-main { min-width: 0; display: flex; flex-direction: column; gap: 6px; padding-top: 2px; }
.row-main h3 { margin: 0; font-size: 16px; line-height: 1.5; }
.where { display: flex; align-items: center; gap: 6px; color: var(--text-3); font-size: 13px; }
.facts { display: flex; flex-wrap: wrap; gap: 6px 14px; color: var(--text-2); font-size: 13.5px; }
.facts span { display: inline-flex; align-items: center; gap: 5px; }
.facts .icon { color: var(--text-3); width: 15px; height: 15px; }
.conds { display: flex; flex-wrap: wrap; gap: 6px; margin-top: auto; }
.cond { display: inline-flex; align-items: center; gap: 5px; font-size: 12.5px; padding: 2px 8px; border-radius: 6px; background: var(--surface-2); color: var(--text-2); }
.cond.good { background: var(--good-soft); color: var(--good); }
.cond.bad { background: var(--bad-soft); color: var(--bad); }
.cond .icon { width: 13px; height: 13px; }
.row-side { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; text-align: end; border-inline-start: 1px solid var(--line); padding-inline-start: 16px; }
.price { font-size: 20px; font-weight: 700; line-height: 1.3; }
.price small { font-size: 12.5px; font-weight: 400; color: var(--text-3); }
.price.none { font-size: 15px; color: var(--text-3); font-weight: 500; }
.delta { display: inline-flex; align-items: center; gap: 4px; font-size: 12.5px; font-weight: 500; padding: 1px 8px; border-radius: 99px; }
.delta.low { background: var(--good-soft); color: var(--good); }
.delta.high { background: var(--bad-soft); color: var(--bad); }
.delta.fair { background: var(--surface-2); color: var(--text-2); }
.seller { display: inline-flex; align-items: center; gap: 5px; font-size: 12.5px; font-weight: 700; padding: 2px 10px; border-radius: 99px; }
.seller .icon { width: 13px; height: 13px; }
.seller.personal { background: var(--good-soft); color: var(--good); }
.seller.dealer { background: var(--dealer-soft); color: var(--dealer); }
.row-actions { display: flex; gap: 4px; margin-top: auto; }
.star[aria-pressed="true"] { color: var(--star); }
.star[aria-pressed="true"] .icon { fill: var(--star); }
.cmp-toggle[aria-pressed="true"] { color: var(--primary); background: var(--primary-soft); }
.errors { margin-top: 18px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); padding: 10px 14px; font-size: 14px; }
.errors summary { cursor: pointer; color: var(--text-2); }
.errors li { margin: 6px 0; color: var(--text-2); }
.errors li a { color: var(--primary); }
.empty { text-align: center; padding: 64px 16px; color: var(--text-3); background: var(--surface); border: 1px dashed var(--line-strong); border-radius: var(--r-lg); }
.empty .icon { width: 36px; height: 36px; margin-bottom: 8px; }
.empty b { display: block; color: var(--text); font-size: 16px; margin-bottom: 4px; }
.skeleton { height: 174px; border-radius: var(--r-lg); background: linear-gradient(90deg, var(--surface) 0, var(--surface-2) 50%, var(--surface) 100%); background-size: 200% 100%; animation: shimmer 1.4s infinite; border: 1px solid var(--line); }
@keyframes shimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }

/* ===== Table ===== */
.table-wrap { overflow: auto; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); }
table { border-collapse: collapse; width: 100%; font-size: 13.5px; }
th, td { padding: 10px 12px; border-bottom: 1px solid var(--line); text-align: start; vertical-align: middle; white-space: nowrap; }
th { position: sticky; top: 0; background: var(--surface-2); color: var(--text-2); font-weight: 500; font-size: 12.5px; }
th button { border: 0; background: none; padding: 0; color: inherit; display: inline-flex; gap: 4px; align-items: center; font-weight: 500; }
tbody tr { cursor: pointer; }
tbody tr:hover { background: var(--surface-2); }
td.t { white-space: normal; min-width: 220px; font-weight: 500; }
td img { width: 56px; height: 42px; object-fit: cover; border-radius: 6px; display: block; }
td.bad { color: var(--bad); }
td.good { color: var(--good); }

/* ===== Drawer ===== */
.scrim { position: fixed; inset: 0; background: var(--scrim); z-index: 50; animation: fade .2s var(--ease); }
@keyframes fade { from { opacity: 0; } }
.drawer { position: fixed; top: 0; bottom: 0; inset-inline-end: 0; width: min(620px, 100vw); background: var(--surface); z-index: 51; display: flex; flex-direction: column; box-shadow: var(--shadow-lg); animation: slide .26s var(--ease); }
@keyframes slide { from { transform: translateX(-24px); opacity: 0; } }
.drawer-head { display: flex; align-items: center; gap: 8px; padding: 12px 16px; border-bottom: 1px solid var(--line); }
.drawer-head .grow { flex: 1; color: var(--text-3); font-size: 13.5px; }
.drawer-body { overflow: auto; padding: 0 0 24px; }
.gallery { position: relative; background: #0c111d; aspect-ratio: 16 / 10; display: grid; place-items: center; color: #98a2b3; }
.gallery img { width: 100%; height: 100%; object-fit: contain; display: block; }
.gallery .nav { position: absolute; top: 50%; transform: translateY(-50%); width: 40px; height: 40px; border-radius: 50%; border: 0; background: rgba(255, 255, 255, .9); color: #101828; display: grid; place-items: center; }
.gallery .nav.prev { inset-inline-start: 12px; }
.gallery .nav.next { inset-inline-end: 12px; }
.gallery .count { position: absolute; bottom: 10px; inset-inline-start: 50%; transform: translateX(50%); background: rgba(0, 0, 0, .6); color: #fff; border-radius: 99px; padding: 0 10px; font-size: 12.5px; }
.thumbs { display: flex; gap: 6px; padding: 8px 16px; overflow-x: auto; }
.thumbs button { flex: none; width: 64px; height: 48px; padding: 0; border: 2px solid transparent; border-radius: 8px; overflow: hidden; background: var(--surface-2); }
.thumbs button[aria-current="true"] { border-color: var(--primary); }
.thumbs img { width: 100%; height: 100%; object-fit: cover; display: block; }
.d-section { padding: 16px 20px 0; }
.d-title { font-size: 20px; margin: 0; line-height: 1.5; }
.d-price { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 10px; }
.d-price .price { font-size: 26px; }
.why { margin-top: 10px; font-size: 13.5px; color: var(--text-2); background: var(--surface-2); border-radius: var(--r-sm); padding: 8px 12px; }
.specs { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--r-md); overflow: hidden; margin-top: 4px; }
.spec { background: var(--surface); padding: 10px 14px; }
.spec .k { font-size: 12.5px; color: var(--text-3); }
.spec .v { font-weight: 500; }
.spec .v.good { color: var(--good); }
.spec .v.bad { color: var(--bad); }
.d-h { font-size: 14px; color: var(--text-2); margin: 20px 0 8px; }
.desc { white-space: pre-line; font-size: 14.5px; line-height: 1.9; }
.drawer-foot { display: flex; gap: 8px; padding: 12px 16px; border-top: 1px solid var(--line); }
.drawer-foot .btn.primary { flex: 1; }

/* ===== Compare ===== */
.tray { position: fixed; bottom: 20px; inset-inline-start: 50%; transform: translateX(50%); z-index: 40; display: flex; align-items: center; gap: 12px; padding: 10px 10px 10px 16px; background: var(--text); color: var(--bg); border-radius: 99px; box-shadow: var(--shadow-lg); animation: rise .25s var(--ease); }
.tray .btn { min-height: 36px; border-radius: 99px; }
.tray .btn.ghost { color: var(--bg); opacity: .8; }
.tray .btn.ghost:hover { background: transparent; opacity: 1; }
.modal { position: fixed; inset: 40px; z-index: 51; background: var(--surface); border-radius: var(--r-lg); display: flex; flex-direction: column; box-shadow: var(--shadow-lg); animation: fade .2s var(--ease); max-width: 1200px; margin: 0 auto; }
.modal-head { display: flex; align-items: center; padding: 14px 18px; border-bottom: 1px solid var(--line); }
.modal-head h2 { margin: 0; font-size: 18px; flex: 1; }
.modal-body { overflow: auto; }
.compare th, .compare td { white-space: normal; min-width: 180px; vertical-align: top; }
.compare th:first-child, .compare td:first-child { min-width: 120px; color: var(--text-3); font-weight: 500; position: sticky; inset-inline-start: 0; background: var(--surface); }
.compare thead th { background: var(--surface); }
.compare img { width: 100%; height: 120px; border-radius: 8px; object-fit: cover; }
.best { color: var(--good); font-weight: 700; }

.new-pill { display: inline-flex; align-items: center; font-size: 12px; font-weight: 700; color: var(--on-primary); background: var(--primary); border-radius: 6px; padding: 0 7px; margin-inline-end: 8px; vertical-align: 2px; line-height: 1.7; }

/* Mobile filters sheet controls (hidden on desktop) */
.filters-toggle, .filters-done { display: none; }
.tray { white-space: nowrap; }

/* ===== Responsive ===== */
@media (max-width: 1100px) {
  .row { grid-template-columns: 170px minmax(0, 1fr); }
  .row-side { grid-column: 1 / -1; flex-direction: row; align-items: center; flex-wrap: wrap; border-inline-start: 0; border-top: 1px solid var(--line); padding: 10px 0 0; }
  .row-actions { margin: 0 auto 0 0; margin-inline-start: auto; }
}
@media (max-width: 900px) {
  .run { grid-template-columns: 1fr; }
  .filters { display: none; position: fixed; inset: 64px 0 0 0; z-index: 45; max-height: none; border-radius: 0; border: 0; padding-bottom: 90px; }
  .filters.open { display: block; animation: fade .2s var(--ease); }
  .filters-toggle { display: inline-flex; }
  .filters-done { display: flex; position: fixed; bottom: 16px; inset-inline: 16px; z-index: 46; min-height: 48px; }
  .topbar .run-title { display: none; }
  .search-row, .adv-grid, .steps { grid-template-columns: 1fr; }
  .status-inner { flex-wrap: wrap; }
  .modal { inset: 0; border-radius: 0; }
}
@media (max-width: 560px) {
  .topbar-inner, .run, .status-inner, .home { padding-inline: 16px; }
  .home h1 { font-size: 26px; }
  .search-main { flex-direction: column; }
  .row { grid-template-columns: 1fr; }

  #newSearch { width: 40px; padding: 0; font-size: 0; gap: 0; }
  .results-head { align-items: stretch; }
  .toolbar { width: 100%; }
  .toolbar select { flex: 1; min-width: 0; }
  .status .actions { width: 100%; }
  .status .actions .btn { flex: 1; }
  .tray { inset-inline: 12px; transform: none; justify-content: space-between; bottom: 12px; }
  .toggle { display: none; }
  .row { grid-template-columns: 112px minmax(0, 1fr); gap: 12px; padding: 10px; }
  .row-main h3 { font-size: 15px; }
  .conds { gap: 4px; margin-top: 4px; }
  .cond { font-size: 11.5px; padding: 1px 6px; }
  .facts { font-size: 13px; gap: 4px 10px; }
  .row-side { gap: 8px; }
  .price { font-size: 18px; }
}

/* =========================================================
   Noja-style shell: side menu, top bar, mobile bottom bar
   ========================================================= */
.shell { display: grid; grid-template-columns: 248px minmax(0, 1fr); min-height: 100dvh; }
.side { position: sticky; top: 0; height: 100dvh; display: flex; flex-direction: column; background: var(--side-bg); color: var(--side-text); border-inline-end: 1px solid var(--side-line); padding: 16px 12px; z-index: 35; }
.side .btn.ghost { color: var(--side-text); }
.side .btn.ghost:hover { background: var(--side-hover); }
.side-close { display: none; }
.side-brand { display: flex; align-items: center; gap: 10px; padding: 4px 6px 14px; text-decoration: none; color: var(--side-strong); }
.brand-logo { flex: none; display: grid; place-items: center; width: 64px; height: 38px; padding: 3px 5px; border-radius: var(--r-sm); background: var(--logo-plate); }
.brand-logo img { max-width: 100%; max-height: 100%; object-fit: contain; }
.brand-name { display: flex; flex-direction: column; line-height: 1.3; min-width: 0; }
.brand-name b { font-size: 17px; font-weight: 800; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.brand-name small { font-size: 12px; color: var(--side-dim); }
.nav { display: flex; flex-direction: column; gap: 2px; flex: 1; overflow: auto; }
.nav-sec { font-size: 12px; color: var(--side-dim); padding: 14px 10px 6px; }
.nav a { display: flex; align-items: center; gap: 10px; min-height: 42px; padding: 0 10px; border-radius: var(--r-sm); text-decoration: none; color: var(--side-text); font-weight: 500; transition: background .15s, color .15s; }
.nav a:hover { background: var(--side-hover); color: var(--side-strong); }
.nav a[aria-current="page"] { background: var(--brand-accent); color: var(--on-accent); font-weight: 700; }
.nav a[aria-current="page"] .icon { color: var(--on-accent); }
.nav a .icon { color: var(--side-dim); }
.nav-group { display: flex; flex-direction: column; gap: 2px; }
.nav-group-h { display: flex; align-items: center; gap: 10px; min-height: 40px; padding: 0 10px; margin-top: 8px; border: 0; border-radius: var(--r-sm); background: none; color: var(--side-dim); font-size: 12px; font-weight: 600; cursor: pointer; text-align: start; }
.nav-group-h:hover { background: var(--side-hover); }
.nav-group-h span { flex: 1; }
.nav-group-h .chev { transition: transform .2s var(--ease); }
.nav-group.closed .nav-group-h .chev { transform: rotate(90deg); }
.nav-group.closed .nav-submenu { display: none; }
.nav-submenu { display: flex; flex-direction: column; gap: 2px; }
.nav-badge { margin-inline-start: auto; min-width: 22px; height: 20px; padding: 0 6px; border-radius: 99px; background: var(--brand-accent); color: var(--on-accent); font-size: 12px; font-weight: 700; display: inline-grid; place-items: center; }
.nav-badge + .nav-badge { margin-inline-start: 4px; }
.nav-badge.red { background: var(--bad); color: #fff; }
.nav-badge.soft { background: var(--brand-accent-soft); color: var(--brand-accent-ink); }
.nav a[aria-current="page"] .nav-badge { background: var(--on-accent); color: var(--side-strong); }
.live-dot { margin-inline-start: auto; width: 9px; height: 9px; border-radius: 50%; background: var(--brand-accent); box-shadow: 0 0 0 4px var(--side-hover); }
.side-foot { display: flex; flex-direction: column; gap: 6px; padding: 12px 6px 0; border-top: 1px solid var(--side-line); }
.side-foot .account { justify-content: flex-start; color: var(--side-text); background: var(--side-hover); }
.side-foot small { padding: 0 6px; font-size: 12px; color: var(--side-dim); }
.side-foot small:empty { display: none; }
/* Online panel: grey dot while the PC is off (not an error), green when the bot is connected. */
.account.host .dot { background: var(--text-3); }
.account.host.on .dot { background: var(--good); box-shadow: 0 0 0 4px var(--good-soft); }
.bot-chip { display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 10px; border-radius: 99px; background: var(--surface-2); color: var(--text-2); font-size: 12.5px; text-decoration: none; white-space: nowrap; }
.bot-chip[hidden] { display: none; }
.bot-chip .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--text-3); }
.bot-chip.on { background: var(--good-soft); color: var(--good); }
.bot-chip.on .dot { background: var(--good); }
/* Car picker: brand → model → year, with a search box (ads and special-offer pages) */
.car-picker { padding: 12px; margin: 6px 0 10px; display: flex; flex-direction: column; gap: 10px; }
.cp-search { position: relative; }
.cp-search > .icon { position: absolute; inset-inline-start: 12px; top: 12px; color: var(--text-3); pointer-events: none; }
.cp-input { width: 100%; height: 42px; border: 1px solid var(--line-strong); border-radius: var(--r-sm); padding-inline: 36px 12px; font: inherit; font-size: 15px; background: var(--surface); color: var(--text); }
.cp-input:focus { outline: 3px solid var(--primary-soft); border-color: var(--primary); }
.cp-sugg { position: absolute; inset-inline: 0; top: 46px; z-index: 30; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-sm); box-shadow: var(--shadow-md); overflow: hidden; }
.cp-sugg button { display: flex; width: 100%; align-items: center; gap: 8px; border: 0; background: none; padding: 10px 12px; font: inherit; color: var(--text); text-align: start; cursor: pointer; }
.cp-sugg button:hover, .cp-sugg button.on { background: var(--primary-soft); }
.cp-sugg small { color: var(--text-3); margin-inline-start: auto; white-space: nowrap; }
.cp-kind { font-size: 11px; color: var(--text-3); background: var(--surface-2); border-radius: 5px; padding: 1px 6px; }
.cp-none { padding: 10px 12px; color: var(--text-3); }
.cp-crumbs { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; font-size: 14px; }
.cp-crumbs button { border: 0; background: none; color: var(--primary); font: inherit; cursor: pointer; padding: 2px 0; }
.cp-crumbs span { color: var(--text-3); }
.cp-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 8px; }
.cp-tile { display: flex; flex-direction: column; gap: 2px; align-items: flex-start; padding: 9px 12px; border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--surface); color: var(--text); font: inherit; text-align: start; cursor: pointer; min-height: 58px; }
.cp-tile:hover { border-color: var(--primary); }
.cp-tile b { font-size: 14.5px; }
.cp-tile small { color: var(--text-3); font-size: 12.5px; }
.cp-tile[aria-pressed="true"] { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-soft); }
.cp-tstat { font-size: 11.5px; color: var(--text-3); line-height: 1.6; white-space: nowrap; }
.cp-trims { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
.cp-more { align-self: flex-start; border: 0; background: none; color: var(--primary); font: inherit; cursor: pointer; padding: 2px 0; }
.car-picker .quick { margin: 0; }
.cp-yearbox { display: flex; gap: 8px; align-items: stretch; }
.cp-yall { flex: 0 0 auto; min-width: 58px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; border: 1px solid var(--line-strong); border-radius: var(--r-sm); background: var(--surface); color: var(--text); font: inherit; font-weight: 700; cursor: pointer; }
.cp-yall small { font-size: 11.5px; font-weight: 400; opacity: .75; }
.cp-yall[aria-pressed="true"] { background: var(--primary); border-color: var(--primary); color: var(--on-primary); }
.cp-years { flex: 1; display: flex; gap: 4px; overflow-x: auto; padding-bottom: 6px; scrollbar-width: thin; }
.cp-year { flex: 0 0 42px; display: flex; flex-direction: column; align-items: center; gap: 3px; border: 0; background: none; padding: 0; font: inherit; color: var(--text-2); cursor: pointer; }
.cp-yn { font-size: 11px; color: var(--text-3); }
.cp-ycol { width: 100%; height: 56px; display: flex; align-items: flex-end; border-radius: 6px; background: var(--surface-2); overflow: hidden; }
.cp-yfill { width: 100%; border-radius: 6px; background: #c9d1e6; transition: background .15s; }
.cp-yy { font-size: 11.5px; }
.cp-year:hover .cp-yfill { background: #a9b5d4; }
.cp-year[aria-pressed="true"] .cp-yfill { background: var(--primary); }
.cp-year[aria-pressed="true"] .cp-yy { color: var(--primary); font-weight: 700; }
.cp-year:focus-visible, .cp-yall:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; border-radius: 6px; }
.cp-extra { display: flex; justify-content: flex-end; }
@media (prefers-color-scheme: dark) { .cp-yfill { background: #3a4466; } .cp-year:hover .cp-yfill { background: #4b5784; } }
@media (max-width: 560px) {
  .cp-grid { grid-template-columns: repeat(2, 1fr); }
  /* trims: one row you slide sideways, like the years */
  .cp-trims { display: flex; overflow-x: auto; padding-bottom: 6px; scrollbar-width: thin; }
  .cp-trims .cp-tile { flex: 0 0 150px; }
}
/* Car model cards */
.models-wrap:empty { display: none; }
.models { display: flex; gap: 10px; overflow-x: auto; padding: 2px 2px 10px; margin: 4px 0 6px; scroll-snap-type: x proximity; scrollbar-width: thin; }
.model-card { flex: 0 0 156px; scroll-snap-align: start; display: flex; flex-direction: column; align-items: stretch; gap: 4px; padding: 10px; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--surface); color: var(--text); text-align: center; cursor: pointer; font: inherit; transition: border-color .15s var(--ease), box-shadow .15s var(--ease); }
.model-card:hover { border-color: var(--line-strong); }
.model-card[aria-pressed="true"] { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-soft); }
.mc-img { height: 84px; border-radius: var(--r-sm); background: var(--surface-2); display: grid; place-items: center; overflow: hidden; color: var(--text-3); margin-bottom: 4px; }
.mc-img img { width: 100%; height: 100%; object-fit: cover; }
.mc-img.mosaic { display: grid; gap: 2px; place-items: stretch; }
.mc-img.mosaic.n2 { grid-template-columns: 1fr 1fr; }
.mc-img.mosaic.n4 { grid-template-columns: 1fr 1fr; grid-template-rows: 1fr 1fr; }
.mc-img.mosaic img { min-height: 0; }
.model-card b { font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mc-count { font-size: 12.5px; color: var(--primary); font-weight: 700; }
.model-card dl { margin: 2px 0 0; display: grid; grid-template-columns: auto auto; justify-content: space-between; gap: 2px 6px; font-size: 12px; }
.model-card dt { color: var(--text-3); text-align: start; }
.model-card dd { margin: 0; font-weight: 700; text-align: end; }
.quick.trims { margin-top: 0; }
.where { flex-wrap: wrap; row-gap: 2px; }
.where .pub { color: var(--text-3); }
.where > span { display: inline-flex; align-items: center; gap: 4px; }
.where > span + span::before { content: '·'; margin-inline-end: 4px; color: var(--line-strong); }
@media (max-width: 560px) { .model-card { flex-basis: 138px; } .mc-img { height: 70px; } }
/* «قیمت‌یاب» */
.guide-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 12px; margin-top: 12px; }
.card.guide { padding: 14px 16px; display: flex; flex-direction: column; gap: 8px; margin: 0; }
.card.guide.thin { opacity: .7; }
.guide-h { display: flex; align-items: baseline; gap: 8px; }
.guide-h b { font-size: 16px; }
.guide-h small { color: var(--text-3); }
.guide-h .chip-status { margin-inline-start: auto; }
.g-row { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; padding: 6px 0; border-top: 1px solid var(--line); font-size: 14px; color: var(--text-2); }
.g-row b { color: var(--text); font-size: 15.5px; }
.g-row b small { color: var(--text-3); font-weight: 500; font-size: 12.5px; }
.g-row.buy b { color: var(--good); }
.g-foot { display: flex; justify-content: space-between; align-items: center; font-size: 12.5px; color: var(--text-3); padding-top: 4px; }
.g-foot a { display: inline-flex; align-items: center; gap: 2px; color: var(--primary); text-decoration: none; font-weight: 600; }
.card.my-car { margin-top: 12px; }
.my-form { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.my-form label[hidden] { display: none; }
.my-result { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px 28px; margin-top: 14px; }
.my-result .muted { margin: 0; flex-basis: 100%; font-size: 12.5px; }
.my-big { display: flex; flex-direction: column; gap: 2px; }
.my-big small { color: var(--text-3); font-size: 12.5px; }
.my-big .num { font-size: 22px; font-weight: 800; color: var(--primary); }
.my-big + .my-big .num { font-size: 18px; color: var(--text); }
.d-guide { margin-top: 8px; font-size: 13px; color: var(--text-2); display: flex; flex-wrap: wrap; gap: 4px 10px; }
.d-guide b { color: var(--text); }
.d-guide a { color: var(--primary); text-decoration: none; }
@media (max-width: 760px) { .my-form { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.chip-status { margin-inline-start: auto; font-size: 12.5px; color: var(--text-3); background: var(--surface-2); border-radius: 99px; padding: 4px 10px; }
.chip-status.on { color: var(--good); background: var(--good-soft); }
.side-foot .logout { justify-content: flex-start; color: var(--side-dim); }

/* Online panel: sign-in */
body.signed-out .shell, body.signed-out .bottom-nav { display: none; }
.login-screen { min-height: 100vh; min-height: 100dvh; display: grid; place-items: center; padding: 24px 16px; background: var(--surface); }
.login-card { width: 100%; max-width: 340px; display: flex; flex-direction: column; gap: 16px; }
.login-card img { align-self: center; border-radius: 12px; }
.login-card h1 { margin: 0 0 8px; text-align: center; font-size: 24px; color: var(--primary); }
.login-card .form-error { margin: 0; text-align: center; }
.login-card .form-error:empty { display: none; }
.side-scrim { position: fixed; inset: 0; background: var(--scrim); z-index: 34; }
.main { min-width: 0; position: relative; }
.page-title { margin: 0; font-size: 18px; }
.menu-btn { display: none; }
.bell { position: relative; }
.bell-count { position: absolute; top: 2px; inset-inline-end: 2px; min-width: 18px; height: 18px; border-radius: 99px; background: var(--bad); color: #fff; font-size: 11px; font-weight: 700; display: grid; place-items: center; padding: 0 4px; }
.alert-item { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border-radius: var(--r-sm); text-decoration: none; }
.alert-item:hover { background: var(--surface-2); }
.alert-item .icon { margin-top: 3px; color: var(--text-3); }
.alert-item.k-call .icon, .alert-item.k-sold .icon { color: var(--bad); }
.alert-item.k-drop .icon { color: var(--good); }
.alert-item b { display: block; font-size: 14px; font-weight: 500; }
.alert-item small { color: var(--text-3); font-size: 12.5px; }
.bottom-nav { display: none; }

/* ---------- pages ---------- */
.page { max-width: 1240px; margin: 0 auto; padding: 24px 24px 64px; }
.page.wide { max-width: 1400px; padding-bottom: 0; }
.page.narrow { max-width: 880px; padding-top: 40px; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 18px; }
.page-head h1 { margin: 0; font-size: 24px; }
.page-head p { margin: 0; font-size: 14.5px; }
.page-head:has(> div:empty):not(:has(.page-actions)) { display: none; }
.page-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.hero-title { font-size: 30px; line-height: 1.35; margin: 0 0 8px; }
.lead { color: var(--text-2); margin: 0 0 24px; font-size: 16px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 16px 18px; box-shadow: var(--shadow-sm); }
.card + .card { margin-top: 16px; }
.card-h { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.card-h h2 { margin: 0; font-size: 15.5px; display: flex; align-items: center; gap: 8px; }
.card-h h2 .icon { color: var(--text-3); }
.card-h .link { font-size: 13.5px; color: var(--primary); text-decoration: none; }
.count-pill { font-size: 12px; background: var(--surface-2); color: var(--text-2); border-radius: 99px; padding: 0 8px; font-weight: 500; }
.empty-line { margin: 10px 0; font-size: 14px; }
.empty.big { padding: 56px 24px; }
.empty.big p { max-width: 460px; margin: 6px auto 18px; }
.icon.xl { width: 44px; height: 44px; }
.notice.soft { background: var(--surface); border-color: var(--line); margin: 0 0 16px; }
.notice.soft .icon { color: var(--brand-accent-ink); }
code { font-family: ui-monospace, Consolas, monospace; font-size: 13px; background: var(--surface-2); padding: 1px 6px; border-radius: 5px; }

/* bot card */
.bot-card { display: flex; align-items: center; gap: 14px; margin-bottom: 16px; }
.bot-card .grow { flex: 1; min-width: 0; }
.bot-card b { display: block; font-size: 15.5px; }
.bot-card .muted { font-size: 13.5px; }
.state-icon { flex: none; width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; background: var(--primary-soft); color: var(--primary); }
.bot-card.busy .state-icon { background: var(--brand-accent-soft); color: var(--brand-accent-ink); }

/* KPI cards */
.kpis { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; margin-bottom: 16px; }
.kpi { display: flex; flex-direction: column; gap: 2px; padding: 14px 16px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); text-decoration: none; box-shadow: var(--shadow-sm); transition: border-color .15s, box-shadow .2s var(--ease), transform .15s; position: relative; overflow: hidden; }
.kpi::before { content: ""; position: absolute; inset-block: 0; inset-inline-start: 0; width: 4px; background: var(--line-strong); }
.kpi:hover { border-color: var(--line-strong); box-shadow: var(--shadow-md); transform: translateY(-1px); }
.kpi-top { display: flex; justify-content: space-between; align-items: center; color: var(--text-2); font-size: 13.5px; }
.kpi-top .icon { color: var(--text-3); }
.kpi-v { font-size: 28px; font-weight: 700; line-height: 1.3; }
.kpi-s { font-size: 12.5px; color: var(--text-3); }
.kpi.blue::before { background: var(--primary); }
.kpi.green::before { background: var(--good); }
.kpi.green .kpi-v { color: var(--good); }
.kpi.red::before { background: var(--bad); }
.kpi.red .kpi-s { color: var(--bad); font-weight: 500; }
.daily-card .muted a { color: var(--good); font-weight: 600; }
.daily-opts { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 16px; margin-top: 8px; font-size: 13px; }
.daily-opts select { font: inherit; padding: 3px 6px; border-radius: 8px; border: 1px solid var(--border); background: var(--surface); color: var(--text); }
.daily-opts select:disabled { opacity: .5; }
.daily-card.done .state-icon { background: var(--good-soft); color: var(--good); }
.cap-rows { display: grid; gap: 10px; }
.cap-row { display: grid; grid-template-columns: 120px 110px 1fr; align-items: center; gap: 10px; }
.cap-row .src-tag { justify-self: start; }
.cap-row input { width: 100%; box-sizing: border-box; padding: 6px 10px; border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--surface); color: var(--text); font: inherit; }
.cap-row small.full { color: var(--bad); font-weight: 600; }
@media (max-width: 560px) { .cap-row { grid-template-columns: 1fr 96px; } .cap-row small { grid-column: 1 / -1; margin-top: -6px; } }
.today-by { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; font-size: 13px; color: var(--text-2); margin: -6px 2px 14px; text-decoration: none; }
.today-by.full { color: var(--bad); }
.dash-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.dash-grid .card + .card { margin-top: 0; }

/* item lists (calls, visits, runs…) */
.items { list-style: none; margin: 0; padding: 0; }
.item { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-top: 1px solid var(--line); }
.item:first-child { border-top: 0; }
.item.due { background: linear-gradient(to left, var(--bad-soft), transparent 60%); margin: 0 -18px; padding-inline: 18px; }
.item-main { flex: 1; min-width: 0; text-decoration: none; display: flex; flex-direction: column; }
a.item-main:hover b { text-decoration: underline; }
.item-main b { font-size: 14.5px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.item-main small { color: var(--text-3); font-size: 12.5px; }
.item-actions { display: flex; gap: 6px; align-items: center; flex: none; }
.bad { color: var(--bad); }

/* funnel */
.funnel { display: flex; flex-direction: column; gap: 6px; margin-top: 4px; }
.f-row { display: grid; grid-template-columns: 120px 1fr 36px; align-items: center; gap: 10px; text-decoration: none; font-size: 13.5px; }
.f-row:hover .f-label { color: var(--text); }
.f-label { color: var(--text-2); }
.f-bar { height: 10px; border-radius: 99px; background: var(--surface-2); overflow: hidden; }
.f-fill { display: block; height: 100%; border-radius: 99px; background: var(--primary); transition: width .4s var(--ease); }
.f-fill.s-bought { background: var(--good); }
.f-n { text-align: end; font-weight: 700; }
.reasons { margin-top: 12px; display: flex; flex-wrap: wrap; gap: 6px; font-size: 13px; align-items: center; }
.reason { background: var(--surface-2); border-radius: 6px; padding: 1px 8px; color: var(--text-2); }

/* stage chips */
.stage { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 700; padding: 1px 8px; border-radius: 6px; background: var(--surface-2); color: var(--text-2); white-space: nowrap; }
.stage.s-shortlist { background: #fff6db; color: #8a5a00; }
.stage.s-calling, .stage.s-waiting { background: var(--primary-soft); color: var(--primary); }
.stage.s-talking { background: #efe9ff; color: #5b3cc4; }
.stage.s-visit, .stage.s-visited { background: #e6f4ff; color: #0b5c99; }
.stage.s-bought { background: var(--good-soft); color: var(--good); }
.stage.s-rejected { background: var(--bad-soft); color: var(--bad); }
@media (prefers-color-scheme: dark) {
  .stage.s-shortlist { background: #3a2e10; color: #fcd34d; }
  .stage.s-talking { background: #2a2050; color: #c4b5fd; }
  .stage.s-visit, .stage.s-visited { background: #0e2a40; color: #93c5fd; }
}

/* stage tabs on ads page */
.stage-tabs { display: flex; gap: 4px; overflow-x: auto; padding: 4px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); margin-bottom: 10px; scrollbar-width: thin; }
.stage-tabs button { flex: none; border: 0; background: transparent; border-radius: var(--r-sm); min-height: 38px; padding: 0 12px; color: var(--text-2); display: inline-flex; align-items: center; gap: 6px; font-size: 14px; }
.stage-tabs button small { font-size: 12px; color: var(--text-3); background: var(--surface-2); border-radius: 99px; padding: 0 7px; }
.stage-tabs button[aria-selected="true"] { background: var(--primary); color: var(--on-primary); font-weight: 700; }
.stage-tabs button[aria-selected="true"] small { background: rgba(255, 255, 255, .2); color: inherit; }
.quick { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 4px; }
.search-sel { height: 40px; border: 1px solid var(--line-strong); border-radius: var(--r-sm); background: var(--surface); padding: 0 10px; max-width: 280px; }
.results-col { min-width: 0; }

/* rows: follow-up hints */
.row-top { display: flex; gap: 6px; align-items: center; min-height: 0; }
.row-top:empty { display: none; }
.row.due { border-color: color-mix(in srgb, var(--bad) 45%, var(--line)); }
.row.sold { opacity: .6; }
.row.sold h3 { text-decoration: line-through; text-decoration-color: var(--text-3); }
.cond.warn { background: var(--warn-soft); color: var(--warn); }
.cond.info { background: var(--primary-soft); color: var(--primary); }
tr.sold { opacity: .55; }

/* drawer follow-up */
.crm { display: flex; flex-direction: column; gap: 12px; background: var(--surface-2); border-radius: var(--r-md); padding: 14px; }
.crm-row { display: flex; gap: 8px; align-items: center; }
.crm-row.wrap { flex-wrap: wrap; }
.crm-row > input, .crm-row > select { flex: 1; min-width: 0; height: 40px; border: 1px solid var(--line-strong); border-radius: var(--r-sm); background: var(--surface); padding: 0 10px; }
.crm .field select { height: 40px; border: 1px solid var(--line-strong); border-radius: var(--r-sm); background: var(--surface); padding: 0 10px; }
.crm .grow { flex: 1; min-width: 0; }
.crm-block { display: flex; flex-direction: column; gap: 8px; padding-top: 12px; border-top: 1px solid var(--line); }
.crm-h { font-size: 13px; font-weight: 700; color: var(--text-2); display: flex; align-items: center; gap: 6px; }
.crm-sub { font-size: 13.5px; color: var(--text-2); }
.crm textarea, .dialog textarea { width: 100%; border: 1px solid var(--line-strong); border-radius: var(--r-sm); background: var(--surface); padding: 8px 10px; font: inherit; resize: vertical; }
.crm-alert { display: flex; gap: 8px; align-items: center; font-size: 13.5px; color: var(--bad); background: var(--bad-soft); border-radius: var(--r-sm); padding: 8px 10px; }
.crm-rejected { display: flex; gap: 10px; align-items: center; background: var(--bad-soft); color: var(--bad); border-radius: var(--r-sm); padding: 10px 12px; }
.crm-rejected .grow { color: var(--text); font-size: 14px; }
.btn.good { background: var(--good); border-color: var(--good); color: #fff; }
.btn.good:hover { filter: brightness(1.05); background: var(--good); }
.btn.danger { background: var(--bad); border-color: var(--bad); color: #fff; }
.btn.danger-ghost { border-color: transparent; background: transparent; color: var(--bad); }
.btn.danger-ghost:hover { background: var(--bad-soft); }
.timeline { list-style: none; margin: 4px 0 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.timeline li { display: grid; grid-template-columns: 12px 1fr; gap: 8px; }
.tl-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--line-strong); margin-top: 8px; }
.tl-note .tl-dot { background: var(--primary); }
.tl-call .tl-dot { background: var(--warn); }
.tl-stage .tl-dot { background: var(--good); }
.tl-text { font-size: 14px; white-space: pre-line; }
.tl-event .tl-text, .tl-stage .tl-text { color: var(--text-2); font-size: 13px; }
.timeline small { color: var(--text-3); font-size: 12px; }

/* dialog + toast */
.scrim.top { z-index: 60; }
.dialog { position: fixed; z-index: 61; top: 50%; inset-inline-start: 50%; transform: translate(50%, -50%); width: min(460px, calc(100vw - 32px)); background: var(--surface); border-radius: var(--r-lg); box-shadow: var(--shadow-lg); padding: 18px; display: flex; flex-direction: column; gap: 12px; animation: fade .2s var(--ease); }
.dialog h3 { margin: 0; font-size: 17px; }
.dialog .chips { margin-bottom: 10px; }
.dialog-actions { display: flex; justify-content: flex-end; gap: 8px; }
#toasts { position: fixed; bottom: 24px; inset-inline-start: 24px; z-index: 80; display: flex; flex-direction: column; gap: 8px; }
.toast { display: flex; align-items: center; gap: 8px; background: var(--text); color: var(--bg); padding: 10px 14px; border-radius: var(--r-md); box-shadow: var(--shadow-lg); font-size: 14px; animation: rise .2s var(--ease); max-width: 380px; }
.toast.err { background: var(--bad); color: #fff; }
.toast.out { opacity: 0; transform: translateY(6px); transition: opacity .25s, transform .25s; }

/* ---------- responsive shell ---------- */
@media (max-width: 1200px) {
  .kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
  .shell { grid-template-columns: 1fr; }
  .side { position: fixed; inset-block: 0; inset-inline-start: 0; width: 280px; height: 100dvh; transform: translateX(100%); transition: transform .25s var(--ease); box-shadow: var(--shadow-lg); }
  .side:not(.open) { visibility: hidden; }
  .side.open { transform: none; visibility: visible; }
  .side-close { display: inline-flex; position: absolute; inset-block-start: 12px; inset-inline-end: 8px; }
  .menu-btn { display: inline-flex; }
  .topbar { padding: 0 12px; }
  .dash-grid { grid-template-columns: minmax(0, 1fr); }
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .bottom-nav { display: grid; grid-template-columns: repeat(4, 1fr); position: fixed; inset-inline: 0; bottom: 0; z-index: 33; background: var(--surface); border-top: 1px solid var(--line); padding-bottom: env(safe-area-inset-bottom); }
  .bottom-nav a, .bottom-nav button { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; min-height: 58px; border: 0; background: none; text-decoration: none; font-size: 12px; color: var(--text-3); }
  .bottom-nav [aria-current="page"] { color: var(--brand-accent-ink); font-weight: 700; }
  .bottom-nav .nav-badge { position: absolute; top: 4px; inset-inline-start: calc(50% + 4px); margin: 0; }
  .main { padding-bottom: 64px; }
  .page { padding: 16px 16px 48px; }
  .run { padding-inline: 0; }
  .tray { bottom: 76px; }
  #toasts { bottom: 80px; inset-inline: 16px; }
  .filters { inset: 0; padding-top: 16px; z-index: 50; }
  .filters-done { bottom: 76px; }
}
@media (max-width: 560px) {
  .kpi-v { font-size: 24px; }
  .page-head h1 { font-size: 20px; }
  .page.narrow { padding-top: 20px; }
  .bot-card { flex-wrap: wrap; }
  .bot-card .btn { width: 100%; }
  .f-row { grid-template-columns: 96px 1fr 30px; }
}

/* ---------- settings ---------- */
.page.narrow-ish { max-width: 920px; }
.seg.chan { grid-template-columns: repeat(4, 1fr); margin: 6px 0 16px; }
.seg.chan button { min-height: 52px; }
.setup-steps { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 14px; }
.setup-step { display: grid; grid-template-columns: 32px 1fr; gap: 12px; }
.setup-step .n { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: var(--surface-2); color: var(--text-2); font-weight: 700; }
.setup-step.done .n { background: var(--good); color: #fff; }
.setup-step b { display: block; margin-top: 3px; }
.setup-step p { margin: 4px 0 8px; color: var(--text-2); font-size: 14px; }
.setup-step .crm-row > input { max-width: 460px; }
.sms-grid { display: flex; flex-direction: column; gap: 10px; max-width: 460px; }
.card .check { margin: 8px 0; }
.card select { height: 38px; border: 1px solid var(--line-strong); border-radius: var(--r-sm); background: var(--surface); padding: 0 8px; }
@media (max-width: 560px) { .seg.chan { grid-template-columns: repeat(2, 1fr); } }

/* ---------- special offers ---------- */
.deal-badge { display: inline-flex; align-items: center; gap: 4px; font-size: 12.5px; font-weight: 700; padding: 2px 10px; border-radius: 99px; white-space: nowrap; }
.deal-badge.hot { background: #fff1e6; color: #c2410c; }
.deal-badge.good { background: #fff7e0; color: #a16207; }
.deal-badge.buy { background: var(--good-soft); color: var(--good); }
.deal-badge.caution { background: var(--bad-soft); color: var(--bad); }
.deal-badge.dealer { background: var(--line-soft, #eef1f5); color: var(--muted, #5b6472); }
.nav-badge.deal { background: #ea580c; color: #fff; }
.deal-box { margin-top: 14px; border-radius: var(--r-md); padding: 12px 14px; background: #fff7ed; border: 1px solid #fed7aa; }
.deal-box.caution { background: var(--bad-soft); border-color: color-mix(in srgb, var(--bad) 30%, transparent); }
.deal-box.plain { background: var(--surface-2); border-color: var(--line); }
.deal-box-h { display: flex; align-items: center; gap: 6px; font-weight: 700; color: #c2410c; margin-bottom: 6px; }
.deal-box.caution .deal-box-h { color: var(--bad); }
.deal-box.plain .deal-box-h { color: var(--text-2); }
.deal-box ul { list-style: none; margin: 0 0 6px; padding: 0; display: flex; flex-direction: column; gap: 4px; font-size: 14px; }
.deal-box li { display: flex; gap: 6px; align-items: flex-start; }
.deal-box li .icon { margin-top: 4px; flex: none; }
.deal-box li.ok .icon { color: var(--good); }
.deal-box li.warn { color: var(--bad); }
.deal-box small { color: var(--text-3); font-size: 12.5px; }
@media (prefers-color-scheme: dark) {
  .deal-badge.hot { background: #3b1d0c; color: #fdba74; }
  .deal-badge.good { background: #33270b; color: #fcd34d; }
  .deal-box { background: #2a1a0e; border-color: #5a3418; }
  .deal-box-h { color: #fdba74; }
}
.search-row.two { grid-template-columns: 1fr 1fr; }
.my-line { margin: 0; font-size: 15px; line-height: 1.9; flex-basis: 100%; }
.my-line b .num { font-size: 20px; font-weight: 800; color: var(--primary); }
.my-line small { color: var(--text-3); font-size: 12.5px; }
/* «بازهٔ زمانی» */
.period-sel { display: inline-flex; align-items: center; gap: 6px; height: 40px; padding: 0 10px; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--surface); color: var(--text-2); }
.period-sel select { border: 0; background: transparent; font: inherit; color: var(--text); padding: 0 2px; height: 100%; cursor: pointer; }
.period-sel select:focus { outline: none; }
.period-sel:focus-within { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-soft); }
/* Value tags (لاستیک نو، تسمه تایم تازه…) */
.vtag { display: inline-flex; align-items: center; gap: 3px; height: 24px; padding: 0 8px; border-radius: 99px; font-size: 12px; background: var(--good-soft); color: var(--good); white-space: nowrap; }
.vtag.bad { background: var(--bad-soft); color: var(--bad); }
.vtag .icon.sm { width: 12px; height: 12px; }
.vtag.opt { background: var(--primary-soft); color: var(--primary); }
.d-values { margin-top: 10px; display: flex; flex-direction: column; gap: 6px; }
.d-values-h { display: flex; align-items: baseline; gap: 8px; font-size: 13.5px; }
.d-values-h small { color: var(--good); }
.d-guide .why { flex-basis: 100%; color: var(--good); }
/* «مدل و سال» headings in the list */
.list .row[data-group] { margin-top: 30px; position: relative; overflow: visible; }
.list .row[data-group]:first-child { margin-top: 26px; }
.list .row[data-group]::before { content: attr(data-group); position: absolute; top: -25px; inset-inline-start: 2px; font-weight: 800; font-size: 14px; color: var(--text); }

/* «خرید با بودجه» */
.budget-form .field-big .unit { color: var(--text-3); font-size: 13px; white-space: nowrap; padding-inline-start: 8px; }
.budget-form .check { margin-top: 10px; }
.why-row { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; font-size: 12.5px; margin: 2px 0 4px; }
.why-row .rank { min-width: 22px; height: 22px; border-radius: 99px; background: var(--primary); color: var(--on-primary); display: inline-grid; place-items: center; font-weight: 800; font-size: 12px; }
.why-row .why-good { color: var(--good); }
.why-row .why-bad { color: var(--bad); }
/* «خرید با بودجه» — model picker */
.budget-form .field-label { font-weight: 700; font-size: 14px; margin: 14px 0 6px; color: var(--text); }
.budget-form .field-label:first-child { margin-top: 0; }
.budget-form .field-label small { font-weight: 400; color: var(--text-3); }
.pick-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.pick-chips:empty { display: none; }
.pick-chip { display: inline-flex; align-items: center; gap: 4px; height: 32px; padding: 0 10px; border-radius: 99px; border: 0; background: var(--primary); color: var(--on-primary); font: inherit; font-size: 13.5px; cursor: pointer; }
.pick-search { margin-top: 8px; }
.pick-sugg { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.pick-sugg .chip-btn small { color: var(--text-3); margin-inline-start: 4px; }
.seg { display: inline-flex; margin-top: 10px; border: 1px solid var(--line); border-radius: var(--r-md); overflow: hidden; }
.seg[hidden] { display: none; }
.seg button { border: 0; background: var(--surface); padding: 8px 16px; font: inherit; font-size: 13.5px; color: var(--text-2); cursor: pointer; }
.seg button + button { border-inline-start: 1px solid var(--line); }
/* seller filter: five choices in two rows (همه/شخصی/نمایشگاهی · همراه مکانیک/خودرو۴۵) */
#sellerSeg { display: grid; grid-template-columns: repeat(6, 1fr); width: 100%; box-sizing: border-box; }
#sellerSeg button { grid-column: span 2; padding: 6px 4px; }
#sellerSeg button:nth-child(n+4) { grid-column: span 3; border-top: 1px solid var(--line); }
#sellerSeg button:nth-child(4) { border-inline-start: 0; }
.seg button[aria-pressed="true"] { background: var(--primary-soft); color: var(--primary); font-weight: 700; }
.budget-form .form-actions { margin-top: 16px; }
.budget-form .form-actions .btn { width: 100%; }
.budget-summary { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--surface); margin-bottom: 12px; }
.budget-summary .grow { display: flex; flex-direction: column; gap: 2px; min-width: 200px; }
.budget-summary small { color: var(--text-3); }
.pick-search { display: flex; align-items: center; gap: 8px; height: 46px; padding: 0 12px; border: 1px solid var(--line-strong); border-radius: var(--r-md); background: var(--surface); color: var(--text-3); }
.pick-search:focus-within { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-soft); }
.pick-search input { flex: 1; min-width: 0; border: 0; outline: none; background: transparent; font: inherit; font-size: 15px; color: var(--text); }

/* daily automatic check */
.auto-line { display: inline-flex; align-items: center; gap: 4px; color: var(--good); }
.item-main .auto-line { margin-top: 2px; }
.btn.sm.on { border-color: var(--good); color: var(--good); background: var(--good-soft); }
.auto-dialog { display: flex; flex-direction: column; gap: 10px; }
.auto-dialog p { margin: 0; }
.auto-dialog .small { font-size: 12.5px; }
.auto-opts { display: flex; flex-direction: column; gap: 8px; padding-inline-start: 4px; }
.auto-opts[hidden] { display: none; }
.field-inline { display: flex; align-items: center; gap: 8px; font-size: 14px; color: var(--text-2); }
.field-inline select { border: 1px solid var(--line-strong); border-radius: var(--r-sm); background: var(--surface); padding: 6px 8px; font: inherit; }
.check.mode { align-items: flex-start; }
.check.mode span { display: flex; flex-direction: column; gap: 2px; }
.check.mode b { font-weight: 600; color: var(--text); }
.check.mode small { color: var(--text-3); font-size: 12.5px; }
.check.mode input { margin-top: 2px; flex: none; }
@media (max-width: 560px) {
  .saved-list .item { flex-wrap: wrap; row-gap: 8px; }
  .saved-list .item-main { flex-basis: 100%; }
  .saved-list .item-main b { white-space: normal; }
}

/* «قیمت‌یاب»: the model box, the models under it, then the page */
.model-chips { margin: 10px 0 16px; }
.model-chips:empty { margin: 0 0 16px; }
.chip-btn.more { border-style: dashed; color: var(--text-3); }

/* «جستجوی ماشین»: one form — which car, budget, year, mileage */
.budget-form .search-row { grid-template-columns: 1fr 1fr 1fr; }
.budget-form .search-row.two { grid-template-columns: 1fr 1fr; }
.budget-form .form-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.budget-form .form-actions .btn { flex: 1 1 200px; width: auto; justify-content: center; }
.budget-form .adv + .adv { margin-top: 8px; }
@media (max-width: 640px) {
  .budget-form .search-row { grid-template-columns: 1fr 1fr; }
  .budget-form .search-row > :nth-child(3) { grid-column: 1 / -1; }
}

/* ---- price bar (drawer): cheap on the left, like Divar's ---- */
.pbar { margin-top: 14px; padding: 12px 14px 10px; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--surface); }
.pbar-h { display: flex; justify-content: space-between; align-items: center; font-size: 14px; }
.pbar-verdict { font-weight: 700; font-size: 13px; padding: 2px 10px; border-radius: 99px; }
.z-great .pbar-verdict { background: var(--good-soft); color: var(--good); }
.z-good .pbar-verdict { background: var(--good-soft); color: #2f8a55; }
.z-fair .pbar-verdict { background: var(--warn-soft); color: var(--warn); }
.z-high .pbar-verdict { background: var(--bad-soft); color: var(--bad); }
.pbar-track-wrap { direction: ltr; position: relative; margin: 46px 4px 14px; }
.pbar-track { position: relative; height: 8px; border-radius: 99px; overflow: visible; }
.pbar-track .seg { position: absolute; top: 0; bottom: 0; }
.pbar-track .seg.great { background: #1f7a4d; border-radius: 99px 0 0 99px; }
.pbar-track .seg.good { background: #5fb98a; }
.pbar-track .seg.fair { background: #f6d9bf; }
.pbar-track .seg.high { background: #d23c3c; border-radius: 0 99px 99px 0; }
.pbar-dot { position: absolute; top: 50%; width: 14px; height: 14px; margin: -7px 0 0 -7px; border-radius: 50%; background: var(--surface); border: 3px solid #1f5f3f; box-shadow: 0 0 0 2px var(--surface); }
.pbar-bubble { direction: rtl; position: absolute; bottom: 100%; margin-bottom: 10px; white-space: nowrap; font-size: 13px; font-weight: 700;
  padding: 6px 10px; border-radius: 8px; background: var(--good-soft); color: var(--text); border: 1px solid color-mix(in srgb, var(--good) 35%, transparent); }
.z-fair .pbar-bubble { background: var(--warn-soft); border-color: color-mix(in srgb, var(--warn) 35%, transparent); }
.z-high .pbar-bubble { background: var(--bad-soft); border-color: color-mix(in srgb, var(--bad) 35%, transparent); }
.pbar-ticks span { position: absolute; top: 14px; transform: translateX(-50%); font-size: 11.5px; color: var(--text-2); white-space: nowrap; }
.pbar-advice { list-style: none; margin: 4px 0 6px; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px 12px; font-size: 13px; color: var(--text-2); }
.pbar-advice b { color: var(--text); }
.z-suspect .pbar-verdict { background: var(--bad-soft); color: var(--bad); }
.pbar-suspect { display: flex; gap: 6px; align-items: flex-start; margin: 4px 0 8px; padding: 8px 10px; border-radius: var(--r-sm); background: var(--bad-soft); color: var(--bad); font-size: 13px; line-height: 1.8; }
.pbar-suspect .icon { flex: 0 0 auto; margin-top: 4px; }
.zone-note.z-suspect { color: var(--bad); }
.pbar-advice i { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-inline-end: 6px; vertical-align: middle; }
.pbar-advice .great i { background: #1f7a4d; } .pbar-advice .good i { background: #5fb98a; } .pbar-advice .fair i { background: #f0c9a4; } .pbar-advice .high i { background: #d23c3c; }
.delta.none { color: var(--text-3, var(--text-2)); background: transparent; font-weight: 400; }
.err-row { align-items: flex-start; }
.err-row .item-main b { font-size: 13.5px; font-weight: 600; word-break: break-word; }
.filters-row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 8px; }
.fill-box { display: inline-flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 6px; }
.pbar-fill { margin-top: 6px; }
.search-tag { display: inline-flex; font-size: 11.5px; padding: 1px 8px; border-radius: 99px; background: var(--primary-soft); color: var(--primary); margin-inline-start: 6px; }
.pbar-approx { margin-top: 4px; opacity: .8; font-size: 12px; }
.pbar-note { display: block; color: var(--text-3, var(--text-2)); font-size: 12px; }
.pbar-divar { margin-top: 6px; font-size: 12.5px; color: var(--text-2); }
@media (max-width: 420px) { .pbar-advice { grid-template-columns: 1fr; } }
.pbar .pbar-verdict.warn { background: var(--bad-soft); color: var(--bad); }
.pbar.z-none .pbar-verdict { background: var(--surface-2); color: var(--text-2); }
.pbar.z-none .pbar-verdict.warn { background: var(--bad-soft); color: var(--bad); }
.pbar.z-none .pbar-note { margin-top: 6px; }
.pbar-was { position: absolute; top: 50%; width: 10px; height: 10px; margin: -5px 0 0 -5px; border-radius: 50%; background: var(--surface); border: 2px dashed var(--text-2); }
.pbar-drop { display: flex; align-items: center; gap: 6px; margin: 0 0 8px; font-size: 13px; font-weight: 600; color: var(--good); }
.zone-note { font-size: 12.5px; font-weight: 600; margin: 2px 0; }
.zone-note.z-great, .zone-note.z-good { color: var(--good); }
.zone-note.z-fair { color: var(--warn); }
.zone-note.z-high { color: var(--bad); }

/* ---- قیمت‌یاب: chart + cards ---- */
:root { --series-1: #2a78d6; --series-2: #eb6834; --series-3: #1baf7a; --series-4: #eda100; --series-5: #e87ba4; --series-other: #98a2b3; }
@media (prefers-color-scheme: dark) { :root { --series-1: #3987e5; --series-2: #d95926; --series-3: #199e70; --series-4: #c98500; --series-5: #d55181; --series-other: #667085; } }
.card.price-pick { padding: 12px 14px; }
.card.price-pick .pick-search { margin: 0; }
.price-title { margin: 18px 2px 6px; }
.price-title h2 { margin: 0; font-size: 20px; }
.price-title h2 small { font-size: 15px; font-weight: 500; color: var(--text-2); }
.card.pchart { margin-top: 12px; padding: 14px 16px 10px; }
.card.pchart .card-h { display: flex; justify-content: space-between; align-items: baseline; flex-wrap: wrap; gap: 4px 10px; }
.card.pchart .card-h h2 { margin: 0; font-size: 16px; display: flex; align-items: center; gap: 6px; }
.pc-legend { display: flex; flex-wrap: wrap; gap: 4px 14px; margin: 8px 0 2px; font-size: 12.5px; color: var(--text-2); }
.pc-legend span { display: inline-flex; align-items: center; gap: 6px; }
.pc-legend i.dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }
.pc-legend i.ln { width: 16px; height: 2px; display: inline-block; border-radius: 2px; }
.pc-legend i.ln.dash { background: repeating-linear-gradient(90deg, var(--good) 0 4px, transparent 4px 7px); }
.pchart-wrap { position: relative; direction: ltr; }
.pchart-svg { width: 100%; height: auto; display: block; overflow: visible; }
.pc-grid { stroke: var(--line); stroke-width: 1; }
.pc-axis { fill: var(--text-3); font-size: 14px; font-family: inherit; }
.pc-line { fill: none; stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.pc-line.good { stroke: var(--good); stroke-dasharray: 5 4; }
.pc-dot { stroke: var(--surface); stroke-width: 2; cursor: pointer; opacity: .9; }
.pc-dot:hover, .pc-dot:focus { opacity: 1; stroke: var(--text); outline: none; }
.pc-tip { direction: rtl; position: absolute; transform: translate(-50%, calc(-100% - 12px)); pointer-events: none; z-index: 3; min-width: 150px; max-width: 240px;
  background: var(--surface); border: 1px solid var(--line-strong); border-radius: 10px; box-shadow: var(--shadow-lg, 0 8px 24px rgba(0,0,0,.12)); padding: 8px 10px;
  display: flex; flex-direction: column; gap: 2px; font-size: 12.5px; color: var(--text-2); }
.pc-tip b { color: var(--text); font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pc-tip .num { color: var(--text); font-weight: 700; }
.g-market { display: flex; justify-content: space-between; align-items: baseline; padding: 4px 0 2px; }
.g-market span { color: var(--text-2); font-size: 13.5px; }
.g-market b { font-size: 20px; }
.g-split { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.g-cell { border-radius: 10px; padding: 8px 10px; display: flex; flex-direction: column; gap: 2px; }
.g-cell span { font-size: 12px; color: var(--text-2); }
.g-cell b { font-size: 15px; }
.g-cell.buy { background: var(--good-soft); }
.g-cell.buy b { color: var(--good); }
.g-cell.sell { background: var(--primary-soft); }
.g-trims { display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: 12.5px; color: var(--text-2); border-top: 1px solid var(--line); padding-top: 6px; }
.g-trims span { display: inline-flex; align-items: center; gap: 5px; }
.g-trims i { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.g-trims b { color: var(--text); }
.pc-tip.below { transform: translate(-50%, 14px); }
.card.km-box { margin-top: 10px; padding: 12px 14px; display: flex; flex-direction: column; gap: 8px; }
.km-field { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 14px; }
.km-field > span { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; }
.km-field input { width: 140px; }
.km-field small { color: var(--text-3); }
.km-box .quick { margin: 0; }
.km-help { margin: 0; font-size: 12.5px; }
.seg-toggle { display: inline-flex; border: 1px solid var(--line); border-radius: 99px; padding: 2px; background: var(--surface-2); }
.seg-toggle button { border: 0; background: transparent; padding: 4px 12px; border-radius: 99px; font: inherit; font-size: 12.5px; color: var(--text-2); cursor: pointer; }
.seg-toggle button[aria-pressed="true"] { background: var(--surface); color: var(--text); font-weight: 700; box-shadow: var(--shadow-sm); }
.pc-sub { display: block; margin-top: 4px; }
.card.pchart .quick { margin: 8px 0 0; }
.pc-mark { stroke: var(--warn); stroke-width: 2; stroke-dasharray: 3 3; }
.pc-mark-dot { fill: var(--surface); stroke: var(--warn); stroke-width: 3; }
.pc-legend i.ln.mark { background: repeating-linear-gradient(90deg, var(--warn) 0 3px, transparent 3px 6px); }
/* yearly mileage */
.use-tag { display: inline-flex; align-items: center; font-size: 12px; font-weight: 600; padding: 1px 8px; border-radius: 99px; margin-inline-start: 6px; white-space: nowrap; }
.use-tag.u-low { background: var(--primary-soft); color: var(--primary); }
.use-tag.u-normal { background: var(--surface-2); color: var(--text-2); }
.use-tag.u-high { background: var(--warn-soft); color: var(--warn); }
.use-tag.u-veryHigh { background: var(--bad-soft); color: var(--bad); }
.d-price .use-tag { margin-inline-start: 0; font-size: 12.5px; padding: 3px 10px; }
/* where the ad comes from */
.src-tag { display: inline-flex; align-items: center; font-size: 12px; font-weight: 600; padding: 1px 8px; border-radius: 99px; margin-inline-start: 6px; white-space: nowrap; background: var(--surface-2); color: var(--text-2); }
.car-class { display: inline-flex; align-items: center; font-size: 12px; padding: 1px 8px; border-radius: 99px; margin-inline-start: 6px; white-space: nowrap; border: 1px solid var(--line); color: var(--text-3); }
.src-tag.bama { background: #fff4e5; color: #b54708; }
@media (prefers-color-scheme: dark) { .src-tag.bama { background: #2e2210; color: #fdb022; } }
.d-price .src-tag { margin-inline-start: 0; font-size: 12.5px; padding: 3px 10px; }
.seg.sites { margin-bottom: 4px; }
/* live bar: what the bot is doing now */
/* not sticky: it goes with the page. Closed it is one row: a dot, one line, an arrow. */
.live-bar { display: flex; flex-direction: column; margin: 0; padding: 0 16px;
  background: var(--primary-soft); border-bottom: 1px solid color-mix(in srgb, var(--primary) 25%, transparent); }
.live-head { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 36px; padding: 6px 0; border: 0; background: none; color: var(--text); font: inherit; font-size: 13.5px; cursor: pointer; text-align: start; }
.live-head:disabled { cursor: default; opacity: 1; }
.live-sum { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.live-chev { flex: none; color: var(--text-2); font-size: 18px; line-height: 1; transition: transform .2s; transform: rotate(-90deg); }
.live-bar.open .live-chev { transform: rotate(90deg); }
.live-bar.needs { background: var(--bad-soft); border-bottom-color: var(--bad); }
.live-bar.needs .live-sum { color: var(--bad); font-weight: 700; white-space: normal; }
.live-bar.needs .live-pulse { background: var(--bad); }
.live-body { display: flex; align-items: center; gap: 12px; padding: 4px 0 10px; }
.live-bar[hidden] { display: none; }
.live-pulse { flex: none; width: 10px; height: 10px; border-radius: 50%; background: var(--good); box-shadow: 0 0 0 0 color-mix(in srgb, var(--good) 60%, transparent); animation: livePulse 1.6s infinite; }
@keyframes livePulse { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--good) 55%, transparent); } 70% { box-shadow: 0 0 0 9px transparent; } 100% { box-shadow: 0 0 0 0 transparent; } }
@media (prefers-reduced-motion: reduce) { .live-pulse { animation: none; } }
.live-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.live-what { font-size: 14px; color: var(--text); display: flex; align-items: center; flex-wrap: wrap; gap: 0 4px; }
.live-what small { color: var(--text-2); }
.live-now { font-size: 12.5px; color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.live-progress { height: 4px; border-radius: 99px; background: color-mix(in srgb, var(--primary) 18%, transparent); overflow: hidden; }
.live-progress span { display: block; height: 100%; background: var(--primary); border-radius: 99px; transition: width .4s; }
.src-tag.divar { background: #fdecec; color: #b42318; }
@media (prefers-color-scheme: dark) { .src-tag.divar { background: #3a1612; color: #f97066; } }
.src-tag.hamrah { background: #e8f1fd; color: #1f5fbf; }
.src-tag.k45 { background: #ecf8f0; color: #1d7a45; }
@media (prefers-color-scheme: dark) { .src-tag.hamrah { background: #13243d; color: #7fb2f5; } .src-tag.k45 { background: #10291b; color: #6fd39a; } }
.seller.company { background: var(--primary-soft); color: var(--primary); }
/* Bama's new-car prices */
.card.new-prices { margin-top: 12px; padding: 14px 16px; }
.card.new-prices .card-h { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.card.new-prices .card-h h2 { margin: 0; font-size: 16px; display: flex; align-items: center; gap: 6px; }
.np-table { margin-top: 8px; display: flex; flex-direction: column; }
.np-row { display: grid; grid-template-columns: minmax(0, 1.6fr) 1fr 1fr; gap: 8px; align-items: baseline; padding: 7px 0; border-top: 1px solid var(--line); font-size: 14px; }
.np-row.np-head { border-top: 0; font-size: 12px; color: var(--text-3); padding-top: 0; }
.np-row small { color: var(--text-3); font-size: 12px; }
.np-note { margin: 8px 0 0; font-size: 12px; }
.pbar-new { display: flex; align-items: flex-start; gap: 6px; margin: 0 0 8px; font-size: 13px; color: var(--text); }
.pbar-new small { color: var(--text-2); }
.city-field { margin-top: 8px; max-width: 280px; }
/* «جستجوهای من»: now / waiting / done */
.card.run-now { display: flex; flex-direction: column; gap: 8px; border-color: color-mix(in srgb, var(--primary) 30%, var(--line)); }
.card.run-now.idle { border-color: var(--line); }
.run-now-h { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 14px; }
.run-now-h .src-tag { margin: 0; }
.run-state { margin-inline-start: auto; font-size: 13px; color: var(--text-2); }
.run-now-title { margin: 0; font-size: 19px; }
.run-now-msg { margin: 0; font-size: 14px; color: var(--text-2); }
.run-progress { display: flex; align-items: center; gap: 10px; }
.run-progress .live-progress { flex: 1; height: 6px; }
.run-progress small { color: var(--text-2); white-space: nowrap; }
.run-stats { display: flex; gap: 16px; font-size: 13.5px; color: var(--text-2); }
.run-stats b { color: var(--text); font-size: 16px; }
.run-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 4px; }
.stop-all { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; }
.run-note { margin: 0; font-size: 12.5px; }
.live-pulse.off { background: var(--text-3); animation: none; box-shadow: none; }
.card.run-queue, .card.run-now { margin-bottom: 12px; }
.q-list { list-style: none; margin: 4px 0 0; padding: 0; }
.q-item { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-top: 1px solid var(--line); }
.q-item:first-child { border-top: 0; }
.q-no { flex: none; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: var(--primary-soft); color: var(--primary); font-weight: 700; font-size: 13px; }
.q-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.q-main b { font-size: 14px; }
.q-main .src-tag { margin: 0; }
.q-actions { display: flex; gap: 4px; flex: none; }
.q-actions .btn.icon-only { width: 30px; padding: 0; justify-content: center; font-size: 11px; }
.run-pill { font-size: 12px; font-weight: 600; padding: 2px 10px; border-radius: 99px; background: var(--surface-2); color: var(--text-2); white-space: nowrap; }
.run-pill.ok { background: var(--good-soft); color: var(--good); }
.run-pill.bad { background: var(--bad-soft); color: var(--bad); }
.run-history .item-main small .src-tag { margin: 0 0 0 4px; }
@media (max-width: 520px) { .q-item { flex-wrap: wrap; } .q-actions { width: 100%; justify-content: flex-end; } }
.live-title { font-size: 13px; color: var(--text-2); }
.live-title small { color: var(--text-3); }
.live-row { display: flex; flex-direction: column; gap: 2px; }
.live-row + .live-row { padding-top: 4px; border-top: 1px dashed color-mix(in srgb, var(--primary) 25%, transparent); }
.live-what .src-tag { margin: 0 0 0 6px; }

/* ---------- «تنظیمات»: one page, five parts ---------- */
.settings-tabs { margin-bottom: 16px; flex-wrap: wrap; overflow: visible; }
.settings-tabs a { flex: none; border-radius: var(--r-sm); min-height: 38px; padding: 0 12px; color: var(--text-2); display: inline-flex; align-items: center; gap: 6px; font-size: 14px; text-decoration: none; white-space: nowrap; }
.settings-tabs a:hover { background: var(--surface-2); }
.settings-tabs a[aria-selected="true"] { background: var(--primary); color: var(--on-primary); font-weight: 700; }
.settings-body { display: flex; flex-direction: column; gap: 16px; }
.settings-body > * { margin: 0 !important; }
.settings-body .card-h { flex-wrap: wrap; gap: 8px; }
.card-actions { margin-inline-start: auto; display: flex; gap: 8px; flex-wrap: wrap; }
.story-media { display: grid; grid-template-columns: minmax(0, 220px) minmax(0, 1fr); gap: 16px; align-items: start; }
.story-media video { width: 100%; aspect-ratio: 9 / 16; border-radius: var(--r-md); background: #000; }
.story-frames { display: grid; grid-template-columns: repeat(auto-fill, minmax(90px, 1fr)); gap: 8px; }
.story-frames img { width: 100%; aspect-ratio: 9 / 16; object-fit: cover; border-radius: var(--r-sm); border: 1px solid var(--line); display: block; }
@media (max-width: 560px) {
  .story-media { grid-template-columns: 1fr; }
  .story-media video { max-width: 260px; margin-inline: auto; display: block; }
  .story-frames { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

/* ---------- «تحلیل بازار» ---------- */
.market-page .card { margin-bottom: 16px; }
.market-hero { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; }
.mh-dir { display: flex; align-items: center; gap: 14px; }
.mh-icon { width: 64px; height: 64px; border-radius: 18px; display: grid; place-items: center; font-size: 34px; font-weight: 700; background: var(--surface-2); color: var(--text-2); }
.mh-dir small { display: block; color: var(--text-3); font-size: 13px; }
.mh-dir b { display: block; font-size: 28px; line-height: 1.3; }
.mh-dir .num { color: var(--text-2); font-size: 15px; }
.mh-side { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
.mh-side .chip-status { margin: 0; }
.m-up .mh-icon, .m-pill.m-up { background: var(--bad-soft); color: var(--bad); }
.m-down .mh-icon, .m-pill.m-down { background: var(--good-soft); color: var(--good); }
.m-steady .mh-icon, .m-pill.m-steady { background: var(--primary-soft); color: var(--primary); }
.m-unclear .mh-icon, .m-pill.m-unclear, .m-unknown .mh-icon, .m-pill.m-unknown { background: var(--surface-2); color: var(--text-3); }
.m-pill { display: inline-flex; align-items: center; gap: 2px; border-radius: 99px; padding: 2px 10px; font-size: 13px; white-space: nowrap; }
.market-summary { margin: 0; padding-inline-start: 18px; display: grid; gap: 6px; line-height: 1.8; }
.market-signs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.market-signs .card { margin-bottom: 16px; }
.market-signs .big { font-size: 24px; font-weight: 700; margin: 4px 0 6px; }
.ud-bar { display: flex; height: 10px; border-radius: 99px; overflow: hidden; background: var(--surface-2); margin: 10px 0 8px; }
.ud-down { background: var(--good); }
.ud-up { background: var(--bad); }
.market-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.market-table th, .market-table td { text-align: start; padding: 8px 6px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.market-table th { color: var(--text-3); font-weight: 400; font-size: 13px; }
.spark { display: block; }
.spark-base { stroke: var(--line-strong); stroke-dasharray: 3 3; stroke-width: 1; }
.spark-line { fill: none; stroke: var(--primary); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
@media (max-width: 760px) {
  .market-signs { grid-template-columns: 1fr; gap: 0; }
  .mh-side { align-items: flex-start; }
}
@media (max-width: 560px) {
  .market-table th:last-child, .market-table td.spark-cell { display: none; }
  .market-table th, .market-table td { padding: 8px 4px; font-size: 13px; white-space: normal; }
  .market-table .m-pill { padding: 2px 6px; }
}
/* «ساخت» / «بدنه» in the car picker */
.cp-class { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.cp-class-label { font-size: 12.5px; color: var(--text-3); min-width: 34px; }
@media (max-width: 560px) { .cp-class { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 4px; scrollbar-width: none; } .cp-class .chip-btn { flex: 0 0 auto; } }

/* life of an ad: not active any more (deals.js lifeOf) */
.life-pill { display: inline-flex; align-items: center; font-size: 12px; padding: 1px 8px; border-radius: 99px; margin-inline-start: 6px; white-space: nowrap; background: var(--line); color: var(--text-3); }
.life-pill.archived { background: var(--line); color: var(--text-2, var(--text-3)); font-weight: 600; }
.archive-table td.ttl { white-space: normal; min-width: 180px; max-width: 320px; }
.index-card .big { margin: 0 0 8px; }
.index-card svg.spark { width: 100%; height: auto; max-height: 140px; }

/* the dashboard cards of the online panel (public/dash-cards.js) */
.dash-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 12px; margin: 12px 0; }
.dash-card .kpis { display: flex; gap: 8px; flex-wrap: wrap; }
.dash-card .kpis .kpi { flex: 1 1 110px; min-width: 0; }
.dash-card.wide { grid-column: 1 / -1; }
.funnel-row { display: grid; grid-template-columns: 120px 1fr 34px; gap: 8px; align-items: center; margin: 6px 0; font-size: 13.5px; }
.funnel-bar { height: 8px; background: var(--surface-2); border-radius: 99px; overflow: hidden; }
.funnel-bar i { display: block; height: 100%; background: var(--primary); border-radius: 99px; }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.row-line { display: flex; gap: 8px; align-items: baseline; justify-content: space-between; margin: 4px 0; }
@media (max-width: 640px) { .two-col { grid-template-columns: 1fr; } .funnel-row { grid-template-columns: 96px 1fr 30px; } }
.act-row .item-main small { white-space: normal; }
#whoami { display: block; margin-bottom: 4px; }

/* ===== Settings hub: a list of sections beside the content (a row of chips on a narrow screen) ===== */
.set-hub { display: grid; grid-template-columns: 230px minmax(0, 1fr); gap: 20px; align-items: start; max-width: 1100px; }
.set-list { position: sticky; top: 76px; display: flex; flex-direction: column; gap: 2px; padding: 8px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); }
.set-list a { display: flex; align-items: center; gap: 10px; min-height: 42px; padding: 0 12px; border-radius: var(--r-sm); text-decoration: none; color: var(--text-2); font-weight: 500; }
.set-list a:hover { background: var(--surface-2); color: var(--text); }
.set-list a .icon { color: var(--text-3); }
.set-list a[aria-current="page"] { background: var(--brand-accent-soft); color: var(--brand-accent-ink); font-weight: 700; }
.set-list a[aria-current="page"] .icon { color: var(--brand-accent-ink); }
.set-hub .settings-body { min-width: 0; }
.broker-logo { height: 44px; max-width: 120px; object-fit: contain; border-radius: var(--r-sm); background: var(--logo-plate); border: 1px solid var(--line); padding: 3px; }
@media (max-width: 900px) {
  .set-hub { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .set-list { position: static; flex-direction: row; overflow-x: auto; padding: 6px; scrollbar-width: none; }
  .set-list a { flex: none; white-space: nowrap; }
}
.ld-tabs .ld-tablink { flex: none; display: inline-flex; align-items: center; min-height: 38px; padding: 0 12px; border-radius: var(--r-sm); color: var(--text-2); text-decoration: none; }
.ld-tabs .ld-tablink:hover { background: var(--surface-2); }
