/* Feuerwehr-Manager — Design angelehnt an FW-Hub (hell + dunkel) */

:root {
  --bg: #f4f5f7;
  --bg-card: #ffffff;
  --bg-card-hover: #f8fafc;
  --bg-code: #1e293b;
  --border: #e2e8f0;
  --text: #1e293b;
  --text-muted: #64748b;
  --text-subtle: #94a3b8;
  --schatten-sm: 0 1px 3px rgba(0, 0, 0, 0.08);
  --schatten-md: 0 4px 12px rgba(0, 0, 0, 0.1);
  --schatten-lg: 0 8px 24px rgba(0, 0, 0, 0.12);
  --rot: #e63022;
  --rot-dunkel: #b5261b;
  --rot-hell: rgba(230, 48, 34, 0.1);
  --rot-border: rgba(230, 48, 34, 0.25);
  --rot-glow: rgba(230, 48, 34, 0.25);
  --rot-focus: rgba(230, 48, 34, 0.1);
  --rot-subtle: rgba(230, 48, 34, 0.04);
  --gruen: #16a34a;
  --gruen-hell: rgba(22, 163, 74, 0.12);
  --gelb: #d97706;
  --orange-hell: rgba(217, 119, 6, 0.12);
  --error: #ef4444;
  --accent: #e63022;
  --personal-c: #16a34a;
  --personal-hell: rgba(22, 163, 74, 0.12);
  --einsatz-c: #e63022;
  --touch: 44px;
  --layout-gutter: 24px;
  --content-max-width: 1200px;
  --topnav-height: 102px;
  --app-header-height: 58px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;
  --radius-pill: 999px;
  --transition-fast: 0.15s ease;
  /* Schriftgrößen (FW-Hub) */
  --fs-2xs: 10px;
  --fs-xs: 11px;
  --fs-sm: 12px;
  --fs-md: 14px;
  --fs-lg: 16px;
  --fs-xl: 20px;
  --fs-2xl: 28px;
  --lila: #7c3aed;
  --lila-hell: rgba(124, 58, 237, 0.12);
  /* Legacy-Aliase */
  --card: var(--bg-card);
}

[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0f172a;
  --bg-card: #1e293b;
  --bg-card-hover: #263248;
  --bg-code: #0d1117;
  --border: #334155;
  --text: #e2e8f0;
  --text-muted: #94a3b8;
  --text-subtle: #64748b;
  --schatten-sm: 0 1px 3px rgba(0, 0, 0, 0.3);
  --schatten-md: 0 4px 12px rgba(0, 0, 0, 0.4);
  --schatten-lg: 0 8px 24px rgba(0, 0, 0, 0.5);
  --rot-hell: rgba(230, 48, 34, 0.15);
  --rot-border: rgba(230, 48, 34, 0.35);
  --rot-subtle: rgba(230, 48, 34, 0.08);
  --gruen: #3fb950;
  --gruen-hell: rgba(63, 185, 80, 0.15);
  --card: var(--bg-card);
}

*, *::before, *::after { box-sizing: border-box; }

html, body { height: 100%; margin: 0; }

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif;
  font-size: 14px;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

a { color: var(--rot); text-decoration: none; }
a:hover { text-decoration: underline; }

button, input, select, textarea {
  font-family: inherit;
  font-size: inherit;
  color: inherit;
}

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); border: 0;
}

/* ── App-Shell ─────────────────────────────────────────────────────────────── */
.app-shell {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.app-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--app-header-height);
  background: var(--bg-card);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  padding: 0 var(--layout-gutter);
  gap: 8px;
  z-index: 200;
  box-shadow: var(--schatten-sm);
}

.app-header__brand {
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  color: inherit;
  flex-shrink: 0;
}

.app-header__emblem {
  width: 34px; height: 34px;
  background: var(--rot-hell);
  border: 1px solid var(--rot-border);
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 17px;
  overflow: hidden;
}

.app-header__name {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  line-height: 1.2;
  display: block;
}

.app-header__sub {
  font-size: 11px;
  color: var(--text-muted);
  display: block;
  margin-top: 1px;
}

.app-header__right {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.app-header__user {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 500;
}

.app-header__user-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--gruen);
}

.app-header__unit-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  white-space: nowrap;
}

.app-header__logout {
  background: none;
  border: 1px solid var(--border);
  cursor: pointer;
  padding: 5px 12px;
  border-radius: var(--radius-md);
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  transition: background var(--transition-fast), color var(--transition-fast), border-color var(--transition-fast);
  font-family: inherit;
}

.app-header__logout:hover {
  background: var(--rot-hell);
  color: var(--rot);
  border-color: var(--rot-border);
}

.theme-toggle { margin-right: 4px; }

.unit-select {
  min-height: 36px;
  font-size: 13px;
  padding: 0 8px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
  max-width: 11rem;
}

.unit-select:focus {
  outline: none;
  border-color: var(--rot);
  box-shadow: 0 0 0 3px var(--rot-focus);
}

.bar-form { margin: 0; display: flex; align-items: center; }

/* Topnav */
.topnav {
  position: fixed;
  top: var(--app-header-height);
  left: 0; right: 0;
  height: 44px;
  background: var(--bg-card);
  border-bottom: 2px solid var(--accent, var(--rot));
  display: flex;
  align-items: stretch;
  padding: 0 var(--layout-gutter);
  z-index: 100;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.topnav__spacer { flex: 1; }

.topnav__sep {
  width: 1px;
  background: var(--border);
  margin: 8px 4px;
  flex-shrink: 0;
  align-self: stretch;
}

.topnav__item {
  display: flex;
  align-items: center;
  padding: 0 14px;
  height: 44px;
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 500;
  text-decoration: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  white-space: nowrap;
  transition: color var(--transition-fast);
}

.topnav__item:hover { color: var(--text); text-decoration: none; }

.topnav__item.active {
  color: var(--accent, var(--rot));
  border-bottom-color: var(--accent, var(--rot));
  font-weight: 600;
}

.topnav__item--soon {
  opacity: 0.45;
  cursor: default;
  pointer-events: none;
  font-style: normal;
}

.page-main {
  flex: 1;
  padding-top: var(--topnav-height);
  min-height: 100vh;
  background: var(--bg);
}

.page-main__inner {
  padding: var(--layout-gutter);
  width: 100%;
  max-width: none;
  margin: 0;
  box-sizing: border-box;
  flex: 1;
}

/* Seiteninhalt in layout.html (verschachteltes main/page-body) — volle Breite wie FW-Hub #page-content */
.page-main__inner > main,
.page-main__inner > .page-body {
  display: block;
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

.page {
  width: 100%;
  max-width: none;
  margin: 0;
}

.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  padding-bottom: 24px;
  margin-bottom: 24px;
  border-bottom: 1px solid var(--border);
}

.page-header h2 {
  margin: 0;
  font-size: 20px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.02em;
  line-height: 1.25;
}

.page-header p {
  margin: 3px 0 0;
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.45;
}

.page-header strong {
  color: var(--text);
  font-weight: 600;
}

.page-footer-hint {
  margin-top: 16px;
  font-size: 12px;
  color: var(--text-muted);
}

.hint--inline {
  display: inline;
  margin: 0;
}

.hint--block {
  display: block;
  margin: 2px 0 0;
}

.member-detail-title {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
}

.page-back {
  font-size: var(--fs-sm);
  font-weight: 600;
  color: var(--text-muted);
  text-decoration: none;
}

.page-back:hover { color: var(--rot); text-decoration: none; }

/* ── Tabs (FW-Hub tab-bar) ─────────────────────────────────────────────────── */
.tab-bar,
.person-tabs {
  display: flex;
  gap: 2px;
  margin-bottom: 24px;
  border-bottom: 1px solid var(--border);
  flex-wrap: wrap;
  overflow: visible;
}

.tab-btn,
.person-tab,
.person-tab-btn {
  background: none;
  border: none;
  padding: 10px 18px;
  font-size: var(--fs-sm);
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  transition: color var(--transition-fast), border-color var(--transition-fast);
  font-family: inherit;
  text-decoration: none;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.tab-btn:hover,
.person-tab:hover { color: var(--text); text-decoration: none; }

.tab-btn--active,
.tab-btn.active,
.person-tab.active,
.person-tab-btn.active {
  color: var(--accent, var(--rot));
  border-bottom-color: var(--accent, var(--rot));
}

/* Nur JS-Tabs (z. B. Personendetail, Fahrzeug-Detail): inaktive Panels ausblenden */
.tab-panel:not(.active),
.vehicle-tab-panel:not(.active) {
  display: none;
}
.tab-panel.active,
.vehicle-tab-panel.active {
  display: block;
}

.admin-panel { display: block; }

/* ── Cards ─────────────────────────────────────────────────────────────────── */
.card,
.panel-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  margin-bottom: 24px;
  overflow: hidden;
  transition: box-shadow var(--transition-fast);
}

.card {
  padding: 0;
}

/* Karten ohne Kopfzeile (Formulare, einfache Boxen) */
.card:not(:has(.card__header)) {
  padding: 24px;
}

.card__body {
  padding: 24px;
}

.card--warning {
  border-color: var(--gelb);
  background: var(--orange-hell);
}

.card-section-title {
  margin: 0 0 8px;
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
}

.card--narrow { max-width: 600px; }

.panel-card { padding: 24px; }

.card:hover, .panel-card:hover { box-shadow: var(--schatten-sm); }

.card__header {
  background: var(--bg-card-hover);
  border-bottom: 1px solid var(--border);
  padding: 12px 24px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* ── Buttons ───────────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 8px 16px;
  border: none;
  border-radius: var(--radius-md);
  font-size: var(--fs-sm);
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: all var(--transition-fast);
  background: var(--rot);
  color: #fff;
}

.btn:hover:not(:disabled) {
  background: var(--rot-dunkel);
  transform: translateY(-1px);
  box-shadow: 0 4px 14px var(--rot-glow);
  text-decoration: none;
  color: #fff;
}

.btn--primary { background: var(--rot); color: #fff; }

.btn--secondary {
  background: var(--bg-card-hover);
  color: var(--text);
  border: 1px solid var(--border);
}

.btn--secondary:hover:not(:disabled) {
  background: var(--border);
  color: var(--text);
  transform: none;
  box-shadow: none;
}

.btn--outline,
.btn-secondary {
  background: transparent;
  color: var(--text-muted);
  border: 1px solid var(--border);
}

.btn--outline:hover:not(:disabled),
.btn-secondary:hover:not(:disabled) {
  background: var(--bg-card-hover);
  color: var(--text);
  border-color: var(--text-muted);
  transform: none;
  box-shadow: none;
}

.btn--danger {
  background: transparent;
  color: var(--rot);
  border: 1px solid var(--rot);
}

.btn--danger:hover:not(:disabled) {
  background: var(--rot-hell);
  border-color: var(--rot);
  color: var(--rot);
  transform: none;
  box-shadow: none;
}

.btn--sm, .btn-sm {
  padding: 5px 10px;
  font-size: var(--fs-xs);
  border-radius: 4px;
}

.btn-block { width: 100%; margin-top: 16px; }

.btn-group {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

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

/* ── Forms ─────────────────────────────────────────────────────────────────── */
label {
  display: block;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  margin: 16px 0 5px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

label:first-child { margin-top: 0; }

input[type="text"], input[type="email"], input[type="tel"], input[type="url"],
input[type="password"], input[type="date"], input[type="number"], select, textarea {
  width: 100%;
  min-height: var(--touch);
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

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

input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--rot);
  box-shadow: 0 0 0 3px var(--rot-focus);
}

.radio-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0.35rem 0;
  cursor: pointer;
}
.radio-row input { width: 1.1rem; height: 1.1rem; min-height: auto; }

.checkbox-row, .check-label {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 16px;
  text-transform: none;
  letter-spacing: 0;
  font-size: 14px;
  color: var(--text);
  cursor: pointer;
}

.checkbox-row input { width: 1.1rem; height: 1.1rem; min-height: auto; }

.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  align-items: end;
}

.form-grid .form-group--full {
  grid-column: 1 / -1;
}

/* Speichern-Button in eigener Zeile unter den Eingabefeldern (Konfiguration, Datenschutz) */
.form-grid .form-group--full.form-group--submit {
  align-self: start;
  padding-top: 4px;
}

.form-grid .form-group--full.form-group--submit::before {
  display: none;
}

.form-grid--2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

@media (max-width: 640px) {
  .form-grid--2 {
    grid-template-columns: 1fr;
  }
}

/* Submit-Buttons ohne Label: unsichtbarer Label-Platzhalter wie bei Eingabefeldern */
.form-grid .form-group--submit:not(:has(label))::before,
.form-grid .form-group:has(> button.btn):not(:has(label))::before {
  content: '\00a0';
  display: block;
  margin: 0 0 5px;
  font-size: 11px;
  font-weight: 600;
  line-height: 1.2;
  visibility: hidden;
  user-select: none;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 5px;
  margin-bottom: 0;
}

.form-group label {
  margin: 0;
  font-size: var(--fs-xs);
  font-weight: 600;
  color: var(--text-muted);
  text-transform: none;
  letter-spacing: 0;
}

.form-group input,
.form-group select,
.form-group textarea {
  margin-top: 0;
  min-height: auto;
}

/* form-grid + align-items:end: unter jedem Feld gleicher Platz für Hinweise */
.form-grid .form-group > .hint {
  margin: 0;
  line-height: 1.45;
  min-height: 1.45em;
  flex-shrink: 0;
}

.form-grid .form-group:not(:has(> .hint)):not(.form-group--submit):not(:has(> button.btn))::after {
  content: '\00a0';
  display: block;
  min-height: 1.45em;
  line-height: 1.45;
  visibility: hidden;
  flex-shrink: 0;
}

/* ── Dashboard tiles ───────────────────────────────────────────────────────── */
.dashboard-grid,
.tile-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.dashboard-card,
.tile {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 24px;
  text-align: center;
  position: relative;
  overflow: hidden;
  text-decoration: none;
  color: var(--text);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 120px;
  font-weight: 700;
  font-size: 14px;
  transition: all 0.22s ease;
}

.dashboard-card .icon,
.tile .icon { font-size: 28px; line-height: 1; }

.dashboard-card--active::after,
.tile:not(.muted)::after {
  content: '';
  position: absolute;
  inset: 0 auto auto 0;
  height: 2px;
  background: linear-gradient(90deg, var(--rot), transparent);
  opacity: 0;
  transition: opacity 0.22s ease;
}

.dashboard-card--active:hover,
.tile:not(.muted):hover {
  border-color: var(--rot-border);
  background: var(--bg-card-hover);
  transform: translateY(-3px);
  box-shadow: var(--schatten-md);
  text-decoration: none;
  color: var(--text);
}

.dashboard-card--active:hover::after,
.tile:not(.muted):hover::after { opacity: 1; }

.tile.muted, .dashboard-card--soon {
  opacity: 0.55;
  cursor: default;
  pointer-events: none;
}

/* Widget / list */
.widget-card, .list {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  overflow: hidden;
  margin-top: 0;
}

.widget-card__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  border-left: 3px solid var(--einsatz-c, var(--rot));
  background: var(--bg-card-hover);
}

