@charset "UTF-8";

/* ============================================================
   MV — Ergänzungen zum "Nordic Marine"-Design-System
   Nur Komponenten, die es im Beratungs-/FT-Modul nicht gibt.
   Ausschließlich Design-Tokens verwenden, damit alle vier
   Farbschemata (hell/dunkel/rosa/grün) automatisch greifen.
   ============================================================ */

/* Seitenkopf mit Zurück-Button rechts */
.page-header-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--sp-md);
  flex-wrap: wrap;
}
.page-header-back { flex-shrink: 0; margin-top: 4px; }

/* Dashboard-Hero (Begrüßung wie im FT-Modul) */
.hero { margin-bottom: var(--sp-xl); }
.hero h1 {
  font-size: var(--fs-2xl);
  font-weight: 700;
  color: var(--navy);
  letter-spacing: -0.02em;
  margin-bottom: 4px;
}
.hero > p { color: var(--text-muted); margin-bottom: var(--sp-lg); }

/* Vier Karten nebeneinander auf großen Schirmen */
.qa-row--4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 1100px) { .qa-row--4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px)  { .qa-row--4 { grid-template-columns: 1fr; } }

/* Rollen-/Status-Badges */
.badge {
  display: inline-block;
  padding: 2px 10px;
  border-radius: var(--r-full);
  font-size: var(--fs-2xs); /* rem statt fix 11px — skaliert mit dem Textgrößen-Umschalter */
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  white-space: nowrap;
}

/* Text-Links in Datentabellen (z. B. Mitgliedsnamen) klar als Link
   erkennbar machen — Navy ist sonst kaum von Fließtext unterscheidbar.
   Aktions-Buttons (btn/btn-icon) bleiben ohne Unterstreichung. */
.item-list-table td a:not(.btn):not(.btn-icon) {
  text-decoration: underline;
  text-underline-offset: 2px;
}
.badge--lv      { background: var(--navy-wash);   color: var(--navy); }
.badge--gruppe  { background: var(--sea-light);   color: var(--sea); }
.badge--offen   { background: var(--amber-light); color: var(--amber); }
.badge--bezahlt { background: var(--success-light); color: var(--success); }
.badge--mahnung { background: var(--danger-light);  color: var(--danger); }
.badge--info    { background: var(--plum-light);  color: var(--plum); }
.badge--neutral { background: var(--bg); color: var(--text-muted); border: 1px solid var(--border); }

/* Filterleiste über Tabellen */
.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-sm) var(--sp-md);
  align-items: flex-end;
  margin-bottom: var(--sp-lg);
}
.filter-bar .form-group { min-width: 160px; flex: 0 1 auto; }
.filter-bar .form-group.wachsend { flex: 1 1 220px; }
.filter-bar .btn { margin-bottom: 1px; }

/* Ergebnis-Meta über Tabellen */
.tabellen-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--sp-md);
  flex-wrap: wrap;
  margin-bottom: var(--sp-sm);
  color: var(--text-muted);
  font-size: var(--fs-sm);
}

/* Sortier-Indikator */
table.js-sortierbar thead th[data-dir="asc"]::after  { content: " ▲"; font-size: 9px; }
table.js-sortierbar thead th[data-dir="desc"]::after { content: " ▼"; font-size: 9px; }

/* Zahlen rechtsbündig */
.ta-r { text-align: right; }
td.betrag, th.betrag { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }

/* Definition-Liste für Detailansichten */
.detail-liste {
  display: grid;
  grid-template-columns: minmax(160px, max-content) 1fr;
  gap: 6px var(--sp-lg);
  font-size: var(--fs-sm);
}
.detail-liste dt { color: var(--text-muted); font-weight: 600; }
.detail-liste dd { margin: 0; }

/* Verstorben-Kennzeichnung in Listen */
.verstorben { color: var(--danger); font-weight: 700; }

/* Runder Geburtstag */
tr.runder-geburtstag td { background: var(--copper-light); }

/* Formular-Abschnittstrenner mit weniger Abstand */
.form-abschnitt { margin-top: var(--sp-xl); }

/* Login-Seite */
.login-wrapper {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;   /* Karte + Anzeige-Einstellungen untereinander */
  align-items: center;
  justify-content: center;
  padding: var(--sp-lg);
  background: var(--bg);
}
.login-card {
  width: 100%;
  max-width: 420px;
  background: var(--surface);
  border: 1px solid var(--border-light);
  border-radius: var(--r-xl);
  box-shadow: var(--sh-lg);
  padding: var(--sp-2xl) var(--sp-xl);
}
.login-brand {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: var(--sp-xl);
}
.login-brand-logo {
  width: 48px; height: 48px;
  border-radius: var(--r-md);
  background: var(--navy);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: var(--fs-md);
}
.login-brand-text { font-weight: 700; font-size: var(--fs-lg); color: var(--navy); line-height: 1.25; }
.login-brand-text small { display: block; font-weight: 400; font-size: var(--fs-xs); color: var(--text-muted); }
.login-card .form-group { margin-bottom: var(--sp-md); }
.login-card .btn { width: 100%; margin-top: var(--sp-sm); }
.login-fussnote {
  text-align: center;
  color: var(--text-muted);
  font-size: var(--fs-xs);
  margin-top: var(--sp-lg);
}

