/* ═══════════════════════════════════════════════════════════════════════
   FW365 Design 2026 – Umsetzung der Designvorlage vom 06.09.2026 fuer ALLE
   Seiten. Dieses Blatt wird nach style.css, pages-layout.css und
   components.css geladen und schaerft die gemeinsamen Bausteine nach:

   - Marke Feuerwehrrot statt Blau (Knoepfe, Links, aktive Navigation)
   - Seitenkopf als dunkle Karte mit weissem Titel und Glas-Knoepfen
   - Karten, Kennzahlen, Tabellen, Plaketten mit groesseren Radien und
     ruhigen Schatten
   - Leerzustaende mit Symbolkreis wie im SAE-Stab

   Keine Vorlage muss dafuer angefasst werden; jede Seite, die die zentralen
   Klassen nutzt, bekommt das Design automatisch. Funktionen bleiben
   unberuehrt: Es aendern sich nur Farben, Abstaende, Radien und Schatten.
   ═══════════════════════════════════════════════════════════════════════ */

/* ─── Marke ───────────────────────────────────────────────────────────── */
:root {
  --brand:              #C8102E;
  --brand-dark:         #A30D25;
  --brand-light:        rgba(200, 16, 46, 0.08);
  --sidebar-active-bg:  rgba(200, 16, 46, 0.10);
  --sidebar-active-text:#A30D25;
  --t-active:           #A30D25;
  --r-md:  12px;
  --r-lg:  18px;
}
@media (prefers-color-scheme: dark) {
  :root {
    --brand:              #FF6B7A;
    --brand-dark:         #FF8A96;
    --brand-light:        rgba(255, 107, 122, 0.16);
    --sidebar-active-bg:  rgba(255, 107, 122, 0.18);
    --sidebar-active-text:#FF8A96;
    --t-active:           #FF8A96;
  }
}

