/* =====================================================================
   AS-Portal – Design-System im ANB-Stil
   Uebernommen aus der Zeiterfassung (TickTackTrace Web), damit beide internen
   Anwendungen gleich aussehen. Eigene Klassen tragen das Praefix "anb-".
   Bootstrap bleibt geladen; die Bruecke am Ende faerbt seine Komponenten
   (Karten, Tabellen, Buttons, Badges, Formulare) mit denselben Tokens ein,
   so dass die bestehenden Seiten ohne Umbau mitziehen.
   ===================================================================== */

:root {
    --bg: #e9eef5;
    --surface: #ffffff;
    --surface-2: #f4f7fb;
    --border: #d8e1ee;
    --text: #16202e;
    --muted: #5d6a80;
    --accent: #2f6fb0;
    --accent-strong: #235891;
    --accent-contrast: #ffffff;
    --brand-bar: #13304e;
    --brand-bar-text: #d5e2f2;
    --brand-bar-muted: #8ba3c0;
    --good: #268a5f;
    --good-soft: #e3f3ec;
    --warn: #a96f14;
    --warn-soft: #f9eed8;
    --bad: #b33838;
    --bad-soft: #f9e3e3;
    --info-soft: #e7eff9;
    --shadow: 0 1px 2px rgba(19,48,78,.06), 0 6px 18px rgba(19,48,78,.06);
    --shadow-lg: 0 8px 40px rgba(12,26,45,.28);
    --radius: 14px;
    --radius-sm: 9px;
    --tap: 44px;
}

@media (prefers-color-scheme: dark) {
    :root {
        --bg: #0c131d;
        --surface: #161f2c;
        --surface-2: #1b2534;
        --border: #293546;
        --text: #e7edf5;
        --muted: #94a2b7;
        --accent: #5b9bd8;
        --accent-strong: #78b0e2;
        --accent-contrast: #0c131d;
        --brand-bar: #0a111c;
        --brand-bar-text: #cedbec;
        --brand-bar-muted: #6f83a0;
        --good: #46b184;
        --good-soft: #12352a;
        --warn: #d59b45;
        --warn-soft: #3a2f16;
        --bad: #e07f7f;
        --bad-soft: #3a1c1c;
        --info-soft: #1b2941;
        --shadow: 0 1px 2px rgba(0,0,0,.3), 0 6px 18px rgba(0,0,0,.3);
        --shadow-lg: 0 10px 46px rgba(0,0,0,.6);
    }
}

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

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    font-size: 15px;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

h1:focus {
    outline: none;
}

.tnum {
    font-variant-numeric: tabular-nums;
}

.anb-label {
    font-size: 11px;
    letter-spacing: .07em;
    text-transform: uppercase;
    color: var(--muted);
    font-weight: 600;
}

/* ---------- App-Shell: Topbar, Sidebar (Desktop), Tab-Bar (Mobil) ---------- */

.anb-app {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.anb-topbar {
    background: var(--brand-bar);
    color: var(--brand-bar-text);
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0 16px;
    height: 56px;
    position: sticky;
    top: 0;
    z-index: 20;
}

.anb-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
    letter-spacing: -.01em;
    font-size: 17px;
    color: inherit;
    text-decoration: none;
}

.anb-brand:hover {
    color: inherit;
}

/* Firmenzeichen neben dem Schriftzug. Steht seit dem Tippzähler außerhalb des
   Links (siehe MainLayout), deshalb hier eigene Regeln statt Inline-Stil.
   Der negative Abstand gleicht die 12px Lücke der Kopfzeile auf die früheren
   8px aus. Die Tipp-Hervorhebung ist abgeschaltet: sechs Antipper sollen nicht
   sechsmal blau aufblitzen. */
.anb-brandmark {
    height: 30px;
    width: auto;
    flex: none;
    margin-right: -4px;
    user-select: none;
    -webkit-user-select: none;
    -webkit-tap-highlight-color: transparent;
}