.widget-card__header h3 {
  margin: 0;
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
}

.widget-card__body {
  padding: 0;
  color: var(--text);
}

.widget-card--einsatz .widget-card__header {
  border-left-color: var(--einsatz-c, var(--rot));
}

.list h2 {
  margin: 0;
  padding: 12px 16px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  border-bottom: 1px solid var(--border);
  background: var(--bg-card-hover);
}

.list-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  min-height: 52px;
  text-decoration: none;
  color: var(--text);
}

.list-row:last-child { border-bottom: none; }
.list-row:hover { background: var(--rot-subtle); text-decoration: none; color: inherit; }

.badge {
  display: inline-block;
  font-size: var(--fs-xs);
  font-weight: 600;
  padding: 3px 10px;
  border-radius: var(--radius-pill);
  background: var(--bg-card-hover);
  color: var(--text-muted);
}

.badge.active { background: var(--gruen-hell); color: var(--gruen); }
.badge.warn { background: var(--orange-hell, rgba(251, 191, 36, 0.2)); color: var(--gelb, #b45309); }
.badge.warn-uebung { background: var(--orange-hell, rgba(251, 191, 36, 0.2)); color: var(--gelb, #d97706); }
.badge.inactive { background: rgba(239, 68, 68, 0.12); color: var(--error); }

.hint, .text-muted {
  font-size: 12px;
  color: var(--text-muted);
  margin: 4px 0 0;
  line-height: 1.45;
}

.text-center { text-align: center; }

.page-body .ok,
.page-body .err,
.page-body .testmode-banner,
.page-main__inner > main .ok,
.page-main__inner > main .err,
.page-main__inner > main .testmode-banner {
  margin-bottom: 16px;
}

.ok {
  background: var(--gruen-hell);
  color: var(--gruen);
  padding: 12px 16px;
  border-radius: var(--radius-md);
  font-weight: 600;
  margin-bottom: 16px;
  border: 1px solid transparent;
}

.err {
  background: rgba(239, 68, 68, 0.12);
  color: var(--error);
  padding: 12px 16px;
  border-radius: var(--radius-md);
  font-weight: 600;
  margin-bottom: 16px;
}

/* Personal */
.member-detail-header,
.person-hero {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

.person-hero {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-left: 3px solid var(--personal-c);
  border-radius: var(--radius-xl);
  padding: 20px 24px;
  color: var(--text);
}

.person-avatar {
  width: 52px; height: 52px;
  border-radius: var(--radius-lg);
  background: var(--personal-hell);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 1rem;
  flex-shrink: 0;
  color: var(--personal-c);
}

.person-hero h2 { margin: 0; font-size: 18px; font-weight: 700; }
.person-hero .hint { color: var(--text-muted); }

.person-list { display: flex; flex-direction: column; gap: 8px; }

.person-list-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  text-decoration: none;
  color: inherit;
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast), transform var(--transition-fast);
}

.person-list-item:hover {
  border-color: var(--rot-border);
  box-shadow: var(--schatten-md);
  transform: translateY(-1px);
  text-decoration: none;
  color: inherit;
}

.person-list-item.is-hidden { display: none; }

.person-list-avatar {
  width: 40px; height: 40px;
  border-radius: var(--radius-md);
  background: var(--personal-hell);
  color: var(--personal-c);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 13px;
  flex-shrink: 0;
}

.person-list-name { font-weight: 700; font-size: 15px; }
.person-list-sub { font-size: 12px; color: var(--text-muted); }

.person-search {
  width: 100%;
  min-height: var(--touch);
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--bg-card);
  margin-bottom: 16px;
}

.detail-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 16px;
}

.detail-field label {
  margin: 0 0 4px;
  font-size: 10px;
}

.detail-field .value {
  font-size: 14px;
  font-weight: 600;
  text-transform: none;
  letter-spacing: 0;
  color: var(--text);
}

.detail-field .value.muted { color: var(--text-subtle); font-weight: 500; font-style: italic; }

.panel-toolbar {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 16px;
}

.panel-edit { display: none; }
.panel-edit.is-active { display: block; }
.panel-view.is-hidden { display: none; }

.course-pick-list { display: flex; flex-direction: column; gap: 8px; margin-top: 12px; }

.course-pick-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  flex-wrap: wrap;
}

.ric-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.ric-chip {
  background: var(--rot-hell);
  color: var(--rot);
  font-size: 12px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
}

.ric-edit-list { display: flex; flex-direction: column; gap: 8px; }
.ric-edit-row { display: flex; gap: 8px; align-items: center; }
.ric-edit-row input { flex: 1; }

.placeholder-module {
  text-align: center;
  padding: 48px 24px;
  color: var(--text-muted);
}

.placeholder-module .icon { font-size: 40px; margin-bottom: 8px; }

.testmode-banner {
  background: var(--orange-hell);
  border: 1px solid var(--gelb);
  color: var(--text);
  padding: 12px 16px;
  border-radius: var(--radius-md);
  margin-bottom: 16px;
  font-size: 13px;
}

.testmode-settings-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

/* Auth (Login) */
.auth-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg);
  padding: 24px;
}

.auth-page::before {
  content: '';
  position: absolute;
  top: -150px;
  left: 50%;
  transform: translateX(-50%);
  width: 600px;
  height: 600px;
  background: radial-gradient(ellipse, var(--rot-hell) 0%, transparent 70%);
  pointer-events: none;
}

.auth-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  box-shadow: var(--schatten-lg);
  width: 100%;
  max-width: 400px;
  overflow: hidden;
  position: relative;
  z-index: 1;
}

.auth-header {
  background: var(--rot);
  color: #fff;
  padding: 32px 24px;
  text-align: center;
}

.auth-header h1 {
  margin: 0;
  font-size: 20px;
  font-weight: 700;
}

.auth-header p {
  margin: 4px 0 0;
  font-size: 13px;
  opacity: 0.9;
}

.auth-emblem {
  width: 68px; height: 68px;
  background: rgba(255, 255, 255, 0.15);
  border: 2px solid rgba(255, 255, 255, 0.25);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 30px;
  margin: 0 auto 16px;
  overflow: hidden;
}

.auth-logo-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.auth-body { padding: 32px 24px; }

.auth-footer {
  text-align: center;
  padding: 12px 16px 16px;
  border-top: 1px solid var(--border);
  margin-top: 4px;
}

.auth-footer a {
  font-size: 12px;
  color: var(--text-muted);
  text-decoration: none;
}

.auth-footer a:hover {
  color: var(--text);
  text-decoration: underline;
}

/* Öffentliche Datenschutzerklärung (wie FW-Hub #/datenschutz) */
.dse-page {
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  padding: 40px 20px 60px;
}

.dse-page__inner {
  max-width: 800px;
  margin: 0 auto;
}

.dse-back {
  margin: 0 0 24px;
}

