:root {
  color-scheme: light;
  --bg: #f4f7fb;
  --surface: #ffffff;
  --surface-soft: #eef3f8;
  --ink: #101827;
  --muted: #647083;
  --line: #d9e1ea;
  --teal: #0b2a50;
  --teal-dark: #07162d;
  --amber: #b7791f;
  --blue: #1d4ed8;
  --red: #e2252a;
  --green: #18794e;
  --shadow: 0 20px 50px rgba(23, 33, 31, 0.08);
  --safe-top: max(0px, env(safe-area-inset-top));
  --safe-bottom: max(18px, env(safe-area-inset-bottom));
}

.formsrocket-panel {
  display: grid;
  gap: 18px;
}

.formsrocket-toolbar,
.forms-template-meta,
.formsrocket-create-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 10px;
  align-items: end;
}

.formsrocket-root {
  display: grid;
  gap: 18px;
}

.formsrocket-start,
.formsrocket-admin,
.formsrocket-editor,
.formsrocket-lists section {
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: 8px;
  padding: 16px;
  box-shadow: var(--shadow);
}

.formsrocket-start {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) minmax(220px, 1.4fr) auto;
  gap: 12px;
  align-items: end;
}

.formsrocket-start h3,
.formsrocket-admin h3,
.formsrocket-editor h3,
.formsrocket-lists h3 {
  margin: 0 0 10px;
}

.formsrocket-help {
  margin: -2px 0 12px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.formsrocket-start label,
.forms-template-meta label,
.formsrocket-create-grid label {
  display: grid;
  gap: 6px;
  font-weight: 800;
  color: var(--muted);
}

.formsrocket-editor-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
  margin-bottom: 14px;
}

.formsrocket-editor-layout {
  display: grid;
  grid-template-columns: minmax(340px, 1fr) minmax(280px, 360px);
  gap: 16px;
  align-items: start;
}

.forms-paper-wrap {
  display: grid;
  gap: 18px;
  overflow-x: auto;
  padding: 6px;
}

.forms-paper-page {
  position: relative;
  width: min(100%, 920px);
  min-width: min(100%, 340px);
  margin: 0 auto;
  background: #fff;
  border: 1px solid #cbd5e1;
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.16);
  overflow: hidden;
}

.forms-paper-bg,
.forms-paper-pdf {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  border: 0;
  background: #fff;
  pointer-events: none;
}

.forms-paper-pdf-canvas {
  display: block;
}

.forms-paper-pdf-canvas[data-ready="1"] + .forms-paper-render-fallback {
  display: none;
}

.forms-paper-placeholder {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: #64748b;
  background: repeating-linear-gradient(135deg, #fff, #fff 12px, #f1f5f9 12px, #f1f5f9 24px);
  font-weight: 800;
  text-align: center;
  padding: 24px;
}

.forms-field {
  position: absolute;
  z-index: 3;
  display: flex;
  align-items: stretch;
  min-height: 22px;
}

.forms-field input,
.forms-field textarea,
.forms-field select {
  width: 100%;
  height: 100%;
  min-height: 100%;
  border: 1px solid rgba(11, 42, 80, 0.35);
  background: rgba(255, 255, 255, 0.88);
  color: #0f172a;
  border-radius: 4px;
  padding: 6px 8px;
  font-size: clamp(12px, 1vw, 15px);
  font-weight: 700;
}

.forms-field textarea {
  resize: none;
}

.forms-field.auto-detected input,
.forms-field.auto-detected textarea,
.forms-field.auto-detected select {
  background: rgba(255, 255, 255, 0.62);
  border-color: rgba(226, 37, 42, 0.35);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.28);
}

.forms-field.auto-detected input:focus,
.forms-field.auto-detected textarea:focus,
.forms-field.auto-detected select:focus {
  background: rgba(255, 255, 255, 0.92);
  border-color: rgba(226, 37, 42, 0.75);
  box-shadow: 0 0 0 2px rgba(226, 37, 42, 0.16);
  outline: 0;
}

.forms-checkbox.label-hidden {
  display: grid;
  place-items: center;
  padding: 0;
  background: transparent;
}

.forms-checkbox.label-hidden input {
  width: 100%;
  height: 100%;
  min-height: 100%;
  margin: 0;
  accent-color: var(--red);
}

.forms-free-fill-layer {
  position: absolute;
  inset: 0;
  z-index: 4;
  cursor: text;
}

.forms-free-item {
  position: absolute;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: 2px;
}

.forms-free-item textarea {
  width: 100%;
  min-height: 36px;
  border: 1px solid rgba(226, 37, 42, 0.48);
  border-radius: 4px;
  padding: 5px 7px;
  background: rgba(255, 255, 255, 0.78);
  color: #0f172a;
  font-size: clamp(12px, 1vw, 15px);
  font-weight: 800;
  resize: both;
}

.forms-free-item textarea:focus {
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 0 0 2px rgba(226, 37, 42, 0.18);
  outline: 0;
}

.forms-free-item button {
  width: 24px;
  height: 24px;
  border: 0;
  border-radius: 999px;
  background: var(--red);
  color: #ffffff;
  font-weight: 900;
  line-height: 1;
}

.forms-field.template-edit {
  cursor: move;
  border: 2px solid rgba(226, 37, 42, 0.78);
  background: rgba(226, 37, 42, 0.16);
  color: #7f1d1d;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  text-align: center;
  user-select: none;
}

.forms-field.template-edit i {
  position: absolute;
  right: -6px;
  bottom: -6px;
  width: 16px;
  height: 16px;
  background: var(--red);
  border: 2px solid #fff;
  border-radius: 50%;
  cursor: nwse-resize;
}

.forms-field-list {
  display: grid;
  gap: 10px;
  max-height: 72vh;
  overflow: auto;
  padding-right: 4px;
}

.forms-field-row {
  display: grid;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  background: var(--surface-soft);
}

.forms-field-position {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 6px;
}

.forms-checkbox {
  display: flex;
  gap: 6px;
  align-items: center;
  background: rgba(255, 255, 255, 0.86);
  color: #0f172a;
  padding: 6px;
  border-radius: 4px;
}

.forms-checkbox input {
  width: auto;
  min-height: 18px;
}

.forms-signature-pad {
  display: grid;
  gap: 6px;
  width: 100%;
}

.forms-signature-pad canvas {
  width: 100%;
  height: 120px;
  background: rgba(255, 255, 255, 0.96);
  border: 1px dashed #64748b;
  border-radius: 4px;
  touch-action: none;
}

.forms-upload-field {
  display: grid;
  gap: 6px;
  width: 100%;
}

.forms-upload-field img {
  max-width: 100%;
  max-height: 120px;
  object-fit: contain;
  background: #fff;
  border: 1px solid #cbd5e1;
}

.formsrocket-lists {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
}

.formsrocket-card,
.forms-location-list article {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
  padding: 12px;
  margin-top: 10px;
}

.formsrocket-card p {
  margin: 4px 0 0;
  color: var(--muted);
}

.forms-location-list article > div:first-child {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.forms-location-list article span,
.forms-location-list article small {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
  overflow-wrap: anywhere;
}

.forms-status {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 3px 9px;
  font-size: 12px;
  font-weight: 900;
  background: rgba(29, 78, 216, 0.12);
  color: var(--blue);
}

.forms-status-abgeschlossen,
.forms-status-freigegeben {
  background: rgba(24, 121, 78, 0.14);
  color: var(--green);
}

.forms-status-archiviert,
.forms-status-zur-ckgewiesen {
  background: rgba(226, 37, 42, 0.13);
  color: var(--red);
}

.forms-audit {
  display: grid;
  gap: 5px;
  margin-top: 12px;
  color: var(--muted);
  font-size: 13px;
}

body[data-theme="dark"] .formsrocket-start,
body[data-theme="dark"] .formsrocket-admin,
body[data-theme="dark"] .formsrocket-editor,
body[data-theme="dark"] .formsrocket-lists section,
body[data-theme="dark"] .formsrocket-card,
body[data-theme="dark"] .forms-location-list article,
body[data-theme="dark"] .forms-field-row {
  background: var(--surface);
  border-color: var(--line);
  color: var(--ink);
}

body[data-theme="dark"] .forms-paper-page {
  box-shadow: 0 18px 46px rgba(0, 0, 0, 0.42);
}

body[data-theme="dark"] .forms-field input,
body[data-theme="dark"] .forms-field textarea,
body[data-theme="dark"] .forms-field select,
body[data-theme="dark"] .forms-checkbox {
  background: rgba(255, 255, 255, 0.94);
  color: #0f172a;
}

@media (max-width: 900px) {
  .formsrocket-start,
  .formsrocket-editor-layout {
    grid-template-columns: 1fr;
  }

  .formsrocket-editor-head {
    display: grid;
  }

  .formsrocket-editor-head .header-actions {
    justify-content: stretch;
  }

  .formsrocket-editor-head .header-actions button,
  .formsrocket-start button {
    width: 100%;
  }

  .forms-field-list {
    max-height: none;
  }
}

@media print {
  body.formsrocket-printing .sidebar,
  body.formsrocket-printing .topbar,
  body.formsrocket-printing .mobile-toolbar,
  body.formsrocket-printing .formsrocket-start,
  body.formsrocket-printing .formsrocket-admin,
  body.formsrocket-printing .formsrocket-lists,
  body.formsrocket-printing .forms-audit,
  body.formsrocket-printing .formsrocket-editor-head {
    display: none !important;
  }

  body.formsrocket-printing .workspace,
  body.formsrocket-printing .view,
  body.formsrocket-printing .panel,
  body.formsrocket-printing .formsrocket-editor,
  body.formsrocket-printing .forms-paper-wrap {
    display: block !important;
    margin: 0 !important;
    padding: 0 !important;
    box-shadow: none !important;
    border: 0 !important;
    background: #fff !important;
  }

  body.formsrocket-printing .forms-paper-page {
    width: 100% !important;
    box-shadow: none !important;
    page-break-after: always;
  }
}

body[data-theme="dark"] .workspace,
body[data-theme="dark"] .view {
  color: var(--ink);
}

body[data-theme="dark"] .topbar,
body[data-theme="dark"] .mobile-toolbar,
body[data-theme="dark"] .panel,
body[data-theme="dark"] .metric,
body[data-theme="dark"] .vehicle-card,
body[data-theme="dark"] .mission-card,
body[data-theme="dark"] .history-item,
body[data-theme="dark"] .role-card,
body[data-theme="dark"] .module-item,
body[data-theme="dark"] .table-row,
body[data-theme="dark"] .planning-column,
body[data-theme="dark"] .billing-card,
body[data-theme="dark"] .billing-week-card,
body[data-theme="dark"] .route-map-panel,
body[data-theme="dark"] .chat-panel,
body[data-theme="dark"] .vehicle-crew-card,
body[data-theme="dark"] .incoming-job,
body[data-theme="dark"] .vehicle-dispatch-messages,
body[data-theme="dark"] .vehicle-dispatch-message,
body[data-theme="dark"] .protocol-group,
body[data-theme="dark"] .protocol-card,
body[data-theme="dark"] dialog {
  background: var(--surface);
  border-color: var(--line);
  color: var(--ink);
}

body[data-theme="dark"] .vehicle-list,
body[data-theme="dark"] .mission-board,
body[data-theme="dark"] .history-list,
body[data-theme="dark"] .module-list,
body[data-theme="dark"] .role-grid,
body[data-theme="dark"] .data-table,
body[data-theme="dark"] .chart-list,
body[data-theme="dark"] .billing-grid,
body[data-theme="dark"] .billing-summary,
body[data-theme="dark"] .system-status-list,
body[data-theme="dark"] .backup-actions,
body[data-theme="dark"] .vehicle-check-lines span,
body[data-theme="dark"] .mission-assignment,
body[data-theme="dark"] .mission-compact article,
body[data-theme="dark"] .archived-row,
body[data-theme="dark"] .route-result,
body[data-theme="dark"] .chat-sidebar,
body[data-theme="dark"] .chat-messages,
body[data-theme="dark"] .vehicle-gps-panel,
body[data-theme="dark"] .vehicle-start-dialog {
  background: var(--surface-soft);
  border-color: var(--line);
  color: var(--ink);
}

body[data-theme="dark"] .search,
body[data-theme="dark"] .select,
body[data-theme="dark"] input,
body[data-theme="dark"] select,
body[data-theme="dark"] textarea,
body[data-theme="dark"] .small-button,
body[data-theme="dark"] .mission-actions button,
body[data-theme="dark"] .secondary-action,
body[data-theme="dark"] .navigation-button.alt {
  background: #0a1729;
  border-color: var(--line);
  color: var(--ink);
}

body[data-theme="dark"] input::placeholder,
body[data-theme="dark"] textarea::placeholder {
  color: #7f8da3;
}

body[data-theme="dark"] option {
  background: #0a1729;
  color: var(--ink);
}

body[data-theme="dark"] .live-pill,
body[data-theme="dark"] .status-badge,
body[data-theme="dark"] .priority,
body[data-theme="dark"] .mission-status,
body[data-theme="dark"] .system-status-card,
body[data-theme="dark"] .backup-row {
  background: #0a1729;
  border-color: var(--line);
  color: var(--ink);
}

body[data-theme="dark"] .mission-assignment.assigned,
body[data-theme="dark"] .system-status-card.ok,
body[data-theme="dark"] .vehicle-gps-panel.gps-ok {
  background: rgba(22, 163, 74, 0.12);
  border-color: rgba(22, 163, 74, 0.32);
}

body[data-theme="dark"] .mission-assignment.open,
body[data-theme="dark"] .system-status-card.warn,
body[data-theme="dark"] .priority.planbar,
body[data-theme="dark"] .status.pataufgenommen,
body[data-theme="dark"] .status.amzielort {
  background: rgba(251, 191, 36, 0.13);
  border-color: rgba(251, 191, 36, 0.30);
}

body[data-theme="dark"] .status.reinigung,
body[data-theme="dark"] .status.pause,
body[data-theme="dark"] .status.ausserdienst,
body[data-theme="dark"] .status.notruf,
body[data-theme="dark"] .priority.hoch,
body[data-theme="dark"] .mission-actions button.now-alarm,
body[data-theme="dark"] .vehicle-gps-panel.gps-error {
  background: rgba(226, 37, 42, 0.13);
  border-color: rgba(226, 37, 42, 0.34);
}

body[data-theme="dark"] .map-canvas,
body[data-theme="dark"] .dashboard-map,
body[data-theme="dark"] .route-planner-map {
  background: #07101f;
  border-color: var(--line);
}

body[data-theme="dark"] .leaflet-container,
body[data-theme="dark"] .leaflet-tile-pane {
  filter: brightness(0.78) contrast(1.08) saturate(0.82);
}

body[data-theme="dark"] .chat-message {
  background: #0a1729;
  color: var(--ink);
}

body[data-theme="dark"] .chat-message.own {
  background: rgba(226, 37, 42, 0.20);
}

body[data-theme="dark"] .tablet-shell {
  background: #07101f;
  border-color: #1f2f46;
  color: var(--ink);
}

body[data-theme="dark"] .time-chip,
body[data-theme="dark"] .mission-assignment strong {
  color: var(--ink);
}

body[data-theme="dark"] .text-button {
  color: var(--ink);
}

body[data-theme="dark"] {
  color-scheme: dark;
  --bg: #07101f;
  --surface: #0d1b31;
  --surface-soft: #13243d;
  --ink: #f3f7fb;
  --muted: #a8b4c7;
  --line: #253750;
  --teal: #e2252a;
  --teal-dark: #f3f7fb;
  --amber: #fbbf24;
  --blue: #60a5fa;
  --red: #ff5b61;
  --green: #44d37f;
  --shadow: 0 22px 60px rgba(0, 0, 0, 0.34);
}

* { box-sizing: border-box; }

[hidden] { display: none !important; }

body {
  margin: 0;
  min-height: 100vh;
  max-width: 100%;
  overflow-x: hidden;
  background: var(--bg);
  color: var(--ink);
  font-family: Arial, Helvetica, sans-serif;
  letter-spacing: 0;
}

button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
button { min-width: 0; overflow-wrap: anywhere; text-align: center; }

.auth-screen {
  position: relative;
  display: none;
  min-height: 100vh;
  place-items: center;
  overflow: hidden;
  padding: clamp(22px, 5vw, 64px);
  background: var(--bg);
}

.auth-screen::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(135deg, rgba(7, 22, 45, 0.92), rgba(8, 18, 35, 0.74)),
    url("assets/dispo-rocket-brand.jpeg") center / cover no-repeat;
  opacity: 1;
  pointer-events: none;
}

