/* ==================================================================
   AVH-Verwaltungsplattform – Gestaltung
   Seriös & zurückhaltend: dunkles Blaugrau für Navigation und Text,
   AVH-Rot (aus dem Logo) nur als Akzent, viel Weißraum.
   Setzt auf Bootstrap 5.3 auf (nur CSS-Variablen, kein Build-Schritt).
   ================================================================== */

/* ---------- Schrift: Inter (SIL OFL), lokal ausgeliefert ---------- */
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url("../vendor/inter-5.3.0/inter-latin-ext-wght-normal.1ad231aac0a8.woff2") format("woff2-variations");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308,
    U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113,
    U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url("../vendor/inter-5.3.0/inter-latin-wght-normal.260c81a4759b.woff2") format("woff2-variations");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304,
    U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* ---------- Farben & Grundwerte ----------
   Lesbarkeit: alle Textfarben erfüllen WCAG 2.1 AA (≥ 4,5:1), Fließtext und
   graue Hilfstexte AAA (≥ 7:1). Kleinste Schrift 12 px (0.75rem).
   Neue Farben vor dem Einsatz prüfen, z. B. https://webaim.org/resources/contrastchecker/ */
:root {
  /* Marke */
  --avh-rot: #c10b2d;            /* exakt aus dem Logo */
  --avh-rot-dunkel: #9e0925;
  --avh-rot-hell: #fbe9ec;

  /* Primärfarbe für Aktionen: gedecktes Business-Blau */
  --avh-blau: #1f3a5f;
  --avh-blau-dunkel: #172c48;
  --avh-blau-hell: #e8eef6;

  /* Navigation */
  --avh-nav: #141c2b;
  --avh-nav-text: #c7cfdc;
  --avh-nav-text-gedimmt: #aab4c4;  /* 8,2:1 auf --avh-nav */
  --avh-nav-hover: rgba(255, 255, 255, 0.06);
  --avh-nav-aktiv: rgba(255, 255, 255, 0.1);

  /* Flächen */
  --avh-hintergrund: #f3f5f8;
  --avh-rahmen: #e1e6ed;
  --avh-text: #1c2533;              /* 15:1 auf Weiß */
  --avh-text-gedimmt: #475264;      /* ≥ 7:1 auf Weiß und Seitenhintergrund (AAA) */

  --avh-sidebar-breite: 264px;
  --avh-topbar-hoehe: 60px;

  /* Bootstrap-Variablen */
  --bs-font-sans-serif: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --bs-body-font-size: 0.9375rem;
  --bs-body-color: var(--avh-text);
  --bs-body-bg: #fff; /* Felder, Karten, Menüs */
  --bs-secondary-color: var(--avh-text-gedimmt);
  /* .text-secondary nutzt diese Variable (Bootstrap-Grau #6c757d hätte auf dem
     Seitenhintergrund nur 4,3:1) */
  --bs-secondary-rgb: 71, 82, 100;
  --bs-border-color: var(--avh-rahmen);
  --bs-border-radius: 0.375rem;
  --bs-border-radius-lg: 0.5rem;
  --bs-primary: var(--avh-blau);
  --bs-primary-rgb: 31, 58, 95;
  --bs-danger: var(--avh-rot);
  --bs-danger-rgb: 193, 11, 45;
  --bs-link-color: var(--avh-blau);
  --bs-link-color-rgb: 31, 58, 95;
  --bs-link-hover-color: var(--avh-rot);
  --bs-link-hover-color-rgb: 193, 11, 45;
  --bs-focus-ring-color: rgba(31, 58, 95, 0.25);
}

