/* Полевой терминал монтажника: рабочий инструмент, а не витрина. Плоские панели с тонкими линиями, малые радиусы,
   плотная сетка. Данные (время, номера, коды, подъезд) моноширинным шрифтом, подписи полей капителью, состояния
   светодиодами. Цвет только как сигнал: тариф зелёный, оборудование оранжевое, доступ жёлтый, время сиреневое,
   срочно красное. Без градиентов, свечения и теней. Шрифты IBM Plex Sans и IBM Plex Mono: инженерная пара,
   кириллица в обеих. Свои для этой работы: табличка у двери (подъезд, этаж, квартира) и коды домофонов клавишами. */

@font-face { font-family: "IBM Plex Sans"; font-weight: 400; font-style: normal; font-display: swap; src: url("/fonts/ibm-plex-sans-cyrillic-400-normal.woff2") format("woff2"); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "IBM Plex Sans"; font-weight: 400; font-style: normal; font-display: swap; src: url("/fonts/ibm-plex-sans-latin-400-normal.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "IBM Plex Sans"; font-weight: 600; font-style: normal; font-display: swap; src: url("/fonts/ibm-plex-sans-cyrillic-600-normal.woff2") format("woff2"); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "IBM Plex Sans"; font-weight: 600; font-style: normal; font-display: swap; src: url("/fonts/ibm-plex-sans-latin-600-normal.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "IBM Plex Mono"; font-weight: 400; font-style: normal; font-display: swap; src: url("/fonts/ibm-plex-mono-cyrillic-400-normal.woff2") format("woff2"); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "IBM Plex Mono"; font-weight: 400; font-style: normal; font-display: swap; src: url("/fonts/ibm-plex-mono-latin-400-normal.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "IBM Plex Mono"; font-weight: 600; font-style: normal; font-display: swap; src: url("/fonts/ibm-plex-mono-cyrillic-600-normal.woff2") format("woff2"); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "IBM Plex Mono"; font-weight: 600; font-style: normal; font-display: swap; src: url("/fonts/ibm-plex-mono-latin-600-normal.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

:root {
  color-scheme: light dark;

  /* светлая тема: дневная, под солнцем */
  --bg: #f1f1f0;
  --panel: #ffffff;
  --panel-2: #f6f6f5;
  --line: #dcdcda;
  --line-strong: #c3c3c0;
  --text: #121212;
  --muted: #666663;
  --bar: rgb(255 255 255 / 94%);
  --tint: rgb(0 0 0 / 5%);
  --cta-bg: #121212;
  --cta-ink: #ffffff;

  --tariff-text: #1d6b3c;
  --tariff-bg: rgb(29 107 60 / 7%);
  --tariff-line: rgb(29 107 60 / 34%);
  --buy-text: #a24f0c;
  --buy-bg: rgb(162 79 12 / 7%);
  --buy-line: rgb(162 79 12 / 34%);
  --access-text: #766000;
  --access-bg: rgb(118 96 0 / 8%);
  --access-line: rgb(118 96 0 / 36%);
  --date-text: #5e41a6;
  --date-bg: rgb(94 65 166 / 7%);
  --date-line: rgb(94 65 166 / 34%);
  --danger: #b1271f;
  --danger-text: #b1271f;
  --danger-bg: rgb(177 39 31 / 7%);
  --danger-line: rgb(177 39 31 / 34%);

  --sans: "IBM Plex Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, system-ui, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, monospace;

  --r-card: 8px;
  --r-in: 6px;
  --r-tag: 4px;
  --gutter: 16px;
  --tap: 48px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0b0b0c;
    --panel: #111112;
    --panel-2: #171718;
    --line: #252527;
    --line-strong: #353538;
    --text: #e6e6e7;
    --muted: #8b8b90;
    --bar: rgb(11 11 12 / 94%);
    --tint: rgb(255 255 255 / 5%);
    --cta-bg: #e6e6e7;
    --cta-ink: #0b0b0c;

    --tariff-text: #6fbf8a;
    --tariff-bg: rgb(111 191 138 / 8%);
    --tariff-line: rgb(111 191 138 / 32%);
    --buy-text: #e59a5c;
    --buy-bg: rgb(229 154 92 / 8%);
    --buy-line: rgb(229 154 92 / 32%);
    --access-text: #d4bd5a;
    --access-bg: rgb(212 189 90 / 7%);
    --access-line: rgb(212 189 90 / 30%);
    --date-text: #b7a2e6;
    --date-bg: rgb(183 162 230 / 8%);
    --date-line: rgb(183 162 230 / 30%);
    --danger: #ef7a70;
    --danger-text: #ef7a70;
    --danger-bg: rgb(239 122 112 / 8%);
    --danger-line: rgb(239 122 112 / 32%);
  }
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 15px/1.5 var(--sans);
  padding-bottom: calc(92px + env(safe-area-inset-bottom));
  -webkit-tap-highlight-color: transparent;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, p { margin: 0; }
.muted { color: var(--muted); }
.wrap { width: 100%; max-width: 600px; margin: 0 auto; padding-left: var(--gutter); padding-right: var(--gutter); }

.ic { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; vertical-align: -4px; }

/* Подписи полей: моноширинная капитель. Единый вид для всех заголовков блоков */
.section-title, .field-label, .plate-label, .offer-kind, .section-label, .row-tag, .chip, .tag {
  font-family: var(--mono); font-size: 11.5px; font-weight: 400; line-height: 1.2; letter-spacing: 0.06em; text-transform: uppercase;
}

/* ── верх страницы ─────────────────────────────────── */
.top { padding-top: env(safe-area-inset-top); }
.top-row { display: flex; align-items: flex-end; gap: 12px; padding-top: 24px; padding-bottom: 18px; }
.top-title { flex: 1; min-width: 0; display: grid; gap: 6px; }
.top-title h1 { font-size: 30px; font-weight: 600; line-height: 1.05; letter-spacing: -0.02em; }
.top-sub { font: 400 13px/1.3 var(--mono); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.top-sub.is-date { color: var(--date-text); }
.top-actions { display: flex; gap: 6px; }

.icon-btn { width: 40px; height: 40px; border-radius: var(--r-in); display: grid; place-items: center; border: 1px solid var(--line-strong); background: var(--panel); color: var(--text); cursor: pointer; }
.icon-btn:active { background: var(--tint); }
.icon-btn.spin .ic { animation: spin 0.9s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.banner { margin-bottom: 10px; padding: 10px 12px; font-size: 14px; background: var(--panel-2); border: 1px solid var(--line-strong); border-radius: var(--r-in); }

/* ── нижняя панель дней ────────────────────────────── */
.dock { position: fixed; z-index: 30; left: 0; right: 0; bottom: 0; padding-bottom: env(safe-area-inset-bottom); background: var(--bar); border-top: 1px solid var(--line-strong); -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px); }
.days { position: relative; display: flex; max-width: 600px; margin: 0 auto; overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.days::-webkit-scrollbar { display: none; }
/* Линия над выбранным днём: один и тот же элемент переезжает с дня на день (ответ на нажатие) */
.day-ind { position: absolute; top: 0; left: 0; height: 2px; width: 0; background: var(--text); pointer-events: none; transition: transform 0.25s ease, width 0.25s ease; }
.day { flex: 1 0 auto; min-height: 56px; padding: 0 18px; border: 0; background: none; color: var(--muted); font: 600 14px/1 var(--sans); cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 8px; transition: color 0.15s; }
.day:active { background: var(--tint); }
.day[aria-pressed="true"] { color: var(--text); }
.day-count { min-width: 22px; padding: 3px 5px; border: 1px solid var(--line-strong); border-radius: var(--r-tag); text-align: center; font: 400 12px/1 var(--mono); }
.day[aria-pressed="true"] .day-count { border-color: var(--text); }

/* ── список ────────────────────────────────────────── */
.list { display: grid; gap: 8px; }
.section-label { display: flex; align-items: center; gap: 10px; padding: 14px 2px 2px; color: var(--muted); }
.section-label::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.foot { display: grid; gap: 2px; padding-top: 24px; text-align: left; font: 400 12px/1.4 var(--mono); color: var(--muted); }

.empty { display: grid; justify-items: start; gap: 6px; color: var(--muted); padding: 40px 2px; }
.empty-ic { width: 44px; height: 44px; border-radius: var(--r-in); display: grid; place-items: center; margin-bottom: 8px; background: var(--panel); border: 1px solid var(--line-strong); color: var(--text); }
.empty-ic .ic { width: 22px; height: 22px; }
.empty strong { color: var(--text); font-size: 18px; font-weight: 600; line-height: 1.2; }
.empty .btn { margin-top: 10px; }

/* ── заявка: строка, по нажатию раскрывается ───────── */
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-card); overflow: hidden; }
.card.is-next { border-color: var(--text); }

.row { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 14px; width: 100%; min-height: 68px; padding: 12px 14px; border: 0; background: none; color: inherit; font: inherit; text-align: left; cursor: pointer; }
.row:active { background: var(--tint); }
/* Время назначения: моноширинное, цветом, чтобы находилось раньше всего остального */
.row-time { padding: 6px 8px; border: 1px solid var(--date-line); border-radius: var(--r-tag); background: var(--date-bg); color: var(--date-text); font: 600 19px/1 var(--mono); letter-spacing: -0.02em; }
.row-time.none { border-color: var(--line); background: none; color: var(--muted); font: 400 12px/1.2 var(--mono); letter-spacing: 0; text-transform: uppercase; }
.row-main { min-width: 0; display: grid; gap: 4px; }
.row-tag { display: flex; flex-wrap: wrap; gap: 4px 10px; color: var(--text); font-weight: 600; }
.next-count { color: var(--date-text); font-weight: 400; }
.row-addr { font-size: 17px; font-weight: 600; line-height: 1.25; letter-spacing: -0.01em; overflow-wrap: anywhere; }
.row-meta { display: flex; flex-wrap: wrap; gap: 0 14px; font: 400 12.5px/1.4 var(--mono); color: var(--muted); }
.row-side { display: flex; align-items: center; gap: 8px; }
/* Светодиоды состояний: что в заявке (тариф, покупка оборудования, срочно) видно, не раскрывая */
.led { width: 10px; height: 10px; border-radius: 2px; background: var(--c); }
.led-tariff { --c: var(--tariff-text); }
.led-buy, .led-rent { --c: var(--buy-text); }
.led-urgent { --c: var(--danger); }
/* красный ромб: тариф выше «300 за 300» (красный квадрат: срочно) */
.led-tariff-high { --c: var(--danger); width: 9px; height: 9px; transform: rotate(45deg); }
.row-chev { width: 22px; height: 22px; display: grid; place-items: center; color: var(--muted); }
.row-chev .ic { width: 16px; height: 16px; transition: transform 0.2s ease; }
.card.open .row-chev .ic { transform: rotate(180deg); }
.card.is-past .row-time, .card.is-past .row-addr { opacity: 0.55; }

/* раскрытие: высота плавно растёт */
.collapse { display: grid; grid-template-rows: 0fr; transition: grid-template-rows 0.25s ease; }
.collapse-in { min-height: 0; overflow: hidden; visibility: hidden; transition: visibility 0s 0.25s; }
.card.open .collapse { grid-template-rows: 1fr; }
.card.open .collapse-in { visibility: visible; transition: none; }
.stack { display: grid; gap: 14px; min-width: 0; padding: 14px 14px 16px; border-top: 1px solid var(--line); }
.stack > * { min-width: 0; }

.chips { display: flex; flex-wrap: wrap; gap: 6px; justify-content: flex-end; min-width: 0; }
.chips-start { justify-content: flex-start; }
.chip { padding: 4px 7px; border: 1px solid var(--line-strong); border-radius: var(--r-tag); color: var(--muted); white-space: nowrap; }
.chip-urgent { border-color: var(--danger-line); background: var(--danger-bg); color: var(--danger-text); font-weight: 600; }

/* Табличка у двери: подъезд, этаж, квартира */
.plate { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; border: 1px solid var(--line-strong); border-radius: var(--r-in); }
.plate-cell { padding: 9px 12px 10px; min-width: 0; }
.plate-cell + .plate-cell { border-left: 1px solid var(--line-strong); }
.plate-label { color: var(--muted); }
.plate-value { margin-top: 4px; font: 600 24px/1.1 var(--mono); letter-spacing: -0.02em; overflow-wrap: anywhere; }

.who { display: grid; gap: 10px; }
.person { font-size: 16px; font-weight: 600; }
.number { color: var(--muted); font: 400 12px/1.4 var(--mono); }

.actions { display: flex; gap: 8px; }
.btn { min-height: var(--tap); padding: 0 16px; border-radius: var(--r-in); border: 1px solid var(--line-strong); background: var(--panel); color: var(--text); font: 600 15px/1 var(--sans); cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 8px; text-decoration: none; }
.btn:active { background: var(--tint); }
.btn-primary { background: var(--cta-bg); border-color: var(--cta-bg); color: var(--cta-ink); }
.btn-primary:active { background: var(--cta-bg); filter: brightness(0.85); }
.btn-call { flex: 1; min-width: 0; min-height: 54px; padding: 0 14px; font: 600 clamp(15px, 4.5vw, 18px)/1 var(--mono); letter-spacing: -0.01em; white-space: nowrap; }
.btn-call .ic { width: 20px; height: 20px; }
.btn-square { width: 54px; min-height: 54px; padding: 0; flex: none; }
.btn-ghost { border-color: transparent; background: transparent; min-height: 40px; padding: 0 10px; font-weight: 600; font-size: 14px; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: 0.6; }
.no-phone { padding: 11px 12px; border: 1px solid var(--danger-line); border-radius: var(--r-in); background: var(--danger-bg); color: var(--danger-text); font-size: 14px; }

/* Заказ: тариф и оборудование */
.offers { display: grid; gap: 6px; }
.offer { padding: 10px 12px 11px; border: 1px solid var(--c-line, var(--line-strong)); border-radius: var(--r-in); background: var(--c-bg, var(--panel-2)); }
.offer-kind { display: flex; align-items: center; gap: 8px; color: var(--c-text, var(--muted)); font-weight: 600; }
.offer-kind::before { content: ""; width: 8px; height: 8px; border-radius: 2px; background: currentColor; }
.offer-text { margin-top: 7px; font-size: 16px; font-weight: 400; line-height: 1.35; overflow-wrap: anywhere; }
.offer-text b { font-weight: 600; }
.offer-tariff { --c-text: var(--tariff-text); --c-bg: var(--tariff-bg); --c-line: var(--tariff-line); }
.offer-buy, .offer-rent { --c-text: var(--buy-text); --c-bg: var(--buy-bg); --c-line: var(--buy-line); }
.offer-tariff-high { --c-text: var(--danger-text); --c-bg: var(--danger-bg); --c-line: var(--danger-line); }
.offer-tariff-high .offer-text { color: var(--danger-text); font-weight: 600; }
.offer-text .hot { color: var(--danger-text); }

.section-title { margin-bottom: 6px; color: var(--muted); font-weight: 600; }
.notes { display: grid; gap: 6px; }
.notes .section-title { margin-bottom: 2px; }
.note { white-space: pre-line; overflow-wrap: anywhere; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.tag { padding: 5px 8px; border: 1px solid var(--line-strong); border-radius: var(--r-tag); color: var(--muted); text-transform: none; letter-spacing: 0.02em; font-size: 12px; }

/* Подсветка в свободном тексте заметок: покупка, тариф и даты тем же цветом, что и блоки */
mark { background: none; color: inherit; }
.mk { padding: 0 4px; border: 1px solid transparent; border-radius: 3px; font-weight: 600; -webkit-box-decoration-break: clone; box-decoration-break: clone; }
.mk-buy { background: var(--buy-bg); border-color: var(--buy-line); color: var(--buy-text); }
.mk-tariff { background: var(--tariff-bg); border-color: var(--tariff-line); color: var(--tariff-text); }
.mk-tariff-high { background: var(--danger-bg); border-color: var(--danger-line); color: var(--danger-text); }
.mk-date { background: var(--date-bg); border-color: var(--date-line); color: var(--date-text); font-family: var(--mono); font-size: 0.93em; white-space: nowrap; }

/* Код домофона, ключ, пароль отдельной «клавишей»: виден сразу, по нажатию копируется */
.code { display: inline-block; margin: 0 1px; padding: 1px 7px; border: 1px solid var(--line-strong); border-radius: var(--r-tag); background: var(--panel-2); color: var(--text); cursor: pointer; font: 600 0.95em/1.35 var(--mono); letter-spacing: 0.04em; white-space: nowrap; vertical-align: baseline; }
.code:active { background: var(--tint); }

/* ── доступ на адресе ──────────────────────────────── */
.access { padding: 12px 14px 14px; border: 1px solid var(--access-line); border-radius: var(--r-in); background: var(--access-bg); }
.access-head { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; color: var(--access-text); }
.access-head .ic { width: 16px; height: 16px; }
.access-head .section-title { margin: 0; flex: 1; color: inherit; }
.field + .field { margin-top: 12px; }
.field-label { margin-bottom: 3px; color: var(--access-text); font-weight: 600; }
.field-value { white-space: pre-line; overflow-wrap: anywhere; font-size: 16px; line-height: 1.5; }
.field-value a { color: var(--text); font-weight: 600; text-decoration-thickness: 1px; text-underline-offset: 3px; }
.access .code { border-color: var(--access-line); }
.access .btn-ghost { color: var(--access-text); }
.approx { margin-bottom: 12px; padding: 10px 12px; border: 1px solid var(--access-line); border-radius: var(--r-in); background: var(--panel); font-size: 14px; }
.approx details { margin-top: 2px; }
.access-addr { margin-top: 14px; color: var(--muted); font: 400 12px/1.4 var(--mono); overflow-wrap: anywhere; }
.access-foot { display: flex; flex-wrap: wrap; gap: 4px 6px; margin-top: 6px; margin-left: -10px; }
.access-msg { color: var(--text); }
.access-msg.err { color: var(--danger); }
.cands { display: grid; gap: 6px; margin-top: 8px; }
.cand { text-align: left; justify-content: flex-start; font-weight: 400; font-size: 14px; min-height: 44px; }

/* Оборудование: место (чердак, подвал), подъезды и тип ящика */
.equip { margin-top: 16px; padding-top: 12px; border-top: 1px solid var(--access-line); }
.equip-head { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; color: var(--access-text); }
.equip-head .ic { width: 16px; height: 16px; }
.equip-head .section-title { margin: 0; flex: 1; color: inherit; }
.equip-group + .equip-group { margin-top: 12px; }
.equip-place { margin-bottom: 2px; font: 600 15px/1.3 var(--sans); }
.equip-row { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding: 3px 0; }
.equip-where { display: inline-flex; align-items: center; flex-wrap: wrap; gap: 4px 8px; font: 400 14px/1.4 var(--mono); }
.equip-what { min-width: 0; color: var(--muted); font: 400 12.5px/1.4 var(--mono); text-align: right; overflow-wrap: anywhere; }
.here { padding: 2px 6px; border-radius: var(--r-tag); background: var(--cta-bg); color: var(--cta-ink); font: 600 11px/1.3 var(--mono); letter-spacing: 0.04em; text-transform: uppercase; white-space: nowrap; }
.skeleton { height: 12px; border-radius: 2px; background: linear-gradient(90deg, var(--access-line), transparent, var(--access-line)); background-size: 200% 100%; animation: shimmer 1.4s infinite; }
.skeleton + .skeleton { margin-top: 8px; width: 70%; }
@keyframes shimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }

details { margin-top: 0; }
summary { cursor: pointer; list-style: none; min-height: 38px; display: flex; align-items: center; gap: 8px; font: 600 12px/1.2 var(--mono); letter-spacing: 0.06em; text-transform: uppercase; }
summary::-webkit-details-marker { display: none; }
summary::after { content: ""; width: 6px; height: 6px; margin-top: -3px; border-right: 1.6px solid currentColor; border-bottom: 1.6px solid currentColor; transform: rotate(45deg); opacity: 0.6; transition: transform 0.2s ease; }
details[open] > summary::after { transform: rotate(-135deg); margin-top: 3px; }
.approx summary { min-height: 34px; text-transform: none; letter-spacing: 0; font: 600 14px/1.2 var(--sans); }
.history { margin: 6px 0 0; padding: 0; list-style: none; display: grid; gap: 10px; font-size: 14px; }
.history li { padding-left: 12px; border-left: 1px solid var(--line-strong); }
.history .when { display: flex; flex-wrap: wrap; gap: 0 10px; color: var(--muted); font: 400 12px/1.5 var(--mono); }
.history .when b { font-weight: 600; color: var(--date-text); }

/* ── вход ──────────────────────────────────────────── */
.login { min-height: 100svh; display: grid; align-items: center; padding-top: calc(24px + env(safe-area-inset-top)); padding-bottom: 24px; }
.login-card { display: grid; gap: 14px; justify-items: stretch; }
.login-logo { justify-self: start; border-radius: 12px; box-shadow: 0 0 0 1px var(--line-strong); margin-bottom: 6px; }
.login-card h1 { font-size: 34px; font-weight: 600; line-height: 1.05; letter-spacing: -0.025em; }
.login-card .muted { font-size: 15px; max-width: 34ch; }
.login form { display: grid; gap: 12px; margin-top: 10px; }
.field-input { display: grid; gap: 6px; color: var(--muted); font: 400 11.5px/1.2 var(--mono); letter-spacing: 0.06em; text-transform: uppercase; }
.field-input input { width: 100%; min-height: 50px; padding: 0 14px; border: 1px solid var(--line-strong); border-radius: var(--r-in); background: var(--panel); color: var(--text); font: 400 17px/1 var(--sans); letter-spacing: 0; text-transform: none; /* 16+ px, иначе iOS приближает страницу при фокусе */ }
.field-input input:focus { outline: none; border-color: var(--text); }
.login .btn-primary { min-height: 52px; font-size: 16px; margin-top: 4px; }
.btn:focus-visible, .day:focus-visible, .icon-btn:focus-visible, .row:focus-visible, summary:focus-visible, .code:focus-visible, .field-value a:focus-visible { outline: 2px solid var(--text); outline-offset: 2px; }
.form-error { color: var(--danger); font-size: 14px; }
.hint { display: grid; gap: 4px; margin-top: 6px; padding: 12px 14px; border: 1px solid var(--line-strong); border-radius: var(--r-in); background: var(--panel-2); color: var(--muted); font-size: 14px; }
.hint strong { color: var(--text); font-weight: 600; }

/* ── экран загрузки ────────────────────────────────── */
/* Знак стоит ровно по центру экрана (как на заставке iPhone), подпись и ход загрузки под ним */
.boot { position: fixed; inset: 0; z-index: 100; display: grid; grid-template-rows: 1fr auto 1fr; justify-items: center; background: var(--bg); transition: opacity 0.3s ease; }
.boot.is-done { opacity: 0; pointer-events: none; }
/* Знак — табличка двери из иконки; на заставке iPhone (public/splash) он нарисован тем же размером в том же месте */
.boot-mark { width: 112px; height: auto; align-self: center; }
.boot-plate { fill: var(--text); }
.boot-hole { fill: var(--bg); }
.boot-led { fill: var(--text); animation: boot-blink 1.1s steps(1, end) infinite; }
@keyframes boot-blink { 0% { opacity: 1; } 50% { opacity: 0.15; } }
.boot-info { align-self: start; padding-top: 28px; display: grid; justify-items: center; gap: 12px; }
.boot-name { font: 600 20px/1 var(--sans); letter-spacing: -0.01em; }
.boot-steps { margin: 0; display: grid; gap: 4px; min-width: 176px; font: 400 12px/1.4 var(--mono); color: var(--muted); }
.boot-steps > div { display: flex; justify-content: space-between; gap: 24px; }
.boot-steps dt, .boot-steps dd { margin: 0; }
.boot-steps .ok { color: var(--tariff-text); }
.boot-steps .err { color: var(--danger); }
.boot-slow { max-width: 28ch; text-align: center; color: var(--muted); font: 400 12px/1.4 var(--mono); }

.toast { position: fixed; left: 50%; bottom: calc(76px + env(safe-area-inset-bottom)); transform: translateX(-50%); z-index: 40; max-width: calc(100% - 32px); padding: 11px 16px; border-radius: var(--r-in); background: var(--cta-bg); color: var(--cta-ink); font: 600 14px/1.3 var(--sans); }

@media (hover: hover) {
  .btn:hover { border-color: var(--text); }
  .btn-primary:hover { filter: brightness(1.08); }
  .btn-ghost:hover { background: var(--tint); border-color: transparent; }
  .row:hover { background: var(--tint); }
  .day:not([aria-pressed="true"]):hover { color: var(--text); }
  .code:hover { border-color: var(--text); }
}

/* Узкие экраны (до iPhone mini и SE): меньше отступы */
@media (max-width: 380px) {
  .day { padding: 0 12px; }
}
@media (max-width: 345px) {
  .top-title h1 { font-size: 26px; }
  .row { gap: 10px; padding: 10px; }
  .row-time { font-size: 17px; }
  .row-addr { font-size: 16px; }
  .stack { padding: 12px 10px 14px; }
  .btn-call { min-height: 50px; padding: 0 8px; gap: 6px; font-size: 15px; }
  .btn-call .ic { width: 16px; height: 16px; }
  .btn-square { width: 50px; min-height: 50px; }
  .plate-value { font-size: 20px; }
  .day { padding: 0 8px; font-size: 13px; }
}

@media (prefers-reduced-motion: reduce) {
  .skeleton, .icon-btn.spin .ic { animation: none; }
  .day-ind, .collapse, .row-chev .ic, summary::after, .boot { transition: none; }
  .boot-led { animation: none; }
}