.auth-screen::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 48% 43%, rgba(255, 255, 255, 0.18), transparent 23%),
    radial-gradient(circle at 63% 38%, rgba(226, 37, 42, 0.28), transparent 24%),
    radial-gradient(circle at 30% 74%, rgba(29, 78, 216, 0.24), transparent 28%);
  animation: loginAmbientGlow 18s ease-in-out infinite;
  pointer-events: none;
}

body[data-auth="locked"] .auth-screen {
  display: grid;
}

body[data-auth="locked"] .app-shell {
  display: none;
}

body[data-auth="active"] .auth-screen {
  display: none;
}

.rocket-splash {
  position: fixed;
  inset: 0;
  z-index: 12000;
  display: grid;
  place-items: center;
  background:
    radial-gradient(circle at 50% 47%, rgba(255, 255, 255, 0.08), transparent 22%),
    radial-gradient(circle at 58% 42%, rgba(226, 37, 42, 0.18), transparent 26%),
    linear-gradient(145deg, #020812 0%, #07162d 50%, #01050b 100%);
  pointer-events: none;
  perspective: 1100px;
  overflow: hidden;
  animation: rocketSplashAway 3s ease forwards;
}

.rocket-splash::before,
.rocket-splash::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.rocket-splash::before {
  background:
    radial-gradient(circle at 52% 47%, rgba(255, 255, 255, 0.20), transparent 18%),
    radial-gradient(circle at 58% 46%, rgba(255, 102, 38, 0.24), transparent 20%),
    radial-gradient(circle at 42% 64%, rgba(29, 78, 216, 0.18), transparent 28%);
  mix-blend-mode: screen;
  opacity: 0;
  animation: rocketSplashLightBloom 3s cubic-bezier(.2, .82, .2, 1) forwards;
}

.rocket-splash::after {
  background:
    linear-gradient(90deg, transparent 0 39%, rgba(255,255,255,0.035) 39.2% 39.4%, transparent 39.7%),
    linear-gradient(0deg, transparent 0 45%, rgba(255,255,255,0.035) 45.1% 45.3%, transparent 45.6%);
  opacity: 0.18;
  animation: rocketSplashScreenFlash 3s ease forwards;
}

.rocket-splash-stage {
  position: relative;
  z-index: 1;
  width: min(390px, 68vw, 58vh);
  aspect-ratio: 1;
  isolation: isolate;
  overflow: visible;
  transform-style: preserve-3d;
  animation: rocketCameraPush 3s cubic-bezier(.18, .82, .22, 1) forwards;
}

.rocket-splash-logo {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 11%;
}

.rocket-splash-logo {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: block;
  filter: drop-shadow(0 30px 72px rgba(0, 0, 0, 0.48));
  backface-visibility: hidden;
}

.rocket-splash-logo-start {
  animation: rocketOriginalLogoHold 3s ease forwards;
}

.rocket-splash-logo-final {
  opacity: 0;
  animation: rocketFinalLogoResolve 3s cubic-bezier(.2, .82, .2, 1) forwards;
}

.rocket-splash-vector {
  position: absolute;
  left: 55.5%;
  top: 8.5%;
  z-index: 10;
  width: 32%;
  height: 45%;
  overflow: visible;
  transform-origin: 56% 72%;
  opacity: 0;
  transform: rotate(38deg) scale(0.78);
  filter:
    drop-shadow(0 18px 22px rgba(0, 0, 0, 0.30))
    drop-shadow(0 0 20px rgba(226, 37, 42, 0.10));
  animation: rocketVectorLaunch 3s cubic-bezier(.18, .86, .18, 1) forwards;
}

.intro-rocket-shell,
.intro-rocket-tip,
.intro-rocket-fin,
.intro-rocket-nozzle,
.intro-rocket-window {
  stroke: #061327;
  stroke-linejoin: round;
}

.intro-rocket-shell {
  fill: url(#introRocketBody);
  stroke-width: 7;
}

.intro-rocket-tip,
.intro-rocket-fin {
  fill: url(#introRocketRed);
  stroke-width: 6;
}

.intro-rocket-nozzle {
  fill: #d1d8dd;
  stroke-width: 6;
}

.intro-rocket-window {
  fill: #07162d;
  stroke: #e2252a;
  stroke-width: 9;
}

.intro-rocket-window-shine {
  fill: rgba(255, 255, 255, 0.82);
}

.intro-rocket-line {
  fill: none;
  stroke: #e2252a;
  stroke-linecap: round;
}

.intro-rocket-line-main {
  stroke-width: 12;
}

.intro-rocket-line-sub {
  stroke-width: 6;
  opacity: 0.72;
}

.intro-rocket-flame {
  fill: url(#introRocketFlame);
  opacity: 0;
  transform-origin: 50% 78%;
  animation: introRocketFlamePulse 3s ease forwards;
}

.intro-rocket-flame-soft {
  opacity: 0;
  filter: blur(1px);
}

.rocket-splash-vector .intro-rocket-body {
  transform-origin: 50% 50%;
  animation: introRocketBodyHum 3s ease forwards;
}

.rocket-screen-impact,
.rocket-screen-fragments,
.rocket-ignite-core,
.rocket-ignite-sparks,
.rocket-launch-trail,
.rocket-return-arc,
.rocket-logo-glint {
  position: absolute;
  pointer-events: none;
  z-index: 8;
}

.rocket-screen-impact {
  left: 66%;
  top: 28%;
  width: 26%;
  height: 24%;
  border-radius: 50%;
  background:
    radial-gradient(circle at 52% 52%, rgba(255,255,255,0.86) 0 3%, rgba(255,172,62,0.36) 10%, transparent 30%),
    radial-gradient(circle at 50% 50%, transparent 0 45%, rgba(255, 255, 255, 0.78) 47% 48%, transparent 50%),
    radial-gradient(circle at 50% 50%, transparent 0 62%, rgba(226, 37, 42, 0.48) 64% 65%, transparent 68%);
  filter: blur(0.8px) drop-shadow(0 0 22px rgba(255, 123, 34, 0.48));
  transform: translate(-50%, -50%) scale(0.18) rotate(-18deg);
  opacity: 0;
  animation: rocketScreenImpact 3s ease forwards;
}

.rocket-screen-fragments {
  left: 66%;
  top: 38%;
  width: 10px;
  height: 10px;
  border-radius: 999px;
  color: rgba(255, 255, 255, 0.92);
  box-shadow:
    -18px 8px 0 0 currentColor,
    16px -24px 0 0 rgba(255, 126, 48, 0.82),
    42px -10px 0 1px rgba(255, 255, 255, 0.74),
    58px 18px 0 0 rgba(226, 37, 42, 0.72),
    -6px 42px 0 0 rgba(255, 167, 58, 0.72),
    32px 48px 0 0 rgba(255, 255, 255, 0.50);
  opacity: 0;
  transform: scale(0.15);
  animation: rocketFragmentsBurst 3s ease forwards;
}

.rocket-ignite-core {
  left: 50%;
  top: 50%;
  width: 24%;
  height: 13%;
  border-radius: 999px;
  background:
    radial-gradient(circle at 18% 50%, rgba(255,255,255,0.96) 0 12%, rgba(255,228,101,0.9) 20%, rgba(255,88,34,0.78) 46%, transparent 75%);
  filter: blur(4px) drop-shadow(0 0 32px rgba(255, 96, 28, 0.88));
  transform: rotate(132deg) scale(0.18);
  opacity: 0;
  animation: rocketIgnition 3s cubic-bezier(.2, .82, .2, 1) forwards;
}

.rocket-ignite-sparks {
  left: 50%;
  top: 50%;
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: rgba(255, 244, 169, 0.96);
  opacity: 0;
  filter: drop-shadow(0 0 12px rgba(255, 106, 35, 0.88));
}

.rocket-ignite-sparks-a {
  box-shadow:
    -34px 10px 0 0 rgba(255,255,255,0.95),
    -66px 27px 0 1px rgba(255,132,34,0.94),
    -44px 58px 0 0 rgba(255,199,65,0.88),
    16px -28px 0 0 rgba(255,255,255,0.72),
    44px -7px 0 1px rgba(226,37,42,0.84);
  animation: rocketSparksA 3s ease forwards;
}

.rocket-ignite-sparks-b {
  box-shadow:
    -19px 42px 0 0 rgba(255,255,255,0.82),
    -86px 61px 0 1px rgba(255,94,31,0.82),
    -112px 20px 0 0 rgba(255,214,87,0.70),
    22px 35px 0 1px rgba(226,37,42,0.70),
    78px 18px 0 0 rgba(255,255,255,0.56);
  animation: rocketSparksB 3s ease forwards;
}

.rocket-launch-trail {
  left: -7%;
  top: 43%;
  width: 78%;
  height: 22%;
  border-radius: 999px;
  background:
    linear-gradient(94deg, transparent 0%, rgba(226,37,42,0.05) 16%, rgba(226,37,42,0.74) 44%, rgba(255,111,37,0.88) 62%, rgba(255,245,176,0.86) 78%, transparent 100%);
  filter: blur(10px) drop-shadow(0 0 32px rgba(255, 72, 30, 0.58));
  transform: rotate(-31deg) scaleX(0.16);
  transform-origin: 100% 50%;
  opacity: 0;
  animation: rocketLaunchTrail 3s cubic-bezier(.2, .82, .2, 1) forwards;
}

.rocket-return-arc {
  inset: 8%;
  border-radius: 50%;
  border: 0 solid transparent;
  border-top: 8px solid rgba(255, 255, 255, 0.86);
  border-right: 7px solid rgba(226, 37, 42, 0.76);
  filter: blur(0.6px) drop-shadow(0 0 18px rgba(226, 37, 42, 0.38));
  opacity: 0;
  transform: scale(0.72) rotate(-28deg);
  animation: rocketArcResolve 3s cubic-bezier(.2, .82, .2, 1) forwards;
}

.rocket-logo-glint {
  inset: -12%;
  z-index: 12;
  border-radius: 12%;
  background: linear-gradient(112deg, transparent 24%, rgba(255,255,255,0.0) 40%, rgba(255,255,255,0.86) 48%, rgba(255,255,255,0.04) 55%, transparent 68%);
  mix-blend-mode: screen;
  opacity: 0;
  transform: translateX(-78%) skewX(-10deg);
  animation: rocketLogoGlint 3s ease forwards;
}

.login-card {
  position: relative;
  z-index: 2;
  width: min(460px, 100%);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.34);
  border-radius: 20px;
  padding: 28px;
  background:
    linear-gradient(145deg, rgba(8, 22, 45, 0.56), rgba(8, 18, 35, 0.34)),
    radial-gradient(circle at 18% 0%, rgba(255, 255, 255, 0.16), transparent 34%);
  box-shadow:
    0 28px 70px rgba(0, 0, 0, 0.34),
    0 0 54px rgba(226, 37, 42, 0.18),
    0 0 76px rgba(29, 78, 216, 0.16),
    inset 0 1px 0 rgba(255, 255, 255, 0.72),
    inset 0 -1px 0 rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(30px) saturate(185%);
  -webkit-backdrop-filter: blur(30px) saturate(185%);
}

.login-card {
  display: grid;
  gap: 16px;
}

.login-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(120deg, rgba(255, 255, 255, 0.30), rgba(255, 255, 255, 0.08) 38%, rgba(255, 255, 255, 0.02) 62%),
    radial-gradient(circle at 16% 0%, rgba(255, 255, 255, 0.36), transparent 34%);
  pointer-events: none;
}

.login-card::after {
  content: "";
  position: absolute;
  inset: -20px;
  border-radius: 22px;
  padding: 20px;
  background:
    conic-gradient(from 0deg,
      transparent 0deg,
      rgba(226, 37, 42, 0.46) 34deg,
      transparent 78deg,
      rgba(255, 255, 255, 0.22) 126deg,
      transparent 176deg,
      rgba(226, 37, 42, 0.34) 224deg,
      transparent 306deg,
      transparent 360deg);
  filter: drop-shadow(0 0 18px rgba(226, 37, 42, 0.38)) drop-shadow(0 0 38px rgba(255, 255, 255, 0.12));
  mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  mask-composite: exclude;
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  animation: loginRedWaver 16s ease-in-out infinite;
  pointer-events: none;
}

.login-card > * {
  position: relative;
  z-index: 1;
}

.login-error {
  margin: 0;
  border: 1px solid #fecaca;
  border-radius: 8px;
  padding: 10px 12px;
  background: #fee2e2;
  color: var(--red);
  font-size: 13px;
  font-weight: 800;
}

.login-brand {
  display: grid;
  grid-template-columns: 82px 1fr;
  align-items: center;
  gap: 16px;
  margin-bottom: 4px;
}

.rocket-brand-mark {
  position: relative;
  width: 82px;
  height: 82px;
  isolation: isolate;
  overflow: hidden;
  border-radius: 16px;
  filter: drop-shadow(0 10px 22px rgba(20, 33, 31, 0.18));
}

.rocket-brand-hvo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border-radius: 16px;
  object-fit: cover;
}

.rocket-brand-ship {
  display: none;
}

.login-brand h1 {
  margin-bottom: 4px;
  font-size: 25px;
  color: #ffffff;
}

.login-brand p {
  margin: 0;
  color: rgba(255, 255, 255, 0.78);
  line-height: 1.45;
}

.login-card label,
.login-card .eyebrow {
  color: rgba(255, 255, 255, 0.82);
}

.login-actions {
  display: grid;
  gap: 10px;
}

.welcome-clock {
  position: absolute;
  top: 22px;
  left: 22px;
  z-index: 2;
  max-width: calc(100vw - 44px);
  border: 1px solid rgba(255, 255, 255, 0.52);
  border-radius: 8px;
  padding: 10px 14px;
  background: rgba(18, 33, 31, 0.66);
  color: #ffffff;
  font-size: clamp(15px, 2vw, 22px);
  font-weight: 900;
  line-height: 1.25;
  box-shadow: 0 12px 32px rgba(18, 33, 31, 0.22);
}

body.dispo-alert-notruf::after,
body.dispo-alert-sprechwunsch::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 9999;
  pointer-events: none;
  border: 14px solid var(--alert-color);
  box-shadow:
    inset 0 0 0 10px rgba(255, 255, 255, 0.32),
    inset 0 0 42px var(--alert-color),
    0 0 34px var(--alert-color);
  animation: screenAlertPulse 0.72s ease-in-out infinite;
}

