/* ==========================================================================
   WEG Verwaltung – Basis (Website und Anwendung)
   Reihenfolge: 1 Tokens · 2 Bootstrap-Theme · 3 Typografie · 4 Bausteine
   Nur lokale Ressourcen, Systemschriften.
   ========================================================================== */

/* 1 Tokens ----------------------------------------------------------------- */
:root {
    /* Farben */
    --wv-primaer: #0e6b64;
    --wv-primaer-dunkel: #0a4f4a;
    --wv-primaer-mittel: #2a9d8f;
    --wv-primaer-hell: #e1f1ee;
    --wv-akzent: #f4a340;
    --wv-akzent-dunkel: #e8922a;
    --wv-akzent-hell: #fdebd2;
    --wv-akzent-text: #9a5b0f;
    --wv-nacht: #0f3d3e;
    --wv-nacht-hell: #164b4c;
    --wv-tinte: #12263a;
    --wv-text: #33475b;
    --wv-grau: #5b6b7a;
    --wv-linie: #e3ecea;
    --wv-linie-stark: #cfdcda;
    --wv-flaeche: #f4f8f7;
    --wv-weiss: #fff;
    --wv-fehler: #b3261e;
    --wv-fehler-hell: #fbe2e0;
    --wv-auf-dunkel: #d6ece9;
    --wv-auf-dunkel-leise: #a9cfca;

    /* Form */
    --wv-radius-s: .5rem;
    --wv-radius: .75rem;
    --wv-radius-l: 1rem;
    --wv-radius-xl: 1.5rem;
    --wv-schatten-s: 0 1px 2px rgba(18, 38, 58, .06);
    --wv-schatten: 0 18px 40px -18px rgba(18, 38, 58, .28);
    --wv-fokus: 0 0 0 .2rem rgba(14, 107, 100, .25);

    /* Abstände (4er-Raster) */
    --wv-a1: .25rem;
    --wv-a2: .5rem;
    --wv-a3: .75rem;
    --wv-a4: 1rem;
    --wv-a5: 1.5rem;
    --wv-a6: 2rem;
    --wv-a7: 3rem;
    --wv-a8: 5rem;

    --wv-schrift: "Segoe UI", -apple-system, BlinkMacSystemFont, Roboto, "Helvetica Neue", Arial, sans-serif;

    /* 2 Bootstrap-Theme ---------------------------------------------------- */
    --bs-primary: var(--wv-primaer);
    --bs-primary-rgb: 14, 107, 100;
    --bs-primary-text-emphasis: var(--wv-primaer-dunkel);
    --bs-primary-bg-subtle: var(--wv-primaer-hell);
    --bs-primary-border-subtle: #b9ddd7;
    --bs-link-color: var(--wv-primaer);
    --bs-link-color-rgb: 14, 107, 100;
    --bs-link-hover-color: var(--wv-primaer-dunkel);
    --bs-link-hover-color-rgb: 10, 79, 74;
    --bs-body-font-family: var(--wv-schrift);
    --bs-body-color: var(--wv-text);
    --bs-body-color-rgb: 51, 71, 91;
    --bs-emphasis-color: var(--wv-tinte);
    --bs-secondary-color: var(--wv-grau);
    --bs-border-color: var(--wv-linie);
    --bs-border-radius: var(--wv-radius-s);
    --bs-border-radius-lg: var(--wv-radius);
    --bs-focus-ring-color: rgba(14, 107, 100, .25);
    --bs-heading-color: var(--wv-tinte);
}

body {
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

a { text-underline-offset: .2em; }
:focus-visible { outline: 3px solid rgba(14, 107, 100, .35); outline-offset: 2px; }
::selection { background: var(--wv-primaer-hell); color: var(--wv-tinte); }

/* 3 Typografie ------------------------------------------------------------- */
h1, h2, h3, h4, h5, h6 { letter-spacing: -.015em; }
.titel-1 { font-size: clamp(2.2rem, 4.2vw, 3.4rem); font-weight: 800; line-height: 1.08; letter-spacing: -.025em; }
.titel-2 { font-size: clamp(1.75rem, 3vw, 2.4rem); font-weight: 800; line-height: 1.15; letter-spacing: -.02em; }
.titel-3 { font-size: 1.35rem; font-weight: 700; line-height: 1.3; }
.titel-4 { font-size: 1.05rem; font-weight: 700; line-height: 1.35; }
.dachzeile {
    display: inline-flex; align-items: center; gap: var(--wv-a2);
    font-size: .8rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--wv-primaer);
}
.dachzeile::before { content: ""; width: 1.25rem; height: .2rem; border-radius: .2rem; background: var(--wv-akzent); }
.einleitung { font-size: 1.15rem; line-height: 1.6; color: var(--wv-grau); max-width: 42rem; }
.text-leise { color: var(--wv-grau); }
.zahl { font-variant-numeric: tabular-nums; }

