:root {
  color-scheme: dark;
  --bg: #0b1220;
  --bg2: #0f172a;
  --panel: #111827;
  --panel2: #172033;
  --panel3: #1e293b;
  --line: #334155;
  --line2: #475569;
  --text: #f8fafc;
  --muted: #cbd5e1;
  --muted2: #94a3b8;
  --accent: #38bdf8;
  --accent-strong: #0ea5e9;
  --accent-soft: rgba(56,189,248,.14);
  --ok: #22c55e;
  --ok-bg: rgba(34,197,94,.14);
  --warn: #f59e0b;
  --warn-bg: rgba(245,158,11,.16);
  --danger: #ef4444;
  --danger-bg: rgba(239,68,68,.15);
  --shadow: 0 18px 50px rgba(0,0,0,.35);
  --radius-xl: 28px;
  --radius-lg: 20px;
  --radius-md: 14px;
}
* { box-sizing: border-box; }
html, body { min-height: 100%; margin: 0; }
html { background: #07111f; }
.hidden { display: none !important; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; touch-action: manipulation; }
body.driver {
  min-height: 100svh;
  background:
    radial-gradient(circle at 15% 0%, rgba(14,165,233,.22), transparent 36%),
    radial-gradient(circle at 90% 10%, rgba(34,197,94,.12), transparent 34%),
    linear-gradient(135deg, #07111f, #0b1220 45%, #111827);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  overflow: auto;
  /* v10: bewusste, feste Reserve gegen abgeschnittene Tablet-/PWA-Statusleisten.
     Einige Android-/Tablet-Browser melden env(safe-area-inset-top) als 0,
     obwohl oben eine Systemleiste über dem WebView liegt. */
  --driver-top-reserve: clamp(96px, 12svh, 160px);
  --driver-bottom-reserve: max(14px, env(safe-area-inset-bottom, 0px));
}
body.driver.driver-active {
  padding-top: calc(var(--driver-top-reserve) + env(safe-area-inset-top, 0px));
  padding-left: max(0px, env(safe-area-inset-left, 0px));
  padding-right: max(0px, env(safe-area-inset-right, 0px));
  padding-bottom: var(--driver-bottom-reserve);
}
.driver-login-screen {
  min-height: 100svh;
  display: grid;
  place-items: center;
  padding: 22px;
}
.driver-login-card, .auth-card {
  width: min(460px, 94vw);
  background: linear-gradient(180deg, rgba(17,24,39,.96), rgba(15,23,42,.96));
  border: 1px solid rgba(148,163,184,.28);
  border-radius: var(--radius-xl);
  padding: clamp(22px, 4vw, 36px);
  box-shadow: var(--shadow);
}
.brand-mark, .driver-logo {
  display: inline-grid;
  place-items: center;
  width: 58px;
  height: 58px;
  border-radius: 18px;
  background: linear-gradient(135deg, #38bdf8, #2563eb);
  color: white;
  font-weight: 950;
  letter-spacing: .04em;
  box-shadow: 0 14px 35px rgba(37,99,235,.35);
}
.driver-login-card h1 { margin: 18px 0 6px; font-size: clamp(2rem, 7vw, 3.2rem); line-height: 1; }
.driver-login-card p { color: var(--muted); margin: 0 0 22px; }
.driver-login-card label, .admin label {
  display: grid;
  gap: 8px;
  margin: 12px 0;
  color: #e2e8f0;
  font-weight: 800;
}
.driver-login-card input, .admin input, .admin select, .admin textarea {
  width: 100%;
  border: 1px solid var(--line2);
  border-radius: 14px;
  background: #080f1d;
  color: var(--text);
  padding: 14px 15px;
  min-height: 52px;
  outline: none;
}
.driver-login-card input:focus, .admin input:focus, .admin select:focus, .admin textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(56,189,248,.22);
}
.driver-login-card button.primary, .admin button.primary, .primary-action {
  background: linear-gradient(135deg, #0ea5e9, #2563eb) !important;
  color: white !important;
}
.driver-login-card button {
  width: 100%;
  min-height: 56px;
  border: 0;
  border-radius: 16px;
  color: white;
  font-weight: 900;
  margin-top: 14px;
}
.login-message { min-height: 1.4em; color: #fecaca !important; }
.driver-login-card small { color: var(--muted2); }
.driver-shell {
  min-height: calc(100svh - var(--driver-top-reserve));
  height: auto;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  padding: 0 14px 14px;
  gap: 14px;
  scroll-margin-top: var(--driver-top-reserve);
}
.driver-topbar {
  position: sticky;
  top: 8px;
  z-index: 50;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
  min-height: 82px;
  padding: 14px 18px;
  border: 1px solid rgba(148,163,184,.28);
  background: rgba(15,23,42,.92);
  backdrop-filter: blur(20px);
  border-radius: 24px;
  box-shadow: 0 12px 40px rgba(0,0,0,.35);
}
.driver-title { display: flex; align-items: center; gap: 14px; min-width: 0; }
.driver-title strong { display: block; font-size: clamp(1.15rem, 2vw, 1.55rem); }
.driver-title small { display: block; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 52vw; }
.driver-logo { width: 48px; height: 48px; border-radius: 15px; font-size: .9rem; flex: 0 0 auto; }
.driver-statusbar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.status-chip, .status-button, .status-link {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid rgba(148,163,184,.28);
  background: rgba(30,41,59,.72);
  color: #e2e8f0;
  text-decoration: none;
  font-weight: 800;
  font-size: .92rem;
}
.status-button { background: rgba(239,68,68,.16); color: #fecaca; }
.driver-screen {
  min-height: 0;
  display: grid;
  gap: 14px;
  grid-template-columns: minmax(0, 1fr) minmax(270px, 340px);
  grid-template-rows: auto minmax(0, 1fr);
  align-items: stretch;
}
.screen-heading {
  grid-column: 1 / -1;
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 12px;
  padding: 0 6px;
}
.screen-heading p { margin: 0; color: var(--accent); text-transform: uppercase; letter-spacing: .13em; font-weight: 950; font-size: .82rem; }
.screen-heading h1 { margin: 0; font-size: clamp(1.55rem, 3vw, 2.5rem); line-height: 1; }
.screen-heading span { color: var(--muted); font-weight: 700; text-align: right; }
.driver-card {
  min-width: 0;
  min-height: 0;
  border: 1px solid rgba(148,163,184,.22);
  border-radius: var(--radius-xl);
  background: linear-gradient(180deg, rgba(17,24,39,.9), rgba(15,23,42,.92));
  box-shadow: var(--shadow);
  padding: clamp(16px, 2.4vw, 28px);
}
.primary-card {
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
  gap: 18px;
}
.touch-input-row { display: grid; grid-template-columns: minmax(150px, 270px) minmax(160px, 230px); gap: 14px; align-items: stretch; }
.touch-input {
  min-height: clamp(76px, 11vh, 110px);
  border-radius: 22px;
  background: #f8fafc;
  color: #0f172a;
  display: flex;
  align-items: center;
  padding: 0 24px;
  font-size: clamp(2.5rem, 8vw, 5.2rem);
  font-weight: 950;
  letter-spacing: .04em;
  box-shadow: inset 0 0 0 1px rgba(15,23,42,.08);
}
.touch-list-button {
  border: 1px solid rgba(56,189,248,.55);
  border-radius: 22px;
  background: var(--accent-soft);
  color: #e0f2fe;
  font-weight: 950;
  padding: 0 16px;
  min-height: 76px;
}
.touch-list-button:active, .touch-key:active, .run-buttons-old button:active, .touch-list-controls button:active { transform: translateY(1px) scale(.99); }
.touch-preview {
  border: 1px solid rgba(148,163,184,.22);
  background: rgba(8,15,29,.65);
  border-radius: 22px;
  padding: clamp(16px, 2vw, 22px);
  color: var(--muted);
  font-size: clamp(1rem, 2.5vw, 1.65rem);
  line-height: 1.35;
  overflow: auto;
}
.touch-preview .line-big { display: block; color: white; font-size: clamp(3rem, 8vw, 6rem); line-height: 1; font-weight: 950; }
.touch-preview .arrow { display: block; color: var(--accent); font-size: 2.2rem; margin: 6px 0; }
.touch-preview .ok { display: block; margin-top: 16px; color: #86efac; font-weight: 900; }
.touch-preview .bad, .bad { color: #fecaca; font-weight: 950; }
.keypad-card { display: grid; grid-template-rows: auto 1fr; gap: 14px; }
.keypad-card h2, .action-card h2, .info-card h2, .list-actions h2 { margin: 0; color: #e0f2fe; }
.touch-right { display: grid; grid-template-columns: repeat(3, minmax(70px, 1fr)); gap: 10px; }
.touch-key {
  min-height: clamp(62px, 11vh, 92px);
  border: 1px solid rgba(148,163,184,.24);
  border-radius: 20px;
  background: linear-gradient(180deg, #1f2937, #111827);
  color: white;
  font-size: clamp(1.6rem, 4vw, 2.9rem);
  font-weight: 950;
  box-shadow: 0 10px 25px rgba(0,0,0,.22);
}
.touch-key.clear { background: linear-gradient(180deg, #991b1b, #7f1d1d); color: #fee2e2; }
.touch-key.enter { background: linear-gradient(180deg, #16a34a, #166534); color: #ecfdf5; }
.touch-key.back { grid-column: 1 / -1; font-size: clamp(1.2rem, 3vw, 2rem); }
.touch-exit { display: none; }
.screen-list { grid-template-columns: minmax(0, 1fr) minmax(230px, 290px); }
.list-card { display: grid; grid-template-rows: auto minmax(0,1fr); gap: 12px; }
.touch-list-search input, .route-quick-list input {
  min-height: 54px;
  border: 1px solid var(--line2);
  border-radius: 18px;
  background: #080f1d;
  color: var(--text);
  padding: 0 18px;
  width: 100%;
}
.touch-list-search input:focus, .route-quick-list input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px rgba(56,189,248,.18); }
.touch-list { min-height: 0; overflow: auto; display: grid; gap: 10px; padding-right: 4px; }
.touch-line-row, .route-choice, .master-item {
  width: 100%;
  text-align: left;
  border: 1px solid rgba(148,163,184,.2);
  border-radius: 20px;
  background: rgba(15,23,42,.74);
  color: var(--text);
  padding: 16px;
  transition: border-color .15s ease, background .15s ease, transform .15s ease;
}
.touch-line-row { display: grid; grid-template-columns: minmax(70px, 110px) minmax(115px, 160px) 1fr; gap: 14px; align-items: center; }
.touch-line-row:hover, .route-choice:hover, .master-item:hover { border-color: var(--accent); background: rgba(30,41,59,.9); }
.touch-line-row.current, .route-choice.current, .master-item.active {
  border-color: #7dd3fc;
  background: linear-gradient(90deg, rgba(14,165,233,.28), rgba(30,41,59,.92));
  box-shadow: inset 5px 0 0 #38bdf8;
}
.line-no { font-size: clamp(1.6rem, 3vw, 2.35rem); font-weight: 950; }
.line-id, .touch-line-row small { color: var(--muted); font-weight: 800; }
.list-actions { display: grid; align-content: start; gap: 14px; }
.touch-list-controls { display: grid; gap: 10px; }
.touch-list-controls button, .run-buttons-old button, .admin button {
  border: 0;
  border-radius: 16px;
  min-height: 54px;
  padding: 0 16px;
  background: #243244;
  color: #f8fafc;
  font-weight: 950;
}
.touch-list-controls .confirm { background: linear-gradient(135deg, #16a34a, #15803d); }
.touch-route-summary {
  margin: 0;
  padding: 14px 16px;
  border-radius: 18px;
  background: rgba(56,189,248,.1);
  color: #e0f2fe;
  font-weight: 900;
}
.route-quick-list { min-height: 0; display: grid; grid-template-rows: auto minmax(0, 1fr); gap: 12px; }
#routeListView { min-height: 0; overflow: auto; display: grid; gap: 10px; padding-right: 4px; }
.route-choice { display: grid; grid-template-columns: minmax(52px, 90px) 1fr; gap: 10px; align-items: center; }
.route-choice strong { font-size: 1.55rem; }
.route-choice span, .route-choice small { color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.route-choice small { grid-column: 2; font-size: .86rem; }
.screen-run {
  grid-template-columns: minmax(360px, 1.05fr) minmax(380px, 1.25fr) minmax(280px, .75fr);
  grid-template-areas:
    "head head head"
    "hero flow actions"
    "info flow actions";
  align-items: stretch;
}
.run-heading { grid-area: head; }
.run-hero-card { grid-area: hero; display: grid; gap: 14px; align-content: start; }
.stop-flow-card { grid-area: flow; display: grid; grid-template-rows: auto auto minmax(0, 1fr); gap: 12px; min-height: 0; }
.run-action-card { grid-area: actions; }
.run-info-card { grid-area: info; }
.run-hero-top { display: grid; grid-template-columns: minmax(0, 1fr) minmax(190px, 240px); gap: 14px; align-items: stretch; }
.run-summary { margin: 0; font-weight: 950; font-size: clamp(1.15rem, 2.2vw, 1.65rem); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.run-summary.small { color: var(--muted); font-size: clamp(.95rem, 1.45vw, 1.08rem); margin-top: 6px; }
.delay-panel {
  border-radius: 24px;
  padding: 14px 16px;
  min-height: 112px;
  display: grid;
  align-content: center;
  text-align: center;
  border: 2px solid transparent;
  box-shadow: 0 18px 35px rgba(0,0,0,.22);
}
.delay-panel span { font-size: .86rem; font-weight: 1000; letter-spacing: .08em; }
.delay-panel strong { display: block; font-size: clamp(2.25rem, 5vw, 4.2rem); line-height: .95; font-weight: 1000; margin: 5px 0; }
.delay-panel small { font-weight: 900; }
.delay-on-time { background: linear-gradient(135deg, rgba(22,163,74,.22), rgba(5,150,105,.12)); border-color: rgba(134,239,172,.65); color: #dcfce7; }
.delay-late { background: linear-gradient(135deg, rgba(220,38,38,.34), rgba(127,29,29,.26)); border-color: rgba(252,165,165,.8); color: #fee2e2; animation: delayPulse 1.35s ease-in-out infinite; }
.delay-early { background: linear-gradient(135deg, rgba(245,158,11,.34), rgba(180,83,9,.18)); border-color: rgba(253,230,138,.85); color: #fef3c7; }
@keyframes delayPulse { 0%, 100% { filter: brightness(1); } 50% { filter: brightness(1.14); } }
.current-stop-card {
  border-radius: 28px;
  background: linear-gradient(135deg, #e0f2fe, #f8fafc);
  color: #0f172a;
  padding: clamp(18px, 2.4vw, 26px);
  box-shadow: 0 16px 38px rgba(56,189,248,.16);
}
.current-stop-card span, .next-stop-grid span { display: block; text-transform: uppercase; letter-spacing: .08em; font-size: .82rem; font-weight: 1000; }
.current-stop-card span { color: #0369a1; }
.current-stop-card strong { display: block; margin-top: 4px; font-size: clamp(2rem, 5vw, 4.4rem); line-height: 1.02; font-weight: 1000; overflow-wrap: anywhere; }
.current-stop-card small { display: block; color: #334155; font-weight: 950; margin-top: 8px; font-size: clamp(1rem, 2vw, 1.25rem); }
.next-stop-grid { display: grid; grid-template-columns: 1.25fr 1fr 1fr; gap: 10px; }
.next-stop-grid > div {
  min-width: 0;
  border: 1px solid rgba(148,163,184,.22);
  border-radius: 20px;
  background: rgba(8,15,29,.58);
  padding: 13px 14px;
}
.next-stop-grid span { color: var(--muted2); }
.next-stop-grid strong { display: block; color: #f8fafc; font-size: clamp(1rem, 2vw, 1.42rem); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stop-flow-head { display: flex; align-items: start; justify-content: space-between; gap: 12px; }
.stop-flow-head h2 { margin: 0; color: #e0f2fe; font-size: clamp(1.35rem, 2.2vw, 1.9rem); }
.stop-flow-head p { margin: 4px 0 0; color: var(--muted); font-weight: 800; }
#stopProgressText { display: inline-flex; align-items: center; justify-content: center; min-width: 72px; min-height: 42px; border-radius: 999px; background: rgba(56,189,248,.14); color: #e0f2fe; font-weight: 1000; border: 1px solid rgba(56,189,248,.38); }
.progress-track { height: 10px; border-radius: 999px; background: rgba(51,65,85,.9); overflow: hidden; }
.progress-fill { height: 100%; width: 0%; border-radius: inherit; background: linear-gradient(90deg, #38bdf8, #22c55e); transition: width .2s ease; }
.stop-timeline { min-height: 0; overflow: auto; display: grid; gap: 9px; padding-right: 5px; scroll-behavior: smooth; }
.stop-timeline-item {
  width: 100%;
  min-height: 72px;
  border: 1px solid rgba(148,163,184,.22);
  border-radius: 20px;
  background: rgba(8,15,29,.66);
  color: var(--text);
  padding: 10px 12px;
  display: grid;
  grid-template-columns: 52px minmax(0,1fr) minmax(72px, auto);
  gap: 12px;
  align-items: center;
  text-align: left;
}
.stop-timeline-item:active { transform: translateY(1px) scale(.995); }
.stop-timeline-item.current { border-color: #7dd3fc; background: linear-gradient(90deg, rgba(14,165,233,.34), rgba(15,23,42,.95)); box-shadow: inset 6px 0 0 #38bdf8; }
.stop-timeline-item.done { opacity: .72; background: rgba(15,23,42,.54); }
.stop-timeline-item.upcoming:hover { border-color: rgba(125,211,252,.75); }
.stop-seq { width: 44px; height: 44px; border-radius: 14px; display: inline-grid; place-items: center; background: #1e293b; color: #e2e8f0; font-weight: 1000; }
.stop-timeline-item.current .stop-seq { background: #38bdf8; color: #082f49; }
.stop-timeline-item.done .stop-seq { background: rgba(34,197,94,.2); color: #bbf7d0; }
.stop-main { min-width: 0; display: grid; gap: 3px; }
.stop-main strong { font-size: clamp(1rem, 1.8vw, 1.32rem); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stop-main small { color: var(--muted); font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stop-state { justify-self: end; border-radius: 999px; padding: 6px 9px; background: rgba(148,163,184,.12); color: var(--muted); font-size: .78rem; font-weight: 1000; text-transform: uppercase; }
.stop-timeline-item.current .stop-state { background: rgba(56,189,248,.2); color: #e0f2fe; }
.stop-timeline-item.done .stop-state { background: rgba(34,197,94,.12); color: #bbf7d0; }
.action-card { display: grid; gap: 10px; align-content: stretch; }
.run-action-card h2, .info-card h2 { margin: 0; color: #e0f2fe; }
.run-action {
  border: 0;
  border-radius: 18px;
  min-height: 68px;
  padding: 10px 14px;
  background: linear-gradient(180deg, #243244, #1e293b);
  color: #f8fafc;
  font-weight: 950;
  text-align: left;
  display: grid;
  align-content: center;
  gap: 3px;
}
.run-action span { font-size: clamp(1.05rem, 2.1vw, 1.42rem); letter-spacing: .02em; }
.run-action small { color: var(--muted); font-weight: 850; }
.run-action.primary-action { background: linear-gradient(135deg, #16a34a, #15803d); color: #ecfdf5; box-shadow: 0 14px 30px rgba(22,163,74,.22); }
.run-action.primary-action small, .run-action.danger small { color: rgba(255,255,255,.86); }
.run-action.neutral-action { background: linear-gradient(135deg, #0e7490, #155e75); }
.run-mini-buttons { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.small-action { min-height: 74px; }
.run-action.danger, .admin button.danger { background: linear-gradient(135deg, #dc2626, #991b1b) !important; color: #fee2e2 !important; }
.run-action:active, .touch-list-button:active, .touch-key:active, .touch-list-controls button:active { transform: translateY(1px) scale(.99); }
.info-card { display: grid; align-content: start; gap: 14px; color: var(--muted); }
.status-row strong, .info-card strong { display: block; color: white; font-size: 1.18rem; margin-top: 4px; }
.info-card details { border: 1px solid rgba(148,163,184,.2); border-radius: 16px; padding: 12px; background: rgba(8,15,29,.5); }
.info-card summary { color: #e0f2fe; font-weight: 950; }
.info-card pre { max-height: 190px; overflow: auto; white-space: pre-wrap; font-size: .82rem; }
.empty-driver-state { color: var(--muted); border: 1px dashed var(--line2); border-radius: 18px; padding: 18px; margin: 0; }

/* Admin */
body.admin {
  min-height: 100svh;
  background:
    radial-gradient(circle at 8% 0%, rgba(14,165,233,.16), transparent 32%),
    linear-gradient(135deg, #070c15, #0b1220 52%, #111827);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
body.admin a { color: #7dd3fc; }
.admin .topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 14px 18px;
  background: rgba(8,15,29,.88);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid rgba(148,163,184,.18);
  box-shadow: 0 12px 35px rgba(0,0,0,.28);
}
.admin .topbar > div { display: flex; gap: 12px; align-items: baseline; }
.admin .topbar strong { font-size: 1.15rem; }
.topbar-user { color: var(--muted); }
.admin .topbar nav { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.admin .topbar nav a {
  display: inline-flex;
  min-height: 38px;
  align-items: center;
  padding: 0 12px;
  border-radius: 999px;
  text-decoration: none;
  color: #e2e8f0;
  border: 1px solid transparent;
  font-weight: 800;
}
.admin .topbar nav a:hover { border-color: rgba(125,211,252,.6); background: rgba(56,189,248,.12); }
.admin-layout { max-width: 1600px; margin: 0 auto; padding: clamp(12px, 2vw, 24px); }
.card {
  background: linear-gradient(180deg, rgba(17,24,39,.96), rgba(15,23,42,.96));
  border: 1px solid rgba(148,163,184,.22);
  border-radius: var(--radius-xl);
  padding: clamp(16px, 2vw, 24px);
  box-shadow: var(--shadow);
}
.card h1, .card h2, .card h3 { color: white; margin-top: 0; }
.card p, .muted { color: var(--muted); }
.admin button { background: #243244; }
.admin button:hover { filter: brightness(1.08); }
.admin button.secondary { background: #334155; }
.admin input::placeholder, .admin textarea::placeholder { color: #94a3b8; }
.table { width: 100%; border-collapse: separate; border-spacing: 0; overflow: hidden; border: 1px solid rgba(148,163,184,.2); border-radius: 18px; }
.table th, .table td { padding: 13px 14px; text-align: left; vertical-align: top; border-bottom: 1px solid rgba(148,163,184,.16); }
.table th { background: #0f172a; color: #e0f2fe; font-size: .86rem; text-transform: uppercase; letter-spacing: .06em; }
.table td { color: #f8fafc; }
.table tr:last-child td { border-bottom: 0; }
.pill { display: inline-flex; align-items: center; min-height: 26px; border-radius: 999px; padding: 0 10px; font-weight: 950; font-size: .82rem; }
.pill.ok { background: var(--ok-bg); color: #bbf7d0; border: 1px solid rgba(34,197,94,.5); }
.pill.warn { background: var(--warn-bg); color: #fde68a; border: 1px solid rgba(245,158,11,.5); }
.toolbar, .form-actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin: 14px 0; }
.login { min-height: 100svh; display: grid; place-items: center; padding: 20px; }
.login .card { width: min(460px, 94vw); }
.plan-shell { display: grid; grid-template-columns: minmax(260px, 330px) minmax(260px, 330px) minmax(0, 1fr); gap: 16px; align-items: start; }
.plan-panel { min-height: calc(100dvh - 125px); }
.searchbox { margin: 12px 0; }
.master-list { display: grid; gap: 10px; max-height: calc(100dvh - 270px); overflow: auto; padding-right: 4px; }
.master-item strong { display: block; font-size: 1.03rem; color: white; }
.master-item small { display: block; color: var(--muted); margin-top: 4px; }
.detail-grid { display: grid; grid-template-columns: repeat(4, minmax(130px, 1fr)); gap: 12px; }
.detail-grid .wide { grid-column: span 2; }
.editor-tabs { display: flex; gap: 8px; flex-wrap: wrap; margin: 12px 0; }
.editor-tabs button { border: 1px solid rgba(148,163,184,.22); }
.editor-tabs button.active { background: linear-gradient(135deg, #0ea5e9, #2563eb); }
.stop-toolbar, .section-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin: 14px 0; }
.stop-table-wrap { max-height: calc(100dvh - 410px); overflow: auto; border: 1px solid rgba(148,163,184,.2); border-radius: 18px; }
.stop-table { width: 100%; border-collapse: separate; border-spacing: 0; }
.stop-table th, .stop-table td { padding: 8px; border-bottom: 1px solid rgba(148,163,184,.14); vertical-align: top; }
.stop-table th { position: sticky; top: 0; z-index: 1; background: #0f172a; color: #e0f2fe; }
.stop-table input, .stop-table textarea { min-height: 42px; padding: 9px 10px; border-radius: 12px; }
.stop-table .seq { width: 64px; }
.stop-table .time { width: 105px; }
.stop-table .actions { width: 132px; }
.stop-actions { display: flex; gap: 6px; }
.stop-actions button { min-height: 38px; padding: 0 10px; border-radius: 12px; }
.savebar { position: sticky; bottom: 0; background: rgba(8,15,29,.92); backdrop-filter: blur(14px); border-top: 1px solid rgba(148,163,184,.22); margin: 16px -24px -24px; padding: 14px 24px; border-radius: 0 0 var(--radius-xl) var(--radius-xl); display: flex; align-items: center; gap: 14px; }
.empty-state { color: var(--muted); background: rgba(8,15,29,.45); border: 1px dashed var(--line2); border-radius: 18px; padding: 18px; }
.users-grid { display: grid; grid-template-columns: minmax(280px, 380px) minmax(0, 1fr); gap: 16px; }
.user-list { max-height: calc(100dvh - 280px); }
.user-form .wide { grid-column: 1 / -1; }
code, pre { background: #050b16; color: #e2e8f0; border: 1px solid rgba(148,163,184,.22); border-radius: 14px; }
code { padding: 2px 6px; }
pre { padding: 14px; overflow: auto; }
.admin audio { width: min(640px, 100%); min-width: 380px; height: 44px; display: block; }
.audio-cell { width: min(680px, 48vw); }

@media (max-width: 980px) {
  body.driver { overflow: auto; }
  .driver-shell { height: auto; min-height: calc(100svh - var(--driver-top-reserve)); }
  .driver-topbar { align-items: flex-start; flex-direction: column; }
  .driver-statusbar { justify-content: flex-start; }
  .driver-screen, .screen-list, .screen-run { grid-template-columns: 1fr; grid-template-rows: auto; }
  .screen-run { grid-template-areas: "head" "hero" "flow" "actions" "info"; }
  .run-hero-top, .next-stop-grid { grid-template-columns: 1fr; }
  .stop-flow-card { min-height: 520px; }
  .screen-heading { align-items: flex-start; flex-direction: column; }
  .screen-heading span { text-align: left; }
  .touch-right { grid-template-columns: repeat(3, minmax(82px, 1fr)); }
  .touch-key { min-height: 76px; }
  .touch-input-row { grid-template-columns: 1fr; }
}
@media (max-width: 1150px) {
  .plan-shell { grid-template-columns: 1fr; }
  .plan-panel { min-height: auto; }
  .master-list { max-height: 360px; }
  .detail-grid { grid-template-columns: 1fr 1fr; }
  .stop-table-wrap { max-height: none; }
  .users-grid { grid-template-columns: 1fr; }
  .admin .topbar { align-items: flex-start; flex-direction: column; }
  .admin .topbar nav { justify-content: flex-start; }
}
@media (max-width: 720px) {
  .admin audio { min-width: 0; width: 100%; }
  .audio-cell { width: auto; }
  .detail-grid { grid-template-columns: 1fr; }
  .detail-grid .wide { grid-column: auto; }
  .section-head, .stop-toolbar, .savebar { align-items: flex-start; flex-direction: column; }
  .table { font-size: .9rem; }
}
.route-start-button {
  border: 0;
  border-radius: 20px;
  min-height: 64px;
  padding: 0 20px;
  background: linear-gradient(135deg, #16a34a, #15803d);
  color: #ecfdf5;
  font-weight: 950;
  font-size: clamp(1.05rem, 2.4vw, 1.35rem);
  box-shadow: 0 12px 28px rgba(22,163,74,.22);
}
.route-start-button:active { transform: translateY(1px) scale(.99); }

/* === v9 Fahrer-Cockpit: optimiert für kurzen Fahrerblick + sichere obere Leiste === */
body.driver .screen-run {
  grid-template-columns: minmax(0, 1.65fr) minmax(320px, .72fr);
  grid-template-rows: auto auto minmax(0, 1fr) auto;
  grid-template-areas:
    "head actions"
    "hero actions"
    "flow actions"
    "info actions";
  gap: clamp(12px, 1.5vw, 18px);
}
body.driver .run-heading {
  align-items: center;
  padding: 0 2px;
}
body.driver .run-heading h1 {
  font-size: clamp(2rem, 3vw, 3.4rem);
}
body.driver #runStatus {
  min-height: 46px;
  display: inline-flex;
  align-items: center;
  padding: 0 18px;
  border-radius: 999px;
  border: 1px solid rgba(34,197,94,.45);
  background: rgba(22,163,74,.16);
  color: #dcfce7;
  font-weight: 1000;
  text-transform: uppercase;
}
body.driver .run-hero-card {
  padding: clamp(14px, 1.6vw, 18px);
  background:
    linear-gradient(135deg, rgba(15,23,42,.96), rgba(8,15,29,.92)),
    radial-gradient(circle at 100% 0%, rgba(56,189,248,.18), transparent 35%);
}
body.driver .run-hero-top {
  grid-template-columns: minmax(220px, .85fr) minmax(300px, 1.15fr);
  gap: clamp(12px, 1.4vw, 18px);
  align-items: stretch;
}
body.driver .delay-panel {
  order: 2;
  min-height: clamp(132px, 18dvh, 190px);
  border-width: 3px;
  border-radius: 30px;
  padding: clamp(16px, 2vw, 26px);
  text-align: left;
  align-content: center;
}
body.driver .delay-panel span {
  font-size: clamp(1.05rem, 1.8vw, 1.55rem);
}
body.driver .delay-panel strong {
  font-size: clamp(4rem, 9vw, 8.2rem);
  letter-spacing: -.06em;
  margin: 2px 0 4px;
}
body.driver .delay-panel small {
  font-size: clamp(1rem, 1.5vw, 1.28rem);
}
body.driver .delay-on-time {
  background: linear-gradient(135deg, #065f46, #064e3b);
  border-color: #86efac;
  box-shadow: 0 0 0 1px rgba(134,239,172,.2), 0 22px 48px rgba(22,163,74,.22);
}
body.driver .delay-late {
  background: linear-gradient(135deg, #991b1b, #7f1d1d 62%, #450a0a);
  border-color: #fecaca;
  box-shadow: 0 0 0 1px rgba(254,202,202,.26), 0 24px 58px rgba(220,38,38,.34);
}
body.driver .delay-early {
  background: linear-gradient(135deg, #92400e, #78350f 62%, #451a03);
  border-color: #fde68a;
  box-shadow: 0 0 0 1px rgba(253,230,138,.24), 0 24px 58px rgba(245,158,11,.24);
}
body.driver .current-stop-card {
  border-radius: 30px;
  padding: clamp(20px, 2.3vw, 30px);
  background: linear-gradient(135deg, #f8fafc, #bae6fd);
  box-shadow: 0 22px 58px rgba(56,189,248,.2);
}
body.driver .current-stop-card strong {
  font-size: clamp(2.7rem, 6.4vw, 6.2rem);
}
body.driver .current-stop-card small {
  font-size: clamp(1.15rem, 2vw, 1.45rem);
}
body.driver .next-stop-grid {
  grid-template-columns: 1.3fr 1fr 1fr;
  gap: 12px;
}
body.driver .next-stop-grid > div {
  min-height: 86px;
  padding: 16px;
  border-radius: 24px;
  background: rgba(15,23,42,.82);
}
body.driver .next-stop-grid strong {
  font-size: clamp(1.2rem, 2.1vw, 1.7rem);
}
body.driver .stop-flow-card {
  min-height: min(58dvh, 690px);
  padding: clamp(14px, 1.6vw, 20px);
  background: linear-gradient(135deg, rgba(15,23,42,.97), rgba(2,6,23,.9));
  border-color: rgba(125,211,252,.2);
}
body.driver .stop-flow-head h2 {
  font-size: clamp(1.8rem, 2.9vw, 2.75rem);
}
body.driver .stop-flow-head p {
  font-size: clamp(1rem, 1.35vw, 1.18rem);
}
body.driver #stopProgressText {
  min-width: 96px;
  min-height: 54px;
  font-size: clamp(1.35rem, 2.2vw, 2rem);
  background: rgba(56,189,248,.22);
}
body.driver .progress-track {
  height: 14px;
  background: rgba(30,41,59,.96);
}
body.driver .stop-timeline {
  gap: 7px;
  padding: 2px 6px 2px 2px;
}
body.driver .stop-timeline-item {
  min-height: 58px;
  border-radius: 18px;
  padding: 8px 10px;
  grid-template-columns: 48px minmax(0,1fr) minmax(86px, auto);
  border-color: rgba(148,163,184,.26);
  background: rgba(15,23,42,.78);
}
body.driver .stop-timeline-item.current {
  min-height: 78px;
  border-width: 3px;
  border-color: #bae6fd;
  background: linear-gradient(90deg, rgba(3,105,161,.86), rgba(14,165,233,.28), rgba(15,23,42,.95));
  box-shadow: inset 9px 0 0 #7dd3fc, 0 14px 34px rgba(14,165,233,.2);
}
body.driver .stop-timeline-item.done {
  opacity: .9;
  background: rgba(6,78,59,.34);
}
body.driver .stop-seq {
  width: 40px;
  height: 40px;
  border-radius: 13px;
  font-size: 1rem;
}
body.driver .stop-timeline-item.current .stop-seq {
  width: 48px;
  height: 48px;
  font-size: 1.12rem;
}
body.driver .stop-main strong {
  font-size: clamp(1.08rem, 1.75vw, 1.48rem);
}
body.driver .stop-timeline-item.current .stop-main strong {
  font-size: clamp(1.35rem, 2.35vw, 2rem);
}
body.driver .stop-main small {
  font-size: clamp(.86rem, 1.15vw, 1rem);
}
body.driver .stop-state {
  min-width: 84px;
  text-align: center;
  padding: 8px 10px;
  font-size: clamp(.75rem, 1vw, .92rem);
}
body.driver .run-action-card {
  position: sticky;
  top: 102px;
  align-self: start;
  min-height: calc(100svh - var(--driver-top-reserve) - 132px);
  padding: clamp(14px, 1.5vw, 18px);
  background: linear-gradient(180deg, rgba(15,23,42,.98), rgba(2,6,23,.94));
  border-color: rgba(148,163,184,.28);
}
body.driver .run-action-card h2 {
  font-size: clamp(1.45rem, 2vw, 2.1rem);
}
body.driver .run-action {
  min-height: clamp(74px, 9.2dvh, 100px);
  border-radius: 24px;
  padding: 14px 16px;
  border: 2px solid rgba(255,255,255,.08);
}
body.driver .run-action span {
  font-size: clamp(1.35rem, 2.5vw, 2.05rem);
}
body.driver .run-action small {
  font-size: clamp(.86rem, 1.1vw, 1rem);
}
body.driver #departBtn {
  background: linear-gradient(135deg, #16a34a, #166534);
  border-color: rgba(187,247,208,.35);
}
body.driver #arrivalBtn {
  background: linear-gradient(135deg, #0284c7, #075985);
  border-color: rgba(186,230,253,.32);
}
body.driver #repeatAudioBtn {
  background: linear-gradient(135deg, #7c3aed, #4c1d95);
  border-color: rgba(221,214,254,.34);
}
body.driver #nextSilentBtn, body.driver #prevSilentBtn {
  background: linear-gradient(135deg, #334155, #1e293b);
}
body.driver #backToRouteBtn {
  background: linear-gradient(135deg, #0f766e, #134e4a);
}
body.driver #endTripBtn {
  background: linear-gradient(135deg, #dc2626, #7f1d1d) !important;
  border-color: rgba(254,202,202,.38);
}
body.driver .run-info-card {
  display: none;
}

@media (max-width: 980px) {
  body.driver .screen-run {
    grid-template-columns: 1fr;
    grid-template-areas: "head" "hero" "actions" "flow" "info";
  }
  body.driver .run-action-card {
    position: static;
    min-height: auto;
  }
  body.driver .run-action-card {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  body.driver .run-action-card h2 {
    grid-column: 1 / -1;
  }
  body.driver .run-mini-buttons {
    grid-column: 1 / -1;
  }
  body.driver .run-hero-top, body.driver .next-stop-grid {
    grid-template-columns: 1fr;
  }
  body.driver .stop-flow-card {
    min-height: 620px;
  }
}


/* === v11 Fahrerterminal: echte Vollbild-App ohne Seiten-Scroll === */
body.driver.driver-active {
  --driver-top-reserve: clamp(44px, 6svh, 76px);
  --driver-bottom-reserve: max(8px, env(safe-area-inset-bottom, 0px));
  height: 100svh;
  min-height: 100svh;
  overflow: hidden !important;
  padding: 0 !important;
  overscroll-behavior: none;
  touch-action: manipulation;
}
body.driver.driver-active .driver-shell {
  position: fixed;
  top: calc(var(--driver-vv-top, 0px) + var(--driver-top-reserve) + env(safe-area-inset-top, 0px));
  left: max(10px, env(safe-area-inset-left, 0px));
  right: max(10px, env(safe-area-inset-right, 0px));
  height: calc(var(--driver-vvh, 100svh) - var(--driver-top-reserve) - var(--driver-bottom-reserve) - env(safe-area-inset-top, 0px));
  min-height: 0 !important;
  max-height: none;
  padding: 0 0 8px 0;
  display: grid;
  grid-template-rows: minmax(58px, auto) minmax(0, 1fr);
  gap: 10px;
  overflow: hidden !important;
}
body.driver.driver-active .driver-topbar {
  position: relative !important;
  top: auto !important;
  min-height: 58px;
  max-height: 74px;
  padding: 8px 12px;
  border-radius: 20px;
  overflow: hidden;
}
body.driver.driver-active .driver-logo {
  width: 42px;
  height: 42px;
  border-radius: 13px;
}
body.driver.driver-active .driver-title strong {
  font-size: clamp(1rem, 1.6vw, 1.25rem);
}
body.driver.driver-active .driver-title small {
  font-size: clamp(.78rem, 1.1vw, .95rem);
  max-width: 46vw;
}
body.driver.driver-active .driver-statusbar {
  gap: 6px;
  flex-wrap: nowrap;
  min-width: 0;
}
body.driver.driver-active .status-chip,
body.driver.driver-active .status-button,
body.driver.driver-active .status-link {
  min-height: 32px;
  padding: 0 10px;
  font-size: clamp(.76rem, 1vw, .88rem);
  white-space: nowrap;
}
body.driver.driver-active .driver-screen {
  height: 100%;
  min-height: 0 !important;
  overflow: hidden !important;
  grid-template-rows: minmax(42px, auto) minmax(0, 1fr);
  gap: 10px;
}
body.driver.driver-active .screen-heading {
  min-height: 0;
  padding: 0 2px;
  align-items: center;
}
body.driver.driver-active .screen-heading p {
  font-size: .72rem;
}
body.driver.driver-active .screen-heading h1 {
  font-size: clamp(1.25rem, 2vw, 2rem);
}
body.driver.driver-active .screen-heading span {
  font-size: clamp(.82rem, 1.2vw, 1rem);
}
body.driver.driver-active .driver-card {
  min-height: 0 !important;
  overflow: hidden;
  border-radius: 22px;
  padding: clamp(12px, 1.5vw, 18px);
}
body.driver.driver-active .primary-card,
body.driver.driver-active .keypad-card,
body.driver.driver-active .list-card,
body.driver.driver-active .list-actions,
body.driver.driver-active .route-quick-list {
  min-height: 0 !important;
  overflow: hidden;
}
body.driver.driver-active .touch-preview,
body.driver.driver-active .touch-list,
body.driver.driver-active #routeListView,
body.driver.driver-active .stop-timeline {
  overflow: auto !important;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
}
body.driver.driver-active .touch-key {
  min-height: clamp(52px, 8.8svh, 78px);
}
body.driver.driver-active .touch-input {
  min-height: clamp(58px, 9svh, 82px);
}
body.driver.driver-active .route-start-button {
  min-height: clamp(50px, 7svh, 62px);
}

body.driver.driver-active .screen-run {
  height: 100%;
  min-height: 0 !important;
  overflow: hidden !important;
  grid-template-columns: minmax(0, 1.58fr) minmax(278px, .62fr);
  grid-template-rows: minmax(40px, auto) minmax(0, .92fr) minmax(0, 1.08fr);
  grid-template-areas:
    "head actions"
    "hero actions"
    "flow actions";
  gap: 10px;
}
body.driver.driver-active .run-heading {
  min-height: 0;
  padding: 0;
}
body.driver.driver-active .run-heading h1 {
  font-size: clamp(1.45rem, 2.25vw, 2.35rem);
}
body.driver.driver-active #runStatus {
  min-height: 34px;
  padding: 0 12px;
  font-size: clamp(.74rem, .95vw, .9rem);
}
body.driver.driver-active .run-hero-card {
  min-height: 0 !important;
  grid-template-rows: auto minmax(0, 1fr) auto;
  gap: 8px;
  align-content: stretch;
}
body.driver.driver-active .run-hero-top {
  grid-template-columns: minmax(160px, .8fr) minmax(220px, 1.2fr);
  gap: 10px;
}
body.driver.driver-active .run-summary {
  font-size: clamp(.95rem, 1.45vw, 1.22rem);
}
body.driver.driver-active .run-summary.small {
  font-size: clamp(.78rem, 1vw, .94rem);
  margin-top: 2px;
}
body.driver.driver-active .delay-panel {
  min-height: clamp(82px, 12svh, 126px);
  padding: 10px 14px;
  border-radius: 22px;
}
body.driver.driver-active .delay-panel span {
  font-size: clamp(.84rem, 1.1vw, 1.08rem);
}
body.driver.driver-active .delay-panel strong {
  font-size: clamp(2.7rem, 6.2vw, 5.6rem);
  line-height: .9;
}
body.driver.driver-active .delay-panel small {
  font-size: clamp(.8rem, 1vw, 1rem);
}
body.driver.driver-active .current-stop-card {
  min-height: 0;
  padding: clamp(12px, 1.5vw, 18px);
  border-radius: 22px;
}
body.driver.driver-active .current-stop-card strong {
  font-size: clamp(2rem, 4.7vw, 4.35rem);
  line-height: .96;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
body.driver.driver-active .current-stop-card small {
  font-size: clamp(.9rem, 1.25vw, 1.1rem);
  margin-top: 4px;
}
body.driver.driver-active .next-stop-grid {
  gap: 8px;
}
body.driver.driver-active .next-stop-grid > div {
  min-height: 54px;
  padding: 9px 11px;
  border-radius: 17px;
}
body.driver.driver-active .next-stop-grid span {
  font-size: .68rem;
}
body.driver.driver-active .next-stop-grid strong {
  font-size: clamp(.9rem, 1.35vw, 1.18rem);
}
body.driver.driver-active .stop-flow-card {
  min-height: 0 !important;
  height: auto;
  grid-template-rows: auto auto minmax(0, 1fr);
  gap: 8px;
}
body.driver.driver-active .stop-flow-head h2 {
  font-size: clamp(1.25rem, 1.9vw, 1.8rem);
}
body.driver.driver-active .stop-flow-head p {
  margin-top: 2px;
  font-size: clamp(.78rem, .95vw, .92rem);
}
body.driver.driver-active #stopProgressText {
  min-width: 72px;
  min-height: 36px;
  font-size: clamp(1rem, 1.4vw, 1.28rem);
}
body.driver.driver-active .progress-track {
  height: 9px;
}
body.driver.driver-active .stop-timeline {
  min-height: 0 !important;
  max-height: none;
  gap: 6px;
  padding-right: 3px;
}
body.driver.driver-active .stop-timeline-item {
  min-height: 48px;
  grid-template-columns: 40px minmax(0, 1fr) minmax(66px, auto);
  border-radius: 15px;
  padding: 6px 8px;
  gap: 9px;
}
body.driver.driver-active .stop-timeline-item.current {
  min-height: 62px;
  border-width: 2px;
  box-shadow: inset 7px 0 0 #7dd3fc, 0 8px 20px rgba(14,165,233,.16);
}
body.driver.driver-active .stop-seq {
  width: 34px;
  height: 34px;
  border-radius: 11px;
  font-size: .9rem;
}
body.driver.driver-active .stop-timeline-item.current .stop-seq {
  width: 40px;
  height: 40px;
}
body.driver.driver-active .stop-main strong {
  font-size: clamp(.95rem, 1.35vw, 1.18rem);
}
body.driver.driver-active .stop-timeline-item.current .stop-main strong {
  font-size: clamp(1.1rem, 1.7vw, 1.42rem);
}
body.driver.driver-active .stop-main small {
  font-size: clamp(.72rem, .9vw, .86rem);
}
body.driver.driver-active .stop-state {
  min-width: 58px;
  padding: 5px 7px;
  font-size: clamp(.62rem, .78vw, .76rem);
}
body.driver.driver-active .run-action-card {
  position: static !important;
  top: auto !important;
  height: 100%;
  min-height: 0 !important;
  display: grid;
  grid-template-rows: auto repeat(4, minmax(0, 1fr)) auto auto;
  align-content: stretch;
  gap: 8px;
  overflow: hidden;
}
body.driver.driver-active .run-action-card h2 {
  font-size: clamp(1.1rem, 1.5vw, 1.45rem);
}
body.driver.driver-active .run-action {
  min-height: 0 !important;
  height: 100%;
  border-radius: 18px;
  padding: 9px 12px;
}
body.driver.driver-active .run-action span {
  font-size: clamp(1.05rem, 1.75vw, 1.55rem);
}
body.driver.driver-active .run-action small {
  font-size: clamp(.68rem, .85vw, .86rem);
}
body.driver.driver-active .run-mini-buttons {
  min-height: 0;
  gap: 8px;
}
body.driver.driver-active .run-info-card {
  display: none !important;
}

@media (max-width: 980px) {
  body.driver.driver-active .driver-topbar {
    flex-direction: row;
    align-items: center;
  }
  body.driver.driver-active .driver-statusbar .status-link {
    display: none;
  }
  body.driver.driver-active .screen-run {
    grid-template-columns: minmax(0, 1fr) minmax(240px, .56fr);
    grid-template-rows: minmax(38px, auto) minmax(0, .9fr) minmax(0, 1.1fr);
    grid-template-areas:
      "head actions"
      "hero actions"
      "flow actions";
  }
  body.driver.driver-active .run-hero-top {
    grid-template-columns: minmax(0, .8fr) minmax(170px, 1.05fr);
  }
  body.driver.driver-active .next-stop-grid {
    grid-template-columns: 1fr;
  }
  body.driver.driver-active .next-stop-grid > div:nth-child(3) {
    display: none;
  }
  body.driver.driver-active .run-action-card {
    grid-template-rows: auto repeat(3, minmax(0, 1fr)) auto auto;
  }
}
@media (max-width: 740px) {
  body.driver.driver-active .driver-shell {
    left: 8px;
    right: 8px;
  }
  body.driver.driver-active .driver-statusbar #driverNameBadge,
  body.driver.driver-active .driver-statusbar #connectionState {
    display: none;
  }
  body.driver.driver-active .driver-screen {
    overflow: auto !important;
  }
  body.driver.driver-active .screen-run {
    grid-template-columns: 1fr;
    grid-template-areas: "head" "hero" "actions" "flow";
    overflow: auto !important;
  }
  body.driver.driver-active .run-action-card {
    height: auto;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-rows: auto repeat(3, minmax(58px, auto));
  }
  body.driver.driver-active .run-action-card h2,
  body.driver.driver-active .run-mini-buttons {
    grid-column: 1 / -1;
  }
}
