:root {
  --bg: #14161a; --card: #1d2026; --text: #eceae4; --muted: #9a9890; --accent: #d4b26a; --line: #2c3038;
  color-scheme: dark;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text);
  font: 17px/1.45 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  padding: env(safe-area-inset-top) 16px env(safe-area-inset-bottom); }
.top { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 14px 0; }
.brand { font-weight: 600; color: var(--accent); letter-spacing: .02em; }
.me { color: var(--text); text-decoration: none; }
main { max-width: 640px; margin: 0 auto; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 20px; }
.center { text-align: center; margin-top: 12vh; }
h1 { margin: 0 0 12px; font-size: 26px; }
.muted { color: var(--muted); }
.stack { display: grid; gap: 10px; margin-bottom: 16px; }
select, button { font: inherit; min-height: 48px; border-radius: 12px; border: 1px solid var(--line);
  background: var(--bg); color: var(--text); padding: 0 14px; }
button { background: var(--accent); color: #14161a; border: 0; font-weight: 600; width: 100%; }
button.secondary { background: transparent; color: var(--text); border: 1px solid var(--line); }
.top nav { display: flex; gap: 14px; }
.top nav a { color: var(--text); text-decoration: none; }
.card + .card { margin-top: 14px; }
h2 { margin: 0 0 10px; font-size: 20px; }
.small { font-size: 14px; }
.error { color: #ff8a80; }
.big { font-size: 34px; font-weight: 700; letter-spacing: .06em; margin: 12px 0; }
.code { font-family: ui-monospace, Menlo, monospace; font-size: 26px; }
.qr { background: #fff; border-radius: 12px; padding: 12px; width: min(80vw, 320px); margin: 12px auto; }
.qr svg { width: 100%; height: auto; display: block; }
.list { list-style: none; padding: 0; margin: 0 0 12px; }
.list li { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 10px 0;
  border-bottom: 1px solid var(--line); }
.list li.unread span:first-child { font-weight: 600; }
.list li.archived a { color: var(--muted); }
.list a { color: var(--text); }
input { font: inherit; min-height: 48px; border-radius: 12px; border: 1px solid var(--line); background: var(--bg);
  color: var(--text); padding: 0 14px; }
.button { display: block; text-align: center; min-height: 48px; line-height: 48px; border-radius: 12px; font-weight: 600;
  text-decoration: none; background: var(--accent); color: #14161a; margin-top: 12px; }
a.button.secondary { background: transparent; color: var(--text); border: 1px solid var(--line); }
button.small { min-height: 36px; width: auto; padding: 0 12px; font-size: 14px; }
button.danger { background: #b3261e; color: #fff; }
.steps { text-align: left; color: var(--muted); }
section.card > button + .error { margin-top: 10px; }
.top nav { flex-wrap: wrap; justify-content: flex-end; font-size: 15px; }
.top .brand { white-space: nowrap; }
@media (max-width: 420px) { .top .brand { font-size: 0; } .top .brand::before { content: "V"; font-size: 22px; } }
a { color: var(--accent); }
/* WP-4: машины */
textarea { font: inherit; border-radius: 12px; border: 1px solid var(--line); background: var(--bg); color: var(--text);
  padding: 10px 14px; width: 100%; resize: vertical; }
.plate { font-family: ui-monospace, Menlo, monospace; letter-spacing: .06em; font-weight: 700; }
.big-plate { font-size: 32px; margin: 4px 0 6px; }
.plate-input { text-transform: uppercase; font-family: ui-monospace, Menlo, monospace; letter-spacing: .06em; font-size: 22px; }
.vlist { display: grid; gap: 2px; }
.vrow { display: flex; flex-direction: column; gap: 2px; padding: 12px 4px; border-bottom: 1px solid var(--line);
  color: var(--text); text-decoration: none; min-height: 48px; }
.vrow.archived { opacity: .6; }
.notice { background: #2a2618; border: 1px solid #5a4b22; border-radius: 12px; padding: 10px 12px; }
fieldset.seg { border: 0; padding: 0; margin: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
fieldset.seg legend { padding: 0 0 6px; }
fieldset.seg label { display: flex; align-items: center; gap: 8px; min-height: 48px; border: 1px solid var(--line);
  border-radius: 12px; padding: 0 12px; }
fieldset.seg label:has(input:checked) { border-color: var(--accent); }
label.check { display: flex; gap: 10px; align-items: center; min-height: 44px; }
details summary { cursor: pointer; min-height: 40px; line-height: 40px; color: var(--accent); }
dl.facts { display: grid; grid-template-columns: max-content 1fr; gap: 6px 14px; margin: 0; }
dl.facts dt { color: var(--muted); }
dl.facts dd { margin: 0; overflow-wrap: anywhere; }
.pre { white-space: pre-line; }
.list li.voided span:first-child { text-decoration: line-through; color: var(--muted); }
a.button + a.button { margin-top: 8px; }
/* WP-5: очередь и заказ */
h3 { margin: 14px 0 6px; font-size: 17px; }
.orow { display: grid; grid-template-columns: 64px 1fr; gap: 10px; padding: 12px 4px; border-bottom: 1px solid var(--line);
  color: var(--text); text-decoration: none; min-height: 48px; }
.orow.urgent { border-left: 3px solid var(--accent); padding-left: 8px; }
.otime { font-variant-numeric: tabular-nums; color: var(--muted); font-size: 15px; }
.obody { display: flex; flex-direction: column; gap: 2px; min-width: 0; overflow-wrap: anywhere; }
.badge { display: inline-block; font-size: 12px; font-weight: 600; border-radius: 8px; padding: 1px 8px;
  border: 1px solid var(--line); vertical-align: middle; }
.badge.warn { background: #3a2a10; border-color: #8a6420; color: #f3c46b; }
.daynav { display: grid; grid-template-columns: 56px 1fr 56px; align-items: center; gap: 8px; text-align: center; }
.daynav .button { margin: 0; }
.daynav .big { font-size: 20px; letter-spacing: 0; margin: 0; }
.complaint { white-space: pre-line; font-size: 18px; }
.inline-form { margin-bottom: 8px; }
form.row { display: flex; gap: 6px; align-items: center; flex-shrink: 0; }
form.row select { min-height: 40px; padding: 0 8px; }
form.row button { width: auto; min-height: 40px; }
button.link { background: none; border: 0; color: var(--muted); width: auto; min-height: 36px; text-decoration: underline;
  font-weight: 400; font-size: 14px; padding: 0 4px; }
fieldset.when { border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; display: grid; gap: 8px; margin: 0; }
@media (max-width: 420px) { .list li { flex-wrap: wrap; } }
/* WP-6: автопарк и ТО */
.badge.ok { background: #12301c; border-color: #2c6b40; color: #8fd9a8; }
.badge.bad { background: #3a1513; border-color: #8a2a24; color: #ff8a80; }
.frow { display: flex; flex-direction: column; gap: 3px; padding: 12px 4px; border-bottom: 1px solid var(--line);
  color: var(--text); text-decoration: none; }
.fhead { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
section.card.muted h2 { color: var(--muted); }
/* WP-7: крупные действия, «Сохранено», нет интернета */
.big-button { min-height: 64px; font-size: 20px; }
a.button.big-button { line-height: 64px; }
label.big-check { min-height: 56px; font-size: 18px; }
label.big-check input { width: 26px; height: 26px; }
.saved { background: #12301c; border: 1px solid #2c6b40; color: #8fd9a8; border-radius: 12px; padding: 12px 14px;
  margin: 0 0 14px; font-weight: 600; }
.offline { position: sticky; top: 0; z-index: 10; background: #3a1513; border: 1px solid #8a2a24; color: #ffb4ab;
  border-radius: 12px; padding: 10px 14px; margin: 0 auto 10px; max-width: 640px; }
form.search { margin-top: 14px; }
details.when-more { border: 1px solid var(--line); border-radius: 12px; padding: 4px 12px; }
details.when-more[open] { display: grid; gap: 8px; padding-bottom: 12px; }
