:root {
  --red: #c0161e;
  --red-dark: #8b1118;
  --red-soft: #fde8ea;
  --amber: #b45309;
  --amber-soft: #fef3c7;
  --green: #15803d;
  --green-soft: #dcfce7;
  --blue: #1d4ed8;
  --blue-soft: #dbeafe;
  --ink: #0d1b2a;
  --muted: #64748b;
  --line: #dde2e8;
  --surface: #ffffff;
  --background: #dde3ec;
  --shadow: 0 10px 28px rgba(13, 27, 42, 0.12);
  --radius: 14px;
  --nav-bg: #0d1929;
  --nav-text: rgba(255,255,255,.62);
  --nav-hover: rgba(255,255,255,.07);
  --nav-active-bg: rgba(255,255,255,.09);
  --nav-active-border: #c0161e;
  --topbar-height: 72px;
}

* { box-sizing: border-box; }
html { color-scheme: light; background: var(--background); }
body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background: var(--background);
  font-size: 15px;
  line-height: 1.5;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 3px solid rgba(31, 95, 139, 0.25);
  outline-offset: 2px;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  min-height: var(--topbar-height);
  display: grid;
  grid-template-columns: minmax(220px, 1fr) auto minmax(220px, 1fr);
  align-items: center;
  gap: 18px;
  padding: 3px 22px;
  color: #fff;
  background:
    radial-gradient(circle at 50% 50%, rgba(0,0,0,.32), transparent 34%),
    linear-gradient(105deg, #4f0508 0%, #7a080d 48%, #5b060a 100%);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.42);
  overflow: visible;
}
.brand {
  grid-column: 2;
  justify-self: center;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  min-width: 0;
  height: var(--topbar-height);
  pointer-events: none;
  position: relative;
  z-index: 1;
}
.brand-logo {
  width: min(2200px, 92vw);
  height: 262px;
  object-fit: contain;
  object-position: center center;
  filter: drop-shadow(0 6px 12px rgba(0,0,0,.32));
}
.brand-logo-login {
  width: min(420px, 82vw);
  height: 136px;
}
.brand-copy { display: grid; gap: 0; justify-items: center; margin-top: -10px; }
.topbar .brand-copy { display: none; }
.brand-mark {
  width: 46px;
  height: 46px;
  border: 2px solid rgba(255,255,255,.9);
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-weight: 900;
  letter-spacing: -1px;
  background: rgba(255,255,255,.1);
}
.brand strong { display: none; font-size: 1.22rem; letter-spacing: .08em; }
.brand span {
  display: block;
  opacity: .9;
  font-size: .82rem;
  margin-top: 0;
  letter-spacing: .22em;
  text-transform: uppercase;
}
.topbar-actions { grid-column: 3; justify-self: end; display: flex; align-items: center; gap: 10px; position: relative; z-index: 2; }
.role-picker { display: grid; gap: 3px; font-size: .68rem; color: rgba(255,255,255,.78); }
.role-picker select {
  border: 1px solid rgba(255,255,255,.35);
  border-radius: 9px;
  color: #fff;
  background: rgba(255,255,255,.11);
  padding: 7px 10px;
}
.role-picker option { color: var(--ink); background: #fff; }

.layout { display: grid; grid-template-columns: 230px minmax(0, 1fr); min-height: calc(100vh - var(--topbar-height)); }
.sidebar {
  position: sticky;
  top: var(--topbar-height);
  height: calc(100vh - var(--topbar-height));
  padding: 16px 8px 16px 0;
  border-right: none;
  background: var(--nav-bg);
  box-shadow: 3px 0 16px rgba(0,0,0,.35);
  overflow-y: auto;
}
.nav-item[hidden], .nav-group-label[hidden] { display: none !important; }
.nav-item {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 11px 12px;
  margin-bottom: 3px;
  color: var(--nav-text);
  border: 0;
  border-left: 4px solid transparent;
  border-radius: 0 9px 9px 0;
  background: transparent;
  text-align: left;
  font-weight: 700;
  font-size: .9rem;
  transition: color .15s, background .15s;
}
.nav-item span {
  width: 28px;
  min-width: 28px;
  height: 24px;
  display: inline-grid;
  place-items: center;
  border-radius: 7px;
  color: rgba(255,255,255,.82);
  background: rgba(255,255,255,.08);
  font-size: .68rem;
  font-weight: 900;
  letter-spacing: .03em;
}
.nav-item.active span {
  color: #fff;
  background: rgba(192,22,30,.78);
}
.nav-item:hover { color: rgba(255,255,255,.92); background: var(--nav-hover); }
.nav-item.active { color: #fff; background: var(--nav-active-bg); border-left-color: var(--nav-active-border); font-weight: 800; }
.nav-item.nav-pending { position: relative; }
.nav-item.nav-pending::after {
  content: attr(data-pending-count);
  position: absolute;
  top: 6px; right: 8px;
  min-width: 18px; height: 18px;
  padding: 0 4px;
  background: #ef4444;
  color: #fff;
  font-size: .68rem;
  font-weight: 800;
  line-height: 18px;
  text-align: center;
  border-radius: 9px;
  pointer-events: none;
}

main { min-width: 0; padding: 26px; }
.page-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 22px;
}
.page-header h1 { margin: 0; font-size: clamp(1.45rem, 2vw, 2.15rem); letter-spacing: -.03em; }
.page-header p { margin: 7px 0 0; color: var(--muted); max-width: 760px; }
.page-actions { display: flex; gap: 9px; flex-wrap: wrap; justify-content: flex-end; }

.grid { display: grid; gap: 16px; }
.grid.cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid.cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 2px 10px rgba(13,27,42,.07);
}
.card.pad { padding: 18px; }
.card h2, .card h3 { margin-top: 0; }
.card h2 { font-size: 1.06rem; }
.card h3 { font-size: .98rem; }

.stat { padding: 17px; }
.stat-label { color: var(--muted); font-size: .78rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; }
.stat-value { margin-top: 6px; font-size: 2rem; font-weight: 850; letter-spacing: -.04em; }
.stat-note { margin-top: 5px; color: var(--muted); font-size: .83rem; }
.stat.danger { border-left: 6px solid var(--red); }
.stat.warning { border-left: 6px solid var(--amber); }
.stat.success { border-left: 6px solid var(--green); }
.stat.info { border-left: 6px solid var(--blue); }

