:root {
  --bg: #0f1419;
  --surface: #1a2332;
  --surface2: #243044;
  --border: #2d3a4f;
  --text: #e8edf5;
  --muted: #8b9bb4;
  --accent: #e63946;
  --accent-hover: #ff4d5a;
  --ok: #2ecc71;
  --warn: #f39c12;
  --radius: 10px;
  --font: "Segoe UI", system-ui, sans-serif;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a { color: var(--accent); }

.hidden { display: none !important; }

/* Login */
.login-page {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 1rem;
}

.login-card {
  width: 100%;
  max-width: 400px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
  text-align: center;
}

.logo {
  display: block;
  width: 64px;
  height: auto;
  margin: 0 auto 0.75rem;
}

.app-header .brand {
  font-weight: 700;
  font-size: 1rem;
  line-height: 1;
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.app-header .brand img {
  display: block;
  height: 18px;
  width: auto;
  max-height: 18px;
  object-fit: contain;
  margin: 0;
  flex-shrink: 0;
}

.logo-inline {
  display: block;
  height: 18px;
  width: auto;
  max-height: 18px;
  object-fit: contain;
  flex-shrink: 0;
}

.logo-sm {
  width: 36px;
  margin: 0;
}

.login-card h1 {
  margin: 0 0 0.25rem;
  font-size: 1.5rem;
}

.login-card p.sub {
  margin: 0 0 1.5rem;
  color: var(--muted);
  font-size: 0.9rem;
}

label {
  display: block;
  margin-bottom: 0.35rem;
  font-size: 0.85rem;
  color: var(--muted);
}

input, select, textarea {
  width: 100%;
  padding: 0.65rem 0.75rem;
  margin-bottom: 1rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--surface2);
  color: var(--text);
  font-size: 1rem;
}

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

button, .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.65rem 1rem;
  border: none;
  border-radius: 6px;
  background: var(--accent);
  color: #fff;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
}

button:hover, .btn:hover { background: var(--accent-hover); }
button.secondary { background: var(--surface2); color: var(--text); border: 1px solid var(--border); }
button.secondary:hover { background: var(--border); }
button.block { width: 100%; }

.error-msg {
  background: rgba(230, 57, 70, 0.15);
  border: 1px solid var(--accent);
  color: #ffb4bc;
  padding: 0.6rem 0.75rem;
  border-radius: 6px;
  margin-bottom: 1rem;
  font-size: 0.9rem;
}

/* App banner – eine Zeile */
.app-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.5rem 1rem;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  flex-wrap: nowrap;
  min-height: 3rem;
}

.banner-left {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-width: 0;
  flex-shrink: 1;
}

.banner-right {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-shrink: 0;
}

.app-banner .brand {
  font-weight: 700;
  font-size: 1rem;
  line-height: 1;
  display: flex;
  align-items: center;
  gap: 0.35rem;
  white-space: nowrap;
}

.app-banner .brand img,
.app-banner .logo-inline {
  display: block;
  height: 18px;
  width: auto;
  max-height: 18px;
  object-fit: contain;
  flex-shrink: 0;
}

.banner-datetime {
  display: flex;
  align-items: baseline;
  gap: 0.65rem;
  white-space: nowrap;
  padding-right: 1rem;
  margin-right: 0.25rem;
  border-right: 1px solid var(--border);
}

.banner-user-block {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--muted);
  font-size: 0.85rem;
  white-space: nowrap;
}

.banner-user-block #logout-btn {
  padding: 0.4rem 0.65rem;
  font-size: 0.8rem;
}

.banner-time {
  font-size: 1.45rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.02em;
  color: var(--text);
  line-height: 1;
}

.banner-date {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--muted);
  line-height: 1;
}

.app-banner .user-info {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--muted);
  font-size: 0.85rem;
  white-space: nowrap;
}

.app-banner .user-info #logout-btn {
  padding: 0.4rem 0.65rem;
  font-size: 0.8rem;
}