body.dispo-alert-notruf { --alert-color: #dc2626; }
body.dispo-alert-sprechwunsch { --alert-color: #facc15; }

.dispo-alert-panel {
  position: fixed;
  top: 22px;
  left: 50%;
  z-index: 10001;
  display: none;
  grid-template-columns: auto minmax(160px, 1fr) auto;
  align-items: center;
  gap: 14px;
  width: min(760px, calc(100vw - 44px));
  transform: translateX(-50%);
  border: 3px solid var(--alert-color);
  border-radius: 8px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 18px 48px rgba(18, 33, 31, 0.28);
}

body.dispo-alert-notruf .dispo-alert-panel,
body.dispo-alert-sprechwunsch .dispo-alert-panel {
  display: grid;
}

.dispo-alert-panel strong {
  color: var(--alert-color);
  font-size: 22px;
  line-height: 1.1;
}

.dispo-alert-panel span {
  color: var(--ink);
  font-size: 15px;
  font-weight: 900;
}

@keyframes screenAlertPulse {
  0%, 100% { opacity: 0.45; }
  50% { opacity: 1; }
}

@keyframes loginAmbientGlow {
  0%, 100% {
    opacity: 0.82;
    transform: scale(1);
  }
  50% {
    opacity: 1;
    transform: scale(1.018);
  }
}

@keyframes loginRedWaver {
  0% {
    opacity: 0.48;
    transform: rotate(0deg) scale(1);
  }
  42% {
    opacity: 0.62;
    transform: rotate(146deg) scale(1.01);
  }
  68% {
    opacity: 0.52;
    transform: rotate(244deg) scale(1.006);
  }
  100% {
    opacity: 0.48;
    transform: rotate(360deg) scale(1);
  }
}

@keyframes rocketSplashAway {
  0%, 92% {
    opacity: 1;
    visibility: visible;
  }
  100% {
    opacity: 0;
    visibility: hidden;
  }
}

@keyframes rocketAmbientPulse {
  0%, 100% {
    opacity: 0.42;
    transform: scale(1);
  }
  34%, 72% {
    opacity: 0.82;
    transform: scale(1.045);
  }
  86% {
    opacity: 0.56;
    transform: scale(1.015);
  }
}

@keyframes motionRingMorph {
  0%, 12% {
    opacity: 1;
    stroke-dashoffset: 0;
    transform: scale(1) rotate(0deg);
    filter: blur(0);
  }
  28% {
    opacity: 0.82;
    stroke-dashoffset: 310;
    transform: scale(0.92) rotate(-24deg);
    filter: blur(0.6px);
  }
  43%, 70% {
    opacity: 0;
    stroke-dashoffset: 1120;
    transform: scale(0.56) rotate(-58deg) translate(34px, -24px);
    filter: blur(2px);
  }
  84% {
    opacity: 0.82;
    stroke-dashoffset: 340;
    transform: scale(0.92) rotate(18deg);
    filter: blur(0.5px);
  }
  96%, 100% {
    opacity: 1;
    stroke-dashoffset: 0;
    transform: scale(1) rotate(0deg);
    filter: blur(0);
  }
}

@keyframes motionSwooshA {
  0%, 14%, 90%, 100% {
    opacity: 0;
    stroke-dashoffset: 480;
    transform: translate(0, 0) rotate(0deg);
  }
  28% {
    opacity: 0.92;
    stroke-dashoffset: 80;
    transform: translate(2px, -4px) rotate(-8deg);
  }
  48%, 70% {
    opacity: 0.8;
    stroke-dashoffset: 0;
    transform: translate(24px, -42px) rotate(-18deg) scale(1.08);
  }
  82% {
    opacity: 0.74;
    stroke-dashoffset: 90;
    transform: translate(-4px, 4px) rotate(7deg);
  }
}

@keyframes motionSwooshB {
  0%, 18%, 88%, 100% {
    opacity: 0;
    stroke-dashoffset: 480;
    transform: translate(0, 0);
  }
  33% {
    opacity: 0.66;
    stroke-dashoffset: 90;
    transform: translate(-8px, 8px) rotate(-8deg);
  }
  56%, 70% {
    opacity: 0.58;
    stroke-dashoffset: 0;
    transform: translate(14px, -34px) rotate(-15deg) scale(1.08);
  }
  82% {
    opacity: 0.52;
    stroke-dashoffset: 110;
    transform: translate(3px, -2px) rotate(5deg);
  }
}

@keyframes motionMapBody {
  0%, 16%, 86%, 100% {
    opacity: 0;
    transform: scale(0.96) rotate(0deg);
    filter: blur(0);
  }
  30% {
    opacity: 0.62;
    transform: scale(0.88) rotate(-7deg) translate(12px, -4px);
    filter: blur(0.6px);
  }
  43%, 58% {
    opacity: 0.48;
    transform: scale(0.52, 1.22) rotate(-19deg) translate(70px, -22px);
    filter: blur(1.4px);
  }
  76% {
    opacity: 0.42;
    transform: scale(0.78) rotate(8deg) translate(-8px, 8px);
    filter: blur(1px);
  }
}

@keyframes motionFlameLine {
  0%, 40%, 82%, 100% {
    opacity: 0;
    stroke-dashoffset: 220;
    transform: translate(0, 0) scale(0.8);
  }
  55%, 70% {
    opacity: 0.74;
    stroke-dashoffset: 0;
    transform: translate(6px, -12px) rotate(-10deg) scale(1.18);
  }
}

@keyframes rocketMorphRing {
  0%, 15%, 86%, 100% {
    opacity: 0;
    transform: scale(0.72) rotate(0deg);
  }
  30%, 73% {
    opacity: 0.74;
    transform: scale(1.08) rotate(210deg);
  }
  43%, 58% {
    opacity: 0.38;
    transform: scale(0.86) rotate(318deg);
  }
}

@keyframes rocketSplashSky {
  0%, 42%, 80%, 100% {
    opacity: 0;
    transform: scale(0.82) translateY(16px);
  }
  50%, 72% {
    opacity: 1;
    transform: scale(1.12) translateY(0);
  }
  76% {
    opacity: 0.62;
    transform: scale(1.03) translateY(6px);
  }
}

@keyframes rocketMorphFlame {
  0%, 38%, 78%, 100% {
    opacity: 0;
    transform: translate(18px, 12px) rotate(-31deg) scale(0.25);
  }
  55%, 72% {
    opacity: 0.86;
    transform: translate(-16px, 12px) rotate(-36deg) scale(1.34);
  }
  76% {
    opacity: 0.42;
    transform: translate(-22px, 20px) rotate(-36deg) scale(0.9);
  }
}

@keyframes rocketSplashHvo {
  0%, 14% {
    opacity: 1;
    clip-path: inset(0% round 44px);
    filter: blur(0) saturate(1);
    transform: scale(1) rotate(0deg) translate(0, 0);
  }
  30% {
    opacity: 0.88;
    clip-path: inset(24% 18% 18% 24% round 26px);
    filter: blur(2px) saturate(1.25);
    transform: scale(0.9) rotate(-6deg) translate(-2px, 2px);
  }
  40%, 72% {
    opacity: 0;
    clip-path: inset(50% 42% 38% 50% round 18px);
    filter: blur(9px) saturate(1.45);
    transform: scale(0.36) rotate(-24deg) translate(-22px, 18px);
  }
  82% {
    opacity: 0.9;
    clip-path: inset(20% 24% 24% 18% round 26px);
    filter: blur(2px) saturate(1.18);
    transform: scale(0.92) rotate(5deg) translate(2px, -2px);
  }
  94%, 100% {
    opacity: 1;
    clip-path: inset(0% round 44px);
    filter: blur(0) saturate(1);
    transform: scale(1) rotate(0deg) translate(0, 0);
  }
}

@keyframes rocketSplashShip {
  0%, 28% {
    opacity: 0;
    clip-path: circle(0% at 59% 42%);
    filter: blur(10px) saturate(1.3);
    transform: translate(26px, 28px) scale(0.38) rotate(26deg);
  }
  38% {
    opacity: 0.62;
    clip-path: circle(44% at 54% 48%);
    filter: blur(3px) saturate(1.16);
    transform: translate(8px, 8px) scale(0.92) rotate(8deg);
  }
  46%, 58% {
    opacity: 1;
    clip-path: circle(82% at 50% 50%);
    filter: blur(0) saturate(1);
    transform: translate(0, -12px) scale(1.35) rotate(-5deg);
  }
  62%, 70% {
    opacity: 1;
    clip-path: circle(86% at 50% 50%);
    filter: blur(0) saturate(1.06);
    transform: translate(30px, -106px) scale(1.72) rotate(-13deg);
  }
  78% {
    opacity: 0.36;
    clip-path: circle(38% at 47% 53%);
    filter: blur(4px) saturate(1.2);
    transform: translate(-8px, 10px) scale(0.74) rotate(-14deg);
  }
  88%, 100% {
    opacity: 0;
    clip-path: circle(0% at 47% 53%);
    filter: blur(10px) saturate(1.25);
    transform: translate(-18px, 22px) scale(0.34) rotate(-22deg);
  }
}

@keyframes rocketBrandRing {
  0%, 22%, 78%, 100% {
    opacity: 0;
    transform: scale(0.75) rotate(0deg);
  }
  36%, 64% {
    opacity: 0.62;
    transform: scale(1.08) rotate(220deg);
  }
  49%, 56% {
    opacity: 0.32;
    transform: scale(0.86) rotate(320deg);
  }
}

@keyframes rocketBrandFlame {
  0%, 31%, 69%, 100% {
    opacity: 0;
    transform: translate(10px, 7px) rotate(-31deg) scale(0.24);
  }
  45%, 58% {
    opacity: 0.6;
    transform: translate(-2px, -2px) rotate(-31deg) scale(0.92);
  }
}

@keyframes rocketBrandHvo {
  0%, 24%, 80%, 100% {
    opacity: 1;
    clip-path: inset(0% round 16px);
    filter: blur(0) saturate(1);
    transform: scale(1) rotate(0deg);
  }
  37% {
    opacity: 0.86;
    clip-path: inset(24% 18% 18% 24% round 12px);
    filter: blur(1.5px) saturate(1.2);
    transform: scale(0.9) rotate(-5deg);
  }
  47%, 60% {
    opacity: 0;
    clip-path: inset(50% 42% 38% 50% round 8px);
    filter: blur(6px) saturate(1.35);
    transform: scale(0.44) rotate(-18deg) translate(-8px, 7px);
  }
  72% {
    opacity: 0.9;
    clip-path: inset(20% 24% 24% 18% round 12px);
    filter: blur(1.5px) saturate(1.16);
    transform: scale(0.91) rotate(4deg);
  }
}

@keyframes rocketBrandShip {
  0%, 25% {
    opacity: 0;
    clip-path: circle(0% at 59% 42%);
    filter: blur(7px) saturate(1.25);
    transform: translate(12px, 12px) scale(0.42) rotate(22deg);
  }
  39% {
    opacity: 0.62;
    clip-path: circle(44% at 54% 48%);
    filter: blur(2px) saturate(1.12);
    transform: translate(4px, 4px) scale(0.9) rotate(7deg);
  }
  48%, 60% {
    opacity: 1;
    clip-path: circle(82% at 50% 50%);
    filter: blur(0) saturate(1);
    transform: translate(0, -8px) scale(1.22) rotate(-5deg);
  }
  73% {
    opacity: 0.58;
    clip-path: circle(38% at 47% 53%);
    filter: blur(3px) saturate(1.16);
    transform: translate(-5px, 5px) scale(0.9) rotate(-12deg);
  }
  83%, 100% {
    opacity: 0;
    clip-path: circle(0% at 47% 53%);
    filter: blur(7px) saturate(1.24);
    transform: translate(-10px, 10px) scale(0.36) rotate(-20deg);
  }
}

@keyframes rocketSplashAway {
  0%, 96% {
    opacity: 1;
    visibility: visible;
  }
  100% {
    opacity: 0;
    visibility: hidden;
  }
}

@keyframes rocketSplashLightBloom {
  0%, 9%, 79%, 100% {
    opacity: 0.18;
    transform: scale(1);
  }
  21% {
    opacity: 0.46;
    transform: scale(1.02);
  }
  39% {
    opacity: 0.92;
    transform: scale(1.13);
  }
  57% {
    opacity: 0.34;
    transform: scale(1.04);
  }
}

@keyframes rocketSplashScreenFlash {
  0%, 27%, 47%, 100% {
    opacity: 0.10;
  }
  35% {
    opacity: 0.52;
  }
  39% {
    opacity: 0.18;
  }
}

@keyframes rocketCameraPush {
  0%, 16% {
    transform: translate3d(0, 0, 0) scale(0.96) rotateX(0deg);
  }
  30% {
    transform: translate3d(0, 0, 36px) scale(1.015) rotateX(0deg);
  }
  36% {
    transform: translate3d(-4px, 2px, 64px) scale(1.035) rotateZ(-0.7deg);
  }
  39% {
    transform: translate3d(5px, -3px, 92px) scale(1.055) rotateZ(0.8deg);
  }
  43% {
    transform: translate3d(-2px, 2px, 38px) scale(1.02) rotateZ(-0.25deg);
  }
  70%, 100% {
    transform: translate3d(0, 0, 0) scale(1) rotateZ(0deg);
  }
}

@keyframes rocketOriginalLogoHold {
  0%, 17% {
    opacity: 1;
    transform: scale(1);
    filter: drop-shadow(0 30px 72px rgba(0, 0, 0, 0.48)) brightness(1);
  }
  28% {
    opacity: 0.94;
    transform: scale(1.006);
    filter: drop-shadow(0 30px 72px rgba(0, 0, 0, 0.48)) brightness(1.12);
  }
  43% {
    opacity: 0.38;
    transform: scale(1.018);
    filter: drop-shadow(0 30px 72px rgba(0, 0, 0, 0.48)) brightness(0.78) blur(1.4px);
  }
  63%, 100% {
    opacity: 0;
    transform: scale(0.985);
    filter: drop-shadow(0 30px 72px rgba(0, 0, 0, 0.48)) brightness(0.9) blur(2px);
  }
}

@keyframes rocketFinalLogoResolve {
  0%, 58% {
    opacity: 0;
    transform: scale(0.982);
    filter: drop-shadow(0 30px 72px rgba(0, 0, 0, 0.48)) brightness(0.72) blur(3px);
  }
  72% {
    opacity: 0.72;
    transform: scale(0.996);
    filter: drop-shadow(0 30px 72px rgba(0, 0, 0, 0.48)) brightness(1.08) blur(0.8px);
  }
  82%, 100% {
    opacity: 1;
    transform: scale(1);
    filter: drop-shadow(0 30px 72px rgba(0, 0, 0, 0.48)) brightness(1) blur(0);
  }
}

@keyframes rocketVectorLaunch {
  0%, 8% {
    opacity: 0;
    transform: rotate(38deg) translate3d(0, 0, 0) scale(0.76);
    filter:
      drop-shadow(0 18px 22px rgba(0, 0, 0, 0.30))
      drop-shadow(0 0 20px rgba(226, 37, 42, 0.10));
  }
  13% {
    opacity: 0.18;
    transform: rotate(38deg) translate3d(0, 0, 0) scale(0.76);
  }
  18%, 27% {
    opacity: 1;
    transform: rotate(38deg) translate3d(0, 0, 18px) scale(0.78);
    filter:
      drop-shadow(0 18px 22px rgba(0, 0, 0, 0.30))
      drop-shadow(0 0 26px rgba(255, 89, 34, 0.28));
  }
  34% {
    opacity: 1;
    transform: rotate(38deg) translate3d(2.2vw, -3.2vh, 140px) scale(1.18);
    filter:
      drop-shadow(0 22px 28px rgba(0, 0, 0, 0.34))
      drop-shadow(0 0 34px rgba(255, 96, 30, 0.42));
  }
  42% {
    opacity: 0.98;
    transform: rotate(38deg) translate3d(12vw, -16vh, 520px) scale(2.45);
    filter:
      drop-shadow(0 34px 42px rgba(0, 0, 0, 0.44))
      drop-shadow(0 0 58px rgba(255, 77, 30, 0.62))
      blur(0.25px);
  }
  51% {
    opacity: 0.42;
    transform: rotate(38deg) translate3d(35vw, -45vh, 1120px) scale(5.25);
    filter:
      drop-shadow(0 34px 48px rgba(0, 0, 0, 0.42))
      drop-shadow(0 0 54px rgba(255, 77, 30, 0.50))
      blur(1.2px);
  }
  60%, 100% {
    opacity: 0;
    transform: rotate(38deg) translate3d(58vw, -72vh, 1450px) scale(7.4);
    filter:
      drop-shadow(0 34px 48px rgba(0, 0, 0, 0.42))
      drop-shadow(0 0 54px rgba(255, 77, 30, 0.50))
      blur(2.4px);
  }
}

@keyframes introRocketBodyHum {
  0%, 15%, 100% {
    transform: translate(0, 0);
  }
  19% {
    transform: translate(-1px, 1px);
  }
  23% {
    transform: translate(1px, -1px);
  }
  28% {
    transform: translate(-0.5px, 0.5px);
  }
}

@keyframes introRocketFlamePulse {
  0%, 12%, 58%, 100% {
    opacity: 0;
    transform: scaleY(0.28);
  }
  17% {
    opacity: 0.46;
    transform: scaleY(0.72);
  }
  24% {
    opacity: 1;
    transform: scaleY(1.18);
  }
  38% {
    opacity: 0.92;
    transform: scaleY(1.86);
  }
  49% {
    opacity: 0.18;
    transform: scaleY(2.1);
  }
}

@keyframes rocketScreenImpact {
  0%, 25%, 54%, 100% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.18) rotate(-18deg);
  }
  31% {
    opacity: 0.68;
    transform: translate(-50%, -50%) scale(0.72) rotate(-12deg);
  }
  38% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1.7) rotate(4deg);
  }
  47% {
    opacity: 0.18;
    transform: translate(-50%, -50%) scale(2.6) rotate(17deg);
  }
}

