/* CaptBot — сайт, кабинет и админка в стиле окна программы.
   Токены из MainWindow.xaml: асфальт, планшет, клетка карты, линии, мел, туман, сигнал.
   Шрифт как в программе — Bahnschrift (DIN, дорожные знаки и HUD), на телефонах — Sofia Sans. */
:root {
  --asphalt: #15171b;
  --slate: #1d2026;
  --cell: #1a1d22;
  --frame: #101215;
  --rule: #2b2f37;
  --hover: #262a31;
  --chalk: #ece7dc;
  --fog: #8e929b;
  --dim: #5a5e66;
  --signal: #8b5cf6;
  --signal-text: #a78bfa;
  --go: #46d39a;
  --warn: #f2b33d;
  --stop: #f0506e;
  --go-bg: rgba(70, 211, 154, .14);
  --stop-bg: rgba(240, 80, 110, .1);
  --sans: "Bahnschrift", "Sofia Sans", "Segoe UI", system-ui, sans-serif;
  --cond: "Bahnschrift Condensed", "Bahnschrift", "Sofia Sans Condensed", "Sofia Sans", "Arial Narrow", sans-serif;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--asphalt);
  color: var(--chalk);
  font: 15px/1.55 var(--sans);
  font-variant-numeric: tabular-nums;
  overflow-x: hidden;
}
main { flex: 1; }
::selection { background: var(--signal); color: #fff; }
a { color: var(--signal-text); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
:focus-visible { outline: 2px solid var(--signal-text); outline-offset: 2px; border-radius: 4px; }
img { max-width: 100%; display: block; }

h1, h2, h3 { margin: 0 0 .45em; color: var(--chalk); }
h1, h2 { font-family: var(--cond); font-stretch: condensed; font-weight: 700; line-height: 1.04; letter-spacing: -.01em; }
h1 { font-size: clamp(42px, 6vw, 70px); }
h2 { font-size: clamp(30px, 3.6vw, 42px); }
h3 { font-size: 18px; font-weight: 600; line-height: 1.3; }
p { margin: 0 0 1em; max-width: 64ch; }
.num, .mono { font-family: var(--cond); font-stretch: condensed; font-weight: 600; letter-spacing: .01em; }
.muted { color: var(--fog); }
.dim { color: var(--dim); }
.ok-t { color: var(--go); }
.bad-t { color: var(--stop); }
.warn-t { color: var(--warn); }
.small { font-size: 13px; }
.nowrap { white-space: nowrap; }

.wrap { width: 100%; max-width: 1140px; margin: 0 auto; padding: 0 16px; }
@media (min-width: 720px) { .wrap { padding: 0 28px; } }
.wrap.wide { max-width: 1380px; }

/* ---------- шапка: как заголовок окна программы ---------- */
.top { position: sticky; top: 0; z-index: 20; background: var(--asphalt); border-bottom: 1px solid var(--rule); }
.top .wrap { display: flex; align-items: center; gap: 16px; height: 56px; }
.brand { display: flex; align-items: center; gap: 11px; color: var(--chalk); font-size: 18px; font-weight: 600; white-space: nowrap; }
.brand:hover { text-decoration: none; }
.brand img { width: 28px; height: 28px; }
.brand span { color: var(--fog); font-size: 13px; font-weight: 400; margin-left: 1px; padding-top: 2px; }
@media (max-width: 820px) { .brand span { display: none; } }
.nav { display: flex; align-items: center; gap: 2px; margin-left: auto; }
.nav a, .linkbtn { color: var(--fog); padding: 7px 11px; border-radius: 6px; font: 14px var(--sans); }
.nav a:hover, .linkbtn:hover { color: var(--chalk); background: var(--hover); text-decoration: none; }
.nav a.on { color: var(--chalk); }
.nav a.btn { color: #fff; background: var(--signal); margin-left: 8px; padding: 0 14px; }
.nav form { margin: 0; }
.linkbtn { background: none; border: 0; cursor: pointer; }
@media (max-width: 600px) { .nav .hide-sm { display: none; } .nav a, .linkbtn { padding: 7px 8px; } }

/* ---------- кнопки: плоские прямоугольники с малым скруглением ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 40px; padding: 0 16px; border-radius: 8px; border: 1px solid var(--rule);
  background: transparent; color: var(--chalk); font: 500 14px/1 var(--sans);
  cursor: pointer; white-space: nowrap; text-decoration: none;
}
.btn:hover { box-shadow: inset 0 0 0 100px rgba(255, 255, 255, .06); text-decoration: none; }
.btn:active { box-shadow: inset 0 0 0 100px rgba(255, 255, 255, .12); }
.btn:disabled, .btn.disabled { opacity: .35; pointer-events: none; }
.btn-primary { background: var(--signal); border-color: var(--signal); color: #fff; font-weight: 600; }
.btn-lg { height: 52px; padding: 0 24px; font-size: 16px; }
.btn-sm { height: 32px; padding: 0 11px; font-size: 13px; border-radius: 6px; }
.btn-danger { border-color: #4a2630; color: var(--stop); }
.btn-ok { border-color: #1f4a38; color: var(--go); }
.btn-ghost { border-color: transparent; color: var(--fog); }
.btn-block { width: 100%; }
.btn-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }

/* ---------- статус: квадратная точка, как в программе ---------- */
.badge { display: inline-flex; align-items: center; gap: 8px; font-size: 13.5px; color: var(--chalk); white-space: nowrap; --dot: var(--fog); }
.badge::before { content: ""; width: 8px; height: 8px; border-radius: 1.5px; background: var(--dot); flex: none; }
.badge.ok { --dot: var(--go); }
.badge.bad { --dot: var(--stop); }
.badge.warn { --dot: var(--warn); }
.badge.new { --dot: var(--fog); color: var(--fog); }
.badge.sig { --dot: var(--signal); }
.badge.plain::before { display: none; }

/* ---------- панели и сетки ---------- */
.card { background: var(--cell); border: 1px solid var(--rule); border-radius: 10px; padding: 20px 22px; }
.card-h { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.card-h h2, .card-h h3 { margin: 0; }
.cap { color: var(--fog); font-size: 13px; margin-bottom: 6px; }
.grid { display: grid; gap: 16px; }
.g2 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr)); }
.g3 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 250px), 1fr)); }
.stack > * + * { margin-top: 14px; }
.section { padding: 88px 0 0; }
.rule { height: 1px; background: var(--rule); border: 0; margin: 0; }