/* Statistik-Kacheln klickbar */
a.stat-card { text-decoration: none; display: block; }
a.stat-card:hover { border-color: var(--navy-muted); }

/* Jahres-Schalter (Jahresbericht, Austritte, Lastschrift) */
.jahr-schalter {
  display: inline-flex;
  gap: 4px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-full);
  padding: 4px;
  flex-wrap: wrap;
}
.jahr-schalter a {
  padding: 6px 14px;
  border-radius: var(--r-full);
  font-size: var(--fs-sm);
  font-weight: 600;
  color: var(--text-mid);
}
.jahr-schalter a:hover { background: var(--navy-wash); color: var(--navy); text-decoration: none; }
.jahr-schalter a.aktiv { background: var(--navy); color: #fff; }

/* Fortschritts-/Summenbalken im Jahresbericht */
.balken {
  height: 8px;
  background: var(--navy-wash);
  border-radius: var(--r-full);
  overflow: hidden;
}
.balken > span { display: block; height: 100%; background: var(--copper); border-radius: var(--r-full); }

/* Druckansicht: Navigation, Bedienelemente & Footer ausblenden */
@media print {
  .site-header, .site-footer, .page-header-back, .filter-bar,
  .btn, .btn-icon, .user-prefs, .qa-row, .admin-bar,
  .jahr-schalter, .action-buttons, .content-header-controls,
  details, .form-navigation, .modal-overlay { display: none !important; }
  .main-wrapper { padding: 0; max-width: none; }
  .content-card { border: none; box-shadow: none; padding: 0; }
  body { background: #fff; }
}

/* ── Hilfesystem: Fragezeichen-Symbol mit Erklärfenster + Vorlesen ── */
.vv-hilfe { position: relative; display: inline-block; vertical-align: middle; }
.vv-hilfe-icon {
    background: none; border: none; margin: 0; padding: 2px; cursor: pointer;
    color: var(--sea); font-size: 0.8em; line-height: 1; vertical-align: middle;
    border-radius: 50%;
}
.vv-hilfe-icon:hover { color: var(--copper); }
.vv-hilfe-icon:focus-visible { outline: 2px solid var(--sea); outline-offset: 2px; }
h1 .vv-hilfe-icon { font-size: 0.6em; }

.vv-hilfe-popover {
    position: absolute; z-index: 200; top: calc(100% + 8px); left: 0; right: auto;
    min-width: 250px; max-width: 360px;
    background: var(--surface); color: var(--text-mid);
    border: 1px solid var(--border); border-radius: var(--r-md);
    box-shadow: var(--sh-lg, 0 10px 30px rgba(20, 30, 40, .18));
    padding: 12px 14px;
    font-size: var(--fs-sm); font-weight: 400; line-height: 1.5;
    text-align: left; text-transform: none; letter-spacing: 0; white-space: normal;
}
.vv-hilfe-kopf {
    display: flex; align-items: center; justify-content: space-between; gap: 10px;
    margin-bottom: 6px; color: var(--navy);
}
.vv-hilfe-kopf strong { font-size: var(--fs-sm); }
.vv-hilfe-vorlesen {
    display: inline-flex; align-items: center; gap: 5px; flex: none;
    background: none; border: 1px solid var(--border); border-radius: 6px;
    color: var(--sea); cursor: pointer; padding: 3px 8px; font-size: var(--fs-xs);
}
.vv-hilfe-vorlesen:hover { border-color: var(--sea); }
.vv-hilfe-vorlesen--aktiv { color: var(--copper); border-color: var(--copper); }
.vv-hilfe-vorlesen[disabled] { opacity: .5; cursor: not-allowed; }
.vv-hilfe-text { display: block; }

@media (max-width: 640px) {
    .vv-hilfe-popover {
        position: fixed; left: 12px; right: 12px; bottom: 12px; top: auto;
        min-width: 0; max-width: none;
    }
}
@media print { .vv-hilfe { display: none !important; } }

/* ── Grafik-/UI-Prüfung 19.08.2026: fehlende Klassen + Touch/Kontrast ── */

/* Hinweis-Callout (Rundmail-Versand, Bestätigung) */
.hinweis-box {
    display: flex; gap: 10px; align-items: flex-start;
    padding: 12px 16px;
    background: var(--navy-wash);
    border-left: 3px solid var(--sea);
    border-radius: var(--r-md);
    font-size: var(--fs-sm); line-height: 1.5; color: var(--text-mid);
}
.hinweis-box i { color: var(--sea); margin-top: 3px; flex-shrink: 0; font-size: 1.05rem; }

/* Schlichte Schlüssel-Wert-Tabelle (Rundmail-Bestätigung) */
.detail-table { width: 100%; border-collapse: collapse; font-size: var(--fs-sm); }
.detail-table th, .detail-table td {
    text-align: left; vertical-align: top;
    padding: 8px 10px; border-bottom: 1px solid var(--border);
}
.detail-table th { color: var(--text-muted); font-weight: 600; white-space: nowrap; }
.detail-table tr:last-child th, .detail-table tr:last-child td { border-bottom: none; }

/* Betonter, gut greifbarer Button (Rundmail „Jetzt senden") */
.btn-large { padding: 14px 28px; font-size: var(--fs-base); min-height: 48px; }

/* Dark-Mode: Popover-Titel auf Textfarbe (Navy ist dort zu kontrastarm) */
html[data-theme="dark"] .vv-hilfe-kopf { color: var(--text); }

/* Größere Trefferfläche für das Hilfe-Fragezeichen am Smartphone
   (ältere Zielgruppe, teils eingeschränkte Feinmotorik) */
@media (max-width: 768px) {
    .vv-hilfe-icon {
        display: inline-flex; align-items: center; justify-content: center;
        min-width: 40px; min-height: 40px; padding: 8px;
        font-size: 1.2rem; vertical-align: middle;
    }
    h1 .vv-hilfe-icon { font-size: 1.2rem; }
}

/* ══════════════════════════════════════════════════════════
   PFLICHTFELD-KENNZEICHNUNG
   Roter Stern an Pflichtfeldern + Legende am Formularanfang
   (vv_pflicht() / vv_pflichthinweis() in includes/layout.php).
   ══════════════════════════════════════════════════════════ */
.form-group label .pflicht,
.form-pflichthinweis .pflicht {
    color: var(--danger);
    font-weight: 700;
}

/* Das Label ist flex mit space-between (style.css) — ohne auto-Margin
   würde der Stern an den rechten Rand rutschen statt am Feldnamen zu
   kleben. */
.form-group label .pflicht {
    margin-left: 4px;
    margin-right: auto;
}

.form-pflichthinweis {
    font-size: var(--fs-xs);
    color: var(--text-muted);
    margin-bottom: var(--sp-md);
}

/* ══════════════════════════════════════════════════════════
   ERGÄNZUNGEN AUS DEM QUALITÄTSAUDIT (08/2026)
   ══════════════════════════════════════════════════════════ */

/* Warnhinweis (Amber) — für echte Warnungen (ausgebucht, abgemeldet),
   damit sie sich vom neutralen .hinweis-box-Blau unterscheiden. */
.warn-box {
    background: var(--amber-light);
    border-left: 4px solid var(--amber);
    color: var(--text);
    padding: var(--sp-md);
    border-radius: var(--r-sm);
    margin-bottom: var(--sp-md);
    display: flex;
    align-items: flex-start;
    gap: var(--sp-sm);
}
.warn-box i { color: var(--amber); margin-top: 2px; }

/* Status-Badges skalieren mit dem Schriftgrößen-Umschalter
   (style.css setzt fix 11px — Audit-Befund). */
.status-badge { font-size: var(--fs-2xs); }

/* Klickflächen: 44 px Mindesthöhe auch am Desktop — die Zielgruppe
   hat häufig eingeschränkte Feinmotorik. Kompakte Icon-/Small-Buttons
   in Tabellen behalten ihre Größe (mobil hebt style-mobile-fixes an). */
.btn { min-height: 44px; }
.btn-small { min-height: 38px; }
.jahr-schalter a {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
}

/* Feldgruppen-Beschriftung ohne <label> (z. B. über Status-Checkboxen,
   deren echtes Label am Kontrollkästchen hängt) — Optik wie .form-group label. */
.form-group .form-label {
    display: flex;
    width: 100%;
    font-weight: 700;
    margin-bottom: 6px;
    font-size: var(--fs-xs);
    color: var(--text-mid);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

/* Dashboard: Hero-Begrüßung als <p> (die Seiten-h1 bleibt für
   Screenreader) und Widget-/Kennzahl-Überschriften als <h2>. */
.hero .hero-gruss {
    font-size: var(--fs-2xl);
    font-weight: 700;
    color: var(--navy);
    margin-bottom: var(--sp-xs);
    line-height: 1.2;
}
.widget h2 {
    font-size: var(--fs-base);
    font-weight: 700;
    color: var(--navy);
    margin-bottom: var(--sp-md);
    display: flex;
    align-items: center;
    gap: var(--sp-sm);
}
.widget h2 i { color: var(--copper); }
.stat-card h2 {
    font-size: var(--fs-xs);
    font-weight: 700;
    color: var(--text-mid);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--sp-sm);
    margin-bottom: var(--sp-sm);
}
.stat-card h2 i { color: var(--copper); }