.anb-brand .mark {
    min-width: 26px;
    height: 26px;
    padding: 0 7px;
    border-radius: 7px;
    flex: none;
    background: linear-gradient(135deg, var(--accent) 0%, #7fc0f0 100%);
    display: grid;
    place-items: center;
    color: #fff;
    font-size: 13px;
    font-weight: 800;
    letter-spacing: .01em;
    box-shadow: inset 0 0 0 1px rgba(255,255,255,.15);
}


.anb-topbar .spacer,
.anb-toolbar .spacer {
    flex: 1;
}

.anb-user {
    font-size: 13.5px;
    color: var(--brand-bar-muted);
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
}

.anb-user .uname {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.anb-avatar {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    flex: none;
    background: rgba(255,255,255,.12);
    color: var(--brand-bar-text);
    display: grid;
    place-items: center;
    font-weight: 700;
    font-size: 12px;
}

.anb-ghost-btn {
    background: rgba(255,255,255,.08);
    color: var(--brand-bar-text);
    border: 1px solid rgba(255,255,255,.14);
    border-radius: 8px;
    padding: 7px 12px;
    font-size: 13px;
    cursor: pointer;
    font-weight: 500;
    text-decoration: none;
    white-space: nowrap;
}

.anb-ghost-btn:hover {
    background: rgba(255,255,255,.16);
    color: var(--brand-bar-text);
}

.anb-body {
    flex: 1;
    display: flex;
}

.anb-sidebar {
    display: none;
}

.anb-navgroup {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.anb-nav-link {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: var(--muted);
    font-weight: 500;
    font-size: 14.5px;
    padding: 11px 14px;
    border-radius: 10px;
    cursor: pointer;
    min-height: var(--tap);
}

.anb-nav-link .ico {
    width: 20px;
    height: 20px;
    flex: none;
    opacity: .8;
}

.anb-nav-link:hover {
    background: var(--surface-2);
    color: var(--text);
}

.anb-nav-link.active {
    background: var(--info-soft);
    color: var(--accent-strong);
    font-weight: 650;
}

.anb-nav-link.active .ico {
    opacity: 1;
}

.anb-content {
    flex: 1;
    padding: 20px 16px 96px;
    max-width: 920px;
    margin: 0 auto;
    width: 100%;
    min-width: 0;
}

.anb-tabbar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 30;
    background: var(--surface);
    border-top: 1px solid var(--border);
    display: flex;
    padding: 6px 6px calc(6px + env(safe-area-inset-bottom));
}

.anb-tab {
    flex: 1;
    background: none;
    border: 0;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    padding: 7px 4px;
    color: var(--muted);
    font-size: 11px;
    font-weight: 600;
    border-radius: 10px;
    min-height: var(--tap);
    text-decoration: none;
}

.anb-tab .ico {
    width: 22px;
    height: 22px;
}

.anb-tab.active {
    color: var(--accent);
}

.anb-tab.active .ico {
    transform: translateY(-1px);
}

/* ---------- Seitenkopf ---------- */

.anb-page-head {
    margin: 4px 0 18px;
}

.anb-page-head h1 {
    font-size: 24px;
    letter-spacing: -.02em;
    margin: 0 0 3px;
    text-wrap: balance;
    font-weight: 700;
}

.anb-page-head p {
    margin: 0;
    color: var(--muted);
    font-size: 14px;
}

/* ---------- Stat-Kacheln (Start) ---------- */

.anb-tiles {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.anb-tile {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 15px 16px;
    box-shadow: var(--shadow);
}

.anb-tile .anb-label {
    display: block;
    margin-bottom: 7px;
}

.anb-tile .val {
    font-size: 26px;
    font-weight: 700;
    letter-spacing: -.02em;
}

.anb-tile .val.sm {
    font-size: 18px;
}

.anb-tile.accent {
    position: relative;
    overflow: hidden;
}

.anb-tile.accent::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: var(--accent);
}

.anb-tile .delta {
    font-size: 12.5px;
    font-weight: 600;
    margin-top: 3px;
}

.delta.pos {
    color: var(--good);
}

.delta.neg {
    color: var(--warn);
}

/* ---------- Buttons ---------- */

.anb-actions {
    display: flex;
    gap: 10px;
    margin-top: 18px;
    flex-wrap: wrap;
}

.anb-btn {
    border: 1px solid transparent;
    border-radius: 10px;
    padding: 11px 18px;
    font-size: 14.5px;
    font-weight: 600;
    cursor: pointer;
    min-height: var(--tap);
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
}

.anb-btn.primary {
    background: var(--accent);
    color: var(--accent-contrast);
}

.anb-btn.primary:hover {
    background: var(--accent-strong);
    color: var(--accent-contrast);
}

.anb-btn.ghost {
    background: var(--surface);
    color: var(--text);
    border-color: var(--border);
}

.anb-btn.ghost:hover {
    background: var(--surface-2);
    color: var(--text);
}

.anb-btn.success {
    background: var(--good);
    color: #fff;
}

.anb-btn:disabled {
    background: var(--surface-2);
    color: var(--muted);
    border-color: var(--border);
    cursor: not-allowed;
}

/* Kompakte Buttons (z. B. Rollen-Umschalter im Admin-Panel) */
.anb-btn.sm {
    padding: 7px 12px;
    font-size: 13px;
    font-weight: 600;
    min-height: 34px;
    border-radius: 8px;
}
/* ---------- Meldungen ---------- */

.anb-alert {
    border-radius: 10px;
    padding: 10px 13px;
    font-size: 14px;
    margin-bottom: 14px;
}

.anb-alert.success {
    background: var(--good-soft);
    color: var(--good);
}

.anb-alert.error {
    background: var(--bad-soft);
    color: var(--bad);
}

.anb-alert.warn {
    background: var(--warn-soft);
    color: var(--warn);
}

/* ---------- Chips (Arbeitsart / Status) ---------- */

.anb-chip {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 12.5px;
    font-weight: 600;
    padding: 3px 9px;
    border-radius: 999px;
    white-space: nowrap;
}

.anb-chip::before {
    content: "";
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: currentColor;
    opacity: .9;
}

.anb-chip.work {
    color: var(--accent-strong);
    background: var(--info-soft);
}

.anb-chip.vac {
    color: #7a5cc0;
    background: color-mix(in srgb, #7a5cc0 14%, transparent);
}

.anb-chip.sick {
    color: #c05c5c;
    background: color-mix(in srgb, #c05c5c 14%, transparent);
}

.anb-chip.holi {
    color: var(--muted);
    background: var(--surface-2);
}

.anb-chip.school {
    color: #3a8f8f;
    background: color-mix(in srgb, #3a8f8f 15%, transparent);
}

.anb-chip.badge-warn {
    color: var(--warn);
    background: var(--warn-soft);
}

.anb-chip.badge-done {
    color: var(--good);
    background: var(--good-soft);
}

.anb-section-head {
    font-size: 17px;
    font-weight: 700;
    letter-spacing: -.01em;
    margin: 26px 0 12px;
}
.anb-field {
    margin-bottom: 14px;
}

.anb-field > .anb-label {
    display: block;
    margin-bottom: 6px;
}

/* Kleiner erläuternder Hinweis unter einem Eingabefeld (normale Schreibweise). */
.anb-field-hint {
    display: block;
    margin-top: 5px;
    font-size: 12px;
    color: var(--muted);
}

.anb-field select,
.anb-field input,
.anb-field textarea {
    width: 100%;
    padding: 11px 12px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--surface-2);
    color: var(--text);
    font-size: 15px;
    min-height: var(--tap);
    color-scheme: light dark;
}

/* Mehrzeilige Eingabe (Änderungsantrag): gleiche Optik wie die einzeiligen Felder,
   aber in der Höhe verstellbar und mit der Schrift des Formulars statt der
   Browser-Vorgabe (monospace). */
.anb-field textarea {
    resize: vertical;
    line-height: 1.45;
    font-family: inherit;
}

.anb-field select:focus,
.anb-field input:focus,
.anb-field textarea:focus {
    outline: 2px solid var(--accent);
    outline-offset: 0;
    border-color: var(--accent);
}

.anb-panel {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 18px;
    max-width: 560px;
}
/* =====================================================================
   Blazor-Pflichtteile (Fehlerleiste, Ladeanzeige, Validierung)
   ===================================================================== */

.valid.modified:not([type=checkbox]) {
    outline: 1px solid #26b050;
}

.invalid {
    outline: 1px solid red;
}

.validation-message {
    color: red;
}

#blazor-error-ui {
    color-scheme: light only;
    background: lightyellow;
    bottom: 0;
    box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2);
    box-sizing: border-box;
    display: none;
    left: 0;
    padding: 0.6rem 1.25rem 0.7rem 1.25rem;
    position: fixed;
    width: 100%;
    z-index: 1000;
}

    #blazor-error-ui .dismiss {
        cursor: pointer;
        position: absolute;
        right: 0.75rem;
        top: 0.5rem;
    }

.blazor-error-boundary {
    background: #b32121;
    padding: 1rem;
    color: white;
    border-radius: var(--radius-sm);
}

    .blazor-error-boundary::after {
        content: "Es ist ein Fehler aufgetreten."
    }

.loading-progress {
    position: absolute;
    display: block;
    width: 8rem;
    height: 8rem;
    inset: 20vh 0 auto 0;
    margin: 0 auto 0 auto;
}

    .loading-progress circle {
        fill: none;
        stroke: var(--border);
        stroke-width: 0.6rem;
        transform-origin: 50% 50%;
        transform: rotate(-90deg);
    }

        .loading-progress circle:last-child {
            stroke: var(--accent);
            stroke-dasharray: calc(3.141 * var(--blazor-load-percentage, 0%) * 0.8), 500%;
            transition: stroke-dasharray 0.05s ease-in-out;
        }

.loading-progress-text {
    position: absolute;
    text-align: center;
    font-weight: bold;
    inset: calc(20vh + 3.25rem) 0 auto 0.2rem;
    color: var(--muted);
}

    .loading-progress-text:after {
        content: var(--blazor-load-percentage-text, "Lade…");
    }


/* ---------- Desktop (ab 768px) ---------- */

@media (min-width: 768px) {
    .anb-body {
        max-width: 1160px;
        margin: 0 auto;
        width: 100%;
    }

    .anb-sidebar {
        display: block;
        width: 232px;
        flex: none;
        padding: 18px 12px;
        border-right: 1px solid var(--border);
        background: var(--surface);
        position: sticky;
        top: 56px;
        height: calc(100vh - 56px);
    }

    .anb-tabbar {
        display: none;
    }

    .anb-content {
        padding: 26px 30px 40px;
    }

    .anb-tiles {
        grid-template-columns: repeat(4, 1fr);
    }

    .anb-page-head h1 {
        font-size: 27px;
    }
}

.anb-only-desktop {
    display: none !important;
}

@media (min-width: 768px) {
    .anb-only-desktop {
        display: inline-flex !important;
    }
}

/* Untertitel neben dem Schriftzug, auf dem Handy aus. */
.anb-brand .sub {
    font-weight: 500;
    color: var(--brand-bar-muted);
    font-size: 14px;
    display: none;
}

@media (min-width: 560px) {
    .anb-brand .sub {
        display: inline;
    }
}

/* ---------- Modul-Karten (Start) ---------- */

.anb-modules {
    display: grid;
    grid-template-columns: 1fr;
    gap: 14px;
}

@media (min-width: 768px) {
    .anb-modules {
        grid-template-columns: repeat(2, 1fr);
    }
}

.anb-module {
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    gap: 8px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 20px 20px 18px 24px;
    color: var(--text);
    text-decoration: none;
}

.anb-module::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: var(--accent);
}