@keyframes rocketFragmentsBurst {
  0%, 29%, 65%, 100% {
    opacity: 0;
    transform: translate3d(0, 0, 0) scale(0.15) rotate(0deg);
  }
  37% {
    opacity: 1;
    transform: translate3d(42px, -28px, 0) scale(1) rotate(18deg);
  }
  51% {
    opacity: 0.34;
    transform: translate3d(118px, -92px, 0) scale(1.5) rotate(44deg);
  }
}

@keyframes rocketIgnition {
  0%, 8%, 53%, 100% {
    opacity: 0;
    transform: translate(0, 0) rotate(132deg) scale(0.18);
  }
  13% {
    opacity: 0.72;
    transform: translate(2px, 0) rotate(132deg) scale(0.48);
  }
  23% {
    opacity: 1;
    transform: translate(-9px, 10px) rotate(132deg) scale(0.96);
  }
  37% {
    opacity: 0.96;
    transform: translate(-35px, 42px) rotate(132deg) scale(1.9);
  }
  46% {
    opacity: 0.24;
    transform: translate(-60px, 70px) rotate(132deg) scale(2.8);
  }
}

@keyframes rocketSparksA {
  0%, 8%, 62%, 100% {
    opacity: 0;
    transform: translate(0, 0) scale(0.35);
  }
  17% {
    opacity: 0.86;
    transform: translate(-10px, 11px) scale(0.85);
  }
  35% {
    opacity: 1;
    transform: translate(-45px, 42px) scale(1.25);
  }
  51% {
    opacity: 0.2;
    transform: translate(-104px, 93px) scale(1.8);
  }
}

@keyframes rocketSparksB {
  0%, 12%, 60%, 100% {
    opacity: 0;
    transform: translate(0, 0) scale(0.3) rotate(0deg);
  }
  22% {
    opacity: 0.78;
    transform: translate(-8px, 17px) scale(0.85) rotate(14deg);
  }
  40% {
    opacity: 0.92;
    transform: translate(-72px, 70px) scale(1.22) rotate(32deg);
  }
  54% {
    opacity: 0.16;
    transform: translate(-132px, 122px) scale(1.7) rotate(46deg);
  }
}

@keyframes rocketLaunchTrail {
  0%, 14%, 62%, 100% {
    opacity: 0;
    transform: rotate(-31deg) scaleX(0.16);
  }
  28% {
    opacity: 0.74;
    transform: rotate(-31deg) scaleX(0.58);
  }
  41% {
    opacity: 0.96;
    transform: translate(-34px, 28px) rotate(-31deg) scaleX(1.1);
  }
  53% {
    opacity: 0.38;
    transform: translate(-70px, 58px) rotate(-31deg) scaleX(1.32);
  }
}

@keyframes rocketArcResolve {
  0%, 49%, 88%, 100% {
    opacity: 0;
    transform: scale(0.72) rotate(-28deg);
  }
  62% {
    opacity: 0.82;
    transform: scale(1.04) rotate(-4deg);
  }
  78% {
    opacity: 0.48;
    transform: scale(1.01) rotate(0deg);
  }
}

@keyframes rocketLogoGlint {
  0%, 72%, 100% {
    opacity: 0;
    transform: translateX(-78%) skewX(-10deg);
  }
  80% {
    opacity: 0.56;
  }
  91% {
    opacity: 0.18;
    transform: translateX(82%) skewX(-10deg);
  }
}

.text-button,
.logout-button {
  border: 0;
  background: transparent;
  color: var(--teal-dark);
  font-weight: 800;
}

.logout-button {
  width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px;
  padding: 10px 12px;
  color: #f7fbfa;
  background: rgba(255, 255, 255, 0.06);
}

.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 8px;
  padding: 11px 14px;
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
  font-weight: 900;
}

.theme-toggle-icon {
  position: relative;
  width: 28px;
  height: 16px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.28);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.22);
}

.theme-toggle-icon::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 4px;
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: #ffffff;
  transition: transform 160ms ease, background 160ms ease;
}

body[data-theme="dark"] .theme-toggle {
  border-color: rgba(226, 37, 42, 0.38);
  background: rgba(226, 37, 42, 0.16);
}

body[data-theme="dark"] .theme-toggle-icon {
  background: rgba(226, 37, 42, 0.44);
}

body[data-theme="dark"] .theme-toggle-icon::after {
  transform: translateX(10px);
  background: #fff4f4;
}

.app-shell {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  width: 100%;
  overflow-x: hidden;
  min-height: 100vh;
}