/* полоса показателей: как «Пинг до сервера / Нажму раньше на» в программе */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 170px), 1fr)); border: 1px solid var(--rule); border-radius: 10px; overflow: hidden; }
.stat { padding: 16px 20px; border-left: 1px solid var(--rule); margin-left: -1px; color: inherit; }
a.stat:hover { background: var(--cell); text-decoration: none; }
.stat .l { color: var(--fog); font-size: 13px; }
.stat .v { font-family: var(--cond); font-stretch: condensed; font-weight: 600; font-size: 34px; line-height: 1.15; color: var(--chalk); }
.stat .s { color: var(--fog); font-size: 12.5px; }

/* ---------- формы ---------- */
label { display: block; font-size: 13px; color: var(--fog); margin-bottom: 7px; }
.field { margin-bottom: 14px; }
input[type=text], input[type=password], input[type=number], input[type=search], input[type=email], select, textarea {
  width: 100%; height: 44px; padding: 0 12px; border-radius: 8px; border: 1px solid var(--rule);
  background: var(--slate); color: var(--chalk); font: 15px var(--sans); outline: none;
}
textarea { height: auto; padding: 10px 12px; line-height: 1.5; }
input:focus, select:focus, textarea:focus { border-color: var(--signal); }
input::placeholder { color: var(--dim); }
input.mono, .key-input { font-family: var(--cond); font-stretch: condensed; font-size: 19px; font-weight: 600; letter-spacing: .03em; text-transform: uppercase; }
input[type=checkbox] { width: 17px; height: 17px; accent-color: var(--signal); vertical-align: middle; }
input[type=file] { color: var(--fog); font: 14px var(--sans); max-width: 100%; }
.inline { display: flex; gap: 8px; flex-wrap: wrap; align-items: flex-end; }
.inline > .field { margin: 0; flex: 1 1 160px; }
.inline > .btn { height: 44px; }
.hint { font-size: 13px; color: var(--fog); margin-top: 8px; line-height: 1.5; max-width: 72ch; }