/* 4 Bausteine -------------------------------------------------------------- */

/* Icons aus dem Sprite (public/assets/img/icons.svg) – einheitliche Regeln:
   - Größe nur über --ic-g (Standard 1.5rem): immer quadratisch, schrumpft nie in Flex-Zeilen,
     runde Linienenden bleiben sichtbar (overflow: visible)
   - im Fließtext mittig zum Text (vertical-align), in Flex-Zeilen über align-items
   - Icon + Beschriftung in einer Zeile (Navigation, Menüs): .mit-icon bzw. die Komponentenregeln,
     ohne Umbruch zwischen Icon und Text
   - Icon vor mehrzeiligem Text (Listen, Hinweise, Menüeinträge): an der ERSTEN Zeile zentriert,
     nicht an der Mitte des ganzen Textblocks (1lh = Zeilenhöhe; ältere Browser: fester Wert)
   - dekorativ: icon() setzt aria-hidden="true" und focusable="false" */
.ic { --ic-g: 1.5rem; width: var(--ic-g); height: var(--ic-g); display: inline-block; flex-shrink: 0; vertical-align: middle; overflow: visible; }
.ic-s { --ic-g: 1.1rem; }
.btn .ic { --ic-g: 1.1em; vertical-align: -.18em; }
.mit-icon { display: inline-flex; align-items: center; gap: .45em; white-space: nowrap; }
.ic-erste-zeile, .punktliste .ic, .alert .ic, .vergleich__zelle--nachher .ic, .login__liste .ic, .app-menue__link .ic, .portal-menue__link .ic {
    margin-top: .12rem;
    margin-top: calc((1lh - var(--ic-g)) / 2);
}