.sidebar {
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 24px;
  background:
    radial-gradient(circle at 76% 10%, rgba(226, 37, 42, 0.20), transparent 28%),
    linear-gradient(180deg, #07162d 0%, #081225 100%);
  color: #f7fbfa;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.brand-logo {
  flex: 0 0 42px;
  display: block;
  width: 42px;
  height: 42px;
  padding: 0;
  border-radius: 10px;
  object-fit: cover;
  background: #07162d;
  border: 1px solid rgba(255, 255, 255, 0.55);
}

.brand strong {
  display: block;
  font-size: 15px;
  line-height: 1.15;
}

.brand span {
  display: block;
  color: #a8b9b5;
  font-size: 11px;
  line-height: 1.2;
}

.role-switch {
  display: grid;
  gap: 8px;
  color: #a8b9b5;
  font-size: 12px;
  font-weight: 800;
}

.role-switch select {
  width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
}

.role-switch option { color: var(--ink); }

.nav-tabs {
  display: grid;
  gap: 6px;
  overflow-y: auto;
}

.nav-tab {
  position: relative;
  border: 0;
  border-radius: 8px;
  padding: 12px 14px;
  background: transparent;
  color: #d8e5e1;
  text-align: left;
}

.nav-tab.has-unread::after {
  content: attr(data-unread);
  position: absolute;
  top: 8px;
  right: 10px;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: 999px;
  background: #e2252a;
  color: #fff;
  font-size: 12px;
  font-weight: 800;
  line-height: 20px;
  text-align: center;
  box-shadow: 0 0 0 3px rgba(226, 37, 42, 0.22);
}

.nav-tab.active, .nav-tab:hover {
  background: rgba(255, 255, 255, 0.11);
  color: #ffffff;
}

.shift-box {
  margin-top: auto;
  padding: 16px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px;
}

.eyebrow, .shift-box small {
  display: block;
  color: var(--muted);
  font-size: 12px;
}

.sidebar .eyebrow, .sidebar small { color: #a8b9b5; }

.workspace {
  min-width: 0;
  padding: 26px;
}

@media (min-width: 781px) {
  .app-shell {
    display: block;
  }

  .sidebar {
    position: fixed;
    top: 0;
    bottom: 0;
    left: -244px;
    z-index: 2000;
    width: 260px;
    transition: left 180ms ease;
    box-shadow: 20px 0 42px rgba(18, 33, 31, 0.18);
  }

  .sidebar::after {
    content: "";
    position: absolute;
    top: 0;
    right: -18px;
    width: 18px;
    height: 100%;
  }

  .sidebar:hover,
  .sidebar:focus-within {
    left: 0;
  }

  .workspace {
    padding-left: 34px;
  }
}

.topbar {
  display: flex;
  min-width: 0;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 24px;
}

h1, h2, h3, p { margin-top: 0; }
h1 { margin-bottom: 0; font-size: 28px; }
h2 { margin-bottom: 0; font-size: 20px; }
h3 { margin-bottom: 10px; }

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.global-search { width: min(320px, 28vw); }

.live-pill, .status-badge, .priority, .mission-status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border-radius: 999px;
  padding: 8px 12px;
  background: var(--surface-soft);
  color: var(--teal-dark);
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
}

.pulse {
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: #16a34a;
  box-shadow: 0 0 0 6px rgba(22, 163, 74, 0.15);
}

.primary-action, .secondary-action, .navigation-button {
  border: 0;
  border-radius: 8px;
  padding: 12px 16px;
  background: var(--teal);
  color: #ffffff;
  font-weight: 800;
}

.login-actions .primary-action {
  border: 1px solid rgba(255, 255, 255, 0.58);
  background: rgba(226, 37, 42, 0.20);
  color: #ffffff;
  box-shadow:
    0 0 28px rgba(226, 37, 42, 0.22),
    0 0 48px rgba(255, 255, 255, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.50);
  text-shadow: 0 1px 10px rgba(0, 0, 0, 0.28);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.login-actions .primary-action:hover,
.login-actions .primary-action:focus-visible {
  background: rgba(226, 37, 42, 0.30);
  box-shadow:
    0 0 34px rgba(255, 55, 76, 0.12),
    0 0 42px rgba(45, 135, 255, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.56);
}

.secondary-action, .navigation-button.alt {
  border: 1px solid var(--line);
  background: #ffffff;
  color: var(--ink);
}

.secondary-action.danger {
  border-color: #fecaca;
  background: #fff7f7;
  color: var(--red);
}

.navigation-button.confirm:disabled {
  background: #d8e5e1;
  color: #52615d;
  cursor: default;
}

.view { display: none; }
.view.active { display: block; }

.metrics-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}

.metric, .panel, .vehicle-card, .mission-card, .history-item, .role-card, .module-item, .table-row, .planning-column, .billing-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.metric {
  padding: 18px;
}

.metric span {
  color: var(--muted);
  font-size: 13px;
}

.metric strong {
  display: block;
  margin-top: 8px;
  font-size: 30px;
}

.metric small {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-size: 15px;
  font-weight: 900;
}

.dispatch-layout {
  display: grid;
  grid-template-columns: minmax(210px, 0.58fr) minmax(0, 2.2fr);
  gap: 18px;
  align-items: start;
}

.panel {
  min-width: 0;
  box-shadow: var(--shadow);
}

.panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 18px;
  border-bottom: 1px solid var(--line);
}

.header-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.search, .select, input, select, textarea {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 11px 12px;
  background: #ffffff;
  color: var(--ink);
}

.vehicle-list, .mission-board, .history-list, .module-list, .role-grid, .data-table, .chart-list, .billing-grid, .billing-summary {
  display: grid;
  gap: 10px;
  padding: 14px;
}

.backup-actions {
  display: grid;
  gap: 8px;
  padding: 0 14px 14px;
}

.backup-actions small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.35;
}

.system-status-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(142px, 1fr));
  gap: 10px;
  padding: 0 14px 14px;
}

.system-status-card,
.backup-row {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
}

.system-status-card {
  display: grid;
  gap: 6px;
  padding: 12px;
}

.system-status-card.ok {
  border-color: rgba(22, 163, 74, 0.28);
  background: #f0fdf4;
}

.system-status-card.warn {
  border-color: rgba(217, 119, 6, 0.3);
  background: #fffbeb;
}

.system-status-card span,
.backup-row span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.3;
}

.system-status-card strong {
  font-size: 16px;
  line-height: 1.2;
}

.backup-list {
  display: grid;
  gap: 8px;
}

.backup-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 10px;
}

.backup-row div {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.backup-row strong,
.backup-row span {
  overflow-wrap: anywhere;
}

.panel-note {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.35;
}

.server-log-list {
  display: grid;
  gap: 8px;
  max-height: 520px;
  overflow: auto;
  padding: 14px;
}

.server-log-entry {
  display: grid;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
  padding: 12px;
}

.server-log-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.server-log-head span {
  border-radius: 999px;
  background: #e8f2f0;
  color: var(--green);
  padding: 4px 8px;
  font-size: 11px;
  font-weight: 900;
}

.server-log-entry.log-warn .server-log-head span {
  background: #fff3c4;
  color: #7a5200;
}

.server-log-entry.log-error .server-log-head span {
  background: #ffe2e2;
  color: #9a1b1b;
}

.server-log-entry p {
  margin: 0;
  color: var(--ink);
  font-weight: 800;
  overflow-wrap: anywhere;
}

.server-log-entry pre {
  max-height: 220px;
  overflow: auto;
  margin: 0;
  border-radius: 8px;
  background: #0f211f;
  color: #e9fffa;
  padding: 10px;
  font: 12px/1.45 ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.live-console-panel {
  min-height: calc(100vh - 160px);
}

.live-console-toolbar {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(180px, 260px);
  gap: 12px;
  margin: 0 0 14px;
}

.live-console-list {
  display: grid;
  gap: 10px;
  max-height: calc(100vh - 300px);
  min-height: 360px;
  overflow: auto;
  padding: 4px;
}

.live-console-entry {
  display: grid;
  gap: 8px;
  border: 1px solid var(--line);
  border-left: 5px solid #1d7f72;
  border-radius: 8px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(242, 249, 247, 0.96));
  padding: 14px;
}

.live-console-entry.live-warn {
  border-left-color: #c88700;
  background: linear-gradient(135deg, rgba(255, 249, 225, 0.98), rgba(255, 255, 255, 0.96));
}

.live-console-entry.live-error {
  border-left-color: #d7262e;
  background: linear-gradient(135deg, rgba(255, 232, 232, 0.98), rgba(255, 255, 255, 0.96));
}

.live-console-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.live-console-head strong {
  display: block;
  color: var(--ink);
  font-size: 16px;
}

.live-console-head small,
.live-console-details {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.4;
}

.live-console-head span {
  flex: 0 0 auto;
  border-radius: 999px;
  background: #e8f2f0;
  color: var(--green);
  padding: 5px 9px;
  font-size: 11px;
  font-weight: 900;
}

.live-console-entry.live-warn .live-console-head span {
  background: #fff3c4;
  color: #7a5200;
}

.live-console-entry.live-error .live-console-head span {
  background: #ffe2e2;
  color: #9a1b1b;
}

.live-console-entry p {
  margin: 0;
  color: var(--ink);
  font-weight: 800;
  overflow-wrap: anywhere;
}

body[data-theme="dark"] .live-console-entry {
  border-color: #243f63;
  background: linear-gradient(135deg, rgba(10, 25, 48, 0.98), rgba(13, 35, 64, 0.96));
}

body[data-theme="dark"] .live-console-entry.live-warn {
  border-left-color: #ffcb4f;
  background: linear-gradient(135deg, rgba(57, 43, 12, 0.98), rgba(14, 31, 55, 0.96));
}

body[data-theme="dark"] .live-console-entry.live-error {
  border-left-color: #ff5961;
  background: linear-gradient(135deg, rgba(62, 17, 24, 0.98), rgba(14, 31, 55, 0.96));
}

body[data-theme="dark"] .live-console-head strong,
body[data-theme="dark"] .live-console-entry p {
  color: #f7fbff;
}

body[data-theme="dark"] .live-console-head small,
body[data-theme="dark"] .live-console-details {
  color: #b7c6d8;
}

.vehicle-card, .mission-card, .history-item, .role-card, .module-item, .table-row, .billing-card, .billing-week-card {
  padding: 14px;
}

.vehicle-card, .mission-card { display: grid; gap: 10px; }

.mission-feedback-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 14px 16px;
  border: 1px solid rgba(226, 37, 42, 0.28);
  border-left: 5px solid #e2252a;
  border-radius: 8px;
  background: linear-gradient(135deg, rgba(226, 37, 42, 0.10), rgba(255, 255, 255, 0.96));
  box-shadow: 0 12px 28px rgba(23, 33, 31, 0.08);
}

.mission-feedback-card p {
  margin: 6px 0 0;
  color: var(--muted);
  font-weight: 800;
}

.mission-feedback-inline {
  padding: 9px 11px;
  border: 1px solid rgba(226, 37, 42, 0.24);
  border-radius: 8px;
  background: rgba(226, 37, 42, 0.08);
  color: var(--ink);
}

.vehicle-completion-info {
  margin: 0;
  padding: 10px 12px;
  border-radius: 8px;
  background: rgba(23, 33, 31, 0.07);
  font-weight: 900;
}

.vehicle-completion-feedback-panel {
  position: fixed;
  top: 18px;
  right: 18px;
  z-index: 10002;
  display: grid;
  grid-template-columns: minmax(220px, 1fr) auto;
  gap: 12px;
  align-items: center;
  width: min(620px, calc(100vw - 36px));
  border: 2px solid rgba(226, 37, 42, 0.55);
  border-left: 7px solid #e2252a;
  border-radius: 8px;
  padding: 13px 14px;
  background: rgba(255, 255, 255, 0.98);
  color: var(--ink);
  box-shadow: 0 18px 46px rgba(23, 33, 31, 0.22);
}

.vehicle-completion-feedback-panel span {
  display: block;
  color: #b91c1c;
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.vehicle-completion-feedback-panel strong {
  display: block;
  margin-top: 3px;
  color: var(--ink);
  font-size: 16px;
}

.vehicle-completion-feedback-panel p {
  margin: 5px 0 0;
  color: var(--muted);
  font-weight: 800;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.vehicle-completion-feedback-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.vehicle-completion-feedback-actions button {
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px 11px;
  background: #ffffff;
  color: var(--ink);
  font-weight: 900;
}

.vehicle-completion-feedback-actions button:last-child {
  border-color: #e2252a;
  background: #e2252a;
  color: #ffffff;
}

.update-warning-panel {
  position: fixed;
  top: 16px;
  right: 16px;
  z-index: 80;
  width: min(420px, calc(100vw - 32px));
  pointer-events: none;
}

.update-warning-panel[hidden] {
  display: none;
}

.update-warning-card {
  width: 100%;
  border: 1px solid rgba(226, 37, 42, 0.34);
  border-radius: 8px;
  padding: 14px 16px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.22);
  color: var(--ink);
  pointer-events: auto;
}

.update-warning-card h2 {
  margin: 3px 0 8px;
  font-size: 18px;
}

.update-warning-card p {
  margin: 0 0 8px;
  color: var(--muted);
}

.update-warning-hint {
  font-size: 13px;
  line-height: 1.45;
}

body[data-theme="dark"] .mission-feedback-card {
  border-color: rgba(255, 80, 88, 0.38);
  border-left-color: #ff525c;
  background: linear-gradient(135deg, rgba(226, 37, 42, 0.22), rgba(11, 25, 43, 0.94));
}

body[data-theme="dark"] .mission-feedback-inline,
body[data-theme="dark"] .vehicle-completion-info {
  background: rgba(255, 255, 255, 0.07);
  border-color: rgba(255, 255, 255, 0.12);
}

body[data-theme="dark"] .vehicle-completion-feedback-panel {
  border-color: rgba(255, 91, 97, 0.62);
  border-left-color: #ff5b61;
  background: #0d1b31;
  color: #f8fbff;
  box-shadow: 0 18px 52px rgba(0, 0, 0, 0.42);
}

body[data-theme="dark"] .vehicle-completion-feedback-panel span {
  color: #ff8a8e;
}

body[data-theme="dark"] .vehicle-completion-feedback-panel strong {
  color: #f8fbff;
}

body[data-theme="dark"] .vehicle-completion-feedback-panel p {
  color: #cbd6e6;
}

body[data-theme="dark"] .vehicle-completion-feedback-actions button {
  background: #07101f;
  border-color: #334967;
  color: #f8fbff;
}

body[data-theme="dark"] .vehicle-completion-feedback-actions button:last-child {
  border-color: #ff5b61;
  background: #e2252a;
  color: #ffffff;
}

body[data-theme="dark"] .update-warning-card {
  background: #0b1728;
  border-color: rgba(255, 91, 97, 0.48);
  color: #f8fbff;
}

body[data-theme="dark"] .update-warning-card p {
  color: #cbd6e6;
}

.mission-card.mission-row-even {
  background: #ffffff;
}

.mission-card.mission-row-odd {
  background: #f7f9f8;
}

.mission-card.future-mission {
  border-style: dashed;
}

.mission-date-divider {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 14px;
  margin: 16px 0 12px;
  color: #ffffff;
  font-size: 15px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.mission-date-divider span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  border: 1px solid rgba(226, 37, 42, 0.42);
  border-radius: 999px;
  padding: 8px 18px;
  background:
    linear-gradient(135deg, rgba(226, 37, 42, 0.98), rgba(142, 18, 34, 0.96)),
    #e2252a;
  box-shadow:
    0 10px 24px rgba(226, 37, 42, 0.22),
    0 0 0 4px rgba(226, 37, 42, 0.08);
}

.mission-date-divider::before,
.mission-date-divider::after {
  content: "";
  height: 3px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(226, 37, 42, 0), rgba(226, 37, 42, 0.78));
}

