/* Рабочее место менеджеров NAVIN AUTO. Токены сняты с navinauto.ru (/calculator, /japan),
   чтобы кабинет выглядел частью основного сайта. */
@import url('/assets/fonts/fonts.css');

:root {
  --font-sans: "Golos Text", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --surface: #fefefe; --surface-2: #f6f4f3; --card: #ffffff; --card-ink: #232021;
  --ink: #363333; --ink-soft: #6e6868; --ink-faint: #a5a0a0;
  --line: #3633331a; --line-strong: #3633332e;
  --accent: #ff753a; --accent-deep: #e8642c; --accent-soft: #ff753a1f;
  --lilac: #be7ab1; --lilac-soft: #be7ab124;
  --on-ink: #f4f1f0; --on-ink-soft: #f4f1f0a3;
  --danger: #c2410c; --danger-soft: #c2410c14; --ok: #1f7a4d; --ok-soft: #1f7a4d14;
  --shadow-card: 0 16px 40px #36333314;
  --radius-card: 20px; --radius-field: 12px; --radius-pill: 9999px; --radius-panel: 32px;
  --glass-bg: #ffffffb8; --glass-border: #ffffffa6; --glass-shadow: 0 24px 60px #36333324;
  --ease: cubic-bezier(.4, 0, .2, 1); --dur: 150ms;
  --container: 1410px; --gutter: 20px; --header: 76px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; font: 400 16px/24px var(--font-sans); color: var(--ink); background: var(--surface);
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
h1, h2, h3 { margin: 0; color: var(--card-ink); text-wrap: balance; }
h1 { font-weight: 900; font-size: clamp(2rem, 3.8vw, 3.2rem); line-height: 1.07; letter-spacing: -.03em; }
h2 { font-weight: 800; font-size: clamp(1.4rem, 2.2vw, 1.9rem); line-height: 1.1; letter-spacing: -.02em; }
h3 { font-weight: 700; font-size: 17px; line-height: 1.5; }
p { margin: 0; }
a { color: inherit; text-underline-offset: 2px; transition: color var(--dur) var(--ease); }
a:hover { color: var(--accent); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.accent { color: var(--accent); }
.muted { color: var(--ink-soft); }
.faint { color: var(--ink-faint); }
.num { font-variant-numeric: tabular-nums; }
[hidden] { display: none !important; }
svg[aria-hidden="true"] { width: 18px; height: 18px; flex: none; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.container { max-width: var(--container); margin-inline: auto; padding-inline: var(--gutter); }

/* ── шапка ── */
.hdr { position: sticky; top: 0; z-index: 50; background: var(--surface); box-shadow: 0 1px 6px rgba(0,0,0,.05); }
.hdr-in { height: var(--header); display: flex; align-items: center; gap: 32px; }
.logo { font-weight: 900; font-size: 20px; letter-spacing: -.02em; color: var(--card-ink); text-decoration: none; white-space: nowrap; }
.logo sup { font-size: .55em; vertical-align: super; line-height: 0; }
.nav { display: flex; gap: 26px; }
.nav a { font-size: 15px; font-weight: 500; text-decoration: none; color: var(--ink); padding: 6px 0; position: relative;
         display: inline-flex; align-items: center; white-space: nowrap; }   /* счётчик подборки не переносит пункт на вторую строку */
.logo-img { display: block; height: 20px; width: auto; }   /* вордмарк navinauto.ru: 183 px, как в шапке сайта */
@media (max-width: 480px) { .logo-img { height: 17px; } }   /* ≈155 px: рядом «← CRM», аватар и меню */
@media (max-width: 370px) { .logo-img { height: 15px; } }
.nav a:hover { color: var(--accent); }
.nav a[aria-current="page"]::after { content: ""; position: absolute; left: 0; right: 0; bottom: -2px; height: 2px; border-radius: 2px; background: var(--accent); }
.hdr-right { margin-left: auto; display: flex; align-items: center; gap: 14px; }
/* «← CRM»: переход обратно в CRM — та же пилюля, что у курсов, чтобы не спорить с разделами */
.crm-back { display: inline-flex; align-items: center; height: 32px; padding: 0 12px; border-radius: var(--radius-pill);
            box-shadow: inset 0 0 0 1px var(--line-strong); font-size: 13px; font-weight: 600; color: var(--ink); text-decoration: none; white-space: nowrap;
            transition: color var(--dur) var(--ease), box-shadow var(--dur) var(--ease); }
.crm-back:hover { color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }

.rates { display: flex; gap: 6px; align-items: center; }
/* текст по центру пилюли: при baseline и высоте 32px цифры прилипали к верху (владелец 11.10: «выровнять курсы») */
.rate { display: inline-flex; align-items: center; justify-content: center; gap: 5px; height: 32px; padding: 0 12px; border-radius: var(--radius-pill);
        box-shadow: inset 0 0 0 1px var(--line); font-size: 13px; font-weight: 600; line-height: 1; color: var(--ink); white-space: nowrap; cursor: default;
        font-variant-numeric: tabular-nums; }
.rate b { font-weight: 700; color: var(--ink-soft); font-size: 12px; line-height: 1; }
.rates-note { font-size: 12px; color: var(--ink-faint); white-space: nowrap; }
.rates-warn { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); flex: none; }

.userbtn { width: 40px; height: 40px; border-radius: 50%; border: 0; cursor: pointer; background: var(--card-ink); color: var(--on-ink);
           font: 700 14px/1 var(--font-sans); display: grid; place-items: center; }
.menu { position: absolute; right: 0; top: calc(100% + 10px); min-width: 220px; background: var(--card); border-radius: 16px;
        box-shadow: var(--shadow-card), inset 0 0 0 1px var(--line); padding: 8px; }
.menu .who { padding: 8px 12px 10px; border-bottom: 1px solid var(--line); margin-bottom: 6px; }
.menu .who b { display: block; font-size: 15px; color: var(--card-ink); }
.menu .who span { font-size: 13px; color: var(--ink-soft); }
.menu a, .menu button { display: flex; align-items: center; gap: 10px; width: 100%; padding: 10px 12px; border: 0; background: none; border-radius: 10px;
        font: 500 15px/1.2 var(--font-sans); color: var(--ink); text-decoration: none; cursor: pointer; text-align: left; }
.menu a:hover, .menu button:hover { background: var(--surface-2); color: var(--ink); }
.burger { display: none; width: 44px; height: 44px; border: 0; background: none; color: var(--accent); cursor: pointer; margin-right: -10px; }

/* ── кнопки ── */
.btn { --h: 52px; display: inline-flex; align-items: center; justify-content: center; gap: 10px; height: var(--h); padding: 0 28px;
       border: 0; border-radius: var(--radius-pill); font: 600 16px/1 var(--font-sans); cursor: pointer; text-decoration: none; white-space: nowrap;
       transition: background var(--dur) var(--ease), opacity var(--dur) var(--ease), transform var(--dur) var(--ease); }
.btn:active:not(:disabled) { transform: scale(.98); }
.btn:disabled { opacity: .45; cursor: default; }
.btn svg { width: 18px; height: 18px; flex: none; }
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover:not(:disabled) { background: var(--accent-deep); color: #fff; }
.btn-dark { background: var(--card-ink); color: var(--on-ink); }
.btn-dark:hover:not(:disabled) { opacity: .9; color: var(--on-ink); }
.btn-outline { background: transparent; color: var(--card-ink); box-shadow: inset 0 0 0 1px var(--card-ink); }
.btn-outline:hover:not(:disabled) { background: var(--card-ink); color: var(--on-ink); }
.btn-ghost { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1px var(--line-strong); }
.btn-ghost:hover:not(:disabled) { box-shadow: inset 0 0 0 1px var(--card-ink); color: var(--card-ink); }
.btn-sm { --h: 36px; padding: 0 18px; font-size: 14px; font-weight: 600; }
.btn-sm svg { width: 16px; height: 16px; }
.btn-link { background: none; border: 0; padding: 0; font: 600 14px/1.4 var(--font-sans); color: var(--ink-soft); cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.btn-link:hover { color: var(--accent); }
.spin { width: 18px; height: 18px; border-radius: 50%; border: 2px solid currentColor; border-right-color: transparent; animation: spin .7s linear infinite; flex: none; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ── поля ── */
.field { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.label { font-size: 15px; font-weight: 700; color: var(--card-ink); }
.input, .select { width: 100%; height: 48px; padding: 0 16px; border-radius: var(--radius-field); border: 1px solid var(--line-strong);
                  background: color-mix(in srgb, var(--surface) 80%, transparent); color: var(--card-ink);
                  font: 500 16px/1 var(--font-sans); font-variant-numeric: tabular-nums; transition: border-color var(--dur) var(--ease); }
.input::placeholder { color: var(--ink-faint); }
.input:focus, .select:focus { outline: none; border-color: var(--accent); }
.select { appearance: none; padding-right: 36px; font-weight: 700; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='none' stroke='%23232021' stroke-width='2' stroke-linecap='round' viewBox='0 0 24 24'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 14px center; }
.hint { font-size: 13px; line-height: 1.5; color: var(--ink-soft); }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.price-row { display: grid; grid-template-columns: 1fr 104px; gap: 8px; }
.check { display: inline-flex; align-items: center; gap: 10px; font-size: 14px; color: var(--ink); cursor: pointer; user-select: none; }
.check input { width: 18px; height: 18px; accent-color: var(--card-ink); margin: 0; }

/* пилюли-переключатели */
.seg { display: flex; flex-wrap: wrap; gap: 8px; }
.pill { height: 36px; padding: 0 16px; border-radius: var(--radius-pill); border: 0; background: transparent; box-shadow: inset 0 0 0 1px var(--line);
        font: 600 14px/1 var(--font-sans); color: var(--ink-soft); cursor: pointer; transition: all var(--dur) var(--ease); }
.pill:hover { color: var(--card-ink); box-shadow: inset 0 0 0 1px var(--line-strong); }
.pill[aria-pressed="true"] { background: var(--card-ink); color: var(--on-ink); box-shadow: none; }

/* ── страница ── */
main { padding-block: 40px 140px; }
.page-head { display: flex; flex-direction: column; gap: 14px; margin-bottom: 28px; max-width: 760px; }
.lead { font-size: 17px; line-height: 1.6; color: var(--ink-soft); }

.card { background: var(--card); border-radius: var(--radius-card); box-shadow: inset 0 0 0 1px var(--line); padding: 24px; }
.glass { background: var(--glass-bg); border: 1px solid var(--glass-border); border-radius: var(--radius-panel);
         box-shadow: inset 0 1px 0 #ffffff73, var(--glass-shadow); backdrop-filter: blur(24px) saturate(160%);
         -webkit-backdrop-filter: blur(24px) saturate(160%); padding: 32px; }

/* ссылка на объявление */
.linkbar { display: flex; flex-direction: column; gap: 12px; margin-bottom: 28px; }
.linkbar form { display: flex; gap: 10px; }
.linkbar .input { height: 56px; border-radius: var(--radius-pill); padding: 0 24px; font-size: 16px; font-weight: 500; }
.linkbar .btn { --h: 56px; }
.sources { display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: center; font-size: 13px; color: var(--ink-faint); padding-inline: 24px; }
.sources span { color: var(--ink-soft); font-weight: 600; }
.notice { display: flex; gap: 10px; align-items: flex-start; padding: 12px 18px; border-radius: 14px; font-size: 14px; line-height: 1.5; }
.notice svg { width: 18px; height: 18px; flex: none; margin-top: 1px; }
.notice.err { background: var(--danger-soft); color: var(--danger); }
.notice.warn { background: var(--accent-soft); color: #9a3b12; }
.notice.ok { background: var(--ok-soft); color: var(--ok); }
.login-card .notice:not(.err) { background: var(--surface-2); color: var(--ink); }

/* ── клиент из CRM («Подбор» в карточке сделки, client-bar.mjs) ── */
.client-bar { margin-bottom: 24px; }
.client-bar.card { display: flex; flex-direction: column; gap: 12px; padding: 18px 22px; }
.client-bar.is-empty .hint { display: flex; align-items: center; gap: 8px; }
.client-bar.is-empty svg { width: 16px; height: 16px; flex: none; }
.cb-head { display: flex; align-items: flex-start; gap: 16px; }
.cb-who { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1; }
.cb-eyebrow { font-size: 12px; font-weight: 700; letter-spacing: .02em; text-transform: uppercase; color: var(--accent-deep); }
.cb-stale { text-transform: none; font-weight: 600; color: var(--ink-faint); }
.cb-name { font-size: 20px; font-weight: 800; color: var(--card-ink); line-height: 1.3; }
.cb-city { font-weight: 500; color: var(--ink-soft); }
.cb-meta { font-size: 14px; color: var(--ink-soft); }
.cb-tools { display: flex; align-items: center; gap: 4px; flex: none; }
.cb-line, .cb-crit > summary, .cb-hist > summary { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; font-size: 14px; }
.cb-crit > summary, .cb-hist > summary { cursor: pointer; list-style: none; }
.cb-crit > summary::-webkit-details-marker, .cb-hist > summary::-webkit-details-marker { display: none; }
.cb-crit > summary::after, .cb-hist > summary::after { content: "▾"; color: var(--ink-soft); font-size: 15px; line-height: 1; transition: transform var(--dur) var(--ease); }
.cb-crit[open] > summary::after, .cb-hist[open] > summary::after { transform: rotate(180deg); }
.cb-label { font-weight: 700; color: var(--card-ink); min-width: 74px; }
.tag.cb-hot { background: var(--accent-soft); color: #9a3b12; }
.tag.cb-need { background: var(--accent-soft); color: #9a3b12; }
.tag.cb-over { background: var(--danger-soft); color: var(--danger); }
.tag.cb-fit { background: var(--ok-soft); color: var(--ok); }
.cb-form { display: flex; flex-direction: column; gap: 12px; margin-top: 12px; }
.cb-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px 12px; }
.cb-wide { grid-column: 1 / -1; }
.cb-list { margin: 10px 0 0; padding-left: 18px; display: flex; flex-direction: column; gap: 4px; font-size: 14px; }
.pool-sum .cb-over, .pool-sum .cb-fit { margin-left: 4px; }
@media (max-width: 1023px) { .cb-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 767px) {
  .client-bar.card { padding: 16px; }
  .cb-head { flex-direction: column; gap: 8px; }
  .cb-label { min-width: 0; }
}

.calc-grid { display: grid; grid-template-columns: minmax(400px, 5fr) minmax(0, 6fr); gap: 28px; align-items: start; }
.calc-grid > * { min-width: 0; }
.form { display: flex; flex-direction: column; gap: 26px; }
.group { display: flex; flex-direction: column; gap: 12px; }
.conv { font-size: 13px; font-weight: 600; color: var(--ink-soft); }

/* расшифровка */
.breakdown { display: flex; flex-direction: column; border-top: 1px solid var(--line); }
.bd-row { display: flex; justify-content: space-between; gap: 16px; padding: 11px 0; border-bottom: 1px solid var(--line); font-size: 15px; }
.bd-row span { color: var(--ink-soft); }
.bd-row b { font-weight: 700; color: var(--card-ink); font-variant-numeric: tabular-nums; white-space: nowrap; }
.bd-row.total { border-bottom: 0; padding-top: 14px; }
.bd-row.warn span, .bd-row.warn span b { color: #9a3b12; font-weight: 600; }
.bd-row.total span { color: var(--card-ink); font-weight: 700; }
.bd-row.total b { font-size: 22px; font-weight: 900; }
/* ручная правка цен: поле вместо суммы, метка «вручную» у вписанных строк */
.bd-row { align-items: center; }
.bd-input { width: 150px; height: 36px; padding: 0 10px; text-align: right; font-weight: 700; flex: none; }
.bd-row.is-manual b { color: var(--accent-ink, #b4461b); }
.bd-manual { margin-left: 8px; padding: 2px 8px; border: 0; border-radius: var(--radius-pill); background: var(--accent-soft); color: var(--accent-ink, #b4461b);
             font: inherit; font-size: 11px; font-weight: 700; cursor: pointer; white-space: nowrap; }
.bd-manual:hover { background: var(--accent); color: #fff; }
/* свои названия и свои строки (владелец 14.10.2026): название — поле во всю ширину, сумма справа */
.bd-name { flex: 1 1 auto; min-width: 0; height: 36px; padding: 0 10px; }
.bd-tag { margin-left: 8px; padding: 2px 8px; border-radius: var(--radius-pill); background: var(--line); color: var(--ink-soft);
          font-size: 11px; font-weight: 700; white-space: nowrap; }
.bd-del { flex: none; display: grid; place-items: center; width: 32px; height: 32px; margin-left: -8px; border: 0; border-radius: 8px; background: transparent;
          color: var(--ink-soft); cursor: pointer; }
.bd-del svg { width: 16px; height: 16px; }
.bd-del:hover { background: var(--accent-soft); color: var(--accent-ink, #b4461b); }
.bd-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; padding-top: 12px; }
.bd-tools .hint { flex: 1 1 220px; }

/* машина */
.car { display: flex; flex-direction: column; gap: 18px; }
/* липкой машина бывает только там, где она целиком влезает в экран — иначе низ карточки не долистать */
@media (min-width: 1024px) and (min-height: 980px) { .car { position: sticky; top: calc(var(--header) + 20px); } }
.car-empty { min-height: 420px; border-radius: var(--radius-panel); background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--line);
             display: grid; place-items: center; text-align: center; padding: 40px; }
.car-empty svg { width: 64px; height: 64px; color: var(--ink-faint); margin-bottom: 14px; }
.car-empty p { max-width: 340px; color: var(--ink-soft); font-size: 15px; line-height: 1.6; }
/* машина без объявления: название для клиента (14.10.2026) */
.car-manual { display: flex; flex-direction: column; gap: 8px; width: min(380px, 100%); margin: 26px auto 0; text-align: left; }
.car-manual .hint { max-width: none; font-size: 13px; }
.car-manual-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 12px; margin-top: 4px; }
.car-manual-grid .field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.car-manual-grid .input, .car-manual-grid .select { height: 44px; }
.car-manual-wide { grid-column: 1 / -1; }
.label-sm { font-size: 13px; font-weight: 600; color: var(--ink-soft); }
.photo-main { position: relative; aspect-ratio: 16 / 10; border-radius: var(--radius-card); overflow: hidden; background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--line); }
.photo-main img { width: 100%; height: 100%; object-fit: cover; display: block; }
.photo-count { position: absolute; right: 14px; bottom: 14px; padding: 6px 12px; border-radius: var(--radius-pill); background: #232021cc; color: var(--on-ink); font-size: 13px; font-weight: 600; }
.photo-nav { position: absolute; top: 50%; transform: translateY(-50%); width: 44px; height: 44px; border-radius: 50%; border: 0; cursor: pointer;
             background: var(--glass-bg); box-shadow: var(--glass-shadow); display: grid; place-items: center; color: var(--card-ink); }
.photo-nav svg { width: 20px; height: 20px; }
.photo-nav.prev { left: 14px; } .photo-nav.next { right: 14px; }
.thumbs { display: flex; gap: 8px; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 4px; scrollbar-width: thin; }
.thumbs button { flex: 0 0 96px; height: 64px; border-radius: 10px; overflow: hidden; border: 0; padding: 0; cursor: pointer; scroll-snap-align: start;
                 opacity: .6; box-shadow: inset 0 0 0 1px var(--line); background: var(--surface-2); transition: opacity var(--dur) var(--ease); }
.thumbs button[aria-current="true"] { opacity: 1; box-shadow: 0 0 0 2px var(--accent); }
.thumbs img { width: 100%; height: 100%; object-fit: cover; display: block; }
.car-title { display: flex; flex-direction: column; gap: 8px; }
.car-meta { display: flex; flex-wrap: wrap; gap: 8px; }
.car-cond { display: flex; flex-direction: column; gap: 6px; padding: 14px 16px; border-radius: 14px; background: var(--surface-2); font-size: 14px; }
.car-cond b { color: var(--card-ink); }
.car-cond ul { margin: 0; padding-left: 18px; display: flex; flex-direction: column; gap: 2px; }
.car-cond li.warn { color: var(--danger); font-weight: 600; }   /* encar: ремонт каркаса, затопление, залог — клиент увидит «!» */
.chip { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 12px; border-radius: var(--radius-pill); background: var(--surface-2);
        font-size: 14px; font-weight: 600; color: var(--ink); white-space: nowrap; }
.chip svg { width: 15px; height: 15px; color: var(--ink-soft); }
.chip.warn { background: var(--accent-soft); color: #9a3b12; }
.src { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; color: var(--ink-soft); }
.src b { color: var(--card-ink); }
.src a { display: inline-flex; align-items: center; gap: 4px; font-weight: 600; }
.src svg { width: 14px; height: 14px; }
.car-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }

/* плашка итога */
.totalbar { position: fixed; left: 0; right: 0; bottom: 18px; z-index: 40; pointer-events: none; }
.totalbar-in { pointer-events: auto; max-width: calc(var(--container) - 2 * var(--gutter)); margin-inline: auto; display: flex; align-items: center; gap: 18px;
               padding: 12px 12px 12px 28px; border-radius: var(--radius-pill); background: var(--glass-bg); border: 1px solid var(--glass-border);
               box-shadow: inset 0 1px 0 #ffffff73, var(--glass-shadow); backdrop-filter: blur(24px) saturate(160%); -webkit-backdrop-filter: blur(24px) saturate(160%); }
.tb-label { font-size: 13px; font-weight: 600; color: var(--ink-soft); line-height: 1.2; }
.tb-value { font-size: 28px; font-weight: 900; letter-spacing: -.02em; color: var(--card-ink); line-height: 1.1; font-variant-numeric: tabular-nums; }
.tb-actions { margin-left: auto; display: flex; gap: 8px; }

/* настройки и таблицы */
.stack { display: flex; flex-direction: column; gap: 20px; }
.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(360px, 100%), 1fr)); gap: 20px; align-items: start; }
.card h2 { font-size: 22px; margin-bottom: 6px; }
.card .lead { font-size: 15px; margin-bottom: 18px; }
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(180px, 100%), 1fr)); align-items: end; gap: 14px; }
.actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; align-items: center; }
.table-wrap { overflow-x: auto; margin-inline: -4px; }
table.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th { text-align: left; font-weight: 600; color: var(--ink-soft); padding: 10px 8px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.table td { padding: 12px 8px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table tr.off td { color: var(--ink-faint); }
.tag { display: inline-flex; height: 24px; align-items: center; padding: 0 10px; border-radius: var(--radius-pill); font-size: 12px; font-weight: 700; background: var(--surface-2); color: var(--ink-soft); }
.tag.admin { background: var(--lilac-soft); color: #7d4a73; }
.kv { display: grid; grid-template-columns: auto 1fr; gap: 8px 18px; font-size: 14px; }
.kv dt { color: var(--ink-soft); } .kv dd { margin: 0; font-weight: 600; color: var(--card-ink); }

/* диалог */
dialog { border: 0; border-radius: 24px; padding: 28px; max-width: min(460px, calc(100vw - 32px)); box-shadow: var(--glass-shadow); color: var(--ink); }
dialog::backdrop { background: #23202155; backdrop-filter: blur(3px); }
.secret { display: flex; gap: 8px; align-items: center; margin-top: 14px; padding: 12px 14px; border-radius: 12px; background: var(--surface-2);
          font: 700 18px/1 ui-monospace, "SF Mono", Menlo, monospace; letter-spacing: .04em; color: var(--card-ink); }
.secret code { flex: 1; overflow-wrap: anywhere; }

/* всплывающее сообщение */
.toast { position: fixed; left: 50%; top: calc(var(--header) + 14px); transform: translateX(-50%); z-index: 60; padding: 12px 20px; border-radius: var(--radius-pill);
         background: var(--card-ink); color: var(--on-ink); font-size: 14px; font-weight: 600; box-shadow: var(--glass-shadow); }

/* ── вход ── */
.login-page { min-height: 100vh; display: grid; place-items: center; padding: 24px; background: var(--surface-2); }
.login-card { width: min(420px, 100%); display: flex; flex-direction: column; gap: 22px; }
.login-card .logo { font-size: 26px; }
.login-card h1 { font-size: 30px; }
.login-card form { display: flex; flex-direction: column; gap: 16px; }
.login-card .btn { width: 100%; }

/* ── адаптив ── */
/* Ноутбуки: шапка с «← CRM» не влезала (на 1024 px — 1194 из 1024). EUR и USD нужны только для пошлины — прячем первыми. */
@media (max-width: 1439px) {
  .rates .rate:nth-last-child(2), .rates .rate:nth-last-child(3) { display: none; }
}
@media (max-width: 1180px) {
  .rates-note { display: none; }
  .nav { gap: 18px; }
  .hdr-in { gap: 20px; }          /* счётчик подборки (+17 px) не должен выталкивать шапку за край на 1024 */
  /* логотип как на сайте (183 px) + разделы + «← CRM» + три курса шире 1180: курсы — полосой под шапкой, как на планшете */
  .hdr-right .rates { display: none; }
  .rates-strip { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; padding: 0 var(--gutter) 10px; }
  .rates-strip::-webkit-scrollbar { display: none; }
  .rates-strip .rate { height: 28px; padding: 0 10px; font-size: 12px; }
  .rates-strip .rates-note { display: none; }
}
.login-card .logo-img { height: 24px; }
@media (max-width: 1023px) {
  .calc-grid { grid-template-columns: 1fr; }
  .car { position: static; order: -1; }
  .car-empty { min-height: 180px; }
  .hdr-in { gap: 16px; }
  /* планшеты: курсы — полосой под шапкой, как на телефоне; в одну строку с разделами они не помещались */
  .hdr-right .rates { display: none; }
  .rates-strip { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; padding: 0 var(--gutter) 10px; }
  .rates-strip::-webkit-scrollbar { display: none; }
  .rates-strip .rate { height: 28px; padding: 0 10px; font-size: 12px; }
  .rates-strip .rates-note { display: none; }
}
@media (max-width: 767px) {
  :root { --header: 64px; --gutter: 16px; }
  h1 { font-size: 28px; line-height: 32px; }
  main { padding-top: 24px; }
  .burger { display: grid; place-items: center; }
  .nav, .hdr-right .rates { display: none; }
  .hdr.open .mobile-panel { display: flex; }
  .mobile-panel { display: none; position: absolute; left: 0; right: 0; top: 100%; background: var(--surface); border-top: 1px solid var(--line);
                  box-shadow: 0 16px 30px #36333314; flex-direction: column; padding: 8px var(--gutter) 16px; }
  .mobile-panel a { font-size: 16px; font-weight: 500; line-height: 49px; text-decoration: none; border-bottom: 1px solid var(--line); }
  .rates-strip { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; padding: 0 var(--gutter) 10px; }
  .rates-strip::-webkit-scrollbar { display: none; }
  .rates-strip .rate { height: 28px; padding: 0 10px; font-size: 12px; }
  .rates-strip .rates-note { display: none; }
  .glass { padding: 22px; border-radius: 24px; }
  .linkbar form { flex-direction: column; }
  .linkbar .btn { width: 100%; }
  .row2 { grid-template-columns: 1fr 1fr; }
  .totalbar { bottom: 10px; padding-inline: 10px; }
  .totalbar-in { padding: 10px 10px 10px 20px; gap: 10px; }
  .tb-value { font-size: 22px; }
  .tb-actions .btn span { display: none; }
  .tb-actions .btn { padding: 0 16px; }
}
@media (min-width: 768px) { .mobile-panel { display: none !important; } }
@media (min-width: 1181px) { .rates-strip { display: none !important; } }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

/* ── панель «Цена в России · Дром» (web/assets/js/drom-panel.mjs) ── */
.drom { display: flex; flex-direction: column; gap: 16px; }
.drom-head { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; }
.drom-head h3 { margin-right: auto; }
.drom-head > svg { color: var(--ink-soft); }
.drom-state { display: inline-flex; align-items: center; gap: 6px; min-height: 26px; padding: 2px 10px; border-radius: var(--radius-pill);
              background: var(--surface-2); font-size: 12px; line-height: 1.3; font-weight: 700; color: var(--ink-soft); }
.drom-state svg { width: 14px; height: 14px; }
.drom-state.ok { background: var(--ok-soft); color: var(--ok); }
.drom-state.wait { background: var(--accent-soft); color: #9a3b12; }
.drom-state.off { background: var(--danger-soft); color: var(--danger); }
.drom-label { font-size: 13px; font-weight: 700; color: var(--ink-soft); }

.drom-compare { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; }
.drom-compare .drom-label { flex-basis: 100%; }
/* длинное название модели переносится внутри чипа, а не распирает колонку */
.drom .drom-what { height: auto; min-height: 32px; padding-block: 5px; white-space: normal; line-height: 1.35; max-width: 100%; }
.drom-editor { display: flex; flex-direction: column; gap: 12px; padding: 14px; border-radius: 14px; background: var(--surface-2); }
/* марка и модель: рядом на широком экране, на телефоне — одна колонка; общий .row2 не трогаем */
.drom-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; }
.drom-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.drom-pair.one { grid-template-columns: 1fr; max-width: 240px; }

.drom-cond { display: flex; flex-direction: column; gap: 10px; }
.drom-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.drom-wheel { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.drom-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.drom-limits:empty { display: none; }
.drom-limits { margin-top: -6px; }
.drom-out { display: flex; flex-direction: column; gap: 10px; }
.drom-notes:empty { display: none; }   /* пустой блок отказов не должен добавлять отступ колонки */
.drom-out > .notice { padding: 12px 14px; }
.drom-out > .btn { align-self: flex-start; }
.drom-nb { white-space: nowrap; }

.drom-range { font-size: 30px; font-weight: 900; letter-spacing: -.02em; line-height: 1.1; color: var(--card-ink); overflow-wrap: anywhere; }
.drom-median { font-size: 15px; color: var(--ink-soft); }
.drom-median b { color: var(--card-ink); font-weight: 700; }
.drom-cap { font-size: 13px; line-height: 1.5; color: var(--ink-soft); font-weight: 600; }
/* подпись «по чему считали» обязана читаться: не бледнее обычной подсказки */
.drom-sub { font-size: 13px; line-height: 1.5; color: var(--ink-soft); }
.drom-diff { font-size: 15px; font-weight: 600; color: var(--ink); }
.drom-diff b { font-weight: 800; }
.drom-diff.good { color: var(--ok); }
.drom-diff.bad { color: var(--danger); }

.drom-groups { display: flex; flex-direction: column; gap: 6px; }
.drom-group { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 12px; width: 100%;
              padding: 10px 14px; border: 0; border-radius: 12px; background: var(--surface-2); box-shadow: inset 0 0 0 1px transparent;
              font: 500 14px/1.3 var(--font-sans); color: var(--ink-soft); cursor: pointer; text-align: left;
              transition: box-shadow var(--dur) var(--ease), color var(--dur) var(--ease); }
.drom-group b { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 6px; font-weight: 700; color: var(--card-ink); }
.drom-group small { font-size: 12px; font-weight: 700; color: #9a3b12; }
.drom-group:hover { box-shadow: inset 0 0 0 1px var(--line-strong); }
.drom-group[aria-pressed="true"] { box-shadow: inset 0 0 0 2px var(--card-ink); color: var(--ink); }
.drom-tag { display: inline-flex; align-items: center; height: 20px; padding: 0 8px; border-radius: var(--radius-pill);
            background: var(--ok-soft); color: var(--ok); font-size: 11px; font-weight: 700; }
.drom-sug { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
/* общий .check.is-off даёт opacity .5 — вместе с бледным цветом текст недоступной галочки не читался */
.drom .check.is-off { cursor: default; opacity: 1; color: var(--ink-soft); }

.drom-power { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; padding: 12px 14px; border-radius: 14px;
              background: var(--lilac-soft); font-size: 14px; line-height: 1.5; color: #6b3f63; }
.drom-power svg { width: 18px; height: 18px; flex: none; }
.drom-power p { flex: 1 1 200px; }
.drom-link { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; font-weight: 600; }
.drom-link svg { width: 14px; height: 14px; }
.drom-client { font-weight: 600; align-items: flex-start; line-height: 1.4; }
.drom-client input { margin-top: 1px; }

/* место панели в «Расчёте»: правая колонка = машина + Дром (обёртку .calc-side и .drom-host создаёт calc.mjs).
   Липкая машина наехала бы на панель при прокрутке — внутри обёртки она обычная. */
.calc-side { display: flex; flex-direction: column; gap: 20px; min-width: 0; }
.calc-side > .car { position: static; }
/* в одну колонку: машина сверху (её order −1), калькулятор, панель — после него, рядом с итогом */
@media (max-width: 1023px) {
  .calc-side { display: contents; }
  .calc-side > .drom-host { order: 1; min-width: 0; }
}

@media (max-width: 767px) {
  .drom { padding: 18px 16px; }
  .drom-grid { grid-template-columns: 1fr; }
  .drom-actions .drom-check { flex: 1 1 100%; }
  .drom-range { font-size: 26px; }
}

/* ══════════ публикация страницы клиента ══════════ */

/* диалог шире обычного: в нём сетка фото и переключатели; на телефоне — во весь экран */
.offer-dialog { padding: 0; width: min(720px, 100vw - 32px); max-width: min(720px, 100vw - 32px); max-height: min(90vh, 880px); }
.offer-dialog[open] { display: flex; flex-direction: column; }
.od-head { display: flex; gap: 16px; align-items: flex-start; padding: 22px 24px 16px; border-bottom: 1px solid var(--line); }
.od-head h3 { font-size: 20px; }
.od-head .hint { margin-top: 4px; max-width: 52ch; }
.od-close { margin-left: auto; flex: none; width: 40px; height: 40px; border: 0; border-radius: 50%; background: var(--surface-2);
            color: var(--ink-soft); font: 400 24px/1 var(--font-sans); cursor: pointer; }
.od-close:hover:not(:disabled) { background: var(--line); color: var(--card-ink); }
.od-close:disabled { opacity: .4; cursor: default; }
.od-body { flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 20px 24px 24px;
           display: flex; flex-direction: column; gap: 22px; }
.od-warns { gap: 8px; }
.od-warns:empty { display: none; }
.od-warns .notice a { color: inherit; font-weight: 700; white-space: nowrap; }
.od-note { display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: baseline; font-size: 13px; }
.od-note b { font-weight: 700; color: var(--card-ink); }
.od-flag { font-size: 13px; line-height: 1.5; font-weight: 600; color: #9a3b12; }
.od-power { max-width: 200px; }
.check.is-off { opacity: .5; cursor: default; }
.od-textarea { height: auto; min-height: 140px; padding: 12px 16px; line-height: 1.5; resize: vertical; font-weight: 500; }
.offer-dialog.pool-import { width: min(560px, 100vw - 32px); max-width: min(560px, 100vw - 32px); }
/* ссылки по полям: окно своего размера не меняет, лишние поля уходят прокруткой вверх (владелец 11.10.2026) */
.link-rows { display: flex; flex-direction: column; gap: 10px; max-height: 300px; overflow-y: auto; overscroll-behavior: contain;
             padding: 2px 4px 2px 2px; scroll-behavior: smooth; }
.link-row { display: grid; grid-template-columns: 26px minmax(0, 1fr) 36px; gap: 4px 8px; align-items: center; }
.link-n { font-size: 13px; font-weight: 700; color: var(--ink-faint); text-align: right; }
.link-row .input { height: 44px; font-size: 14px; }
.link-del { width: 36px; height: 36px; font-size: 20px; line-height: 1; }
.link-err { grid-column: 2 / 4; font-size: 12px; line-height: 1.35; }
.link-err:empty { display: none; }
.link-row.is-err .input { box-shadow: inset 0 0 0 1.5px var(--danger); }
.link-row.is-err .link-err { color: var(--danger); }
.link-row.is-warn .input { box-shadow: inset 0 0 0 1.5px var(--accent); }
.link-row.is-warn .link-err { color: #9a3b12; }
.link-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; margin: 12px 0 8px; }
/* «Изменить» в подборке: цена и мощность, строки расчёта, живой итог */
.pe-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.pe-lines { margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: 10px; align-items: flex-start; }
.pe-lines-head { display: flex; flex-direction: column; gap: 2px; }
.pe-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 14px; width: 100%; }
.pe-grid .input { height: 40px; }
.pe-sum { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-top: 16px; padding: 14px 16px;
          border-radius: 14px; background: var(--surface-2, #f6f5f3); }
.pe-total { font-size: 22px; font-weight: 900; white-space: nowrap; }
.pool-notes:empty { display: none; }
/* «Отправить клиенту» (этап 4) */
.od-send { width: 100%; margin-bottom: 14px; }
.send-channels { display: flex; flex-direction: column; gap: 8px; }
.send-ch { display: flex; align-items: flex-start; gap: 10px; padding: 10px 14px; border-radius: 12px; background: var(--surface-2, #f6f5f3); cursor: pointer; }
.send-ch:has(input:checked) { box-shadow: inset 0 0 0 1.5px var(--accent); }
.send-ch input { margin-top: 3px; accent-color: var(--accent); }
.send-ch span { display: flex; flex-direction: column; gap: 2px; }
.send-ch small { font-size: 12px; color: var(--ink-soft); }
.send-reacts { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: 13px; }
.send-cabinet { display: flex; align-items: flex-start; gap: 10px; padding: 12px 14px; border-radius: 12px; background: var(--accent-soft); }
.send-cabinet span { display: flex; flex-direction: column; gap: 2px; }
.send-cabinet small { font-size: 12px; color: var(--ink-soft); }
/* «Так увидит клиент»: пузырь сообщения — жирный там, где мессенджер его покажет, ссылка — как придёт */
.send-pv-body { white-space: pre-wrap; overflow-wrap: anywhere; max-height: 260px; overflow-y: auto; padding: 12px 14px;
                border-radius: 14px 14px 14px 4px; background: var(--surface-2, #f6f5f3); box-shadow: inset 0 0 0 1px var(--line);
                font-size: 14px; line-height: 1.45; color: var(--ink); }
.send-pv-link { color: #2a6fdb; text-decoration: underline; text-underline-offset: 2px; }
.send-pv-note { color: var(--ink-soft); font-style: italic; }
.send-cabinet input { margin-top: 3px; accent-color: var(--accent); }
.send-ready { white-space: pre-wrap; word-break: break-word; padding: 12px 14px; border-radius: 12px; background: var(--surface-2, #f6f5f3); font: inherit; font-size: 14px; }
/* выбор клиента в плашке «Клиент из CRM» и переход между подборками клиентов */
.cb-empty-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 16px; }
.client-pick { margin-top: 12px; display: flex; flex-direction: column; gap: 8px; }
.cp-search { position: relative; display: block; }
.cp-search svg { position: absolute; left: 14px; top: 50%; width: 16px; height: 16px; transform: translateY(-50%); color: var(--ink-faint); pointer-events: none; }
.cp-search .input { padding-left: 40px; }
.cp-list { display: flex; flex-direction: column; gap: 6px; max-height: 320px; overflow-y: auto; overscroll-behavior: contain; }
.cp-item { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 10px; align-items: center; text-align: left; padding: 10px 14px;
           border: 0; border-radius: 12px; background: var(--surface-2, #f6f5f3); color: var(--ink); font: inherit; cursor: pointer; }
.cp-item:hover, .cp-item:focus-visible { box-shadow: inset 0 0 0 1.5px var(--accent); }
.cp-item b { font-weight: 700; }
.cp-item .cp-city { font-weight: 500; color: var(--ink-soft); }
.cp-item .cp-meta { grid-column: 1; font-size: 13px; color: var(--ink-soft); }
.cp-item .tag { grid-column: 2; grid-row: 1 / 3; }
.cp-status:empty { display: none; }
.cb-pick:empty { display: none; }
.pool-switch { display: flex; flex-direction: column; gap: 10px; }
.pool-switch:empty { display: none; }
.pool-general { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.pool-general span { flex: 1 1 260px; }
.pool-others { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.chip-btn { height: 32px; padding: 0 12px; border: 0; border-radius: var(--radius-pill); box-shadow: inset 0 0 0 1px var(--line-strong);
            background: var(--surface); color: var(--ink); font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; }
.chip-btn:hover { box-shadow: inset 0 0 0 1px var(--accent); color: var(--accent); }
@media (max-width: 560px) { .pe-row, .pe-grid { grid-template-columns: 1fr; } }

/* выбор фото */
.od-photos { display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 10px; }
.od-photo { display: flex; flex-direction: column; min-width: 0; }
.od-photo-pick { position: relative; width: 100%; aspect-ratio: 4 / 3; padding: 0; border: 0; border-radius: 12px; overflow: hidden;
                 background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--line); cursor: pointer; }
.od-photo-pick img { width: 100%; height: 100%; object-fit: cover; display: block; opacity: .45; transition: opacity var(--dur) var(--ease); }
.od-photo.is-on .od-photo-pick { box-shadow: 0 0 0 2px var(--accent); }
.od-photo.is-on .od-photo-pick img { opacity: 1; }
.od-photo.is-main .od-photo-pick { box-shadow: 0 0 0 3px var(--card-ink); }
.od-photo-mark { position: absolute; left: 6px; top: 6px; width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center;
                 background: #ffffffd9; box-shadow: inset 0 0 0 1px var(--line-strong); color: var(--card-ink); font: 800 12px/1 var(--font-sans); }
.od-photo-mark svg { width: 14px; height: 14px; }
.od-photo.is-on .od-photo-mark { background: var(--accent); color: #fff; box-shadow: none; }
.od-photo.is-main .od-photo-mark { background: var(--card-ink); color: var(--on-ink); }
.od-photo-fail { display: grid; place-items: center; height: 100%; padding: 4px; font-size: 12px; color: var(--ink-faint); text-align: center; }
.od-photo-main { display: block; width: 100%; margin-top: 2px; padding: 6px 0; border: 0; background: none;
                 font: 600 12px/1.3 var(--font-sans); color: var(--ink-faint); text-align: center; }
button.od-photo-main { cursor: pointer; text-decoration: underline; text-underline-offset: 2px; }
button.od-photo-main:hover { color: var(--accent); }
.od-photo.is-main > .od-photo-main { color: var(--card-ink); font-weight: 700; }

/* переключатели «что показать клиенту» */
.od-toggles { display: grid; gap: 16px; }
.switch { position: relative; display: flex; gap: 12px; align-items: flex-start; cursor: pointer; }
.switch input { position: absolute; left: 0; top: 0; width: 1px; height: 1px; margin: 0; opacity: 0; }
.switch-track { position: relative; flex: none; width: 44px; height: 26px; margin-top: 1px; border-radius: var(--radius-pill);
                background: var(--line-strong); transition: background var(--dur) var(--ease); }
.switch-knob { position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff;
               box-shadow: 0 1px 3px #36333340; transition: transform var(--dur) var(--ease); }
.switch input:checked + .switch-track { background: var(--accent); }
.switch input:checked + .switch-track .switch-knob { transform: translateX(18px); }
.switch input:focus-visible + .switch-track { outline: 2px solid var(--accent); outline-offset: 2px; }
.switch-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.switch-text b { font-size: 15px; font-weight: 600; color: var(--card-ink); }
.switch.is-off { cursor: default; }
.switch.is-off .switch-track, .switch.is-off b { opacity: .5; }

.od-sign { padding: 12px 14px; border-radius: 12px; background: var(--surface-2); font-size: 14px; color: var(--ink-soft); overflow-wrap: anywhere; }
.od-sign b { color: var(--card-ink); }
.od-list { list-style: none; counter-reset: variant; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; font-size: 15px; }
.od-list li { display: flex; gap: 8px; align-items: baseline; border-bottom: 1px solid var(--line); padding-bottom: 8px; min-width: 0; }
.od-list li::before { counter-increment: variant; content: counter(variant) "."; flex: none; color: var(--ink-faint); font-weight: 700; }
.od-list li > span { min-width: 0; overflow-wrap: anywhere; }
.od-list li b { margin-left: auto; white-space: nowrap; color: var(--card-ink); }

.od-total { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 14px; padding: 14px 24px;
            border-top: 1px solid var(--line); background: var(--surface-2); }
.od-total:empty { display: none; }
.od-total-label { font-size: 13px; font-weight: 600; color: var(--ink-soft); }
.od-total b { margin-left: auto; font-size: 24px; font-weight: 900; letter-spacing: -.02em; color: var(--card-ink); }
.od-total .od-flag { flex-basis: 100%; }
.od-foot { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; padding: 14px 24px; border-top: 1px solid var(--line); }
.od-foot-btns { display: flex; gap: 10px; margin-left: auto; }
.od-private { display: flex; gap: 8px; align-items: flex-start; }
.od-private svg { width: 16px; height: 16px; margin-top: 2px; color: var(--ink-faint); }
.od-why { flex-basis: 100%; text-align: right; font-weight: 600; }
.od-why:empty { display: none; }
.od-linkbox .input { font-weight: 600; }
.od-result-btns { display: flex; flex-wrap: wrap; gap: 10px; }
.od-fails { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.od-fails li { display: flex; flex-direction: column; gap: 2px; min-width: 0; padding: 8px 12px; border-radius: 10px;
               background: var(--surface-2); font-size: 13px; line-height: 1.45; color: var(--ink); }
.od-fails li.is-err { background: var(--danger-soft); color: var(--danger); }
.od-fails li.is-warn { background: var(--accent-soft); color: #9a3b12; }
.od-fail-url { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; color: var(--ink-soft); }

@media (max-width: 767px) {
  .offer-dialog, .offer-dialog[open] { width: 100vw; max-width: 100vw; height: 100vh; height: 100dvh;
    max-height: 100vh; max-height: 100dvh; margin: 0; border-radius: 0; }
  .od-head, .od-body, .od-total, .od-foot { padding-inline: 16px; }
  .od-head { padding-top: 14px; }
  /* колонкой и без переноса: flex-basis: 100% у строки «почему нельзя» в колонке — это высота, и она уехала бы вбок */
  .od-foot { flex-direction: column; flex-wrap: nowrap; align-items: stretch; padding-bottom: max(14px, env(safe-area-inset-bottom)); }
  .od-why { flex-basis: auto; }
  .od-foot-btns { margin-left: 0; }
  .od-total { padding-block: 10px; }
  .od-total b { margin-left: 0; }
  .od-foot-btns .btn { flex: 1 1 auto; --h: 48px; padding: 0 18px; }
  .od-why { text-align: left; }
  .od-photos { grid-template-columns: repeat(auto-fill, minmax(88px, 1fr)); gap: 8px; }
  .od-power { max-width: none; }
  .od-result-btns .btn { flex: 1 1 140px; --h: 48px; padding: 0 16px; }
  .od-total b { font-size: 20px; }
}

/* ══════════ подборка ══════════ */

.pool-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 20px; }
.pool-loading, .offers-loading { display: flex; align-items: center; gap: 10px; padding: 24px 0; }
.pool-list { display: grid; gap: 16px; }
.pool-card { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 18px; padding: 16px;
             background: var(--card); border-radius: var(--radius-card); box-shadow: inset 0 0 0 1px var(--line);
             transition: box-shadow var(--dur) var(--ease); }
.pool-card.is-off .pool-media img { opacity: .4; }
.pool-card.is-off .pool-badge { background: #23202180; }
.pool-media { position: relative; aspect-ratio: 4 / 3; border-radius: 14px; overflow: hidden; background: var(--surface-2); align-self: start; }
.pool-media img { width: 100%; height: 100%; object-fit: cover; display: block; transition: opacity var(--dur) var(--ease); }
.pool-nophoto { position: absolute; inset: 0; display: grid; place-items: center; padding: 8px; text-align: center;
                font-size: 13px; color: var(--ink-faint); }
.pool-badge { position: absolute; left: 8px; bottom: 8px; padding: 4px 10px; border-radius: var(--radius-pill);
              background: #232021cc; color: var(--on-ink); font-size: 12px; font-weight: 700; }
.pool-check { position: absolute; right: 8px; top: 8px; width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center;
              background: #ffffffe0; box-shadow: inset 0 0 0 1px var(--line-strong); cursor: pointer; }
.pool-check input { width: 20px; height: 20px; margin: 0; accent-color: var(--accent); cursor: pointer; }
.pool-body { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.pool-sum { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; }
.pool-sum b { font-size: 24px; font-weight: 900; letter-spacing: -.02em; color: var(--card-ink); }
.pool-sum b.is-empty { font-size: 17px; font-weight: 700; letter-spacing: 0; color: var(--ink-soft); }
.pool-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; margin-top: auto; }
.pool-order { display: flex; gap: 6px; }
.pool-src { display: inline-flex; align-items: center; gap: 4px; font-size: 14px; font-weight: 600; color: var(--ink-soft); }
.pool-src svg { width: 14px; height: 14px; }
.pool-remove { margin-left: auto; }
.icon-btn { width: 40px; height: 40px; border: 0; border-radius: 12px; display: grid; place-items: center;
            background: var(--surface-2); color: var(--ink); cursor: pointer; transition: background var(--dur) var(--ease); }
.icon-btn:hover:not(:disabled) { background: var(--line); color: var(--card-ink); }
.icon-btn:disabled { opacity: .35; cursor: default; }
.pool-empty { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 48px 24px; text-align: center;
              border-radius: var(--radius-panel); background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--line); }
.pool-empty > svg { width: 48px; height: 48px; color: var(--ink-faint); }   /* только заглавная иконка: в кнопках — свои 18 px */
.pool-empty .hint { max-width: 480px; }
.pool-empty .actions { justify-content: center; margin-top: 8px; }

.cmp-wrap { margin-top: 32px; }
.cmp-wrap:empty { display: none; }
.cmp-in { display: flex; flex-direction: column; gap: 10px; }
.cmp-head { font-size: 22px; margin-bottom: 4px; }
.cmp-scroll { border-radius: 12px; }
.cmp-table thead th { vertical-align: top; min-width: 160px; white-space: normal; }
.cmp-table thead b { display: block; margin-top: 6px; font-size: 14px; line-height: 1.35; color: var(--card-ink); }
.cmp-table th[scope="row"] { color: var(--ink-soft); font-weight: 600; white-space: nowrap; padding: 12px 8px; }
.cmp-table td { white-space: nowrap; }
.cmp-total th, .cmp-total td { font-weight: 800; color: var(--card-ink); border-bottom: 0; font-size: 15px; }
.cmp-table td.is-best { color: var(--ok); }

/* нижняя стеклянная плашка — как итог в расчёте */
.poolbar { position: fixed; left: 0; right: 0; bottom: 18px; z-index: 40; pointer-events: none; }
.poolbar-in { pointer-events: auto; max-width: calc(var(--container) - 2 * var(--gutter)); margin-inline: auto; display: flex; align-items: center;
              gap: 18px; padding: 12px 12px 12px 28px; border-radius: var(--radius-pill); background: var(--glass-bg);
              border: 1px solid var(--glass-border); box-shadow: inset 0 1px 0 #ffffff73, var(--glass-shadow);
              backdrop-filter: blur(24px) saturate(160%); -webkit-backdrop-filter: blur(24px) saturate(160%); }
.poolbar-text { min-width: 0; }
.poolbar .tb-value { font-size: 22px; }
.poolbar-btns { margin-left: auto; display: flex; gap: 8px; flex: none; }

@media (max-width: 767px) {
  .pool-card { grid-template-columns: 1fr; padding: 12px; gap: 14px; }
  .pool-sum b { font-size: 22px; }
  .pool-actions .btn { flex: 1 1 auto; }
  .cmp-head { font-size: 19px; }
  .poolbar { bottom: 10px; padding-inline: 10px; }
  .poolbar-in { padding: 8px 8px 8px 18px; gap: 10px; }
  .poolbar .tb-label { font-size: 12px; }
  .poolbar .tb-value { font-size: 15px; line-height: 1.25; letter-spacing: -.01em; }
  .poolbar-btns .btn span { display: none; }
  .poolbar-btns .btn { --h: 44px; padding: 0 14px; }
}

/* ══════════ мои предложения ══════════ */

.offers-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; margin-bottom: 20px; }
.offers-filters { display: flex; flex-wrap: wrap; gap: 8px 16px; }
.offers-search { display: flex; gap: 10px; margin-left: auto; flex: 1 1 260px; max-width: 460px; }
.offers-search .input { height: 40px; }
.offers-search .select { height: 40px; width: auto; flex: none; }
.offers-table td { vertical-align: top; }
.offers-table td.num { white-space: nowrap; }       /* «от 3 500 000 ₽» и «15 сентября» не рвём на строки */
.offer-name { display: flex; flex-wrap: wrap; gap: 6px 8px; align-items: baseline; }
.offer-name b { font-size: 15px; color: var(--card-ink); overflow-wrap: anywhere; }
.offer-sub { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 10px; margin-top: 4px; }
.offer-url { font-size: 12px; color: var(--ink-faint); text-decoration: none; overflow-wrap: anywhere; }
.offer-url:hover { color: var(--accent); }
.cell-stack { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; }
.status-tag { display: inline-flex; height: 24px; align-items: center; padding: 0 10px; border-radius: var(--radius-pill);
              font-size: 12px; font-weight: 700; background: var(--surface-2); color: var(--ink-soft); white-space: nowrap; }
.status-tag.is-active { background: var(--ok-soft); color: var(--ok); }
.status-tag.is-expired { background: var(--accent-soft); color: #9a3b12; }
.status-tag.is-withdrawn { background: var(--danger-soft); color: var(--danger); }
.is-urgent { color: #9a3b12; font-weight: 600; }
.offers-table th:last-child, .offers-table td.row-actions-cell { text-align: right; }
.offers-table td.row-actions-cell { min-width: 280px; }
.row-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; justify-content: flex-end; }
.row-actions .btn { --h: 32px; padding: 0 12px; gap: 6px; font-size: 13px; }
.row-actions .btn svg { width: 15px; height: 15px; }
.row-actions .is-danger { color: var(--danger); box-shadow: inset 0 0 0 1px #c2410c40; }
.row-actions .is-danger:hover:not(:disabled) { color: var(--danger); box-shadow: inset 0 0 0 1px var(--danger); }
.row-actions .spin { width: 16px; height: 16px; color: var(--ink-soft); }
.row-note { margin-top: 6px; text-align: right; }
.offers-more { display: flex; justify-content: center; margin-top: 20px; }

@media (max-width: 767px) {
  .offers-search { margin-left: 0; max-width: none; flex-basis: 100%; }
  .offers-box .table-wrap { overflow-x: visible; margin-inline: 0; }
  .offers-table, .offers-table tbody, .offers-table tr, .offers-table td { display: block; width: 100%; }
  .offers-table thead { display: none; }
  .offers-table tr { margin-bottom: 12px; padding: 14px 16px; background: var(--card); border-radius: var(--radius-card); box-shadow: inset 0 0 0 1px var(--line); }
  .offers-table td { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 6px 0; border-bottom: 0; text-align: right; }
  .offers-table td::before { content: attr(data-label); flex: none; font-size: 13px; color: var(--ink-soft); text-align: left; }
  .offers-table td.cell-main, .offers-table td.row-actions-cell { display: block; text-align: left; min-width: 0; }
  .offers-table td.cell-main { padding-bottom: 10px; margin-bottom: 4px; border-bottom: 1px solid var(--line); }
  .offers-table td.cell-main::before, .offers-table td.row-actions-cell::before { display: none; }
  .cell-stack { align-items: flex-end; }
  .row-actions { justify-content: flex-start; margin-top: 8px; }
  .row-actions .btn { --h: 40px; padding: 0 14px; }
  .row-note { text-align: left; }
}

/* счётчик подборки в меню */
.nav-badge { display: inline-flex; min-width: 18px; height: 18px; margin-left: 6px; padding: 0 5px; border-radius: var(--radius-pill);
             align-items: center; justify-content: center; background: var(--accent); color: #fff; font-size: 11px; font-weight: 700; }

/* ── аукционный лист в калькуляторе (sheet-panel.mjs, 13.10.2026) ── */
.sheet { display: flex; flex-direction: column; gap: 14px; padding: 24px 28px; }
.sheet-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 12px; }
.drop-zone { display: flex; align-items: center; gap: 14px; padding: 18px 20px; border: 1.5px dashed var(--line-strong); border-radius: 16px;
  font-size: 14px; line-height: 1.5; color: var(--ink-soft); cursor: pointer; transition: border-color .15s, background .15s; }
.drop-zone svg { width: 26px; height: 26px; flex: none; color: var(--accent); }
.drop-zone b { color: var(--card-ink); }
.drop-zone:hover, .drop-zone.is-over, .drop-zone:focus-visible { border-color: var(--accent); background: var(--accent-soft); outline: none; }
.sheet-busy { display: flex; align-items: center; gap: 14px; }
.sheet-busy img { width: 88px; height: 88px; flex: none; object-fit: cover; border-radius: 10px; box-shadow: inset 0 0 0 1px var(--line); }
.sheet-busy .hint { display: flex; align-items: center; gap: 8px; }
.sheet-meta { display: flex; flex-direction: column; gap: 2px; }
.sheet-meta p { margin: 0; }
.sheet-doubt { color: #9a3b12; font-weight: 600; }
.sheet-lines { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.sheet-lines li { position: relative; display: flex; align-items: flex-start; gap: 6px; padding-left: 18px; }
.sheet-lines li::before { content: ""; position: absolute; left: 3px; top: 17px; width: 9px; height: 9px; border-radius: 50%; background: var(--ok); }
.sheet-lines li.tone-info::before { background: var(--ink-faint); }
.sheet-lines li.tone-warn::before { background: var(--danger); }
.sheet-lines .input { flex: 1; min-width: 0; height: auto; min-height: 42px; padding: 10px 12px; font: inherit; font-size: 14px; line-height: 1.45;
  resize: none; field-sizing: content; }             /* растёт по тексту: строку видно целиком */
.sheet-lines .btn-icon { width: 36px; height: 36px; flex: none; display: grid; place-items: center; border: 0; border-radius: 10px;
  background: transparent; color: var(--ink-faint); cursor: pointer; }
.sheet-lines .btn-icon:hover { color: var(--danger); background: var(--danger-soft); }
.sheet-lines .btn-icon svg { width: 18px; height: 18px; }
.sheet-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; }
@media (max-width: 640px) { .sheet, .photos-own { padding: 20px; } .drop-zone { padding: 16px; } }

/* ── свои фото в калькуляторе (photos-panel.mjs, 14.10.2026) ── */
.photos-own { display: flex; flex-direction: column; gap: 14px; padding: 24px 28px; }
.drop-zone .btn-link { font: inherit; }
.own-busy { display: flex; align-items: center; gap: 8px; }
.own-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(112px, 1fr)); gap: 10px; }
.own-grid li { position: relative; display: flex; flex-direction: column; gap: 4px; }
.own-grid img, .own-fail { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 10px; background: var(--surface-2);
  box-shadow: inset 0 0 0 1px var(--line); }
.own-fail { display: grid; place-items: center; font-size: 12px; color: var(--ink-faint); }
.own-grid li.is-main img { box-shadow: 0 0 0 2px var(--accent); }
.own-main { align-self: flex-start; padding: 0; border: 0; background: none; font: inherit; font-size: 12px; color: var(--ink-soft); cursor: pointer; }
span.own-main { color: var(--accent-deep, #e8642c); font-weight: 600; cursor: default; }
button.own-main:hover { color: var(--card-ink); text-decoration: underline; }
.own-del { position: absolute; top: 6px; right: 6px; width: 28px; height: 28px; display: grid; place-items: center; border: 0; border-radius: 50%;
  background: #000000a6; color: #fff; font-size: 18px; line-height: 1; cursor: pointer; }
.own-del:hover { background: var(--danger); }