.icon-kachel {
    width: 3rem; height: 3rem; flex-shrink: 0;
    display: inline-flex; align-items: center; justify-content: center;
    border-radius: .85rem; background: var(--wv-primaer-hell); color: var(--wv-primaer);
}
.icon-kachel--akzent { background: var(--wv-akzent-hell); color: #b26a12; }
.icon-kachel--dunkel { background: var(--wv-nacht); color: #9fd8d1; }
.icon-kachel--klein { width: 2.25rem; height: 2.25rem; border-radius: .65rem; }
.icon-kachel--klein .ic { --ic-g: 1.2rem; }

/* Buttons */
.btn { --bs-btn-font-weight: 600; --bs-btn-border-radius: .7rem; --bs-btn-padding-x: 1.15rem; --bs-btn-padding-y: .6rem; }
.btn-sm { --bs-btn-padding-x: .75rem; --bs-btn-padding-y: .35rem; --bs-btn-border-radius: .55rem; }
.btn-lg { --bs-btn-padding-x: 1.5rem; --bs-btn-padding-y: .85rem; --bs-btn-font-size: 1.05rem; --bs-btn-border-radius: .8rem; }
.btn-primary {
    --bs-btn-bg: var(--wv-primaer); --bs-btn-border-color: var(--wv-primaer);
    --bs-btn-hover-bg: var(--wv-primaer-dunkel); --bs-btn-hover-border-color: var(--wv-primaer-dunkel);
    --bs-btn-active-bg: var(--wv-primaer-dunkel); --bs-btn-active-border-color: var(--wv-primaer-dunkel);
    --bs-btn-disabled-bg: var(--wv-primaer); --bs-btn-disabled-border-color: var(--wv-primaer);
    --bs-btn-focus-shadow-rgb: 14, 107, 100;
}
.btn-outline-primary {
    --bs-btn-color: var(--wv-primaer); --bs-btn-border-color: var(--wv-primaer);
    --bs-btn-hover-bg: var(--wv-primaer); --bs-btn-hover-border-color: var(--wv-primaer);
    --bs-btn-active-bg: var(--wv-primaer-dunkel); --bs-btn-active-border-color: var(--wv-primaer-dunkel);
    --bs-btn-focus-shadow-rgb: 14, 107, 100;
}
.btn-rahmen, .btn-outline-secondary {
    --bs-btn-color: var(--wv-tinte); --bs-btn-bg: var(--wv-weiss); --bs-btn-border-color: var(--wv-linie-stark);
    --bs-btn-hover-color: var(--wv-primaer); --bs-btn-hover-bg: var(--wv-weiss); --bs-btn-hover-border-color: var(--wv-primaer);
    --bs-btn-active-color: var(--wv-primaer-dunkel); --bs-btn-active-bg: var(--wv-flaeche); --bs-btn-active-border-color: var(--wv-primaer);
    --bs-btn-focus-shadow-rgb: 14, 107, 100;
}
.btn-akzent {
    --bs-btn-color: var(--wv-tinte); --bs-btn-bg: var(--wv-akzent); --bs-btn-border-color: var(--wv-akzent);
    --bs-btn-hover-color: var(--wv-tinte); --bs-btn-hover-bg: var(--wv-akzent-dunkel); --bs-btn-hover-border-color: var(--wv-akzent-dunkel);
    --bs-btn-active-color: var(--wv-tinte); --bs-btn-active-bg: var(--wv-akzent-dunkel); --bs-btn-active-border-color: var(--wv-akzent-dunkel);
}
.btn-hell {
    --bs-btn-color: var(--wv-primaer); --bs-btn-bg: var(--wv-weiss); --bs-btn-border-color: var(--wv-weiss);
    --bs-btn-hover-color: var(--wv-primaer-dunkel); --bs-btn-hover-bg: var(--wv-primaer-hell); --bs-btn-hover-border-color: var(--wv-primaer-hell);
    --bs-btn-active-color: var(--wv-primaer-dunkel); --bs-btn-active-bg: var(--wv-primaer-hell); --bs-btn-active-border-color: var(--wv-primaer-hell);
}

/* Formulare */
.form-control, .form-select { border-color: var(--wv-linie-stark); border-radius: .65rem; }
.form-control:not(.form-control-sm):not(.form-control-lg), .form-select:not(.form-select-sm):not(.form-select-lg) { padding-top: .6rem; padding-bottom: .6rem; }
.form-control:focus, .form-select:focus, .form-check-input:focus { border-color: var(--wv-primaer); box-shadow: var(--wv-fokus); }
/* Sechsstelliger 2FA-Code (TOTP): Ziffern gleich breit und deutlich getrennt. letter-spacing setzt
   auch hinter die letzte Ziffer Abstand – text-indent gleicht das aus, damit der Code mittig steht.
   Die Mindestbreite hält sechs Ziffern auch auf schmalen Karten vollständig sichtbar.
   Die Systemschrift (Segoe UI) hat nicht überall Tabellenziffern – deshalb eine Monospace-Systemschrift,
   dort sind Ziffern immer gleich breit; tabular-nums greift zusätzlich, wo vorhanden. */
.code-eingabe {
    font-family: ui-monospace, "Cascadia Mono", "Segoe UI Mono", SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
    letter-spacing: .3em; text-indent: .3em; font-variant-numeric: tabular-nums;
    font-weight: 600; min-width: 11ch; text-overflow: clip;
}
.code-eingabe::placeholder { letter-spacing: normal; text-indent: 0; font-weight: 400; font-family: var(--bs-body-font-family); }
/* Wiederherstellungscode (XXXXX-XXXXX): eigenes Feld, gleich breite Zeichen, keine Autokorrektur */
.wiederherstellungscode { font-family: var(--bs-font-monospace); letter-spacing: .05em; text-transform: uppercase; }
.wiederherstellungscode::placeholder { text-transform: none; font-family: var(--bs-body-font-family); letter-spacing: normal; }
.form-check-input:checked { background-color: var(--wv-primaer); border-color: var(--wv-primaer); }
/* Checkboxen und Radios (Bootstrap .form-check) – eine gemeinsame Regel für Backend und Portal:
   einheitlicher, gut sichtbarer Abstand zwischen Feld und Label; mehrzeilige Labels bleiben bündig
   (hängender Einzug, kein Umbruch unter das Feld); Feld und Label vollständig anklickbar. */
:root { --wv-check-abstand: .6rem; }
.form-check { padding-left: calc(1em + var(--wv-check-abstand)); min-height: 1.5rem; }
.form-check .form-check-input { margin-left: calc(-1em - var(--wv-check-abstand)); }
.form-switch { padding-left: calc(2em + var(--wv-check-abstand)); }
.form-switch .form-check-input { margin-left: calc(-2em - var(--wv-check-abstand)); }
.form-check-inline { margin-right: 1.25rem; }
.form-check-input, .form-check-label { cursor: pointer; }
.form-check-input:disabled, .form-check-input:disabled ~ .form-check-label { cursor: default; }
.form-check-input { border-color: var(--wv-grau); }
@media (pointer: coarse) {
    /* Touch: größere Trefferfläche, Label bleibt anklickbar */
    .form-check { min-height: 2rem; }
    .form-check-label { padding-block: .15rem; }
}
.form-label { font-weight: 600; color: var(--wv-tinte); font-size: .925rem; }
.form-text { color: var(--wv-grau); }

/* Karten */
.karte {
    background: var(--wv-weiss); border: 1px solid var(--wv-linie); border-radius: var(--wv-radius-l);
    padding: var(--wv-a5);
}
.karte--hoch { height: 100%; }
.karte--schatten { box-shadow: var(--wv-schatten); }
.card { --bs-card-border-color: var(--wv-linie); --bs-card-border-radius: var(--wv-radius-l); --bs-card-inner-border-radius: calc(var(--wv-radius-l) - 1px); --bs-card-cap-bg: var(--wv-flaeche); }

/* Statusmarken */
.marke {
    display: inline-flex; align-items: center; gap: .3rem;
    padding: .2rem .6rem; border-radius: 999px;
    font-size: .75rem; font-weight: 600; line-height: 1.4; white-space: nowrap;
    background: #e4e8ec; color: #44525f;
}
.marke::before { content: ""; width: .4rem; height: .4rem; border-radius: 50%; background: currentColor; opacity: .7; }
.marke--erfolg { background: var(--wv-primaer-hell); color: var(--wv-primaer-dunkel); }
.marke--warnung { background: var(--wv-akzent-hell); color: var(--wv-akzent-text); }
.marke--fehler { background: var(--wv-fehler-hell); color: var(--wv-fehler); }
.marke--info { background: #e2eefb; color: #1d4f86; }
.marke--dunkel { background: var(--wv-nacht); color: var(--wv-auf-dunkel); }

/* Punktliste mit Haken */
.punktliste { list-style: none; padding: 0; margin: var(--wv-a5) 0 0; }
.punktliste li { display: flex; gap: .7rem; margin-bottom: .7rem; }
.punktliste .ic { --ic-g: 1.3rem; color: var(--wv-primaer); }

/* Hinweise */
.alert { --bs-alert-border-radius: var(--wv-radius); }
.alert .ic { --ic-g: 1.25rem; }

@media (prefers-reduced-motion: reduce) {
    /* 0s statt .01ms: Eine winzige Dauer gäbe JEDEM Element einen Übergang für alle Eigenschaften
       (auch visibility) – aufklappende Menüs wären dann einen Takt lang unsichtbar und nicht fokussierbar. */
    *, *::before, *::after { transition-duration: 0s !important; transition-delay: 0s !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; scroll-behavior: auto !important; }
}

/* Bildergalerie (Karten) und Vollbildanzeige – siehe assets/js/galerie.js */
.bildkarten { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: var(--wv-a4, 1rem); }
.bildkarte { background: var(--wv-weiss); border: 1px solid var(--wv-linie); border-radius: var(--wv-radius); overflow: hidden; display: flex; flex-direction: column; box-shadow: var(--wv-schatten-s); }
.bildkarte__bild { display: block; position: relative; aspect-ratio: 4 / 3; background: var(--wv-flaeche); overflow: hidden; }
.bildkarte__bild img { width: 100%; height: 100%; object-fit: cover; transition: transform .2s ease; }
.bildkarte__bild:hover img, .bildkarte__bild:focus-visible img { transform: scale(1.03); }
.bildkarte__bild:focus-visible { outline: 3px solid var(--wv-primaer); outline-offset: -3px; }
.bildkarte__lupe { position: absolute; right: .5rem; bottom: .5rem; background: rgba(15, 61, 62, .75); color: #fff; border-radius: 999px; padding: .3rem; display: flex; }
.bildkarte__lupe .ic { --ic-g: 1.1rem; }
.bildkarte__text { padding: .6rem .8rem; font-size: .9rem; }
.bildkarte__titel { font-weight: 600; color: var(--wv-tinte); margin: 0; }
.bildkarte__fuss { padding: .4rem .8rem .7rem; margin-top: auto; display: flex; flex-wrap: wrap; gap: .35rem; align-items: center; }
.bildkarten--klein { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }
.galerie-modal .modal-content { background: #0b1418; color: #fff; }
.galerie-kopf { display: flex; align-items: center; gap: 1rem; padding: .6rem 1rem; }
.galerie-titel { flex: 1; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.galerie-aktionen { display: flex; gap: .5rem; align-items: center; }
.galerie-zaehler { color: #b9c7c9; font-variant-numeric: tabular-nums; }
.galerie-buehne { flex: 1; display: flex; align-items: center; justify-content: center; position: relative; min-height: 0; padding: 0 3.5rem; }
.galerie-bild { max-width: 100%; max-height: calc(100vh - 8rem); object-fit: contain; }
.galerie-modal:fullscreen .galerie-bild { max-height: calc(100vh - 6rem); }
.galerie-nav { position: absolute; top: 50%; transform: translateY(-50%); background: rgba(255, 255, 255, .12); border: 0; color: #fff; font-size: 2.5rem; line-height: 1; width: 3rem; height: 4rem; border-radius: var(--wv-radius-s); }
.galerie-nav:hover, .galerie-nav:focus-visible { background: rgba(255, 255, 255, .25); }
.galerie-nav--zurueck { left: .5rem; }
.galerie-nav--vor { right: .5rem; }
.galerie-text { text-align: center; color: #d6e2e3; padding: .5rem 1rem 1rem; margin: 0; min-height: 1.5rem; }
@media (max-width: 575.98px) {
    .galerie-buehne { padding: 0; }
    .galerie-nav { width: 2.5rem; height: 3rem; font-size: 2rem; }
}

/* Erfolgsmeldungen ausblenden (meldungen.js) */
/* Das hidden-Attribut hat immer Vorrang. Bootstrap setzt [hidden] und Anzeige-Hilfsklassen
   (.d-flex, .d-block …) beide mit !important und gleicher Spezifität; weil die Hilfsklassen
   später in bootstrap.css stehen, gewannen sie, und ausgeblendete Elemente blieben sichtbar.
   basis.css wird nach Bootstrap geladen und stellt die beabsichtigte Rangfolge wieder her. */
[hidden] { display: none !important; }

/* Meldungen im Inhaltsbereich (Layout app.php): Symbol und Text nebeneinander, ohne Hilfsklasse */
.meldung { display: flex; gap: var(--wv-a2); align-items: flex-start; }

.alert.meldung--ausblenden { opacity: 0; transform: translateY(-4px); transition: opacity .3s ease, transform .3s ease; }

/* Hilfe, Funktions-Audit, Ereignisprotokoll (App und Eigentümerportal) ------------------------ */
.hilfe-toc { padding: var(--wv-a3) var(--wv-a4); }
.hilfe-toc__kopf { font-weight: 700; cursor: pointer; padding: .25rem 0; }
.hilfe-toc__liste, .hilfe-toc__liste ol { list-style: none; margin: 0; padding: 0; }
.hilfe-toc__liste > li { margin-top: var(--wv-a3); }
.hilfe-toc__liste > li > a { font-weight: 600; }
.hilfe-toc__liste ol { margin-top: .25rem; padding-left: var(--wv-a3); border-left: 2px solid var(--wv-linie); }
.hilfe-toc__liste ol a { display: block; padding: .15rem 0; font-size: .9rem; }
.hilfe-toc a { text-decoration: none; overflow-wrap: anywhere; }
.hilfe-toc a:hover { text-decoration: underline; }
@media (min-width: 992px) {
    .hilfe-toc { position: sticky; top: var(--wv-a4); max-height: calc(100vh - 2 * var(--wv-a4)); overflow-y: auto; }
    .portal .hilfe-toc { top: calc(var(--portal-kopf-hoehe, 4.5rem) + var(--wv-a4)); max-height: calc(100vh - var(--portal-kopf-hoehe, 4.5rem) - 2 * var(--wv-a4)); }
}
.hilfe-kapitel { margin-bottom: var(--wv-a6); }
.hilfe-kapitel__titel { margin-bottom: var(--wv-a3); }
.hilfe-thema { margin-bottom: var(--wv-a3); }
.hilfe-kapitel, .hilfe-thema { scroll-margin-top: var(--wv-a4); }
.portal .hilfe-kapitel, .portal .hilfe-thema { scroll-margin-top: calc(var(--portal-kopf-hoehe, 4.5rem) + var(--wv-a3)); }
.hilfe-angaben, .audit-angaben { display: grid; grid-template-columns: minmax(0, 1fr); gap: .15rem 0; margin: 0; }
.hilfe-angaben dt, .audit-angaben dt { margin-top: var(--wv-a3); font-size: .78rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--wv-grau); }
.hilfe-angaben dd, .audit-angaben dd { margin: 0; overflow-wrap: anywhere; }
.hilfe-angaben ul, .hilfe-angaben ol { margin: .15rem 0 0; padding-left: 1.25rem; }
.hilfe-angaben li + li { margin-top: .15rem; }
@media (min-width: 768px) {
    .audit-angaben { grid-template-columns: 8rem minmax(0, 1fr); gap: .35rem var(--wv-a4); }
    .audit-angaben dt { margin-top: .15rem; }
}
.audit-funktion { margin-bottom: var(--wv-a3); }
.audit-routen { list-style: none; margin: 0; padding: 0; }
.audit-routen code { overflow-wrap: anywhere; }
.audit-ok { color: #1e7a3c; font-weight: 700; margin-right: .35rem; }
.audit-fehlt { color: #b42318; font-weight: 700; margin-right: .35rem; }
.audit-aktiv { border-color: var(--wv-primaer); box-shadow: inset 0 0 0 2px var(--wv-primaer); }
.protokoll-details { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 0 var(--wv-a2); }
.protokoll-details dt { font-weight: 600; color: var(--wv-grau); }
.protokoll-details dd { margin: 0; overflow-wrap: anywhere; }

/* Fehler melden: Vorschau der übermittelten Angaben */
.fehlerbericht-vorschau { white-space: pre-wrap; word-break: break-word; font-family: inherit; font-size: .9rem; background: var(--bs-tertiary-bg, #f4f6f8); border-radius: .5rem; padding: .75rem 1rem; }

/* Abmelden: sichtbare Rückmeldung (auch in der installierten Web-App ohne Ladebalken) */
.abmelde-anzeige { position: fixed; inset: 0; z-index: 2000; display: flex; align-items: center; justify-content: center; padding: 1rem; background: rgba(15, 30, 35, .45); }
.abmelde-anzeige[hidden] { display: none; }
.abmelde-anzeige__box { display: flex; flex-direction: column; align-items: center; gap: .9rem; max-width: 22rem; padding: 1.5rem 1.75rem; border-radius: 1rem; background: var(--bs-body-bg, #fff); color: var(--bs-body-color, #16202a); box-shadow: 0 1rem 2.5rem rgba(0, 0, 0, .25); text-align: center; }
.abmelde-anzeige__text { margin: 0; font-weight: 600; }
.abmelde-anzeige__kreis { width: 2.25rem; height: 2.25rem; border-radius: 50%; border: .25rem solid var(--wv-primaer-hell, #d7ece9); border-top-color: var(--wv-primaer, #0e6b64); animation: abmelde-dreh .8s linear infinite; }
@keyframes abmelde-dreh { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .abmelde-anzeige__kreis { animation-duration: 2.4s; } }

/* Toasts (toasts.js): Rückmeldungen oben rechts, auf schmalen Bildschirmen unten über die volle Breite (Menü bleibt frei) */
.toast-bereich { position: fixed; top: 1rem; right: 1rem; z-index: 1090; display: flex; flex-direction: column; gap: .5rem; width: min(380px, calc(100vw - 2rem)); pointer-events: none; }
.toast-bereich .toast { pointer-events: auto; width: 100%; border: 0; border-left: 4px solid var(--wv-primaer); border-radius: 10px; background: #fff; box-shadow: 0 10px 30px rgba(15, 40, 38, .18); animation: toast-ein .25s ease-out; }
.toast-bereich .toast--fehler { border-left-color: var(--wv-fehler); }
.toast-bereich .toast--hinweis { border-left-color: #1d4f86; }
.toast-bereich .toast--weg { opacity: 0; transform: translateY(-6px); transition: opacity .3s, transform .3s; }
.toast__zeichen { flex: 0 0 1.9rem; height: 1.9rem; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; background: var(--wv-primaer-hell); color: var(--wv-primaer-dunkel); }
.toast--fehler .toast__zeichen { background: var(--wv-fehler-hell); color: var(--wv-fehler); }
.toast--hinweis .toast__zeichen { background: #e2eefb; color: #1d4f86; }
.toast__text { white-space: pre-line; overflow-wrap: anywhere; }
@keyframes toast-ein { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: none; } }
@media (max-width: 575.98px) { .toast-bereich { left: .5rem; right: .5rem; top: auto; bottom: .5rem; width: auto; flex-direction: column-reverse; } }
@media (prefers-reduced-motion: reduce) { .toast-bereich .toast { animation: none; } .toast-bereich .toast--weg { transition: none; } }

/* ------------------------------------------------------------------ Formular-System (Backend, Portal, Anmeldung)
   Einheitliche Feldhöhen (normal 2.75rem, klein 2.25rem), ruhige Rahmen mit Hover, gestylte Checkboxen/Schalter. */
.form-control, .form-select { min-height: 2.75rem; background-color: var(--wv-weiss); transition: border-color .15s, box-shadow .15s; }
.form-control-sm, .form-select-sm { min-height: 2.25rem; border-radius: .55rem; }
textarea.form-control { min-height: 5.5rem; }
.form-control:hover:not(:focus):not(:disabled):not([readonly]), .form-select:hover:not(:focus):not(:disabled) { border-color: #a9bdba; }
.form-control::placeholder { color: #93a3ad; }
.form-label { margin-bottom: .35rem; }
.form-check-input { width: 1.15em; height: 1.15em; margin-top: .17em; border-width: 1.5px; border-color: #97a8b3; }
.form-check-input[type="checkbox"] { border-radius: .35em; }
.form-check-input:hover:not(:disabled) { border-color: var(--wv-primaer); }
.form-check-label { color: var(--wv-tinte); }
.form-switch .form-check-input { width: 2.3em; height: 1.25em; margin-top: .1em; border-radius: 2em; }
/* Checkbox in einer Feldzeile (Spalte enthält nur die Checkbox): auf Höhe des Eingabefelds mittig */
.row > [class*="col"] > .form-check:only-child { display: flex; align-items: center; gap: .1rem; min-height: 2.75rem; margin-bottom: 0; }
/* Merkmale/Optionen gesammelt: Kasten mit Schaltern */
.merkmale { display: flex; flex-wrap: wrap; gap: .5rem 1.75rem; padding: .7rem 1rem; border: 1px solid var(--wv-linie); border-radius: var(--wv-radius); background: var(--wv-flaeche); }
.merkmale legend, .merkmale__titel { float: none; width: 100%; margin: 0 0 .1rem; font-size: .8rem; font-weight: 700; letter-spacing: .03em; text-transform: uppercase; color: var(--wv-grau); }
.merkmale .form-check { margin: 0; }
/* Zwischenüberschrift in längeren Formularen (z. B. Anschrift, Kontakt, Bankverbindung) */
.formular-abschnitt { margin: .25rem 0 .5rem; padding-top: .6rem; border-top: 1px solid var(--wv-linie); font-size: .78rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--wv-grau); }
.formular-abschnitt .text-transform-none { text-transform: none; letter-spacing: normal; }