nav.tabs {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0;
  margin: 0;
  background: transparent;
  border: none;
  overflow-x: auto;
}

nav.tabs button {
  background: transparent;
  color: var(--muted);
  border: 1px solid transparent;
  white-space: nowrap;
  padding: 0.4rem 0.85rem;
  font-size: 0.9rem;
  border-radius: 6px;
}

nav.tabs button.tab-notruf.active,
nav.tabs button.tab-notruf {
  background: #c62828;
  color: #fff;
  border-color: rgba(255,255,255,0.12);
  font-weight: 700;
}

nav.tabs button.tab-notruf:hover {
  background: #d32f2f;
}

nav.tabs button.tab-bma.active {
  background: #e65100;
  color: #fff;
  border-color: rgba(255,255,255,0.12);
  font-weight: 700;
}

nav.tabs button.tab-bma:hover {
  background: rgba(230, 81, 0, 0.3);
}

.btn-link {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  padding: 0.4rem 0.65rem;
  font-size: 0.8rem;
  border-radius: 6px;
  border: 1px solid var(--border);
  color: var(--muted);
  background: var(--surface2);
}

.btn-link:hover { color: var(--text); background: var(--border); }

.notruf-collapse-btn {
  flex: 0 0 22px;
  width: 22px;
  min-width: 22px;
  border: none;
  border-right: 1px solid #2a3f5c;
  background: #1e2f47;
  color: #9fb0c8;
  cursor: pointer;
  padding: 0;
  font-size: 0.65rem;
  z-index: 2;
}

.notruf-collapse-btn:hover {
  background: #2a3f5c;
  color: #fff;
}

.split-main.notruf-collapsed .notruf-column {
  flex: 0 0 0 !important;
  max-width: 0 !important;
  min-width: 0 !important;
  overflow: hidden;
  border-right: none;
  opacity: 0;
  pointer-events: none;
}

.split-main.notruf-collapsed .notruf-collapse-btn {
  border-left: 1px solid #2a3f5c;
}

.workspace-column {
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.workspace-panel {
  flex: 1;
  min-height: 0;
  overflow: hidden;
}

.workspace-panel.hidden {
  display: none !important;
}

/* Legacy header alias */
.app-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1.25rem;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}

.app-header .user-info { color: var(--muted); font-size: 0.85rem; }

main.app-main {
  padding: 0;
  max-width: none;
  margin: 0;
  flex: 1;
  min-height: 0;
  display: flex;
}

.split-main { gap: 0; }

.notruf-column {
  flex: 0 0 16.666%;
  max-width: 16.666%;
  display: flex;
  flex-direction: column;
  min-height: 0;
  border-right: 1px solid #2a3f5c;
  background: #17263a;
}

.notruf-column-inner {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 12px 10px;
  display: flex;
  flex-direction: column;
}

.einsatz-column {
  flex: 1;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  background: #17263a;
}

.notruf-column .notruf-card {
  flex: 1;
  min-height: 0;
  margin: 0;
}

.notruf-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.notruf-card-head .icon-btn {
  background: #243652;
  border-color: #3a5275;
  color: #dce4f0;
  flex-shrink: 0;
}

.notruf-form-host {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
}

.notruf-column .notruf-actions {
  flex-shrink: 0;
  padding: 10px;
  border-top: 1px solid #2a3f5c;
  background: #17263a;
}

.panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem;
  margin-bottom: 1rem;
}

.panel h2 {
  margin: 0 0 1rem;
  font-size: 1.1rem;
}

.module-hint {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
}

.vehicle-grid {
  display: grid;
  gap: 0.75rem;
}

.vehicle-card {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.5rem 1rem;
  align-items: center;
  padding: 0.75rem;
  background: var(--surface2);
  border-radius: 8px;
  border: 1px solid var(--border);
}