.mission-date-divider::after {
  background: linear-gradient(90deg, rgba(226, 37, 42, 0.78), rgba(226, 37, 42, 0));
}

body[data-theme="dark"] .mission-date-divider span {
  border-color: rgba(255, 255, 255, 0.18);
  box-shadow:
    0 12px 30px rgba(226, 37, 42, 0.30),
    0 0 0 4px rgba(226, 37, 42, 0.14);
}

.vehicle-panel .panel-header {
  padding: 14px;
}

.vehicle-panel .panel-header h2 {
  font-size: 18px;
}

.vehicle-panel .search {
  max-width: 150px;
}

.vehicle-card.compact {
  gap: 8px;
  padding: 10px;
}

.vehicle-card.compact .call-sign {
  font-size: 16px;
}

.vehicle-card.compact .vehicle-meta {
  font-size: 12px;
}

.vehicle-card.compact .vehicle-top {
  align-items: flex-start;
}

.vehicle-card.compact .status {
  padding: 6px 8px;
  font-size: 11px;
}

.vehicle-status-stack,
.dashboard-status-line {
  display: grid;
  justify-items: end;
  gap: 4px;
}

.status-since {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  line-height: 1.1;
  white-space: nowrap;
}

.pause-line {
  color: var(--amber);
  font-weight: 900;
}

.vehicle-top, .mission-top, .table-row, .planning-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.call-sign { font-size: 18px; font-weight: 800; }

