/* VerwaltungsDialog – Basis-Styles (Phase 1)
   Ruhige, sachliche Verwaltungsoptik, responsiv und barrierearm. */

:root {
    /* Helle, ruhige Verwaltungsoptik. color-scheme verhindert, dass mobile
       Browser die Oberfläche automatisch dunkel umfärben (Phase 12). */
    color-scheme: light;
    --c-bg: #f4f6f8;
    --c-surface: #ffffff;
    --c-border: #d9e0e6;
    --c-text: #1f2a33;
    --c-muted: #51606b; /* WCAG-AA-Kontrast auf Weiß und auf --c-bg (Phase 12) */
    --c-primary: #1f5c8b;
    --c-primary-dark: #16456a;
    --c-ok-bg: #e3f3e8;
    --c-ok-text: #1c6b3a;
    --c-warn-bg: #fcefe1;
    --c-warn-text: #9a5300;
    --c-info-bg: #e6eef5;
    --c-info-text: #1f5c8b;
    --c-error-bg: #fbe6e6;
    --c-error-text: #9a2222;
    --radius: 8px;
    --shadow: 0 1px 3px rgba(16, 38, 56, 0.08);
    --maxw: 960px;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
    margin: 0;
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    font-size: 16px;
    line-height: 1.55;
    color: var(--c-text);
    background: var(--c-bg);
    /* Sticky Footer: Body füllt mindestens die Bildschirmhöhe, der Hauptbereich
       wächst und drückt den Footer an den unteren Rand. */
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.container {
    width: 100%;
    max-width: var(--maxw);
    margin: 0 auto;
    padding: 0 1rem;
}

a { color: var(--c-primary); }
a:hover { color: var(--c-primary-dark); }

.skip-link {
    position: absolute;
    left: -999px;
    top: 0;
    background: var(--c-primary);
    color: #fff;
    padding: 0.5rem 1rem;
    z-index: 100;
}
.skip-link:focus { left: 0; }

/* Kopfbereich */
.site-header {
    background: var(--c-surface);
    border-bottom: 1px solid var(--c-border);
}
.site-header__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 64px;
}
.brand {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    text-decoration: none;
    color: var(--c-text);
    font-weight: 600;
}
.brand__mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 36px;
    padding: 0.25rem 0.75rem;
    border-radius: var(--radius);
    background: var(--c-primary);
    color: #fff;
    font-size: 0.95rem;
    font-weight: 600;
    letter-spacing: 0.02em;
}
.site-nav a {
    text-decoration: none;
    color: var(--c-muted);
    padding: 0.4rem 0.6rem;
    border-radius: var(--radius);
}
.site-nav a:hover { color: var(--c-text); background: var(--c-bg); }

/* Hauptbereich */
.site-main { padding: 2rem 1rem 3rem; flex: 1 0 auto; }

.hero { margin-bottom: 1.75rem; }
.hero h1 { margin: 0 0 0.5rem; font-size: 1.6rem; }
.hero__lead { margin: 0; color: var(--c-muted); max-width: 70ch; }

/* Panels / Karten */
.panel {
    background: var(--c-surface);
    border: 1px solid var(--c-border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 1.5rem;
}
.panel__title { margin: 0 0 0.25rem; font-size: 1.2rem; }
.panel__subtitle { margin: 1.5rem 0 0.5rem; font-size: 1rem; }
.panel__hint { margin: 0 0 1rem; color: var(--c-muted); font-size: 0.92rem; }

.status-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 0.75rem;
    margin-bottom: 0.5rem;
}
.status-item {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    padding: 0.75rem;
    background: var(--c-bg);
    border-radius: var(--radius);
}
.status-item__label { color: var(--c-muted); font-size: 0.85rem; }
.status-item__value { font-weight: 600; }

/* Auswertungen (Phase 15): schlanker Anteils-Balken in der Tabelle. */
.report-bar {
    display: inline-block;
    width: 96px;
    height: 8px;
    margin-right: 0.5rem;
    vertical-align: middle;
    background: var(--c-bg);
    border-radius: 999px;
    overflow: hidden;
}
.report-bar__fill {
    display: block;
    height: 100%;
    background: var(--c-primary);
}