.vehicle-card .meta { font-size: 0.85rem; color: var(--muted); }
.vehicle-card .status-badge {
  font-size: 1.1rem;
  font-weight: 700;
  padding: 0.25rem 0.6rem;
  border-radius: 6px;
  background: var(--border);
}

.status-picker {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.status-picker button {
  min-width: 2.2rem;
  padding: 0.4rem 0.5rem;
  font-size: 0.85rem;
  background: var(--bg);
  border: 1px solid var(--border);
}

.status-picker button.selected {
  background: var(--accent);
  border-color: var(--accent);
}

.einsatz-list { list-style: none; padding: 0; margin: 0; }
.einsatz-list li {
  padding: 0.75rem;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
}
.einsatz-list li:hover { background: var(--surface2); }
.einsatz-list li:last-child { border-bottom: none; }

.protokoll-list {
  list-style: none;
  padding: 0;
  margin: 0 0 1rem;
  max-height: 320px;
  overflow-y: auto;
}

.protokoll-list li {
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.95rem;
}

.protokoll-list .time {
  color: var(--muted);
  font-size: 0.8rem;
  margin-right: 0.5rem;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}

@media (max-width: 600px) {
  .form-row { grid-template-columns: 1fr; }
  .creator-split { grid-template-columns: 1fr; }
}

/* ── Notruf (einheitlich mit Einsatz-Panel) ── */
.notruf-panel { position: relative; }

.notruf-topbar {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  margin-bottom: 0.75rem;
  min-height: 2rem;
}

.icon-btn {
  min-width: 2rem;
  height: 2rem;
  padding: 0 0.5rem;
  font-size: 1rem;
  line-height: 1;
  background: var(--surface2);
  border: 1px solid var(--border);
  color: var(--text);
}

.icon-btn:hover { background: var(--border); }

.admin-only.hidden { display: none !important; }

.notruf-form-box,
.notruf-form-host .notruf-form-inner {
  background: transparent;
  border: none;
  border-radius: 0;
  padding: 0;
  margin: 0;
}

.notruf-column .notruf-form-head h3 {
  margin: 0 0 0.25rem;
  font-size: 1rem;
  font-weight: 800;
  color: #f0f4fa;
}

.notruf-column .notruf-subtitle {
  margin: 0 0 0.75rem;
  color: #8fa3bd;
  font-size: 0.82rem;
}

.notruf-column .notruf-page-card {
  background: #152238;
  border: 1px solid #2a3f5c;
  border-radius: 8px;
  padding: 0.75rem;
  margin-bottom: 0.75rem;
}

.notruf-column .notruf-page-badge {
  background: rgba(198, 40, 40, 0.2);
  border-color: rgba(198, 40, 40, 0.45);
  color: #ffcdd2;
}

.notruf-column .notruf-page-title { color: #f0f4fa; font-size: 0.92rem; }
.notruf-column .notruf-page-sub,
.notruf-column .notruf-page-hint { color: #8fa3bd; font-size: 0.78rem; }

.notruf-column .notruf-field-row label {
  color: #9fb0c8;
  font-size: 0.82rem;
  font-weight: 600;
}

.notruf-column .notruf-field-row input,
.notruf-column .notruf-field-row select,
.notruf-column .notruf-field-row textarea {
  background: #0f1a2b;
  border: 1px solid #2a3f5c;
  color: #e8ecf2;
  font-size: 0.85rem;
  padding: 6px 8px;
  border-radius: 6px;
  width: 100%;
  box-sizing: border-box;
}

.notruf-column .notruf-field-row {
  margin-bottom: 0.65rem;
}

.notruf-column .notruf-radio-group { display: flex; flex-direction: column; gap: 0.3rem; }

.notruf-column .notruf-page-nav {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.5rem;
}

.notruf-column .notruf-page-nav button {
  background: #243652;
  border-color: #3a5275;
  color: #dce4f0;
  font-size: 0.82rem;
  padding: 0.35rem 0.6rem;
}

.notruf-actions { margin-top: 0; }

.alarm-btn {
  background: #c62828 !important;
  font-size: 1.1rem;
  font-weight: 900;
  min-height: 3rem;
}

.alarm-btn:hover { background: #d32f2f !important; }

/* Modal / Creator */
.modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.modal.hidden { display: none !important; }

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.65);
}

.modal-panel {
  position: relative;
  z-index: 1;
  width: min(1100px, 96vw);
  max-height: 92vh;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--border);
}

.modal-header h3 { margin: 0; font-size: 1rem; }

.modal-body {
  overflow: auto;
  padding: 0.75rem;
  flex: 1;
}

.creator-split {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 1rem;
  min-height: 420px;
}

.creator-config label {
  display: block;
  margin-bottom: 0.65rem;
}

.creator-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  align-items: center;
  margin-bottom: 0.75rem;
}