.anb-module:hover {
    color: var(--text);
    border-color: var(--accent);
}

.anb-module .ico {
    width: 30px;
    height: 30px;
    color: var(--accent);
}

.anb-module h2 {
    font-size: 18px;
    font-weight: 700;
    letter-spacing: -.01em;
    margin: 0;
}

.anb-module p {
    margin: 0;
    color: var(--muted);
    font-size: 14px;
}

.anb-module .go {
    margin-top: auto;
    padding-top: 8px;
    font-weight: 600;
    font-size: 14px;
    color: var(--accent-strong);
}

.anb-module .anb-chip {
    align-self: flex-start;
}

/* =====================================================================
   Bootstrap-Bruecke
   Die Seiten nutzen Bootstrap-Komponenten. Statt alle umzuschreiben, zeigen
   dessen CSS-Variablen hier auf die ANB-Tokens - so stimmen Farben, Radien und
   das dunkle Schema auch dort.
   ===================================================================== */

:root {
    --bs-body-bg: var(--bg);
    --bs-body-color: var(--text);
    --bs-body-font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    --bs-body-font-size: 15px;
    --bs-secondary-color: var(--muted);
    --bs-emphasis-color: var(--text);
    --bs-heading-color: var(--text);
    --bs-border-color: var(--border);
    --bs-border-radius: var(--radius-sm);
    --bs-link-color: var(--accent);
    --bs-link-color-rgb: 47, 111, 176;
    --bs-link-hover-color: var(--accent-strong);
    --bs-link-hover-color-rgb: 35, 88, 145;
    --bs-primary-rgb: 47, 111, 176;
    --bs-success-rgb: 38, 138, 95;
    --bs-warning-rgb: 169, 111, 20;
    --bs-danger-rgb: 179, 56, 56;
    --bs-info-rgb: 47, 111, 176;
    --bs-secondary-rgb: 93, 106, 128;
}