/* ─── Seitenkopf: dunkle Karte wie der Lagekopf ───────────────────────── */
.page-header {
  position: relative;
  isolation: isolate;
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  padding: 22px 26px;
  border-radius: 18px;
  color: #fff;
  background:
    radial-gradient(120% 90% at 85% 10%, rgba(255,255,255,.14), transparent 55%),
    radial-gradient(80% 60% at 20% 100%, rgba(40,90,140,.55), transparent 60%),
    linear-gradient(135deg, #2b3646 0%, #1d2633 45%, #2a3546 100%);
  box-shadow: 0 12px 40px rgba(20,30,45,.22);
  overflow: hidden;
}
.page-header::before {
  content: "";
  position: absolute; inset: 0; z-index: -1; opacity: .35;
  background-image: repeating-linear-gradient(115deg, transparent 0 18px, rgba(255,255,255,.035) 18px 19px);
}
.page-header h1, .page-header .page-title {
  color: #fff;
  font-size: 30px;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.05;
  text-shadow: 0 2px 12px rgba(0,0,0,.25);
}
.page-header p, .page-header .page-subtitle {
  color: rgba(255,255,255,.85);
  font-size: 14px;
  margin-top: 8px;
  max-width: 62ch;
}
.page-header a:not(.btn) { color: #fff; text-decoration: underline; text-decoration-color: rgba(255,255,255,.5); }
.page-header .back-link { color: rgba(255,255,255,.85); font-size: 13px; display: inline-flex; align-items: center; gap: 6px; margin-bottom: 10px; text-decoration: none; }
.page-header .back-link:hover { color: #fff; }
.page-header-actions, .page-header > .page-actions { align-items: center; }
/* Knoepfe im Kopf: Glas, die Hauptaktion in Rot */
.page-header .btn {
  min-height: 46px;
  padding: 0 22px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,.22);
  background: rgba(255,255,255,.14);
  color: #fff;
  font-size: 15px;
  backdrop-filter: blur(8px);
}
.page-header .btn:hover:not(:disabled) { background: rgba(255,255,255,.24); color: #fff; }
.page-header .btn-primary, .page-header .btn.primary {
  background: var(--brand);
  border-color: transparent;
  box-shadow: 0 10px 24px rgba(200,16,46,.32);
}
.page-header .btn-primary:hover:not(:disabled), .page-header .btn.primary:hover:not(:disabled) { background: var(--brand); filter: brightness(1.08); }
.page-header .btn-danger { background: var(--danger); border-color: transparent; }
/* Eingabefelder im Kopf bleiben hell und lesbar */
.page-header input, .page-header select, .page-header textarea {
  background: rgba(255,255,255,.96);
  color: #1d2633;
  border-color: transparent;
  border-radius: 12px;
}
.page-header label, .page-header .form-label { color: rgba(255,255,255,.85); }
.page-header .pill, .page-header .badge { background: rgba(255,255,255,.18); color: #fff; border-radius: 999px; padding: 4px 10px; }
@media (max-width: 768px) {
  .page-header { padding: 18px; gap: 12px; }
  .page-header h1, .page-header .page-title { font-size: 24px; }
  .page-header .btn { min-height: 44px; padding: 0 16px; font-size: 14px; }
}

/* ─── Karten ──────────────────────────────────────────────────────────── */
.card {
  border-radius: 18px;
  box-shadow: 0 1px 2px rgba(0,0,0,.04);
}
.card-head { padding: 14px 18px 12px; }
.card-title { font-size: 15px; font-weight: 700; }
.card-action { font-size: 12.5px; }
.card-body { padding: 6px 0; }
.card:not(:has(> .card-head)):not(:has(> .card-body)) { padding: 18px 20px; }

/* ─── Kennzahlen ──────────────────────────────────────────────────────── */
/* Hoechstens vier Kacheln je Reihe (22 % Mindestbreite), unten zwei: acht
   Kennzahlen stehen als 4+4 statt 7+1, drei als eine Reihe. */
.kpi-row { gap: 12px; grid-template-columns: repeat(auto-fit, minmax(clamp(150px, 22%, 280px), 1fr)); }
.kpi { border-radius: 16px; padding: 16px 18px; box-shadow: 0 1px 2px rgba(0,0,0,.04); min-width: 0; }
.kpi-label { font-size: 12.5px; font-weight: 500; margin-bottom: 6px; white-space: normal; overflow-wrap: anywhere; }
.kpi-value { font-size: 28px; font-weight: 800; }
@media (max-width: 700px) { .kpi-row { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; } }

/* ─── Knoepfe ─────────────────────────────────────────────────────────── */
.btn { border-radius: 12px; }
.btn-primary:hover:not(:disabled), .btn.primary:hover:not(:disabled) { box-shadow: 0 6px 16px rgba(200,16,46,.28); }
.btn-sm { border-radius: 10px; }

/* ─── Tabellen ────────────────────────────────────────────────────────── */
.data-table-wrap, .table-wrapper { border-radius: 14px; overflow: hidden; border: 1px solid var(--border); }
.data-table th { font-size: 11px; letter-spacing: .06em; padding: 12px 14px; }
.data-table td { padding: 14px; }
.data-table tr:hover td { background: var(--bg-card-2); }

/* ─── Plaketten, Listen, Abschnitte ───────────────────────────────────── */
.pill { border-radius: 999px; padding: 4px 10px; font-size: 11px; letter-spacing: .04em; text-transform: uppercase; }
.list-row { padding: 12px 16px; font-size: 13.5px; }
.list-row:hover { background: var(--bg-card-2); }
.section-label { font-size: 13px; font-weight: 700; color: var(--t1); }

/* ─── Leerzustaende ───────────────────────────────────────────────────── */
.empty-state { padding: 48px 24px; }
/* Symbolkreis nur fuer ausgewiesene Symbole, nie fuer Text. */
.empty-state > .empty-state-icon, .empty-state > .empty-icon, .empty-state > svg:first-child {
  width: 96px; height: 96px; margin: 0 auto 16px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: color-mix(in srgb, var(--info) 8%, var(--bg-card-2));
  box-shadow: inset 0 0 0 10px color-mix(in srgb, var(--bg-card) 60%, transparent);
}
.empty-state > svg:first-child { padding: 28px; color: var(--t2); }
.empty-state-title { font-size: 20px; font-weight: 800; letter-spacing: -0.01em; }

/* ─── Formulare ───────────────────────────────────────────────────────── */
.form-input, .form-select, .form-textarea { border-radius: 12px; }
.form-label { font-weight: 600; }

/* ─── Modal ───────────────────────────────────────────────────────────── */
.modal, .modal-box { border-radius: 20px; }

/* ─── Nachtmodus per Schalter: Markenfarben wie in der Systemvorgabe ───── */
:root[data-theme="dark"] {
  --brand:              #FF6B7A;
  --brand-dark:         #FF8A96;
  --brand-light:        rgba(255, 107, 122, 0.16);
  --sidebar-active-bg:  rgba(255, 107, 122, 0.18);
  --sidebar-active-text:#FF8A96;
  --t-active:           #FF8A96;
}

/* ─── Hoher Kontrast (Benutzermenue): kraeftigere Schrift und Raender ──── */
:root[data-contrast="hoch"] {
  --t2:          #2b2f36;
  --t3:          #3d434c;
  --muted:       #2b2f36;
  --border:      rgba(30, 30, 40, 0.42);
  --border-med:  rgba(30, 30, 40, 0.6);
  --sidebar-label: #3d434c;
}
:root[data-contrast="hoch"] .card, :root[data-contrast="hoch"] .kpi, :root[data-contrast="hoch"] .sae-karte { border-width: 1.5px; }
:root[data-contrast="hoch"] .btn { border-width: 1.5px; }
:root[data-contrast="hoch"] a:not(.btn):not(.nav-item) { text-decoration: underline; }
:root[data-contrast="hoch"] .page-header p, :root[data-contrast="hoch"] .page-header .page-subtitle, :root[data-contrast="hoch"] .sae-meta { color: #fff; }
@media (prefers-color-scheme: dark) {
  :root[data-contrast="hoch"]:not([data-theme="light"]) { --t2: #e6e9ef; --t3: #d3d8e0; --muted: #e6e9ef; --border: rgba(255,255,255,.38); --border-med: rgba(255,255,255,.55); }
}
:root[data-theme="dark"][data-contrast="hoch"] { --t2: #e6e9ef; --t3: #d3d8e0; --muted: #e6e9ef; --border: rgba(255,255,255,.38); --border-med: rgba(255,255,255,.55); }

/* ─── Darstellungsmenue ──────────────────────────────────────────────── */
.topbar-nutzer-menue .menue-trenner { height: 1px; background: var(--border); margin: 6px 4px; }
.topbar-nutzer-menue .menue-titel { font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--t2); padding: 8px 12px 2px; }
.topbar-nutzer-menue button.menue-schalter { display: flex; width: 100%; justify-content: space-between; align-items: center; gap: 12px; padding: 9px 12px; border-radius: 8px; border: none; background: transparent; color: var(--t1); font: inherit; font-size: 14px; cursor: pointer; text-align: left; }
.topbar-nutzer-menue button.menue-schalter:hover { background: var(--sidebar-hover); }
.topbar-nutzer-menue button.menue-schalter .wert { font-size: 12px; font-weight: 600; color: var(--brand); }

/* ─── Erzwungenes Hell: Marken-Token der Hellansicht ────────────────────── */
:root[data-theme="light"] {
  --brand:              #C8102E;
  --brand-dark:         #A30D25;
  --brand-light:        rgba(200, 16, 46, 0.08);
  --sidebar-active-bg:  rgba(200, 16, 46, 0.10);
  --sidebar-active-text:#A30D25;
  --t-active:           #A30D25;
}
:root[data-theme="light"][data-contrast="hoch"] {
  --t2:          #2b2f36;
  --t3:          #3d434c;
  --muted:       #2b2f36;
  --border:      rgba(30, 30, 40, 0.42);
  --border-med:  rgba(30, 30, 40, 0.6);
}


/* ─── Dialoge (Untermenues) im ruhigen, klaren Stil ─────────────────────── */
.modal-overlay { background: rgba(18, 20, 26, 0.42); -webkit-backdrop-filter: blur(10px) saturate(1.15); backdrop-filter: blur(10px) saturate(1.15); }
.modal-overlay .modal { border-radius: 20px; box-shadow: 0 32px 90px rgba(0,0,0,.28), 0 0 0 1px rgba(255,255,255,.06) inset; transform: translateY(14px) scale(.98); transition: transform .22s cubic-bezier(.2,.8,.2,1), opacity .2s; }
.modal-overlay.is-open .modal, .modal-overlay.active .modal { transform: translateY(0) scale(1); }
.modal.modal-body { padding: 0; }
.modal.modal-body > .modal-header, .modal .modal-head { margin: 0; padding: 18px 22px 14px; border-bottom: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.modal .modal-header h2, .modal .modal-header h3, .modal .modal-head h2, .modal .modal-head h3, .modal .modal-title { margin: 0; font-size: 17px; font-weight: 700; letter-spacing: -.01em; color: var(--t1); }
.modal .modal-close { width: 30px; height: 30px; display: grid; place-items: center; border-radius: 50%; background: var(--bg-card-2); color: var(--t2); font-size: 18px; line-height: 1; padding: 0; border: none; cursor: pointer; }
.modal .modal-close:hover { background: var(--border); color: var(--t1); }
.modal.modal-body > .form-group, .modal.modal-body > .form-row, .modal.modal-body > p, .modal.modal-body > .checkbox-group, .modal.modal-body > .hinweis, .modal.modal-body > div:not(.modal-header):not(.form-actions):not(.modal-foot) { margin-left: 22px; margin-right: 22px; }
.modal.modal-body > .form-group:first-of-type, .modal.modal-body > .modal-header + * { margin-top: 18px; }
.modal .form-group { margin-bottom: 14px; }
.modal .form-group label, .modal label.form-label { display: block; font-size: 13px; font-weight: 600; color: var(--t2); margin-bottom: 6px; }
.modal .form-group input:not([type="checkbox"]):not([type="radio"]), .modal .form-group select, .modal .form-group textarea, .modal .form-input, .modal .form-select, .modal .form-textarea { width: 100%; min-height: 42px; padding: 9px 14px; border-radius: 12px; border: 1px solid var(--border-med); background: var(--bg-card-2); color: var(--t1); font: inherit; font-size: 15px; transition: border-color .15s, box-shadow .15s; }
.modal .form-group textarea, .modal .form-textarea { min-height: 96px; resize: vertical; }
.modal .form-group input:focus, .modal .form-group select:focus, .modal .form-group textarea:focus, .modal .form-input:focus, .modal .form-select:focus, .modal .form-textarea:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 4px var(--brand-light); background: var(--bg-card); }
.modal .form-group input::placeholder, .modal .form-group textarea::placeholder { color: var(--t3); }
.modal .checkbox-group { border-radius: 12px; }
.modal .form-actions, .modal .modal-foot, .modal .modal-footer { display: flex; justify-content: flex-end; gap: 10px; margin: 6px 0 0; padding: 14px 22px 18px; border-top: 1px solid var(--border); }
.modal .form-actions .btn, .modal .modal-foot .btn, .modal .modal-footer .btn { min-height: 42px; padding: 0 18px; border-radius: 12px; font-weight: 600; }
.modal .btn-secondary { background: var(--bg-card-2); color: var(--t1); border: 1px solid var(--border); }
.modal .btn-secondary:hover { background: var(--border); }
@media (max-width: 640px) {
  .modal-overlay { padding: 0; align-items: flex-end; }
  .modal-overlay .modal { border-radius: 20px 20px 0 0; max-height: 92vh; transform: translateY(24px); }
  .modal .form-row { grid-template-columns: 1fr !important; }
}

/* ═══════════════════════════════════════════════════════════════════════
   Rahmen nach Designvorlage 11.09.2026 (Dashboard-Bild): weisse Seitenleiste
   mit neun aufklappbaren Bereichen, ruhige Kopfzeile mit breiter Suche,
   Schrift Inter (selbst gehostet, fonts/heimbachapp/fonts.css). Farben
   kommen weiter aus den zentralen Token; hier aendern sich nur Masse,
   Radien und die Flaechen der Leisten.
   ═══════════════════════════════════════════════════════════════════════ */
:root {
  --font: "Inter", -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, "Helvetica Neue", Helvetica, Arial, sans-serif;
  --font-display: "Inter", -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", Roboto, "Helvetica Neue", Helvetica, Arial, sans-serif;
  --font-hand: "Caveat", "Segoe Script", "Bradley Hand", "Brush Script MT", cursive;
  --sidebar-w: 220px;
  --sidebar-bg: var(--bg-card);
  --sidebar-border: var(--border);
  --sidebar-hover: var(--bg-card-2);
  --sidebar-label: var(--t3);
  --topbar-h: 64px;
  --topbar-bg: var(--bg-card);
  --sidebar-blur: none;
  --topbar-blur: none;
}
html { font-family: var(--font); }

/* ─── Seitenleiste: Kopf mit Marke ───────────────────────────────────── */
.sb-header { padding: 16px 14px 8px; border-bottom: none; }
.tenant-block { display: flex; align-items: center; gap: 10px; padding: 4px 6px; border-radius: 12px; text-decoration: none; color: inherit; }
.tenant-block:hover { background: var(--sidebar-hover); text-decoration: none; }
.tenant-icon { width: 40px; height: 40px; border-radius: 10px; background: transparent; color: var(--brand); padding: 0; overflow: hidden; }
.tenant-icon img { width: 40px; height: 40px; object-fit: contain; border-radius: 8px; }
.tenant-flamme { display: flex; width: 40px; height: 40px; align-items: center; justify-content: center; }
.tenant-flamme svg { width: 34px; height: 34px; }
.tenant-text { min-width: 0; }
.tenant-name { font-size: 20px; font-weight: 800; letter-spacing: -0.03em; line-height: 1.1; color: var(--t1); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tenant-sub { font-size: 10px; color: var(--t2); margin-top: 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sb-toggle { top: 22px; right: 4px; }

/* ─── Seitenleiste: Bereiche ─────────────────────────────────────────── */
.sb-nav { padding: 8px 12px 12px; }
.nav-group { margin-bottom: 2px; }
.nav-group-head {
  display: flex; align-items: center; gap: 12px; width: 100%;
  min-height: 44px; padding: 0 12px; border-radius: 12px;
  border: none; background: transparent; cursor: pointer; text-align: left;
  font: inherit; font-size: 14px; font-weight: 500; color: var(--t1);
}
.nav-group-head:hover { background: var(--sidebar-hover); color: var(--t1); }
.nav-group-head .nav-icon { width: 20px; height: 20px; opacity: .8; }
.nav-group-head .nav-icon svg { width: 20px; height: 20px; }
.nav-chevron { width: 16px; height: 16px; margin-left: auto; color: var(--t3); flex: none; transition: transform .2s; }
.nav-group.offen .nav-group-head .nav-chevron { transform: rotate(90deg); }
.nav-group-body { display: none; padding: 2px 0 6px 14px; }
.nav-group.offen .nav-group-body { display: block; }
.sb-nav .nav-item--in-gruppe {
  min-height: 34px; margin: 0 0 1px 8px; padding: 4px 10px; border-radius: 10px;
  font-size: 13px; color: var(--t2); border-left: 2px solid var(--border);
}
.sb-nav .nav-item--in-gruppe:hover { color: var(--t1); background: var(--sidebar-hover); }
.sb-nav .nav-item--in-gruppe .nav-icon { width: 16px; height: 16px; opacity: .7; }
.sb-nav .nav-item.active, .sb-nav .nav-item--in-gruppe.active {
  background: var(--brand-light); color: var(--brand); font-weight: 600; border-left-color: var(--brand);
}
.sb-nav .nav-group.hat-aktiv > .nav-group-head { color: var(--brand); font-weight: 600; }
.sb-nav .nav-group.hat-aktiv > .nav-group-head .nav-icon { opacity: 1; }
.sb-nav .nav-group--einzeln .nav-group-head.active { background: var(--brand-light); }

/* ─── Seitenleiste: Fuss mit Wehr und Einstellungen ──────────────────── */
.sb-footer.sb-wehr { flex-direction: column; align-items: stretch; gap: 8px; padding: 10px 12px 14px; border-top: none; }
.sb-wehr-karte { display: flex; align-items: center; gap: 12px; padding: 14px; border-radius: 16px; background: var(--bg-card-2); border: 1px solid var(--border); }
.sb-wehr-wappen { width: 36px; height: 36px; border-radius: 10px; background: var(--bg-card); color: var(--t2); box-shadow: 0 1px 2px rgba(0,0,0,.06); }
.sb-wehr-wappen svg { width: 20px; height: 20px; }
.sb-wehr-name { font-size: 12px; font-weight: 700; }
.sb-wehr-motto { font-size: 12px; color: var(--t2); white-space: normal; line-height: 1.35; }
.sb-einstellungen { min-height: 40px; padding: 0 12px; gap: 12px; border-radius: 12px; font-size: 14px; font-weight: 500; color: var(--t1); }
.sb-einstellungen .nav-icon { width: 20px; height: 20px; opacity: .8; }
.sb-einstellungen .nav-icon svg { width: 20px; height: 20px; }
.sidebar.collapsed .tenant-text, .sidebar.collapsed .nav-chevron, .sidebar.collapsed .nav-group-body,
.sidebar.collapsed .sb-wehr-karte { display: none; }
.sidebar.collapsed .nav-group-head, .sidebar.collapsed .sb-einstellungen { justify-content: center; padding: 0; }
.sidebar.collapsed .sb-header { padding: 16px 8px 8px; }
.sidebar.collapsed .tenant-block { padding: 4px 0; }

/* ═══════════════════════════════════════════════════════════════════════
   Modulseiten nach Designvorlage 14.09.2026 (Einsatzdokumentation,
   Einsatztagebuecher, SAE-Stab): dunkler Kopfbereich mit Symbolkachel,
   Plakette, Titel, Merkmalen, Motto und roter Hauptaktion; Kennzahlen mit
   Symbol; Info-Karten; Listenkarte mit Werkzeugleiste; Eintragskarten;
   Leerzustand mit Illustration. Farben ueber zentrale Token, eigene
   Merkmale mit Praefix --modul-.
   ═══════════════════════════════════════════════════════════════════════ */
.modul-seite { display: flex; flex-direction: column; gap: 18px; max-width: 1480px; margin: 0 auto; }
.modul-hero {
  position: relative; isolation: isolate; overflow: hidden; color: #fff;
  min-height: 216px; padding: 26px 28px 24px; border-radius: 18px;
  display: flex; flex-direction: column; justify-content: space-between; gap: 18px;
  background:
    radial-gradient(120% 90% at 85% 10%, rgba(255,255,255,.12), transparent 55%),
    radial-gradient(80% 60% at 20% 100%, rgba(40,90,140,.5), transparent 60%),
    linear-gradient(135deg, #1b2a40 0%, #0f1a2b 50%, #213349 100%);
  box-shadow: 0 12px 40px rgba(20,30,45,.22);
}
.modul-hero-szene { position: absolute; inset: 0; z-index: -2; width: 100%; height: 100%; display: block; object-fit: cover; }
.modul-hero::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(90deg, rgba(10,18,30,.92) 0%, rgba(10,18,30,.78) 42%, rgba(10,18,30,.35) 72%, rgba(10,18,30,.15) 100%);
}
.modul-hero-oben { display: flex; gap: 24px; align-items: flex-start; flex-wrap: wrap; }
.modul-hero-symbol {
  width: 104px; height: 104px; border-radius: 24px; flex: none; display: grid; place-items: center;
  background: rgba(255,255,255,.14); border: 1px solid rgba(255,255,255,.24);
  backdrop-filter: blur(8px); box-shadow: inset 0 1px 0 rgba(255,255,255,.25);
}
.modul-hero-symbol svg { width: 48px; height: 48px; }
.modul-hero-text { flex: 1 1 380px; min-width: 0; }
.modul-hero-badge {
  display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px; border-radius: 999px;
  background: rgba(255,255,255,.16); border: 1px solid rgba(255,255,255,.22);
  font-size: 11.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: #fff;
}
.modul-hero-badge::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: #fff; box-shadow: 0 0 0 3px rgba(255,255,255,.25); }
.modul-hero-badge.ist-aktiv { background: var(--danger); border-color: transparent; }
.modul-hero h1 { margin: 12px 0 6px; font-size: 44px; font-weight: 800; letter-spacing: -0.03em; line-height: 1; color: #fff; overflow-wrap: anywhere; }
.modul-hero-sub { margin: 0; font-size: 17px; color: rgba(255,255,255,.88); }
.modul-hero-merkmale { display: flex; flex-wrap: wrap; gap: 10px 26px; margin-top: 18px; font-size: 14px; color: rgba(255,255,255,.92); }
.modul-hero-merkmale span { display: inline-flex; align-items: center; gap: 8px; }
.modul-hero-merkmale svg { width: 18px; height: 18px; opacity: .9; }
.modul-hero-motto {
  position: absolute; right: 44px; top: 36px; z-index: 1; max-width: 300px;
  font-family: var(--font-hand); font-size: 30px; line-height: 1.05; text-align: right; color: #fff;
  transform: rotate(-6deg); text-shadow: 0 2px 10px rgba(0,0,0,.45); pointer-events: none;
}
.modul-hero-motto u { text-decoration: none; background: linear-gradient(transparent 66%, var(--danger) 66%, var(--danger) 80%, transparent 80%); }
.modul-hero-unten { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; position: relative; z-index: 1; }
.modul-hero-aktionen { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.modul-hero-kennzahlen { display: flex; gap: 12px; flex-wrap: wrap; margin-left: auto; }
.modul-hero-kennzahl {
  min-width: 156px; padding: 14px 18px; border-radius: 14px; display: flex; justify-content: space-between; gap: 14px;
  background: rgba(255,255,255,.14); border: 1px solid rgba(255,255,255,.24); backdrop-filter: blur(8px);
}
.modul-hero-kennzahl b { display: block; font-size: 30px; font-weight: 800; line-height: 1; }
.modul-hero-kennzahl small { display: block; font-size: 13px; color: rgba(255,255,255,.85); margin-top: 6px; }
.modul-hero-kennzahl svg { width: 22px; height: 22px; opacity: .85; flex: none; }
.modul-knopf-rot {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 52px; padding: 0 26px;
  border-radius: 14px; border: none; background: var(--brand); color: var(--on-akzent);
  font: inherit; font-size: 16px; font-weight: 700; text-decoration: none; cursor: pointer; white-space: nowrap;
  box-shadow: 0 10px 24px color-mix(in srgb, var(--brand) 32%, transparent);
}
.modul-knopf-rot:hover { filter: brightness(1.06); text-decoration: none; color: var(--on-akzent); }
.modul-knopf-rot svg { width: 18px; height: 18px; }
.modul-hero .modul-knopf-rot { color: #fff; }
.modul-knopf-glas {
  display: inline-flex; align-items: center; gap: 10px; min-height: 52px; padding: 0 22px; border-radius: 14px;
  border: 1px solid rgba(255,255,255,.24); background: rgba(255,255,255,.14); color: #fff;
  font: inherit; font-size: 15px; font-weight: 600; text-decoration: none; cursor: pointer; backdrop-filter: blur(8px);
}
.modul-knopf-glas:hover { background: rgba(255,255,255,.24); color: #fff; text-decoration: none; }

/* Kennzahlen unter dem Kopf */
.modul-kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.modul-kpi {
  position: relative; display: flex; gap: 18px; align-items: flex-start; min-width: 0;
  padding: 20px 22px; border-radius: 16px; background: var(--bg-card); border: 1px solid var(--border);
  box-shadow: 0 1px 2px rgba(0,0,0,.04); color: inherit; text-decoration: none; transition: box-shadow .15s, transform .15s;
}
a.modul-kpi:hover { text-decoration: none; box-shadow: 0 8px 22px rgba(0,0,0,.07); transform: translateY(-1px); }
.modul-kpi-icon { width: 68px; height: 68px; border-radius: 16px; display: grid; place-items: center; flex: none; }
.modul-kpi-icon svg { width: 32px; height: 32px; }
.modul-kpi-icon--rot    { background: color-mix(in srgb, var(--danger) 12%, var(--bg-card));  color: var(--danger); }
.modul-kpi-icon--blau   { background: color-mix(in srgb, var(--info) 12%, var(--bg-card));    color: var(--info); }
.modul-kpi-icon--orange { background: color-mix(in srgb, var(--warning) 14%, var(--bg-card)); color: var(--warning); }
.modul-kpi-icon--gruen  { background: color-mix(in srgb, var(--success) 12%, var(--bg-card)); color: var(--success); }
.modul-kpi-main { flex: 1; min-width: 0; }
.modul-kpi-label { font-size: 15px; font-weight: 600; color: var(--t1); }
.modul-kpi-wert { display: block; margin: 6px 0; font-size: 34px; font-weight: 800; letter-spacing: -0.03em; line-height: 1; color: var(--t1); }
.modul-kpi-meta { font-size: 13px; color: var(--t2); }
.modul-kpi-pfeil { position: absolute; top: 20px; right: 18px; width: 18px; height: 18px; color: var(--t3); }
.modul-status {
  display: inline-flex; align-items: center; gap: 8px; margin: 6px 0; padding: 5px 12px; border-radius: 999px;
  font-size: 13px; font-weight: 700;
}
.modul-status::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.modul-status--aus  { background: color-mix(in srgb, var(--danger) 12%, var(--bg-card));  color: var(--danger); }
.modul-status--an   { background: color-mix(in srgb, var(--success) 12%, var(--bg-card)); color: var(--success); }
.modul-status--warn { background: color-mix(in srgb, var(--warning) 14%, var(--bg-card)); color: var(--warning); }
.modul-status--info { background: color-mix(in srgb, var(--info) 12%, var(--bg-card));    color: var(--info); }

/* Info-Karten (Hinweis mit Symbol, Text, Aktion) */
.modul-infos { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(360px, 100%), 1fr)); gap: 16px; } /* 21.09.2026: min() haelt die Kaesten auf dem Telefon im Rahmen */
.modul-info, .modul-info > * { min-width: 0; } /* 21.09.2026: sonst zieht ein langes Wort im Titel die Spalte ueber den Rand */
.modul-info h3, .modul-info p { overflow-wrap: anywhere; }
.modul-info {
  display: flex; gap: 20px; align-items: flex-start; padding: 22px 24px; border-radius: 16px;
  background: var(--bg-card); border: 1px solid var(--border);
}
.modul-info--blau { background: color-mix(in srgb, var(--info) 7%, var(--bg-card)); border-color: color-mix(in srgb, var(--info) 14%, var(--bg-card)); }
.modul-info--rot  { background: color-mix(in srgb, var(--danger) 6%, var(--bg-card)); border-color: color-mix(in srgb, var(--danger) 14%, var(--bg-card)); }
.modul-info-symbol { width: 76px; height: 76px; border-radius: 18px; flex: none; display: grid; place-items: center; background: var(--bg-card); box-shadow: 0 1px 3px rgba(0,0,0,.06); }
.modul-info-symbol svg { width: 36px; height: 36px; }
.modul-info--blau .modul-info-symbol { color: var(--info); }
.modul-info--rot .modul-info-symbol { color: var(--danger); }
.modul-info h3 { margin: 0 0 8px; font-size: 17px; font-weight: 700; color: var(--t1); }
.modul-info--blau h3 { color: var(--info); }
.modul-info--rot h3 { color: var(--danger); }
.modul-info p { margin: 0; font-size: 14px; line-height: 1.55; color: var(--t2); }
.modul-info-aktionen { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; margin-top: 16px; font-size: 13.5px; color: var(--t2); }
.modul-info-aktionen svg { width: 16px; height: 16px; vertical-align: -3px; margin-right: 6px; }

/* Karte mit Kopf und Werkzeugleiste (Suche, Filter) */
.modul-karte { background: var(--bg-card); border: 1px solid var(--border); border-radius: 18px; padding: 20px 22px; box-shadow: 0 1px 2px rgba(0,0,0,.04); }
.modul-karte-kopf { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; margin-bottom: 18px; }
.modul-karte-symbol { width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; flex: none; background: color-mix(in srgb, var(--info) 10%, var(--bg-card)); color: var(--t1); }
.modul-karte-symbol svg { width: 24px; height: 24px; }
.modul-karte-titel h2 { margin: 0; font-size: 24px; font-weight: 800; letter-spacing: -0.02em; color: var(--t1); }
.modul-karte-titel p { margin: 4px 0 0; font-size: 14px; color: var(--t2); }
.modul-karte-werkzeuge { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-left: auto; }
.modul-suche { display: flex; align-items: center; gap: 10px; height: 44px; padding: 0 14px; min-width: 260px; border-radius: 12px; background: var(--bg-card-2); border: 1px solid var(--border); color: var(--t2); }
.modul-suche:focus-within { border-color: var(--brand); background: var(--bg-card); }
.modul-suche svg { width: 18px; height: 18px; flex: none; }
.modul-suche input { flex: 1; min-width: 0; border: none !important; background: transparent !important; box-shadow: none !important; padding: 0 !important; height: auto !important; font: inherit; font-size: 14px; color: var(--t1); outline: none; }
.modul-filter { height: 44px; padding: 0 36px 0 14px; border-radius: 12px; border: 1px solid var(--border); background: var(--bg-card); color: var(--t1); font: inherit; font-size: 14px; font-weight: 500; appearance: none; -webkit-appearance: none; background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23636366' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><path d='M6 9l6 6 6-6'/></svg>"); background-repeat: no-repeat; background-position: right 12px center; background-size: 16px; }
.modul-abschnitt-kopf { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.modul-abschnitt-kopf h2 { margin: 0; font-size: 24px; font-weight: 800; letter-spacing: -0.02em; color: var(--t1); }
.modul-abschnitt-kopf span { font-size: 14px; color: var(--t2); }

/* Eintragskarten (Dokumentation, Lage, Vorlage) */
.modul-liste { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 16px; }
.modul-eintrag {
  position: relative; display: flex; gap: 16px; align-items: flex-start; min-width: 0;
  padding: 18px; border-radius: 16px; background: var(--bg-card); border: 1px solid var(--border);
  box-shadow: 0 1px 2px rgba(0,0,0,.04); color: inherit; text-decoration: none; transition: box-shadow .15s;
}
.modul-eintrag:hover { box-shadow: 0 8px 22px rgba(0,0,0,.07); text-decoration: none; }
.modul-eintrag.ist-hervorgehoben { border-left: 4px solid var(--info); }
.modul-eintrag-symbol { width: 58px; height: 58px; border-radius: 14px; display: grid; place-items: center; flex: none; }
.modul-eintrag-symbol svg { width: 28px; height: 28px; }
.modul-eintrag-main { flex: 1; min-width: 0; }
.modul-eintrag-kopf { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.modul-eintrag-titel { font-size: 18px; font-weight: 700; color: var(--t1); letter-spacing: -0.01em; }
.modul-eintrag-unter { font-size: 14px; color: var(--t2); margin-top: 2px; }
.modul-eintrag-meta { display: flex; flex-direction: column; gap: 6px; margin-top: 12px; font-size: 13.5px; color: var(--t2); }
.modul-eintrag-meta span { display: inline-flex; align-items: center; gap: 8px; }
.modul-eintrag-meta svg { width: 16px; height: 16px; flex: none; opacity: .8; }
.modul-eintrag-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.modul-chip { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 10px; background: var(--bg-card-2); border: 1px solid var(--border); font-size: 13px; color: var(--t1); }
.modul-chip svg { width: 14px; height: 14px; color: var(--t2); }
.modul-eintrag-fuss { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-top: 14px; font-size: 13px; color: var(--t2); }
.modul-link-rot { display: inline-flex; align-items: center; gap: 6px; color: var(--brand); font-weight: 700; font-size: 14px; text-decoration: none; }
.modul-link-rot:hover { text-decoration: underline; }
.modul-menue-knopf { position: absolute; top: 14px; right: 12px; width: 32px; height: 32px; min-height: 32px; border: none; border-radius: 8px; background: transparent; color: var(--t2); cursor: pointer; display: grid; place-items: center; padding: 0; }
.modul-menue-knopf:hover { background: var(--bg-card-2); color: var(--t1); }
.modul-tag { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 8px; font-size: 12px; font-weight: 700; }
.modul-tag--entwurf     { background: color-mix(in srgb, var(--warning) 16%, var(--bg-card)); color: var(--warning); }
.modul-tag--vorbereitung{ background: color-mix(in srgb, var(--info) 12%, var(--bg-card));    color: var(--info); text-transform: uppercase; letter-spacing: .06em; font-size: 11px; }
.modul-tag--aktiv       { background: color-mix(in srgb, var(--danger) 12%, var(--bg-card));  color: var(--danger); text-transform: uppercase; letter-spacing: .06em; font-size: 11px; }
.modul-tag--fertig      { background: color-mix(in srgb, var(--success) 12%, var(--bg-card)); color: var(--success); }
.modul-tag--neutral     { background: var(--bg-card-2); color: var(--t2); border: 1px solid var(--border); }
.modul-tag--vorbereitung::before, .modul-tag--aktiv::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }

/* Aktionskacheln (Lagekarte, Tagebuch, Checklisten, Kommunikation) */
.modul-kacheln { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.modul-kachel {
  position: relative; display: flex; gap: 14px; align-items: center; min-width: 0;
  padding: 16px 18px; border-radius: 16px; background: var(--bg-card); border: 1px solid var(--border);
  box-shadow: 0 1px 2px rgba(0,0,0,.04); color: inherit; text-decoration: none; transition: box-shadow .15s, transform .15s;
}
.modul-kachel:hover { text-decoration: none; box-shadow: 0 8px 22px rgba(0,0,0,.07); transform: translateY(-1px); }
.modul-kachel-symbol { width: 52px; height: 52px; border-radius: 14px; display: grid; place-items: center; flex: none; }
.modul-kachel-symbol svg { width: 26px; height: 26px; }
.modul-kachel-symbol--blau   { background: color-mix(in srgb, var(--info) 12%, var(--bg-card));    color: var(--info); }
.modul-kachel-symbol--rot    { background: color-mix(in srgb, var(--danger) 12%, var(--bg-card));  color: var(--danger); }
.modul-kachel-symbol--gruen  { background: color-mix(in srgb, var(--success) 12%, var(--bg-card)); color: var(--success); }
.modul-kachel-symbol--lila   { background: color-mix(in srgb, #6b57d6 14%, var(--bg-card)); color: #6b57d6; }
.modul-kachel-symbol--orange { background: color-mix(in srgb, var(--warning) 14%, var(--bg-card)); color: var(--warning); }
.modul-kachel-text { flex: 1; min-width: 0; }
.modul-kachel-text b { display: block; font-size: 15.5px; font-weight: 700; color: var(--t1); }
.modul-kachel-text span { display: block; font-size: 13px; color: var(--t2); margin-top: 2px; }
.modul-kachel-pfeil { width: 18px; height: 18px; color: var(--t3); flex: none; }

/* Leerzustand mit Illustration */
.modul-leer {
  position: relative; isolation: isolate; overflow: hidden; text-align: center; padding: 48px 24px 40px;
  border-radius: 18px; background: var(--bg-card); border: 1px solid var(--border); min-height: 360px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px;
}
.modul-leer-hintergrund { position: absolute; inset: auto 0 0 0; z-index: -1; width: 100%; height: 70%; color: var(--t3); opacity: .28; pointer-events: none; }
.modul-leer-bild { width: 250px; height: 170px; color: var(--info); }
.modul-leer-bild svg { width: 100%; height: 100%; }
.modul-leer h2 { margin: 6px 0 0; font-size: 27px; font-weight: 800; letter-spacing: -0.02em; color: var(--t1); }
.modul-leer p { margin: 0 0 18px; font-size: 16px; color: var(--t2); }
.modul-leer-motto { position: absolute; right: 60px; top: 44px; z-index: 1; font-family: var(--font-hand); font-size: 28px; line-height: 1.1; text-align: right; color: var(--t2); transform: rotate(-8deg); pointer-events: none; }
.modul-leer-motto u { text-decoration: none; border-bottom: 3px solid color-mix(in srgb, var(--info) 50%, transparent); }

/* Hinweisleiste Offline (nur wenn wirklich offline; JS setzt hidden) */
.modul-offline-hinweis { display: flex; align-items: center; gap: 12px; padding: 14px 18px; border-radius: 14px; background: color-mix(in srgb, var(--warning) 10%, var(--bg-card)); border: 1px solid color-mix(in srgb, var(--warning) 22%, var(--bg-card)); font-size: 14px; color: var(--t1); }
.modul-offline-hinweis::before { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--warning); flex: none; }
/* display:flex oben ueberstimmt das [hidden] des Browsers - ohne diese Regel
   bliebe die Leiste trotz hidden sichtbar (so lag der Fehler bei .alert-strip). */
.modul-offline-hinweis[hidden] { display: none; }

@media (max-width: 1200px) { .modul-kpis, .modul-kacheln { grid-template-columns: repeat(2, minmax(0, 1fr)); } .modul-hero-motto { display: none; } }
@media (max-width: 768px) {
  .modul-hero { padding: 20px; min-height: 0; }
  .modul-hero h1 { font-size: 30px; }
  .modul-hero-symbol { width: 72px; height: 72px; border-radius: 18px; }
  .modul-hero-symbol svg { width: 34px; height: 34px; }
  .modul-hero-kennzahlen { margin-left: 0; }
  .modul-hero-kennzahl { min-width: 0; flex: 1 1 120px; }
  .modul-knopf-rot, .modul-knopf-glas { min-height: 46px; padding: 0 18px; font-size: 15px; }
  .modul-karte { padding: 16px; }
  .modul-karte-werkzeuge { margin-left: 0; width: 100%; }
  .modul-suche { min-width: 0; flex: 1 1 100%; }
  .modul-leer-motto { display: none; }
}
@media (max-width: 560px) { .modul-kpis, .modul-kacheln { grid-template-columns: 1fr; } .modul-liste { grid-template-columns: 1fr; } }

/* ─── Kopfzeile ──────────────────────────────────────────────────────── */
.topbar { min-height: var(--topbar-h); padding: 10px 24px; gap: 16px; border-bottom: 1px solid var(--border); }
.topbar-title { max-width: 22%; }
.topbar-suche { height: 44px; max-width: 580px; border-radius: 14px; border-color: transparent; background: var(--bg-card-2); }
.topbar-suche:focus-within { background: var(--bg-card); border-color: var(--brand); }
.topbar-suche input { font-size: 14px; }
.topbar-suche kbd { border-radius: 8px; padding: 5px 7px; }
.topbar-glocke { width: 44px; height: 44px; border-radius: 14px; background: var(--bg-card-2); }
.topbar-glocke-zahl { top: -2px; right: -2px; }
.topbar-nutzer { padding-left: 12px; border-left: none; }
.topbar-nutzer-knopf { gap: 12px; padding: 4px 8px 4px 4px; border-radius: 14px; }
.topbar-nutzer-knopf .user-avatar { width: 40px; height: 40px; font-size: 13px; background: var(--t1); color: var(--bg-card); }
.topbar-nutzer-text .user-name { font-size: 14px; font-weight: 700; }
.topbar-nutzer-text .user-role { font-size: 12px; }
.content { padding: 20px 24px 32px; }
@media (max-width: 768px) {
  .topbar { min-height: 56px; padding: 8px 12px; }
  .topbar-suche { height: 40px; }
  .topbar-glocke { width: 40px; height: 40px; }
  .content { padding: 16px 16px 32px; }
}