.dse-back a {
  color: var(--rot);
  font-size: 13px;
  text-decoration: none;
}

.dse-back a:hover {
  text-decoration: underline;
}

.dse-title {
  font-size: 24px;
  font-weight: 700;
  margin: 0 0 4px;
}

.dse-subtitle {
  color: var(--text-muted);
  font-size: 13px;
  margin: 0 0 32px;
}

.dse-section {
  margin-bottom: 32px;
}

.dse-section h2 {
  font-size: 16px;
  font-weight: 700;
  margin: 0 0 12px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--border);
}

.dse-section p,
.dse-section li {
  font-size: 14px;
  line-height: 1.7;
  color: var(--text);
  margin: 0 0 8px;
}

.dse-section ul {
  padding-left: 20px;
  margin: 0;
}

.dse-section a {
  color: var(--rot);
}

.dse-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  margin-top: 8px;
}

.dse-table th {
  text-align: left;
  padding: 8px 12px;
  background: var(--bg-card-hover);
  border-bottom: 2px solid var(--border);
  font-weight: 600;
}

.dse-table td {
  padding: 8px 12px;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}

.dse-footer {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 40px;
  border-top: 1px solid var(--border);
  padding-top: 16px;
  line-height: 1.6;
}

.auth-totp-hint {
  text-align: center;
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 16px;
}

.auth-totp-hint strong {
  color: var(--text);
  display: block;
  margin-bottom: 4px;
  font-size: 14px;
}

.totp-code-input {
  text-align: center;
  font-size: 20px;
  letter-spacing: 6px;
  font-weight: 700;
}

/* 2FA-Einstellungen (Layout wie FW-Hub) */
.totp-panel .totp-status-hint {
  font-size: 13px;
  color: var(--text-muted);
  margin: 0 0 16px;
  line-height: 1.45;
}

.totp-panel .totp-muted {
  font-size: 13px;
  color: var(--text-muted);
  margin: 0 0 12px;
}

.totp-panel .totp-muted--sm {
  font-size: 12px;
  margin: 0 0 6px;
}

.totp-panel .totp-qr-area {
  margin-top: 16px;
}

.totp-panel .totp-qr-wrap {
  margin-bottom: 16px;
  display: flex;
  justify-content: flex-start;
}

.totp-panel .totp-qr-box {
  background: #ffffff;
  padding: 12px;
  border-radius: 8px;
  display: inline-block;
  line-height: 0;
}

.totp-panel .totp-uri {
  font-size: 11px;
  margin-bottom: 16px;
  word-break: break-all;
}

.totp-panel .totp-code-group {
  max-width: 200px;
  margin-bottom: 0;
}

.totp-panel .totp-code-group label {
  margin: 0 0 5px;
  font-size: var(--fs-xs);
  font-weight: 600;
  color: var(--text-muted);
  text-transform: none;
  letter-spacing: 0;
}

.totp-panel .totp-code-input {
  width: 100%;
  text-align: center;
  font-size: 20px;
  letter-spacing: 6px;
  font-weight: 700;
  min-height: auto;
  padding: 8px 12px;
}

.totp-panel .totp-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
  margin-top: 12px;
}

.totp-panel .totp-action-form {
  display: contents;
}

.totp-panel .totp-disable-confirm {
  margin-top: 16px;
}

.totp-panel .totp-disable-msg {
  margin-bottom: 12px;
}

.error-msg {
  color: var(--error, var(--rot));
  font-size: 13px;
  margin: 0;
}

.privacy-text {
  white-space: pre-wrap;
  font-size: 13px;
  line-height: 1.5;
  background: var(--bg-card-hover);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 16px;
  margin-top: 12px;
}

/* Legacy bar (privacy etc.) */
header.bar {
  background: var(--bg-card);
  border-bottom: 1px solid var(--border);
  color: var(--text);
  padding: 12px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  box-shadow: var(--schatten-sm);
}

header.bar h1 { margin: 0; font-size: 16px; font-weight: 700; }
header.bar a.link { color: var(--rot); font-weight: 600; text-decoration: none; min-height: 44px; display: inline-flex; align-items: center; }

/* Legacy-Seiten ohne App-Shell (Login, alte Bearbeitungsmasken) */
body > main:not(.page-main) {
  max-width: 1200px;
  margin: 0 auto;
  padding: 24px;
}

/* Adminpanel: Reiter direkt unter Kopfzeile (wie FW-Hub) */
.admin-page .page-header {
  margin-bottom: 12px;
  padding-bottom: 12px;
}

.admin-page .page-alerts {
  margin-bottom: 8px;
}

.admin-page .page-alerts .testmode-banner,
.admin-page .page-alerts .ok,
.admin-page .page-alerts .err {
  margin-bottom: 8px;
}

.admin-page .admin-scope-bar {
  margin-top: 0;
  margin-bottom: 0;
}

.admin-page .tab-bar {
  margin-top: 0;
  margin-bottom: 20px;
  overflow: visible;
  scrollbar-width: none;
}

.admin-page .tab-bar::-webkit-scrollbar {
  display: none;
  height: 0;
}

.card__header--toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

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

.toolbar-toggle {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 36px;
  padding: 0 12px;
  margin: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--bg);
  box-sizing: border-box;
  cursor: pointer;
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
  user-select: none;
}

.toolbar-toggle:hover {
  border-color: var(--text-subtle);
}

.toolbar-toggle:has(input:focus-visible) {
  border-color: var(--rot);
  box-shadow: 0 0 0 3px var(--rot-focus);
}

.toolbar-toggle__label {
  font-size: var(--fs-sm);
  color: var(--text-muted);
  white-space: nowrap;
  line-height: 1;
}

.toggle-switch--toolbar .toggle-switch__track {
  width: 36px;
  height: 20px;
  border-radius: 10px;
}

.toggle-switch--toolbar .toggle-switch__track::after {
  top: 3px;
  left: 3px;
  width: 14px;
  height: 14px;
}

.toggle-switch--toolbar input:checked + .toggle-switch__track {
  background: var(--gruen);
}

.toggle-switch--toolbar input:checked + .toggle-switch__track::after {
  transform: translateX(16px);
}

.atemschutz-search-field {
  width: 200px;
  margin: 0;
  min-height: 36px;
  box-sizing: border-box;
}

.toolbar-actions__form {
  margin: 0;
  display: inline;
}

.audit-action {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: inherit;
}

.audit-action__icon {
  flex-shrink: 0;
  opacity: 0.85;
}

.admin-user-form {
  padding: 20px 24px;
  border-bottom: 1px solid var(--border);
  background: var(--bg-card-hover);
}

.admin-user-form__actions {
  margin-top: 16px;
}

.table-wrapper {
  overflow-x: auto;
}

.table {
  width: 100%;
  border-collapse: collapse;
}

.table th {
  background: var(--bg-card-hover);
  padding: 10px 16px;
  text-align: left;
  font-size: var(--fs-xs);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}

.table td {
  padding: 10px 16px;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
  color: var(--text);
  font-size: var(--fs-sm);
}

.table td:last-child {
  white-space: nowrap;
}

/* Standalone Felder (FW-Hub .field) */
.field {
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--text);
  background: var(--bg);
  font-size: var(--fs-sm);
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.field:focus-visible {
  outline: none;
  border-color: var(--rot);
  box-shadow: 0 0 0 3px var(--rot-focus);
}

.field--sm {
  padding: 4px 8px;
  font-size: var(--fs-xs);
}

select.field {
  cursor: pointer;
}

.table .field,
.table .field--sm,
.table .btn,
.table .btn--sm,
.admin-page .btn,
.admin-page .btn--sm,
.admin-page .form-group input,
.admin-page .form-group select,
.admin-page .form-group textarea,
.modal__body input,
.modal__body select,
.modal__body textarea,
.modal__footer .btn {
  min-height: auto;
}

.table td .field--sm,
.table td .btn--sm {
  font-size: var(--fs-xs);
}

.table tbody tr:last-child td {
  border-bottom: none;
}

.table tbody tr:hover td {
  background: var(--bg-card-hover);
}

.table tbody tr.table-row--selected td {
  background: var(--bg-card-hover);
}

/* Kompakte Reihenfolge in Aktionsleisten */
.row-order {
  display: inline-flex;
  flex-direction: column;
  gap: 1px;
  padding: 2px;
  margin-right: 6px;
  vertical-align: middle;
  background: var(--bg-card-hover);
  border: 1px solid var(--border);
  border-radius: 8px;
  flex-shrink: 0;
}

.row-order .table-inline-form {
  display: block;
  margin: 0;
  line-height: 0;
}

.row-order__btn {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 1.65rem;
  height: 1.35rem;
  padding: 0;
  border: none;
  border-radius: 5px;
  background: transparent;
  color: var(--text-muted);
  font-size: 0.7rem;
  line-height: 1;
  cursor: pointer;
  transition: background 0.12s, color 0.12s;
}

.row-order__btn:hover:not(:disabled) {
  background: var(--bg-card);
  color: var(--text);
}

.row-order__btn:disabled {
  opacity: 0.28;
  cursor: not-allowed;
}

.btn-group .row-order {
  align-self: center;
}

.table-col--actions {
  width: 3rem;
  text-align: right;
  white-space: nowrap;
  vertical-align: middle;
}

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

.my-area-tabs {
  margin-bottom: 1.25rem;
}

.my-area-contact-hint {
  margin: 0.5rem 0 0;
}

.my-qualification-body {
  padding: 0.875rem 1rem;
}

.my-qualification-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.625rem;
  padding: 0.5rem 0.875rem;
  border-radius: var(--radius-md);
  background: var(--personal-hell);
  border: 1px solid rgba(22, 163, 74, 0.28);
  box-shadow: 0 1px 2px rgba(22, 163, 74, 0.08);
}

.my-qualification-badge__icon {
  font-size: 1.125rem;
  line-height: 1;
  flex-shrink: 0;
}

.my-qualification-badge__label {
  font-size: 1.0625rem;
  font-weight: 700;
  color: var(--personal-c);
  letter-spacing: 0.01em;
  line-height: 1.3;
}

.my-qualification-empty {
  margin: 0;
  font-size: var(--fs-sm);
}

.admin-qual-priority-hint {
  margin: 0;
  padding: 0.875rem 1rem;
  border-bottom: 1px solid var(--border);
  font-size: var(--fs-sm);
}

.priority-cell {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.priority-cell__rank {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.5rem;
  font-size: var(--fs-sm);
  font-weight: 700;
  color: var(--text-muted);
}

.settings-divider {
  border: none;
  border-top: 1px solid var(--border);
  margin: 1.25rem 0;
}

.settings-subheading {
  margin: 0 0 16px;
  font-size: var(--fs-sm);
  font-weight: 600;
  color: var(--text);
}

/* Einstellungen — volle Seitenbreite wie FW-Hub, einheitliche Feldhöhen */
.settings-page .card {
  width: 100%;
  max-width: none;
}

.settings-page .settings-form-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  align-items: start;
  width: 100%;
}