.creator-row select { flex: 1; min-width: 120px; margin-bottom: 0; }

.creator-section { margin: 0.75rem 0; }

.creator-section-head {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
  align-items: center;
  margin-bottom: 0.35rem;
}

.creator-section select {
  width: 100%;
  margin-bottom: 0;
}

.creator-preview h4 { margin: 0 0 0.25rem; }

.creator-preview .notruf-form-box {
  max-height: 55vh;
  overflow: auto;
}

/* ── Einsatz-Ansicht (Desktop-Nähe) ── */
.einsatz-view {
  display: flex;
  flex-direction: column;
  gap: 12px;
  height: 100%;
  padding: 12px 14px 14px;
  overflow: hidden;
  color: #e8ecf2;
  box-sizing: border-box;
}

.einsatz-topbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.einsatz-topbar-spacer { flex: 1; }

.einsatz-body {
  display: grid;
  grid-template-columns: 1.55fr 1fr;
  gap: 12px;
  flex: 1;
  min-height: 0;
}

.einsatz-center-col {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-height: 0;
}

.einsatz-side-col {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-height: 0;
  overflow-y: auto;
}

.einsatz-list-card {
  flex: 0 0 38%;
  min-height: 140px;
}

.einsatz-center-col .einsatz-msgs-card {
  flex: 1;
  min-height: 200px;
}

.einsatz-list-compact {
  max-height: 140px;
  min-height: 60px;
}

.btn-danger {
  background: #c62828 !important;
  border-color: #b71c1c !important;
  color: #fff !important;
  font-weight: 800;
}

