/* AVA Detail — стиль «Карбон»: тёмный графит, оранжевый сигнальный акцент, мягкие углы. */
@font-face { font-family: 'Manrope'; font-weight: 500; font-display: swap; src: url(/fonts/manrope-cyrillic-500-normal.woff2) format('woff2'); unicode-range: U+0400-04FF; }
@font-face { font-family: 'Manrope'; font-weight: 500; font-display: swap; src: url(/fonts/manrope-latin-500-normal.woff2) format('woff2'); unicode-range: U+0000-00FF, U+2000-206F, U+20BD; }
@font-face { font-family: 'Manrope'; font-weight: 700; font-display: swap; src: url(/fonts/manrope-cyrillic-700-normal.woff2) format('woff2'); unicode-range: U+0400-04FF; }
@font-face { font-family: 'Manrope'; font-weight: 700; font-display: swap; src: url(/fonts/manrope-latin-700-normal.woff2) format('woff2'); unicode-range: U+0000-00FF, U+2000-206F, U+20BD; }
@font-face { font-family: 'Manrope'; font-weight: 800; font-display: swap; src: url(/fonts/manrope-cyrillic-800-normal.woff2) format('woff2'); unicode-range: U+0400-04FF; }
@font-face { font-family: 'Manrope'; font-weight: 800; font-display: swap; src: url(/fonts/manrope-latin-800-normal.woff2) format('woff2'); unicode-range: U+0000-00FF, U+2000-206F, U+20BD; }