body {
  background-color: var(--avh-hintergrund);
  font-feature-settings: "cv11", "ss01"; /* ruhigere Ziffern/Formen von Inter */
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6, .h1, .h2, .h3, .h4, .h5, .h6 {
  color: var(--avh-text);
  font-weight: 650;
  letter-spacing: -0.015em;
}

/* Gleich breite Ziffern nur für Kennzahlen/Zahlenspalten (.zahl) – sonst wirken
   Bindestriche in Namen wie „AVH-002“ gesperrt. */
.kennzahl-wert, .zahl {
  font-variant-numeric: tabular-nums;
}

/* Links bleiben unterstrichen (Linkfarbe und Text sind zu ähnlich, um Links nur über die Farbe
   zu erkennen – WCAG 1.4.1), aber dezent: halbtransparente Linie, kräftig erst beim Zeigen. */
a:not(.btn) {
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  text-decoration-color: rgba(31, 58, 95, 0.35);
}
a:not(.btn):hover, a:not(.btn):focus-visible { text-decoration-color: currentColor; }

/* ---------- Buttons ---------- */
.btn { --bs-btn-font-size: 0.9rem; font-weight: 550; }
.btn-lg { --bs-btn-font-size: 1rem; }
.btn-sm { --bs-btn-font-size: 0.8rem; }

.btn-primary {
  --bs-btn-bg: var(--avh-blau);
  --bs-btn-border-color: var(--avh-blau);
  --bs-btn-hover-bg: var(--avh-blau-dunkel);
  --bs-btn-hover-border-color: var(--avh-blau-dunkel);
  --bs-btn-active-bg: var(--avh-blau-dunkel);
  --bs-btn-active-border-color: var(--avh-blau-dunkel);
  --bs-btn-disabled-bg: var(--avh-blau);
  --bs-btn-disabled-border-color: var(--avh-blau);
}
.btn-outline-primary {
  --bs-btn-color: var(--avh-blau);
  --bs-btn-border-color: #b9c6d8;
  --bs-btn-hover-bg: var(--avh-blau);
  --bs-btn-hover-border-color: var(--avh-blau);
  --bs-btn-active-bg: var(--avh-blau);
  --bs-btn-active-border-color: var(--avh-blau);
}
.btn-danger, .btn-marke {
  --bs-btn-color: #fff;
  --bs-btn-bg: var(--avh-rot);
  --bs-btn-border-color: var(--avh-rot);
  --bs-btn-hover-color: #fff;
  --bs-btn-hover-bg: var(--avh-rot-dunkel);
  --bs-btn-hover-border-color: var(--avh-rot-dunkel);
  --bs-btn-active-bg: var(--avh-rot-dunkel);
  --bs-btn-active-border-color: var(--avh-rot-dunkel);
}
.btn-outline-secondary {
  --bs-btn-color: var(--avh-text);
  --bs-btn-border-color: var(--avh-rahmen);
  --bs-btn-bg: #fff;
  --bs-btn-hover-bg: #eef1f5;
  --bs-btn-hover-color: var(--avh-text);
  --bs-btn-hover-border-color: #cfd6e0;
}

.form-control, .form-select { border-color: #d3dae4; }
.form-control:focus, .form-select:focus { border-color: #8aa2c2; }
.form-label { font-weight: 550; font-size: 0.875rem; }
.form-check-input { border-color: #aab5c5; }
.form-check-input:checked { background-color: var(--avh-blau); border-color: var(--avh-blau); }
.form-text { color: var(--avh-text-gedimmt); }

/* ---------- Karten & Tabellen ---------- */
.card {
  --bs-card-border-color: var(--avh-rahmen);
  --bs-card-cap-bg: #fff;
  border: 1px solid var(--avh-rahmen) !important;
  box-shadow: 0 1px 2px rgba(20, 28, 43, 0.04) !important;
}
.card-header { font-weight: 600; }

.table { --bs-table-hover-bg: #f7f9fb; margin-bottom: 0; }
.table > thead th,
.table > thead.table-light th {
  background: #f8fafc;
  color: var(--avh-text-gedimmt);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  border-bottom-width: 1px;
  white-space: nowrap;
}
.table > thead th a { color: inherit !important; }
.table > :not(caption) > * > * { padding: 0.7rem 0.85rem; }

.badge { font-size: 0.78rem; font-weight: 600; letter-spacing: 0.01em; }

/* Kennzahlen-Kacheln */
.kennzahl { border-left: 3px solid var(--avh-blau) !important; }
.kennzahl-titel {
  color: var(--avh-text-gedimmt);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.kennzahl-wert { font-size: 1.6rem; font-weight: 650; line-height: 1.2; }

.nav-tabs .nav-link { color: var(--avh-text-gedimmt); font-weight: 550; }
.nav-tabs .nav-link.active { color: var(--avh-text); border-top: 2px solid var(--avh-rot); }

/* ---------- Handy (< 768 px) ----------
   Reiter als umbrechende Chips statt halbierter Reiterleiste.
   Listen-Tabellen mit .avh-karten werden zu Karten: je Zeile ein Block, jede Zelle
   „Spalte: Wert“ (Beschriftung setzt avh.js aus dem Tabellenkopf).
   Nur am Bildschirm – auf Papier (A4 hochkant ≈ 700 px) bleiben Tabellen Tabellen. */
@media screen and (max-width: 767.98px) {
  .nav-tabs { border-bottom: 0; gap: 0.5rem; }
  .nav-tabs .nav-link,
  .nav-tabs .nav-link.active {
    display: flex;
    align-items: center;
    min-height: 44px;
    margin: 0;
    padding: 0.4rem 0.9rem;
    border: 1px solid var(--avh-rahmen);
    border-radius: 999px;
    background: var(--bs-body-bg);
  }
  .nav-tabs .nav-link.active {
    border-color: var(--avh-blau);
    background: var(--avh-blau-hell);
    color: var(--avh-blau);
  }

  .table.avh-karten,
  .table.avh-karten > tbody,
  .table.avh-karten > tfoot,
  .table.avh-karten tr,
  .table.avh-karten td,
  .table.avh-karten tbody th { display: block; width: 100%; }
  .table.avh-karten > thead { display: none; }
  .table.avh-karten tr { position: relative; padding: 0.85rem 1rem; border-bottom: 1px solid var(--avh-rahmen); }
  .table.avh-karten > tbody > tr:last-child { border-bottom: 0; }
  .table.avh-karten > tfoot > tr { background: var(--avh-hintergrund); }
  .table.avh-karten > :not(caption) > * > * { padding: 0.2rem 0; border-bottom-width: 0; }
  .table.avh-karten td:not([colspan]) { text-align: left !important; }
  .table.avh-karten .text-nowrap { white-space: normal !important; }
  /* Lange Werte in der schmalen Spalte: Abzeichen umbrechen statt abschneiden,
     lange Wörter mit Silbentrennung („Aufwands-entschädigung“) statt mitten im Wort */
  .table.avh-karten .badge { white-space: normal; text-align: left; line-height: 1.3; }
  .table.avh-karten td { hyphens: auto; overflow-wrap: break-word; }

  .table.avh-karten .avh-karten-titel { padding-bottom: 0.4rem; padding-right: 2.5rem; }
  /* Beschriftung als Spalte links; flow-root, damit lange (umbrechende) Beschriftungen mitwachsen */
  .table.avh-karten td[data-label] { display: flow-root; padding-left: 8.5rem; }
  .table.avh-karten td[data-label]::before {
    content: attr(data-label);
    float: left;
    width: 8rem;
    margin-left: -8.5rem;
    padding-top: 0.1rem;
    color: var(--avh-text-gedimmt);
    font: 400 0.8125rem/1.35 var(--bs-font-sans-serif);
    letter-spacing: normal;
    overflow-wrap: anywhere;
  }
  .table.avh-karten .avh-karten-leer { display: none; }
  .table.avh-karten .avh-karten-auswahl { position: absolute; top: 0.85rem; right: 1rem; width: auto; }
  .table.avh-karten .avh-karten-auswahl .form-check-input { width: 1.5rem; height: 1.5rem; }
  .table.avh-karten td:not([data-label]):not(.avh-karten-titel):not(.avh-karten-auswahl):not([colspan]) {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    padding-top: 0.6rem;
  }
  /* !important: Formulare in Aktionsspalten tragen oft .d-inline (display: inline !important) */
  .table.avh-karten td:not([data-label]):not(.avh-karten-titel) > form { display: flex !important; flex: 1 1 auto; }
  .table.avh-karten .btn { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; min-width: 44px; }
  .table.avh-karten td:not([data-label]):not(.avh-karten-titel) .btn { flex: 1 1 auto; }
  /* Löschen/Sperren nicht direkt neben Bearbeiten: Gefährliches ganz nach rechts */
  .table.avh-karten td:not([data-label]):not(.avh-karten-titel):has(.btn-outline-danger, .btn-danger) .btn {
    flex: 0 0 auto;
    min-width: 88px;
  }
  .table.avh-karten td:not([data-label]):not(.avh-karten-titel) > :is(.btn-outline-danger, .btn-danger),
  .table.avh-karten td:not([data-label]):not(.avh-karten-titel) > form:has(.btn-outline-danger, .btn-danger) {
    flex: 0 0 auto;
    margin-left: auto;
  }
}

/* ---------- Seitengerüst (angemeldet) ---------- */
.avh-app { display: flex; min-height: 100vh; }

.avh-sidebar {
  --bs-offcanvas-width: var(--avh-sidebar-breite);
  --bs-offcanvas-bg: var(--avh-nav);
  --bs-offcanvas-color: var(--avh-nav-text);
  background: var(--avh-nav);
  color: var(--avh-nav-text);
}
@media (min-width: 992px) {
  .avh-sidebar {
    background-color: var(--avh-nav) !important; /* offcanvas-lg setzt sonst transparent */
    position: sticky;
    top: 0;
    flex: 0 0 var(--avh-sidebar-breite);
    width: var(--avh-sidebar-breite);
    height: 100vh;
    overflow-y: auto;
  }
}

.avh-marke {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1.1rem 1.25rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
  color: #fff;
  text-decoration: none;
}
.avh-marke img { width: 40px; height: 40px; background: #fff; border-radius: 50%; }
.avh-marke-name { font-weight: 650; font-size: 0.95rem; line-height: 1.2; }
.avh-marke-sub { font-size: 0.75rem; color: var(--avh-nav-text-gedimmt); }
.avh-marke:hover { color: #fff; }

.avh-nav { padding: 0.75rem 0.75rem 1.5rem; }
.avh-nav-gruppe {
  margin: 1.1rem 0.75rem 0.4rem;
  color: var(--avh-nav-text-gedimmt);
  font-size: 0.75rem;
  font-weight: 650;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
/* Einklappbare Gruppe (z. B. System): Überschrift als Schalter */
.avh-nav-klapp > summary { display: flex; align-items: center; justify-content: space-between; cursor: pointer; list-style: none; border-radius: 0.25rem; }
.avh-nav-klapp > summary::-webkit-details-marker { display: none; }
.avh-nav-klapp > summary::after { content: "▸"; font-size: 0.8rem; transition: transform 0.15s; }
.avh-nav-klapp[open] > summary::after { transform: rotate(90deg); }
.avh-nav-klapp > summary:hover { color: #fff; }
.avh-nav-klapp > summary:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }

.avh-nav-link {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.55rem 0.75rem;
  border-radius: 0.375rem;
  color: var(--avh-nav-text);
  font-size: 0.9rem;
  font-weight: 500;
  text-decoration: none;
}
.avh-nav-link i { width: 1.1rem; text-align: center; color: var(--avh-nav-text-gedimmt); }
.avh-nav-link:hover { background: var(--avh-nav-hover); color: #fff; }
.avh-nav-link.aktiv { background: var(--avh-nav-aktiv); color: #fff; font-weight: 600; }
.avh-nav-link.aktiv i { color: #fff; }
.avh-nav-link.aktiv::before {
  content: "";
  position: absolute;
  left: -0.75rem;
  top: 0.35rem;
  bottom: 0.35rem;
  width: 3px;
  border-radius: 0 3px 3px 0;
  background: var(--avh-rot);
}
.avh-nav-fuss {
  margin-top: auto;
  padding: 0.9rem 1.25rem;
  border-top: 1px solid rgba(255, 255, 255, 0.07);
  color: var(--avh-nav-text-gedimmt);
  font-size: 0.75rem;
}

.avh-main { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; }

.avh-topbar {
  position: sticky;
  top: 0;
  z-index: 1020;
  display: flex;
  align-items: center;
  gap: 1rem;
  height: var(--avh-topbar-hoehe);
  padding: 0 1.5rem;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--avh-rahmen);
}
.avh-topbar-titel { color: var(--avh-text-gedimmt); font-size: 0.85rem; font-weight: 500; }
/* Handy: Pfad einzeilig, bei Platzmangel mit „…“ gekürzt */
@media (max-width: 767.98px) {
  .avh-topbar { gap: 0.6rem; padding: 0 1rem; }
  .avh-topbar-titel { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
}
.avh-benutzer {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--avh-text);
  text-decoration: none;
}
.avh-avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--avh-blau-hell);
  color: var(--avh-blau);
  font-size: 0.8rem;
  font-weight: 700;
}
/* ---------- Lange Formulare ----------
   Abschnitte durchnummerieren (auch aus eingebundenen Teilvorlagen); Seitenleiste mit der
   Zusammenfassung zählt nicht mit (hat keinen card-header). */
.avh-abschnitte { counter-reset: abschnitt; }
.avh-abschnitte .card > .card-header::before {
  counter-increment: abschnitt;
  content: counter(abschnitt) " · ";
  color: var(--avh-text-gedimmt);
}

/* Ergebnisleiste (avh.js, data-leiste): unten fest, solange die Zusammenfassung am Ende
   des Formulars nicht zu sehen ist – nur dort, wo die Seitenleiste unter dem Formular steht. */
.avh-ergebnis-leiste {
  position: fixed;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 1030;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.6rem 1rem calc(0.6rem + env(safe-area-inset-bottom));
  background: #fff;
  border-top: 1px solid var(--avh-rahmen);
  box-shadow: 0 -4px 16px rgba(20, 28, 43, 0.08);
}
.avh-ergebnis-leiste[hidden] { display: none; }
.avh-ergebnis-leiste-text { flex: 1 1 auto; min-width: 0; line-height: 1.2; }
.avh-ergebnis-leiste-text small { display: block; color: var(--avh-text-gedimmt); font-size: 0.75rem; }
.avh-ergebnis-leiste-text strong { font-size: 1.15rem; }
body.avh-mit-leiste .avh-main { padding-bottom: 4.5rem; }
@media (min-width: 1200px) {
  .avh-ergebnis-leiste { display: none; }
  body.avh-mit-leiste .avh-main { padding-bottom: 0; }
}

/* ---------- Einrichtungsassistent ---------- */
.avh-assistent-schritte summary { cursor: pointer; list-style: none; }
.avh-assistent-schritte summary::-webkit-details-marker { display: none; }
.avh-assistent-schritte summary::after { content: "▾"; color: var(--avh-text-gedimmt); margin-left: 0.5rem; }
.avh-assistent-schritte[open] summary::after { content: "▴"; }
.avh-assistent-nr {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.5rem;
  height: 1.5rem;
  margin-right: 0.6rem;
  border-radius: 50%;
  background: var(--avh-blau-hell);
  color: var(--avh-blau);
  font-size: 0.75rem;
  font-weight: 650;
}
.list-group-item.active .avh-assistent-nr { background: #fff; }

/* ---------- Touch-Geräte: Tippziele mindestens 44 px (WCAG 2.5.5) ----------
   Nur bei grobem Zeiger (Finger) – am Desktop mit Maus bleibt alles kompakt. */
@media (pointer: coarse) {
  .btn,
  .form-control,
  .form-select { min-height: 44px; }
  .btn { display: inline-flex; align-items: center; justify-content: center; }
  .btn-sm { min-width: 44px; }
  .avh-benutzer { min-height: 44px; }
  .form-check { display: flex; align-items: center; gap: 0.6rem; min-height: 44px; padding-left: 0; }
  .form-check .form-check-input { float: none; flex-shrink: 0; margin: 0; }
  .form-check-input { width: 1.4rem; height: 1.4rem; }
  .form-check-label { padding: 0.65rem 0; }
  .page-link { min-width: 44px; min-height: 44px; display: flex; align-items: center; justify-content: center; }
  .dropdown-item { padding-top: 0.7rem; padding-bottom: 0.7rem; }
  .avh-symbol-link { display: inline-flex; align-items: center; justify-content: center; min-width: 44px; min-height: 44px; }
  .avh-fuss a { display: inline-block; padding: 0.8rem 0.15rem; }
  /* Handy-Durchsicht Finanzen/Vorstand/Lehrwart/TL (21.11.2026) */
  .avh-pfad-link { display: inline-block; padding: 0.75rem 0.25rem; margin: -0.75rem -0.25rem; }
  summary { padding-top: 0.6rem; padding-bottom: 0.6rem; }
  td > .form-check-input, th > .form-check-input { width: 1.75rem; height: 1.75rem; }
}

/* Vereinslogo (hochgeladen, als PNG aufbereitet): nie verzerrt, auf weißem Grund */
.avh-vereinslogo {
  object-fit: contain;
  background: #fff;
  border: 1px solid var(--avh-rahmen);
  border-radius: 0.5rem;
}
.avh-avatar.avh-vereinslogo { border-radius: 50%; padding: 2px; }
.avh-vereinslogo-32 { width: 32px; height: 32px; padding: 2px; }
.avh-vereinslogo-56 { width: 56px; height: 56px; padding: 3px; }
.avh-vereinslogo-72 { width: 72px; height: 72px; padding: 4px; }
.avh-vereinslogo-leer {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--avh-text-gedimmt);
  font-size: 1.5rem;
  border-style: dashed;
}
.avh-benutzer-name { font-size: 0.875rem; font-weight: 600; line-height: 1.1; }
.avh-benutzer-rolle { font-size: 0.75rem; color: var(--avh-text-gedimmt); }

.avh-content { flex: 1 1 auto; padding: 2rem 1.5rem 3rem; }
@media (min-width: 1200px) { .avh-content { padding: 2rem 2.5rem 3rem; } }
.avh-content-inner { max-width: 1320px; margin: 0 auto; }

.avh-seitenkopf { margin-bottom: 1.5rem; }
.avh-seitenkopf h1 { font-size: 1.5rem; margin: 0; }
.avh-seitenkopf p { margin: 0.25rem 0 0; color: var(--avh-text-gedimmt); }

.avh-fuss {
  padding: 1rem 1.5rem;
  border-top: 1px solid var(--avh-rahmen);
  color: var(--avh-text-gedimmt);
  font-size: 0.75rem;
}

/* ---------- Anmeldeseiten ---------- */
.avh-auth { min-height: 100vh; display: flex; }
.avh-auth-marke {
  display: none;
  flex: 0 0 42%;
  flex-direction: column;
  justify-content: space-between;
  padding: 3rem;
  background:
    linear-gradient(160deg, rgba(20, 28, 43, 0.96), rgba(23, 44, 72, 0.96)),
    var(--avh-nav);
  color: #fff;
  border-right: 4px solid var(--avh-rot);
}
@media (min-width: 992px) { .avh-auth-marke { display: flex; } }
.avh-auth-marke img { width: 96px; height: 96px; background: #fff; border-radius: 50%; }
.avh-auth-marke h2 { color: #fff; font-size: 1.9rem; margin-top: 1.5rem; }
.avh-auth-marke p { color: var(--avh-nav-text); max-width: 26rem; }
.avh-auth-marke small { color: var(--avh-nav-text); font-size: 0.8rem; }

.avh-auth-formular {
  flex: 1 1 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 1.25rem;
  background: #fff;
}
.avh-auth-box { width: 100%; max-width: 400px; }
.avh-auth-box .avh-auth-logo { width: 64px; height: 64px; }
@media (min-width: 992px) { .avh-auth-box .avh-auth-logo { display: none; } }
.avh-auth-box h1 { font-size: 1.5rem; }

/* Vorteile auf der Anmeldeseite: hell auf der Markenfläche, dunkel am Handy unter dem Formular */
.avh-vorteile { list-style: none; padding: 0; margin: 2rem 0 0; display: grid; gap: 1.1rem; max-width: 26rem; }
.avh-vorteile li { display: flex; gap: 0.9rem; align-items: flex-start; font-size: 0.875rem; line-height: 1.45; }
.avh-vorteile i {
  flex: 0 0 2.25rem;
  height: 2.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 0.5rem;
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}
.avh-vorteile strong { display: block; color: #fff; font-weight: 600; }
.avh-auth-marke .avh-vorteile div { color: var(--avh-nav-text); }

.avh-vorteile-handy { margin-top: 2.5rem; padding-top: 2rem; border-top: 1px solid var(--avh-rahmen); }
.avh-vorteile-handy h2 { font-size: 1.05rem; font-weight: 650; margin-bottom: 0; }
.avh-vorteile-handy .avh-vorteile { margin-top: 1.25rem; }
.avh-vorteile-handy .avh-vorteile i { background: var(--avh-blau-hell); color: var(--avh-blau); }
.avh-vorteile-handy .avh-vorteile strong { color: var(--avh-text); }
.avh-vorteile-handy .avh-vorteile div { color: var(--avh-text-gedimmt); }
.avh-login-optionen .mb-3 { margin-bottom: 0 !important; }

/* ---------- Fehlerseiten ---------- */
.avh-fehler-code { font-size: 4.5rem; font-weight: 700; letter-spacing: -0.04em; color: #7d889b; } /* großer Text: 3,3:1 */

/* ---------- Kacheln (Schnellzugriff) ---------- */
.avh-kachel { transition: border-color 0.15s, box-shadow 0.15s; }
.avh-kachel:hover { border-color: #b9c6d8 !important; box-shadow: 0 4px 14px rgba(20, 28, 43, 0.07) !important; }
.avh-kachel-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 0.5rem;
  background: var(--avh-blau-hell);
  color: var(--avh-blau);
  font-size: 1.05rem;
}

/* ---------- Seitenleiste in langen Formularen (Summe bleibt sichtbar) ---------- */
@media (min-width: 1200px) {
  .avh-sticky { position: sticky; top: calc(var(--avh-topbar-hoehe) + 1rem); }
}

/* ---------- Dashboard ---------- */
.avh-widget .card-header a { font-weight: 500; }
.avh-frist-datum {
  flex: 0 0 3rem;
  text-align: center;
  border: 1px solid var(--bs-border-color);
  border-radius: 0.4rem;
  padding: 0.2rem 0;
  line-height: 1.1;
}
.avh-frist-datum .tag { display: block; font-size: 1.1rem; font-weight: 700; color: var(--avh-text); }
.avh-frist-datum .monat { display: block; font-size: 0.75rem; text-transform: uppercase; color: var(--avh-text-gedimmt); }
.avh-frist-datum.dringend { border-color: var(--avh-rot); }
.avh-frist-datum.dringend .tag { color: var(--avh-rot-dunkel); }
.avh-frist-datum.erledigt { background: var(--avh-hintergrund); }
.avh-zahl-gross { font-size: 1.75rem; font-weight: 700; line-height: 1.1; }
/* Zähler in der Sidebar: offene Arbeit, kein Alarm – darum neutral statt rot */
.avh-badge-zaehler {
  margin-left: auto;
  min-width: 1.5rem;
  padding: 0.1rem 0.45rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 700;
  text-align: center;
}

/* Zähler auf hellem Grund (z. B. „Zu erledigen“) */
.avh-zaehler-neutral {
  min-width: 1.4rem;
  padding: 0.05rem 0.45rem;
  border-radius: 999px;
  background: var(--avh-blau-hell);
  color: var(--avh-blau);
  font-size: 0.75rem;
  font-weight: 700;
  text-align: center;
}

/* „Zu erledigen“: eine Zeile je Aufgabe, Knopf rechts; dringend = roter Rand links */
.avh-aufgabe { display: flex; align-items: center; gap: 0.9rem; padding: 0.85rem 1rem; }
.avh-aufgabe .min-w-0 { min-width: 0; }
.avh-aufgabe-icon {
  flex: 0 0 2.25rem;
  height: 2.25rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 0.5rem;
  background: var(--avh-blau-hell);
  color: var(--avh-blau);
}
.avh-aufgabe.dringend { box-shadow: inset 3px 0 0 var(--avh-rot); }
.avh-aufgabe.dringend .avh-aufgabe-icon { background: var(--avh-rot-hell); color: var(--avh-rot-dunkel); }
.avh-icon-erledigt { color: #1e7a4c; }  /* 5,3:1 auf Weiß */
@media (max-width: 575.98px) {
  .avh-aufgabe { flex-wrap: wrap; }
  .avh-aufgabe > .btn { flex: 1 0 100%; }
}

/* Widget-Raster: Spalten statt Zeilen – Karten unterschiedlicher Höhe lassen keine Lücken */
.avh-widget-raster { column-gap: 1.5rem; }
.avh-widget-raster > .card { break-inside: avoid; margin-bottom: 1.5rem; }
@media (min-width: 768px) { .avh-widget-raster { columns: 2; } }
@media (min-width: 1200px) { .avh-widget-raster { columns: 3; } }

/* Links, die erkennbar navigieren (Kartenkopf, Tabellen, Widget-Listen): ohne Dauer-Unterstrich.
   Im Fließtext bleiben Links unterstrichen (WCAG 1.4.1). */
a.avh-link-ruhig, .avh-links-ruhig a:not(.btn) { text-decoration: none; font-weight: 500; }
a.avh-link-ruhig:hover, .avh-links-ruhig a:not(.btn):hover,
a.avh-link-ruhig:focus-visible, .avh-links-ruhig a:not(.btn):focus-visible { text-decoration: underline; }

/* Geldrichtung: Zahlung an den AVH (aus) / Auszahlung vom AVH (ein) */
.avh-richtung {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--avh-text-gedimmt);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.avh-richtung-aus i { color: var(--avh-blau); }
.avh-richtung-ein i { color: #1e7a4c; }
.avh-richtung-inline { text-transform: none; letter-spacing: normal; font-weight: 500; font-size: 0.8125rem; }

/* PDF-Symbol: neutral – Rot ist für Warnungen reserviert */
.avh-pdf { color: var(--avh-text-gedimmt); }
a:hover > .avh-pdf { color: var(--avh-blau); }

/* Entscheidung auf der Antragsseite */
.avh-entscheidung-panel + .avh-entscheidung-panel { margin-top: 1.25rem; padding-top: 1.25rem; border-top: 1px solid var(--avh-rahmen); }
[data-entscheidung-wahl]:not([hidden]) ~ .avh-entscheidung-panel { margin-top: 0; padding-top: 0; border-top: 0; }
.avh-entscheidung-panel[hidden] { display: none; }
.avh-entscheidung-wahl .btn { --bs-btn-font-size: 0.85rem; padding-left: 0.4rem; padding-right: 0.4rem; }

/* Ganze Tabellenzeile klickbar: Link in der ersten Spalte mit .stretched-link deckt die Zeile ab;
   Bedienelemente (Auswahl, weitere Links) liegen mit .avh-ueber-link darüber. */
.avh-zeile-klickbar { position: relative; }
.avh-zeile-klickbar .avh-ueber-link, .avh-zeile-klickbar .avh-ueber-link * { position: relative; z-index: 2; }
.avh-zeilen-link { color: var(--avh-text); text-decoration: none; }
.avh-zeile-klickbar:hover .avh-zeilen-link, .avh-zeilen-link:focus-visible { color: var(--avh-blau); text-decoration: underline; }

/* Kennzahl als Filter (Vereinsliste) */
.avh-kennzahl-filter { transition: border-color 0.15s, box-shadow 0.15s; }
.avh-kennzahl-filter:hover { box-shadow: 0 4px 14px rgba(20, 28, 43, 0.07) !important; }
.avh-kennzahl-filter.aktiv { background: var(--avh-blau-hell); border-color: #b9c6d8 !important; }
.avh-kennzahl-filter:not(.aktiv) { border-left-color: var(--avh-rahmen) !important; }
details > summary { cursor: pointer; }

/* Speichern-Leiste langer Formulare: bleibt unten im Bild, bis das Formularende erreicht ist */
.avh-formular-fuss {
  position: sticky;
  bottom: 0;
  z-index: 5;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 1rem;
  margin: 1.5rem -1.5rem -1.5rem;
  padding: 0.85rem 1.5rem calc(0.85rem + env(safe-area-inset-bottom));
  background: #fff;
  border-top: 1px solid var(--avh-rahmen);
  border-radius: 0 0 var(--bs-border-radius) var(--bs-border-radius);
}

/* „Ändern“-Bereich: gespeicherter Wert mit Knopf; Felder erst nach Klick */
.avh-aendern > summary { list-style: none; }
.avh-aendern > summary::-webkit-details-marker { display: none; }
/* Geöffnet bleibt geöffnet: Zuklappen würde eingegebene Werte nicht verwerfen */
.avh-aendern[open] > summary { pointer-events: none; }
.avh-aendern[open] .avh-aendern-knopf { display: none; }

/* Toasts (Erfolg/Info): oben rechts unter der Kopfzeile */
.avh-toasts {
  position: fixed;
  top: calc(var(--avh-topbar-hoehe) + 0.75rem);
  right: 1rem;
  z-index: 1090;
  display: grid;
  gap: 0.5rem;
  width: min(24rem, calc(100vw - 2rem));
}
.avh-toast {
  width: 100%;
  border: 1px solid var(--avh-rahmen);
  border-left: 3px solid var(--avh-blau);
  background: #fff;
  box-shadow: 0 8px 24px rgba(20, 28, 43, 0.12);
  transition: opacity 0.3s;
}
.avh-toast:not(.show) { opacity: 0; }
.avh-toast-success { border-left-color: #1e7a4c; }
.avh-toast-success .fa-circle-check { color: #1e7a4c; }
.avh-toast-info .fa-circle-info { color: var(--avh-blau); }

/* Zeitleiste „Stand Ihres Antrags“: Punkte auf einer Linie, erledigt / aktuell / offen */
.avh-zeitleiste { list-style: none; margin: 0; padding: 0; }
.avh-schritt { position: relative; display: flex; gap: 0.9rem; padding-bottom: 1.25rem; }
.avh-schritt:last-child { padding-bottom: 0; }
.avh-schritt:not(:last-child)::before {
  content: "";
  position: absolute;
  left: 0.6875rem;
  top: 1.5rem;
  bottom: 0.1rem;
  width: 2px;
  background: var(--avh-rahmen);
}
.avh-schritt.erledigt:not(:last-child)::before { background: var(--avh-blau); }
.avh-schritt-punkt {
  position: relative;
  flex: 0 0 1.5rem;
  height: 1.5rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  border: 2px solid var(--avh-rahmen);
  background: #fff;
  color: #fff;
  font-size: 0.7rem;
}
.avh-schritt.erledigt .avh-schritt-punkt { background: var(--avh-blau); border-color: var(--avh-blau); }
.avh-schritt.abgelehnt .avh-schritt-punkt { background: var(--avh-rot); border-color: var(--avh-rot); }
.avh-schritt.aktuell .avh-schritt-punkt { border-color: var(--avh-blau); box-shadow: 0 0 0 4px var(--avh-blau-hell); }
.avh-schritt.aktuell .avh-schritt-punkt::after { content: ""; width: 0.5rem; height: 0.5rem; border-radius: 50%; background: var(--avh-blau); }
.avh-schritt.ziel .avh-schritt-inhalt { color: var(--avh-text-gedimmt); }
.avh-schritt-inhalt { flex: 1 1 auto; min-width: 0; padding-top: 0.1rem; }

/* Belege mit Vorschau */
.avh-beleg-liste .list-group-item.aktiv { background: var(--avh-blau-hell); }
.avh-beleg-liste .list-group-item.aktiv a { font-weight: 600; }
.avh-beleg-liste .min-w-0 { min-width: 0; }
.avh-beleg-werkzeug { border-top: 1px solid var(--avh-rahmen); background: #f8fafc; }
.avh-beleg-flaeche { height: 70vh; min-height: 24rem; background: #eef1f5; }
.avh-beleg-flaeche iframe { display: block; width: 100%; height: 100%; border: 0; }
.avh-beleg-flaeche img { display: block; max-width: 100%; max-height: 100%; margin: 0 auto; object-fit: contain; }

/* Prüfansicht: Beleg rechts fest im Bild, so hoch wie der Bildschirm */
@media (min-width: 1200px) {
  .avh-pruefansicht [data-belege] {
    position: sticky;
    top: calc(var(--avh-topbar-hoehe) + 1rem);
    display: flex;
    flex-direction: column;
    height: calc(100vh - var(--avh-topbar-hoehe) - 2rem);
  }
  .avh-pruefansicht [data-belege] .avh-beleg-liste { max-height: 9rem; overflow-y: auto; flex: 0 0 auto; }
  .avh-pruefansicht [data-belege] .avh-beleg-vorschau { flex: 1 1 auto; display: flex; flex-direction: column; min-height: 0; }
  .avh-pruefansicht [data-belege] .avh-beleg-flaeche { flex: 1 1 auto; height: auto; min-height: 0; }
}

/* Zeile per Tastatur markiert (j/k) */
tr.avh-zeile-markiert > * { box-shadow: inset 0 0 0 9999px var(--avh-blau-hell); }
tr.avh-zeile-markiert > :first-child { box-shadow: inset 3px 0 0 var(--avh-blau), inset 0 0 0 9999px var(--avh-blau-hell); }

/* Dialog (Tastenkürzel) */
.avh-dialog {
  width: min(26rem, calc(100vw - 2rem));
  padding: 1.25rem 1.5rem;
  border: 1px solid var(--avh-rahmen);
  border-radius: var(--bs-border-radius-lg);
  box-shadow: 0 16px 48px rgba(20, 28, 43, 0.2);
  color: var(--avh-text);
}
.avh-dialog::backdrop { background: rgba(20, 28, 43, 0.35); }
.avh-kuerzel { display: grid; grid-template-columns: auto 1fr; gap: 0.5rem 1rem; align-items: center; }
.avh-kuerzel dt { font-weight: 400; white-space: nowrap; }
.avh-kuerzel dd { margin: 0; font-size: 0.875rem; }
.avh-kuerzel kbd, .avh-hilfe kbd {
  padding: 0.1rem 0.4rem;
  border: 1px solid var(--avh-rahmen);
  border-bottom-width: 2px;
  border-radius: 0.25rem;
  background: #fff;
  color: var(--avh-text);
  font: 600 0.8rem/1.3 var(--bs-font-sans-serif);
}

/* Aktiver Eintrag im Benutzermenü (z. B. gewählte Ansicht) in den Hausfarben */
.dropdown-menu { --bs-dropdown-link-active-bg: var(--avh-blau-hell); --bs-dropdown-link-active-color: var(--avh-blau); }
.dropdown-item.active { font-weight: 600; }

/* Kalender-Abo (Fristenkalender): aufklappbare Karte */
.avh-kalender-abo > summary { cursor: pointer; list-style: none; }
.avh-kalender-abo > summary::-webkit-details-marker { display: none; }
.avh-kalender-abo:not([open]) > summary { border-bottom: 0; border-radius: var(--bs-border-radius); }

/* Startcheckliste (Vereine, erster Login) */
.avh-einfuehrung { border-top: 3px solid var(--avh-blau) !important; }
.avh-checkliste { display: grid; gap: 0.75rem; }
.avh-checkliste li { display: flex; gap: 0.75rem; align-items: flex-start; }
.avh-checkliste .min-w-0 { min-width: 0; }
.avh-check {
  flex: 0 0 1.6rem;
  height: 1.6rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  border: 2px solid var(--avh-blau);
  color: var(--avh-blau);
  font-size: 0.75rem;
  font-weight: 700;
}
.avh-checkliste li.erledigt { color: var(--avh-text-gedimmt); }
.avh-checkliste li.erledigt .avh-check { background: var(--avh-blau); color: #fff; }

/* Glocke (Neuigkeiten) in der Kopfzeile */
.avh-glocke {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 50%;
  color: var(--avh-text-gedimmt);
  font-size: 1.05rem;
  text-decoration: none;
}
.avh-glocke:hover, .avh-glocke.aktiv { background: var(--avh-blau-hell); color: var(--avh-blau); }
.avh-glocke-zahl {
  position: absolute;
  top: 0.05rem;
  right: 0;
  min-width: 1.1rem;
  padding: 0 0.25rem;
  border-radius: 999px;
  background: var(--avh-blau);
  color: #fff;
  font-size: 0.6875rem;
  font-weight: 700;
  line-height: 1.1rem;
  text-align: center;
}
@media (pointer: coarse) { .avh-glocke { width: 44px; height: 44px; flex-shrink: 0; } }

/* Bausteine & Begriffe: Farbfelder (ohne style-Attribute, CSP) */
.avh-farbfeld { height: 3.5rem; border-bottom: 1px solid var(--avh-rahmen); border-radius: var(--bs-border-radius) var(--bs-border-radius) 0 0; }
.avh-farbfeld[data-farbe="--avh-blau"] { background: var(--avh-blau); }
.avh-farbfeld[data-farbe="--avh-blau-hell"] { background: var(--avh-blau-hell); }
.avh-farbfeld[data-farbe="--avh-rot"] { background: var(--avh-rot); }
.avh-farbfeld[data-farbe="--avh-nav"] { background: var(--avh-nav); }
.avh-farbfeld[data-farbe="--avh-text"] { background: var(--avh-text); }
.avh-farbfeld[data-farbe="--avh-text-gedimmt"] { background: var(--avh-text-gedimmt); }
.avh-farbfeld[data-farbe="--avh-rahmen"] { background: var(--avh-rahmen); }
.avh-farbfeld[data-farbe="--avh-hintergrund"] { background: var(--avh-hintergrund); }

/* Sprunglink „Zum Inhalt springen“: erst beim Tabben sichtbar */
.avh-sprunglink {
  position: absolute;
  top: 0.5rem;
  left: 0.5rem;
  z-index: 2000;
  padding: 0.5rem 1rem;
  border-radius: var(--bs-border-radius);
  background: var(--avh-blau);
  color: #fff;
  font-weight: 600;
  transform: translateY(-200%);
}
.avh-sprunglink:focus { transform: none; color: #fff; }
#inhalt:focus { outline: none; }
.avh-beleg-flaeche iframe:focus-visible { outline: 3px solid var(--avh-blau); outline-offset: -3px; }

/* ---------- Suche ---------- */
.avh-taste {
  padding: 0 0.35rem;
  border: 1px solid var(--avh-rahmen);
  border-radius: 0.25rem;
  background: var(--avh-hintergrund);
  color: var(--avh-text-gedimmt);
  font: 600 0.75rem/1.4 var(--bs-font-sans-serif);
  box-shadow: none;
}
.avh-pfad-link { color: inherit; }
.avh-pfad-link:hover { color: var(--avh-blau); }
.avh-suche { max-width: 22rem; }
tr:target > td { background: var(--avh-blau-hell); }

/* ---------- Hilfe ---------- */
.avh-hilfe h3 { font-size: 1rem; font-weight: 600; margin: 1.25rem 0 0.5rem; }
.avh-hilfe h3:first-child { margin-top: 0; }
.avh-hilfe p, .avh-hilfe li { line-height: 1.6; }
.avh-hilfe ol, .avh-hilfe ul { padding-left: 1.25rem; }
.avh-hilfe .hinweis { background: var(--avh-hintergrund); border-left: 3px solid var(--avh-blau); padding: 0.6rem 0.9rem; border-radius: 0.25rem; }
.avh-hilfe section { scroll-margin-top: calc(var(--avh-topbar-hoehe) + 1rem); }
.avh-hilfe kbd, .avh-hilfe .ui { font-family: inherit; font-weight: 600; }

/* ---------- Hilfsklassen (statt style-Attributen – die CSP erlaubt keine Inline-Styles) ---------- */
.avh-topbar-statisch { position: static; }
.avh-content-inner.avh-schmal { max-width: 960px; }
.avh-fehlerbox { max-width: 480px; }
.avh-scrollbox { max-height: 320px; overflow-y: auto; }
.avh-scrollbox-klein { max-height: 220px; }
.avh-spalte-auswahl { width: 2.5rem; }
.avh-spalte-22 { width: 22%; }
.avh-spalte-14 { width: 14%; }
.avh-icon-blau { color: var(--avh-blau); }

/* Fortschrittsbalken als <progress>: Breite ohne Inline-Style, auch ohne JavaScript */
.avh-fortschritt {
  display: block;
  width: 100%;
  height: 0.5rem;
  border: 0;
  border-radius: 999px;
  overflow: hidden;
  appearance: none;
  background: var(--bs-secondary-bg);
  color: var(--avh-blau);
}
.avh-fortschritt::-webkit-progress-bar { background: var(--bs-secondary-bg); }
.avh-fortschritt::-webkit-progress-value { background: var(--avh-blau); }
.avh-fortschritt::-moz-progress-bar { background: var(--avh-blau); }

/* ---------- Druck (Berichte „Drucken / PDF“ und jede andere Seite) ---------- */
@media print {
  @page { size: A4; margin: 15mm 12mm; }
  body { background: #fff; font-size: 10pt; }
  .avh-sidebar, .avh-topbar, .avh-fuss, .alert-dismissible, .avh-toasts, .d-print-none { display: none !important; }
  .avh-app, .avh-main { display: block; min-height: 0; }  /* sonst Leerseiten (100vh) */
  .avh-content { padding: 0; }
  .avh-content-inner { max-width: none; }
  .card { border: 1px solid #c5ccd6 !important; box-shadow: none !important; break-inside: avoid; }
  .table-responsive { overflow: visible; }
  thead { display: table-header-group; }
  tr { break-inside: avoid; }
  a { color: inherit; text-decoration: none; }
  /* Berichte: Querformat – für die GANZE Seite, nicht nur den Berichtsblock: ein Wechsel
     zwischen Quer- und Hochformat erzeugt (v. a. in Firefox) leere Folgeseiten */
  body:has(.avh-bericht) { page: quer; }
  .avh-bericht .row > [class*="col-"] { flex: 1 0 0%; width: auto; max-width: none; }
  .avh-bericht .kennzahl-wert { font-size: 14pt; }
  .avh-bericht .table { font-size: 8pt; }
  .avh-bericht .table > :not(caption) > * > * { padding: 0.2rem 0.35rem; }
  /* Lange Tabellen dürfen umbrechen (sonst bleibt Seite 1 fast leer); Kennzahl-Kacheln,
     Überschrift mit erster Zeile und einzelne Zeilen bleiben zusammen */
  .avh-bericht .card:not(.kennzahl):not(.avh-druck-zusammen) { break-inside: auto; }
  .avh-bericht .card-header { break-after: avoid; background: #f3f5f8 !important;
    font-weight: 600; print-color-adjust: exact; -webkit-print-color-adjust: exact; }
  .avh-bericht .table > thead th { background: #f3f5f8 !important; color: #1c2533;
    border-bottom: 1px solid #8a94a3; print-color-adjust: exact; -webkit-print-color-adjust: exact; }
  .avh-bericht .table-hover > tbody > tr:hover > * { --bs-table-bg-state: transparent; }
  .avh-bericht tfoot { display: table-row-group; }  /* Summe nur am Ende, nicht je Seite */
  .avh-bericht tfoot td { border-top: 1.5px solid #1c2533; }
  .avh-bericht .avh-seitenkopf { margin-bottom: 0.6rem; }
  .avh-bericht .avh-seitenkopf h1 { font-size: 16pt; }
  .avh-druckkopf { display: flex !important; }
}
/* Briefkopf nur im Druck (Berichte) */
.avh-druckkopf { display: none; align-items: center; gap: 0.75rem; padding-bottom: 0.5rem;
  margin-bottom: 0.9rem; border-bottom: 2px solid var(--avh-rot); }
.avh-druckkopf img { width: 42px; height: 42px; object-fit: contain; }
.avh-druckkopf-name { font-weight: 700; font-size: 12pt; color: #141c2b; }
.avh-druckkopf-info { font-size: 8pt; color: #475264; }
.avh-druckkopf-rechts { margin-left: auto; text-align: right; }
@page quer { size: A4 landscape; margin: 12mm; }

/* Mehrzeilige Konfigurationswerte (z. B. Vorstand im Impressum) mit ihren Zeilenumbrüchen */
.avh-zeilenumbruch { white-space: pre-line; }

/* Zwei-Faktor-Anmeldung: QR-Code und Backup-Codes */
.avh-qr { width: 200px; height: 200px; image-rendering: pixelated; }
.avh-backup-codes { columns: 2; font-size: 1.05rem; line-height: 2; }

/* F4 Jugendtrainer: Stundentabelle (12 Monate) – passt ab ca. 1100 px ohne Querscrollen */
.f4-tabelle th, .f4-tabelle td { padding-left: .25rem; padding-right: .25rem; }
.f4-person { min-width: 15rem; }
.f4-zeit { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: .25rem; margin-top: .25rem; }
.f4-zeit input { min-width: 0; padding-left: .3rem; padding-right: .3rem; }
.f4-tabelle input.f4-stunden { min-width: 3.4rem; padding-left: .3rem; padding-right: .3rem; }

/* Satzung & Ordnungen (/satzung/) */
.avh-satzung-suche { position: sticky; top: var(--avh-topbar-hoehe, 3.75rem); z-index: 5; box-shadow: 0 -0.75rem 0 var(--avh-hintergrund); }
.avh-satzung-feld { min-width: 14rem; }
.avh-satzung-inhalt { position: sticky; top: 10.5rem; max-height: calc(100vh - 12rem); overflow: auto; }
.avh-satzung-inhalt summary { padding: .2rem 0; }
.avh-satzung-inhalt li a { display: block; padding: .1rem 0; }
.avh-satzung-kachel:hover { border-color: var(--avh-blau); }
.avh-satzung-text .abschnitt { scroll-margin-top: 11rem; }
.avh-satzung-text h3 { font-size: 1.05rem; font-weight: 600; margin: 1.1rem 0 .4rem; }
.avh-satzung-text h3 .nr, .avh-satzung-text .absatz { color: var(--avh-blau); }
.avh-satzung-text p { margin-bottom: .45rem; }
.avh-satzung-text ul { margin-bottom: .6rem; }
.avh-satzung-text li.tief { margin-left: 1.25rem; list-style: circle; }
.avh-satzung-text table { font-size: .875rem; margin: .5rem 0; }
.avh-satzung-text th, .avh-satzung-text td { border: 1px solid var(--bs-border-color); padding: .2rem .6rem; }
.avh-satzung-dokument { scroll-margin-top: 10.5rem; }
.avh-satzung-dokument mark { padding: 0 1px; border-radius: 2px; }
.avh-satzung-dokument mark.aktiv { background: #ffb347; outline: 2px solid #ffb347; }
.avh-satzung-aus { display: none !important; }

/* Editor der Datenschutzerklärung: Vorschau bleibt beim Scrollen im Bild (breite Bildschirme) */
.avh-editor textarea { font-family: var(--bs-font-monospace); font-size: .9rem; line-height: 1.55; }
.avh-editor-platzhalter { max-height: 60vh; overflow-y: auto; }
@media (min-width: 1400px) {
  .avh-editor-vorschau { position: sticky; top: 5.5rem; max-height: calc(100vh - 7rem); }
  .avh-editor-vorschau .card-body { overflow-y: auto; }
}