/* ---------- сообщения ---------- */
.flashes { margin: 20px 0 0; display: grid; gap: 8px; }
.flash { display: flex; gap: 10px; align-items: baseline; padding: 12px 16px; border: 1px solid var(--rule); border-radius: 8px; background: var(--cell); font-size: 14.5px; }
.flash::before { content: ""; width: 8px; height: 8px; border-radius: 1.5px; background: var(--go); flex: none; transform: translateY(-1px); }
.flash.bad::before { background: var(--stop); }
.flash.bad { border-color: #4a2630; }

/* ---------- таблицы ---------- */
.table-wrap { overflow-x: auto; border: 1px solid var(--rule); border-radius: 10px; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { text-align: left; padding: 11px 14px; border-bottom: 1px solid var(--rule); vertical-align: middle; }
th { color: var(--fog); font-size: 13px; font-weight: 400; background: var(--frame); white-space: nowrap; }
tr:last-child td { border-bottom: 0; }
tbody tr:hover td { background: rgba(255, 255, 255, .02); }
td.num, th.num { text-align: right; }
.empty { padding: 28px; text-align: center; color: var(--fog); }

/* ================= главная ================= */
.hero { padding: 64px 0 24px; display: grid; gap: 40px; grid-template-columns: 1fr; align-items: center; }
@media (min-width: 980px) { .hero { grid-template-columns: 5fr 7fr; gap: 48px; } }
.hero h1 { margin-bottom: 22px; max-width: 11ch; }
.hero .lead { font-size: 17.5px; line-height: 1.55; color: var(--chalk); max-width: 40ch; margin-bottom: 28px; }
.hero .fine { color: var(--fog); font-size: 13.5px; margin: 16px 0 0; }

/* фрагмент карты территорий 7×5, цель в центре — как в окне программы */
.map { position: relative; display: grid; grid-template-columns: repeat(7, 1fr); grid-template-rows: repeat(5, 74px); grid-auto-rows: auto; gap: 3px; padding: 3px; background: var(--frame); border-radius: 8px; }
.sq { display: grid; place-items: center; background: var(--cell); border-radius: 4px; color: var(--dim); font-size: 15px; }
.sq.near { color: var(--chalk); }
.sq.mid { color: var(--fog); }
.sq.target { background: var(--signal); color: #fff; font-weight: 600; font-size: 19px; transition: background-color .35s ease, color .35s ease; }
.sq.target.fired { background: var(--go); color: #0c1f17; }
/* табло лежит поверх трёх нижних правых клеток × 2 ряда */
.readout { position: absolute; right: 3px; bottom: 3px; width: calc((100% - 24px) * 3 / 7 + 6px); height: 151px; z-index: 1; background: var(--asphalt); border: 1px solid var(--rule); border-radius: 6px; padding: 14px 18px; display: flex; flex-direction: column; justify-content: center; }
.ro-num { font-family: var(--cond); font-stretch: condensed; font-weight: 600; font-size: 46px; line-height: 1.05; letter-spacing: -.01em; margin-top: 4px; }
.ro-bar { height: 3px; background: var(--rule); margin-top: 10px; }
.ro-bar i { display: block; height: 100%; width: 0; background: var(--signal); }
.ro-sub { color: var(--fog); font-size: 13px; margin-top: 6px; }
.readout .ro-done { display: none; }
.readout.fired .ro-wait { display: none; }
.readout.fired .ro-done { display: block; }
@media (max-width: 979px) {
  .map { grid-template-columns: repeat(5, 1fr); grid-template-rows: repeat(5, 62px); }
  .sq.edge { display: none; }
  .readout { position: static; width: auto; height: auto; grid-column: 1 / -1; margin-top: 3px; }
}
@media (max-width: 420px) { .map { grid-template-rows: repeat(5, 54px); } .sq { font-size: 13.5px; } .ro-num { font-size: 40px; } }

/* блок «слева текст, справа предмет» */
.split { display: grid; gap: 32px 56px; grid-template-columns: 1fr; align-items: start; }
@media (min-width: 900px) { .split { grid-template-columns: 5fr 7fr; } }
@media (min-width: 900px) { .split.form-left { grid-template-columns: 7fr 5fr; } }
.needs.tips li::before { background: var(--dim); }
.split > div > p { color: var(--chalk); }
.split > div > p.muted { color: var(--fog); }

/* ход забива: список шагов из программы */
.run { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--rule); }
.run li { display: grid; grid-template-columns: 22px 1fr auto; gap: 14px; align-items: center; padding: 11px 0; border-bottom: 1px solid var(--rule); font-size: 15.5px; }
.run em { font-style: normal; color: var(--fog); font-size: 14px; text-align: right; }
.mark { width: 22px; height: 22px; border-radius: 4px; display: grid; place-items: center; font-size: 12px; font-weight: 600; background: var(--go-bg); color: var(--go); }
.run .now .mark { background: var(--signal); color: #fff; }
.run .next .mark { background: transparent; border: 1px solid var(--rule); color: var(--dim); }
.run .next { color: var(--fog); }

/* опережение: отрезок от нажатия до прихода на сервер */
.lead-line { padding: 8px 0 4px; }
.ll-track { position: relative; height: 2px; background: var(--signal); margin: 34px 7px 30px; }
.ll-track::before, .ll-track::after { content: ""; position: absolute; top: -6px; width: 14px; height: 14px; }
.ll-track::before { left: -7px; border-radius: 50%; background: var(--signal); }
.ll-track::after { right: -7px; border-radius: 2px; background: var(--go); }
.ll-ends { display: flex; justify-content: space-between; gap: 16px; }
.ll-ends div:last-child { text-align: right; }
.ll-t { font-family: var(--cond); font-stretch: condensed; font-weight: 600; font-size: clamp(26px, 4vw, 38px); line-height: 1.1; }
.ll-ends small { color: var(--fog); font-size: 13px; display: block; }
.ll-math { display: grid; grid-template-columns: repeat(3, auto); justify-content: start; gap: 4px 28px; margin-top: 26px; padding-top: 18px; border-top: 1px solid var(--rule); }
.ll-math b { font-family: var(--cond); font-stretch: condensed; font-weight: 600; font-size: 26px; display: block; }
.ll-math span { color: var(--fog); font-size: 13px; }

/* прочее, требования */
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); gap: 0 40px; border-top: 1px solid var(--rule); }
.facts > div { padding: 18px 0; border-bottom: 1px solid var(--rule); }
.facts h3 { margin-bottom: 4px; }
.facts p { color: var(--fog); margin: 0; font-size: 14.5px; }
.needs { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.needs li { display: flex; gap: 12px; align-items: baseline; }
.needs li::before { content: ""; width: 8px; height: 8px; border-radius: 1.5px; background: var(--go); flex: none; transform: translateY(-1px); }

/* тарифы: одна доска, колонки через линии */
.board { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); border: 1px solid var(--rule); border-radius: 12px; overflow: hidden; }
.board > .plan { display: flex; flex-direction: column; padding: 26px 26px 24px; border-left: 1px solid var(--rule); margin-left: -1px; border-top: 1px solid var(--rule); margin-top: -1px; }
.plan h3 { color: var(--fog); font-weight: 400; font-size: 15px; margin: 0; }
.plan .price { font-family: var(--cond); font-stretch: condensed; font-weight: 700; font-size: 58px; line-height: 1.05; margin: 6px 0 2px; }
.plan .per { color: var(--fog); font-size: 13.5px; margin-bottom: 22px; }
.plan form, .plan > .btn { margin-top: auto; }
.plan select { margin-bottom: 10px; }

.faq { max-width: 820px; border-top: 1px solid var(--rule); }
.faq details { border-bottom: 1px solid var(--rule); }
.faq summary { cursor: pointer; padding: 16px 0; font-size: 16.5px; list-style: none; display: flex; justify-content: space-between; gap: 16px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--fog); font-size: 20px; line-height: 1; }
.faq details[open] summary::after { content: "−"; }
.faq details p { color: var(--fog); padding-bottom: 18px; margin: 0; }

.refline { display: flex; gap: 16px 32px; align-items: center; flex-wrap: wrap; padding: 20px 0; border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); margin-top: 28px; }
.refline p { margin: 0; flex: 1 1 360px; }
.refline b { font-family: var(--cond); font-stretch: condensed; font-weight: 700; font-size: 30px; margin-right: 10px; }

