/* Закупки ТЕХ: стили кабинета, лендинга и кабинета оператора.
   Всё своё: шрифт заголовков (Montserrat, OFL) лежит рядом, внешних шрифтов и
   библиотек нет - сервер заказчика может быть без интернета, а политика
   безопасности страниц (CSP) не пускает чужие файлы и встроенные стили. */

@font-face {
  font-family: "Montserrat";
  src: url("fonts/Montserrat-Bold.ttf") format("truetype");
  font-weight: 600 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #F4F6FB; --surface: #FFFFFF; --surface-2: #EDF2FC; --line: #DCE3F1; --line-2: #C9D4EC;
  --ink: #131A3F; --head: #1E2A6E; --accent: #2E6BE6; --accent-ink: #FFFFFF; --accent-soft: #E3ECFD; --muted: #5A6275;
  --good: #1B8F59; --good-bg: #E2F4EA; --warn: #B96B12; --warn-bg: #FBEEDC; --bad: #C63D3D; --bad-bg: #FBE6E6; --info-bg: #E3ECFD;
  --teal: #0B7F8A; --teal-bg: #E0F4F5;
  --c-bar: #D3DEF6; --c-sel: #2E6BE6; --c-kp: #0E9AA7; --c-sent: #1B8F59;
  --pix-a: #1E2A6E; --pix-b: #2E6BE6;
  --shadow: 0 1px 2px rgba(19, 26, 63, .05), 0 6px 20px rgba(19, 26, 63, .06);
  --r: 10px;
  --f-d: "Montserrat", "Segoe UI", system-ui, -apple-system, Arial, sans-serif;
  --f-b: "Manrope", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  --f-m: ui-monospace, Menlo, Consolas, "SF Mono", monospace;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #0B1026; --surface: #121A3A; --surface-2: #18224A; --line: #26315C; --line-2: #34417A;
    --ink: #E6EBFA; --head: #CBD7FB; --accent: #5C8EF3; --accent-ink: #0B1026; --accent-soft: #1D2A5C; --muted: #9AA5C8;
    --good: #45C98C; --good-bg: #12342A; --warn: #E8A24E; --warn-bg: #3A2A14; --bad: #F07373; --bad-bg: #3D1C24; --info-bg: #1D2A5C;
    --teal: #33C2CE; --teal-bg: #10363B;
    --c-bar: #233066; --c-sel: #5C8EF3; --c-kp: #33C2CE; --c-sent: #45C98C; --pix-a: #B3C3F6; --pix-b: #5C8EF3;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px rgba(0, 0, 0, .25);
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0B1026; --surface: #121A3A; --surface-2: #18224A; --line: #26315C; --line-2: #34417A;
  --ink: #E6EBFA; --head: #CBD7FB; --accent: #5C8EF3; --accent-ink: #0B1026; --accent-soft: #1D2A5C; --muted: #9AA5C8;
  --good: #45C98C; --good-bg: #12342A; --warn: #E8A24E; --warn-bg: #3A2A14; --bad: #F07373; --bad-bg: #3D1C24; --info-bg: #1D2A5C;
  --teal: #33C2CE; --teal-bg: #10363B;
  --c-bar: #233066; --c-sel: #5C8EF3; --c-kp: #33C2CE; --c-sent: #45C98C; --pix-a: #B3C3F6; --pix-b: #5C8EF3;
  --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px rgba(0, 0, 0, .25);
}