.settings-page .settings-form-grid--password {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

@media (max-width: 900px) {
  .settings-page .settings-form-grid--password {
    grid-template-columns: 1fr;
  }
}

.settings-page .settings-form-grid .form-group--full {
  grid-column: 1 / -1;
}

.settings-page .settings-form-grid .form-group:not(:has(> .hint))::after {
  display: none;
}

.settings-page .settings-form-grid .form-group input[type="text"],
.settings-page .settings-form-grid .form-group input[type="password"],
.settings-page .settings-form-grid .form-group input[type="email"] {
  min-height: var(--touch);
  height: var(--touch);
  box-sizing: border-box;
}

.settings-page .settings-form-grid .form-group .field--disabled {
  min-height: var(--touch);
  height: var(--touch);
}

.settings-page .settings-actions {
  margin-top: 16px;
}

.settings-page .settings-divider {
  margin: 20px 0;
}

.emergency-contacts-hint {
  margin-bottom: 1rem;
}

#emergency-contacts-list .ec-row {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr auto;
  gap: 8px;
  align-items: center;
  margin-bottom: 8px;
}

#emergency-contacts-list .ec-actions {
  flex-shrink: 0;
  flex-wrap: nowrap;
}

@media (max-width: 720px) {
  #emergency-contacts-list .ec-row {
    grid-template-columns: 1fr;
  }
}

.table tbody tr.vehicle-row,
.table tbody tr.room-row {
  cursor: pointer;
}

.table tbody tr.vehicle-row:hover td,
.table tbody tr.room-row:hover td {
  background: var(--bg-card-hover);
}

.vehicle-detail-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

.vehicle-detail-title {
  margin: 0;
  font-size: 1.35rem;
  font-weight: 700;
}

.vehicle-detail-header__actions {
  margin-left: auto;
}

.vehicle-status {
  font-size: var(--fs-xs);
  font-weight: 600;
}

.vehicle-status--aktiv {
  color: var(--gruen);
}

.vehicle-status--ausser_dienst {
  color: var(--rot);
}

.vehicle-status--wartung {
  color: var(--gelb);
}

.status-badge {
  display: inline-block;
  font-size: var(--fs-xs);
  font-weight: 600;
  padding: 3px 10px;
  border-radius: var(--radius-pill);
}

.status-badge--aktiv {
  color: var(--gruen);
  background: var(--gruen-hell);
}

.status-badge--ausser_dienst {
  color: var(--rot);
  background: var(--rot-hell);
}

.status-badge--wartung {
  color: var(--gelb);
  background: var(--orange-hell);
}

.types-add-row {
  display: flex;
  gap: 8px;
  align-items: flex-end;
  flex-wrap: wrap;
}

.field--search-sm {
  width: 200px;
}

.form-group--inline-flex {
  flex: 1;
  margin: 0;
}

.summary-clickable {
  cursor: pointer;
}

.form-grid--align-start {
  align-items: start;
}

.stammdaten-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 16px 24px;
}

.field-output__label {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 4px;
}

.field-output__value {
  font-size: 0.95rem;
}

.fw-semibold {
  font-weight: 600;
}

.detail-notes {
  padding-top: 12px;
  border-top: 1px solid var(--border);
}

.table-empty {
  text-align: center;
  padding: 32px 16px;
  color: var(--text-muted);
  font-style: italic;
  margin: 0;
}

.badge--admin {
  background: var(--lila-hell);
  color: var(--lila);
}

.admin-page .page-unit-label {
  margin: 0;
  font-size: var(--fs-sm);
  color: var(--text-muted);
}

.page-header--toolbar {
  align-items: center;
}

.testmode-header-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  padding: 4px 10px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  flex-shrink: 0;
}

.testmode-header-toggle__text {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0;
}

.testmode-header-toggle__label {
  font-size: var(--fs-xs);
  font-weight: 600;
  color: var(--text);
  line-height: 1.2;
}

.testmode-header-toggle .toggle-switch__track {
  width: 32px;
  height: 18px;
  border-radius: 9px;
}

.testmode-header-toggle .toggle-switch__track::after {
  top: 2px;
  left: 2px;
  width: 14px;
  height: 14px;
}

.testmode-header-toggle .toggle-switch input:checked + .toggle-switch__track::after {
  transform: translateX(14px);
}

.testmode-header-toggle__hint {
  font-size: var(--fs-xs);
  color: var(--text-muted);
  white-space: nowrap;
}

code {
  background: var(--bg-code);
  color: #f8fafc;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 12px;
}

.admin-scope-bar { margin-bottom: 12px; }

.topnav__item--admin { color: #7c3aed; }
.topnav__item--admin.active {
  color: #7c3aed;
  border-bottom-color: #7c3aed;
}

.topnav__item--test { color: var(--gelb); }
.topnav__item--test:hover { color: var(--gelb); }
.topnav__item--test.active {
  color: var(--gelb);
  border-bottom-color: var(--gelb);
}

.test-alarm-json,
.api-json-view {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: var(--fs-sm);
  line-height: 1.45;
  min-height: 280px;
  resize: vertical;
  width: 100%;
  box-sizing: border-box;
}

.api-json-view {
  min-height: 320px;
  white-space: pre;
  overflow-x: auto;
}

.schnittstellen-endpoint code {
  font-size: 12px;
}

/* Module toggles */
.module-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
}

.module-row__info { flex: 1; display: flex; align-items: center; gap: 12px; }
.module-row__icon { font-size: 22px; line-height: 1; }
.module-row__label { font-size: var(--fs-sm); font-weight: 600; color: var(--text); }

.module-row__actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.admin-check-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.admin-check-list .check-label,
.fn-check-label {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  gap: 8px;
  cursor: pointer;
  margin-top: 4px;
  margin-left: 4px;
  font-size: var(--fs-sm);
  text-transform: none;
  letter-spacing: 0;
  font-weight: 400;
  color: var(--text);
}

.fn-check-label strong {
  font-weight: 600;
}

.fn-check-label strong {
  font-weight: 600;
}

.badge-success {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: var(--fs-xs);
  font-weight: 600;
  background: var(--gruen-hell);
  color: var(--gruen);
}