footer { margin-top: 96px; border-top: 1px solid var(--rule); padding: 22px 0 28px; color: var(--dim); font-size: 13px; }
footer .wrap { display: flex; flex-wrap: wrap; gap: 10px 24px; align-items: center; }
footer a { color: var(--fog); }

/* ================= документы ================= */
.legal { display: grid; gap: 32px 64px; grid-template-columns: 1fr; padding-top: 40px; }
@media (min-width: 960px) { .legal { grid-template-columns: 260px minmax(0, 1fr); } }
.legal-toc { font-size: 14px; }
@media (min-width: 960px) { .legal-toc { position: sticky; top: 80px; align-self: start; max-height: calc(100vh - 100px); overflow: auto; } }
.legal-docs { display: grid; gap: 2px; }
.legal-docs a, .legal-sections a { display: block; color: var(--fog); padding: 5px 0; }
.legal-docs a.on { color: var(--chalk); }
.legal-docs a:hover, .legal-sections a:hover { color: var(--chalk); text-decoration: none; }
.legal-sections { margin: 0; padding: 0 0 0 1px; list-style: none; border-left: 1px solid var(--rule); }
.legal-sections a { padding: 4px 0 4px 14px; font-size: 13.5px; }
@media (max-width: 959px) { .legal-sections { display: none; } .legal-docs { grid-auto-flow: column; justify-content: start; gap: 18px; } }
.legal-text { max-width: 68ch; }
.legal-text h1 { font-size: clamp(36px, 5vw, 52px); margin-bottom: 10px; }
.legal-text h2 { font-size: 26px; margin: 40px 0 12px; scroll-margin-top: 80px; }
.legal-text p, .legal-text li { font-size: 15.5px; line-height: 1.65; }
.legal-text em { font-style: normal; }   /* в оригинале на Telegraph пункты набраны курсивом */
.legal-text ul { padding-left: 20px; margin: -4px 0 16px; }
.legal-text li { margin: 4px 0; }
.legal-text li::marker { color: var(--dim); }
.legal-contacts { margin-top: 44px; padding-top: 4px; border-top: 1px solid var(--rule); }
.consent { font-size: 13px; color: var(--fog); line-height: 1.5; }
.consent a { color: var(--fog); text-decoration: underline; text-underline-offset: 2px; }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 13.5px; color: var(--fog); margin: 4px 0 16px; line-height: 1.45; }
.check input { margin-top: 2px; flex: none; }
.check a { color: var(--chalk); text-decoration: underline; text-underline-offset: 2px; }