.vehicle-status-control {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.vehicle-status-control select {
  width: 100%;
}

.vehicle-meta, .mission-meta, .history-item p, .module-item p, .billing-card span {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.status {
  border-radius: 999px;
  padding: 7px 10px;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.status-badge .pause-timer {
  display: block;
  margin-top: 6px;
  color: inherit;
  font-size: 12px;
}

.status-badge .status-since {
  display: block;
  margin-top: 6px;
  color: inherit;
  font-size: 12px;
}

.status.freiaufwache, .status.frei { background: #dcfce7; color: var(--green); }
.status.einsatzangenommen, .status.ameinsatzort, .status.sprechwunsch { background: #dbeafe; color: var(--blue); }
.status.pataufgenommen, .status.amzielort { background: #fef3c7; color: var(--amber); }
.status.reinigung, .status.pause, .status.ausserdienst, .status.notruf { background: #fee2e2; color: var(--red); }

.priority.hoch { background: #fee2e2; color: var(--red); }
.priority.planbar { background: #fef3c7; color: var(--amber); }

.mission-route {
  display: grid;
  gap: 4px;
  font-weight: 800;
}

.mission-assignment {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 6px 10px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8faf9;
}

.mission-assignment span,
.mission-assignment small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.mission-assignment strong {
  color: var(--ink);
}

.mission-assignment small {
  grid-column: 2;
  font-weight: 700;
}

.mission-assignment.assigned {
  border-color: rgba(11, 42, 80, 0.25);
  background: #ecfdf5;
}

.mission-assignment.open {
  border-color: rgba(217, 119, 6, 0.28);
  background: #fffbeb;
}

.mission-compact {
  display: grid;
  grid-template-columns: 1.15fr 1fr 1fr;
  gap: 8px;
}

.mission-compact article {
  display: grid;
  gap: 4px;
  min-width: 0;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

.mission-compact span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.mission-compact strong {
  overflow-wrap: anywhere;
}

.time-chip {
  width: 100%;
  border: 0;
  padding: 0;
  background: transparent;
  color: var(--ink);
  text-align: left;
  font: inherit;
  font-weight: 900;
  overflow-wrap: anywhere;
  cursor: pointer;
}

.time-chip:hover {
  color: var(--teal);
}

.pause-timer {
  display: inline-block;
  margin-top: 4px;
  color: var(--amber);
  font-weight: 900;
  font-variant-numeric: tabular-nums;
}

.mission-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.mission-actions button, .small-button {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 9px 11px;
  background: #ffffff;
  color: var(--ink);
  font-weight: 700;
}

.small-button.danger {
  border-color: #fecaca;
  color: var(--red);
}

.mission-actions button.danger {
  border-color: #fecaca;
  color: var(--red);
}

.mission-actions button.now-alarm {
  border-color: rgba(220, 38, 38, 0.28);
  background: #fff7ed;
  color: #b91c1c;
}

.fleet-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.archived-row {
  background: #f8faf9;
  opacity: 0.78;
}

.map-canvas {
  position: relative;
  z-index: 0;
  height: 340px;
  margin: 14px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #eef6f4;
}

.dashboard-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.dashboard-clock {
  font-size: 42px;
  font-weight: 900;
  color: var(--teal-dark);
  font-variant-numeric: tabular-nums;
}

.dashboard-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 360px);
  gap: 18px;
  align-items: start;
}

.dashboard-map-panel {
  min-width: 0;
  overflow: hidden;
}

.dashboard-map {
  position: relative;
  z-index: 0;
  height: clamp(300px, calc(100vh - 400px), 480px);
  min-height: 300px;
  max-height: 480px;
  margin: 14px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #eef6f4;
}

.map-frame {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.map-canvas.leaflet-container,
.dashboard-map.leaflet-container {
  font-family: inherit;
}

.map-canvas .leaflet-control-container,
.dashboard-map .leaflet-control-container {
  position: relative;
  z-index: 20;
}

.leaflet-vehicle-icon {
  border: 0;
  background: transparent;
}

.vehicle-map-dot {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 2px solid #ffffff;
  border-radius: 999px;
  background: var(--teal);
  color: #ffffff;
  font-weight: 900;
  box-shadow: var(--shadow);
}

.vehicle-map-chip {
  display: grid;
  place-items: center;
  width: 58px;
  min-height: 30px;
  border: 2px solid rgba(255, 255, 255, 0.92);
  border-radius: 999px;
  background: rgba(11, 42, 80, 0.92);
  color: #ffffff;
  box-shadow: 0 10px 24px rgba(18, 33, 31, 0.16);
}

.vehicle-map-chip strong {
  font-size: 12px;
  line-height: 1;
  letter-spacing: 0;
}

.vehicle-map-badge {
  display: grid;
  grid-template-columns: 30px 1fr;
  align-items: center;
  gap: 8px;
  min-width: 165px;
  max-width: 210px;
  border: 3px solid #ffffff;
  border-radius: 8px;
  padding: 10px 12px;
  background: var(--teal);
  color: #ffffff;
  box-shadow: var(--shadow);
}

.vehicle-map-emote {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  font-size: 15px;
  line-height: 1;
}

.vehicle-map-dot small {
  margin-top: -4px;
  font-size: 9px;
  line-height: 1;
}

.vehicle-map-badge strong {
  display: block;
  font-size: 14px;
  line-height: 1.1;
}

.vehicle-map-badge small {
  display: block;
  margin-top: 2px;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.2;
}

.vehicle-map-dot.pataufgenommen,
.vehicle-map-dot.amzielort,
.vehicle-map-chip.pataufgenommen,
.vehicle-map-chip.amzielort,
.vehicle-map-badge.pataufgenommen,
.vehicle-map-badge.amzielort {
  background: var(--amber);
}

.vehicle-map-dot.pause,
.vehicle-map-dot.ausserdienst,
.vehicle-map-dot.notruf,
.vehicle-map-chip.pause,
.vehicle-map-chip.ausserdienst,
.vehicle-map-chip.notruf,
.vehicle-map-badge.pause,
.vehicle-map-badge.ausserdienst,
.vehicle-map-badge.notruf {
  background: var(--red);
}

.dashboard-marker {
  position: absolute;
  z-index: 2;
  display: grid;
  gap: 2px;
  min-width: 132px;
  max-width: 170px;
  transform: translate(-50%, -50%);
  border: 3px solid #ffffff;
  border-radius: 8px;
  padding: 10px 12px;
  background: var(--teal);
  color: #ffffff;
  box-shadow: var(--shadow);
}

.dashboard-marker span {
  font-size: 12px;
  font-weight: 800;
}

.dashboard-marker.pataufgenommen,
.dashboard-marker.amzielort {
  background: var(--amber);
}

.dashboard-marker.pause,
.dashboard-marker.ausserdienst,
.dashboard-marker.notruf {
  background: var(--red);
}

.dashboard-status-list {
  display: grid;
  gap: 10px;
  padding: 14px;
}

.dashboard-status-card {
  display: grid;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  background: #ffffff;
}

.dashboard-status-card div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.dashboard-status-card .dashboard-status-line {
  display: grid;
}

.dashboard-status-card span:not(.status),
.dashboard-status-card p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.map-pin {
  position: absolute;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 3px solid #ffffff;
  border-radius: 999px;
  background: var(--teal);
  color: #ffffff;
  font-size: 11px;
  font-weight: 900;
  box-shadow: var(--shadow);
}

.map-pin.pataufgenommen, .map-pin.amzielort { background: var(--amber); }
.map-pin.pause, .map-pin.ausserdienst, .map-pin.notruf { background: var(--red); }

.timeline {
  display: grid;
  gap: 10px;
  padding: 0 14px 14px;
}

.timeline-item {
  display: grid;
  grid-template-columns: 54px 1fr;
  gap: 10px;
  color: var(--muted);
  font-size: 13px;
}

.mobile-toolbar {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.mobile-toolbar label, .stacked-form label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.admin-vehicle-picker {
  max-width: 920px;
  margin: 0 auto 14px;
}

.admin-vehicle-picker label {
  display: grid;
  gap: 7px;
  padding: 14px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.tablet-shell {
  max-width: 920px;
  margin: 0 auto;
  border: 12px solid #1f2a28;
  border-radius: 18px;
  background: #f7fbfa;
  box-shadow: var(--shadow);
  padding: 22px;
}

.tablet-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.vehicle-crew-card {
  flex: 1 1 320px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 8px;
  max-width: 460px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  background: #ffffff;
}

.vehicle-crew-card label {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.vehicle-crew-card input {
  width: 100%;
  padding: 9px 10px;
  font-weight: 800;
}

.vehicle-crew-card small {
  grid-column: 1 / -1;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.vehicle-gps-panel {
  display: inline-grid;
  grid-template-columns: auto auto auto auto;
  align-items: center;
  justify-content: start;
  gap: 8px;
  margin-bottom: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px 10px;
  background: #ffffff;
}

.vehicle-gps-panel strong {
  display: block;
  overflow-wrap: anywhere;
  font-size: 13px;
}

.gps-symbol {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.gps-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: #94a3b8;
}

.vehicle-gps-panel.gps-ok .gps-dot {
  background: #16a34a;
  box-shadow: 0 0 0 5px rgba(22, 163, 74, 0.14);
}

.vehicle-gps-panel.gps-error .gps-dot {
  background: #dc2626;
}

.vehicle-gps-panel .secondary-action {
  width: auto;
  padding: 8px 10px;
  font-size: 12px;
}

.vehicle-gps-panel.gps-ok {
  border-color: rgba(24, 121, 78, 0.35);
  background: #f0fdf4;
}

.vehicle-gps-panel.gps-watching {
  border-color: rgba(11, 42, 80, 0.45);
  box-shadow: 0 0 0 3px rgba(11, 42, 80, 0.1);
}

.vehicle-gps-panel.gps-error {
  border-color: rgba(180, 35, 24, 0.45);
  background: #fff5f5;
}

.incoming-job {
  border: 2px solid var(--teal);
  border-radius: 8px;
  padding: 22px;
  background: #ffffff;
}

.incoming-job.attention {
  border-color: #b91c1c;
  box-shadow: 0 0 0 4px rgba(185, 28, 28, 0.14);
  animation: incomingPulse 1.2s ease-in-out infinite;
}

@keyframes incomingPulse {
  0%, 100% { box-shadow: 0 0 0 4px rgba(185, 28, 28, 0.12); }
  50% { box-shadow: 0 0 0 8px rgba(185, 28, 28, 0.22); }
}

.incoming-job h3 { margin-bottom: 10px; font-size: 26px; }

.vehicle-dispatch-messages {
  display: grid;
  gap: 12px;
  margin-top: 16px;
  border: 2px solid rgba(29, 78, 216, 0.38);
  border-radius: 8px;
  padding: 16px;
  background: #eff6ff;
}

.vehicle-dispatch-messages[hidden] {
  display: none;
}

.vehicle-dispatch-message {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  border: 1px solid rgba(29, 78, 216, 0.22);
  border-radius: 8px;
  padding: 14px;
  background: #ffffff;
  box-shadow: 0 12px 30px rgba(29, 78, 216, 0.10);
}

.vehicle-dispatch-message strong {
  display: block;
  overflow-wrap: anywhere;
  font-size: 20px;
}

.vehicle-dispatch-message small {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-weight: 800;
}

body[data-theme="dark"] .vehicle-dispatch-messages {
  background: rgba(29, 78, 216, 0.12);
  border-color: rgba(96, 165, 250, 0.42);
}

body[data-theme="dark"] .vehicle-dispatch-message {
  background: #0a1729;
  border-color: rgba(96, 165, 250, 0.38);
  color: #f8fbff;
}

body[data-theme="dark"] .vehicle-dispatch-message small {
  color: #cbd6e6;
}

.tablet-mission-details {
  display: grid;
  gap: 10px;
  margin-top: 12px;
  font-size: 16px;
}

.tablet-mission-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.tablet-mission-grid article {
  display: grid;
  gap: 4px;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
  background: #f7fbfa;
}

.tablet-mission-grid article.wide {
  grid-column: 1 / -1;
}

.tablet-mission-grid span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.tablet-mission-grid strong {
  overflow-wrap: anywhere;
  font-size: 16px;
}

.vehicle-action-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.navigation-button {
  width: 100%;
  margin-top: 12px;
  padding: 18px;
  font-size: 20px;
}

.protocol-button {
  grid-column: 1 / -1;
  margin-top: 16px;
  background: #0b2a50;
  box-shadow: 0 12px 28px rgba(11, 42, 80, 0.18);
}

.status-buttons {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 18px;
  padding-bottom: var(--safe-bottom);
}

.status-buttons button {
  min-height: 82px;
  border: 2px solid rgba(255, 255, 255, 0.10);
  border-radius: 8px;
  background: #10201f;
  color: #ffffff;
  font-size: 18px;
  font-weight: 900;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.04);
}

.status-buttons button.active {
  border-color: #ffffff;
  background: #0f8f7e;
  color: #ffffff;
  box-shadow:
    0 0 0 5px rgba(15, 143, 126, 0.24),
    0 12px 26px rgba(15, 143, 126, 0.28),
    inset 0 0 0 2px rgba(255, 255, 255, 0.26);
  transform: translateY(-1px);
}

.status-buttons button.complete-mission {
  grid-column: 1 / -1;
  border-color: #fecaca;
  background: #dc2626;
  color: #ffffff;
  box-shadow: 0 12px 26px rgba(220, 38, 38, 0.22);
}

.planning-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(220px, 1fr));
  gap: 12px;
  overflow-x: auto;
  padding: 14px;
}

.planning-column {
  display: grid;
  align-content: start;
  gap: 10px;
  padding: 12px;
  min-height: 320px;
  background: #fbfdfc;
}

.plan-item {
  display: grid;
  gap: 5px;
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 11px;
  background: #ffffff;
  text-align: left;
}

.plan-item span, .empty-state { color: var(--muted); font-size: 13px; }

.map-empty {
  position: absolute;
  z-index: 500;
  inset: 50% auto auto 50%;
  width: min(280px, calc(100% - 28px));
  transform: translate(-50%, -50%);
  pointer-events: none;
}

.clinic-layout, .stats-grid, .settings-grid, .admin-grid, .route-planner-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}

.wide-panel { grid-column: 1 / -1; }

.stacked-form {
  display: grid;
  gap: 12px;
  padding: 14px;
}

.route-map-panel {
  min-height: 640px;
}

.route-planner-map {
  position: relative;
  min-height: 560px;
  height: min(68vh, 720px);
  margin: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background: #e8f2f0;
}

.route-result {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  min-height: 48px;
}

.route-result > strong,
.route-result article {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
  padding: 12px;
}

.route-result > strong {
  grid-column: 1 / -1;
}

.route-result.error > strong {
  border-color: #fecaca;
  background: #fff1f1;
  color: #991b1b;
}

.route-result article {
  display: grid;
  gap: 4px;
}

.route-result span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.billing-grid {
  grid-template-columns: repeat(4, minmax(180px, 1fr));
}

.billing-summary {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  padding-bottom: 0;
}

.kreis-export-card {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(150px, 190px) minmax(120px, 150px) auto;
  gap: 12px;
  align-items: end;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #f8fbfa;
  margin-bottom: 14px;
}

.kreis-export-card h3 {
  margin: 0;
  font-size: 18px;
}

.kreis-export-card label {
  gap: 5px;
  font-size: 12px;
}

.kreis-export-card .form-hint {
  grid-column: 1 / -1;
  margin: 0;
}

.billing-week-card {
  display: grid;
  gap: 4px;
  border-color: rgba(23, 128, 119, 0.22);
  background: #f0fdfa;
}

.billing-week-card strong {
  font-size: 18px;
}

.billing-week-card b {
  color: var(--teal-dark);
  font-size: 20px;
}

.billing-group,
.history-group {
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--card);
  padding: 10px;
  margin-bottom: 10px;
}

.billing-group summary,
.history-group summary {
  cursor: pointer;
  font-weight: 800;
  color: var(--text);
  padding: 8px;
}

.billing-card {
  display: grid;
  gap: 8px;
}

.billing-controls {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(120px, 150px);
  gap: 8px;
}

.billing-controls label {
  gap: 4px;
  font-size: 12px;
}

.billing-controls select,
.billing-controls input {
  min-height: 38px;
  padding: 8px 9px;
}

.keyword-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.billing-card b {
  color: var(--teal-dark);
  font-size: 22px;
}

.chat-layout {
  display: grid;
  grid-template-columns: minmax(220px, 0.75fr) minmax(0, 1.5fr);
  gap: 18px;
}

.chat-list-panel,
.chat-panel,
.chat-protocol-panel {
  min-height: 0;
}

.chat-protocol-panel {
  grid-column: 1 / -1;
}

.chat-start {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  padding: 14px;
  border-bottom: 1px solid var(--line);
}

.chat-conversation-list,
.chat-protocol-list {
  display: grid;
  gap: 8px;
  padding: 14px;
}

.chat-conversation {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 11px 12px;
  background: #ffffff;
  color: var(--ink);
  text-align: left;
  font-weight: 900;
}

.chat-conversation.active {
  border-color: var(--teal);
  background: var(--surface-soft);
  box-shadow: 0 0 0 3px rgba(11, 42, 80, 0.12);
}

.chat-conversation span,
.chat-retention-note,
.chat-message time,
.chat-protocol-item time {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.chat-retention-note {
  margin: 0;
  padding: 0 14px 14px;
  line-height: 1.35;
}

.chat-messages {
  display: grid;
  align-content: start;
  gap: 10px;
  min-height: 440px;
  max-height: min(58vh, 620px);
  overflow-y: auto;
  padding: 16px;
  background: #f7fbfa;
}

.chat-message {
  display: grid;
  gap: 5px;
  max-width: min(78%, 680px);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
  background: #ffffff;
}

.chat-message.own {
  justify-self: end;
  border-color: rgba(11, 42, 80, 0.35);
  background: #e9f6f3;
}

.chat-message strong,
.chat-protocol-item strong {
  color: var(--ink);
  font-size: 13px;
}

.chat-message p,
.chat-protocol-item p {
  margin: 0;
  color: var(--ink);
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.chat-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  padding: 14px;
  border-top: 1px solid var(--line);
}

.chat-form input {
  min-width: 0;
}

.chat-protocol-item {
  display: grid;
  gap: 5px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
  background: #ffffff;
}

body[data-theme="dark"] .chat-list-panel,
body[data-theme="dark"] .chat-panel,
body[data-theme="dark"] .chat-protocol-panel {
  background: #0d1b31;
  border-color: #2b405f;
}

body[data-theme="dark"] .chat-start {
  border-bottom-color: #2b405f;
}

body[data-theme="dark"] .chat-conversation {
  background: linear-gradient(135deg, #14243c, #0e1b30);
  border-color: #314765;
  color: #f8fbff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

body[data-theme="dark"] .chat-conversation:hover,
body[data-theme="dark"] .chat-conversation:focus-visible {
  border-color: rgba(255, 255, 255, 0.30);
  background: linear-gradient(135deg, #182b48, #11213a);
}

body[data-theme="dark"] .chat-conversation.active {
  border-color: #ff5b61;
  background: linear-gradient(135deg, rgba(226, 37, 42, 0.24), #13243d);
  box-shadow:
    0 0 0 2px rgba(255, 91, 97, 0.24),
    0 12px 28px rgba(0, 0, 0, 0.26);
}

body[data-theme="dark"] .chat-conversation span,
body[data-theme="dark"] .chat-retention-note,
body[data-theme="dark"] .chat-message time,
body[data-theme="dark"] .chat-protocol-item time {
  color: #c5d0e2;
}

body[data-theme="dark"] .chat-retention-note {
  color: #cbd6e8;
}

body[data-theme="dark"] .chat-message,
body[data-theme="dark"] .chat-protocol-item {
  background: #14243c;
  border-color: #314765;
  color: #f8fbff;
}

body[data-theme="dark"] .chat-message.own {
  background: rgba(226, 37, 42, 0.22);
  border-color: rgba(255, 91, 97, 0.44);
}

.chart-row {
  display: grid;
  grid-template-columns: minmax(110px, 170px) 1fr minmax(48px, auto);
  align-items: center;
  gap: 10px;
  font-size: 13px;
}

.bar {
  height: 12px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--surface-soft);
}

.bar i {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: var(--teal);
}

.history-full {
  display: grid;
  gap: 12px;
}

.history-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.history-head p {
  margin: 4px 0 0;
}

.history-detail-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.history-detail-grid div {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 9px 10px;
  background: #fbfdfc;
}

.history-detail-grid span,
.history-timeline time {
  display: block;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.history-detail-grid strong {
  display: block;
  margin-top: 3px;
  color: var(--ink);
  font-size: 13px;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.history-timeline {
  display: grid;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.history-timeline li {
  display: grid;
  grid-template-columns: 170px 1fr;
  gap: 10px;
  border-left: 3px solid var(--teal);
  padding: 7px 10px;
  background: var(--surface-soft);
}

.history-timeline span {
  font-size: 13px;
  font-weight: 800;
}

.form-grid, .detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  padding: 14px;
}

.vehicle-start-dialog {
  max-width: min(760px, calc(100vw - 24px));
}

.vehicle-check-grid {
  max-height: min(68vh, 720px);
  overflow: auto;
}

.check-issue-input {
  border-color: rgba(185, 28, 28, 0.42);
  background: #fff7f7;
}

.vehicle-check-lines {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px 14px;
  margin-top: 10px;
  color: var(--muted);
  font-size: 13px;
}

.vehicle-check-lines span {
  min-width: 0;
}

.mission-dialog .search,
.mission-dialog .select,
.mission-dialog input,
.mission-dialog select,
.mission-dialog textarea {
  min-height: 40px;
  padding: 9px 10px;
}

.mission-protocol-dialog input,
.mission-protocol-dialog select,
.mission-protocol-dialog textarea,
.mission-protocol-dialog canvas {
  scroll-margin: 120px 0 190px;
}

label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.compact-field {
  width: min(170px, 100%);
  max-width: 170px;
  justify-self: start;
}

.compact-field select {
  max-width: 132px;
}

.address-swap-row {
  display: flex;
  justify-content: center;
  padding: 0;
}

.address-swap-button {
  width: 42px;
  height: 42px;
  border-color: rgba(11, 42, 80, 0.28);
  background: #f0fdfa;
  color: var(--teal);
  font-size: 20px;
}

.keyword-field,
.vehicle-dropdown {
  position: relative;
}

.vehicle-dropdown {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

.vehicle-dropdown summary {
  min-height: 40px;
  padding: 10px 12px;
  color: var(--ink);
  cursor: pointer;
  list-style: none;
}

.vehicle-dropdown summary::-webkit-details-marker {
  display: none;
}

.vehicle-dropdown summary::after {
  content: "⌄";
  float: right;
  color: var(--muted);
}

.vehicle-dropdown[open] summary::after {
  content: "⌃";
}

.vehicle-assign-options {
  display: grid;
  max-height: 220px;
  overflow-y: auto;
  border-top: 1px solid var(--line);
  padding: 6px;
}

.vehicle-assign-option {
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  border-radius: 6px;
  padding: 8px 9px;
  color: var(--ink);
}

.vehicle-assign-option:hover {
  background: var(--surface-soft);
}

.vehicle-assign-option input {
  width: 18px;
  min-height: auto;
  height: 18px;
}

.vehicle-assign-option span {
  font-size: 13px;
  line-height: 1.25;
}

.vehicle-assign-option strong {
  margin-right: 6px;
}

textarea {
  min-height: 68px;
  resize: vertical;
}

.wide { grid-column: 1 / -1; }

.mission-dialog {
  width: min(820px, calc(100vw - 28px));
  border: 0;
  border-radius: 8px;
  padding: 0;
  box-shadow: var(--shadow);
}

.mission-protocol-dialog {
  width: min(1040px, calc(100vw - 24px));
  max-height: calc(100dvh - 20px);
  overflow: hidden;
}

.mission-protocol-dialog form {
  max-height: calc(100dvh - 20px);
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-y;
  padding-bottom: max(28px, env(safe-area-inset-bottom));
}

.protocol-fieldset {
  border: 0;
  margin: 0;
  padding: 0;
}

.protocol-section {
  border-bottom: 1px solid var(--line);
  padding: 14px 18px;
}

.protocol-section h3 {
  margin-bottom: 10px;
}

.protocol-status-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.protocol-status-grid small {
  color: var(--muted);
  font-weight: 800;
}

.protocol-conditional-field {
  display: grid;
  gap: 10px;
}

.protocol-conditional-field[hidden] {
  display: none;
}

.protocol-save-status {
  margin: 0 18px 12px;
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
  background: #f8fafc;
  color: var(--muted);
  font-weight: 900;
}

.protocol-save-status[hidden] {
  display: none;
}

.protocol-save-status[data-tone="success"] {
  border-color: rgba(20, 184, 166, 0.45);
  background: #ecfdf5;
  color: #047857;
}

.protocol-save-status[data-tone="warning"] {
  border-color: rgba(245, 158, 11, 0.45);
  background: #fffbeb;
  color: #92400e;
}

.protocol-save-status[data-tone="error"] {
  border-color: rgba(226, 37, 42, 0.45);
  background: #fef2f2;
  color: #b91c1c;
}

.protocol-signature-field {
  display: grid;
  gap: 10px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 900;
}

.protocol-signature-field canvas {
  width: 100%;
  min-height: 190px;
  border: 2px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  touch-action: none;
}

.protocol-signature-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.protocol-signature-actions button {
  min-height: 48px;
}

.protocol-audit {
  padding: 14px 18px;
  color: var(--muted);
  margin-bottom: 18px;
}

.protocol-audit ul {
  margin: 8px 0 0;
  padding-left: 18px;
}

.protocol-archive-layout {
  display: grid;
  grid-template-columns: 210px minmax(0, 1fr);
  gap: 14px;
}

.protocol-vehicle-tabs {
  display: grid;
  align-content: start;
  gap: 8px;
  border-right: 1px solid var(--line);
  padding: 12px;
}

.protocol-vehicle-tabs button {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
  background: #ffffff;
  color: var(--ink);
  text-align: left;
  font-weight: 900;
}

.protocol-vehicle-tabs button.active {
  border-color: rgba(226, 37, 42, 0.44);
  background: rgba(226, 37, 42, 0.10);
  color: var(--red);
}

.protocol-archive-list {
  display: grid;
  gap: 12px;
  padding: 12px;
}

.protocol-group {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  overflow: hidden;
}

.protocol-group summary {
  padding: 12px 14px;
  background: var(--surface-soft);
  cursor: pointer;
  font-weight: 900;
}

.protocol-card-grid {
  display: grid;
  gap: 10px;
  padding: 12px;
}

.protocol-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: #ffffff;
}

.protocol-card span,
.protocol-card small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  overflow-wrap: anywhere;
}

.protocol-card-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.mission-dialog::backdrop { background: rgba(18, 33, 31, 0.55); }

.dialog-header, .dialog-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 18px;
  border-bottom: 1px solid var(--line);
}

.dialog-actions {
  border-top: 1px solid var(--line);
  border-bottom: 0;
  justify-content: flex-end;
}

.mission-protocol-dialog .dialog-actions {
  background: #ffffff;
  padding-bottom: max(18px, env(safe-area-inset-bottom));
}

.icon-button {
  width: 40px;
  height: 40px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

body[data-theme="dark"] .mission-dialog {
  background: #0d1b31;
  border: 1px solid #253750;
  color: #f3f7fb;
}

body[data-theme="dark"] .mission-dialog form,
body[data-theme="dark"] .mission-dialog #detailContent {
  background: #0d1b31;
  color: #f3f7fb;
}

body[data-theme="dark"] .dialog-header,
body[data-theme="dark"] .dialog-actions {
  background: #0b1728;
  border-color: #253750;
  color: #f3f7fb;
}

body[data-theme="dark"] .mission-protocol-dialog .dialog-actions {
  background: #0b1728;
}

body[data-theme="dark"] .mission-dialog .eyebrow,
body[data-theme="dark"] .mission-dialog h2,
body[data-theme="dark"] .mission-dialog label,
body[data-theme="dark"] .mission-dialog .detail-grid span,
body[data-theme="dark"] .mission-dialog .vehicle-completion-info {
  color: #f3f7fb;
}

body[data-theme="dark"] .mission-dialog label {
  color: #cbd6e6;
}

body[data-theme="dark"] .mission-dialog input,
body[data-theme="dark"] .mission-dialog select,
body[data-theme="dark"] .mission-dialog textarea,
body[data-theme="dark"] .mission-dialog .vehicle-dropdown {
  background: #07101f;
  border-color: #334967;
  color: #f8fbff;
}

body[data-theme="dark"] .mission-dialog input:focus,
body[data-theme="dark"] .mission-dialog select:focus,
body[data-theme="dark"] .mission-dialog textarea:focus,
body[data-theme="dark"] .mission-dialog .vehicle-dropdown:focus-within {
  border-color: #ff5b61;
  box-shadow: 0 0 0 3px rgba(226, 37, 42, 0.22);
  outline: none;
}

body[data-theme="dark"] .mission-dialog input::placeholder,
body[data-theme="dark"] .mission-dialog textarea::placeholder {
  color: #96a6bb;
}

body[data-theme="dark"] .mission-dialog input[readonly],
body[data-theme="dark"] .mission-dialog input:disabled,
body[data-theme="dark"] .mission-dialog select:disabled,
body[data-theme="dark"] .mission-dialog textarea:disabled {
  background: #14243a;
  color: #bac7d8;
  opacity: 1;
}

body[data-theme="dark"] .protocol-section,
body[data-theme="dark"] .protocol-audit,
body[data-theme="dark"] .protocol-vehicle-tabs {
  border-color: #253750;
}

body[data-theme="dark"] .protocol-save-status {
  background: #07101f;
  border-color: #334967;
  color: #cbd6e6;
}

body[data-theme="dark"] .protocol-save-status[data-tone="success"] {
  background: rgba(20, 184, 166, 0.16);
  border-color: rgba(45, 212, 191, 0.48);
  color: #99f6e4;
}

body[data-theme="dark"] .protocol-save-status[data-tone="warning"] {
  background: rgba(245, 158, 11, 0.16);
  border-color: rgba(251, 191, 36, 0.50);
  color: #fde68a;
}

body[data-theme="dark"] .protocol-save-status[data-tone="error"] {
  background: rgba(226, 37, 42, 0.18);
  border-color: rgba(255, 91, 97, 0.55);
  color: #fecaca;
}

body[data-theme="dark"] .protocol-signature-field {
  color: #cbd6e6;
}

body[data-theme="dark"] .protocol-signature-field canvas {
  border-color: #334967;
  background: #ffffff;
}

body[data-theme="dark"] .protocol-group summary,
body[data-theme="dark"] .protocol-vehicle-tabs button {
  background: #0a1729;
  border-color: #253750;
  color: #f8fbff;
}

body[data-theme="dark"] .protocol-vehicle-tabs button.active {
  border-color: rgba(255, 91, 97, 0.55);
  background: rgba(226, 37, 42, 0.20);
  color: #ffb4b8;
}

body[data-theme="dark"] .protocol-card span,
body[data-theme="dark"] .protocol-card small,
body[data-theme="dark"] .protocol-status-grid small,
body[data-theme="dark"] .protocol-audit {
  color: #cbd6e6;
}

body[data-theme="dark"] .vehicle-dropdown summary,
body[data-theme="dark"] .vehicle-assign-option {
  color: #f8fbff;
}

body[data-theme="dark"] .vehicle-dropdown summary::after,
body[data-theme="dark"] .vehicle-assign-option span {
  color: #cbd6e6;
}

body[data-theme="dark"] .vehicle-assign-options {
  background: #07101f;
  border-color: #334967;
}

body[data-theme="dark"] .vehicle-assign-option:hover,
body[data-theme="dark"] .vehicle-assign-option:focus-within {
  background: #172942;
}

body[data-theme="dark"] .address-swap-button,
body[data-theme="dark"] .mission-dialog .icon-button {
  background: #07101f;
  border-color: #334967;
  color: #f8fbff;
}

body[data-theme="dark"] .mission-dialog .secondary-action {
  background: #07101f;
  border-color: #334967;
  color: #f8fbff;
}

body[data-theme="dark"] .mission-dialog .primary-action {
  background: #e2252a;
  border-color: #ff5b61;
  color: #ffffff;
}

body[data-theme="dark"] .check-issue-input {
  background: rgba(226, 37, 42, 0.14);
  border-color: rgba(255, 91, 97, 0.55);
  color: #f8fbff;
}

.detail-grid article {
  display: grid;
  gap: 7px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.detail-control {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.detail-control select {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  color: var(--ink);
  font: inherit;
  padding: 10px 12px;
}

.detail-grid span { color: var(--muted); font-size: 12px; }

@media (max-width: 1280px) {
  .dispatch-layout {
    grid-template-columns: minmax(210px, 0.72fr) minmax(0, 1.8fr);
  }
  .dashboard-layout,
  .clinic-layout, .stats-grid, .settings-grid, .admin-grid, .chat-layout, .route-planner-grid {
    grid-template-columns: 1fr;
  }
  .billing-grid { grid-template-columns: repeat(2, minmax(180px, 1fr)); }
  .topbar {
    align-items: stretch;
    flex-direction: column;
  }
  .topbar-actions {
    display: grid;
    grid-template-columns: minmax(220px, 1fr) auto auto;
    width: 100%;
  }
  .global-search { width: 100%; }
}

@media (max-width: 780px) {
  .live-console-toolbar {
    grid-template-columns: 1fr;
  }

  .live-console-list {
    max-height: none;
    min-height: 260px;
  }

  .live-console-head {
    display: grid;
  }

  .auth-screen {
    place-items: center;
    padding: 82px 16px 16px;
  }

  .login-card {
    padding: 24px;
  }

  .welcome-clock {
    top: 14px;
    left: 14px;
    font-size: 15px;
  }

  body.dispo-alert-notruf::after,
  body.dispo-alert-sprechwunsch::after {
    border-width: 10px;
  }

  .dispo-alert-panel {
    top: 12px;
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .vehicle-completion-feedback-panel {
    top: 12px;
    right: 12px;
    left: 12px;
    grid-template-columns: 1fr;
    width: auto;
  }

  .vehicle-completion-feedback-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .login-brand {
    grid-template-columns: 1fr;
    justify-items: center;
    text-align: center;
  }

  .rocket-brand-mark {
    width: 92px;
    height: 92px;
  }

  .app-shell {
    display: block;
    width: 100vw;
  }

  .sidebar {
    position: sticky;
    top: 0;
    z-index: 10;
    width: 100vw;
    padding: calc(12px + var(--safe-top)) 12px 12px;
    gap: 10px;
  }

  .brand-logo {
    width: 28px;
    height: 28px;
    flex-basis: 28px;
  }

  .role-switch, .shift-box { display: none; }

  .nav-tabs {
    display: flex;
    overflow-x: auto;
    padding-bottom: 2px;
  }

  .nav-tab {
    flex: 0 0 auto;
    white-space: nowrap;
    padding: 10px 12px;
  }

  .workspace {
    width: 100vw;
    padding: 14px;
  }
  .workspace, .tablet-shell, .incoming-job {
    max-width: 100%;
    overflow-x: hidden;
  }

  .topbar, .panel-header, .tablet-header, .mobile-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .topbar-actions, .vehicle-action-grid {
    display: grid;
    grid-template-columns: 1fr;
    width: 100%;
    max-width: 100%;
    overflow: hidden;
  }

  .topbar-actions > *,
  .primary-action,
  .secondary-action,
  .navigation-button {
    width: 100%;
  }

  .live-pill {
    justify-content: center;
  }

  body[data-view="vehicle"] .topbar-actions {
    display: none;
  }

  body[data-view="vehicle"] .workspace {
    padding-bottom: max(92px, calc(22px + env(safe-area-inset-bottom)));
  }

  .global-search { width: 100%; }
  .dispatch-layout { grid-template-columns: 1fr; }
  .metrics-grid, .form-grid, .detail-grid, .status-buttons, .billing-grid, .billing-controls, .kreis-export-card, .tablet-mission-grid, .mission-compact, .history-detail-grid, .history-timeline li, .chat-layout, .chat-start, .chat-form, .protocol-status-grid { grid-template-columns: 1fr; }
  .mission-protocol-dialog {
    width: calc(100vw - 12px);
    max-height: calc(100dvh - 8px);
  }
  .mission-protocol-dialog form {
    max-height: calc(100dvh - 8px);
    padding-bottom: max(80px, env(safe-area-inset-bottom));
  }
  .mission-protocol-dialog input,
  .mission-protocol-dialog select,
  .mission-protocol-dialog textarea {
    font-size: 16px;
    min-height: 48px;
  }
  .mission-protocol-dialog textarea {
    min-height: 112px;
  }
  .protocol-section {
    padding: 12px 10px;
  }
  .protocol-section .form-grid {
    padding: 10px 0;
  }
  .protocol-signature-field canvas {
    min-height: 220px;
  }
  .protocol-signature-actions {
    display: grid;
    grid-template-columns: 1fr;
  }
  .chat-messages { min-height: 360px; max-height: 58vh; }
  .chat-message { max-width: 100%; }
  .metric strong { font-size: 24px; }
  h1 { font-size: 23px; }
  .dashboard-hero {
    align-items: stretch;
    flex-direction: column;
  }
  .dashboard-clock {
    font-size: 32px;
  }
  .dashboard-map {
    height: min(420px, 58vh);
    min-height: 300px;
    margin: 10px;
  }
  .route-map-panel {
    min-height: auto;
  }
  .route-planner-map {
    height: min(420px, 58vh);
    min-height: 300px;
    margin: 10px;
  }
  .route-result {
    grid-template-columns: 1fr;
  }
  .dashboard-marker {
    min-width: 112px;
    max-width: 132px;
    padding: 8px;
    font-size: 12px;
  }

  .tablet-shell {
    width: calc(100vw - 28px);
    max-width: calc(100vw - 28px);
    margin: 0 0 max(74px, calc(24px + env(safe-area-inset-bottom)));
    border-width: 6px;
    border-radius: 12px;
    padding: 14px;
  }

  .vehicle-crew-card {
    width: 100%;
    max-width: none;
    grid-template-columns: 1fr;
  }

  .vehicle-crew-card .small-button {
    width: 100%;
  }

  body[data-view="vehicle"] .status-buttons {
    margin-bottom: max(34px, env(safe-area-inset-bottom));
    padding-bottom: max(34px, env(safe-area-inset-bottom));
  }

  .incoming-job { padding: 16px; }
  .incoming-job h3 { font-size: 20px; }
  .vehicle-dispatch-message {
    grid-template-columns: 1fr;
  }
  .vehicle-dispatch-message .primary-action {
    width: 100%;
  }
  .protocol-archive-layout {
    grid-template-columns: 1fr;
  }
  .protocol-vehicle-tabs {
    grid-auto-flow: column;
    grid-auto-columns: max-content;
    overflow-x: auto;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }
  .protocol-status-grid,
  .protocol-card {
    grid-template-columns: 1fr;
  }
  .protocol-card-actions {
    justify-content: stretch;
  }
  .protocol-card-actions button {
    flex: 1;
  }
  .status-buttons button { min-height: 68px; font-size: 16px; }
}
