/* drAIver (2026-10-10): the courier's screen. Big touch targets, strong contrast (it is read on a motorbike, in the sun), one column. Colours are the platform's own. */
:root {
  --bg: #f3f5fa; --card: #ffffff; --ink: #0b1220; --muted: #5a667f; --line: #dde3f0;
  --brand: #1e7bf5; --brand-2: #4d2afe; --head: #0b1220;
  --collect-bg: #fff3d6; --collect-ink: #5c3b00; --collect-line: #f2a900;
  --paid-bg: #e0f7e9; --paid-ink: #0b4f2a; --paid-line: #27ae60;
  --danger: #c62828; --offline-bg: #fdecea; --offline-ink: #7a1c14;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0b1220; --card: #141d30; --ink: #eef2fb; --muted: #9aa8c4; --line: #26324d;
    --collect-bg: #3a2a05; --collect-ink: #ffe3a3; --collect-line: #f2a900;
    --paid-bg: #0e3320; --paid-ink: #b9f1d0; --paid-line: #27ae60;
    --offline-bg: #3a1613; --offline-ink: #ffc9c3;
  }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; min-height: 100vh; padding-bottom: env(safe-area-inset-bottom); }
#driver-root { max-width: 640px; margin: 0 auto; min-height: 100vh; }

.dv-head { position: sticky; top: 0; z-index: 5; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: calc(10px + env(safe-area-inset-top)) 16px 10px; background: var(--head); color: #fff; }
.dv-brand { display: flex; align-items: center; gap: 10px; }
.dv-logo { border-radius: 8px; display: block; }
.dv-name { font-weight: 800; font-size: 1.15rem; letter-spacing: 0.01em; }
.dv-ai { color: #22d3ee; }
.dv-icon-btn { min-width: 44px; min-height: 44px; border: 0; border-radius: 12px; background: rgba(255, 255, 255, 0.1); color: #fff; font-size: 1.4rem; cursor: pointer; }

.dv-main { padding: 16px; display: flex; flex-direction: column; gap: 14px; }
.dv-title { margin: 8px 0 0; font-size: 1.5rem; line-height: 1.2; }
.dv-lead { margin: 0; color: var(--muted); }
.dv-muted { margin: 0; color: var(--muted); font-size: 0.95rem; }
.dv-problem { margin: 0; color: var(--danger); font-weight: 600; }
.dv-problem:empty { display: none; }
.dv-input { width: 100%; min-height: 52px; padding: 12px 14px; font: inherit; color: var(--ink); background: var(--card); border: 2px solid var(--line); border-radius: 14px; }
.dv-input:focus { outline: 3px solid color-mix(in srgb, var(--brand) 40%, transparent); border-color: var(--brand); }

.dv-btn { display: inline-flex; align-items: center; justify-content: center; min-height: 52px; padding: 12px 18px; border: 0; border-radius: 14px; font: inherit; font-weight: 700; text-decoration: none; cursor: pointer;
  color: #fff; background: linear-gradient(135deg, var(--brand-2), var(--brand)); }
.dv-btn:disabled { opacity: 0.55; cursor: default; }
.dv-btn-ghost { background: transparent; color: var(--ink); border: 2px solid var(--line); }
.dv-btn-light { background: #fff; color: var(--head); }
.dv-btn-map { background: #0f9d58; }
.dv-btn-deliver { background: #1b8f4a; font-size: 1.1rem; min-height: 58px; width: 100%; }
.dv-btn-danger { background: var(--danger); }
.dv-link { align-self: center; margin-top: 8px; padding: 12px; background: none; border: 0; color: var(--muted); font: inherit; text-decoration: underline; cursor: pointer; }

.dv-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.dv-tab { min-height: 48px; border: 2px solid var(--line); border-radius: 12px; background: var(--card); color: var(--ink); font: inherit; font-weight: 700; cursor: pointer; }
.dv-tab.is-on { border-color: var(--brand); background: color-mix(in srgb, var(--brand) 12%, var(--card)); }

.dv-list { display: flex; flex-direction: column; gap: 14px; }
.dv-card { background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 14px; display: flex; flex-direction: column; gap: 10px; box-shadow: 0 1px 2px rgba(11, 18, 32, 0.06); }
.dv-card.dv-fresh { border-color: var(--brand); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 30%, transparent); }
.dv-done { opacity: 0.85; }
.dv-card-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.dv-num { font-size: 1.1rem; }
.dv-since { margin-left: auto; color: var(--muted); font-size: 0.9rem; }
.dv-badge { padding: 2px 10px; border-radius: 999px; background: var(--brand); color: #fff; font-size: 0.8rem; font-weight: 700; }

.dv-collect { border: 2px solid; border-radius: 14px; padding: 12px 14px; }
.dv-collect-title { display: block; font-size: 1.6rem; line-height: 1.15; letter-spacing: 0.01em; }
.dv-collect-line { margin: 4px 0 0; font-size: 1rem; font-weight: 600; }
.dv-collect-collect { background: var(--collect-bg); color: var(--collect-ink); border-color: var(--collect-line); }
.dv-collect-paid { background: var(--paid-bg); color: var(--paid-ink); border-color: var(--paid-line); }

.dv-who { margin: 0; font-weight: 700; font-size: 1.05rem; }
.dv-address { margin: 0; font-size: 1.05rem; }
.dv-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.dv-actions .dv-btn { flex: 1 1 120px; }
.dv-items { margin: 0; padding-left: 20px; }
.dv-items small { color: var(--muted); }
.dv-notes { margin: 0; padding: 8px 12px; border-radius: 10px; background: color-mix(in srgb, var(--brand) 10%, var(--card)); }

.dv-empty { text-align: center; padding: 36px 12px; }
.dv-empty-title { margin: 0 0 6px; font-weight: 700; font-size: 1.1rem; }
.dv-stamp { margin: 0; text-align: center; color: var(--muted); font-size: 0.85rem; }
.dv-offline { margin: 0; padding: 10px 14px; border-radius: 12px; background: var(--offline-bg); color: var(--offline-ink); font-weight: 600; }
.dv-install { display: flex; flex-direction: column; gap: 10px; padding: 14px; border-radius: 16px; background: var(--head); color: #fff; }
.dv-install p { margin: 0; }
.dv-exit { display: flex; flex-direction: column; gap: 8px; padding: 14px; border: 2px solid var(--line); border-radius: 16px; }
.dv-exit p { margin: 0; font-weight: 600; }

.dv-sheet-back { position: fixed; inset: 0; z-index: 20; display: flex; align-items: flex-end; justify-content: center; background: rgba(5, 9, 18, 0.62); }
.dv-sheet { width: 100%; max-width: 640px; max-height: 92vh; overflow-y: auto; display: flex; flex-direction: column; gap: 12px; padding: 18px 16px calc(18px + env(safe-area-inset-bottom)); background: var(--card); border-radius: 22px 22px 0 0; }
.dv-sheet-title { margin: 0; font-size: 1.3rem; }
.dv-choices { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.dv-choice { min-height: 56px; border: 2px solid var(--line); border-radius: 14px; background: var(--card); color: var(--ink); font: inherit; font-weight: 700; cursor: pointer; }
.dv-choice.is-on { border-color: #1b8f4a; background: var(--paid-bg); color: var(--paid-ink); }
.dv-toast { position: fixed; left: 16px; right: 16px; bottom: calc(16px + env(safe-area-inset-bottom)); z-index: 30; max-width: 608px; margin: 0 auto; padding: 14px 16px; border-radius: 14px; background: #1b8f4a; color: #fff; font-weight: 700; text-align: center; }