.anb-content > h1 {
    font-size: 24px;
    font-weight: 700;
    letter-spacing: -.02em;
    margin: 4px 0 16px;
}

@media (min-width: 768px) {
    .anb-content > h1 {
        font-size: 27px;
    }
}

.anb-content h2,
.anb-content h3 {
    letter-spacing: -.01em;
    font-weight: 700;
}

.text-muted {
    color: var(--muted) !important;
}

/* Karten */
.card {
    --bs-card-bg: var(--surface);
    --bs-card-border-color: var(--border);
    --bs-card-border-radius: var(--radius);
    --bs-card-inner-border-radius: calc(var(--radius) - 1px);
    --bs-card-color: var(--text);
    --bs-card-title-color: var(--text);
    --bs-card-cap-bg: var(--surface-2);
    box-shadow: var(--shadow);
}

/* Tabellen: wie die Tabellenkarten der Zeiterfassung */
.table {
    --bs-table-bg: var(--surface);
    --bs-table-color: var(--text);
    --bs-table-border-color: var(--border);
    --bs-table-striped-bg: var(--surface-2);
    --bs-table-striped-color: var(--text);
    --bs-table-hover-bg: var(--surface-2);
    --bs-table-hover-color: var(--text);
    --bs-table-active-bg: var(--info-soft);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    border-collapse: separate;
    border-spacing: 0;
    overflow: hidden;
    box-shadow: var(--shadow);
    font-variant-numeric: tabular-nums;
}