.badge-warning {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: var(--fs-xs);
  font-weight: 600;
  background: var(--orange-hell, rgba(251, 191, 36, 0.2));
  color: var(--gelb, #b45309);
}

.card--muted .card__body {
  opacity: 0.85;
}
.module-row__desc { font-size: 12px; color: var(--text-muted); margin-top: 2px; }

.text-subtle { color: var(--text-subtle); }
.text-xs { font-size: 11px; }
.text-sm { font-size: 12px; }

.flash-toast-source {
  display: none !important;
}

#toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 10000;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}

.toast {
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 10px 16px;
  border-radius: 10px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
  font-size: 12px;
  font-weight: 500;
  animation: toast-in 0.2s ease;
  border-left: 3px solid var(--gruen);
  min-width: 240px;
  pointer-events: auto;
}

.toast--error {
  border-left-color: var(--error);
}

.toast--warning {
  border-left-color: #f59e0b;
}

@keyframes toast-in {
  from {
    opacity: 0;
    transform: translateX(20px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.hint--pad { padding: 12px 16px 0; margin: 0; }
.hint--warn { color: var(--error, #dc2626); }

.card__body--flush { padding: 0; }
.card__footer { padding: 16px; border-top: 1px solid var(--border); }

.toggle-switch {
  position: relative;
  display: inline-flex;
  align-items: center;
  cursor: pointer;
  flex-shrink: 0;
}

.toggle-switch input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.toggle-switch input:checked + .toggle-switch__track { background: var(--rot); }
.toggle-switch input:checked + .toggle-switch__track::after { transform: translateX(20px); }
.toggle-switch input:disabled + .toggle-switch__track { opacity: 0.35; cursor: not-allowed; }

.toggle-switch__track {
  display: block;
  width: 44px;
  height: 24px;
  background: var(--border);
  border-radius: 12px;
  transition: background 0.2s ease;
  position: relative;
}

.toggle-switch__track::after {
  content: '';
  position: absolute;
  top: 3px;
  left: 3px;
  width: 18px;
  height: 18px;
  background: #fff;
  border-radius: 50%;
  transition: transform 0.2s ease;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.admin-link-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}

.admin-link-card {
  text-decoration: none;
  color: inherit;
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.admin-link-card:hover {
  text-decoration: none;
  border-color: var(--rot-border);
  box-shadow: var(--schatten-md);
}

.form-grid--stack {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
  width: 100%;
}

.form-grid--stack .form-group--full {
  grid-column: 1 / -1;
}

.app-header__logo-img,
.auth-logo-img {
  width: 40px;
  height: 40px;
  object-fit: contain;
}

.admin-preview-row {
  margin-bottom: 16px;
}

.admin-logo-preview {
  max-height: 80px;
  max-width: 160px;
  object-fit: contain;
}

.alert--warning {
  padding: 10px 14px;
  border-radius: var(--radius-md, 8px);
  margin-bottom: 16px;
  background: var(--orange-hell, rgba(217, 119, 6, 0.12));
  border: 1px solid var(--gelb);
  color: var(--gelb);
  font-size: var(--fs-sm);
}

.terminal {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12px;
  line-height: 1.45;
  background: var(--bg-input, #0f1419);
  color: var(--text, #e6edf3);
  border: 1px solid var(--border);
  border-radius: var(--radius-md, 8px);
  padding: 12px 16px;
  margin: 0;
  overflow: auto;
  max-height: 60vh;
  white-space: pre-wrap;
  word-break: break-word;
}

.terminal--container-log {
  min-height: 200px;
}

.form-grid--inline-toolbar {
  align-items: end;
}

.form-label--align {
  display: block;
  margin: 0 0 5px;
  font-size: 11px;
  font-weight: 600;
  line-height: 1.2;
  visibility: hidden;
  user-select: none;
}

.form-group--grow {
  flex: 1;
  min-width: 200px;
}

.form-group--submit,
.form-group--actions {
  flex-shrink: 0;
}

.table-inline-form {
  display: inline;
}

.table .btn-group {
  align-items: center;
}

.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(4px);
  z-index: 200;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.modal-overlay.active {
  display: flex;
}

body.modal-open {
  overflow: hidden;
}

.modal {
  background: var(--bg-card, var(--bg));
  border: 1px solid var(--border);
  border-radius: var(--radius-xl, 12px);
  box-shadow: var(--schatten-lg, 0 8px 32px rgba(0, 0, 0, 0.2));
  width: 100%;
  max-width: 540px;
  max-height: 90vh;
  overflow-y: auto;
}

.modal--lg {
  max-width: 640px;
}

.modal-divider {
  border: none;
  border-top: 1px solid var(--border);
  margin: 16px 0;
}

.modal-subheading {
  margin: 0 0 8px;
  font-size: var(--fs-sm);
  font-weight: 600;
}

.modal__body--section {
  padding-top: 0;
}

.rfid-chip-list {
  list-style: none;
  margin: 0 0 12px;
  padding: 0;
}

.rfid-chip-list li {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
  font-size: var(--fs-sm);
}

.rfid-chip-list li:last-child {
  border-bottom: none;
}

[data-unit-hint-required].hidden,
[data-unit-hint-super].hidden {
  display: none;
}

.modal__header {
  background: var(--bg-card-hover);
  border-bottom: 1px solid var(--border);
  padding: 14px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: var(--fs-md);
  font-weight: 600;
  color: var(--text);
}

.modal__header h3 {
  margin: 0;
  font-size: var(--fs-md);
  font-weight: 600;
}

.modal__close {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 18px;
  cursor: pointer;
  line-height: 1;
  padding: 2px 6px;
}

.modal__close:hover {
  color: var(--text);
}

.modal__body {
  padding: 24px;
}

.modal__body .form-group:first-child label {
  margin-top: 0;
}

.modal__footer {
  padding: 16px 24px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  background: var(--bg-card-hover);
}

.text-nowrap {
  white-space: nowrap;
}

.mt-sm {
  margin-top: 8px;
}

.mb-sm {
  margin-bottom: 8px;
}

.list-row__body { flex: 1; min-width: 0; }
.list-row__title { font-size: var(--fs-sm); font-weight: 600; color: var(--text); }
.list-row__meta { font-size: var(--fs-xs); color: var(--text-muted); margin-top: 2px; }
.list-row__actions { display: flex; gap: 6px; flex-shrink: 0; flex-wrap: wrap; }

.table__th-sort {
  cursor: pointer;
  user-select: none;
  white-space: nowrap;
}

.table__th-sort:hover {
  color: var(--rot);
}

.table__th-sort::after {
  content: ' ⇅';
  font-size: 0.75em;
  color: var(--text-muted);
  font-weight: 400;
}

.table__th-sort--asc::after {
  content: ' ▲';
  color: var(--rot);
}

.table__th-sort--desc::after {
  content: ' ▼';
  color: var(--rot);
}

#tab-vehicle-checklisten .list-row:hover { background: var(--bg-card-hover); }

.text-success { color: var(--gruen); }
.text-danger { color: var(--error); }

span.required { color: var(--error); }

.tpl-items {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 8px;
}

.tpl-item-row {
  display: flex;
  gap: 6px;
  align-items: center;
}

.tpl-item-row .tpl-item-input { flex: 1; }

.tpl-item-remove {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 16px;
  padding: 4px;
  color: var(--text-muted);
  line-height: 1;
}

.tpl-item-remove:hover { color: var(--error); }

.fill-item {
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
}

.fill-item:last-child { border-bottom: none; }

.fill-item__label {
  font-size: var(--fs-sm);
  color: var(--text);
  margin-bottom: 6px;
}

.fill-item__radios {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}

.fill-radio-label {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: var(--fs-xs);
  cursor: pointer;
}

.fill-item__radios .field--sm {
  flex: 1;
  min-width: 120px;
}

.cl-result-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 12px;
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
  align-items: baseline;
}

.cl-result-row:last-child { border-bottom: none; }

.fw-semibold { font-weight: 600; }

.modal--md { max-width: 520px; }

.test-alarm-sample-row {
  align-items: flex-start;
  gap: 0.75rem;
}

.btn-group--inline {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  flex-shrink: 0;
}

.test-alarm-sample-row .btn {
  flex-shrink: 0;
}

.badge--muted {
  opacity: 0.75;
  margin-left: 6px;
}

@media (max-width: 640px) {
  :root { --layout-gutter: 16px; }
  .app-header { padding: 0 var(--layout-gutter); }
  .topnav { padding: 0 var(--layout-gutter); overflow-x: auto; }
  .page-main__inner { padding: var(--layout-gutter); }
  .dashboard-grid, .tile-grid { grid-template-columns: repeat(2, 1fr); }
}

/* Personal-Modul (FW-Hub Parität) */
.member-row { cursor: pointer; }
.member-row:nth-child(even) { background: var(--bg-card-hover); }
.member-row:hover { background: var(--rot-subtle); }
.member-detail-header { display: flex; align-items: center; gap: 12px; margin-bottom: var(--space-sm, 0.75rem); }
.member-detail-title { font-size: 1.25rem; font-weight: 700; margin: 0; }
.card--narrow { max-width: 600px; }
.p-empty { padding: 1rem; }
.personal-search-field { width: 200px; margin: 0; }
.personal-module-tabs { margin-bottom: var(--space-md, 1rem); }
.modal--wide { max-width: 640px; }
.member-picker {
  max-height: 280px;
  overflow-y: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius-md, 8px);
  padding: 0.5rem 0.75rem;
  background: var(--bg-card-hover);
}
.member-picker__item { display: flex; padding: 0.35rem 0; margin: 0; }
.attendance-toolbar__controls {
  display: flex;
  gap: 0.75rem;
  align-items: center;
  flex-wrap: wrap;
  margin-left: auto;
}
.attendance-toolbar__filters {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.attendance-toolbar__filters .attendance-filter-field {
  width: 11.5rem;
  height: 2.25rem;
  min-height: 2.25rem;
  max-height: 2.25rem;
  box-sizing: border-box;
  margin: 0;
  padding: 0 0.75rem;
  font-size: var(--fs-sm);
  line-height: 1.25;
}
.attendance-toolbar__filters input.attendance-filter-field {
  padding-block: 0;
  appearance: none;
  -webkit-appearance: none;
}
.attendance-toolbar__filters select.attendance-filter-field {
  padding-right: 1.75rem;
  appearance: none;
  -webkit-appearance: none;
  background-color: var(--bg);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%236b7280' d='M3 4.5 6 8l3-3.5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.625rem center;
  background-size: 0.75rem;
}
.badge--info { background: rgba(59, 130, 246, 0.12); color: #2563eb; }
.badge--danger { background: rgba(239, 68, 68, 0.12); color: var(--error, #dc2626); }
.notfall-header, .notfall-row {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 12px;
  padding: 10px 16px;
}
.notfall-header { background: var(--bg-card-hover); border-bottom: 1px solid var(--border); }
.notfall-row { border-bottom: 1px solid var(--border); }
.notfall-row:last-child { border-bottom: none; }
.att-stats { display: flex; gap: 1rem; flex-wrap: wrap; padding: 1rem 0; }
.att-stat { display: flex; flex-direction: column; align-items: center; min-width: 80px; }
.att-stat__value { font-size: 1.5rem; font-weight: 800; line-height: 1.2; }
.att-stat__label { font-size: 0.75rem; color: var(--text-muted); margin-top: 2px; }
.att-status--present { color: var(--gruen, #16a34a); }
.att-status--absent { color: var(--error, #dc2626); }
.att-status--excused { color: var(--gelb-dunkel, #ca8a04); }
.att-add-form { padding: 1rem; background: var(--bg-card-hover); border-radius: 8px; margin-top: 1rem; }
.data-table { width: 100%; border-collapse: collapse; font-size: 0.875rem; }
.data-table th {
  text-align: left; padding: 8px 16px; font-size: 0.75rem; font-weight: 700;
  color: var(--text-muted); background: var(--bg-card-hover); border-bottom: 1px solid var(--border);
}
.data-table td { padding: 10px 16px; }
.data-table tbody tr { border-bottom: 1px solid var(--border); }
.data-table tbody tr:last-child { border-bottom: none; }
.data-table tbody tr.carrier-row { transition: background var(--transition-fast); }
#atemschutz-table tbody tr.member-row:nth-child(even) { background: transparent; }
#atemschutz-table tbody tr.carrier-row.carrier-row--alt { background: var(--bg-card-hover); }
#atemschutz-table tbody tr.carrier-row:hover { background: var(--rot-subtle); }
.data-row:nth-child(even) { background: var(--bg-card-hover); }
.data-row:hover { background: var(--rot-subtle); }
.status-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 4px; vertical-align: middle; }
.status-dot--success { background: var(--gruen, #16a34a); }
.status-dot--warning { background: var(--gelb, #eab308); }
.status-dot--danger { background: var(--error, #dc2626); }
.badge-success { display: inline-block; padding: 2px 8px; border-radius: 12px; font-size: 11px; background: #e8f5e9; color: #2e7d32; }
.badge-muted { display: inline-block; padding: 2px 8px; border-radius: 12px; font-size: 11px; background: var(--bg-card-hover); color: var(--text-muted); }
.ms-sm { margin-left: 0.35rem; }
.fw-semibold { font-weight: 600; }
.text-success { color: var(--gruen, #16a34a); }
.text-error { color: var(--error, #dc2626); }
.card--danger-zone {
  border-color: rgba(239, 68, 68, 0.35);
}
.text-info { color: #2563eb; }

.fitness-badge {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 600;
}
.fitness-badge--ok { background: #e8f5e9; color: #2e7d32; }
.fitness-badge--warn { background: #fef9c3; color: #a16207; }
.fitness-badge--overdue { background: #fee2e2; color: #b91c1c; }
.fitness-badge--missing { background: var(--bg-card-hover); color: var(--text-muted); }

.import-export-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 1rem;
}
.import-export-format {
  display: grid;
  gap: 0.65rem;
}
.radio-card {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  padding: 0.75rem 0.9rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-md, 8px);
  background: var(--bg-card);
  cursor: pointer;
}
.radio-card:has(input:checked) {
  border-color: var(--gruen);
  background: var(--gruen-hell);
}
.radio-card input {
  margin-top: 0.2rem;
  flex-shrink: 0;
}
.radio-card span {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}
.radio-card strong {
  font-size: var(--fs-sm);
}
.radio-card small {
  font-size: var(--fs-xs);
  color: var(--text-muted);
  line-height: 1.4;
}
.import-export-warning {
  margin-top: 0.35rem;
}
.import-export-notes {
  margin: 0 0 0.75rem 1.1rem;
  padding: 0;
  color: var(--text);
  font-size: var(--fs-sm);
  line-height: 1.6;
}

.atemschutz-notify-section {
  padding: 18px 0;
  border-top: 1px solid var(--border);
}
.atemschutz-notify-section:first-of-type {
  border-top: none;
  padding-top: 0;
}
.atemschutz-notify-section__head h3 {
  margin: 0 0 12px;
  font-size: var(--fs-lg);
}
.atemschutz-notify-section__controls {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: flex-end;
}
.atemschutz-notify-section__warn {
  min-width: 140px;
  margin: 0;
}
.atemschutz-notify-section__warn input {
  width: 100%;
}
.atemschutz-notify-section__checkboxes {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 220px;
}
.atemschutz-notify-section__checkboxes .checkbox-row {
  margin: 0;
  min-height: auto;
}
.atemschutz-person-search-wrap {
  margin-bottom: 12px;
}
.user-picker--scroll {
  max-height: 320px;
  overflow-y: auto;
}
.atemschutz-select-col {
  width: 40px;
  text-align: center;
}
.atemschutz-select-col input[type="checkbox"] {
  margin: 0;
}
.user-notification-table th:not(:first-child),
.user-notification-table td:not(:first-child) {
  width: 120px;
  text-align: center;
}
.user-notification-table__check {
  justify-content: center;
  margin: 0;
}
.atemschutz-template-panel {
  margin-top: 14px;
}
.atemschutz-settings-form__actions {
  display: flex;
  gap: 0.75rem;
  padding-top: 0.5rem;
  border-top: 1px solid var(--border);
  margin-top: 0.25rem;
}
.atemschutz-settings-form__hint {
  padding-top: 0.25rem;
}
.atemschutz-settings-form .form-group input[type="number"],
.atemschutz-settings-form .form-group select {
  width: 100%;
  max-width: 100%;
}

.user-picker {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 0.65rem;
  max-height: 360px;
  overflow-y: auto;
  padding: 0.75rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-md, 8px);
  background: var(--bg-card-hover);
  margin: 0.75rem 0 1rem;
}
.user-picker__item {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  padding: 0.7rem 0.85rem;
  margin: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius-md, 8px);
  background: var(--bg-card);
  cursor: pointer;
  transition: border-color var(--transition-fast), background var(--transition-fast), box-shadow var(--transition-fast);
}
.user-picker__item:hover {
  border-color: var(--text-subtle);
  box-shadow: var(--schatten-sm);
}
.user-picker__item:has(input:checked) {
  border-color: var(--gruen);
  background: var(--gruen-hell);
}
.user-picker__item input {
  width: 1.1rem;
  height: 1.1rem;
  min-height: auto;
  margin-top: 0.15rem;
  flex-shrink: 0;
}
.user-picker__text {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  min-width: 0;
}
.user-picker__name {
  font-size: var(--fs-sm);
  font-weight: 600;
  color: var(--text);
  line-height: 1.3;
}
.user-picker__meta {
  font-size: var(--fs-xs);
  color: var(--text-muted);
  line-height: 1.3;
  word-break: break-word;
}

.atemschutz-summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 1rem;
}
.atemschutz-summary-item {
  padding: 0.75rem 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius, 12px);
  background: var(--card, #fff);
}
.atemschutz-summary-label {
  display: block;
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 0.35rem;
}

.atemschutz-stammdaten-form {
  display: grid;
  grid-template-columns: minmax(10rem, 12rem) minmax(0, 1fr) auto;
  gap: 16px;
  align-items: end;
}
.atemschutz-stammdaten-form .form-group--actions {
  padding-bottom: 1px;
}
.atemschutz-stammdaten-hint {
  margin: 0.65rem 0 0;
}
@media (max-width: 720px) {
  .atemschutz-stammdaten-form {
    grid-template-columns: 1fr;
  }
  .atemschutz-stammdaten-form .form-group--actions .btn {
    width: 100%;
  }
}

.atemschutz-plan-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  align-items: start;
}

.atemschutz-plan-action-card {
  grid-column: 1 / -1;
}

.atemschutz-plan-action-card__title {
  margin: 0 0 0.5rem;
  font-size: var(--fs-lg);
}

.atemschutz-plan-status-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 10px;
  align-items: stretch;
}

.atemschutz-plan-status {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  height: 44px;
  padding: 0 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--bg-card);
  cursor: pointer;
  box-sizing: border-box;
}

.atemschutz-plan-status input[type="checkbox"] {
  width: 1.1rem;
  height: 1.1rem;
  min-height: auto;
  flex-shrink: 0;
  margin: 0;
}

.atemschutz-plan-status-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 600;
  height: 22px;
  padding: 0 10px;
  border-radius: var(--radius-pill);
  line-height: 22px;
  white-space: nowrap;
  flex-shrink: 0;
  box-sizing: border-box;
}

.atemschutz-plan-status-chip--tauglich {
  background: var(--gruen-hell);
  color: var(--gruen);
}

.atemschutz-plan-status-chip--warnung {
  background: var(--orange-hell, rgba(251, 191, 36, 0.2));
  color: var(--gelb, #b45309);
}

.atemschutz-plan-status-chip--abgelaufen {
  background: rgba(239, 68, 68, 0.12);
  color: var(--error);
}

.atemschutz-plan-status-chip--uebung_abgelaufen {
  background: rgba(239, 68, 68, 0.12);
  color: var(--error);
}

.atemschutz-plan-summary__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 16px;
}

.atemschutz-plan-summary__label {
  display: block;
  font-size: var(--fs-xs);
  color: var(--text-muted);
  margin-bottom: 4px;
}

@media (max-width: 900px) {
  .atemschutz-plan-grid {
    grid-template-columns: 1fr;
  }
}

.strecke-pool__list,
.strecke-termin-card__drop {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  min-height: 72px;
  padding: 12px;
}

.strecke-pool__list {
  background: var(--bg-card-hover);
  border-radius: var(--radius-md);
}

.strecke-termine-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 16px;
  margin-top: 16px;
}

.strecke-termin-card,
.card--flush {
  overflow: hidden;
  padding: 0;
}

.strecke-termin-card__header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  background: linear-gradient(135deg, #5b6fd6 0%, #6b4f9c 100%);
  color: #fff;
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

.strecke-termin-card__header--full {
  background: linear-gradient(135deg, #dc4f4f 0%, #b83232 100%);
}

.strecke-termin-card__header--past {
  background: linear-gradient(135deg, #6b7280 0%, #4b5563 100%);
}

.strecke-termin-card__header h3 {
  margin: 0 0 4px;
  font-size: var(--fs-lg);
}

.strecke-termin-card__header p {
  margin: 0;
  font-size: var(--fs-sm);
  opacity: 0.92;
}

.strecke-termin-card__meta {
  text-align: right;
  font-size: var(--fs-sm);
  flex-shrink: 0;
}

.strecke-termin-card__info {
  min-width: 0;
}

.strecke-termin-card__count {
  display: block;
  font-weight: 600;
  margin-bottom: 8px;
}

.strecke-termin-card__actions {
  display: flex;
  flex-direction: column;
  gap: 6px;
  align-items: flex-end;
}

.strecke-termin-card__bemerkung {
  font-size: var(--fs-xs);
  opacity: 0.9;
  font-style: italic;
}

.strecke-header-btn {
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.55);
}

.strecke-header-btn:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.28);
  color: #fff;
  border-color: #fff;
}

.strecke-carrier-badge--notified {
  border-color: var(--gruen-border, rgba(22, 163, 74, 0.45));
}

.strecke-carrier-badge__notified {
  color: var(--gruen, #16a34a);
  font-weight: 700;
  font-size: var(--fs-xs);
}

.strecke-carrier-badge__notify {
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1;
  cursor: pointer;
  padding: 0 2px;
}

.strecke-carrier-badge__notify:hover {
  color: var(--rot, #dc2626);
}

.strecke-ausbilder-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 280px;
  overflow-y: auto;
}

.strecke-ausbilder-list label {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  cursor: pointer;
}

.strecke-termin-card__drop {
  border: 1px solid var(--border);
  border-top: none;
  border-radius: 0 0 var(--radius-lg) var(--radius-lg);
  background: var(--bg-card);
}

.strecke-drop-zone.is-dragover {
  background: var(--rot-subtle);
  border-color: var(--rot-border);
}

.strecke-carrier-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  background: var(--bg-card);
  font-size: var(--fs-sm);
  cursor: grab;
  user-select: none;
}

.strecke-carrier-badge.is-dragging {
  opacity: 0.55;
  cursor: grabbing;
}

.strecke-carrier-badge__name { font-weight: 600; }
.strecke-carrier-badge__meta { font-size: var(--fs-xs); color: var(--text-muted); }
.strecke-carrier-badge__meta--warn { color: var(--gelb, #ca8a04); }
.strecke-carrier-badge__meta--danger { color: var(--error); }

.strecke-carrier-badge__remove {
  border: none;
  background: transparent;
  color: var(--error);
  font-size: 1.1rem;
  line-height: 1;
  cursor: pointer;
  padding: 0 2px;
}

.strecke-status-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}

.strecke-status-dot--gruen { background: var(--gruen, #16a34a); }
.strecke-status-dot--gelb { background: var(--gelb, #eab308); }
.strecke-status-dot--rot { background: var(--error, #dc2626); }

.strecke-termin-row {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px dashed var(--border);
}

.strecke-termin-row:first-child {
  border-top: none;
  padding-top: 0;
}

.kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 1rem;
  margin: 1rem 0 1.25rem;
}
@media (max-width: 720px) {
  .kpi-grid { grid-template-columns: 1fr; }
}
.kpi-card {
  display: block;
  padding: 1rem 1.1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius, 12px);
  background: var(--card, #fff);
  text-decoration: none;
  color: inherit;
  transition: box-shadow 0.15s ease, border-color 0.15s ease;
}
.kpi-card:hover {
  box-shadow: 0 0.35rem 1rem rgba(0, 0, 0, 0.08);
  text-decoration: none;
}
.kpi-card--active {
  border-color: var(--accent, #3b82f6);
  box-shadow: 0 0 0 1px var(--accent, #3b82f6);
}
.kpi-card__label {
  display: block;
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 0.35rem;
}
.kpi-card__value {
  display: block;
  font-size: 1.75rem;
  font-weight: 700;
  line-height: 1.1;
}
.kpi-card__value--success { color: var(--gruen, #16a34a); }
.kpi-card__value--warn { color: var(--gelb, #ca8a04); }
.kpi-card__value--warning { color: var(--gelb, #d97706); }
.kpi-card--warn.kpi-card--active {
  border-color: var(--gelb, #ca8a04);
  box-shadow: 0 0 0 1px var(--gelb, #ca8a04);
}
.kpi-card__value--danger { color: var(--error, #dc2626); }
.kpi-card--warning.kpi-card--active {
  border-color: var(--gelb, #d97706);
  box-shadow: 0 0 0 1px var(--gelb, #d97706);
}
.card--nested { border-style: dashed; }

/* Topnav Personal-Dropdown (FW-Hub) */
.topnav__item-group { display: flex; align-items: stretch; }
.topnav__item--has-dd { border-top-right-radius: 0; border-bottom-right-radius: 0; padding-right: 0.35rem; }
.topnav__item--personal.active { color: var(--personal-c); border-bottom-color: var(--personal-c); }
.topnav__arrow {
  display: flex; align-items: center; justify-content: center;
  width: 1.75rem; border: none; background: transparent; cursor: pointer;
  color: var(--text-muted); padding: 0; margin-left: -0.15rem;
  border-bottom: 2px solid transparent;
}
.topnav__item-group:has(.topnav__item.active) .topnav__arrow {
  color: var(--personal-c); border-bottom-color: var(--personal-c);
}
.topnav__arrow::after {
  content: ''; display: block; width: 0; height: 0;
  border-left: 4px solid transparent; border-right: 4px solid transparent;
  border-top: 5px solid currentColor; transition: transform 0.12s ease;
}
.topnav__arrow.open::after { transform: rotate(180deg); }
.topnav__dropdown-wrap { position: relative; }
.topnav__dropdown {
  position: absolute; top: calc(100% + 2px); left: 0;
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: 10px; box-shadow: var(--schatten-lg, 0 8px 24px rgba(0,0,0,0.12));
  min-width: 210px; padding: 6px; display: none; z-index: 300;
}
.topnav__dropdown.open { display: block; }
.topnav__dropdown-label {
  padding: 6px 10px 4px; font-size: 0.65rem; font-weight: 700;
  letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-muted);
}
.topnav__dd-item {
  display: flex; align-items: center; gap: 9px; padding: 8px 10px;
  border-radius: 8px; width: 100%; border: none; background: none;
  font-family: inherit; font-size: 0.875rem; font-weight: 500;
  color: var(--text-muted); cursor: pointer; text-align: left; text-decoration: none;
}
.topnav__dd-item:hover { background: var(--bg-card-hover); color: var(--text); }
.topnav__dd-item.active {
  color: var(--personal-c); background: var(--personal-hell); font-weight: 600;
}
.topnav__dd-item--soon { opacity: 0.55; cursor: default; pointer-events: none; }
.topnav__dd-item__icon {
  width: 26px; height: 26px; border-radius: 8px; display: flex;
  align-items: center; justify-content: center; flex-shrink: 0; font-size: 13px;
  background: var(--item-accent-hell, var(--personal-hell));
}

.att-stats--5 { justify-content: space-between; gap: 0.5rem; }
.att-stats--5 .att-stat { flex: 1; min-width: 72px; }
.att-stat--quote .att-stat__value { font-size: 1.35rem; }
.att-stats-hint { margin: 1rem 0 0; text-align: center; max-width: 36rem; margin-left: auto; margin-right: auto; }

/* ── Berichte-Übersicht ───────────────────────────────────────────────────── */
.berichte-module-tabs { margin-bottom: 1rem; }
.berichte-module-panel { margin-top: 0.25rem; }

/* ── Einsatzbericht-Formular (1:1 FW-Hub incident-form) ─────────────────────── */
.einsatzbericht-form-page {
  --accent: var(--einsatz-c, var(--rot));
}

.einsatzbericht-form-page .page-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 24px;
}

.einsatzbericht-form-actions {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}

.einsatzbericht-form-page .card {
  margin-bottom: 24px;
  width: 100%;
  max-width: none;
}

.einsatzbericht-form-page .incident-form-tabs {
  margin-bottom: 0;
  padding: 0 24px;
  overflow-x: auto;
}

.einsatzbericht-form-page .incident-tab-panel {
  padding: 20px 24px;
}

.einsatzbericht-form-page .incident-tab-panel[data-panel="1"] {
  padding-left: 16px;
  padding-right: 16px;
}

/* Combo-Suggest (Stichwort, Einsatzleiter) */
.einsatzbericht-form-page .combo-suggest {
  position: relative;
}

.einsatzbericht-form-page .combo-suggest__list {
  position: absolute;
  z-index: 30;
  left: 0;
  right: 0;
  top: calc(100% + 4px);
  max-height: 220px;
  overflow-y: auto;
  margin: 0;
  padding: 4px 0;
  list-style: none;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--bg-card-hover);
  box-shadow: var(--schatten-md);
}

.einsatzbericht-form-page .combo-suggest__option {
  padding: 8px 12px;
  font-size: 13px;
  cursor: pointer;
  color: var(--text);
}

.einsatzbericht-form-page .combo-suggest__option:hover,
.einsatzbericht-form-page .combo-suggest__option--active {
  background: var(--rot-subtle);
}

/* Kompakte Felder wie FW-Hub field-base (ohne 44px Touch-Höhe) */
.einsatzbericht-form-page .form-group input,
.einsatzbericht-form-page .form-group select,
.einsatzbericht-form-page .form-group textarea {
  width: 100%;
  min-height: 0;
  height: auto;
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
  line-height: 1.4;
  margin-top: 0;
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.einsatzbericht-form-page .form-group textarea {
  min-height: 80px;
  resize: vertical;
}

.einsatzbericht-form-page .form-group input:focus,
.einsatzbericht-form-page .form-group select:focus,
.einsatzbericht-form-page .form-group textarea:focus {
  outline: none;
  border-color: var(--rot);
  box-shadow: 0 0 0 3px var(--rot-focus);
}

.einsatzbericht-form-page .form-group input::placeholder {
  color: var(--text-subtle);
}

.einsatzbericht-form-page .form-group input[readonly] {
  background: var(--bg-card-hover, #f8fafc);
  color: var(--text-muted);
  cursor: default;
}

.einsatzbericht-form-page .form-group label {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
}

.einsatzbericht-form-page .form-group--full {
  grid-column: 1 / -1;
}

.einsatzbericht-form-page .form-group::after {
  display: none !important;
}

/* Grids wie incident-form.js */
.einsatzbericht-form-page .incident-form-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px 16px;
  align-items: start;
}

.einsatzbericht-form-page .incident-form-grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  align-items: start;
}

.einsatzbericht-form-page .incident-form-grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  align-items: start;
}

.einsatzbericht-form-page .incident-form-stack {
  display: grid;
  gap: 14px;
  align-items: start;
}

.einsatzbericht-form-page .incident-form-police {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  max-width: 600px;
  align-items: start;
}

.einsatzbericht-form-page .incident-section-title {
  margin: 0 0 12px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.einsatzbericht-form-page .incident-section-block {
  margin-bottom: 24px;
}

.einsatzbericht-form-page .incident-flags-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.einsatzbericht-form-page .incident-flag-card {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  padding: 12px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  margin: 0;
}

.einsatzbericht-form-page .incident-flag-card input {
  width: 16px;
  height: 16px;
  min-height: 0;
  padding: 0;
  margin: 0;
  flex-shrink: 0;
  cursor: pointer;
}

.einsatzbericht-form-page .incident-flag-card span {
  font-size: 13px;
  color: var(--text);
}

.einsatzbericht-form-page .incident-violence-count {
  margin-top: 16px;
  max-width: 260px;
}

.einsatzbericht-form-page .incident-resources-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 10px;
  align-items: start;
}

.einsatzbericht-form-page .incident-res-label {
  font-size: 12px;
}

.einsatzbericht-form-page .incident-res-label .text-muted {
  font-weight: 400;
}

@media (max-width: 900px) {
  .einsatzbericht-form-page .incident-form-grid-3,
  .einsatzbericht-form-page .incident-form-grid-4 {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 640px) {
  .einsatzbericht-form-page .incident-form-tabs {
    padding: 0 16px;
  }
  .einsatzbericht-form-page .incident-tab-panel {
    padding: 16px;
  }
  .einsatzbericht-form-page .incident-form-grid-2,
  .einsatzbericht-form-page .incident-form-grid-3,
  .einsatzbericht-form-page .incident-form-grid-4,
  .einsatzbericht-form-page .incident-flags-grid,
  .einsatzbericht-form-page .incident-form-police {
    grid-template-columns: 1fr;
  }
}

/* Kräfte & Fahrzeuge — Board (links Personal/Slots, rechts Fahrzeuge) */
.einsatzbericht-form-page .incident-kraefte-board {
  position: relative;
  width: 100%;
  max-width: none;
}

.einsatzbericht-form-page .incident-kraefte-layout {
  display: grid;
  grid-template-columns: minmax(320px, 36%) 1fr;
  gap: 18px;
  align-items: start;
}

.einsatzbericht-form-page .incident-kraefte-col {
  min-width: 0;
}

.einsatzbericht-form-page .incident-kraefte-col--left {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.einsatzbericht-form-page .incident-kraefte-col--right {
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.einsatzbericht-form-page .incident-kraefte-col--right .incident-kraefte-section--vehicles {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
}

.einsatzbericht-form-page .incident-kraefte-section__head {
  margin-bottom: 10px;
}

.einsatzbericht-form-page .incident-kraefte-section__title {
  margin: 0 0 4px;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.einsatzbericht-form-page .incident-reserve-panel {
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--bg-card);
  padding: 10px;
  min-width: 0;
}

.einsatzbericht-form-page .incident-reserve-panel__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
  flex-wrap: wrap;
}

.einsatzbericht-form-page .incident-reserve-panel__head .incident-kraefte-section__title {
  margin: 0;
}

.einsatzbericht-form-page .incident-reserve-tabs {
  display: flex;
  gap: 6px;
  margin-bottom: 8px;
}

.einsatzbericht-form-page .incident-reserve-tab {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 6px 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--bg);
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  transition: background var(--transition-fast), border-color var(--transition-fast), color var(--transition-fast);
}

.einsatzbericht-form-page .incident-reserve-tab:hover {
  background: var(--bg-card-hover);
  color: var(--text);
}

.einsatzbericht-form-page .incident-reserve-tab--active[data-reserve-tab="manual"] {
  background: color-mix(in srgb, var(--personal-c) 12%, var(--bg-card));
  border-color: color-mix(in srgb, var(--personal-c) 40%, var(--border));
  color: var(--personal-c);
}

.einsatzbericht-form-page .incident-reserve-tab--active[data-reserve-tab="divera"] {
  background: color-mix(in srgb, var(--lila) 10%, var(--bg-card));
  border-color: color-mix(in srgb, var(--lila) 35%, var(--border));
  color: var(--lila);
}

.einsatzbericht-form-page .incident-reserve-tab__count {
  font-size: 10px;
  font-weight: 700;
  min-width: 1.4em;
  padding: 1px 6px;
  border-radius: var(--radius-pill);
  background: var(--bg-card);
  border: 1px solid var(--border);
  font-variant-numeric: tabular-nums;
}

.einsatzbericht-form-page .incident-reserve-tab--active .incident-reserve-tab__count {
  background: var(--bg);
}

.einsatzbericht-form-page .incident-person-search {
  width: min(200px, 100%);
  padding: 6px 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--bg);
  font-size: 12px;
}

.einsatzbericht-form-page .incident-person-search:focus {
  outline: none;
  border-color: var(--rot);
  box-shadow: 0 0 0 3px var(--rot-focus);
}

.einsatzbericht-form-page .incident-crew-chip[hidden] {
  display: none !important;
}

.einsatzbericht-form-page .incident-person-pool {
  min-height: 52px;
  max-height: 120px;
  overflow-y: auto;
  padding: 8px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--bg);
  display: flex;
  flex-wrap: wrap;
  align-content: flex-start;
  gap: 6px;
}

.einsatzbericht-form-page .incident-reserve-pools {
  position: relative;
}

.einsatzbericht-form-page .incident-person-pool--reserve {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 5px;
  min-height: 36px;
  max-height: min(32vh, 220px);
  padding: 6px;
  align-content: start;
}

.einsatzbericht-form-page .incident-person-pool--reserve[hidden] {
  display: none !important;
}

.einsatzbericht-form-page .incident-person-pool--reserve.incident-person-pool--divera {
  border-style: dashed;
  border-color: color-mix(in srgb, var(--lila) 30%, var(--border));
}

.einsatzbericht-form-page .incident-person-pool--reserve .incident-crew-chip--reserve {
  width: 100%;
  max-width: none;
  padding: 5px 8px;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.3;
  border-left-width: 3px;
  border-radius: var(--radius-sm, 6px);
}

.einsatzbericht-form-page .incident-person-pool-empty {
  margin: 8px 0 0;
  font-size: 11px;
}

.einsatzbericht-form-page .incident-crew-chip {
  display: inline-block;
  width: auto;
  max-width: 100%;
  padding: 5px 10px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border);
  background: var(--bg-card-hover);
  border-left: 3px solid var(--personal-c);
  font-size: 12px;
  font-weight: 500;
  line-height: 1.3;
  cursor: grab;
  user-select: none;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.einsatzbericht-form-page .incident-crew-chip--divera {
  background: var(--lila-hell);
  border-color: rgba(124, 58, 237, 0.3);
  border-left-color: var(--lila);
}

.einsatzbericht-form-page .incident-crew-chip--dragging {
  opacity: 0.5;
}

.einsatzbericht-form-page .incident-crew-chip--vehicle-role {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  cursor: pointer;
}

.einsatzbericht-form-page .incident-crew-chip--vehicle-role:hover {
  filter: brightness(1.05);
}

.einsatzbericht-form-page .incident-crew-chip__role-badge {
  flex-shrink: 0;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  padding: 2px 5px;
  border-radius: var(--radius-pill);
  line-height: 1.2;
}

.einsatzbericht-form-page .incident-crew-chip--ef {
  border-color: color-mix(in srgb, #ca8a04 45%, var(--border));
  background: color-mix(in srgb, #ca8a04 14%, var(--bg-card-hover));
  border-left-color: #ca8a04;
}

.einsatzbericht-form-page .incident-crew-chip--ef .incident-crew-chip__role-badge {
  background: #ca8a04;
  color: #fff;
}

.einsatzbericht-form-page .incident-crew-chip--maschinist {
  border-color: color-mix(in srgb, #0284c7 45%, var(--border));
  background: color-mix(in srgb, #0284c7 14%, var(--bg-card-hover));
  border-left-color: #0284c7;
}

.einsatzbericht-form-page .incident-crew-chip--maschinist .incident-crew-chip__role-badge {
  background: #0284c7;
  color: #fff;
}

.einsatzbericht-form-page .incident-crew-chip--pa {
  border-color: color-mix(in srgb, #7c3aed 35%, var(--border));
}

.einsatzbericht-form-page .incident-crew-chip__pa-badge {
  flex-shrink: 0;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  padding: 2px 5px;
  border-radius: var(--radius-pill);
  line-height: 1.2;
  background: #7c3aed;
  color: #fff;
}

.einsatzbericht-form-page .incident-crew-chip__name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.einsatzbericht-form-page .incident-crew-role-menu {
  position: absolute;
  z-index: 40;
  min-width: 170px;
  padding: 4px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--bg-card);
  box-shadow: var(--shadow-md, 0 8px 24px rgba(0, 0, 0, 0.18));
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.einsatzbericht-form-page .incident-crew-role-menu[hidden] {
  display: none !important;
}

.einsatzbericht-form-page .incident-crew-role-menu__btn {
  width: 100%;
  text-align: left;
  padding: 8px 10px;
  border: none;
  border-radius: var(--radius-sm, 6px);
  background: transparent;
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  cursor: pointer;
}

.einsatzbericht-form-page .incident-crew-role-menu__btn:hover {
  background: var(--bg-card-hover);
}

.einsatzbericht-form-page .incident-crew-role-menu__btn[data-role="EINHEITSFUEHRER"] {
  color: #b45309;
}

.einsatzbericht-form-page .incident-crew-role-menu__btn[data-role="MASCHINIST"] {
  color: #0369a1;
}

.einsatzbericht-form-page .incident-crew-role-menu__btn[data-action="PA"] {
  color: #6d28d9;
}

.einsatzbericht-form-page .incident-crew-role-menu__btn--danger {
  color: var(--danger, #b91c1c);
}

.einsatzbericht-form-page .incident-crew-role-menu__btn[hidden] {
  display: none !important;
}

.einsatzbericht-form-page .einsatzbericht-form--view .combo-suggest__list {
  display: none !important;
}

.einsatzbericht-form-page .einsatzbericht-form--view .incident-crew-chip {
  cursor: default;
}

.einsatzbericht-form-page .incident-kraefte-layout--view {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr);
}

.einsatzbericht-view-page .page-header .page-back {
  margin-bottom: 0.5rem;
}

.einsatzbericht-form-page .incident-virtual-slots {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.einsatzbericht-form-page .incident-vehicle-stack {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  width: 100%;
  max-height: min(70vh, 820px);
  overflow-y: auto;
  align-content: start;
  padding-right: 4px;
}

.einsatzbericht-form-page .incident-vehicle-card {
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--bg-card-hover);
  padding: 0;
  min-width: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.einsatzbericht-form-page .incident-vehicle-card__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 10px 12px;
  background: color-mix(in srgb, var(--einsatz-c, var(--rot)) 8%, var(--bg-card));
  border-bottom: 1px solid var(--border);
}

.einsatzbericht-form-page .incident-vehicle-card__title-wrap {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.einsatzbericht-form-page .incident-vehicle-card__name {
  margin: 0;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.2;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.einsatzbericht-form-page .incident-vehicle-card__type-label {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--text-muted);
  line-height: 1.2;
}

.einsatzbericht-form-page .incident-vehicle-card__staerke {
  font-size: 11px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: var(--radius-pill);
  background: var(--bg);
  border: 1px solid var(--border);
  white-space: nowrap;
  flex-shrink: 0;
  font-variant-numeric: tabular-nums;
}

.einsatzbericht-form-page .incident-vehicle-dropzone {
  flex: 1;
  min-height: 88px;
  padding: 10px;
  display: flex;
  flex-wrap: wrap;
  align-content: flex-start;
  gap: 6px;
  transition: background var(--transition-fast);
}

.einsatzbericht-form-page .incident-vehicle-dropzone--active {
  background: var(--rot-subtle);
  outline: 2px dashed var(--rot);
  outline-offset: -2px;
}

.einsatzbericht-form-page .incident-vehicle-dropzone-hint {
  margin: 0;
  padding: 6px 12px 10px;
  font-size: 10px;
  color: var(--text-muted);
  border-top: 1px dashed var(--border);
}

.einsatzbericht-form-page .incident-vehicle-dropzone .incident-crew-chip {
  padding: 4px 8px;
  font-size: 11px;
  max-width: 100%;
}

.einsatzbericht-form-page .incident-vehicle-card--compact .incident-vehicle-card__head {
  padding: 8px 10px;
}

.einsatzbericht-form-page .incident-vehicle-card--compact .incident-vehicle-card__name {
  font-size: 12px;
}

.einsatzbericht-form-page .incident-vehicle-card--compact .incident-vehicle-dropzone {
  min-height: 52px;
  padding: 8px;
}

.einsatzbericht-form-page .incident-vehicle-card--compact .incident-vehicle-dropzone-hint {
  padding: 4px 10px 8px;
  font-size: 9px;
}

.einsatzbericht-form-page .incident-vehicle-card--einsatzstelle {
  border-style: dashed;
  border-color: color-mix(in srgb, var(--einsatz-c, var(--rot)) 40%, var(--border));
  background: color-mix(in srgb, var(--einsatz-c, var(--rot)) 4%, var(--bg));
}

.einsatzbericht-form-page .incident-vehicle-card--einsatzstelle .incident-vehicle-card__head {
  background: color-mix(in srgb, var(--einsatz-c, var(--rot)) 10%, var(--bg-card));
}

.einsatzbericht-form-page .incident-vehicle-card--wache {
  border-style: dashed;
  border-color: color-mix(in srgb, var(--personal-c) 40%, var(--border));
  background: color-mix(in srgb, var(--personal-c) 4%, var(--bg));
}

.einsatzbericht-form-page .incident-vehicle-card--wache .incident-vehicle-card__head {
  background: color-mix(in srgb, var(--personal-c) 10%, var(--bg-card));
}

/* Fahrzeugkarten — Farbe nach Typ */
.einsatzbericht-form-page .incident-vehicle-card--type-lkw .incident-vehicle-card__head {
  background: color-mix(in srgb, #2563eb 14%, var(--bg-card));
  border-bottom-color: color-mix(in srgb, #2563eb 35%, var(--border));
}

.einsatzbericht-form-page .incident-vehicle-card--type-loeschfahrzeug .incident-vehicle-card__head {
  background: color-mix(in srgb, #dc2626 14%, var(--bg-card));
  border-bottom-color: color-mix(in srgb, #dc2626 35%, var(--border));
}

.einsatzbericht-form-page .incident-vehicle-card--type-drehleiter .incident-vehicle-card__head {
  background: color-mix(in srgb, #ea580c 14%, var(--bg-card));
  border-bottom-color: color-mix(in srgb, #ea580c 35%, var(--border));
}

.einsatzbericht-form-page .incident-vehicle-card--type-pkw .incident-vehicle-card__head {
  background: color-mix(in srgb, #64748b 14%, var(--bg-card));
  border-bottom-color: color-mix(in srgb, #64748b 35%, var(--border));
}

.einsatzbericht-form-page .incident-vehicle-card--type-anhaenger .incident-vehicle-card__head {
  background: color-mix(in srgb, #ca8a04 14%, var(--bg-card));
  border-bottom-color: color-mix(in srgb, #ca8a04 35%, var(--border));
}

.einsatzbericht-form-page .incident-vehicle-card--type-fuehrungsfahrzeug .incident-vehicle-card__head {
  background: color-mix(in srgb, #7c3aed 14%, var(--bg-card));
  border-bottom-color: color-mix(in srgb, #7c3aed 35%, var(--border));
}

.einsatzbericht-form-page .incident-vehicle-card--type-sonstiges .incident-vehicle-card__head {
  background: color-mix(in srgb, #6b7280 12%, var(--bg-card));
  border-bottom-color: color-mix(in srgb, #6b7280 30%, var(--border));
}

/* Berichte-Einstellungen */
.berichte-settings-page .berichte-settings-tabs {
  margin-top: 1rem;
}

.berichte-settings-page .berichte-settings-toggles {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.berichte-settings-page .toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--bg-card);
}

.berichte-settings-page .toggle-row__label {
  font-weight: 500;
}

.berichte-settings-page .berichte-status-picker {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 8px;
}

.berichte-settings-page .berichte-status-picker__item {
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg-card);
}

.berichte-settings-page .berichte-settings-form__actions {
  margin-top: 1.25rem;
}

@media (max-width: 1024px) {
  .einsatzbericht-form-page .incident-kraefte-layout {
    grid-template-columns: 1fr;
  }
  .einsatzbericht-form-page .incident-vehicle-stack {
    max-height: none;
    overflow-y: visible;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 560px) {
  .einsatzbericht-form-page .incident-person-pool--reserve {
    grid-template-columns: 1fr;
  }
  .einsatzbericht-form-page .incident-virtual-slots {
    grid-template-columns: 1fr;
  }
  .einsatzbericht-form-page .incident-vehicle-stack {
    grid-template-columns: 1fr;
  }
}
