/* Приложение водителя: адаптивный мобильный и планшетный экран, крупные зоны нажатия */
body.drv { max-width: none; width: 100%; margin: 0; min-height: 100dvh; background: var(--page); font-size: clamp(15px, 0.35vw + 14.5px, 16.5px); padding-bottom: env(safe-area-inset-bottom); overflow-x: clip; }
.dtop { position: sticky; top: 0; z-index: 10; display: flex; align-items: center; gap: clamp(4px, 2vw, 10px); padding: calc(10px + env(safe-area-inset-top)) max(clamp(10px, 3vw, 16px), env(safe-area-inset-right)) 10px max(clamp(10px, 3vw, 16px), env(safe-area-inset-left)); background: var(--accent); color: var(--accent-ink); }
.dmark { height: clamp(28px, 6vw, 36px); width: auto; background: #FFFFFF; border-radius: 8px; padding: 3px 6px; flex: none; }
.dtitle { font-family: var(--head); font-variation-settings: normal; text-transform: none; font-weight: 700; font-size: clamp(15px, 1.5vw + 11px, 19px); flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.back { border: 0; background: rgba(255,255,255,.18); color: inherit; border-radius: 10px; width: 44px; height: 44px; font-size: 20px; flex: none; }
.net { font: inherit; font-size: 13.5px; color: inherit; border: 0; min-height: 44px; padding: 0 14px; border-radius: 999px; background: rgba(255,255,255,.22); white-space: nowrap; cursor: pointer; flex: none; }
.net.off { background: var(--warn); color: #3a2a00; font-weight: 700; }
#view { max-width: min(820px, 100%); margin: 0 auto; padding: clamp(10px, 2.5vw, 18px) max(clamp(10px, 2.5vw, 20px), env(safe-area-inset-right)) 44px max(clamp(10px, 2.5vw, 20px), env(safe-area-inset-left)); }
.dcard { background: var(--surface); border-radius: 14px; box-shadow: var(--shadow); padding: clamp(12px, 2vw, 16px); margin-bottom: 12px; }
.dcard h3 { margin-bottom: 6px; font-size: 16px; }
.big { display: block; width: 100%; min-height: 56px; border-radius: 12px; border: 0; font-size: 16.5px; font-weight: 700; padding: 12px 16px; touch-action: manipulation; }
.big.primary { background: var(--accent); color: var(--accent-ink); }
.big.ok { background: var(--good); color: #fff; }
.big.line { background: var(--surface); border: 2px solid var(--line-strong); color: var(--ink); }
.big.danger { background: var(--surface); border: 2px solid var(--crit); color: var(--crit-ink); }
.big:disabled { opacity: .45; }
.big + .big { margin-top: 10px; }
.route-pick { display: flex; gap: 10px; align-items: center; width: 100%; text-align: left; background: var(--surface); border: 0; border-radius: 14px; box-shadow: var(--shadow); padding: 14px; margin-bottom: 10px; min-height: 64px; }
.route-pick b { font-size: 17px; }
.stop { display: grid; grid-template-columns: 38px 1fr auto; gap: 4px 12px; width: 100%; text-align: left; background: var(--surface); border: 0; border-radius: 14px; box-shadow: var(--shadow); padding: 12px; margin-bottom: 10px; align-items: center; }
.stop.next { box-shadow: 0 0 0 3px var(--accent); }
.stop.done { opacity: .78; }
.stop .no { width: 38px; height: 38px; border-radius: 50%; background: var(--accent-soft); color: var(--accent-dark); display: grid; place-items: center; font-weight: 700; font-variant-numeric: tabular-nums; grid-row: span 3; }
.stop.done .no { background: var(--good-soft); color: var(--good-ink); }
.stop.failed .no { background: var(--crit-soft); color: var(--crit-ink); }
.stop .nm { font-weight: 700; }
.stop .ad { color: var(--ink-2); font-size: 13.5px; grid-column: 2 / 4; }
.stop .meta { grid-column: 2 / 4; }
.stop { cursor: pointer; }
.progress { height: 8px; background: var(--surface-2); border-radius: 4px; overflow: hidden; margin: 8px 0 4px; box-shadow: inset 0 0 0 1px var(--line); }
.progress i { display: block; height: 100%; background: var(--good); border-radius: 0 4px 4px 0; }
.lrow { padding: 10px 0; border-bottom: 1px solid var(--line); }
.lrow:last-child { border-bottom: 0; }
.lrow .pn { font-weight: 600; }
.lrow .inv { color: var(--ink-2); font-size: 13.5px; }
.stepper { display: flex; align-items: center; gap: 8px; margin-top: 8px; }
.stepper button { width: 52px; height: 52px; border-radius: 12px; border: 2px solid var(--line-strong); background: var(--surface); font-size: 24px; font-weight: 700; touch-action: manipulation; }
.stepper input { width: 96px; height: 52px; text-align: center; font-size: 19px; font-weight: 700; border-radius: 12px; }
.stepper .unit { color: var(--ink-2); }
.stepper .chg { margin-left: auto; }
.choice { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 8px 0 4px; }
.choice button { min-height: 56px; border-radius: 12px; border: 2px solid var(--line-strong); background: var(--surface); font-weight: 600; font-size: 15px; padding: 8px; touch-action: manipulation; }
.choice button[aria-pressed="true"] { border-color: var(--accent); background: var(--accent-soft); color: var(--accent); }
.choice.three { grid-template-columns: 1fr 1fr; }
.choice.three button.f { grid-column: 1 / -1; margin-top: 12px; } /* «Не доставлено» отдельной строкой: рядом с «Всё выгружено» его легко задеть */
.choice button.f[aria-pressed="true"] { border-color: var(--crit); background: var(--crit-soft); color: var(--crit-ink); }
.drv select, .drv input[type="number"], .drv input[type="text"], .drv input[type="password"] { width: 100%; min-height: 50px; font-size: 16px; border-radius: 12px; }
.photo-prev { max-width: 100%; width: 100%; border-radius: 12px; margin-top: 8px; display: block; max-height: 280px; object-fit: contain; background: var(--elevated, var(--surface-2)); border: 1px solid var(--line); cursor: zoom-in; }
.cash-row { display: flex; justify-content: space-between; align-items: baseline; padding: 4px 0; }
.sum { font-size: 22px; font-weight: 700; font-variant-numeric: tabular-nums; }
.hint { font-size: 13px; color: var(--ink-3); margin-top: 4px; }

.stop.locked { opacity: .55; }

/* первый вход и замеры */
.steps { margin: 0; padding-left: 20px; display: grid; gap: 6px; }
.chk { display: flex; gap: 10px; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--line); }
.chk:last-child { border-bottom: 0; }
.chk-m { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; flex: none; background: var(--surface-2); color: var(--ink-2); }
.chk-m.good { background: var(--good-soft); color: var(--good-ink); }
.chk-m.bad { background: var(--crit-soft); color: var(--crit-ink); }
.t-ok { color: var(--good-ink); font-weight: 700; }
.t-bad { color: var(--crit-ink); font-weight: 700; }
.sticky-bottom { position: sticky; bottom: calc(8px + env(safe-area-inset-bottom)); box-shadow: 0 4px 14px rgba(0,0,0,.25); z-index: 5; }
.agree { display: flex; gap: 10px; align-items: flex-start; padding: 12px 4px; font-size: 15px; }
.agree input { width: 26px; height: 26px; flex: none; margin-top: 2px; }
.sticky-bottom:disabled { opacity: 1; background: var(--surface-2); color: var(--ink-2); border: 1.5px solid var(--line-strong); }

/* позвонить клиенту: крупная круглая кнопка */
.call { display: grid; place-items: center; width: 56px; height: 56px; border-radius: 50%; background: var(--good); color: #fff; flex: none; text-decoration: none; }
.stop .call { width: 46px; height: 46px; grid-row: span 2; }
.nx-row { display: flex; gap: 12px; align-items: flex-start; }
.next-card { border-left: 4px solid var(--accent); }
.next-card a.big { display: grid; place-items: center; text-decoration: none; margin-top: 10px; }
.next-card .big { margin-top: 10px; }
.acc-row { display: flex; align-items: center; gap: 12px; padding: 11px 4px; min-height: 52px; border-bottom: 1px solid var(--line); cursor: pointer; }
.acc-row:last-of-type { border-bottom: 0; }
.acc-row .nm { flex: 1; min-width: 0; font-weight: 600; }
/* геопозиция выключена: закрываем экран, пока не включат */
.gate { position: fixed; inset: 0; z-index: 100; background: rgba(15, 25, 40, .92); display: grid; place-items: center; padding: 20px; }
.gate-card { background: var(--surface); border-radius: 16px; padding: 20px; max-width: 420px; width: 100%; }
.gate-card h3 { color: var(--crit-ink); font-size: 19px; margin: 0 0 8px; }

.icon-tip { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; }
.icon-tip span { flex: 1; }
.tip-x { flex: none; width: 44px; height: 44px; border-radius: 12px; border: 1px solid var(--line-strong); background: var(--surface); font-size: 18px; }
.addr { font-size: 18px; font-weight: 700; line-height: 1.25; }
.stop .nm { font-size: 16px; font-weight: 700; line-height: 1.25; min-width: 0; overflow-wrap: anywhere; }
.cash-pill { display: inline-block; padding: 4px 10px; border-radius: 999px; background: var(--warn-soft); color: var(--warn-ink); border: 1px solid var(--warn-bd, var(--line)); font-weight: 700; font-size: 13.5px; font-variant-numeric: tabular-nums; }
.linkbtn { display: block; text-align: center; padding: 12px; margin: 4px 0 8px; color: var(--accent); font-weight: 700; text-decoration: none; }
.acc-row input[type=checkbox] { width: 30px; height: 30px; flex: none; margin: 0; accent-color: var(--good); }
.acc-row .nm { overflow-wrap: anywhere; }
.acc-row .bx { white-space: nowrap; }

/* очередь «Обмен»: отметки и накладные ждут кнопки */
.xchg { border-left: 4px solid var(--warn); }
.xchg .big { margin-top: 10px; }
.net.off { cursor: pointer; }
.xchg.stale { border-left-color: var(--crit); }
.rej { border-left: 4px solid var(--crit); }

/* крупный шрифт системы, узкие телефоны, планшеты и широкие экраны */
.dcard, .stop .ad, .lrow .pn { overflow-wrap: anywhere; }
.drv .stepper { flex-wrap: wrap; }
.drv .stepper input[type="number"] { width: 96px; flex: none; }
.choice button { min-width: 0; overflow-wrap: anywhere; }
.drv .bmk-map { height: clamp(230px, 38dvh, 460px); }
@media (min-width: 720px) {
  .dtop { padding-inline: max(20px, calc((100vw - 820px) / 2 + 20px)); }
  .dcard { padding: 16px 18px; }
  .stop { padding: 14px 16px; }
}
@media (max-width: 380px) {
  .net { padding: 0 10px; font-size: 12.5px; }
  .back { width: 40px; height: 40px; }
  .choice { gap: 6px; }
  .choice button { font-size: 13px; padding: 6px 4px; }
  .stepper button { width: 44px; height: 44px; font-size: 21px; }
  .drv .stepper input[type="number"] { width: 80px; height: 44px; }
  .osrow { flex-direction: column; }
  .addr { font-size: 16.5px; }
}
/* телефон лёжа: прилипшая кнопка не должна закрывать пол-экрана */
@media (max-height: 480px) { .sticky-bottom { position: static; } .dtop { position: static; } }
/* адрес можно выделить и скопировать пальцем; кнопка «Скопировать адрес» */
.addr, .next-card .muted { -webkit-user-select: text; user-select: text; }
button.linkbtn { width: 100%; border: 0; background: none; font: inherit; font-weight: 700; min-height: 44px; cursor: pointer; }

/* выбор телефона и окно с инструкцией */
.osrow { display: flex; gap: 10px; margin: 10px 0; }
.osrow .big + .big { margin-top: 0; }
.big.os[aria-pressed="true"] { border-color: var(--accent); background: var(--accent-soft); color: var(--accent); }
.gate.guide { padding: 0; align-items: stretch; background: var(--surface); }
.guide-box { display: grid; grid-template-rows: auto 1fr; gap: 8px; padding: 10px; padding-top: calc(10px + env(safe-area-inset-top)); width: 100%; height: 100%; }
.guide-box iframe { width: 100%; height: 100%; border: 0; border-radius: 12px; background: #f5f6f8; }
.sr-file { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
