/* Aqua24 — приложение экипажей. Стиль «В» (утверждён 09.10.2026): синяя шапка с логотипом,
   тёмно-синий главный блок, белые карточки на светлом фоне, крупные цифры и кнопки. */
:root {
  --bg: #f3f8fc; --card: #fff; --soft: #f3f6fa; --brand: #0062FE; --brand-soft: #e7f0ff; --navy: #0d3b8c;
  --ink: #0b2545; --muted: #557089; --line: #dbe8f3; --green: #1faa59; --green-ink: #137a3f;
  --orange: #ffa51f; --orange-soft: #fff4e0; --orange-ink: #8a5200; --red-soft: #fdeaea; --red-ink: #a51d1d;
  color-scheme: light;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; background: var(--bg); color: var(--ink);
  font: 16px/1.35 "Golos Text", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; -webkit-text-size-adjust: 100%; }
button, input { font-family: inherit; }
button { cursor: pointer; }
body.has-nav { padding-bottom: calc(84px + env(safe-area-inset-bottom)); }

/* шапка */
.top { background: var(--brand); color: #fff; padding: calc(14px + env(safe-area-inset-top)) 20px 16px; position: sticky; top: 0; z-index: 5; }
.top-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; max-width: 560px; margin: 0 auto; }
.logo { font-family: "Montserrat", sans-serif; font-style: italic; font-weight: 800; font-size: 22px; letter-spacing: .5px; }
.who { text-align: right; font-size: 13px; line-height: 1.3; }
.who b { font-weight: 700; }
.who span { opacity: .85; }
.daytabs { display: flex; gap: 4px; background: rgba(255,255,255,.18); border-radius: 12px; padding: 4px; max-width: 560px; margin: 12px auto 0; }
.daytabs button { flex: 1; height: 38px; border: 0; border-radius: 9px; background: transparent; color: #fff; font-weight: 700; font-size: 15px; }
.daytabs button.on { background: #fff; color: var(--brand); }

main { max-width: 560px; margin: 0 auto; padding: 14px 16px 8px; display: flex; flex-direction: column; gap: 12px; }

/* блоки */
.hero { background: var(--navy); color: #fff; border-radius: 20px; padding: 18px 20px; box-shadow: 0 10px 24px rgba(13,59,140,.18); }
.hero .label { font-size: 14px; font-weight: 600; opacity: .85; }
.hero .title { font-size: 30px; font-weight: 800; line-height: 1.1; margin-top: 4px; }
.hero .sub { font-size: 18px; font-weight: 700; margin-top: 6px; }
.hero .note { font-size: 15px; opacity: .85; margin-top: 4px; }
.hero .big { font-size: 46px; font-weight: 800; line-height: 1; }
.hero .bar { height: 10px; background: rgba(255,255,255,.2); border-radius: 5px; margin-top: 12px; overflow: hidden; }
.hero .bar > div { height: 10px; background: var(--green); border-radius: 5px; }
.hero-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }

.card { background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 16px; }
.card h2 { font-size: 18px; font-weight: 800; margin: 0 0 12px; }
.section { font-size: 14px; font-weight: 700; color: var(--muted); margin: 4px 4px -4px; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.center { text-align: center; }
.row { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.rows > .row { padding: 11px 0; border-top: 1px solid var(--line); }
.rows > .row:first-child { border-top: 0; padding-top: 0; }
.rows > .row:last-child { padding-bottom: 0; }

.plate { display: inline-block; font-weight: 800; letter-spacing: 1px; border: 2px solid var(--navy); border-radius: 6px; padding: 0 8px; color: var(--navy); background: #fff; font-size: 15px; white-space: nowrap; }
.hero .plate { font-size: 26px; padding: 2px 12px; border-radius: 8px; }

.chip { display: inline-block; padding: 4px 11px; border-radius: 999px; font-size: 13px; font-weight: 700; white-space: nowrap; }
.chip.ok { background: #e7f7ee; color: var(--green-ink); }
.chip.wait { background: var(--orange-soft); color: var(--orange-ink); }
.chip.no { background: var(--red-soft); color: var(--red-ink); }
.chip.dim { background: var(--soft); color: var(--muted); }
.hero .chip.ok { background: rgba(31,170,89,.25); color: #c9f2d9; }
.hero .chip.wait { background: rgba(255,165,31,.25); color: #ffe1b0; }

.alert { background: var(--orange); color: #000; border-radius: 16px; padding: 14px 16px; font-size: 16px; font-weight: 700; }
.alert .small { font-weight: 600; margin-top: 2px; }

/* окна */
.wins { display: flex; flex-direction: column; gap: 14px; }
.win .row { font-size: 15px; }
.win .track { height: 8px; background: #e4eefa; border-radius: 4px; margin-top: 7px; overflow: hidden; }
.win .track > div { height: 8px; background: var(--brand); border-radius: 4px; }
.win.full .track > div { background: var(--orange); }
.win.full .val { color: var(--orange-ink); }

/* маршрут */
.stops { margin-top: 12px; display: flex; flex-direction: column; }
.stop { display: grid; grid-template-columns: 36px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 12px 0; border-top: 1px solid var(--line); }
.stop .seq { width: 36px; height: 36px; border-radius: 50%; background: var(--brand-soft); color: var(--brand); font-weight: 800; display: flex; align-items: center; justify-content: center; }
.stop .addr { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.stop .addr b { font-size: 17px; font-weight: 800; }
.stop .addr span { font-size: 14px; color: var(--muted); }
.stop .addr .warn { color: var(--orange-ink); font-weight: 600; }
.stop .qty { text-align: right; }
.stop .qty b { display: block; font-size: 24px; font-weight: 800; color: var(--brand); line-height: 1; }
.stop .qty span { font-size: 12px; color: var(--muted); }

/* выбор окон водителем */
.tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.tile { display: flex; flex-direction: column; justify-content: center; gap: 2px; min-height: 76px; padding: 12px 14px; border-radius: 16px;
  border: 2px solid var(--line); background: #fff; color: var(--ink); text-align: left; }
.tile b { font-size: 24px; font-weight: 800; }
.tile span { font-size: 13px; color: var(--muted); font-weight: 600; }
.tile.on { background: var(--brand); border-color: var(--brand); color: #fff; }
.tile.on span { color: #dce8ff; }
.tile:disabled { opacity: .45; }

/* выбор машины */
.pick { display: flex; align-items: center; justify-content: space-between; gap: 12px; width: 100%; min-height: 72px; padding: 12px 16px;
  border-radius: 16px; border: 2px solid var(--line); background: #fff; color: var(--ink); text-align: left; }
.pick + .pick { margin-top: 10px; }
.pick .plate { font-size: 18px; }
.pick .cap { font-size: 22px; font-weight: 800; color: var(--brand); }
.pick .cap small { font-size: 13px; color: var(--muted); font-weight: 600; }

/* кнопки */
.btn { display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; height: 64px; border: 0; border-radius: 18px;
  background: var(--brand); color: #fff; font-size: 20px; font-weight: 800; text-decoration: none; box-shadow: 0 8px 20px rgba(0,98,254,.25); }
.btn.green { background: var(--green); box-shadow: 0 8px 20px rgba(31,170,89,.25); }
.btn.light { background: #fff; color: var(--brand); border: 1px solid var(--line); box-shadow: none; font-size: 17px; height: 56px; }
.btn.soft { background: var(--soft); color: var(--ink); box-shadow: none; font-size: 17px; height: 56px; }
.btn.danger { background: var(--red-soft); color: var(--red-ink); box-shadow: none; font-size: 16px; height: 52px; }
.btn:disabled { opacity: .5; }
.btns { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.sticky { position: sticky; bottom: calc(12px + env(safe-area-inset-bottom)); z-index: 3; }
body.has-nav .sticky { bottom: calc(92px + env(safe-area-inset-bottom)); }
.linkbtn { background: none; border: 0; color: var(--muted); text-decoration: underline; font-size: 14px; padding: 12px; }

input[type=text] { width: 100%; height: 72px; padding: 0 14px; font-size: 30px; font-weight: 800; letter-spacing: 3px; text-transform: uppercase; text-align: center;
  border: 2px solid var(--line); border-radius: 16px; color: var(--navy); background: #fff; }
input[type=text]:focus { outline: none; border-color: var(--brand); }
label.lbl { display: block; font-size: 17px; font-weight: 800; margin-bottom: 10px; }

/* нижнее меню (логист, владелец) */
.nav { position: fixed; left: 0; right: 0; bottom: 0; z-index: 6; background: #fff; border-top: 1px solid var(--line);
  padding: 6px 8px calc(10px + env(safe-area-inset-bottom)); }
.nav-in { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); max-width: 560px; margin: 0 auto; }
.nav button { height: 56px; border: 0; background: transparent; color: var(--muted); font-size: 15px; font-weight: 700;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; }
.nav button svg { width: 22px; height: 22px; }
.nav button.on { color: var(--brand); font-weight: 800; }

/* всплывающее, окно поверх */
.toast { position: fixed; left: 16px; right: 16px; bottom: calc(96px + env(safe-area-inset-bottom)); max-width: 528px; margin: 0 auto;
  background: var(--ink); color: #fff; padding: 14px 16px; border-radius: 14px; font-weight: 700; z-index: 20; box-shadow: 0 8px 28px rgba(0,0,0,.25); }
.toast.err { background: #b42323; }
.modal { position: fixed; inset: 0; background: rgba(11,37,69,.45); display: flex; align-items: flex-end; justify-content: center; z-index: 15; }
.modal-box { background: #fff; border-radius: 22px 22px 0 0; padding: 20px 18px calc(20px + env(safe-area-inset-bottom)); width: 100%; max-width: 560px; max-height: 94vh; overflow: auto;
  display: flex; flex-direction: column; gap: 12px; }
.modal-box h2 { margin: 0; font-size: 20px; font-weight: 800; }
.qr { background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 12px; margin: 0 auto; width: 100%; max-width: 280px; }
.qr svg { display: block; width: 100%; height: auto; }
.link { word-break: break-all; font-size: 13px; background: var(--soft); border-radius: 10px; padding: 10px; color: var(--muted); }
.empty { text-align: center; padding: 28px 16px; }
.empty b { display: block; font-size: 20px; font-weight: 800; margin-bottom: 6px; }
[hidden] { display: none !important; }