:root {
  --bg: #0f1113;
  --bg2: #15181b;
  --card: #1b1e22;
  --card2: #22262b;
  --line: #2b2f35;
  --line2: #3a3f46;
  --tx: #eef0f2;
  --tx2: #aab1ba;
  --tx3: #8b929b;
  --acc: #4e90a1;
  --acc2: #6aa8b7;
  --acc-bg: rgba(78, 144, 161, .15);
  --money: #e0a64b;
  --money2: #ecc06e;
  --ok: #3cdc82;
  --ok-bg: rgba(60, 220, 130, .14);
  --warn: #ffc23d;
  --warn-bg: rgba(255, 194, 61, .14);
  --bad: #ff5a5a;
  --bad-bg: rgba(255, 90, 90, .14);
  --info: #6aa8ff;
  --info-bg: rgba(106, 168, 255, .14);
  --r: 14px;
  --r-sm: 10px;
  --side: 232px;
  --tabs-h: 64px;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100vh;
  background: radial-gradient(120% 50% at 50% 0%, #1d2024 0%, var(--bg) 55%) fixed, var(--bg);
  color: var(--tx); font: 500 15px/1.4 Manrope, system-ui, -apple-system, 'Segoe UI', sans-serif;
  -webkit-tap-highlight-color: transparent;
}
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3 { margin: 0; font-weight: 800; letter-spacing: -.01em; }
.hidden { display: none !important; }
.num { font-variant-numeric: tabular-nums; }

/* ── Каркас: боковое меню на широком экране, нижние вкладки на телефоне ── */
.side {
  position: fixed; inset: 0 auto 0 0; width: var(--side); padding: 22px 14px;
  background: rgba(18, 20, 23, .92); border-right: 1px solid var(--line);
  display: flex; flex-direction: column; gap: 4px; z-index: 20;
}
.brand { display: flex; align-items: center; padding: 0 8px 18px; }
.brand-logo { display: inline-flex; flex-direction: column; align-items: flex-start; gap: 5px; }
.brand-top { font-weight: 800; font-size: 20px; letter-spacing: .16em; line-height: 1; color: var(--tx); position: relative; padding-bottom: 7px; }
.brand-top::after { content: ''; position: absolute; left: 0; bottom: 0; width: 100%; height: 3px; border-radius: 3px; background: linear-gradient(90deg, var(--acc), var(--acc2)); }
.brand-sub { font-weight: 800; font-size: 11px; letter-spacing: .3em; color: var(--tx3); }
.nav-a { display: flex; align-items: center; gap: 12px; padding: 11px 12px; border-radius: 12px; color: var(--tx2); font-weight: 700; }
.nav-a svg { width: 20px; height: 20px; flex: none; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.nav-a:hover { background: var(--card); color: var(--tx); }
.nav-a.on { background: var(--acc-bg); color: var(--acc2); }
.side-foot { margin-top: auto; padding: 12px; border-top: 1px solid var(--line); font-size: 13px; color: var(--tx3); }
.side-foot b { display: block; color: var(--tx); font-size: 14px; }

.main { margin-left: var(--side); padding: 26px 32px 60px; max-width: 1280px; }
.top { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 20px; min-height: 40px; }
.top h1 { font-size: 26px; }
.top .sub { color: var(--tx3); font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; }
.top-actions { display: flex; gap: 8px; flex-wrap: wrap; }

.tabs { display: none; }

@media (max-width: 860px) {
  .side { display: none; }
  .main { margin-left: 0; padding: calc(14px + env(safe-area-inset-top)) 14px calc(var(--tabs-h) + 28px + env(safe-area-inset-bottom)); }
  .top h1 { font-size: 22px; }
  .tabs {
    display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
    height: calc(var(--tabs-h) + env(safe-area-inset-bottom)); padding: 6px 6px env(safe-area-inset-bottom);
    background: rgba(18, 20, 23, .96); border-top: 1px solid var(--line); backdrop-filter: blur(12px);
  }
  .tab { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; color: var(--tx3); font-size: 11px; font-weight: 700; border-radius: 12px; }
  .tab svg { width: 22px; height: 22px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
  .tab.on { color: var(--acc2); }
  body.kb-open .tabs, body.kb-open .fab { display: none; }
  body.kb-open .main { padding-bottom: calc(28px + env(safe-area-inset-bottom)); }
  body.kb-open .sticky-total { bottom: 8px; }
}
/* только html: body тоже контейнер прокрутки (overflow-x: hidden), и none на нём глушит колесо мыши над страницей */
html { overscroll-behavior-y: none; }
body.is-login .side, body.is-login .tabs { display: none; }
body.is-login .main { margin: 0 auto; max-width: 420px; padding-top: calc(12vh + env(safe-area-inset-top)); }

/* ── Карточки и сетки ── */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 16px; }
.card + .card { margin-top: 12px; }
.card-h { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.card-h h2 { font-size: 16px; }
.lb { font-size: 11px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--tx3); }
.grid { display: grid; gap: 12px; }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.cols { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.cols.cols-new { grid-template-columns: minmax(0, 1fr) minmax(0, 1.5fr); }
@media (max-width: 1100px) { .cols, .cols.cols-new { grid-template-columns: 1fr; } .g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 520px) { .g3 { grid-template-columns: 1fr 1fr; } }
/* на телефоне: блоки «в две колонки» — друг под другом; второстепенные столбцы таблиц прячем (подробности — по нажатию) */
@media (max-width: 720px) { .g2-stack { grid-template-columns: 1fr; } }
@media (max-width: 600px) { .hide-sm { display: none; } }
.section { margin-top: 18px; }
.section > .lb { margin: 0 4px 8px; display: block; }

.hero { padding: 20px; background: linear-gradient(160deg, #23272c, #181b1f); border: 1px solid var(--line); border-radius: 18px; }
.hero .big { font-size: 40px; font-weight: 800; line-height: 1.05; margin-top: 4px; }
.hero .big small { color: var(--acc); font-size: .7em; }
.big.money { color: var(--money); }
.big.money small { color: var(--money); }
.stat { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; }
.stat .lb { font-size: 10px; }
.stat .v { font-size: 20px; font-weight: 800; margin-top: 2px; }
.stat-link { display: block; color: inherit; text-decoration: none; }
.stat-link .stat:hover { border-color: var(--acc); }
.stat .v.acc { color: var(--acc2); }
.stat .v.ok { color: var(--ok); }
.stat .v.bad { color: var(--bad); }
.stat .h { font-size: 12px; color: var(--tx3); margin-top: 2px; }

/* ── Кнопки ── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 0 18px; border-radius: 12px; border: 1px solid var(--line2);
  background: var(--card2); color: var(--tx); font-weight: 800; cursor: pointer; white-space: nowrap;
}
.btn:hover { border-color: #4a5058; }
.btn:disabled { opacity: .5; cursor: default; }
.btn.acc { background: linear-gradient(90deg, var(--acc), var(--acc2)); color: #111; border: 0; box-shadow: 0 8px 22px rgba(78,144,161,.28); }
.btn.ok { background: var(--ok-bg); color: var(--ok); border-color: transparent; }
.btn.bad { background: var(--bad-bg); color: var(--bad); border-color: transparent; }
.btn.ghost { background: transparent; }
.btn.sm { min-height: 34px; padding: 0 12px; font-size: 13px; border-radius: 10px; }
.btn.icon-only { padding: 0; width: 38px; flex: none; }
.cam-pick { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; }
.cam-pick-i { padding: 0; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: var(--card); cursor: pointer; display: flex; flex-direction: column; text-align: left; color: inherit; font: inherit; }
.cam-pick-i img { width: 100%; height: 100px; object-fit: cover; display: block; background: #000; }
.cam-pick-i span { padding: 8px 10px; font-weight: 700; font-size: 13px; }
.cam-pick-i:hover { border-color: var(--acc); }
.btn.xl { min-height: 58px; font-size: 17px; border-radius: 16px; width: 100%; }
.btn.block { width: 100%; }
.btn svg { width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.btn-row { display: flex; gap: 8px; flex-wrap: wrap; }
.btn-row > .btn { flex: 1; }
.fab { position: fixed; right: 18px; bottom: calc(var(--tabs-h) + 18px + env(safe-area-inset-bottom)); z-index: 25; display: none; }
@media (max-width: 860px) { .fab { display: inline-flex; } }

/* ── Поля ── */
.field { display: flex; flex-direction: column; gap: 6px; }
.field > span { font-size: 12px; font-weight: 700; color: var(--tx3); }
.inp, select.inp, textarea.inp {
  width: 100%; min-height: 46px; padding: 10px 14px; border-radius: 12px;
  background: var(--bg2); border: 1px solid var(--line2); color: var(--tx); outline: none;
}
textarea.inp { min-height: 80px; resize: vertical; }
.inp:focus { border-color: var(--acc); box-shadow: 0 0 0 3px rgba(78,144,161,.18); }
.inp.sm { min-height: 36px; padding: 6px 10px; border-radius: 10px; font-size: 14px; }
.inp.money { text-align: right; font-weight: 800; font-variant-numeric: tabular-nums; }
.form { display: grid; gap: 12px; }
.msg { min-height: 18px; font-size: 13px; color: var(--tx3); }
.msg.err { color: var(--bad); }
.msg.ok { color: var(--ok); }
.check { display: flex; align-items: center; gap: 10px; font-weight: 700; cursor: pointer; }
.check input { width: 20px; height: 20px; accent-color: var(--acc); }

/* Переключатель-сегменты */
.seg { display: flex; gap: 4px; padding: 4px; background: var(--bg2); border: 1px solid var(--line); border-radius: 12px; overflow-x: auto; scrollbar-width: none; }
.seg::-webkit-scrollbar { display: none; }
.seg button { flex: 1 0 auto; min-height: 38px; padding: 0 14px; border: 0; border-radius: 9px; background: transparent; color: var(--tx2); font-weight: 800; cursor: pointer; white-space: nowrap; }
.seg button.on { background: var(--card2); color: var(--acc2); box-shadow: inset 0 0 0 1px var(--line2); }
.seg.cats button { min-width: 48px; font-size: 16px; }

/* ── Госномер как российская табличка ── */
.plate { display: inline-flex; align-items: stretch; background: #f4f4f2; color: #111; border: 2px solid #111; border-radius: 6px; font-family: Manrope, sans-serif; font-weight: 800; line-height: 1; box-shadow: 0 0 0 1px #3a3f46; white-space: nowrap; }
.plate b { padding: 5px 7px; font-size: 16px; letter-spacing: .06em; display: flex; align-items: center; }
.plate i { font-style: normal; border-left: 2px solid #111; padding: 2px 5px; font-size: 12px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; }
.plate i small { font-size: 6px; letter-spacing: .06em; display: flex; align-items: center; gap: 2px; }
.plate i small::after { content: ''; width: 8px; height: 5px; background: linear-gradient(#fff 33%, #1c4fd8 33% 66%, #d81c1c 66%); border: .5px solid #999; }
.plate.lg b { font-size: 26px; padding: 8px 12px; }
.plate.lg i { font-size: 18px; padding: 4px 8px; }
.plate.lg i small { font-size: 8px; }
.plate.raw b { letter-spacing: .03em; }

.plate-input { display: flex; align-items: center; gap: 0; background: #f4f4f2; border: 3px solid #111; border-radius: 10px; box-shadow: 0 0 0 1px var(--line2); overflow: hidden; }
.plate-input input { flex: 1; min-width: 0; border: 0; outline: none; background: transparent; color: #111; font-weight: 800; font-size: 30px; letter-spacing: .08em; text-transform: uppercase; padding: 10px 14px; }
.plate-input input::placeholder { color: #b9b9b5; }
.plate-input .rus { border-left: 3px solid #111; padding: 6px 12px; color: #111; font-weight: 800; font-size: 11px; text-align: center; align-self: stretch; display: flex; align-items: center; }

/* ── Списки ── */
.list { display: flex; flex-direction: column; gap: 8px; }
.row { display: flex; align-items: center; gap: 12px; padding: 12px 14px; background: var(--card); border: 1px solid var(--line); border-radius: var(--r); }
a.row:hover, .row.click:hover { border-color: var(--line2); background: #1f2226; cursor: pointer; }
.row .grow { flex: 1; min-width: 0; }
.row .t { font-weight: 800; }
.row .s { font-size: 13px; color: var(--tx2); margin-top: 3px; overflow: hidden; text-overflow: ellipsis; }
.row .r { text-align: right; flex: none; }
.row .amt { font-weight: 800; font-size: 16px; font-variant-numeric: tabular-nums; }
.empty { padding: 28px 16px; text-align: center; color: var(--tx3); border: 1px dashed var(--line2); border-radius: var(--r); }

.pill { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px; font-size: 12px; font-weight: 800; white-space: nowrap; }
.pill.work { background: var(--acc-bg); color: var(--acc2); }
.pill.ready { background: var(--ok-bg); color: var(--ok); }
.pill.paid { background: var(--card2); color: var(--tx2); }
.pill.cancelled { background: var(--bad-bg); color: var(--bad); }
.pill.warn { background: var(--warn-bg); color: var(--warn); }
.pill.info { background: var(--info-bg); color: var(--info); }
.dot { width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.pill.work .dot { animation: pulse 1.6s infinite; }
@keyframes pulse { 50% { opacity: .3; } }

/* Таблица */
.tbl { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.tbl th { text-align: left; font-size: 11px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--tx3); padding: 8px 10px; border-bottom: 1px solid var(--line); }
.tbl td { padding: 10px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl .r { text-align: right; white-space: nowrap; }
@media (max-width: 520px) { .tbl td, .tbl th { padding: 8px 6px; } .tbl { font-size: 14px; } }
.tbl tfoot td { font-weight: 800; border-top: 1px solid var(--line2); }
.tbl-wrap { overflow-x: auto; }
.tbl tr.click { cursor: pointer; }
.tbl tr.click:hover td { background: #1f2226; }

/* Строки сумм */
.kv { display: flex; justify-content: space-between; gap: 10px; padding: 8px 0; border-bottom: 1px dashed var(--line); }
.kv:last-child { border-bottom: 0; }
.kv .k { color: var(--tx2); }
.kv .v { font-weight: 800; font-variant-numeric: tabular-nums; }
.kv.total .k, .kv.total .v { color: var(--tx); font-size: 18px; }
.minus { color: var(--bad); }
.plus { color: var(--ok); }

/* Полоски по направлениям */
.bar { height: 8px; background: var(--bg2); border-radius: 99px; overflow: hidden; margin-top: 6px; }
.bar > div { height: 100%; background: linear-gradient(90deg, var(--acc), var(--acc2)); border-radius: 99px; }
.spark { display: flex; align-items: flex-end; gap: 4px; height: 90px; padding-top: 8px; }
.spark div { flex: 1; background: linear-gradient(180deg, var(--acc2), rgba(78,144,161,.25)); border-radius: 4px 4px 2px 2px; min-height: 2px; position: relative; }
.spark-l { display: flex; gap: 4px; font-size: 10px; color: var(--tx3); margin-top: 4px; }
.spark-l span { flex: 1; text-align: center; overflow: hidden; }

/* ── Приём машины: услуги ── */
.svc-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(190px, 46%), 1fr)); gap: 8px; }
.cols > *, .grid > * { min-width: 0; }
html, body { overflow-x: hidden; }
@media (max-width: 860px) { .pc-only { display: none !important; } .item-f3 { grid-template-columns: 96px 64px minmax(0, 1fr); } }
.svc { text-align: left; padding: 12px; border-radius: 12px; border: 1px solid var(--line); background: var(--bg2); cursor: pointer; display: flex; flex-direction: column; gap: 6px; min-height: 74px; }
.svc:hover { border-color: var(--line2); }
.svc.on { border-color: var(--acc); background: var(--acc-bg); }
.svc .n { font-weight: 700; font-size: 14px; line-height: 1.25; }
.svc .p { margin-top: auto; font-weight: 800; color: var(--acc2); font-variant-numeric: tabular-nums; }
.svc .p small { color: var(--tx3); font-weight: 700; }
.grp-t { grid-column: 1 / -1; margin: 8px 2px 0; }

.item { padding: 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--bg2); display: grid; gap: 10px; }
.item-h { display: flex; gap: 10px; align-items: flex-start; }
.item-h .n { flex: 1; font-weight: 800; }
.item-h .dir { font-size: 12px; color: var(--tx3); font-weight: 700; }
.item-f { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.item-f3 { display: grid; grid-template-columns: 110px 70px 1fr; gap: 8px; align-items: end; }
.x { width: 34px; height: 34px; border-radius: 10px; border: 1px solid var(--line2); background: transparent; color: var(--tx3); cursor: pointer; font-size: 18px; line-height: 1; flex: none; }
.x:hover { color: var(--bad); border-color: var(--bad); }

.sticky-total { position: sticky; bottom: 0; margin-top: 14px; padding: 14px; border-radius: 16px; background: rgba(27,30,34,.97); border: 1px solid var(--line2); display: flex; align-items: center; gap: 14px; box-shadow: 0 -10px 30px rgba(0,0,0,.35); z-index: 5; }
@media (max-width: 860px) { .sticky-total { bottom: calc(var(--tabs-h) + 8px + env(safe-area-inset-bottom)); } }
.sticky-total .sum { font-size: 24px; font-weight: 800; font-variant-numeric: tabular-nums; }
.sticky-total .grow { flex: 1; }

/* Фото */
.photo { width: 100%; max-height: 260px; object-fit: cover; border-radius: 12px; border: 1px solid var(--line); display: block; }
.photo-btn { display: flex; align-items: center; justify-content: center; gap: 10px; min-height: 64px; border: 1px dashed var(--line2); border-radius: 12px; color: var(--tx2); font-weight: 800; cursor: pointer; background: var(--bg2); }
.photo-btn svg { width: 24px; height: 24px; stroke: currentColor; fill: none; stroke-width: 2; }

/* ── Окно (снизу на телефоне, по центру на ПК) ── */
.modal-bg { position: fixed; inset: 0; z-index: 100; background: rgba(0,0,0,.6); backdrop-filter: blur(3px); display: flex; align-items: center; justify-content: center; padding: 16px; animation: fade .15s; }
.modal { width: min(520px, 100%); max-height: calc(100vh - 32px); overflow: auto; background: var(--card); border: 1px solid var(--line2); border-radius: 18px; padding: 18px; box-shadow: 0 20px 60px rgba(0,0,0,.5); }
.modal-h { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 14px; }
.modal-h h2 { font-size: 18px; }
@media (max-width: 860px) {
  .modal-bg { align-items: flex-end; padding: 0; }
  .modal { width: 100%; border-radius: 20px 20px 0 0; max-height: 92vh; padding-bottom: calc(18px + env(safe-area-inset-bottom)); animation: up .2s; }
}
@keyframes fade { from { opacity: 0; } }
@keyframes up { from { transform: translateY(40px); opacity: 0; } }

.toast { position: fixed; left: 50%; top: 18px; transform: translateX(-50%); z-index: 200; padding: 12px 18px; border-radius: 12px; background: #2a2e34; border: 1px solid var(--line2); font-weight: 700; box-shadow: 0 10px 30px rgba(0,0,0,.4); animation: fade .2s; max-width: calc(100vw - 32px); }
.toast.err { border-color: var(--bad); color: #ffb3b3; }
.toast.ok { border-color: var(--ok); }

/* Вход */
.login-card { padding: 26px; }
.login-brand { display: flex; flex-direction: column; align-items: center; gap: 12px; margin-bottom: 22px; }
.login-brand .brand-logo { align-items: center; gap: 8px; }
.login-brand .brand-top { font-size: 40px; letter-spacing: .2em; padding-bottom: 12px; }
.login-brand .brand-top::after { height: 5px; }
.login-brand .brand-sub { font-size: 14px; letter-spacing: .42em; }

.muted { color: var(--tx3); }
.small { font-size: 13px; }
.mt { margin-top: 12px; }
.mt2 { margin-top: 20px; }
.flex { display: flex; align-items: center; gap: 10px; }
.flex.wrap { flex-wrap: wrap; }
.between { justify-content: space-between; }
.spin { width: 22px; height: 22px; border: 3px solid var(--line2); border-top-color: var(--acc); border-radius: 50%; animation: rot .8s linear infinite; margin: 30px auto; }
@keyframes rot { to { transform: rotate(360deg); } }
.hl { color: var(--acc2); }
.tag { display: inline-block; font-size: 11px; font-weight: 800; padding: 2px 7px; border-radius: 6px; background: var(--card2); color: var(--tx2); margin-left: 6px; vertical-align: middle; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: -4px; }
.chip { font: inherit; font-size: 13px; font-weight: 700; padding: 6px 11px; border-radius: 99px; border: 1px solid var(--line2); background: var(--card2); color: var(--tx2); cursor: pointer; }
.chip:hover { border-color: var(--acc); color: var(--tx); }

/* Склад */
.tag.tag-bad { background: var(--bad-bg); color: var(--bad); }
.tc-row { padding: 8px; gap: 8px; }
.tc-row .inp.money { width: 96px; flex: none; }
details > summary { cursor: pointer; }
.steps { margin: 10px 0 0; padding-left: 20px; display: grid; gap: 6px; }

/* Касса (компьютер на кассовой зоне) */
.desk-search { display: flex; align-items: center; gap: 12px; padding: 6px 16px; background: var(--bg2); border: 2px solid var(--acc); border-radius: 16px; box-shadow: 0 0 0 4px rgba(78,144,161,.12); }
.desk-search svg { width: 26px; height: 26px; stroke: var(--tx3); fill: none; stroke-width: 2; flex: none; }
.desk-search-inp { flex: 1; min-width: 0; border: 0; outline: none; background: transparent; color: var(--tx); font-size: 30px; font-weight: 800; letter-spacing: .08em; padding: 10px 0; }
.desk-search-inp::placeholder { color: var(--tx3); font-size: 18px; font-weight: 700; letter-spacing: 0; }
.desk { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(320px, 1fr); gap: 16px; align-items: start; }
@media (max-width: 1100px) { .desk { grid-template-columns: 1fr; } }
.desk > div > .lb { display: block; margin: 0 4px 8px; }
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 10px; }
.tile { font: inherit; color: inherit; text-align: left; display: flex; flex-direction: column; gap: 6px; align-items: flex-start; padding: 12px; border-radius: 14px; border: 1px solid var(--line); background: var(--card); cursor: pointer; }
.tile:hover { border-color: var(--line2); }
.tile.on { border-color: var(--acc); box-shadow: 0 0 0 3px rgba(78,144,161,.22); }
.tile.work { opacity: .6; }
.tile.work.on { opacity: 1; }
.tile-sum { font-size: 18px; font-weight: 800; font-variant-numeric: tabular-nums; }
.tile-s { font-size: 12px; color: var(--tx3); font-weight: 700; }
.desk-panel { position: sticky; top: 16px; }
.desk-hint { display: flex; gap: 14px; align-items: center; padding: 24px 6px; }
.desk-hint svg { width: 34px; height: 34px; stroke: var(--acc); fill: none; stroke-width: 2; flex: none; }
.desk-total { display: flex; justify-content: space-between; align-items: flex-end; margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--line); }
.desk-total .num { font-size: 34px; font-weight: 800; }
.desk-pay { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 12px; }
.desk-pay .btn.xl { font-size: 15px; padding: 0 6px; }
.msg.warn { color: var(--warn); }

/* Приём машины: шаги на телефоне */
.wiz-bar { display: none; }
@media (max-width: 860px) {
  .wiz-bar { display: flex; gap: 6px; margin-bottom: 12px; }
  .wiz-bar button { flex: 1; font: inherit; font-size: 12px; font-weight: 800; color: var(--tx3); background: var(--bg2); border: 1px solid var(--line); border-radius: 12px; padding: 8px 4px; display: flex; flex-direction: column; align-items: center; gap: 2px; cursor: pointer; }
  .wiz-bar button b { font-size: 15px; }
  .wiz-bar button.on { color: var(--acc2); border-color: var(--acc); background: var(--acc-bg); }
  .wiz-bar button.done { color: var(--ok); }
  .wiz .wiz-step:not(.on) { display: none; }
}
.rep-card { font: inherit; color: inherit; text-align: left; width: 100%; display: grid; gap: 4px; padding: 14px; margin-bottom: 14px; border-radius: var(--r); border: 1px solid var(--acc); background: var(--acc-bg); cursor: pointer; }
.rep-go { color: var(--acc2); font-weight: 800; margin-top: 4px; font-size: 15px; }
.pop-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(160px, 46%), 1fr)); gap: 8px; }
.pop { font: inherit; color: inherit; text-align: left; display: flex; flex-direction: column; gap: 6px; min-height: 80px; padding: 14px 12px; border-radius: 14px; border: 1px solid var(--line2); background: var(--card2); cursor: pointer; }
.pop .n { font-weight: 800; font-size: 15px; line-height: 1.2; }
.pop .p { margin-top: auto; color: var(--acc2); font-weight: 800; font-variant-numeric: tabular-nums; }
.pop.on { border-color: var(--acc); background: var(--acc-bg); }
/* Счётчик количества услуги прямо в плитке (−/+) */
.tile-foot { margin-top: auto; display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.svc .tile-foot .p, .pop .tile-foot .p { margin-top: 0; }
.qty { display: inline-flex; align-items: center; gap: 4px; }
.qbtn { width: 34px; height: 34px; flex: 0 0 auto; border-radius: 9px; border: 1px solid var(--acc); background: var(--card2); color: inherit; font-size: 20px; font-weight: 800; line-height: 1; cursor: pointer; display: flex; align-items: center; justify-content: center; }
.qbtn:active { background: var(--acc-bg); }
.qn { min-width: 22px; text-align: center; font-weight: 800; font-size: 16px; font-variant-numeric: tabular-nums; }
.emp-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(120px, 30%), 1fr)); gap: 8px; }
.emp { font: inherit; color: inherit; display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 12px 6px; border-radius: 14px; border: 1px solid var(--line2); background: var(--card2); cursor: pointer; }
.emp .n { font-weight: 800; font-size: 15px; }
.emp .s { font-size: 11px; color: var(--tx3); font-weight: 700; }
.emp .s.free { color: var(--ok); }
.emp.on { border-color: var(--acc); background: var(--acc-bg); }
.chip.on { background: var(--acc); border-color: var(--acc); color: #111; }
details.item > summary { list-style: none; cursor: pointer; }
details.item > summary::-webkit-details-marker { display: none; }
details.item .item-body { display: grid; gap: 10px; margin-top: 10px; }

/* Распознавание номера */
.photo-btn.big { min-height: 96px; border-style: solid; border-color: var(--acc); background: var(--acc-bg); color: var(--tx); }
.photo-btn.big svg { width: 32px; height: 32px; stroke: var(--acc2); }
.photo-btn span { display: flex; flex-direction: column; }
.photo-btn small { color: var(--tx3); font-weight: 700; font-size: 12px; }
.recog { margin-top: 8px; }
.recog .chips { align-items: center; margin-top: 6px; }
.spin { display: inline-block; width: 12px; height: 12px; border: 2px solid var(--line2); border-top-color: var(--acc); border-radius: 50%; animation: spin .8s linear infinite; vertical-align: -1px; }
@keyframes spin { to { transform: rotate(360deg); } }

/* Контроль */
a.ctl-card { display: block; color: inherit; text-decoration: none; }
a.ctl-card:hover { border-color: var(--line2); }
.ctl-card.bad { border-color: rgba(255,90,90,.45); }
.ctl-note { max-width: 520px; margin: 0; }
.tbl td.ctl-who { min-width: 170px; }

/* Запись */
.bk-list { display: grid; gap: 10px; }
.card.bk { display: grid; grid-template-columns: 64px 1fr; gap: 14px; align-items: start; margin: 0; }
.bk-closed { opacity: .6; }
.bk-time { display: flex; flex-direction: column; align-items: center; padding: 8px 0; border-radius: 12px; background: var(--acc-bg); }
.bk-time b { font-size: 20px; color: var(--acc2); font-variant-numeric: tabular-nums; }
.bk-time span { font-size: 12px; color: var(--tx3); font-weight: 700; }
.bk-body { min-width: 0; }
.bk-svcs { max-height: 260px; overflow-y: auto; display: grid; gap: 2px; margin-top: 8px; border: 1px solid var(--line); border-radius: 12px; padding: 6px; }
.bk-svc { font-weight: 600; font-size: 14px; padding: 6px; border-radius: 8px; gap: 8px; }
.bk-svc:hover { background: var(--card2); }
.bk-mini-time { display: flex; flex-direction: column; align-items: center; font-weight: 800; font-size: 18px; color: var(--acc2); min-width: 56px; }
.bk-mini-time small { font-size: 11px; color: var(--tx3); font-weight: 700; }
.zp-times { display: grid; grid-template-columns: repeat(auto-fill, minmax(72px, 1fr)); gap: 6px; }
.zp-time { font: inherit; font-weight: 800; color: var(--tx); padding: 10px 0; border-radius: 10px; border: 1px solid var(--line2); background: var(--card2); cursor: pointer; font-variant-numeric: tabular-nums; }
.zp-time.on { background: var(--acc); border-color: var(--acc); color: #111; }
@media (max-width: 520px) { .card.bk { grid-template-columns: 1fr; } .bk-time { flex-direction: row; gap: 8px; justify-content: center; } }

/* SMS */
.sms-ev { display: grid; gap: 6px; padding: 12px 0; border-top: 1px solid var(--line); }
.sms-ev:first-of-type { border-top: 0; }
.sms-ev p { margin: 0; }
.gw-code { font-size: 12px; background: var(--bg2); border: 1px solid var(--line); border-radius: 8px; padding: 4px 8px; word-break: break-all; }

/* Аналитика */
.wb-row { align-items: center; flex-wrap: wrap; }
.wb-acts { flex: none; }
@media (max-width: 520px) { .wb-acts { width: 100%; } }

/* Сотрудники */
.st-row { align-items: center; }
.st-ava { width: 40px; height: 40px; border-radius: 50%; background: var(--acc-bg); color: var(--acc2); font-weight: 800; display: flex; align-items: center; justify-content: center; flex: none; }
.st-roles { display: grid; gap: 8px; }
.st-role { font: inherit; color: inherit; text-align: left; display: grid; gap: 2px; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--line2); background: var(--card2); cursor: pointer; }
.st-role span { font-size: 12px; color: var(--tx3); font-weight: 600; }
.st-role.on { border-color: var(--acc); background: var(--acc-bg); }
.st-pass .inp { flex: 1; min-width: 0; }

/* Без связи */
.offline-bar { margin-bottom: 12px; padding: 10px 14px; border-radius: 12px; background: var(--warn-bg); color: var(--warn); font-weight: 700; font-size: 14px; }
/* Табель */
.tbl.tabel td, .tbl.tabel th { padding: 8px 6px; white-space: nowrap; }

/* Лояльность */
.loy-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(420px, 100%), 1fr)); gap: 14px; align-items: start; }
.card.loy { margin: 0; }
.card.loy.chosen { border-color: var(--ok); }
.loy-pm { display: grid; gap: 4px; font-size: 13px; color: var(--tx2); }
.loy-sim { margin-top: 10px; padding: 12px; border-radius: 12px; background: var(--bg2); border: 1px solid var(--line); }
.loy-big { font-size: 22px; font-weight: 800; margin-top: 4px; }
.loy-big small { font-size: 13px; color: var(--tx3); font-weight: 700; }

/* ── Камеры ── */
.card.warn { border-color: var(--warn); background: var(--warn-bg); }
.steps { margin: 10px 0 0; padding-left: 20px; display: grid; gap: 6px; color: var(--tx2); font-size: 14px; }
.cam-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; }
.cam-cell { display: block; background: var(--card); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; color: var(--tx); }
.cam-cell:hover { border-color: var(--line2); }
.cam-img { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; background: #000; }
.cam-img.off, .cam-thumb.off { display: flex; align-items: center; justify-content: center; }
.cam-cap { padding: 9px 11px; }
.cam-dot { width: 9px; height: 9px; border-radius: 50%; display: inline-block; background: var(--tx3); flex: none; }
.cam-dot.on { background: var(--ok); }
.cam-dot.busy { background: var(--warn); box-shadow: 0 0 0 3px var(--warn-bg); }
.cam-dot.off { background: var(--bad); }
.cam-thumb { width: 120px; height: 90px; object-fit: cover; border-radius: 10px; background: #000; border: 1px solid var(--line); flex: none; }
.cam-strip { display: flex; gap: 6px; margin-top: 10px; overflow-x: auto; }
.cam-strip img { height: 120px; border-radius: 8px; cursor: pointer; background: #000; }
.cam-full { width: 100%; border-radius: 12px; display: block; }

/* ── Запись камеры ── */
.rec-screen { position: relative; background: #000; border-radius: 14px; overflow: hidden; border: 1px solid var(--line); }
.rec-img { display: block; width: 100%; max-height: 58vh; aspect-ratio: 16 / 10; object-fit: contain; background: #000; }
.rec-badge { position: absolute; top: 8px; right: 8px; display: flex; gap: 6px; align-items: center; }
.rec-time { background: rgba(0,0,0,.6); color: #fff; font-weight: 800; font-variant-numeric: tabular-nums; padding: 3px 9px; border-radius: 7px; font-size: 14px; }
.rec-ctl { display: flex; gap: 12px; align-items: center; margin-top: 10px; }
.rec-slider { flex: 1; accent-color: var(--acc); height: 32px; }
.rec-jump { width: 100%; text-align: left; background: var(--card); border: 1px solid var(--line); cursor: pointer; }
.rec-jump:hover { border-color: var(--line2); }

/* ── Камеры: загрузка по часам ── */
.cam-hours { display: flex; align-items: flex-end; gap: 3px; height: 120px; margin-top: 6px; }
.cam-hcol { flex: 1; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; height: 100%; }
.cam-hbar { width: 100%; min-height: 2px; background: linear-gradient(180deg, var(--acc), var(--acc2)); border-radius: 4px 4px 0 0; }
.cam-hlb { font-size: 10px; color: var(--tx3); margin-top: 4px; height: 12px; }

/* ── Машины (#cars): плитки машин ── */
.cars-wrap { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 20px; align-items: start; }
@media (max-width: 1100px) { .cars-wrap { grid-template-columns: 1fr; } }
.cars-bar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.cars-bar .chips { margin-top: 0; }
.cars-search { max-width: 280px; }
@media (max-width: 860px) { .cars-search { max-width: none; width: 100%; } .cars-kassa { display: none; } }
.chip.cl { background: transparent; }
.chip.free { background: var(--ok-bg); color: var(--ok); border-color: transparent; }
.cars-alert { background: var(--bad-bg); border: 1px solid rgba(255, 90, 90, .4); border-radius: var(--r); padding: 10px 12px; font-size: 13px; display: grid; gap: 3px; margin-bottom: 12px; }
.cars-alert b { color: var(--bad); }
.cars-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 10px; }
@media (max-width: 860px) { .cars-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; } }
.cars-grid .empty { grid-column: 1 / -1; }
.cars-side { display: grid; gap: 14px; }
.cars-side .section { margin-top: 0; }
.cars-kassa .big { font-size: 28px; margin: 4px 0 6px; }
.ct { display: flex; flex-direction: column; background: var(--card); border: 1px solid transparent; border-radius: var(--r); overflow: hidden; color: var(--tx); text-decoration: none; }
.ct:hover { border-color: var(--line2); }
.ct-ready { border-color: rgba(60, 220, 130, .5); }
.ct-queue { border-color: #5d636b; background: #16181b; }
.ct.alert { border-color: rgba(255, 90, 90, .6); }
.ct-ph { position: relative; height: 92px; background: linear-gradient(160deg, #2a3036, #171a1d); display: flex; align-items: center; justify-content: center; }
.ct-ph img { width: 100%; height: 100%; object-fit: cover; }
.ct-queue .ct-ph { filter: grayscale(1) brightness(.7); }
.ct-noph svg { width: 40px; height: 40px; stroke: var(--tx3); fill: none; stroke-width: 1.6; opacity: .6; }
.ct-ph .plate { position: absolute; left: 6px; bottom: 6px; }
.ct-ph .plate b { font-size: 12px; padding: 3px 5px; }
.ct-ph .plate i { font-size: 9px; padding: 1px 3px; }
.ct-st { position: absolute; right: 6px; top: 6px; padding: 3px 7px; border-radius: 8px; font-size: 11px; font-weight: 800; background: rgba(15, 17, 19, .85); color: var(--acc2); }
.ct-ready .ct-st { color: var(--ok); }
.ct-queue .ct-st, .ct-paid .ct-st { color: #c3c8ce; }
.ct.alert .ct-st { color: var(--bad); }
.ct-b { padding: 8px 10px 10px; display: flex; flex-direction: column; gap: 4px; flex: 1; }
.ct-row { display: flex; justify-content: space-between; align-items: baseline; gap: 6px; }
.ct-sum { font-size: 17px; font-weight: 800; color: var(--money); }
.ct-queue .ct-sum, .ct-paid .ct-sum { color: #b9bec5; }
.ct-n { font-size: 11px; color: var(--tx3); }
.ct-svc { font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ct-who { font-size: 11px; color: var(--tx3); display: flex; justify-content: space-between; gap: 6px; }
.ct-who span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ct-who span:last-child { white-space: nowrap; }
.ct-who .warn { color: var(--warn); }
.ct-bar { height: 5px; background: var(--line); border-radius: 5px; overflow: hidden; }
.ct-bar i { display: block; height: 5px; background: var(--ok); }
.ct.alert .ct-bar i { background: var(--bad); }
.ct-btns { display: grid; gap: 6px; margin-top: auto; padding-top: 4px; }
.ct-btns.two { grid-template-columns: 44px 1fr; }
.ct-btns .btn { min-height: 38px; padding: 6px 8px; font-size: 13px; justify-content: center; }
.ct-btns .btn.q { background: var(--line2); color: var(--tx); border-color: transparent; }
.ct-btns .btn svg { width: 15px; height: 15px; }
@media (min-width: 861px) { .ct-btns .ct-call { display: none; } .ct-btns.two { grid-template-columns: 1fr; } }
.pill.queue { background: var(--card2); color: #c3c8ce; }

/* ===== График работы ===== */
.sch-nav { gap: 12px; justify-content: flex-start; }
.sch-month { font-size: 17px; text-transform: capitalize; min-width: 150px; text-align: center; }
.sch-card { padding: 8px; }
.sch { border-collapse: separate; border-spacing: 2px; font-size: 13px; }
.sch th, .sch td { padding: 0; text-align: center; }
.sch .sch-name { position: sticky; left: 0; z-index: 1; background: var(--card); text-align: left; padding-right: 8px; min-width: 96px; }
.sch-who { font: inherit; font-weight: 800; color: var(--tx); background: none; border: 0; padding: 6px 2px; cursor: pointer; text-align: left; display: flex; flex-direction: column; }
.sch-who small { font-weight: 600; color: var(--tx3); font-size: 11px; }
.sch-who:hover { color: var(--acc2); }
.sch-h { font-weight: 800; color: var(--tx2); min-width: 30px; padding: 2px 0; }
.sch-h small { display: block; font-weight: 600; font-size: 10px; color: var(--tx3); }
.sch-h.we, .sch-h.we small { color: var(--money); }
.sch-h.today { color: var(--acc2); box-shadow: inset 0 -2px 0 var(--acc); }
.sch-c { width: 30px; height: 34px; border-radius: 7px; border: 1px solid var(--line); background: var(--bg2); color: #111; font: inherit; font-weight: 800; cursor: pointer; }
.sch-c.we { background: var(--card2); }
.sch-c.on { background: var(--acc); border-color: var(--acc); }
.sch-c.today { box-shadow: 0 0 0 2px var(--acc2); }
.sch-n { font-weight: 700; color: var(--tx2); }
.sch-foot .sch-n.none { color: var(--bad); }
.chip.plan { border-color: var(--acc); color: var(--acc2); }
.sch-strip { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
.sch-day { display: flex; flex-direction: column; align-items: center; gap: 1px; padding: 6px 2px; border-radius: 10px; background: var(--bg2); border: 1px solid var(--line); color: var(--tx3); }
.sch-day b { font-size: 16px; color: var(--tx2); }
.sch-day small, .sch-day span { font-size: 11px; font-weight: 700; }
.sch-day.on { background: var(--acc-bg); border-color: var(--acc); color: var(--acc2); }
.sch-day.on b { color: var(--tx); }
.sch-day.today { box-shadow: 0 0 0 2px var(--acc2); }
.tag.warn { background: var(--warn-bg); color: var(--warn); }
.pend-row .btn { flex: none; }
.pend-card { margin-bottom: 12px; border-color: var(--warn); }

/* выбранный способ оплаты в окне оплаты */
.btn.on { box-shadow: 0 0 0 3px var(--acc), inset 0 0 0 1px rgba(255,255,255,.25); filter: brightness(1.15); }

.prev-pay { font-size: 11px; font-weight: 700; opacity: .85; }
.wait-pill { display: inline-flex; margin-bottom: 8px; }

/* Приём машины: разделы услуг крупными кнопками */
.sec-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.sec { position: relative; min-height: 52px; padding: 8px 6px; border-radius: 12px; border: 1px solid var(--line2); background: var(--card2); color: var(--tx); font-weight: 800; font-size: 14px; cursor: pointer; }
.sec.on { border-color: var(--acc); background: var(--acc-bg); color: var(--acc2); }
.sec-n { position: absolute; top: -6px; right: -4px; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; background: var(--acc); color: #fff; font-size: 12px; line-height: 20px; }
@media (min-width: 861px) { .sec-grid { grid-template-columns: repeat(6, 1fr); } }
.sub-seg { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); overflow: visible; }
.sub-seg button { flex: 1 1 auto; white-space: normal; padding: 6px 12px; }

/* Аварийный режим (запасной сервер на ПК мойки) */
.emergency-bar { position: sticky; top: 0; z-index: 50; padding: 8px 14px; background: var(--warn-bg); color: var(--warn); font-weight: 700; font-size: 13px; text-align: center; border-bottom: 1px solid var(--warn); }