.table > thead th {
    font-size: 11px;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: var(--muted);
    font-weight: 600;
    padding: 12px 14px;
}

.table > tbody td {
    padding: 9px 14px;
}

.table > tbody > tr:last-child > td {
    border-bottom: 0;
}

/* Buttons */
.btn {
    --bs-btn-border-radius: 10px;
    --bs-btn-font-weight: 600;
    --bs-btn-padding-x: 16px;
    --bs-btn-padding-y: 9px;
    --bs-btn-font-size: 14.5px;
    --bs-btn-focus-box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px var(--accent);
}

.btn-sm {
    --bs-btn-border-radius: 8px;
    --bs-btn-padding-x: 11px;
    --bs-btn-padding-y: 6px;
    --bs-btn-font-size: 13px;
}

.btn-lg {
    --bs-btn-padding-x: 20px;
    --bs-btn-padding-y: 12px;
    --bs-btn-font-size: 15.5px;
}

.btn-primary {
    --bs-btn-color: var(--accent-contrast);
    --bs-btn-bg: var(--accent);
    --bs-btn-border-color: var(--accent);
    --bs-btn-hover-color: var(--accent-contrast);
    --bs-btn-hover-bg: var(--accent-strong);
    --bs-btn-hover-border-color: var(--accent-strong);
    --bs-btn-active-color: var(--accent-contrast);
    --bs-btn-active-bg: var(--accent-strong);
    --bs-btn-active-border-color: var(--accent-strong);
    --bs-btn-disabled-color: var(--muted);
    --bs-btn-disabled-bg: var(--surface-2);
    --bs-btn-disabled-border-color: var(--border);
    --bs-btn-disabled-opacity: 1;
}