/* --- основа ------------------------------------------------------------------------------- */
* { box-sizing: border-box; }
html, body { background: var(--bg); }
body {
  margin: 0; color: var(--ink); font-family: var(--f-b); font-size: 15px; line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4 { font-family: var(--f-d); color: var(--head); line-height: 1.18; margin: 0; text-wrap: balance; letter-spacing: -.01em; }
h1 { font-size: 26px; font-weight: 800; }
h2 { font-size: 17px; font-weight: 700; }
h3 { font-size: 15px; font-weight: 700; }
p { margin: 0; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; }
[hidden] { display: none !important; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.num, td.n, th.n, .tnum { font-variant-numeric: tabular-nums; }
.eyebrow { font-family: var(--f-d); font-weight: 700; font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: var(--accent); }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.tiny { font-size: 12px; }
.warn { color: var(--warn); }
.bad { color: var(--bad); }
.good { color: var(--good); }
.mono { font-family: var(--f-m); font-size: 12.5px; }
.center { text-align: center; }
.right, .ta-r { text-align: right; }
.nowrap { white-space: nowrap; }
.b { font-weight: 700; }
.fw6 { font-weight: 600; }
.fw8 { font-weight: 800; }
.headc { color: var(--head); }
.wrap { max-width: 1160px; margin: 0 auto; padding-inline: 20px; }
.mt-4 { margin-top: 4px; } .mt-8 { margin-top: 8px; } .mt-12 { margin-top: 12px; } .mt-16 { margin-top: 16px; } .mt-20 { margin-top: 20px; }
.mb-8 { margin-bottom: 8px; } .mb-12 { margin-bottom: 12px; } .mb-16 { margin-bottom: 16px; }
.ml-8 { margin-left: 8px; } .ml-auto { margin-left: auto; }
.maxw-280 { max-width: 280px; } .maxw-360 { max-width: 360px; } .maxw-560 { max-width: 560px; } .maxw-62 { max-width: 62ch; }
.grow { flex: 1; min-width: 0; }
.cut { max-width: 340px; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.cut-1 { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* --- кнопки ------------------------------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 1px solid transparent;
  border-radius: 8px; padding: 10px 18px; font-weight: 700; font-size: 14px; line-height: 1.2; cursor: pointer;
  text-decoration: none; white-space: nowrap; background: var(--surface); color: var(--head); border-color: var(--line-2);
  transition: background .15s, border-color .15s, filter .15s;
}
.btn:hover { text-decoration: none; border-color: var(--accent); }
.btn-p, .btn-primary { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.btn-p:hover, .btn-primary:hover { filter: brightness(1.07); }
.btn-s { background: var(--surface); border-color: var(--line-2); color: var(--head); }
.btn-g, .btn-ghost { background: transparent; color: var(--accent); border-color: transparent; padding-inline: 10px; }
.btn-g:hover, .btn-ghost:hover { background: var(--surface-2); border-color: transparent; }
.btn-d { background: var(--bad-bg); color: var(--bad); border-color: transparent; }
.btn-d:hover { border-color: var(--bad); }
.btn-sm, .btn-small { padding: 6px 12px; font-size: 13px; }
.btn-lg { padding: 14px 24px; font-size: 15px; }
.btn[disabled], .btn.disabled { opacity: .5; cursor: not-allowed; }
.linklike { background: none; border: 0; padding: 0; color: var(--accent); cursor: pointer; font: inherit; text-decoration: underline; }
.actions-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.actions-row.end { justify-content: flex-end; }
form.inline { display: inline; }

/* --- логотип ------------------------------------------------------------------------------ */
.logo { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; color: inherit; }
.logo:hover { text-decoration: none; }
.logo-icons { display: flex; align-items: center; gap: 5px; }
.logo-icons svg { display: block; }
.logo-word { font-family: var(--f-d); font-weight: 800; font-size: 18px; letter-spacing: .04em; color: var(--pix-a); white-space: nowrap; text-transform: uppercase; }
.logo-word b { color: var(--pix-b); }
.pa { fill: var(--pix-a); } .pb { fill: var(--pix-b); } .pw { fill: #fff; }

/* --- формы -------------------------------------------------------------------------------- */
.fld { display: grid; gap: 6px; min-width: 0; }
.fld > label, .fld > .lbl { font-size: 13px; font-weight: 700; color: var(--muted); }
.fld .hint { font-size: 12px; color: var(--muted); }
label { color: var(--muted); }
.inp, input[type=text], input[type=search], input[type=email], input[type=tel], input[type=password],
input[type=number], input[type=date], input[type=url], input:not([type]), select, textarea {
  width: 100%; background: var(--surface); border: 1px solid var(--line-2); border-radius: 8px; padding: 9px 12px;
  font-size: 14px; color: var(--ink); min-width: 0;
}
.inp:focus, input:focus, select:focus, textarea:focus { border-color: var(--accent); outline: none; box-shadow: 0 0 0 3px var(--accent-soft); }
textarea { resize: vertical; min-height: 84px; line-height: 1.5; }
textarea[rows="2"], textarea[rows="3"] { min-height: 0; }
input[type=checkbox], input[type=radio] { width: 16px; height: 16px; accent-color: var(--accent); margin: 0; flex: none; }
input[type=file] { font-size: 13px; color: var(--muted); }
input:disabled, select:disabled, textarea:disabled { background: var(--surface-2); color: var(--muted); }
.sel { width: auto; background: var(--surface); border: 1px solid var(--line-2); border-radius: 8px; padding: 7px 10px; font-size: 13px; font-weight: 600; max-width: 100%; }
.sel-sm { padding: 5px 8px; }
.pform { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.pform .full, .form-grid .full { grid-column: 1 / -1; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.sec-t { font-family: var(--f-d); font-weight: 700; color: var(--head); font-size: 15px; margin-top: 6px; }
.check, label.check { display: flex; gap: 8px; align-items: center; font-size: 14px; color: var(--ink); font-weight: 500; cursor: pointer; }
.check input { margin-top: 0; }
.checks { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 16px; }
.checks.one { grid-template-columns: minmax(0, 1fr); }
.checks label { display: flex; gap: 8px; align-items: center; font-size: 14px; color: var(--ink); }
.switch { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; font-weight: 600; color: var(--ink); }
.switch input { appearance: none; -webkit-appearance: none; width: 38px; height: 22px; background: var(--line-2); border-radius: 11px; position: relative; cursor: pointer; transition: background .15s; margin: 0; border: 0; }
.switch input::after { content: ""; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 4px; background: #fff; transition: left .15s; }
.switch input:checked { background: var(--accent); }
.switch input:checked::after { left: 19px; }
.switch input:disabled { opacity: .6; }
.trap { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.w-unit { width: 84px; } .w-money { width: 130px; } .w-area { width: 90px; } .w-name { width: 240px; max-width: 100%; } .w-num { width: 96px; }

/* --- лендинг ------------------------------------------------------------------------------ */
.l-top { position: sticky; top: 0; z-index: 20; background: color-mix(in srgb, var(--bg) 90%, transparent); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.l-top .wrap { display: flex; align-items: center; gap: 24px; padding-block: 12px; }
.l-nav { display: flex; gap: 22px; margin-left: auto; }
.l-nav a { color: var(--muted); text-decoration: none; font-weight: 600; font-size: 14px; }
.l-nav a:hover { color: var(--head); }
.l-actions { display: flex; gap: 8px; margin-left: auto; }
.l-nav + .l-actions { margin-left: 0; }
.hero { padding-block: 56px 64px; position: relative; overflow: hidden; }
.hero::before { content: ""; position: absolute; inset: 0; background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px); background-size: 28px 28px; opacity: .45; mask-image: linear-gradient(100deg, transparent 35%, #000 80%); -webkit-mask-image: linear-gradient(100deg, transparent 35%, #000 80%); pointer-events: none; }
.hero .wrap { position: relative; display: grid; grid-template-columns: 1.1fr .9fr; gap: 48px; align-items: center; }
.hero h1 { font-size: clamp(32px, 4.6vw, 54px); font-weight: 800; margin-block: 14px 18px; }
.hero h1 em { font-style: normal; color: var(--accent); }
.hero .lead { font-size: 18px; color: var(--muted); max-width: 56ch; }
.hero .cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.hero-card { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow); padding: 22px; }
.hc-head { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; margin-bottom: 16px; }
.hc-head h3 { font-size: 16px; }
.demo-tag { display: inline-block; font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; background: var(--warn-bg); color: var(--warn); border-radius: 4px; padding: 3px 7px; white-space: nowrap; }
.fun-row { display: grid; grid-template-columns: 130px 1fr 70px; gap: 12px; align-items: center; padding-block: 7px; }
.fun-row .lbl { font-size: 13px; color: var(--muted); font-weight: 600; }
.fun-row .val { font-family: var(--f-d); font-weight: 700; text-align: right; color: var(--head); font-variant-numeric: tabular-nums; }
.pixbar { height: 14px; display: flex; gap: 2px; flex-wrap: nowrap; overflow: hidden; }
.pixbar i { flex: 0 0 10px; height: 14px; background: var(--accent); border-radius: 1px; }
.pixbar i.off { background: var(--surface-2); }
.hc-lead { margin-top: 16px; border-top: 1px dashed var(--line-2); padding-top: 14px; font-size: 13px; }
.hc-lead b { color: var(--head); }
.sec { padding-block: 64px; }
.sec-alt { background: var(--surface); border-block: 1px solid var(--line); }
.sec h2 { font-size: clamp(26px, 3vw, 36px); font-weight: 800; margin-block: 10px 14px; }
.sec .sub { color: var(--muted); font-size: 17px; max-width: 62ch; }
.two { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; margin-top: 32px; }
.pain { border: 1px solid var(--line); border-radius: var(--r); padding: 24px; background: var(--surface); }
.pain.us { background: var(--head); border-color: var(--head); }
.pain.us h3, .pain.us p { color: var(--surface); }
.pain h3 { font-size: 19px; margin-bottom: 10px; }
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; margin-top: 36px; }
.step { padding: 22px 22px 22px 0; border-top: 3px solid var(--line-2); position: relative; }
.step:first-child { border-top-color: var(--accent); }
.step .k { font-family: var(--f-d); font-weight: 800; font-size: 13px; color: var(--accent); letter-spacing: .08em; }
.step h3 { font-size: 17px; margin-block: 10px 8px; }
.step p { color: var(--muted); font-size: 14px; }
.step svg { margin-top: 4px; }
.cmp { width: 100%; border-collapse: collapse; margin-top: 28px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
.cmp th, .cmp td { padding: 14px 18px; text-align: left; border-bottom: 1px solid var(--line); font-size: 15px; vertical-align: top; }
.cmp thead th { font-family: var(--f-d); font-size: 13px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); background: var(--surface-2); }
.cmp thead th:last-child { color: var(--accent); }
.cmp td:first-child { color: var(--muted); font-weight: 600; width: 28%; }
.cmp td:last-child { font-weight: 600; color: var(--head); }
.cmp tr:last-child td { border-bottom: 0; }
.who { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; margin-top: 32px; }
.who div { padding-top: 18px; border-top: 1px solid var(--line-2); }
.who h3 { font-size: 17px; margin-bottom: 8px; }
.who p { color: var(--muted); font-size: 14px; }
.price-grid { display: grid; grid-template-columns: 1.05fr 1fr; gap: 24px; margin-top: 32px; align-items: stretch; }
.tariff { background: var(--surface); border: 2px solid var(--accent); border-radius: 14px; padding: 28px; box-shadow: var(--shadow); display: flex; flex-direction: column; }
.tariff h3 { font-size: 20px; }
.tariff .price { font-family: var(--f-d); font-weight: 800; font-size: 44px; color: var(--head); margin-block: 10px 2px; font-variant-numeric: tabular-nums; }
.tariff .price small { font-size: 16px; font-weight: 600; color: var(--muted); }
.ticks { list-style: none; padding: 0; margin: 20px 0 24px; display: grid; gap: 10px; }
.ticks li { padding-left: 26px; position: relative; }
.ticks li::before { content: ""; position: absolute; left: 0; top: 6px; width: 12px; height: 12px; background: var(--accent); box-shadow: 4px 4px 0 -2px var(--pix-a); }
.tariff .btn { margin-top: auto; }
.pilot { border: 1px solid var(--line); border-radius: 14px; padding: 28px; background: var(--surface-2); }
.pilot h3 { font-size: 20px; margin-bottom: 6px; }
.pilot .cols { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; margin-top: 18px; }
.pilot h4 { font-size: 13px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin-bottom: 8px; }
.pilot ul { margin: 0; padding-left: 18px; display: grid; gap: 6px; font-size: 14px; }
.faq { margin-top: 28px; display: grid; gap: 0; border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); padding-block: 4px; }
.faq summary { cursor: pointer; list-style: none; padding: 16px 36px 16px 0; font-family: var(--f-d); font-weight: 700; color: var(--head); font-size: 16px; position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 4px; top: 12px; font-size: 22px; color: var(--accent); font-weight: 600; }
.faq details[open] summary::after { content: "–"; }
.faq details p { padding: 0 0 18px; color: var(--muted); max-width: 70ch; }
.req { display: grid; grid-template-columns: .9fr 1.1fr; gap: 40px; align-items: start; }
.ok-msg { background: var(--good-bg); color: var(--good); border-radius: 8px; padding: 14px 16px; font-weight: 600; }
.err-msg { color: var(--bad); font-size: 13px; }
.l-foot { border-top: 1px solid var(--line); padding-block: 32px; background: var(--surface); }
.l-foot .wrap { display: flex; flex-wrap: wrap; gap: 24px; justify-content: space-between; align-items: center; }
.l-foot .c { display: flex; gap: 24px; flex-wrap: wrap; font-size: 14px; color: var(--muted); }
.l-foot .c a { color: var(--muted); }
.copy { user-select: all; color: var(--head); font-weight: 600; }

/* --- вход --------------------------------------------------------------------------------- */
.login { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 440px); justify-content: center; align-items: center; padding-block: 48px; }
.login-card { width: 100%; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow); padding: 28px; display: grid; gap: 16px; }
.login-card.wide { max-width: 560px; }
.login.wide { grid-template-columns: minmax(0, 600px); }
.tabs { display: flex; gap: 4px; background: var(--surface-2); padding: 4px; border-radius: 9px; }
.tabs a, .tabs button { flex: 1; border: 0; background: transparent; padding: 8px; border-radius: 7px; font-weight: 700; color: var(--muted); cursor: pointer; text-align: center; text-decoration: none; font-size: 14px; }
.tabs a.on, .tabs button.on { background: var(--surface); color: var(--head); box-shadow: 0 1px 3px rgba(0, 0, 0, .08); }
.tabs a:hover { text-decoration: none; color: var(--head); }

/* --- кабинет ------------------------------------------------------------------------------ */
.app { display: grid; grid-template-columns: 236px minmax(0, 1fr); min-height: 100vh; }
.side { background: var(--surface); border-right: 1px solid var(--line); padding: 20px 14px; display: flex; flex-direction: column; gap: 22px; position: sticky; top: 0; height: 100vh; overflow-y: auto; }
.side .logo { flex-direction: column; align-items: flex-start; gap: 8px; }
.side .logo-word { font-size: 15px; }
.snav { display: grid; gap: 2px; }
.snav a { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 8px; color: var(--muted); text-decoration: none; font-weight: 600; }
.snav a:hover { background: var(--surface-2); color: var(--head); text-decoration: none; }
.snav a.on { background: var(--accent-soft); color: var(--accent); }
.snav svg { flex: none; fill: currentColor; }
.snav .lbl-s { display: none; }
.snav .cnt { margin-left: auto; font-size: 12px; background: var(--accent); color: var(--accent-ink); border-radius: 10px; padding: 0 7px; font-variant-numeric: tabular-nums; }
.snav-sep { height: 1px; background: var(--line); margin: 6px 12px; }
.side-foot { margin-top: auto; font-size: 13px; display: grid; gap: 10px; }
.crm-ind { display: flex; align-items: center; gap: 8px; font-weight: 600; color: var(--muted); }
.dot { width: 8px; height: 8px; border-radius: 2px; background: var(--good); flex: none; display: inline-block; }
.dot.off { background: var(--bad); }
.dot.wait { background: var(--warn); }
.side-foot .version { font-size: 12px; color: var(--muted); }
.main { min-width: 0; display: flex; flex-direction: column; }
.topbar { display: flex; align-items: center; gap: 16px; padding: 14px 28px; border-bottom: 1px solid var(--line); background: var(--surface); flex-wrap: wrap; }
.topbar .co { font-weight: 700; color: var(--head); }
.topbar .plan { font-size: 12px; font-weight: 700; background: var(--surface-2); color: var(--head); border-radius: 5px; padding: 3px 8px; }
.topbar .sp { margin-left: auto; display: flex; gap: 8px; align-items: center; }
.topbar .me { color: var(--muted); font-size: 13px; }
.topbar form { margin: 0; }
.demo-bar { background: var(--warn-bg); color: var(--warn); font-size: 13px; font-weight: 600; padding: 8px 28px; display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.demo-bar a { color: inherit; text-decoration: underline; font-weight: 700; }
.content { padding: 24px 28px 48px; display: grid; grid-template-columns: minmax(0, 1fr); gap: 20px; align-content: start; }
.ph { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.ph h1 { font-size: 26px; font-weight: 800; }
.ph h1.sm { font-size: 22px; max-width: 62ch; }
.ph p { color: var(--muted); margin-top: 4px; }
.ph .acts { display: flex; gap: 8px; flex-wrap: wrap; }
.crumbs { font-size: 13px; color: var(--muted); }
.crumbs a { color: var(--muted); text-decoration: none; }
.crumbs a:hover { color: var(--accent); }
.subnav { display: flex; gap: 4px; flex-wrap: wrap; border-bottom: 1px solid var(--line); }
.subnav a { padding: 8px 12px; color: var(--muted); border-bottom: 2px solid transparent; margin-bottom: -1px; font-weight: 600; font-size: 14px; text-decoration: none; }
.subnav a.on { color: var(--head); border-bottom-color: var(--accent); }
.subnav a:hover { color: var(--head); text-decoration: none; }
.subnav .cnt { font-size: 12px; color: var(--muted); margin-left: 4px; font-variant-numeric: tabular-nums; }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 20px; min-width: 0; }
.panel h2 { font-size: 17px; font-weight: 700; }
.panel > h2:first-child { margin-bottom: 12px; }
.panel-h { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.panel-h p { font-size: 13px; color: var(--muted); }
.panel-h.tight { margin-bottom: 10px; }
.panel p + p, .panel p + .actions-row, .panel .stack p + p { margin-top: 8px; }
.filters { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.filters .inp { width: auto; }
.filters .search { max-width: 300px; }
.seg { display: inline-flex; background: var(--surface); border: 1px solid var(--line-2); border-radius: 8px; padding: 3px; gap: 2px; flex-wrap: wrap; }
.seg a, .seg button { border: 0; background: transparent; padding: 6px 12px; border-radius: 6px; font-weight: 600; font-size: 13px; color: var(--muted); cursor: pointer; text-decoration: none; white-space: nowrap; }
.seg a:hover, .seg button:hover { color: var(--head); text-decoration: none; }
.seg a.on, .seg button.on { background: var(--head); color: var(--surface); }
.seg .tnum { opacity: .7; margin-left: 2px; }
.dates { display: inline-flex; gap: 6px; align-items: center; }
.dates input { width: auto; padding: 6px 8px; font-size: 13px; }
.kpis { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; }
.kpis.k4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.kpis.k3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.kpi { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 16px; color: inherit; text-decoration: none; display: block; min-width: 0; }
a.kpi:hover { border-color: var(--line-2); text-decoration: none; }
.kpi .l { font-size: 12px; font-weight: 700; color: var(--muted); letter-spacing: .02em; }
.kpi .v { font-family: var(--f-d); font-weight: 800; font-size: 28px; color: var(--head); margin-block: 6px 4px; font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kpi .d { font-size: 12px; font-weight: 700; font-variant-numeric: tabular-nums; }
.kpi .sw { height: 4px; border-radius: 2px; margin-bottom: 10px; width: 28px; background: var(--line-2); }
.sw-bar { background: var(--c-bar) !important; } .sw-sel { background: var(--c-sel) !important; } .sw-kp { background: var(--c-kp) !important; }
.sw-sent { background: var(--c-sent) !important; } .sw-head { background: var(--head) !important; }
.up { color: var(--good); } .down { color: var(--bad); } .flat { color: var(--muted); }
.overdue { color: var(--bad); font-weight: 700; }
.funnel { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; }
.fstep { padding: 4px 18px 4px 0; position: relative; min-width: 0; }
.fstep + .fstep { padding-left: 18px; border-left: 1px dashed var(--line-2); }
.fstep .fl { font-size: 13px; color: var(--muted); font-weight: 600; }
.fstep .fv { font-family: var(--f-d); font-weight: 800; font-size: 24px; color: var(--head); font-variant-numeric: tabular-nums; }
.fstep .fc { font-size: 12px; font-weight: 700; color: var(--accent); margin-top: 2px; font-variant-numeric: tabular-nums; min-height: 18px; }
.bar { display: block; width: 100%; height: 10px; margin-top: 10px; border-radius: 2px; overflow: hidden; }
.bar .bg { fill: var(--surface-2); }
.bar .fg { fill: var(--accent); }
.bar .fg.head { fill: var(--head); }
.grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; align-items: start; }
.grid3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.chart-box { position: relative; }
.chart { width: 100%; height: auto; max-height: 340px; display: block; }
.chart .grid-l { stroke: var(--line); stroke-width: 1; }
.chart .axis { fill: var(--muted); font-size: 11px; font-family: var(--f-b); }
.chart .s-bar { fill: var(--c-bar); }
.chart .s-sel { stroke: var(--c-sel); fill: none; stroke-width: 2; }
.chart .s-kp { stroke: var(--c-kp); fill: none; stroke-width: 2; }
.chart .s-sent { stroke: var(--c-sent); fill: none; stroke-width: 2; }
.chart .p-sel { fill: var(--c-sel); } .chart .p-kp { fill: var(--c-kp); } .chart .p-sent { fill: var(--c-sent); }
.chart .hit { fill: transparent; }
.chart .hit:hover { fill: var(--accent-soft); opacity: .5; }
.chart.off-bar .g-bar, .chart.off-sel .g-sel, .chart.off-kp .g-kp, .chart.off-sent .g-sent { display: none; }
.legend { display: flex; flex-wrap: wrap; gap: 6px 16px; justify-content: center; margin-top: 8px; }
.legend button { border: 0; background: transparent; display: inline-flex; gap: 6px; align-items: center; font-size: 13px; color: var(--muted); cursor: pointer; padding: 2px 4px; }
.legend button.off { opacity: .45; text-decoration: line-through; }
.legend i { width: 12px; height: 12px; border-radius: 2px; display: inline-block; }
.hbars { display: grid; gap: 4px; }
.hb { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1.4fr) 58px 96px; gap: 12px; align-items: center; padding: 7px 8px; border-radius: 6px; font-size: 13px; color: inherit; text-decoration: none; }
a.hb:hover { background: var(--surface-2); text-decoration: none; }
.hb .nm { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-weight: 600; }
.hb .tr { height: 10px; background: var(--surface-2); border-radius: 2px; overflow: hidden; display: block; }
.hb .tr .bar { margin: 0; }
.hb .c, .hb .s { text-align: right; font-variant-numeric: tabular-nums; }
.hb .s { font-weight: 700; color: var(--head); }
.hb-h { font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.tbl-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); }
.tbl-wrap.flush { border: 0; border-radius: 0; }
table.t { width: 100%; border-collapse: collapse; font-size: 13.5px; }
table.t th { text-align: left; font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); padding: 11px 12px; border-bottom: 1px solid var(--line); background: var(--surface-2); white-space: nowrap; }
table.t td { padding: 11px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
table.t tr:last-child td { border-bottom: 0; }
table.t tbody tr.click { cursor: pointer; }
table.t tbody tr.click:hover { background: var(--surface-2); }
table.t td.n, table.t th.n { text-align: right; white-space: nowrap; }
table.t tr.inactive td { color: var(--muted); }
table.t tr.total td { font-weight: 700; }
table.t td a.row-link { color: inherit; text-decoration: none; display: block; }
table.t td a.row-link:hover .title { color: var(--accent); }
.tbl-in td { padding: 6px 6px; }
.tbl-in .inp, .tbl-in input, .tbl-in select { padding: 7px 8px; font-size: 13px; }
.pill { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 700; border-radius: 5px; padding: 3px 8px; white-space: nowrap; background: var(--surface-2); color: var(--muted); }
.pill::before { content: ""; width: 6px; height: 6px; border-radius: 1px; background: currentColor; }
.st-new { background: var(--info-bg); color: var(--accent); }
.st-kp { background: var(--teal-bg); color: var(--teal); }
.st-crm { background: var(--warn-bg); color: var(--warn); }
.st-sent { background: var(--good-bg); color: var(--good); }
.st-rej { background: var(--surface-2); color: var(--muted); }
.st-bad { background: var(--bad-bg); color: var(--bad); }
.tag { display: inline-block; font-size: 12px; background: var(--surface-2); border-radius: 4px; padding: 2px 7px; margin: 2px 4px 2px 0; white-space: nowrap; color: var(--ink); }
.tag.wrap-ok { white-space: normal; }
.warnmark { background: var(--warn-bg); color: var(--warn); }
.okmark { background: var(--good-bg); color: var(--good); }
.badmark { background: var(--bad-bg); color: var(--bad); }
.infomark { background: var(--info-bg); color: var(--accent); }
.pager { display: flex; gap: 8px; align-items: center; justify-content: flex-end; font-size: 13px; color: var(--muted); flex-wrap: wrap; }
.kv { display: grid; grid-template-columns: 150px 1fr; gap: 8px 16px; font-size: 14px; margin: 0; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; font-weight: 600; min-width: 0; overflow-wrap: anywhere; }
.kv dd .muted, .kv dd .small { font-weight: 500; }
.lead-grid { display: grid; grid-template-columns: minmax(0, 1.9fr) minmax(300px, 1fr); gap: 20px; align-items: start; }
.stack { display: grid; gap: 20px; grid-template-columns: minmax(0, 1fr); align-content: start; }
.stack.g10 { gap: 10px; } .stack.g12 { gap: 12px; } .stack.g16 { gap: 16px; }
.quote { border-left: 3px solid var(--accent); background: var(--surface-2); padding: 12px 16px; border-radius: 0 8px 8px 0; font-size: 14px; overflow-wrap: anywhere; }
.quote .src { font-size: 12px; color: var(--muted); margin-top: 6px; }
.quote.weak { border-left-color: var(--warn); }
.quote pre { margin: 0; white-space: pre-wrap; font-family: var(--f-m); font-size: 12.5px; max-height: 240px; overflow: auto; }
.kp-doc { border: 1px solid var(--line-2); border-radius: 6px; padding: 26px; background: #fff; color: #1b1f33; font-size: 13px; overflow-x: auto; }
.kp-doc h3 { color: #1E2A6E; font-size: 16px; margin-block: 14px 8px; }
.kp-doc p { margin-top: 8px; }
.kp-doc table { width: 100%; border-collapse: collapse; margin-top: 8px; }
.kp-doc th, .kp-doc td { border: 1px solid #cfd6e6; padding: 6px 8px; text-align: left; font-size: 12px; }
.kp-doc td.n, .kp-doc th.n { text-align: right; font-variant-numeric: tabular-nums; }
.kp-doc .hdr { display: flex; justify-content: space-between; gap: 12px; border-bottom: 2px solid #1E2A6E; padding-bottom: 10px; font-size: 12px; color: #4b5270; flex-wrap: wrap; }
.kp-doc .hdr b { color: #1E2A6E; }
.crm-box { border: 1px solid var(--line); border-radius: var(--r); padding: 16px; display: grid; gap: 10px; background: var(--surface-2); }
.crm-box .row-b { display: flex; justify-content: space-between; gap: 8px; flex-wrap: wrap; align-items: center; }
.timeline { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.timeline li { display: grid; grid-template-columns: 112px 1fr; gap: 10px; font-size: 13px; }
.timeline time { color: var(--muted); font-variant-numeric: tabular-nums; }
.timeline .who { color: var(--muted); font-size: 12px; }
.timeline li.sys span { color: var(--muted); }
.reject-box { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-top: 10px; }
.info-line { background: var(--surface-2); border: 1px solid var(--line); border-radius: 8px; padding: 10px 14px; font-size: 13px; }
.info-line.warn { background: var(--warn-bg); border-color: transparent; color: var(--warn); }
.info-line.bad { background: var(--bad-bg); border-color: transparent; color: var(--bad); }
.info-line.good { background: var(--good-bg); border-color: transparent; color: var(--good); }
.info-line b { font-weight: 700; }
.contact { border-top: 1px solid var(--line); padding-top: 12px; display: grid; gap: 2px; font-size: 14px; }
.contact:first-of-type { border-top: 0; padding-top: 0; }
.src { font-size: 12px; color: var(--muted); }
.stepper { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 4px; }
.stepper div { padding: 10px 8px; background: var(--surface-2); font-size: 12px; font-weight: 700; color: var(--muted); border-radius: 4px; line-height: 1.25; }
.stepper .done { background: var(--accent-soft); color: var(--accent); }
.stepper .cur { background: var(--accent); color: var(--accent-ink); }
.stepper.lost .cur { background: var(--bad); color: #fff; }
.stepper.won .cur, .stepper.won .done { background: var(--good); color: #fff; }
.step-note { display: none; font-size: 13px; font-weight: 700; color: var(--head); margin-bottom: 8px; }
.empty { padding: 28px; text-align: center; color: var(--muted); }
td.empty { padding: 28px; }
.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: var(--head); color: var(--surface); padding: 10px 18px; border-radius: 8px; font-weight: 600; z-index: 50; box-shadow: var(--shadow); max-width: calc(100% - 32px); }
.toasts { display: grid; gap: 8px; }
.flash { padding: 10px 14px; border-radius: 8px; font-size: 14px; font-weight: 600; border: 1px solid transparent; white-space: pre-line; }
.flash-success { background: var(--good-bg); color: var(--good); }
.flash-error { background: var(--bad-bg); color: var(--bad); }
.flash-warning { background: var(--warn-bg); color: var(--warn); }
.flash-info { background: var(--info-bg); color: var(--accent); }
.flashes { display: grid; gap: 8px; }
.modal-bg { position: fixed; inset: 0; background: rgba(10, 14, 35, .45); z-index: 40; display: grid; place-items: center; padding: 16px; }
.modal { background: var(--surface); border-radius: 14px; width: 100%; max-width: 860px; max-height: calc(100vh - 32px); overflow: auto; padding: 24px; display: grid; gap: 16px; box-shadow: 0 20px 60px rgba(0, 0, 0, .3); }
.wiz { display: flex; gap: 8px; flex-wrap: wrap; }
.wiz span { font-size: 13px; font-weight: 700; color: var(--muted); padding: 6px 10px; border-radius: 6px; background: var(--surface-2); }
.wiz span.on { background: var(--accent); color: var(--accent-ink); }
.wiz span.done { background: var(--accent-soft); color: var(--accent); }
.drop { border: 2px dashed var(--line-2); border-radius: 12px; padding: 36px 20px; text-align: center; display: grid; gap: 10px; justify-items: center; background: var(--surface-2); }
.drop.over { border-color: var(--accent); background: var(--accent-soft); }
.map-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.sum3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.sum3 div { border: 1px solid var(--line); border-radius: 10px; padding: 14px; }
.sum3 b { display: block; font-family: var(--f-d); font-size: 26px; color: var(--head); }
.sum3 b.bad { color: var(--bad); }
.code { background: var(--surface-2); border: 1px solid var(--line); border-radius: 8px; padding: 14px; font-family: var(--f-m); font-size: 12.5px; overflow-x: auto; white-space: pre; color: var(--ink); margin: 0; }
.radio-cards { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.rc { border: 1px solid var(--line-2); border-radius: 10px; padding: 14px; cursor: pointer; display: grid; gap: 4px; background: var(--surface); position: relative; color: var(--ink); }
.rc input { position: absolute; opacity: 0; pointer-events: none; }
.rc b { color: var(--head); }
.rc.on, .rc:has(input:checked) { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.status-ok { color: var(--good); font-weight: 700; }
.status-bad { color: var(--bad); font-weight: 700; }
.tg-chat { background: #DCE6EF; border-radius: 12px; padding: 12px; display: grid; gap: 10px; color: #0f1419; }
.tg-head { display: flex; gap: 10px; align-items: center; font-size: 14px; }
.tg-head .small { color: #6b7a88; }
.tg-ava { width: 34px; height: 34px; border-radius: 50%; background: #2E6BE6; display: grid; place-items: center; }
.tg-msg { background: #fff; border-radius: 4px 12px 12px 12px; padding: 10px 12px 18px; font-size: 13.5px; line-height: 1.5; position: relative; max-width: 100%; overflow-wrap: anywhere; box-shadow: 0 1px 1px rgba(0, 0, 0, .08); white-space: pre-line; }
.tg-msg b { color: #0f1419; }
.tg-msg a { color: #2A83C6; }
.tg-time { position: absolute; right: 10px; bottom: 4px; font-size: 11px; color: #8b98a5; }
.steps-list { counter-reset: step; list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.steps-list li { display: flex; gap: 10px; align-items: baseline; }
.steps-list li::before { counter-increment: step; content: counter(step); flex: none; width: 22px; height: 22px; border-radius: 5px; background: var(--surface-2); color: var(--muted); font-size: 12px; font-weight: 700; display: inline-grid; place-items: center; }
.steps-list li.done::before { content: "✓"; background: var(--good-bg); color: var(--good); }
.steps-list li.done a { color: var(--muted); }

/* --- закупка: сроки, находки, разбор модели --------------------------------------------- */
.deadline { display: inline-flex; flex-direction: column; font-weight: 700; font-size: 13px; line-height: 1.25; }
.deadline small { font-weight: 600; font-size: 12px; }
.deadline-urgent { color: var(--bad); }
.deadline-soon { color: var(--warn); }
.deadline-ok { color: var(--head); }
.deadline-closed, .deadline-none { color: var(--muted); font-weight: 500; }
.deadline-inline { flex-direction: row; display: inline; }
.deadline-inline small { margin-left: 4px; }
.deadline-inline small::before { content: "· "; }
.chip { display: inline-flex; gap: 5px; align-items: baseline; padding: 2px 8px; margin: 2px 4px 2px 0; border-radius: 4px; background: var(--surface-2); font-size: 12px; color: var(--ink); }
.chip b { font-weight: 700; }
.chip em { font-style: normal; color: var(--accent); }
.chip-ours { background: var(--good-bg); color: var(--good); }
.chip-analog { background: var(--warn-bg); color: var(--warn); }
.chip-work { background: var(--info-bg); color: var(--accent); }
.chip-warn { background: var(--warn-bg); color: var(--warn); }
.context { white-space: pre-wrap; background: var(--surface-2); border: 1px solid var(--line); border-radius: 6px; padding: 8px 10px; font-family: var(--f-m); font-size: 12px; margin: 6px 0; max-height: 260px; overflow: auto; }
.evidence details { border-bottom: 1px solid var(--line); padding: 8px 0; }
.evidence details:last-child { border-bottom: 0; }
.evidence summary { cursor: pointer; display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap; }
details.more > summary { cursor: pointer; color: var(--accent); font-weight: 600; font-size: 14px; list-style: none; }
details.more > summary::-webkit-details-marker { display: none; }
details.more > summary::before { content: "+ "; }
details.more[open] > summary::before { content: "– "; }
details.more[open] > summary { margin-bottom: 12px; }
.model-overview { background: var(--surface-2); border: 1px solid var(--line); border-radius: 8px; padding: 10px 14px; margin-bottom: 12px; font-size: 14px; }
.model-overview p + p { margin-top: 4px; }
.model-overview ul { margin: 4px 0 4px 18px; padding: 0; }
.model-table tr.model-sure td:first-child { box-shadow: inset 3px 0 0 var(--good); }
.model-table tr.model-proof td { border-top: 0; padding-top: 0; }
.model-table blockquote { margin: 6px 0; padding: 6px 10px; border-left: 3px solid var(--line-2); background: var(--surface-2); border-radius: 0 6px 6px 0; }
.model-actions { display: grid; gap: 6px; margin-top: 6px; }
.inline-form { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.inline-form .inp, .inline-form input, .inline-form select { width: auto; }
.inline-form input.grow { flex: 1; min-width: 160px; }
.calc-lines td { vertical-align: middle; }
.qty-cell { white-space: nowrap; }
.qty-cell input[name=quantity] { width: 110px; display: inline-block; }
.area { margin-top: 6px; font-size: 12px; color: var(--muted); white-space: normal; }
.area input { width: 80px; display: inline-block; padding: 5px 8px; }
.quote-options { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end; }
.quote-options .fld { min-width: 180px; }
.quote-result { border: 1px dashed var(--line-2); border-radius: var(--r); padding: 12px 14px; background: var(--surface-2); overflow-x: auto; }
.quote-result table { width: 100%; border-collapse: collapse; font-size: 13px; margin-bottom: 10px; }
.quote-result th, .quote-result td { padding: 6px 8px; border-bottom: 1px solid var(--line); text-align: left; }
.quote-result .num, .quote-result td.num, .quote-result th.num { text-align: right; }
.quote-totals { display: grid; grid-template-columns: 1fr auto; gap: 4px 20px; max-width: 520px; margin-left: auto; font-size: 14px; }
.quote-totals .total { font-size: 16px; font-weight: 800; color: var(--head); }
.quote-notes { color: var(--warn); font-size: 13px; margin-top: 6px; }
.calc-total td { font-weight: 700; }
.calc-total .sum { font-weight: 800; color: var(--head); }

/* --- КП для печати ------------------------------------------------------------------------ */
.offer-sheet { background: #fff; color: #1b1f33; border: 1px solid var(--line); border-radius: var(--r); padding: 28px 32px; max-width: 980px; }
.offer-sheet h1, .offer-sheet h2, .offer-sheet h3 { color: #1E2A6E; }
.offer-sheet table { width: 100%; border-collapse: collapse; }
.offer-sheet th, .offer-sheet td { border: 1px solid #cfd6e6; padding: 6px 8px; font-size: 13px; text-align: left; vertical-align: top; }
.offer-sheet .num { text-align: right; }
.offer-company { border-bottom: 2px solid #1E2A6E; padding-bottom: 10px; margin-bottom: 16px; white-space: pre-line; }
.totals { display: grid; grid-template-columns: 1fr auto; gap: 4px 20px; max-width: 520px; margin: 16px 0 16px auto; }
.totals dt, .totals dd { margin: 0; }
.totals dd { text-align: right; }
.totals .total { font-weight: 800; font-size: 16px; }
.offer-sign { margin-top: 26px; }
.offer-letter { margin: 12px 0; }

/* --- загрузка файлов и сопоставление колонок -------------------------------------------- */
.mapping-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; margin: 10px 0 14px; }
.mapping-grid label { display: grid; gap: 6px; font-size: 13px; font-weight: 700; color: var(--muted); }
tr.plan-new td:first-child + td { color: var(--good); font-weight: 600; }
tr.plan-changed td:first-child + td { color: var(--warn); font-weight: 600; }
tr.plan-error td { background: var(--bad-bg); }
tr.plan-same td { color: var(--muted); }
.roles-matrix td:first-child { min-width: 260px; }
.legal { max-width: 820px; line-height: 1.6; }
.legal h2 { font-size: 17px; margin: 22px 0 8px; }
.legal p { margin-top: 8px; }
.regions { border: 1px solid var(--line); border-radius: 8px; padding: 8px 12px; display: flex; flex-wrap: wrap; gap: 6px 16px; }
.regions legend { font-size: 13px; color: var(--muted); padding: 0 4px; }
.regions label { display: flex; gap: 6px; align-items: center; color: var(--ink); font-size: 14px; }

/* --- переходники: прежние имена классов ведут себя как новые -------------------------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 20px; min-width: 0; }
.card > h2:first-child { margin-bottom: 12px; }
.narrow-card { max-width: 640px; }
.page-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; }
.page-head p { color: var(--muted); margin-top: 4px; }
.page-head .row { flex-wrap: wrap; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; align-items: start; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.row { display: flex; gap: 10px; align-items: flex-end; flex-wrap: wrap; }
.row > label { flex: 1; }
.callout { background: var(--warn-bg); color: var(--ink); border-radius: var(--r); padding: 12px 16px; font-size: 14px; }
.callout b { color: var(--warn); }
.table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.table th { text-align: left; font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); padding: 10px 10px; border-bottom: 1px solid var(--line); background: var(--surface-2); white-space: nowrap; }
.table td { padding: 10px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
.table tr:last-child td { border-bottom: 0; }
.table.narrow { max-width: 560px; }
.table-scroll { overflow-x: auto; }
tr.inactive td { color: var(--muted); }
.badge { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 700; border-radius: 5px; padding: 3px 8px; white-space: nowrap; background: var(--surface-2); color: var(--muted); }
.lane-candidate { background: var(--good-bg); color: var(--good); }
.lane-review { background: var(--info-bg); color: var(--accent); }
.lane-missed { background: var(--warn-bg); color: var(--warn); }
.lane-rejected { background: var(--surface-2); color: var(--muted); }
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 12px; }
.tile { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 16px; color: var(--ink); display: flex; flex-direction: column; gap: 2px; }
.tile:hover { text-decoration: none; border-color: var(--line-2); }
.tile-number { font-family: var(--f-d); font-size: 26px; font-weight: 800; line-height: 1.1; color: var(--head); }
.tile span:last-child { color: var(--muted); font-size: 13px; }
.compact-list { list-style: none; margin: 0; padding: 0; }
.compact-list li { padding: 8px 0; border-bottom: 1px solid var(--line); }
.compact-list li:last-child { border-bottom: 0; }
.compact-list .meta { color: var(--muted); font-size: 12px; margin-top: 2px; }
.facts { display: grid; grid-template-columns: 150px 1fr; gap: 8px 16px; margin: 0; font-size: 14px; }
.facts dt { color: var(--muted); }
.facts dd { margin: 0; }
.bare { min-height: 100vh; display: grid; place-items: center; padding: 20px; }
.chips { display: flex; flex-wrap: wrap; align-items: center; gap: 0; }
.mono.small { font-size: 12px; }
/* Подпись над полем в старых формах («<label>Название<input></label>»); :where - без веса, чтобы
   галочки, переключатели и карточки выбора со своими правилами не превращались в столбик. */
:where(.card, .panel) :where(label:not(.check, .switch, .rc, .btn, .small)) { display: grid; gap: 6px; font-size: 13px; font-weight: 700; color: var(--muted); }
.card label.small, .panel label.small { display: flex; gap: 8px; align-items: center; font-weight: 500; color: var(--ink); }
.card .stack { gap: 12px; }

/* --- адаптивность ------------------------------------------------------------------------- */
@media (max-width: 1100px) {
  .kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .kpis.k4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid2, .lead-grid, .grid-2 { grid-template-columns: minmax(0, 1fr); }
  .lead-grid > .stack.side-first { order: -1; }
}
@media (max-width: 900px) {
  .hero .wrap, .req, .price-grid { grid-template-columns: minmax(0, 1fr); }
  .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .who { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .l-nav { display: none; }
  .app { grid-template-columns: 72px minmax(0, 1fr); }
  .side { position: sticky; top: 0; z-index: 15; height: 100vh; gap: 10px; padding: 12px 6px; overflow-y: auto; }
  .side .logo, .side-foot { display: none; }
  .snav { gap: 4px; }
  .snav a { position: relative; flex-direction: column; justify-content: center; gap: 5px; padding: 10px 2px; font-size: 11px; line-height: 1.15; text-align: center; }
  .snav a svg { width: 20px; height: 20px; }
  .snav .lbl-l { display: none; }
  .snav .lbl-s { display: block; }
  .snav .cnt { position: absolute; top: 4px; right: 4px; margin: 0; font-size: 10px; padding: 0 5px; }
  .snav-sep { margin: 4px 6px; }
  .topbar { gap: 8px 12px; padding-inline: 16px; }
  .topbar .plan { display: none; }
  .demo-bar { padding-inline: 16px; }
  .content { padding: 18px 16px 40px; }
  .map-grid, .radio-cards, .grid3, .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .facts { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .who { grid-template-columns: minmax(0, 1fr); }
  .two, .pilot .cols, .form-grid, .pform, .checks, .map-grid, .radio-cards, .sum3, .grid3, .grid-3 { grid-template-columns: minmax(0, 1fr); }
  .steps { grid-template-columns: minmax(0, 1fr); }
  .kpis, .kpis.k3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .funnel { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 16px; }
  .fstep:nth-child(3) { border-left: 0; padding-left: 0; }
  .l-actions .btn-s { display: none; }
  .l-top .logo-word { display: none; }
  .hb { grid-template-columns: minmax(0, 1fr) 44px 84px; }
  .hb .tr { grid-column: 1 / -1; grid-row: 2; }
  .kv { grid-template-columns: 1fr; gap: 2px 0; }
  .kv dd { margin-bottom: 8px; }
  .fun-row { grid-template-columns: 104px 1fr 56px; }
  .tariff .price { font-size: 36px; }
  .cmp th, .cmp td { padding: 10px 12px; font-size: 14px; }
  .timeline li { grid-template-columns: minmax(0, 1fr); gap: 2px; }
  .stepper div { font-size: 0; padding: 0; height: 10px; border-radius: 2px; }
  .step-note { display: block; }
  .filters .search, .filters .inp { max-width: none; width: 100%; }
  .ph h1 { font-size: 22px; }
  .ph h1.sm { font-size: 18px; }
  .filters .sel { max-width: 100%; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }

@media print {
  .side, .topbar, .demo-bar, .no-print, .flashes, .actions-row, .crumbs { display: none !important; }
  .app { display: block; }
  .content { padding: 0; }
  body, html { background: #fff; }
  .offer-sheet { border: 0; padding: 0; max-width: none; }
}

/* --- карточка входа: формы ---------------------------------------------------------------- */
.login-card h1 { font-size: 22px; }
.login-card form.stack, .login-card .stack { gap: 14px; }
.login-card label:not(.check):not(.trap):not(.small) { display: grid; gap: 6px; font-size: 13px; font-weight: 700; color: var(--muted); }
.login-card label.small { display: flex; gap: 8px; align-items: flex-start; color: var(--ink); font-size: 13px; }
.login-card .row > label { flex: 1; }
.login-card p { font-size: 14px; }
.login-card form > .btn, .login-card > form > .btn { width: 100%; }
.login-card .legal h1 { font-size: 24px; margin-bottom: 6px; }

/* --- список лидов ------------------------------------------------------------------------- */
.filters .sel { max-width: 260px; }
.filters .search { width: 300px; }
.more-filters { display: inline-block; }
.more-filters > summary { list-style: none; }
.more-filters > summary::-webkit-details-marker { display: none; }
.more-filters[open] { flex-basis: 100%; order: 10; display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.more-filters[open] > summary { background: var(--surface-2); }
table.leads td:nth-child(2) { min-width: 240px; }
table.leads td:nth-child(4) { min-width: 150px; max-width: 200px; }
table.leads td:nth-child(4) .cut { max-width: 200px; }
table.leads .tag { max-width: 180px; overflow: hidden; text-overflow: ellipsis; vertical-align: bottom; }
table.leads .title { -webkit-line-clamp: 2; }
table.leads td, table.leads th { padding-inline: 9px; }
table.leads td:nth-child(3) { max-width: 110px; }
/* Ноутбук 1280-1400: статус лида должен влезать без прокрутки вбок. */
@media (max-width: 1400px) {
  table.leads td, table.leads th { padding-inline: 7px; }
  table.leads td:nth-child(2) { min-width: 180px; }
  table.leads td:nth-child(3) { min-width: 110px; max-width: 110px; }
  table.leads td:nth-child(4) { min-width: 120px; max-width: 160px; }
  table.leads td:nth-child(4) .cut { max-width: 160px; }
  table.leads .tag { max-width: 120px; }
}
table.t.compact td, table.t.compact th { padding: 8px 8px; }
table.t.compact td { font-size: 13px; }
table.t.compact td:first-child { min-width: 180px; }
table.calc td.n { white-space: nowrap; }
table.calc .pk { min-width: 110px; }
/* Карточка лида на ноутбуке 1100-1400: расчёт поставки без прокрутки вбок -
   боковая колонка уже, таблицы плотнее. */
@media (max-width: 1400px) and (min-width: 1101px) {
  .lead-grid { grid-template-columns: minmax(0, 1fr) 300px; }
}
@media (max-width: 1400px) {
  /* Пять плиток на ноутбуке: «683 тыс ₽» должно влезать целиком. */
  .kpi .v { font-size: 24px; }
  .lead-grid .panel { padding-inline: 16px; }
  table.t.compact td, table.t.compact th { padding-inline: 5px; }
  table.t.compact td:first-child { min-width: 140px; }
  table.calc .pk { min-width: 100px; }
  table.calc-lines td, table.calc-lines th { padding-inline: 8px; }
}
/* галочки и радиокнопки в панелях - в строку с подписью, а не над ней */
.panel .checks label, .card .checks label, .panel .regions label, .card .regions label,
.panel label.check, .card label.check, .panel .inline-form label, .card .inline-form label {
  display: flex; flex-direction: row; gap: 8px; align-items: center; font-size: 14px; font-weight: 500; color: var(--ink);
}