/* ================= поддержка ================= */
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.count { display: inline-block; min-width: 18px; padding: 0 5px; border-radius: 9px; background: var(--signal); color: #fff; font-size: 11px; line-height: 18px; text-align: center; margin-left: 4px; }
.tlist { list-style: none; margin: 12px 0 0; padding: 0; border-top: 1px solid var(--rule); }
.tlist li { display: flex; gap: 16px; align-items: center; justify-content: space-between; padding: 12px 0; border-bottom: 1px solid var(--rule); }
.tlist a { display: grid; gap: 2px; min-width: 0; color: var(--chalk); }
.tlist a:hover { text-decoration: none; }
.tlist a:hover .tl-subj { text-decoration: underline; text-underline-offset: 3px; }
.tl-subj { font-size: 15.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tl-meta { font-size: 13px; color: var(--fog); }

.thread { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--rule); }
.msg { padding: 16px 0 18px 16px; border-bottom: 1px solid var(--rule); border-left: 2px solid var(--rule); scroll-margin-top: 80px; }
.msg.from-admin { border-left-color: var(--signal); }
.msg-head { display: flex; gap: 12px; align-items: baseline; justify-content: space-between; flex-wrap: wrap; margin-bottom: 8px; }
.msg-head time { color: var(--fog); font-size: 13px; }
.msg-body { white-space: pre-wrap; overflow-wrap: anywhere; font-size: 15px; line-height: 1.6; max-width: 72ch; }
.att { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.att-img img { display: block; max-width: 220px; max-height: 160px; border-radius: 6px; border: 1px solid var(--rule); }
.att-file { display: inline-flex; align-items: center; height: 32px; padding: 0 11px; border: 1px solid var(--rule); border-radius: 6px; color: var(--chalk); font-size: 13px; }
.att-file:hover { background: var(--hover); text-decoration: none; }
.reply textarea { min-height: 110px; }
.reply-bar { display: flex; gap: 12px; align-items: center; justify-content: space-between; flex-wrap: wrap; margin-top: 10px; }
.file-pick { display: inline-flex; align-items: center; gap: 10px; margin: 0; color: var(--fog); font-size: 13.5px; cursor: pointer; }
.file-pick input[type=file] { font-size: 13px; color: var(--fog); max-width: 230px; }
.file-pick input[type=file]::file-selector-button { font: 500 13px var(--sans); color: var(--chalk); background: transparent; border: 1px solid var(--rule); border-radius: 6px; height: 32px; padding: 0 11px; margin-right: 10px; cursor: pointer; }
.file-pick span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ================= вход ================= */
.auth { max-width: 420px; margin: 64px auto 0; }
.auth h1 { font-size: 44px; margin-bottom: 8px; }
.auth .sub { color: var(--fog); margin-bottom: 24px; }
.auth .alt { color: var(--fog); margin-top: 20px; font-size: 14px; }

/* ================= кабинет ================= */
.page-h { padding: 36px 0 6px; display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.page-h h1 { font-size: clamp(34px, 4.6vw, 48px); margin: 0; }
.tabs { display: flex; gap: 22px; border-bottom: 1px solid var(--rule); margin: 22px 0 24px; overflow-x: auto; scrollbar-width: none; }
.tabs a { padding: 10px 0; color: var(--fog); font-size: 15px; border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.tabs a:hover { color: var(--chalk); text-decoration: none; }
.tabs a.on { color: var(--chalk); border-color: var(--signal); }
.tabpane { display: none; }
.tabpane.on { display: block; }

.keyc { display: grid; gap: 16px; }
.keyc-top { display: flex; align-items: center; gap: 10px 14px; flex-wrap: wrap; }
.keystr { font-family: var(--cond); font-stretch: condensed; font-weight: 600; font-size: clamp(18px, 3vw, 23px); letter-spacing: .03em; color: var(--chalk); background: var(--slate); border: 1px solid var(--rule); padding: 6px 14px; border-radius: 8px; word-break: break-all; }
.kv { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 190px), 1fr)); gap: 12px 24px; margin: 0; font-size: 14.5px; }
.kv dt { color: var(--fog); font-size: 13px; margin-bottom: 2px; }
.kv dd { margin: 0; }
.reflink { display: flex; gap: 8px; flex-wrap: wrap; }
.reflink input { flex: 1 1 280px; }
.callout { border: 1px dashed var(--rule); border-radius: 10px; padding: 18px 20px; color: var(--fog); }
.callout b { color: var(--chalk); font-weight: 600; }

/* ================= оплата ================= */
.pay { max-width: 520px; margin: 56px auto 0; }
.pay .amount { font-family: var(--cond); font-stretch: condensed; font-weight: 700; font-size: 64px; line-height: 1.05; margin: 6px 0 8px; }
.wait-line { display: flex; gap: 12px; align-items: center; color: var(--fog); font-size: 14px; margin-top: 22px; }
.wait-line i { width: 42px; height: 3px; background: var(--rule); position: relative; overflow: hidden; flex: none; }
.wait-line i::after { content: ""; position: absolute; inset: 0 auto 0 0; width: 14px; background: var(--signal); animation: slide 1.1s linear infinite; }
@keyframes slide { from { transform: translateX(-14px); } to { transform: translateX(42px); } }
.done-mark { width: 44px; height: 44px; border-radius: 6px; background: var(--go); color: #0c1f17; display: grid; place-items: center; font-size: 24px; font-weight: 700; margin-bottom: 18px; }

/* ================= админка ================= */
.admin-nav { display: flex; gap: 22px; border-bottom: 1px solid var(--rule); padding-top: 8px; overflow-x: auto; scrollbar-width: none; }
.admin-nav a { padding: 12px 0; color: var(--fog); font-size: 14.5px; border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.admin-nav a:hover { color: var(--chalk); text-decoration: none; }
.admin-nav a.on { color: var(--chalk); border-color: var(--signal); }
.filters { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 14px; }
.filters input[type=search] { flex: 1 1 260px; width: auto; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chips a { height: 32px; display: inline-flex; align-items: center; padding: 0 11px; border-radius: 6px; border: 1px solid var(--rule); color: var(--fog); font-size: 13px; }
.chips a.on { color: var(--chalk); background: var(--slate); }
.chips a:hover { color: var(--chalk); text-decoration: none; }
.bulk { position: sticky; bottom: 12px; z-index: 5; display: flex; gap: 8px; flex-wrap: wrap; align-items: center; padding: 10px 12px; margin-top: 12px; background: var(--asphalt); border: 1px solid var(--rule); border-radius: 10px; box-shadow: 0 12px 36px -12px #000; }
.bulk input[type=text] { width: auto; flex: 1 1 170px; height: 32px; font-size: 13.5px; }
.gen-out { font-family: var(--cond); font-stretch: condensed; font-size: 17px; letter-spacing: .03em; min-height: 120px; resize: vertical; }
.pager { display: flex; gap: 10px; justify-content: center; align-items: center; margin-top: 16px; }
.events { list-style: none; margin: 0; padding: 0; font-size: 14px; }
.events li { display: flex; gap: 14px; padding: 9px 0; border-bottom: 1px solid var(--rule); align-items: baseline; }
.events li:last-child { border-bottom: 0; }
.events time { color: var(--fog); font-size: 13px; flex: none; min-width: 108px; }
.err-page { padding: 96px 0 0; }
.err-page .code { font-family: var(--cond); font-stretch: condensed; font-weight: 700; font-size: 96px; line-height: 1; color: var(--dim); }

@media (prefers-reduced-motion: reduce) {
  .sq.target { transition: none; }
  .wait-line i::after { animation: none; left: 14px; }
}