.check-list { list-style: none; margin: 0; padding: 0; }
.check-list__item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.55rem 0;
    border-bottom: 1px solid var(--c-border);
}
.check-list__item:last-child { border-bottom: 0; }
.check-list__name { font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace; font-size: 0.92rem; }

/* Einrichtungs-Checkliste (Phase 16): Markierung + mehrzeiliger Inhalt. */
.check-list--steps .check-list__item { align-items: flex-start; justify-content: flex-start; gap: 0.75rem; }
.check-list__mark { flex: 0 0 1.5rem; font-weight: 700; font-size: 1.1rem; color: var(--c-primary); line-height: 1.4; }
.check-list__body { display: flex; flex-direction: column; gap: 0.15rem; }
.check-list__text { color: var(--c-muted); font-size: 0.9rem; }

/* Badges */
.badge {
    display: inline-block;
    padding: 0.15rem 0.55rem;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 600;
    white-space: nowrap;
}
.badge--ok { background: var(--c-ok-bg); color: var(--c-ok-text); }
.badge--warn { background: var(--c-warn-bg); color: var(--c-warn-text); }
.badge--info { background: var(--c-info-bg); color: var(--c-info-text); }

/* Hinweise / Flash */
.alert {
    padding: 0.85rem 1rem;
    border-radius: var(--radius);
    margin-bottom: 1.25rem;
}
.alert--success { background: var(--c-ok-bg); color: var(--c-ok-text); }
.alert--error { background: var(--c-error-bg); color: var(--c-error-text); }

/* Fußbereich */
.site-footer {
    border-top: 1px solid var(--c-border);
    background: var(--c-surface);
    color: var(--c-muted);
    font-size: 0.88rem;
}
.site-footer__inner {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 1.5rem;
    justify-content: space-between;
    padding: 1.25rem 1rem;
}
.site-footer p { margin: 0; }
.site-footer__links a { margin-left: 1rem; }
.site-footer__links a:first-child { margin-left: 0; }

/* Fehlerseiten */
.error-page { padding: 3rem 1rem; text-align: center; }
.error-page__code { font-size: 3.5rem; margin: 0; color: var(--c-primary); }
.error-page__title { margin: 0.25rem 0 1rem; }
.error-page__detail {
    text-align: left;
    background: var(--c-surface);
    border: 1px solid var(--c-border);
    border-radius: var(--radius);
    padding: 1rem;
    overflow: auto;
    font-size: 0.85rem;
}
.error-page__back { margin-top: 1.5rem; }

/* Responsiv */
@media (max-width: 540px) {
    .site-header__inner { min-height: 56px; }
    .hero h1 { font-size: 1.35rem; }
}

/* ==========================================================================
   Formulare, Buttons und ergänzende Hinweise (Phase 2)
   Genutzt von Installer und Updater. Klassennamen sind verbindlich.
   ========================================================================== */

/* Sichtbarer Fokus (barrierearm) */
:focus-visible {
    outline: 2px solid var(--c-primary);
    outline-offset: 2px;
}

/* Formular-Grundgerüst */
.form {
    max-width: 520px;
    margin: 1.5rem 0;
}
.form__row { margin-bottom: 1rem; }
/* Checkbox-Zeile (z. B. optionale Beispieldaten im Installer). */
.form__check {
    display: flex;
    align-items: flex-start;
    gap: 0.55rem;
    font-weight: 600;
    cursor: pointer;
}
.form__check input[type="checkbox"] {
    width: 1.05rem;
    height: 1.05rem;
    margin-top: 0.15rem;
    flex: 0 0 auto;
}
.form__label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.3rem;
}
.form__input,
.form__select {
    width: 100%;
    padding: 0.6rem;
    border: 1px solid var(--c-border);
    border-radius: var(--radius);
    font-size: inherit;
    font-family: inherit;
    color: var(--c-text);
    background: var(--c-surface);
}
.form__input:focus,
.form__select:focus {
    outline: 2px solid var(--c-primary);
    outline-offset: 2px;
    border-color: var(--c-primary);
}
textarea.form__input {
    min-height: 8rem;
    font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
}
.form__hint {
    font-size: 0.85rem;
    color: var(--c-muted);
}
.form__error {
    font-size: 0.85rem;
    color: var(--c-error-text);
    font-weight: 600;
}