.ux-hero {
  margin-top: 18px;
  padding: 22px;
  border-radius: 18px;
  border: 1px solid rgba(13,27,42,.08);
  color: #fff;
  background:
    radial-gradient(circle at 15% 20%, rgba(255,90,38,.35), transparent 32%),
    linear-gradient(135deg, #07111f, #142236 58%, #7d1015);
  box-shadow: 0 16px 36px rgba(13,27,42,.2);
}
.ux-hero-main {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 16px;
}
.ux-hero h2 {
  margin: 2px 0 0;
  font-size: clamp(1.3rem, 2.2vw, 2rem);
  letter-spacing: -.04em;
}
.ux-hero p { margin: 0; color: rgba(255,255,255,.76); }
.ux-eyebrow {
  display: block;
  color: rgba(255,255,255,.62);
  font-size: .72rem;
  font-weight: 900;
  letter-spacing: .14em;
  text-transform: uppercase;
}
.ux-action-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}
.ux-action {
  min-height: 118px;
  padding: 16px;
  border: 1px solid rgba(255,255,255,.14);
  border-radius: 16px;
  color: #fff;
  text-align: left;
  background: rgba(255,255,255,.09);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.08);
  transition: transform .14s ease, background .14s ease, border-color .14s ease;
}
.ux-action:hover {
  transform: translateY(-2px);
  background: rgba(255,255,255,.14);
  border-color: rgba(255,255,255,.28);
}
.ux-action.primary {
  background: linear-gradient(135deg, #c0161e, #f05a28);
  border-color: rgba(255,255,255,.24);
}
.ux-action span {
  display: inline-grid;
  place-items: center;
  width: 30px;
  height: 30px;
  margin-bottom: 12px;
  border-radius: 10px;
  color: #07111f;
  background: #fff;
  font-weight: 950;
}
.ux-action strong {
  display: block;
  font-size: 1.02rem;
  line-height: 1.15;
}
.ux-action small {
  display: block;
  margin-top: 6px;
  color: rgba(255,255,255,.72);
  line-height: 1.35;
}

.button {
  border: 1px solid transparent;
  border-radius: 9px;
  padding: 11px 17px;
  font-weight: 800;
  color: #fff;
  background: var(--red);
}
.button:hover { background: var(--red-dark); }
.button.secondary { color: var(--ink); background: #fff; border-color: var(--line); }
.button.secondary:hover { background: #f2f4f6; }
.button.success { background: var(--green); }
.button.warning { background: var(--amber); }
.button.danger { background: var(--red); }
.button.small { padding: 8px 11px; border-radius: 8px; font-size: .82rem; }
.button.block { width: 100%; }
.button:disabled { opacity: .5; cursor: not-allowed; }
.icon-button { border: 0; background: transparent; font-size: 1.4rem; padding: 4px 8px; color: var(--muted); }
.hidden { display: none !important; }

.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 9px;
  border-radius: 999px;
  font-size: .76rem;
  font-weight: 800;
  background: #e4e8ec;
  color: #2c3a47;
}
.badge.success { color: var(--green); background: var(--green-soft); }
.badge.warning { color: var(--amber); background: var(--amber-soft); }
.badge.danger { color: #9b0c13; background: var(--red-soft); }
.badge.info { color: var(--blue); background: var(--blue-soft); }
.badge.vehicle-status-1 { color: #14532d; background: #bbf7d0; }
.badge.vehicle-status-2 { color: #ffffff; background: #166534; }
.badge.vehicle-status-3 { color: #713f12; background: #fde68a; }
.badge.vehicle-status-4 { color: #ffffff; background: #b91c1c; }
.badge.vehicle-status-6 { color: #ffffff; background: linear-gradient(135deg, #111827 0 52%, #6b7280 52% 100%); }

.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 12px 13px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
th { color: #fff; font-size: .72rem; text-transform: uppercase; letter-spacing: .05em; background: #1a3a5c; font-weight: 800; }
.ba-protocol-table th { background: #f6f7f8; color: var(--muted); font-weight: 700; }
tr:last-child td { border-bottom: 0; }
tr:hover td { background: #fcfcfd; }

.list { display: grid; gap: 10px; }
.list-item {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
}
.list-item strong { display: block; }
.list-item small { color: var(--muted); }
.meta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 7px; }
.muted { color: var(--muted); }

.notice {
  margin-bottom: 18px;
  padding: 13px 15px;
  border-radius: 12px;
  border: 1px solid #e7cf9e;
  color: #674004;
  background: #fff7e8;
  font-size: .9rem;
}
.notice.danger { border-color: #e8b3b7; color: #7e0b12; background: #fff0f1; }
.notice.info { border-color: #b9d7e7; color: #174e70; background: #eef7fb; }

.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.field { display: grid; gap: 6px; }
.field.full { grid-column: 1 / -1; }
.field label { font-size: .82rem; font-weight: 800; color: #39444f; }
.field input, .field select, .field textarea {
  width: 100%;
  border: 1px solid #cdd3d9;
  border-radius: 10px;
  padding: 10px 11px;
  color: var(--ink);
  background: #fff;
}
.field textarea { min-height: 105px; resize: vertical; }
.form-actions { display: flex; justify-content: flex-end; gap: 9px; margin-top: 16px; }
.checkbox-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.checkline { display: flex; gap: 8px; align-items: flex-start; padding: 8px; border: 1px solid var(--line); border-radius: 9px; }

.progress { height: 9px; overflow: hidden; border-radius: 99px; background: #e8ebee; }
.progress > span { display: block; height: 100%; width: 0; background: var(--green); transition: width .25s; }
.progress.warning > span { background: var(--amber); }
.progress.danger > span { background: var(--red); }

.incident-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px;
  margin-bottom: 16px;
  color: #fff;
  background: linear-gradient(120deg, #7a0d12, var(--red));
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.incident-banner h2 { margin: 0; }
.incident-banner p { margin: 5px 0 0; opacity: .82; }
.incident-time { text-align: right; font-variant-numeric: tabular-nums; }
.incident-time strong { display: block; font-size: 1.4rem; }

.response-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.response-column { min-height: 180px; padding: 12px; border: 1px solid var(--line); border-radius: 12px; background: #f8f9fa; }
.response-column h3 { display: flex; justify-content: space-between; align-items: center; margin: 0 0 10px; font-size: .9rem; }
.person-chip { margin-bottom: 7px; padding: 9px; border: 1px solid var(--line); border-radius: 9px; background: #fff; }
.person-chip strong { display: block; font-size: .87rem; }
.person-chip small { color: var(--muted); }
.person-actions { display: flex; gap: 5px; margin-top: 8px; flex-wrap: wrap; }

.ba-card { padding: 18px; position: relative; overflow: hidden; }
.ba-card.warning { border-color: #d68a00; border-width: 2px; box-shadow: 0 0 0 3px rgba(216,148,47,.15); }
.ba-card.danger { border-color: var(--red); border-width: 2px; box-shadow: 0 0 0 4px rgba(192,22,30,.15); }
.ba-head { display: flex; justify-content: space-between; gap: 12px; }
.ba-head h3 { margin: 0; font-size: 1.1rem; }
.ba-timer { font-size: 1.7rem; font-weight: 900; font-variant-numeric: tabular-nums; }
.ba-members { display: grid; gap: 7px; margin: 14px 0; }
.ba-member { display: flex; justify-content: space-between; gap: 10px; padding: 9px 10px; background: #f6f7f8; border-radius: 9px; }
.ba-member span:last-child { font-weight: 800; }
.ba-controls { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 7px; margin-top: 13px; }
.ba-alert { margin-top: 12px; padding: 10px; color: #7f0b12; background: #ffecee; border: 1px solid #efb7bb; border-radius: 9px; font-weight: 800; }

.timeline { position: relative; display: grid; gap: 0; }
.timeline-item { position: relative; padding: 0 0 18px 26px; border-left: 2px solid #e1e5e8; margin-left: 6px; }
.timeline-item::before { content: ""; position: absolute; left: -6px; top: 3px; width: 10px; height: 10px; border-radius: 50%; background: var(--red); }
.timeline-item:last-child { border-left-color: transparent; }
.timeline-item time { color: var(--muted); font-size: .78rem; }
.timeline-item p { margin: 3px 0 0; }

.empty { text-align: center; padding: 34px 18px; color: var(--muted); }
.empty strong { display: block; color: var(--ink); margin-bottom: 5px; }

#toast-region { position: fixed; right: 18px; bottom: 18px; z-index: 100; display: grid; gap: 9px; }
.toast { min-width: 250px; max-width: 420px; padding: 12px 14px; color: #fff; background: #202830; border-radius: 10px; box-shadow: var(--shadow); animation: toast-in .2s ease-out; }
.toast.error { background: #8d1118; }
@keyframes toast-in { from { transform: translateY(8px); opacity: 0; } }
@keyframes toast-out { to { transform: translateY(8px); opacity: 0; } }
.toast.toast-out { animation: toast-out .4s ease-in forwards; }

dialog { width: min(680px, calc(100vw - 28px)); border: 0; border-radius: 16px; padding: 0; box-shadow: 0 25px 80px rgba(0,0,0,.3); }
dialog::backdrop { background: rgba(18,23,28,.58); backdrop-filter: blur(2px); }
.modal-card { padding: 0; }
.modal-header { display: flex; justify-content: space-between; align-items: center; padding: 16px 18px; border-bottom: 1px solid var(--line); }
.modal-header h2 { margin: 0; font-size: 1.15rem; }
#modal-body { padding: 18px; max-height: 75vh; overflow: auto; }

.report-sheet { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; }
.report-header { display: flex; justify-content: space-between; border-bottom: 3px solid var(--red); padding-bottom: 14px; margin-bottom: 18px; }
.report-header h2 { margin: 0; }
.report-number { font-weight: 900; color: var(--red); }

@media (max-width: 1050px) {
  .grid.cols-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid.cols-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .response-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ba-controls { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ux-action-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .brand-logo { width: min(1400px, 86vw); height: 194px; }
}

@media (max-width: 760px) {
  :root { --topbar-height: 68px; }
  .topbar { grid-template-columns: 1fr auto; padding: 6px 10px; }
  .brand { grid-column: 1; justify-self: center; }
  .brand-logo { width: min(680px, 78vw); height: 158px; }
  .brand-copy { display: none; }
  .brand span { display: none; }
  .brand-mark { width: 40px; height: 40px; }
  .role-picker span { display: none; }
  .topbar-actions { grid-column: 2; }
  .layout { display: block; }
  .sidebar {
    position: fixed;
    z-index: 40;
    left: 0;
    right: 0;
    bottom: 0;
    top: auto;
    height: 70px;
    display: flex;
    overflow-x: auto;
    padding: 7px;
    border-right: 0;
    border-top: none;
    box-shadow: 0 -4px 16px rgba(13,27,42,.28);
  }
  .nav-item { min-width: 75px; display: grid; place-items: center; gap: 2px; padding: 5px; margin: 0; font-size: .64rem; text-align: center; border-left: none; border-top: 4px solid transparent; border-radius: 0; }
  .nav-item:hover { border-top-color: transparent; border-left-color: transparent; }
  .nav-item.active { border-left-color: transparent; border-top-color: var(--nav-active-border); background: var(--nav-active-bg); }
  .nav-item span { width: auto; font-size: 1.1rem; }
  .nav-item.nav-pending::after { top: 2px; right: 6px; }
  main { padding: 18px 13px 92px; }
  .page-header { display: block; }
  .page-actions { justify-content: flex-start; margin-top: 13px; }
  .grid.cols-2, .grid.cols-3, .grid.cols-4, .form-grid, .checkbox-grid { grid-template-columns: 1fr; }
  .response-grid { grid-template-columns: 1fr; }
  .ux-hero { padding: 16px; }
  .ux-hero-main { display: block; }
  .ux-action-grid { grid-template-columns: 1fr; }
  .ux-action { min-height: 92px; }
  .field.full { grid-column: auto; }
  .incident-banner { align-items: flex-start; }
  .incident-time { min-width: 82px; }
}

@media print {
  .topbar, .sidebar, .page-header, .notice, .no-print, #toast-region { display: none !important; }
  body, main { background: #fff; padding: 0; }
  .layout { display: block; }
  .report-sheet { border: 0; padding: 0; }
}


/* Version 5 */
.section-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; margin: 0 0 12px; }
.section-heading h2 { margin: 0; font-size: 1.06rem; }
.section-heading p { margin: 4px 0 0; color: var(--muted); font-size: .88rem; }
.archive-card { overflow: hidden; }
.archive-card > summary { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 15px 18px; cursor: pointer; font-weight: 850; list-style: none; }
.archive-card > summary::-webkit-details-marker { display: none; }
.archive-card[open] > summary { border-bottom: 1px solid var(--line); }
.archive-content { display: grid; gap: 8px; padding: 12px 18px 18px; }
.completed-team { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 11px 12px; border: 1px solid var(--line); border-radius: 10px; background: #fafbfb; }
.completed-team strong { display: block; }
.input-suffix { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: stretch; }
.input-suffix input { border-radius: 10px 0 0 10px; }
.input-suffix span { display: flex; align-items: center; padding: 0 12px; border: 1px solid #cdd3d9; border-left: 0; border-radius: 0 10px 10px 0; color: var(--muted); background: #f6f7f8; font-weight: 800; }
.notice .button { margin-left: 8px; vertical-align: middle; }
@media (max-width: 640px) {
  .section-heading { align-items: center; }
  .completed-team { align-items: flex-start; }
}

/* Version 6 */
.qualification-line { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; margin-bottom: 6px; }
.button.tiny { padding: 4px 7px; border-radius: 7px; font-size: .72rem; }

.assignment-hint {
  display: block;
  margin-top: 4px;
  line-height: 1.2;
}

/* Version 10: fahrzeugbezogene Statusführung */
.vehicle-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}
.vehicle-card {
  padding: 15px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: #fafbfb;
}
.vehicle-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}
.vehicle-card-head h3 { margin: 0; font-size: 1.08rem; }
.vehicle-card-head p { margin: 4px 0 0; color: var(--muted); font-size: .84rem; }
.vehicle-times {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin: 13px 0;
}
.vehicle-times span {
  padding: 9px 10px;
  border-radius: 9px;
  background: #fff;
  border: 1px solid var(--line);
}
.vehicle-times small { display: block; color: var(--muted); font-size: .72rem; }
.vehicle-times strong { display: block; margin-top: 2px; font-size: 1.05rem; }
.vehicle-crew { display: grid; gap: 4px; margin-bottom: 13px; font-size: .83rem; }
.vehicle-actions { display: flex; flex-wrap: wrap; gap: 7px; }
@media (max-width: 900px) {
  .vehicle-grid { grid-template-columns: 1fr; }
}

/* Version 11: FwDV-7-orientierte Atemschutzdarstellung */
.ba-member-detail {
  align-items: flex-start;
  gap: 16px;
}
.ba-member-detail > span {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.ba-member-detail > span:last-child {
  text-align: right;
  align-items: flex-end;
}
.ba-member-detail small {
  color: var(--muted);
  font-weight: 500;
  line-height: 1.25;
}
.return-calculation {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin: 10px 0;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #f7f8f9;
  font-size: .88rem;
}
.return-calculation span {
  color: var(--muted);
}
.return-calculation.warning-box {
  border-color: #d68a00;
  background: #fff6df;
}
.return-calculation.danger-box {
  border-color: #bb1822;
  background: #fff0f1;
}


/* Version 12: einheitliche Atemschutz-Zeitleiste, Verbrauchsprognose und bestätigungspflichtige Warnungen */
.ba-schedule-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin: 14px 0 10px;
}
.ba-schedule-cell {
  min-height: 82px;
  padding: 10px 11px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #f7f8f9;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.ba-schedule-cell small { color: var(--muted); font-weight: 750; }
.ba-schedule-cell strong { margin: 2px 0; font-size: 1.22rem; font-variant-numeric: tabular-nums; }
.ba-schedule-cell span { color: var(--muted); font-size: .76rem; }
.ba-schedule-cell.due { border-color: #d68a00; background: #fff6df; }
.ba-schedule-cell.critical { border-color: #bb1822; background: #fff0f1; color: #960d16; }
.ba-pressure-scroll { overflow-x: auto; margin: 12px 0; }
.ba-pressure-table { min-width: 900px; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.ba-pressure-row {
  display: grid;
  grid-template-columns: 1.35fr .7fr .75fr .75fr 1.15fr .95fr .9fr;
  align-items: center;
  min-height: 44px;
  border-top: 1px solid var(--line);
}
.ba-pressure-row:first-child { border-top: 0; }
.ba-pressure-row > span { padding: 9px 10px; font-size: .82rem; font-variant-numeric: tabular-nums; }
.ba-pressure-row.header { background: #eef1f3; color: var(--muted); font-weight: 800; text-transform: uppercase; letter-spacing: .025em; }
.ba-pressure-row:not(.header):nth-child(odd) { background: #fafbfb; }
.ba-forecast-note {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 10px 12px;
  border-left: 4px solid #2578a6;
  background: #eef7fc;
  border-radius: 8px;
  font-size: .84rem;
}
.ba-forecast-note span { color: var(--muted); }
.ba-time-line {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 14px;
  margin-top: 10px;
  color: var(--muted);
  font-size: .78rem;
}
.ba-warning-stack { display: grid; gap: 8px; margin-top: 12px; }
.ba-warning-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 11px 12px;
  border-radius: 10px;
  border: 2px solid #d68a00;
  background: #fff6df;
}
.ba-warning-item.danger { border-color: #bb1822; background: #fff0f1; }
.ba-warning-item strong { display: block; }
.ba-warning-item small { display: block; margin-top: 2px; color: var(--muted); font-weight: 600; }
@media (max-width: 900px) {
  .ba-schedule-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 560px) {
  .ba-schedule-grid { grid-template-columns: 1fr; }
  .ba-warning-item { align-items: stretch; flex-direction: column; }
}

/* Version 14: Drucktabelle auf schmalen Screens stapeln statt horizontal scrollen */
@media (max-width: 600px) {
  .ba-pressure-scroll { overflow-x: visible; }
  .ba-pressure-table { min-width: 0; }
  .ba-pressure-row { grid-template-columns: 1fr; }
  .ba-pressure-row.header { display: none; }
  .ba-pressure-row:not(.header):nth-child(odd) { background: transparent; }
  .ba-pressure-row > span { padding: 5px 12px; display: flex; justify-content: space-between; gap: 12px; }
  .ba-pressure-row > span[data-label]::before { content: attr(data-label); color: var(--muted); font-weight: 700; }
  .ba-pressure-row > span:first-child { font-size: 1rem; padding-top: 9px; }
}

/* Version 17: Atemschutz-Einsatzprotokoll im Bericht */
.ba-protocol { margin-top: 22px; border-top: 2px solid var(--red); padding-top: 14px; }
.ba-protocol h3 { margin: 0 0 10px; }
.ba-protocol-entry { margin-bottom: 16px; }
.ba-protocol-entry h4 { margin: 0 0 2px; font-size: .98rem; }
.ba-protocol-table { width: 100%; border-collapse: collapse; margin-top: 6px; font-size: .82rem; }
.ba-protocol-table th, .ba-protocol-table td { border: 1px solid var(--line); padding: 4px 7px; text-align: left; }
.ba-protocol-table th { background: #f6f7f8; }

/* Version 18: Truppmitglieder nebeneinander im Anlegen-/Bereitstellen-Formular */
.trupp-members { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin-top: 14px; }
.trupp-member { margin: 0; border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; display: grid; gap: 10px; }
.trupp-member legend { padding: 0 6px; font-size: .85rem; font-weight: 800; color: #39444f; }
@media (max-width: 560px) { .trupp-members { grid-template-columns: 1fr; } }

/* Version 21: reduzierte Atemschutz-Hauptansicht und Lehrgangsauswahl */
.ba-active-grid { grid-template-columns: minmax(0, 1fr); }
.ba-card-v21 { padding: 20px; }
.ba-next-action {
  display: grid;
  gap: 3px;
  margin: 15px 0 12px;
  padding: 13px 15px;
  border: 1px solid #b9d7e7;
  border-left: 5px solid var(--blue);
  border-radius: 11px;
  background: var(--blue-soft);
}
.ba-next-action small { color: var(--muted); font-weight: 800; text-transform: uppercase; letter-spacing: .045em; }
.ba-next-action strong { font-size: 1.05rem; }
.ba-next-action span { color: var(--muted); font-size: .84rem; }
.ba-next-action.warning { border-color: #e3bd76; border-left-color: var(--amber); background: var(--amber-soft); }
.ba-next-action.danger { border-color: #e8b3b7; border-left-color: var(--red); background: var(--red-soft); }
.ba-core-members { display: grid; gap: 9px; }
.ba-core-member {
  display: grid;
  grid-template-columns: minmax(180px, 1.4fr) repeat(3, minmax(120px, .8fr));
  align-items: center;
  gap: 10px;
  padding: 11px 13px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: #fafbfb;
}
.ba-core-member > div { min-width: 0; }
.ba-core-member small { display: block; color: var(--muted); font-size: .72rem; }
.ba-core-member strong { display: block; font-variant-numeric: tabular-nums; }
.ba-core-member > div:first-child strong { font-size: 1rem; }
.ba-core-member.critical { border: 2px solid var(--red); background: var(--red-soft); }
.ba-measured-critical {
  display: grid;
  gap: 2px;
  margin-top: 10px;
  padding: 11px 13px;
  border: 2px solid var(--red);
  border-radius: 10px;
  color: #870d15;
  background: #fff0f1;
}
.ba-measured-critical span { font-size: .84rem; }
.ba-controls-primary { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.ba-details { margin-top: 13px; border-top: 1px solid var(--line); }
.ba-details > summary { cursor: pointer; padding: 12px 2px 2px; color: var(--blue); font-weight: 800; }
.ba-details-content { padding-top: 10px; }
.ba-details .ba-pressure-table { min-width: 860px; }

.training-picker-field { margin-top: 5px; }
.training-catalog {
  max-height: 430px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fafbfb;
}
.training-group { border-bottom: 1px solid var(--line); }
.training-group:last-child { border-bottom: 0; }
.training-group > summary {
  position: sticky;
  top: 0;
  z-index: 1;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  cursor: pointer;
  background: #f2f4f5;
  font-weight: 850;
}
.training-options { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; padding: 10px; }
.training-option {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #fff;
  cursor: pointer;
}
.training-option:hover { border-color: #9eabb5; }
.training-option input { width: auto; margin-top: 3px; }
.training-option strong, .training-option small { display: block; }
.training-option strong { font-size: .84rem; line-height: 1.25; }
.training-option small { margin-top: 2px; color: var(--muted); font-size: .72rem; }
.training-source-note { color: var(--muted); font-size: .76rem; }
.training-option--has { background: #f0f7f2; border-color: #b8ddc8; }
.training-option--has small { color: #2d7a4a; }
dialog:has(#member-form) { width: min(980px, calc(100vw - 28px)); }
dialog:has(#qual-training-filter) { width: min(980px, calc(100vw - 28px)); }
.field-group-inline { display: contents; }
.field-group-inline.hidden > * { display: none; }
.rank-check-current, .rank-check-next { display: flex; flex-direction: column; gap: 2px; margin-bottom: 4px; }
.rank-check-current { padding-bottom: 12px; border-bottom: 1px solid var(--border); margin-bottom: 12px; }
.rank-check-next { padding-top: 4px; margin-bottom: 12px; }
.rank-check-reqs { display: flex; flex-direction: column; gap: 6px; margin-top: 10px; }
.rank-check-reqs-label { font-size: .8rem; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; margin-bottom: 2px; }
.rank-check-req { display: flex; align-items: center; gap: 10px; padding: 8px 12px; border-radius: 6px; border: 1px solid var(--border); font-size: .9rem; }
.rank-check-req--ok { background: #f0f8f3; border-color: #b6dcc4; }
.rank-check-req--miss { background: #fff8f0; border-color: #f0c890; }
.rank-check-req-icon { font-size: 1.1rem; width: 20px; text-align: center; flex-shrink: 0; }
.rank-check-req--ok .rank-check-req-icon { color: #2d7a4a; }
.rank-check-req--miss .rank-check-req-icon { color: #b35c00; }

@media (max-width: 1000px) {
  .ba-core-member { grid-template-columns: minmax(160px, 1.25fr) repeat(3, minmax(105px, .75fr)); }
  .ba-controls-primary { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 700px) {
  .ba-core-member { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ba-core-member > div:first-child { grid-column: 1 / -1; }
  .ba-controls-primary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .training-options { grid-template-columns: 1fr; }
}
@media (max-width: 430px) {
  .ba-core-member { grid-template-columns: 1fr; }
  .ba-core-member > div:first-child { grid-column: auto; }
  .ba-controls-primary { grid-template-columns: 1fr; }
}
.ba-progress-label { display: flex; justify-content: space-between; gap: 12px; margin: 10px 0 5px; color: var(--muted); font-size: .76rem; }
.ba-progress-label strong { color: var(--ink); font-variant-numeric: tabular-nums; }
.training-source-note a { color: var(--blue); font-weight: 800; }


/* Version 22: bundeslandabhängige Dienstgrade und wiederkehrende Nachweise beim Mitgliedsanlegen */
.rank-source-note {
  padding: 10px 12px;
  border: 1px solid #c8dce8;
  border-radius: 10px;
  color: #24546f;
  background: #eef7fb;
  font-size: .78rem;
}
.rank-source-note a { color: var(--blue); font-weight: 800; }
.certificate-section { margin-top: 2px; }
.certificate-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.certificate-card {
  display: grid;
  gap: 8px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: #fafbfb;
}
.certificate-check { display: flex; align-items: center; gap: 8px; }
.certificate-check input { width: auto; }
.certificate-card input[type="date"] { width: 100%; }
.certificate-card input:disabled { opacity: .55; background: #eef0f2; }
@media (max-width: 700px) {
  .certificate-grid { grid-template-columns: 1fr; }
}


/* Einsatzmonitor */
.monitor-wrap {
  margin: -26px;
  padding: 20px 24px 28px;
  min-height: calc(100vh - 72px);
  background: #0a1420;
  color: #fff;
}
.monitor-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 20px;
  padding-bottom: 14px;
  border-bottom: 1px solid rgba(255,255,255,.1);
}
.monitor-date { font-size: 1.3rem; font-weight: 700; opacity: .65; }
.monitor-clock { font-size: 2.8rem; font-weight: 900; font-variant-numeric: tabular-nums; letter-spacing: -.04em; }
.monitor-alarm-banner {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  padding: 14px 18px;
  margin-bottom: 20px;
  background: linear-gradient(120deg, #7a0d12, var(--red));
  border-radius: 12px;
  animation: mon-pulse 2s ease-in-out infinite;
}
.monitor-alarm-kw { font-size: 1.4rem; font-weight: 900; }
.monitor-alarm-addr { flex: 1; opacity: .85; min-width: 0; }
.monitor-alarm-time { font-size: 1.25rem; font-weight: 900; font-variant-numeric: tabular-nums; white-space: nowrap; }
@keyframes mon-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(192,22,30,.55); }
  50%       { box-shadow: 0 0 0 10px rgba(192,22,30,0); }
}
.monitor-blocks { display: flex; gap: 14px; margin-bottom: 22px; flex-wrap: wrap; }
.monitor-block { flex: 1; min-width: 110px; padding: 18px 16px; border-radius: 12px; text-align: center; }
.monitor-block-count { font-size: 3.4rem; font-weight: 900; letter-spacing: -.05em; line-height: 1; }
.monitor-block-label { margin-top: 7px; font-size: .72rem; font-weight: 800; text-transform: uppercase; letter-spacing: .1em; opacity: .82; }
.monitor-block--green { background: #14532d; border: 2px solid #22c55e; }
.monitor-block--amber { background: #78350f; border: 2px solid #f59e0b; }
.monitor-block--red   { background: #7f1d1d; border: 2px solid #ef4444; }
.monitor-block--blue  { background: #1e3a5f; border: 2px solid #60a5fa; }
.monitor-block--gray  { background: #1e293b; border: 2px solid #475569; }
.monitor-tables { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; }
.monitor-table-title {
  padding: 8px 12px;
  font-size: .7rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .09em;
  border-radius: 8px 8px 0 0;
}
.monitor-green { background: #14532d; color: #bbf7d0; }
.monitor-amber { background: #78350f; color: #fef3c7; }
.monitor-blue  { background: #1e3a5f; color: #bfdbfe; }
.monitor-red   { background: #7f1d1d; color: #fecaca; }
.monitor-table { width: 100%; border-collapse: collapse; font-size: .88rem; }
.monitor-table th {
  background: rgba(255,255,255,.09);
  color: rgba(255,255,255,.6);
  font-size: .66rem;
  padding: 7px 10px;
  text-transform: uppercase;
  letter-spacing: .06em;
  font-weight: 800;
}
.monitor-table td { padding: 9px 10px; border-bottom: 1px solid rgba(255,255,255,.07); vertical-align: middle; }
.monitor-table tr:last-child td { border-bottom: 0; }
.monitor-table tr:hover td { background: rgba(255,255,255,.04); }
.mon-name { font-weight: 700; }
.mon-rank { color: rgba(255,255,255,.45); font-size: .78rem; }
.mon-check { text-align: center; }
.mon-tick { color: #4ade80; font-weight: 900; }
.mon-empty { text-align: center; color: rgba(255,255,255,.3); padding: 18px; }
@media (max-width: 760px) {
  .monitor-wrap { margin: -18px -13px -92px; padding: 14px 13px 24px; }
  .monitor-clock { font-size: 2rem; }
  .monitor-block-count { font-size: 2.4rem; }
}

/* Divera Next-style sidebar group labels */
.nav-group-label {
  padding: 16px 13px 5px;
  font-size: .63rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .12em;
  color: rgba(255,255,255,.32);
  pointer-events: none;
}

/* Divera-style sub-tab navigation */
.tab-nav {
  display: flex;
  gap: 0;
  border-bottom: 1px solid var(--line);
  margin-bottom: 18px;
}
.tab-nav button {
  padding: 9px 16px;
  border: 0;
  border-bottom: 3px solid transparent;
  background: transparent;
  color: var(--muted);
  font-weight: 700;
  text-transform: uppercase;
  font-size: .72rem;
  letter-spacing: .06em;
  margin-bottom: -1px;
  transition: color .15s, border-color .15s;
}
.tab-nav button.active { color: var(--red); border-bottom-color: var(--red); font-weight: 800; }
.tab-nav button:hover:not(.active) { color: var(--ink); }

/* Version 23: begrenzte Funktionsplätze je Fahrzeug */
.assignment-hint {
  min-height: 1.1rem;
  transition: color .15s ease;
}
.assignment-hint.capacity-full {
  color: var(--amber);
  font-weight: 800;
}
.assignment-hint.capacity-error {
  color: var(--red);
  font-weight: 800;
}

/* ─── Standalone-Modus (Wachmonitor / Fahrzeug-Display) ─────── */
.standalone .topbar,
.standalone .sidebar { display: none !important; }
.standalone .layout { grid-template-columns: 1fr !important; }
.standalone main { min-height: 100vh; padding: 0; }

/* ─── Wachmonitor ─────────────────────────────────────────────── */
.wm-wrap { display: flex; flex-direction: column; min-height: 100vh; background: #0a1420; color: #fff; }
.wm-header { display: flex; justify-content: space-between; align-items: center; padding: 14px 28px; background: rgba(255,255,255,.05); border-bottom: 1px solid rgba(255,255,255,.09); }
.wm-org { font-size: 1rem; font-weight: 700; opacity: .6; }
.wm-clock { font-size: 2.4rem; font-weight: 900; font-variant-numeric: tabular-nums; letter-spacing: -.04em; }
.wm-body { flex: 1; padding: 24px 28px; }
.wm-alarm-banner { background: linear-gradient(115deg, #7a0d12, #c0161e); border-radius: 14px; padding: 20px 26px; margin-bottom: 22px; animation: mon-pulse 2s ease-in-out infinite; }
.wm-alarm-kw { font-size: 3rem; font-weight: 900; letter-spacing: -.04em; line-height: 1; }
.wm-alarm-addr { font-size: 1.4rem; margin-top: 8px; opacity: .88; }
.wm-map-container { height: 300px; border-radius: 10px; overflow: hidden; margin: 18px 0 12px; position: relative; background: #1a1a2e; }
.wm-map-hint { display: flex; align-items: center; justify-content: center; height: 100%; color: rgba(255,255,255,.45); font-size: .9rem; }
.wm-map-nav-link { display: inline-block; margin-top: 4px; color: rgba(255,255,255,.7); font-size: .85rem; text-decoration: underline; }
.wm-map-nav-link:hover { color: #fff; }
.wm-map-pin { font-size: 2rem; line-height: 1; filter: drop-shadow(0 2px 6px rgba(0,0,0,.6)); }
.wm-map-pin--inc { font-size: 2.2rem; }
.wm-map-pin--sta { font-size: 2rem; }
.wm-alarm-details { margin-top: 12px; padding-top: 12px; border-top: 1px solid rgba(255,255,255,.22); font-size: 1rem; opacity: .75; }
.wm-alarm-timer { font-size: 2rem; font-weight: 900; font-variant-numeric: tabular-nums; white-space: nowrap; }
.wm-grid { display: grid; gap: 14px; }
.wm-col { border-radius: 12px; overflow: hidden; }
.wm-col-header { padding: 11px 18px; font-size: .7rem; font-weight: 900; text-transform: uppercase; letter-spacing: .12em; display: flex; justify-content: space-between; align-items: center; }
.wm-col-count { font-size: 1.8rem; font-weight: 900; }
.wm-col--green .wm-col-header { background: #14532d; color: #bbf7d0; }
.wm-col--gray  .wm-col-header { background: #1e293b; color: #94a3b8; }
.wm-col--red   .wm-col-header { background: #7f1d1d; color: #fca5a5; }
.wm-col--amber .wm-col-header { background: #78350f; color: #fde68a; }
.wm-col-body { background: rgba(255,255,255,.04); padding: 4px 0; }
.wm-member { display: flex; align-items: center; padding: 10px 18px; border-bottom: 1px solid rgba(255,255,255,.06); }
.wm-member:last-child { border-bottom: 0; }
.wm-member-name { font-weight: 700; font-size: .98rem; }
.wm-member-rank { font-size: .78rem; opacity: .48; margin-top: 2px; }
.wm-empty { padding: 16px 18px; opacity: .3; font-style: italic; font-size: .9rem; }
.wm-no-alarm { display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 65vh; text-align: center; opacity: .35; gap: 16px; }
.wm-no-alarm-icon { font-size: 4rem; line-height: 1; }
.wm-no-alarm-label { font-size: 1.6rem; font-weight: 700; }
.monitor-incidents { display: flex; flex-direction: column; gap: 10px; margin-bottom: 18px; }
.monitor-incident-card { background: #1a0606; border: 2px solid #dc2626; border-radius: 10px; padding: 12px 16px; }
.monitor-incident-kw { font-size: 1.45rem; font-weight: 900; color: #fca5a5; line-height: 1.1; }
.monitor-incident-addr { font-size: .88rem; color: rgba(255,255,255,.62); margin-top: 3px; }
.monitor-incident-meta { display: flex; gap: 10px; align-items: center; margin-top: 8px; flex-wrap: wrap; }
.monitor-incident-timer { font-size: 1.1rem; font-weight: 800; color: #f87171; font-variant-numeric: tabular-nums; }
.monitor-incident-badge { font-size: .72rem; font-weight: 700; padding: 2px 8px; border-radius: 6px; background: rgba(255,255,255,.12); color: rgba(255,255,255,.75); }
.monitor-incident-badge--red { background: rgba(220,38,38,.3); color: #fca5a5; }
.monitor-links { display: flex; gap: 16px; margin-top: 22px; padding-top: 16px; border-top: 1px solid rgba(255,255,255,.08); }
.monitor-link { color: rgba(255,255,255,.38); font-size: .75rem; font-weight: 700; text-decoration: none; text-transform: uppercase; letter-spacing: .07em; transition: color .15s; }
.monitor-link:hover { color: rgba(255,255,255,.7); }

/* ─── Fahrzeug-Display ────────────────────────────────────────── */
.fz-wrap { display: flex; flex-direction: column; min-height: 100vh; background: var(--background); }
.fz-header { display: flex; justify-content: space-between; align-items: center; padding: 14px 22px; background: #0d1929; color: #fff; }
.fz-vehicle-name { font-size: 1.4rem; font-weight: 900; }
.fz-vehicle-status { display: inline-block; margin-left: 12px; padding: 3px 11px; border-radius: 99px; font-size: .73rem; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; background: rgba(255,255,255,.14); }
.fz-vehicle-status.badge.vehicle-status-1 { background: #bbf7d0; color: #14532d; }
.fz-vehicle-status.badge.vehicle-status-2 { background: #166534; color: #fff; }
.fz-vehicle-status.badge.vehicle-status-3 { background: #fde68a; color: #713f12; }
.fz-vehicle-status.badge.vehicle-status-4 { background: #b91c1c; color: #fff; }
.fz-vehicle-status.badge.vehicle-status-6 { background: linear-gradient(135deg, #111827 0 52%, #6b7280 52% 100%); color: #fff; }
.fz-clock { font-size: 1.8rem; font-weight: 900; font-variant-numeric: tabular-nums; letter-spacing: -.04em; }
.fz-body { flex: 1; padding: 20px 22px; }
.fz-alarm-card { border-radius: 14px; padding: 20px 22px; margin-bottom: 20px; background: linear-gradient(115deg, #7a0d12, #c0161e); color: #fff; }
.fz-alarm-kw { font-size: 2.4rem; font-weight: 900; letter-spacing: -.04em; line-height: 1; }
.fz-alarm-addr { font-size: 1.2rem; margin-top: 8px; opacity: .88; }
.fz-alarm-text { margin-top: 12px; padding-top: 12px; border-top: 1px solid rgba(255,255,255,.25); font-size: .98rem; opacity: .8; line-height: 1.55; }
.fz-alarm-timer { font-size: 1.5rem; font-weight: 900; font-variant-numeric: tabular-nums; float: right; white-space: nowrap; }
.fz-section-label { font-size: .68rem; font-weight: 900; text-transform: uppercase; letter-spacing: .12em; color: var(--muted); margin: 20px 0 10px; }
.fz-crew-table { width: 100%; border-collapse: collapse; background: #fff; border-radius: 12px; overflow: hidden; box-shadow: 0 2px 10px rgba(13,27,42,.07); }
.fz-crew-table th { background: #1a3a5c; color: #fff; font-size: .72rem; text-transform: uppercase; letter-spacing: .05em; padding: 10px 16px; text-align: left; font-weight: 800; }
.fz-crew-table td { padding: 12px 16px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.fz-crew-table tr:last-child td { border-bottom: 0; }
.fz-crew-name { font-weight: 700; }
.fz-crew-rank { font-size: .78rem; color: var(--muted); margin-top: 2px; }
.fz-no-data { display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 50vh; text-align: center; gap: 10px; opacity: .5; }
.fz-tab-bar { position: sticky; top: 0; z-index: 20; display: flex; background: #0d1929; border-bottom: 2px solid rgba(255,255,255,.1); }
.fz-tab-btn { flex: 1; padding: 13px 16px; border: 0; border-bottom: 3px solid transparent; background: transparent; color: rgba(255,255,255,.55); font-weight: 700; font-size: .82rem; text-transform: uppercase; letter-spacing: .07em; cursor: pointer; transition: color .15s, border-color .15s; margin-bottom: -2px; }
.fz-tab-btn.active { color: #fff; border-bottom-color: var(--red); }
.fz-tab-btn:hover:not(.active) { color: rgba(255,255,255,.85); }

/* Schnell-Trupp */
.fz-schnell { background: #0d1929; color: #fff; padding: 16px 22px 20px; border-bottom: 2px solid rgba(255,255,255,.09); }
.fz-schnell-title { font-size: .66rem; font-weight: 900; text-transform: uppercase; letter-spacing: .12em; color: rgba(255,255,255,.45); margin-bottom: 14px; }
.fz-schnell-tiles { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 16px; }
.fz-tile { position: relative; padding: 11px 14px; border: 2px solid rgba(255,255,255,.18); border-radius: 10px; cursor: pointer; min-width: 130px; background: rgba(255,255,255,.05); transition: border-color .12s, background .12s; user-select: none; }
.fz-tile.selected { border-color: #22c55e; background: rgba(34,197,94,.15); }
.fz-tile.in-team { opacity: .35; pointer-events: none; }
.fz-tile-check { position: absolute; top: 7px; right: 9px; color: #22c55e; font-weight: 900; font-size: .82rem; opacity: 0; transition: opacity .12s; }
.fz-tile.selected .fz-tile-check { opacity: 1; }
.fz-tile-name { font-weight: 700; font-size: .93rem; }
.fz-tile-rank { font-size: .72rem; opacity: .48; margin-top: 2px; }
.fz-tile-badge { display: inline-block; margin-top: 5px; padding: 1px 7px; border-radius: 4px; font-size: .62rem; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; background: rgba(255,255,255,.12); color: rgba(255,255,255,.7); }
.fz-schnell-footer { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.fz-pressure-ctrl { display: flex; align-items: center; gap: 10px; }
.fz-pressure-btn { width: 40px; height: 40px; border: 2px solid rgba(255,255,255,.22); border-radius: 9px; background: rgba(255,255,255,.08); color: #fff; font-size: 1.3rem; font-weight: 700; cursor: pointer; transition: background .12s; display: flex; align-items: center; justify-content: center; }
.fz-pressure-btn:hover { background: rgba(255,255,255,.18); }
.fz-pressure-val { font-size: 1.05rem; font-weight: 900; font-variant-numeric: tabular-nums; min-width: 68px; text-align: center; }
.fz-deploy-btn { padding: 10px 20px; border: 0; border-radius: 9px; background: #15803d; color: #fff; font-weight: 800; font-size: .9rem; cursor: pointer; transition: background .12s; }
.fz-deploy-btn:disabled { opacity: .38; cursor: not-allowed; }
.fz-deploy-btn:not(:disabled):hover { background: #166534; }
.fz-standby-btn { background: #1a3a5c !important; }
.fz-standby-btn:not(:disabled):hover { background: #0f2338 !important; }
.ba-modal-label { font-size: .63rem; font-weight: 900; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); margin: 16px 0 8px; }
.ba-modal-groups { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 4px; }
.ba-modal-tile { position: relative; padding: 11px 14px 11px 12px; border: 2px solid var(--line); border-radius: 10px; cursor: pointer; min-width: 140px; background: #fff; box-shadow: 0 1px 4px rgba(13,27,42,.06); transition: border-color .12s, background .12s; user-select: none; }
.ba-modal-tile.selected { border-color: #1a3a5c; background: #eef4fb; }
.ba-modal-tile.partial { border-color: #f59e0b; }
.ba-modal-tile-check { position: absolute; top: 7px; right: 9px; color: #1a3a5c; font-weight: 900; font-size: .82rem; opacity: 0; }
.ba-modal-tile.selected .ba-modal-tile-check { opacity: 1; }
.ba-modal-tile-name { font-weight: 800; font-size: .95rem; margin-bottom: 5px; }
.ba-modal-tile-member { font-size: .82rem; color: var(--muted); line-height: 1.5; }
.ba-pres-btn { width: 36px; height: 36px; border: 2px solid #d1d5db; border-radius: 8px; background: #f3f4f6; color: #374151; font-size: 1.15rem; font-weight: 700; cursor: pointer; display: flex; align-items: center; justify-content: center; }
.ba-pres-btn:hover { background: #e5e7eb; }
.fz-trupp-groups { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.fz-trupp-group-tile { position: relative; padding: 12px 16px; border: 2px solid rgba(255,255,255,.18); border-radius: 12px; cursor: pointer; min-width: 150px; background: rgba(255,255,255,.05); transition: border-color .12s, background .12s; user-select: none; }
.fz-trupp-group-tile.selected { border-color: #22c55e; background: rgba(34,197,94,.15); }
.fz-trupp-group-tile.partial { border-color: rgba(234,179,8,.5); }
.fz-trupp-group-check { position: absolute; top: 8px; right: 10px; color: #22c55e; font-weight: 900; font-size: .85rem; opacity: 0; transition: opacity .12s; }
.fz-trupp-group-tile.selected .fz-trupp-group-check { opacity: 1; }
.fz-trupp-group-name { font-weight: 800; font-size: .95rem; margin-bottom: 6px; }
.fz-trupp-group-member { font-size: .83rem; opacity: .8; line-height: 1.5; }
.fz-trupp-group-member.in-team { opacity: .4; }
.fz-tg-badge { display: inline-block; margin-left: 5px; padding: 1px 6px; border-radius: 4px; font-size: .6rem; font-weight: 800; text-transform: uppercase; vertical-align: middle; }
.fz-tg-badge.red { background: rgba(192,22,30,.5); color: #fde8ea; }
.fz-tg-badge.grey { background: rgba(255,255,255,.15); color: rgba(255,255,255,.6); }
.fz-pressure-list { border-top: 1px solid rgba(255,255,255,.12); padding-top: 14px; margin-bottom: 14px; }
.fz-pressure-list-label { font-size: .63rem; font-weight: 900; text-transform: uppercase; letter-spacing: .1em; color: rgba(255,255,255,.4); margin-bottom: 10px; }
.fz-pressure-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 8px; }
.fz-pressure-name { font-size: .88rem; font-weight: 600; }

/* Schnell-Einteilen (Fahrzeug-Tab) */
.fz-quick-add { margin-top: 20px; border: 2px solid var(--line); border-radius: 12px; overflow: hidden; }
.fz-quick-add-label { background: #1a3a5c; color: #fff; font-size: .68rem; font-weight: 900; text-transform: uppercase; letter-spacing: .1em; padding: 9px 16px; }
.fz-quick-add-empty { margin-top: 14px; text-align: center; font-size: .82rem; color: var(--muted); padding: 8px 0; }
.fz-crew-tiles { display: flex; gap: 10px; flex-wrap: wrap; padding: 14px 14px 0; }
.fz-crew-tile { position: relative; padding: 11px 14px 11px 12px; border: 2px solid var(--line); border-radius: 10px; cursor: pointer; min-width: 130px; background: #fff; box-shadow: 0 1px 4px rgba(13,27,42,.07); transition: border-color .12s, background .12s; user-select: none; }
.fz-crew-tile.selected { border-color: #1a3a5c; background: #eef4fb; }
.fz-crew-tile-check { position: absolute; top: 7px; right: 9px; color: #1a3a5c; font-weight: 900; font-size: .82rem; opacity: 0; transition: opacity .12s; }
.fz-crew-tile.selected .fz-crew-tile-check { opacity: 1; }
.fz-crew-tile-name { font-weight: 700; font-size: .93rem; }
.fz-crew-tile-rank { font-size: .72rem; color: var(--muted); margin-top: 2px; }
.fz-pos-strip { padding: 12px 14px 14px; border-top: 1px solid var(--line); background: #f7f9fc; margin-top: 14px; }
.fz-pos-strip-label { font-size: .75rem; font-weight: 700; color: #1a3a5c; margin-bottom: 10px; }
.fz-pos-btns { display: flex; gap: 8px; flex-wrap: wrap; }
.fz-pos-btn { padding: 10px 16px; border: 2px solid #1a3a5c; border-radius: 9px; background: #fff; color: #1a3a5c; font-weight: 700; font-size: .85rem; cursor: pointer; transition: background .12s, color .12s; white-space: nowrap; }
.fz-pos-btn:hover { background: #1a3a5c; color: #fff; }
.fz-pos-btn.cancel { border-color: var(--line); color: var(--muted); }
.fz-pos-btn.cancel:hover { background: var(--line); color: var(--text); }
.fz-pos-btn.locked { border-color: var(--line); color: var(--muted); opacity: .38; cursor: not-allowed; }
.fz-pos-btn.locked:hover { background: transparent; color: var(--muted); }

/* Version 25: Sicherheits- und Geräteverbesserungen */
.eligibility-details {
  margin-top: 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fafbfb;
}
.eligibility-details > summary {
  cursor: pointer;
  padding: 10px 12px;
  font-weight: 800;
}
.eligibility-details > div { padding: 0 12px 10px; }
.eligibility-details p { margin: 7px 0; font-size: .82rem; color: var(--muted); }
.fz-status-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 16px;
  padding: 12px;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 10px;
  background: rgba(255,255,255,.05);
}
.fz-tile[aria-disabled="true"] { cursor: not-allowed; opacity: .58; }

/* Version 26: zentraler Netzwerkserver und Verbindungsanzeige */
.server-connection {
  position: fixed;
  right: 14px;
  bottom: 14px;
  z-index: 140;
  display: inline-flex;
  align-items: center;
  gap: 0;
  padding: 7px;
  border: 1px solid rgba(255,255,255,.28);
  border-radius: 999px;
  color: #fff;
  background: #334155;
  box-shadow: 0 8px 24px rgba(0,0,0,.28);
  font-size: 0;
  font-weight: 850;
  font-variant-numeric: tabular-nums;
}
.server-connection::before {
  content: "";
  width: 9px;
  height: 9px;
  flex: 0 0 9px;
  border-radius: 50%;
  background: #cbd5e1;
  box-shadow: 0 0 0 3px rgba(203,213,225,.18);
}
.server-connection.online { background: #14532d; }
.server-connection.online::before { background: #4ade80; box-shadow: 0 0 0 3px rgba(74,222,128,.2); }
.server-connection.saving { background: #1e3a8a; }
.server-connection.saving::before { background: #60a5fa; animation: server-pulse 1s ease-in-out infinite; }
.server-connection.connecting,
.server-connection.waiting { background: #854d0e; }
.server-connection.connecting::before,
.server-connection.waiting::before { background: #facc15; animation: server-pulse 1s ease-in-out infinite; }
.server-connection.offline { background: #991b1b; border-radius: 10px; }
.server-connection.offline::before { background: #fca5a5; box-shadow: 0 0 0 3px rgba(252,165,165,.22); }
.server-connection.offline-pending { background: #7c3700; border-radius: 10px; }
.server-connection.offline-pending::before { background: #fb923c; animation: server-pulse 1.4s ease-in-out infinite; box-shadow: 0 0 0 3px rgba(251,146,60,.25); }
.server-connection.synced { background: #14532d; }
.server-connection.synced::before { background: #86efac; animation: server-pulse .6s ease-in-out 3; box-shadow: 0 0 0 3px rgba(134,239,172,.3); }
@keyframes server-pulse { 50% { opacity: .35; transform: scale(.8); } }
body.standalone .server-connection { right: 18px; bottom: 18px; }
@media (max-width: 760px) {
  .server-connection { left: 10px; right: 10px; bottom: 78px; justify-content: center; border-radius: 10px; }
  body.standalone .server-connection { bottom: 10px; }
}
@media print { .server-connection { display: none !important; } }


/* Version 27: Netzwerk-Testbetrieb und gesperrte Atemschutz-Auswahl */
.ba-modal-tile[aria-disabled="true"],
.ba-modal-tile.disabled {
  cursor: not-allowed;
  opacity: .58;
  filter: grayscale(.2);
}

/* Version 28: eindeutiger AGT-Status und direkte Druckeingabe */
.ba-modal-tile-member {
  display: grid;
  gap: 2px;
  margin-top: 5px;
}
.ba-modal-missing,
.fz-trupp-missing {
  display: block;
  font-size: .68rem;
  line-height: 1.3;
}
.ba-modal-missing { color: #9a3412; }
.fz-trupp-missing { margin-top: 2px; color: #fde68a; opacity: .95; }
.ba-modal-tile .fz-tg-badge.grey {
  background: #fef3c7;
  color: #92400e;
}
.ba-modal-tile .fz-tg-badge.red {
  background: #fee2e2;
  color: #991b1b;
}
.fz-tg-badge.green {
  background: rgba(34, 197, 94, .22);
  color: #bbf7d0;
}
.ba-modal-tile .fz-tg-badge.green {
  background: #dcfce7;
  color: #166534;
}
.ba-eligibility-note { margin: 10px 0 0; }
.ba-modal-equipment {
  margin-top: 14px;
  padding-top: 2px;
  border-top: 1px solid var(--line);
}
.fz-pressure-input-wrap {
  width: min(170px, 48vw);
}
.fz-pressure-input-wrap input {
  min-width: 0;
  width: 100%;
  color: #111827;
  background: #fff;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
}
.fz-pressure-input-wrap span {
  color: #111827;
  background: #e5e7eb;
  border-color: #cbd5e1;
}
@media (max-width: 560px) {
  .fz-pressure-row { align-items: stretch; flex-direction: column; }
  .fz-pressure-input-wrap { width: 100%; }
}
.fz-readiness-warning {
  margin-top: 10px;
  padding: 10px 12px;
  border: 1px solid rgba(251, 191, 36, .5);
  border-radius: 9px;
  color: #fef3c7;
  background: rgba(120, 53, 15, .55);
  font-size: .78rem;
  line-height: 1.4;
}

/* Version 29: robuste Personalverwaltung und gebündelte AGT-Nachweise */
.personnel-actions {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 7px;
  min-width: 150px;
}
.personnel-actions .button { white-space: nowrap; }
@media (max-width: 760px) {
  .personnel-actions { min-width: 0; }
}

/* Version 30: Gruppen-Kacheln im Dark-Kontext der Fahrzeug-App */
.fz-schnell .ba-modal-label {
  color: rgba(255,255,255,.42);
  margin-top: 4px;
}
.fz-schnell .ba-modal-groups {
  margin-bottom: 14px;
}
.fz-schnell .ba-modal-tile {
  background: rgba(255,255,255,.07);
  border: 2px solid rgba(255,255,255,.16);
  border-left-width: 5px;
  color: #fff;
  min-width: 160px;
  box-shadow: none;
}
.fz-schnell .ba-modal-tile:not([aria-disabled="true"]):hover {
  background: rgba(255,255,255,.13);
  border-color: rgba(255,255,255,.32);
  border-left-width: 5px;
}
.fz-schnell .ba-modal-tile.selected {
  border-color: #22c55e;
  background: rgba(34,197,94,.16);
  border-left-width: 5px;
}
.fz-schnell .ba-modal-tile-name { color: #fff; font-size: 1rem; }
.fz-schnell .ba-modal-tile-member { color: rgba(255,255,255,.62); }
.fz-schnell .ba-modal-tile-check { color: #22c55e; }
.fz-schnell .ba-modal-tile[data-group="Angriffstrupp"] { border-left-color: #ef4444; }
.fz-schnell .ba-modal-tile[data-group="Wassertrupp"]   { border-left-color: #3b82f6; }
.fz-schnell .ba-modal-tile[data-group="Schlauchtrupp"] { border-left-color: #f59e0b; }
.fz-schnell .ba-modal-tile.selected[data-group="Angriffstrupp"] { border-left-color: #ef4444; }
.fz-schnell .ba-modal-tile.selected[data-group="Wassertrupp"]   { border-left-color: #3b82f6; }
.fz-schnell .ba-modal-tile.selected[data-group="Schlauchtrupp"] { border-left-color: #f59e0b; }

/* Version 30: sichtbare Personalaktionen und freie AGT-Auswahl im Fahrzeug */
.fz-schnell-help {
  margin: -4px 0 12px;
  color: rgba(255,255,255,.65);
  font-size: .82rem;
}
.fz-agt-person-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 9px;
  margin: 12px 0;
}
.fz-agt-person {
  position: relative;
  display: grid;
  gap: 3px;
  min-height: 74px;
  padding: 12px 14px 12px 42px;
  border: 2px solid rgba(255,255,255,.14);
  border-radius: 11px;
  color: #fff;
  background: rgba(255,255,255,.06);
  text-align: left;
}
.fz-agt-person:hover:not(:disabled) { border-color: rgba(255,255,255,.38); }
.fz-agt-person.selected { border-color: #22c55e; background: rgba(20,83,45,.75); }
.fz-agt-person.blocked { opacity: .58; cursor: not-allowed; }
.fz-agt-person strong { font-size: .95rem; }
.fz-agt-person small { color: rgba(255,255,255,.68); line-height: 1.25; }
.fz-agt-check {
  position: absolute;
  left: 13px;
  top: 50%;
  width: 20px;
  height: 20px;
  display: grid;
  place-items: center;
  border: 2px solid rgba(255,255,255,.35);
  border-radius: 50%;
  color: transparent;
  transform: translateY(-50%);
}
.fz-agt-person.selected .fz-agt-check { color: #fff; border-color: #22c55e; background: #15803d; }
.fz-agt-equipment {
  display: grid;
  gap: 9px;
  margin: 14px 0;
  padding: 12px;
  border: 1px solid rgba(255,255,255,.16);
  border-radius: 11px;
  background: rgba(0,0,0,.15);
}
.fz-agt-equipment-row {
  display: grid;
  grid-template-columns: minmax(150px, 1.2fr) repeat(3, minmax(130px, 1fr));
  gap: 10px;
  align-items: end;
  padding: 10px;
  border-radius: 9px;
  background: rgba(255,255,255,.06);
}
.fz-agt-equipment-row label { display: grid; gap: 4px; color: rgba(255,255,255,.72); font-size: .72rem; font-weight: 700; }
.fz-agt-equipment-row input,
.fz-agt-equipment-row select { width: 100%; padding: 8px 9px; border: 1px solid rgba(255,255,255,.25); border-radius: 8px; color: #111827; background: #fff; }
@media (max-width: 900px) {
  .fz-agt-equipment-row { grid-template-columns: 1fr 1fr; }
  .fz-agt-equipment-row > strong { grid-column: 1 / -1; }
}
@media (max-width: 560px) {
  .fz-agt-person-grid, .fz-agt-equipment-row { grid-template-columns: 1fr; }
  .fz-agt-equipment-row > strong { grid-column: auto; }
}

/* ── Hauptprogramm Kacheln ───────────────────────────────────── */
.hp-section { margin-bottom: 32px; }
.hp-section-title {
  font-size: .78rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: .06em; color: var(--muted, #6b7280); margin-bottom: 12px;
}
.hp-tiles {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(148px, 1fr));
  gap: 12px;
}
.hp-tile {
  display: flex; flex-direction: column; align-items: center; text-align: center;
  gap: 5px; padding: 18px 10px; border: 2px solid var(--border);
  border-radius: 12px; background: var(--surface); cursor: pointer;
  text-decoration: none; color: inherit; transition: border-color .15s, background .15s;
}
.hp-tile:hover { border-color: var(--primary); background: var(--surface-raised, #f9fafb); }
.hp-tile--ext  { border-style: dashed; }
.hp-tile-icon  { font-size: 1.75rem; }
.hp-tile-label { font-weight: 700; font-size: .88rem; }
.hp-tile-desc  { font-size: .74rem; color: var(--muted, #6b7280); line-height: 1.3; }

.fleet-editor-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 12px;
  margin-top: 14px;
}
.fleet-editor-card {
  display: grid;
  gap: 10px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--surface);
}
.fleet-editor-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
}
.fleet-editor-head h3 {
  margin: 8px 0 4px;
  font-size: 1rem;
}
.fleet-editor-textarea {
  width: 100%;
  min-height: 110px;
  resize: vertical;
  font-family: ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace;
  line-height: 1.45;
}
.fleet-editor-source {
  margin: 0;
  font-size: .78rem;
}
.fleet-chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.vehicle-link,
.fleet-chip {
  border: 0;
  background: transparent;
  color: var(--primary);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  padding: 0;
  text-align: left;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.vehicle-link:hover,
.fleet-chip:hover { color: var(--primary-dark, #7f1d1d); }
.fleet-chip {
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  padding: 5px 8px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface-raised, #f9fafb);
  color: inherit;
  text-decoration: none;
  font-size: .78rem;
}
.fleet-chip.mini {
  margin: 2px;
  font-size: .74rem;
}
.vehicle-history {
  margin-top: 16px;
}
.vehicle-history h3 {
  margin: 0 0 8px;
}
.loadout-source {
  margin: 0 0 10px;
  color: var(--muted);
  font-size: .78rem;
}
.loadout-check-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 12px;
  margin-bottom: 12px;
}
.loadout-group {
  margin: 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fbfcfd;
}
.loadout-group.optional {
  background: #fffaf0;
  border-color: #f5d08a;
}
.loadout-group legend {
  padding: 0 6px;
  font-size: .78rem;
  font-weight: 900;
  color: #1a3a5c;
}
.loadout-check {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: 12px;
  padding: 8px 8px;
  border-radius: 8px;
  cursor: pointer;
}
.loadout-check:hover {
  background: rgba(29,78,216,.06);
}
.loadout-check input {
  grid-column: 2;
  grid-row: 1;
  margin-top: 3px;
}
.loadout-check span {
  grid-column: 1;
  grid-row: 1;
  line-height: 1.3;
  text-align: left;
}
.unit-suggestions {
  display: grid;
  gap: 8px;
}
.unit-suggestion {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface, #fff);
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.unit-suggestion:hover,
.unit-suggestion.selected {
  border-color: var(--primary);
  background: rgba(139, 17, 24, .06);
}
.unit-suggestion small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
}
@media (max-width: 640px) {
  .fleet-editor-grid { grid-template-columns: 1fr; }
  .fleet-editor-head { flex-direction: column; }
  .loadout-check-grid { grid-template-columns: 1fr; }
  .unit-suggestion { align-items: flex-start; flex-direction: column; }
}

/* ── Dienstplan ─────────────────────────────────────────── */
.dp-tab-bar {
  display: flex;
  gap: 6px;
  margin-bottom: 18px;
}
.dp-tab-btn {
  padding: 7px 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: transparent;
  color: var(--ink);
  font-size: .875rem;
  font-weight: 600;
  cursor: pointer;
}
.dp-tab-btn.active {
  background: var(--red);
  border-color: var(--red);
  color: #fff;
}
.dp-tab-btn:hover:not(.active) {
  background: var(--line);
}

.dp-controls {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}
.dp-month-label {
  font-size: 1rem;
  font-weight: 700;
  min-width: 140px;
  text-align: center;
}

.dp-table-wrap {
  overflow-x: auto;
  border-radius: 10px;
  border: 1px solid var(--line);
}
.dp-table {
  border-collapse: collapse;
  min-width: 100%;
  font-size: .8rem;
}
.dp-table th,
.dp-table td {
  border: 1px solid var(--line);
  padding: 0;
}
.dp-member-th {
  position: sticky;
  left: 0;
  background: var(--surface, #fff);
  z-index: 2;
  min-width: 160px;
  max-width: 200px;
  padding: 6px 10px !important;
  text-align: left;
  font-weight: 600;
}
.dp-mname {
  display: block;
  font-size: .82rem;
  font-weight: 700;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.dp-mrank {
  display: block;
  font-size: .72rem;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.dp-day-th {
  min-width: 36px;
  width: 36px;
  text-align: center;
  font-size: .72rem;
  font-weight: 600;
  padding: 4px 2px;
  background: var(--surface, #fff);
  color: var(--ink);
  white-space: nowrap;
}
.dp-day-th span {
  display: block;
  font-size: .82rem;
  font-weight: 700;
}
.dp-we {
  background: #f0f4ff !important;
}
.dp-cell {
  text-align: center;
  padding: 3px 2px;
  height: 32px;
}
.dp-editable {
  cursor: pointer;
}
.dp-editable:hover {
  background: #f5f7fa;
}
.dp-code {
  display: inline-block;
  min-width: 24px;
  padding: 2px 5px;
  border-radius: 4px;
  font-size: .72rem;
  font-weight: 700;
  line-height: 1.4;
}
.dp-empty {
  display: inline-block;
  width: 20px;
  height: 20px;
}
.dp-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
  font-size: .8rem;
}
.dp-legend-item {
  display: flex;
  align-items: center;
  gap: 5px;
  color: var(--muted);
}
.dp-ausb-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}
.dp-ausb-info { flex: 1; min-width: 0; }
.dp-ausb-actions {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
}
.dp-delete-btn { color: var(--red); border-color: var(--red); }
.dp-delete-btn:hover { background: var(--red-soft); }
.dp-abr-table {
  width: 100%;
  border-collapse: collapse;
}
.dp-abr-table th,
.dp-abr-table td {
  padding: 8px 12px;
  border-bottom: 1px solid var(--line);
  text-align: left;
}
.dp-abr-table th { font-size: .78rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
@media (max-width: 760px) {
  .dp-month-label { min-width: 100px; font-size: .9rem; }
  .dp-member-th { min-width: 120px; }
}

/* FireDeo Integration: Lagekarte */
.lk-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 4px;
}
.lk-sector {
  border: 2px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
  min-height: 58px;
}
.lk-sector-label {
  font-weight: 700;
  font-size: .75rem;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--muted);
  margin-bottom: 6px;
}
.lk-sector-vehicles {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}
.lk-empty {
  font-size: .8rem;
  color: var(--muted);
  font-style: italic;
}