.btn-success {
    --bs-btn-bg: var(--good);
    --bs-btn-border-color: var(--good);
    --bs-btn-hover-bg: color-mix(in srgb, var(--good) 85%, #000);
    --bs-btn-hover-border-color: color-mix(in srgb, var(--good) 85%, #000);
    --bs-btn-disabled-color: var(--muted);
    --bs-btn-disabled-bg: var(--surface-2);
    --bs-btn-disabled-border-color: var(--border);
    --bs-btn-disabled-opacity: 1;
}

/* Umrandete Varianten wirken wie der "ghost"-Knopf der Zeiterfassung. */
.btn-outline-primary,
.btn-outline-secondary,
.btn-outline-dark,
.btn-outline-success,
.btn-outline-danger,
.btn-secondary,
.btn-light {
    --bs-btn-color: var(--text);
    --bs-btn-bg: var(--surface);
    --bs-btn-border-color: var(--border);
    --bs-btn-hover-color: var(--text);
    --bs-btn-hover-bg: var(--surface-2);
    --bs-btn-hover-border-color: var(--border);
    --bs-btn-active-color: var(--text);
    --bs-btn-active-bg: var(--info-soft);
    --bs-btn-active-border-color: var(--accent);
    --bs-btn-disabled-color: var(--muted);
    --bs-btn-disabled-bg: var(--surface-2);
    --bs-btn-disabled-border-color: var(--border);
}

.btn-outline-primary { --bs-btn-color: var(--accent-strong); --bs-btn-hover-color: var(--accent-strong); }
.btn-outline-success { --bs-btn-color: var(--good); --bs-btn-hover-color: var(--good); }
.btn-outline-danger  { --bs-btn-color: var(--bad);  --bs-btn-hover-color: var(--bad); }

/* Badges als Chips */
.badge {
    --bs-badge-padding-x: 9px;
    --bs-badge-padding-y: 4px;
    --bs-badge-font-size: 12px;
    --bs-badge-font-weight: 600;
    --bs-badge-border-radius: 999px;
}

.badge.bg-success   { background: var(--good-soft) !important; color: var(--good); }
.badge.bg-warning   { background: var(--warn-soft) !important; color: var(--warn); }
.badge.bg-danger    { background: var(--bad-soft) !important;  color: var(--bad); }
.badge.bg-primary,
.badge.bg-info      { background: var(--info-soft) !important; color: var(--accent-strong); }
.badge.bg-secondary,
.badge.bg-light,
.badge.bg-dark      { background: var(--surface-2) !important; color: var(--muted); }

/* Meldungen */
.alert {
    --bs-alert-border-radius: 10px;
    --bs-alert-border-color: transparent;
    font-size: 14px;
}

.alert-success { --bs-alert-bg: var(--good-soft); --bs-alert-color: var(--good); }
.alert-danger  { --bs-alert-bg: var(--bad-soft);  --bs-alert-color: var(--bad); }
.alert-warning { --bs-alert-bg: var(--warn-soft); --bs-alert-color: var(--warn); }
.alert-info    { --bs-alert-bg: var(--info-soft); --bs-alert-color: var(--accent-strong); }

/* Formulare */
.form-control,
.form-select {
    background-color: var(--surface-2);
    color: var(--text);
    border-color: var(--border);
    border-radius: 10px;
    color-scheme: light dark;
}

.form-control:focus,
.form-select:focus {
    background-color: var(--surface-2);
    color: var(--text);
    border-color: var(--accent);
    box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent) 35%, transparent);
}

.form-control::placeholder {
    color: var(--muted);
}

.form-check-input {
    background-color: var(--surface);
    border-color: var(--border);
}

.form-check-input:checked {
    background-color: var(--accent);
    border-color: var(--accent);
}

.form-label {
    font-size: 12px;
    letter-spacing: .05em;
    text-transform: uppercase;
    color: var(--muted);
    font-weight: 600;
}

.list-group {
    --bs-list-group-bg: var(--surface);
    --bs-list-group-color: var(--text);
    --bs-list-group-border-color: var(--border);
    --bs-list-group-action-hover-bg: var(--surface-2);
    --bs-list-group-active-bg: var(--accent);
    --bs-list-group-active-border-color: var(--accent);
}

.progress {
    --bs-progress-bg: var(--surface-2);
    --bs-progress-bar-bg: var(--accent);
}

/* PDF-Material: Rahmen passend zum Schema statt fest grau. */
iframe {
    border-color: var(--border) !important;
    border-radius: var(--radius-sm) !important;
    background: var(--surface);
}