.btn-danger:hover:not(:disabled) { background: #d32f2f !important; }

.btn-danger:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.einsatz-upper {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  min-height: 180px;
}

.einsatz-lower {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  flex: 1;
  min-height: 280px;
}

.einsatz-lower-left {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-height: 0;
}

.einsatz-card {
  background: #1e2f47;
  border: 1px solid #2a3f5c;
  border-radius: 10px;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.einsatz-msgs-card { min-height: 0; }

.einsatz-card-title {
  font-weight: 800;
  font-size: 0.95rem;
  margin-bottom: 10px;
  color: #f0f4fa;
}

.einsatz-list {
  list-style: none;
  margin: 0;
  padding: 0;
  overflow-y: auto;
  flex: 1;
  min-height: 80px;
}

.einsatz-center-col .einsatz-list {
  max-height: none;
}

.einsatz-list li {
  padding: 8px 10px;
  border-bottom: 1px solid #2a3f5c;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-size: 0.9rem;
}

.einsatz-list li:hover { background: rgba(255,255,255,0.04); }

.einsatz-list li.selected {
  background: rgba(198, 40, 40, 0.25);
  border-left: 3px solid #c62828;
}

.einsatz-list li.empty,
.einsatz-msg-list li.empty {
  cursor: default;
  color: #8fa3bd;
  font-style: italic;
}

.einsatz-list li span { color: #b8c5d8; }
.einsatz-list li small { color: #8fa3bd; font-size: 0.78rem; }

.einsatz-info-grid {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 6px 10px;
  align-items: center;
  font-size: 0.88rem;
}

.einsatz-info-grid label { color: #9fb0c8; }
.einsatz-info-grid label.full { grid-column: 1 / -1; margin-top: 4px; }
.einsatz-info-grid .full { grid-column: 1 / -1; }

.einsatz-info-grid input,
.einsatz-info-grid select,
.einsatz-view textarea {
  width: 100%;
  box-sizing: border-box;
  background: #152238;
  border: 1px solid #2a3f5c;
  color: #e8ecf2;
  border-radius: 6px;
  padding: 6px 8px;
  font: inherit;
}

.einsatz-view textarea { resize: vertical; min-height: 72px; }

.einsatz-msg-actions {
  display: flex;
  gap: 8px;
  margin: 8px 0;
}

.einsatz-msg-list {
  list-style: none;
  margin: 0;
  padding: 0;
  overflow-y: auto;
  flex: 1;
  min-height: 100px;
}

.einsatz-msg-list li {
  padding: 8px 0;
  border-bottom: 1px solid #2a3f5c;
  font-size: 0.88rem;
  line-height: 1.35;
}

.einsatz-msg-list .msg-time {
  color: #8fa3bd;
  font-size: 0.78rem;
  margin-right: 6px;
}

.einsatz-msg-list small { color: #7a90ab; }

.einsatz-view button.secondary {
  background: #243652;
  border-color: #3a5275;
  color: #dce4f0;
}

.einsatz-view button:not(.secondary) {
  background: #2d5a8a;
  border-color: #3d6fa3;
}

.einsatz-side-col .module-hint {
  color: #8fa3bd;
  font-size: 0.78rem;
  margin: 4px 0 0;
}

@media (max-width: 1100px) {
  .einsatz-body { grid-template-columns: 1fr; }
  .einsatz-side-col { overflow-y: visible; }
}

@media (max-width: 900px) {
  .split-main { flex-direction: column; }
  .notruf-column {
    flex: 0 0 auto;
    max-width: none;
    max-height: 40vh;
    border-right: none;
    border-bottom: 1px solid #2a3f5c;
  }
}

@media (max-width: 720px) {
  .banner-datetime { flex-direction: column; align-items: flex-end; gap: 0.15rem; border-right: none; padding-right: 0; margin-right: 0; }
  .banner-user-block { padding-left: 0.75rem; border-left: 1px solid var(--border); }
  .banner-time { font-size: 1.15rem; }
  .banner-date { font-size: 0.75rem; }
  .banner-user-block span:first-child { display: none; }
}

/* ── BMA Overlay & Modul ── */
.bma-overlay {
  position: fixed;
  inset: 52px 0 0 0;
  z-index: 900;
  background: rgba(8, 14, 24, 0.94);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 14px;
  box-sizing: border-box;
}

.bma-overlay.hidden { display: none !important; }

.bma-overlay-inner {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: 12px;
  width: min(1180px, 98vw);
  height: min(720px, calc(100vh - 80px));
  max-height: 100%;
}

.bma-panel {
  overflow-y: auto;
  min-height: 0;
}

.bma-mymobs-panel {
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.bma-mymobs-panel iframe {
  flex: 1;
  width: 100%;
  min-height: 320px;
  border: 1px solid #2a3f5c;
  border-radius: 8px;
  background: #0f1a2b;
}

.bma-alert-banner {
  background: #c62828;
  color: #fff;
  text-align: center;
  font-weight: 900;
  padding: 10px;
  border-radius: 8px;
  margin-bottom: 10px;
  animation: bma-pulse 1.2s ease-in-out infinite;
}

@keyframes bma-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.85; }
}

.bma-mymobs-info {
  color: #b8c5d8;
  font-size: 0.88rem;
  line-height: 1.4;
  margin-bottom: 8px;
}

.bma-countdown {
  font-size: 3.2rem;
  font-weight: 1000;
  text-align: center;
  color: #ffdf5d;
  font-variant-numeric: tabular-nums;
  margin: 8px 0 12px;
}

.bma-btn-start {
  display: block;
  width: 100%;
  margin-bottom: 12px;
  padding: 12px;
  font-size: 1.05rem;
  font-weight: 900;
  background: #243652;
  border: 1px solid #3a5275;
  color: #fff;
  border-radius: 10px;
  cursor: pointer;
}

.bma-btn-start.running {
  background: #2e7d32 !important;
  border-color: #1b5e20 !important;
  cursor: default;
}

.bma-fields {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 6px 10px;
  align-items: center;
  font-size: 0.88rem;
  margin-bottom: 12px;
}

.bma-fields label { color: #9fb0c8; }
.bma-fields label.full { grid-column: 1 / -1; margin-top: 4px; }
.bma-fields .full { grid-column: 1 / -1; }

.bma-fields input,
.bma-fields textarea {
  background: #152238;
  border: 1px solid #2a3f5c;
  color: #e8ecf2;
  border-radius: 6px;
  padding: 6px 8px;
  font: inherit;
  width: 100%;
  box-sizing: border-box;
}

.bma-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.bma-actions-spacer { flex: 1; }

.bma-module-view { height: 100%; overflow: auto; }
.bma-email-hint strong { color: #ffdf5d; }

body.bma-active .app-main {
  filter: brightness(0.55);
}

/* Verwaltung */
.verwaltung-main { padding: 12px; }
.verwaltung-wrap { border-radius: 0; }

.verwaltung-form {
  display: grid;
  grid-template-columns: 1fr;
  gap: 6px;
  max-width: 520px;
}

.verwaltung-form label {
  color: #9fb0c8;
  font-size: 0.88rem;
  margin-top: 8px;
}

.verwaltung-form label.checkbox-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
}

.verwaltung-form input[type="text"],
.verwaltung-form input[type="email"],
.verwaltung-form input[type="url"],
.verwaltung-form input[type="number"] {
  background: #152238;
  border: 1px solid #2a3f5c;
  color: #e8ecf2;
  border-radius: 6px;
  padding: 8px 10px;
  font: inherit;
}

.verwaltung-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 16px;
}

@media (max-width: 900px) {
  .bma-overlay-inner { grid-template-columns: 1fr; height: auto; max-height: calc(100vh - 70px); overflow-y: auto; }
}

/* ── Footer Fahrzeugleiste ── */
.vehicle-footer {
  flex-shrink: 0;
  background: #001b3f;
  border-top: 1px solid rgba(120, 165, 225, 0.22);
  z-index: 50;
}

.vehicle-footer-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  border: none;
  background: rgba(8, 30, 58, 0.95);
  color: #b8c5d8;
  padding: 6px 16px;
  cursor: pointer;
  font-size: 0.82rem;
  font-weight: 700;
  text-align: left;
}

.vehicle-footer-toggle:hover {
  background: rgba(16, 45, 82, 0.98);
  color: #fff;
}

.vehicle-footer-count { color: #8fa3bd; font-weight: 600; }
.vehicle-footer-chevron { margin-left: auto; font-size: 0.7rem; }

.vehicle-footer.collapsed .vehicle-footer-body { display: none; }

.vehicle-footer-body {
  padding: 8px 14px 12px;
}

.vehicle-footer-scroll {
  display: flex;
  flex-wrap: nowrap;
  gap: 10px;
  overflow-x: auto;
  overflow-y: hidden;
  padding-bottom: 4px;
  scrollbar-width: thin;
}

.vehicle-footer-empty {
  margin: 0;
  color: #8fa3bd;
  font-size: 0.85rem;
  font-style: italic;
}

.vehicle-footer-card {
  flex: 0 0 auto;
  min-width: 150px;
  max-width: 190px;
  height: 58px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 6px 48px 6px 12px;
  position: relative;
  background: rgba(8, 30, 58, 0.76);
  border: 1px solid rgba(120, 165, 225, 0.28);
  border-radius: 8px;
  color: #fff;
  cursor: pointer;
  text-align: left;
  font: inherit;
}

.vehicle-footer-card:hover {
  background: rgba(16, 45, 82, 0.86);
  border-color: rgba(255, 255, 255, 0.45);
}

.vehicle-card-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
  overflow: hidden;
}

.vehicle-card-name {
  font-weight: 850;
  font-size: 0.82rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.vehicle-card-ruf {
  font-size: 0.72rem;
  color: rgba(255, 255, 255, 0.72);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.vehicle-card-badge {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  min-width: 34px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 9px;
  font-weight: 950;
  font-size: 0.85rem;
  border: 1px solid rgba(255, 255, 255, 0.22);
}

.vehicle-card-badge.status-0,
.vehicle-footer-card.status-0 .vehicle-card-badge { background: rgba(255,255,255,0.10); color: #fff; }
.vehicle-card-badge.status-1 { background: rgba(255,140,0,0.70); color: #fff; border-color: rgba(255,175,70,0.95); }
.vehicle-card-badge.status-2 { background: rgba(255,255,255,0.14); color: #fff; }
.vehicle-card-badge.status-3 { background: rgba(0,220,120,0.80); color: #fff; border-color: rgba(70,255,165,0.95); }
.vehicle-card-badge.status-3.blink-off { background: rgba(255,255,255,0.14); border-color: rgba(255,255,255,0.26); }
.vehicle-card-badge.status-4 { background: rgba(0,200,110,0.75); color: #fff; border-color: rgba(60,230,145,0.92); }
.vehicle-card-badge.status-5 { background: rgba(255,220,0,0.90); color: #000; border-color: rgba(255,235,70,0.98); }
.vehicle-card-badge.status-6 { background: rgba(255,60,60,0.78); color: #fff; border-color: rgba(255,95,95,0.95); }

.vehicle-status-menu {
  position: fixed;
  z-index: 1200;
  background: #1e2f47;
  border: 1px solid #2a3f5c;
  border-radius: 10px;
  padding: 6px;
  min-width: 200px;
  box-shadow: 0 8px 28px rgba(0,0,0,0.45);
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.vehicle-status-opt {
  border: 1px solid #2a3f5c;
  border-radius: 6px;
  padding: 8px 10px;
  text-align: left;
  cursor: pointer;
  font: inherit;
  font-size: 0.85rem;
  font-weight: 700;
  color: #fff;
  background: #152238;
}

.vehicle-status-opt:hover { filter: brightness(1.15); }
.vehicle-status-opt.status-1 { background: rgba(255,140,0,0.35); }
.vehicle-status-opt.status-2 { background: rgba(255,255,255,0.08); }
.vehicle-status-opt.status-3 { background: rgba(0,220,120,0.25); }
.vehicle-status-opt.status-4 { background: rgba(0,200,110,0.25); }
.vehicle-status-opt.status-5 { background: rgba(255,220,0,0.35); color: #111; }
.vehicle-status-opt.status-6 { background: rgba(255,60,60,0.35); }

.verwaltung-fahrzeug-list {
  list-style: none;
  margin: 16px 0 0;
  padding: 0;
}

.verwaltung-fahrzeug-list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid #2a3f5c;
  font-size: 0.88rem;
  color: #dce4f0;
}

.verwaltung-fz-actions { display: flex; gap: 6px; flex-shrink: 0; }
.verwaltung-fz-actions button { font-size: 0.78rem; padding: 4px 8px; }

.verwaltung-fahrzeuge-card { margin-top: 16px; }
.verwaltung-form-inline { max-width: 480px; }