/* Fieldset / Legend */
.form__fieldset {
    border: 1px solid var(--c-border);
    border-radius: var(--radius);
    padding: 1rem 1.25rem;
    margin-bottom: 1.25rem;
}
.form__legend {
    font-weight: 600;
    padding: 0 0.4rem;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.6rem 1.1rem;
    border: 0;
    border-radius: var(--radius);
    font-size: inherit;
    font-family: inherit;
    font-weight: 600;
    line-height: 1.2;
    cursor: pointer;
    text-decoration: none;
}
.btn--primary {
    background: var(--c-primary);
    color: #fff;
}
.btn--primary:hover { background: var(--c-primary-dark); color: #fff; }
.btn--secondary {
    background: var(--c-bg);
    color: var(--c-text);
    border: 1px solid var(--c-border);
}
.btn--secondary:hover { color: var(--c-text); }
.btn[disabled] {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Ergänzende Hinweis-Varianten */
.alert--info { background: var(--c-info-bg); color: var(--c-info-text); }
.alert--warn { background: var(--c-warn-bg); color: var(--c-warn-text); }
.alert__list { margin: 0; padding-left: 1.2rem; }

/* ==========================================================================
   Authentifizierung, Verwaltungsbereich und Tabellen (Phase 3)
   ========================================================================== */

/* Hilfsklasse: nur für Screenreader */
.sr-only {
    position: absolute;
    width: 1px; height: 1px;
    padding: 0; margin: -1px;
    overflow: hidden; clip: rect(0, 0, 0, 0);
    white-space: nowrap; border: 0;
}

/* Anmelde-/Passwort-Layout (zentrierte Karte) */
.auth-body {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 1.5rem;
}
.auth-card {
    width: 100%;
    max-width: 420px;
    background: var(--c-surface);
    border: 1px solid var(--c-border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 1.75rem;
}
.auth-card__brand {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-weight: 600;
    margin-bottom: 1.25rem;
}
.auth-card__title { margin: 0 0 0.75rem; font-size: 1.3rem; }
.auth-card__lead { margin: 0 0 1rem; color: var(--c-muted); }
.auth-card .form { max-width: none; margin: 0; }
.auth-card .btn--primary { width: 100%; }
.auth-card__links { margin: 1rem 0 0; font-size: 0.92rem; }
.auth-card__foot { margin: 1.25rem 0 0; font-size: 0.85rem; }

/* Kopfzeile: Benutzer + Abmelden */
.site-header__logout {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    margin: 0;
}
.site-header__user { color: var(--c-muted); font-size: 0.9rem; }
.btn--small { padding: 0.35rem 0.7rem; font-size: 0.85rem; }
.site-nav a[aria-current="page"] { color: var(--c-text); background: var(--c-bg); }

/* Gefahr-/Lösch-Aktionen */
.btn--danger { background: var(--c-error-bg); color: var(--c-error-text); }
.btn--danger:hover { background: #f3cccc; color: var(--c-error-text); }
.panel--danger { border-color: #e7b9b9; }

/* Hero mit rechtsbündiger Aktion */
.hero--with-action {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
}
.hero__actions { display: flex; gap: 0.5rem; flex-wrap: wrap; }

/* Kachel-Links (Dashboard) */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1rem;
}
.card-link {
    display: block;
    text-decoration: none;
    color: var(--c-text);
    background: var(--c-surface);
    border: 1px solid var(--c-border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 1.25rem;
}
.card-link:hover { border-color: var(--c-primary); color: var(--c-text); }
.card-link__title { margin: 0 0 0.35rem; font-size: 1.1rem; color: var(--c-primary); }
.card-link__text { margin: 0; color: var(--c-muted); font-size: 0.92rem; }

/* Datentabellen */
.table-wrap { overflow-x: auto; }
.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.95rem;
}
.data-table th,
.data-table td {
    text-align: left;
    padding: 0.6rem 0.75rem;
    border-bottom: 1px solid var(--c-border);
    vertical-align: top;
}
.data-table thead th {
    color: var(--c-muted);
    font-size: 0.82rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}
.data-table__center { text-align: center; }
.data-table__actions { white-space: nowrap; }
.data-table__perm { font-size: 0.78rem; }
.data-table .badge { margin-right: 0.2rem; }
.tick { color: var(--c-ok-text); font-weight: 700; }
.tick--off { color: var(--c-border); }

/* Checkbox-Zeilen (Rollen/Rechte/Status) */
.checkbox-row {
    display: flex;
    align-items: flex-start;
    gap: 0.55rem;
    padding: 0.4rem 0;
}
.checkbox-row input { margin-top: 0.2rem; }
.checkbox-row .form__hint { display: block; }

/* Farbpunkt (Kategorien) */
.color-dot {
    display: inline-block;
    width: 0.8rem;
    height: 0.8rem;
    border-radius: 50%;
    border: 1px solid var(--c-border);
    vertical-align: middle;
    margin-right: 0.35rem;
}

/* TOTP-Geheimnis */
.totp-secret code {
    display: inline-block;
    font-size: 1.05rem;
    letter-spacing: 0.08em;
    background: var(--c-bg);
    padding: 0.5rem 0.75rem;
    border-radius: var(--radius);
}

/* ==========================================================================
   Backend-Vorgangsbearbeitung (Phase 7)
   ========================================================================== */

/* Tabellen-Unterzeile (z. B. Betreff unter der Vorgangsnummer) */
.cell-sub { color: var(--c-muted); font-size: 0.88rem; margin-top: 0.15rem; }

/* Filterleiste der Vorgangsliste */
.filter-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 0.75rem 1rem;
    max-width: none;
    margin: 0;
}
.filter-bar__field { flex: 1 1 160px; min-width: 140px; }
.filter-bar__field--wide { flex: 2 1 260px; }
.filter-bar__field--check { display: flex; align-items: center; padding-bottom: 0.5rem; }
.filter-bar__field .form__label { margin-bottom: 0.2rem; font-size: 0.85rem; }
.filter-bar__actions { display: flex; gap: 0.5rem; align-items: flex-end; }

/* „Aktuelle Filter als Ansicht speichern" */
.save-view {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--c-border);
}
.save-view .form__input { flex: 1 1 240px; }

/* Gespeicherte Ansichten (Chips) */
.saved-views { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.saved-view {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    background: var(--c-bg);
    border: 1px solid var(--c-border);
    border-radius: 999px;
    padding: 0.2rem 0.5rem 0.2rem 0.75rem;
}
.saved-view form { margin: 0; display: inline; }
.saved-view__del {
    border: 0;
    background: transparent;
    color: var(--c-muted);
    cursor: pointer;
    font-size: 1.1rem;
    line-height: 1;
    padding: 0 0.15rem;
}
.saved-view__del:hover { color: var(--c-error-text); }

/* Aktionskarten (Status/Frist/Wiedervorlage/Zuweisung) */
.action-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1rem;
    margin-top: 0.5rem;
}
.action-card {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    background: var(--c-bg);
    border: 1px solid var(--c-border);
    border-radius: var(--radius);
    padding: 1rem;
    margin: 0;
}
.action-card .form__label { margin: 0; }
.action-card .btn { align-self: flex-start; }

/* Nachrichten-Verlauf (öffentliche Kommunikation) */
.msg-thread, .note-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 0.75rem; }
.msg, .note {
    border: 1px solid var(--c-border);
    border-radius: var(--radius);
    padding: 0.75rem 1rem;
    background: var(--c-surface);
}
.msg--team { border-left: 4px solid var(--c-primary); }
.msg--applicant { border-left: 4px solid var(--c-border); background: var(--c-bg); }
.msg__meta {
    display: flex;
    justify-content: space-between;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-bottom: 0.35rem;
    font-size: 0.85rem;
}
.msg__author { font-weight: 600; }
.msg__time { color: var(--c-muted); }
.msg__body { margin: 0; }

/* Interner Bereich (klar abgesetzt) */
.panel--internal {
    border-color: #c9b68c;
    background: #fbf7ec;
}
.note { border-left: 4px solid #c9a14a; }

/* Anhänge (Frontend-Liste) */
.attach-list { list-style: none; margin: 0; padding: 0; }
.attach-item {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.45rem 0;
    border-bottom: 1px solid var(--c-border);
}
.attach-item:last-child { border-bottom: 0; }
.attach-del {
    border: 0;
    background: transparent;
    color: var(--c-muted);
    cursor: pointer;
    font-size: 1.1rem;
    line-height: 1;
    padding: 0 0.15rem;
}
.attach-del:hover { color: var(--c-error-text); }

/* ==========================================================================
   UI/UX-Feinschliff, responsive Navigation & Barrierefreiheit (Phase 12)
   ========================================================================== */

/* Ruhige, dezente Übergänge für interaktive Elemente. */
a,
.btn,
.card-link,
.site-nav a,
.saved-view__del,
.attach-del {
    transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

/* Verlässlich sichtbarer Tastaturfokus auf allen interaktiven Elementen. */
a:focus-visible,
.btn:focus-visible,
.card-link:focus-visible,
.nav-toggle:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
[tabindex]:focus-visible {
    outline: 2px solid var(--c-primary);
    outline-offset: 2px;
    border-radius: var(--radius);
}

/* Karten-Hover etwas spürbarer, aber zurückhaltend. */
.card-link:hover { box-shadow: 0 2px 8px rgba(16, 38, 56, 0.12); }

/* Aktiver Navigationspunkt deutlicher (Orientierung). */
.site-nav a[aria-current="page"] {
    color: var(--c-primary-dark);
    box-shadow: inset 0 -2px 0 var(--c-primary);
}

/* --------------------------------------------------------------------------
   Rollengestufte Hauptnavigation: Gruppen-Überschriften + Kachel-Panels
   Die Kopfzeile zeigt nur die Überschriften der Menügruppen (Bearbeitung →
   Steuerung → Struktur → Administration). Ein Klick auf eine Überschrift blendet
   die passenden Kacheln darunter ein. Per JavaScript gesteuert (aria-expanded);
   ohne JavaScript sind alle Kachel-Panels dauerhaft sichtbar (Progressive
   Enhancement).
   -------------------------------------------------------------------------- */
.site-nav {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.1rem;
}

/* Gruppen-Überschrift (Schalter) und schlichter Einzellink einheitlich. */
.nav-group__toggle,
.site-nav__link {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.5rem 0.8rem;
    border: 0;
    background: transparent;
    color: var(--c-muted);
    font: inherit;
    font-weight: 600;
    text-decoration: none;
    border-radius: var(--radius);
    cursor: pointer;
}
.nav-group__toggle:hover,
.site-nav__link:hover { color: var(--c-text); background: var(--c-bg); }
/* „Du bist hier": dezente, dauerhafte Markierung der Gruppe zum aktuellen Pfad –
   bewusst schwächer als der Offen-Zustand, damit beim Aufklappen einer anderen
   Gruppe nicht weiterhin die erste Gruppe „ausgewählt" wirkt. */
.nav-group__toggle.is-active {
    color: var(--c-text);
}
/* Aktiv geöffnete Gruppe (bzw. aktiver schlichter Einzellink): deutliche Affordanz
   mit Unterstrich – gilt nur für genau ein Menü zur Zeit (JS schließt die übrigen). */
.nav-group__toggle[aria-expanded="true"],
.site-nav__link[aria-current="page"] {
    color: var(--c-primary-dark);
    background: var(--c-bg);
    box-shadow: inset 0 -2px 0 var(--c-primary);
}

/* Pfeil-Indikator (zeigt nach oben, wenn das Panel offen ist). */
.nav-group__caret {
    width: 0;
    height: 0;
    border-left: 4px solid transparent;
    border-right: 4px solid transparent;
    border-top: 5px solid currentColor;
    transition: transform 0.15s ease;
}
.nav-group__toggle[aria-expanded="true"] .nav-group__caret { transform: rotate(180deg); }

/* Navigation füllt die Breite; das Kontomenü sitzt rechts. */
.site-nav { flex: 1 1 auto; }
.nav-group__toggle--account { margin-left: auto; }
.nav-group__user-mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.6rem;
    height: 1.6rem;
    border-radius: 50%;
    background: var(--c-primary);
    color: #fff;
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
}
.nav-group__user { max-width: 16ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Kachel-Panels je Gruppe (nutzen die bestehende .card-grid/.card-link-Optik). */
.mega__panel { padding: 0.85rem 0 1.1rem; }
.mega__intro { margin: 0 0 0.75rem; color: var(--c-muted); font-size: 0.92rem; }

/* Abmelden-Kachel: Formular-Button in Kachel-Optik. */
.card-form { margin: 0; }
.card-link--button {
    width: 100%;
    text-align: left;
    font: inherit;
    cursor: pointer;
}
.mega .card-link__title,
.mega .card-link__text { display: block; }
.mega .card-link__title { margin-bottom: 0.3rem; }

/* Enhanced-Modus (JavaScript aktiv): Panels einklappen, nur das offene zeigen. */
.site-header[data-nav="enhanced"] .mega__panel { display: none; }
.site-header[data-nav="enhanced"] .mega__panel.is-open {
    display: block;
    border-top: 1px solid var(--c-border);
}

@media (max-width: 860px) {
    .site-header__inner {
        flex-wrap: wrap;
        gap: 0.5rem;
        padding-top: 0.5rem;
        padding-bottom: 0.5rem;
    }
    .site-nav { width: 100%; }
}

/* --------------------------------------------------------------------------
   Kleine, wiederverwendbare Hilfsklassen (lösen punktuelle Inline-Styles ab).
   -------------------------------------------------------------------------- */
.u-mt    { margin-top: 1.5rem; }
.u-mt-sm { margin-top: 1rem; }
.u-mt-0  { margin-top: 0; }
.u-mb    { margin-bottom: 1.25rem; }
.u-m-0   { margin: 0; }
.u-prewrap { white-space: pre-wrap; }
.u-form-wide { max-width: none; }

/* --------------------------------------------------------------------------
   Kennzahl-Kacheln der Übersicht (Startseite).
   -------------------------------------------------------------------------- */
.stat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}
.stat-card { display: flex; flex-direction: column; gap: 0.2rem; }
.stat-card__num { font-size: 2rem; font-weight: 700; line-height: 1.1; color: var(--c-primary); }
.stat-card__label { color: var(--c-muted); font-size: 0.92rem; }
.stat-card--alert .stat-card__num { color: var(--c-warn-text); }

/* --------------------------------------------------------------------------
   Reduzierte Bewegung respektieren (WCAG 2.3.3 / Nutzerpräferenz).
   -------------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        transition-duration: 0.01ms !important;
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        scroll-behavior: auto !important;
    }
}

/* --------------------------------------------------------------------------
   Druckansicht: sachlicher Ausdruck von Vorgängen/Listen ohne Bedienelemente.
   -------------------------------------------------------------------------- */
@media print {
    body { background: #fff; color: #000; }
    .site-header,
    .site-footer,
    .skip-link,
    .nav-toggle,
    .filter-bar,
    .save-view,
    .saved-views,
    .action-grid,
    form {
        display: none !important;
    }
    .panel,
    .card-link {
        border: 1px solid #999;
        box-shadow: none;
    }
    .site-main { padding: 0; }
    a { color: #000; text-decoration: underline; }
    .container { max-width: none; }
}
