/* Driver screen styles. Self-contained so the native app can use it without the console's app.css. */
:root {
  --ink: #1B2430; --ink-2: #2C3A4F; --brand: #1F3A5F; --accent: #E8772E; --accent-soft: #FFF4EC;
  --paper: #EEF0EA; --surface: #FFFFFF; --surface-2: #F7F8F5; --border: #DDE1D9; --muted: #6B7280; --text-2: #4B5563;
  --success: #2E7D4F; --warning: #B4700A; --danger: #C8322B; --danger-soft: #FBE9E7;
  --font: 'Commissioner', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body { font-family: var(--font); font-size: 14px; color: var(--ink); background: var(--paper); -webkit-font-smoothing: antialiased; font-variant-numeric: tabular-nums; }
h1, h2 { margin: 0; font-weight: 700; }
button { font-family: inherit; }
a { color: var(--brand); }
.muted { color: var(--muted); } .small { font-size: 12px; } .strong { font-weight: 700; } .grow { flex-grow: 1; }
.row { display: flex; align-items: center; gap: 10px; } .right { text-align: right; }
.kpi-label { font-size: 11px; font-weight: 600; color: var(--muted); }
.bar { flex: 1; height: 8px; border-radius: 999px; background: var(--paper); overflow: hidden; }
.bar-fill { height: 100%; background: var(--accent); border-radius: 999px; }
.link-btn { background: none; border: 0; color: var(--brand); font-weight: 600; cursor: pointer; font-size: 12px; padding: 0; }
.field { display: flex; flex-direction: column; gap: 6px; font-size: 13px; font-weight: 600; color: var(--text-2); }
.check { display: flex; align-items: center; gap: 8px; font-size: 14px; color: var(--text-2); }
.modal-backdrop { position: fixed; inset: 0; background: rgba(27,36,48,0.45); display: flex; align-items: flex-end; justify-content: center; z-index: 50; }
.modal { background: var(--surface); border-radius: 20px 20px 0 0; width: 100%; max-width: 560px; max-height: 92vh; overflow: auto; }
.modal-head { padding: 18px 20px 12px; border-bottom: 1px solid var(--paper); }
.modal-head h2 { font-size: 18px; }
.modal-body { padding: 16px 20px; display: flex; flex-direction: column; gap: 12px; }
.modal-foot { padding: 12px 20px 24px; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }

.drv-shell { min-height: 100vh; background: var(--paper); max-width: 560px; margin: 0 auto; display: flex; flex-direction: column; }
.drv-loading, .drv-empty { padding: 40px 20px; text-align: center; color: var(--muted); display: flex; flex-direction: column; gap: 16px; align-items: center; }
.drv-login { padding: 60px 24px; display: flex; flex-direction: column; gap: 14px; align-items: stretch; text-align: center; }
.drv-logo { font-size: 48px; }
.drv-login h1 { font-size: 26px; }
.drv-code { height: 60px; font-size: 28px; text-align: center; letter-spacing: 0.2em; border-radius: 14px; border: 1.5px solid var(--border); font-family: inherit; }
.drv-input { height: 52px; font-size: 18px; padding: 0 16px; border-radius: 14px; border: 1.5px solid var(--border); font-family: inherit; }
.drv-error { color: var(--danger); font-weight: 600; margin: 0; }
.drv-head { background: var(--ink); color: #FFF; padding: 18px 18px 14px; display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.drv-head h1 { font-size: 18px; text-transform: capitalize; }
.drv-sub { font-size: 12px; font-weight: 600; color: #AEB8C6; display: block; }
.drv-pill { margin-left: auto; font-size: 12px; font-weight: 700; color: #AEB8C6; background: var(--ink-2); padding: 6px 10px; border-radius: 999px; }
.drv-pill.on { color: #FFD9BF; }
.drv-progress { width: 100%; display: flex; align-items: center; gap: 10px; font-size: 13px; }
.drv-progress .bar { background: var(--ink-2); }
.drv-link { background: none; border: 0; color: #FFD9BF; font-weight: 700; font-family: inherit; cursor: pointer; }
.drv-link.dark { color: var(--brand); align-self: flex-start; padding: 0; }
.drv-main { padding: 14px 14px 40px; display: flex; flex-direction: column; gap: 10px; }
.drv-card { background: var(--surface); border-radius: 20px; padding: 16px; display: flex; flex-direction: column; gap: 10px; }
.drv-card.accent { border: 2px solid var(--accent); }
.drv-card h2 { font-size: 22px; line-height: 1.2; }
.drv-eyebrow { font-size: 12px; font-weight: 700; color: var(--accent); letter-spacing: 0.06em; text-transform: uppercase; }
.drv-addr { margin: 0; color: var(--text-2); }
.drv-seq { width: 34px; height: 34px; border-radius: 50%; background: var(--accent); color: #FFF; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }
.drv-seq.small { width: 28px; height: 28px; background: var(--paper); color: var(--ink); font-size: 13px; }
.drv-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.drv-grid > div { background: var(--surface-2); border-radius: 12px; padding: 10px; display: flex; flex-direction: column; gap: 2px; font-size: 13px; }
.drv-note { background: var(--accent-soft); border-radius: 12px; padding: 10px 12px; font-size: 13px; color: var(--text-2); }
.drv-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.drv-btn { height: 52px; border-radius: 14px; border: 1px solid var(--border); background: var(--surface); font-family: inherit; font-size: 15px; font-weight: 700; color: var(--ink); display: flex; align-items: center; justify-content: center; gap: 8px; cursor: pointer; text-decoration: none; }
.drv-btn.primary { background: var(--accent); border-color: var(--accent); color: #FFF; }
.drv-btn.danger { background: var(--danger); border-color: var(--danger); color: #FFF; }
.drv-btn.big { height: 60px; font-size: 17px; }
.drv-btn:disabled { opacity: 0.5; }
.drv-section { display: flex; justify-content: space-between; padding: 8px 4px 0; font-size: 13px; font-weight: 700; color: var(--muted); }
.drv-stop { background: var(--surface); border-radius: 14px; padding: 12px 14px; display: flex; align-items: center; gap: 12px; }
.drv-stop .grow, .drv-stop .right { display: flex; flex-direction: column; }
.drv-stop.done { opacity: 0.7; }
.drv-stop.failed .drv-seq { background: var(--danger-soft); color: var(--danger); }
.drv-modal { width: 100%; }
.drv-input { height: 44px; border-radius: 10px; border: 1px solid var(--border); padding: 0 12px; font-family: inherit; font-size: 15px; }
.drv-sig { width: 100%; height: 160px; border: 1.5px dashed var(--border); border-radius: 12px; background: #FFF; touch-action: none; }
.drv-settings { padding: 24px; display: flex; flex-direction: column; gap: 14px; }
.drv-settings h1 { font-size: 22px; }
#blazor-error-ui { display: none; }

/* ---- In-app navigation ---- */
.nav-screen { position: fixed; inset: 0; z-index: 60; background: var(--paper); display: flex; flex-direction: column; }
.nav-map { position: absolute; inset: 0; }
.nav-banner { position: absolute; top: 12px; left: 12px; right: 12px; background: var(--ink); color: #FFF; border-radius: 18px; padding: 14px 16px; box-shadow: 0 6px 20px rgba(0,0,0,0.25); }
.nav-banner.arrived { background: var(--success); }
.nav-instr { display: flex; align-items: center; gap: 14px; }
.nav-instr > div { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.nav-instr strong { font-size: 19px; line-height: 1.2; }
.nav-instr .muted { color: #AEB8C6; }
.nav-icon { font-size: 40px; line-height: 1; width: 52px; text-align: center; flex-shrink: 0; }
.nav-dist { font-size: 30px; font-weight: 800; color: #FFD9BF; line-height: 1; }
.nav-off { font-size: 12px; font-weight: 700; color: #FFD9BF; }
.nav-bottom { position: absolute; left: 12px; right: 12px; bottom: 12px; background: var(--surface); border-radius: 18px; padding: 12px; display: flex; flex-direction: column; gap: 10px; box-shadow: 0 6px 20px rgba(0,0,0,0.2); }
.nav-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; text-align: center; }
.nav-stats > div { display: flex; flex-direction: column; }
.nav-stats strong { font-size: 18px; }
.nav-actions { display: grid; grid-template-columns: 52px 52px 52px minmax(0, 1fr) 52px; gap: 8px; }
.nav-actions .drv-btn { height: 48px; padding: 0; font-size: 18px; }
.nav-actions .drv-btn.primary { font-size: 15px; }
.maplibregl-ctrl-attrib { display: none; }
/* ---- settings sheet ---- */
.seg { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; background: var(--paper); padding: 4px; border-radius: 12px; }
.seg button { height: 44px; border: 0; border-radius: 9px; background: transparent; font-family: inherit; font-weight: 700; color: var(--text-2); cursor: pointer; }
.seg button.on { background: var(--surface); color: var(--ink); box-shadow: 0 1px 3px rgba(0,0,0,0.1); }
.drv-gear { background: none; border: 0; color: #FFD9BF; font-size: 20px; cursor: pointer; padding: 4px 8px; }
