/* Abrechnungsportal Klaus Puppe – ruhige Grundfarben, je Bereich ein dezenter Ton */

:root {
    --grund: #f4f6f9;
    --tinte: #1f2937;
    --leise: #6b7280;
    --linie: #e3e7ee;
    --kopf: #1d3557;

    --rechnung-bg: #f6f8fb;   --rechnung-rand: #d9e0ea;  --rechnung-ton: #334155;
    --zahlung-bg: #fff8ec;    --zahlung-rand: #f4dcae;   --zahlung-ton: #8a5a0b;
    --axa-bg: #f1f4ff;        --axa-rand: #cdd6fb;       --axa-ton: #2f3f9e;
    --bh-bg: #effaf4;         --bh-rand: #bfe6cf;        --bh-ton: #1f6b43;
    --dok-bg: #f7f7f8;        --dok-rand: #e1e1e6;       --dok-ton: #4b5563;
    --doppelt: #8b5cf6;       --doppelt-bg: #f5f0ff;
}

body { background: var(--grund); color: var(--tinte); font-size: .95rem; }

/* ---------- Kopf ---------- */
.kopfleiste { background: var(--kopf); }
.kopfleiste .navbar-brand { font-weight: 600; font-size: 1rem; display: flex; align-items: center; gap: .5rem; }
.kopfleiste .marke {
    display: inline-flex; align-items: center; justify-content: center;
    width: 30px; height: 30px; border-radius: 8px; background: #f2a541; color: #1d3557; font-weight: 800; font-size: .85rem;
}
.kopfleiste .nav-link { color: rgba(255,255,255,.78); }
.kopfleiste .nav-link:hover, .kopfleiste .nav-link.active { color: #fff; }
.kopfleiste .rolle { background: rgba(255,255,255,.16); font-weight: 500; }
.benutzerfeld .nav-link { color: rgba(255,255,255,.85); font-size: .9rem; }
.btn-abmelden { color: #fde4b8; border: 1px solid rgba(253,228,184,.4); }
.btn-abmelden:hover { background: rgba(253,228,184,.12); color: #fff; }
.seite-schmal { max-width: 1180px; }

h1.seitentitel { font-size: 1.35rem; font-weight: 650; margin: 0; }
.unterzeile { color: var(--leise); font-size: .88rem; }

/* ---------- Kennzahlen ---------- */
.kacheln { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: .75rem; }
.kachel {
    background: #fff; border: 1px solid var(--linie); border-radius: 12px; padding: .7rem .9rem;
    text-align: left; width: 100%; transition: box-shadow .15s, border-color .15s;
}
button.kachel:hover { border-color: #b9c3d3; box-shadow: 0 2px 8px rgba(29,53,87,.08); }
button.kachel.aktiv { border-color: var(--kopf); box-shadow: 0 0 0 2px rgba(29,53,87,.15); }
.kachel .titel { font-size: .78rem; color: var(--leise); text-transform: uppercase; letter-spacing: .03em; }
.kachel .wert { font-size: 1.3rem; font-weight: 650; font-variant-numeric: tabular-nums; line-height: 1.25; }
.kachel .neben { font-size: .8rem; color: var(--leise); }
.kachel.axa { border-top: 3px solid var(--axa-rand); }
.kachel.bh { border-top: 3px solid var(--bh-rand); }
.kachel.zahlung { border-top: 3px solid var(--zahlung-rand); }
.kachel.warnung .wert { color: #9a3412; }

/* ---------- Filter ---------- */
.filterleiste { background: #fff; border: 1px solid var(--linie); border-radius: 12px; padding: .55rem .75rem; }
.filterleiste .form-select, .filterleiste .form-control { font-size: .88rem; }
.filter-chip {
    border: 1px solid var(--linie); background: #fff; color: var(--tinte); border-radius: 999px;
    padding: .2rem .7rem; font-size: .82rem; white-space: nowrap;
}
.filter-chip:hover { border-color: #b9c3d3; }
.filter-chip.aktiv { background: var(--kopf); border-color: var(--kopf); color: #fff; }
.filter-chip .zahl { opacity: .7; margin-left: .25rem; }

/* ---------- Matrix ---------- */
/* Keine eigene Scrollleiste: die Liste scrollt mit der Seite, Kopfzeile und Jahreszeilen bleiben beim Scrollen oben stehen (sticky zur Seite).
   Nur auf schmalen Bildschirmen scrollt die Tabelle seitlich im Rahmen. */
.matrix-rahmen { background: #fff; border: 1px solid var(--linie); border-radius: 12px; overflow-x: auto; }
@media (min-width: 1100px) { .matrix-rahmen { overflow: visible; } }
table.matrix { width: 100%; border-collapse: separate; border-spacing: 0; font-size: .86rem; min-width: 1020px; }
.matrix th, .matrix td { padding: .38rem .55rem; border-bottom: 1px solid #edf0f4; vertical-align: middle; }
.matrix thead th {
    position: sticky; top: 0; z-index: 3; background: #f8fafc; font-weight: 600; font-size: .76rem;
    text-transform: uppercase; letter-spacing: .03em; color: #475569; border-bottom: 1px solid var(--linie); white-space: nowrap;
}
.matrix thead th.kasse-axa { background: var(--axa-bg); color: var(--axa-ton); }
.matrix thead th.kasse-bh { background: var(--bh-bg); color: var(--bh-ton); }
.matrix thead th.zahlung { background: var(--zahlung-bg); color: var(--zahlung-ton); }
.matrix td.kasse-axa { background: rgba(241,244,255,.55); }
.matrix td.kasse-bh { background: rgba(239,250,244,.6); }
.matrix td.zahlung { background: rgba(255,248,236,.55); }
.matrix .zahl { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.matrix tbody tr.zeile { cursor: pointer; }
.matrix tbody tr.zeile:hover td { background-color: #f3f6fb; }
.matrix tbody tr.zeile:hover td.kasse-axa { background-color: #e6ebff; }
.matrix tbody tr.zeile:hover td.kasse-bh { background-color: #e1f5ea; }
.matrix tbody tr.zeile:hover td.zahlung { background-color: #fdf0d8; }
.matrix .steller { font-weight: 600; max-width: 260px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.matrix .nummer { color: var(--leise); font-size: .78rem; max-width: 260px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.matrix .klein { color: var(--leise); font-size: .75rem; white-space: nowrap; }
.matrix tr.jahr td {
    position: sticky; top: 33px; z-index: 2; background: #e9eef5; font-weight: 650; color: #1e293b;
    border-bottom: 1px solid #d5dde8; font-size: .84rem;
}
.matrix tr.jahr .summen { font-weight: 500; color: #475569; font-size: .8rem; }
.matrix tr.leer td { color: var(--leise); font-style: italic; text-align: center; padding: .8rem; }
.matrix td.auswahl, .matrix th.auswahl { width: 30px; text-align: center; padding-left: .7rem; }
.matrix tr.doppelt td:first-child { box-shadow: inset 4px 0 0 var(--doppelt); }
.matrix tr.doppelt td { background-color: var(--doppelt-bg); }
.matrix tr.ausgewaehlt td { background-color: #fff7d6 !important; }
.matrix tfoot td { position: sticky; bottom: 0; background: #f8fafc; font-weight: 650; border-top: 1px solid var(--linie); }

.doppelt-marke {
    display: inline-block; background: var(--doppelt); color: #fff; border-radius: 6px; font-size: .7rem; font-weight: 700;
    padding: 0 .35rem; margin-left: .3rem; vertical-align: 1px;
}
.dok-marke { color: #64748b; font-size: .8rem; white-space: nowrap; }

/* ---------- Status-Chips ---------- */
.chip {
    display: inline-block; border-radius: 999px; padding: .08rem .55rem; font-size: .78rem; font-weight: 600;
    white-space: nowrap; border: 1px solid transparent; font-variant-numeric: tabular-nums;
}
.chip-offen { background: #f1f3f6; color: #5b6472; border-color: #e1e5eb; }
.chip-eingereicht { background: #e3ecfd; color: #1e4fb0; border-color: #c9dafb; }
.chip-erstattet { background: #e1f5e7; color: #17663a; border-color: #c4e9d1; }
.chip-gekuerzt { background: #fff1d6; color: #8a4b05; border-color: #f7dca5; }
.chip-abgelehnt { background: #fde6e6; color: #a12121; border-color: #f8caca; }

/* ---------- Aktionsleiste bei Auswahl ---------- */
.auswahlleiste {
    position: sticky; bottom: .75rem; z-index: 5; background: var(--kopf); color: #fff; border-radius: 12px;
    padding: .6rem .9rem; box-shadow: 0 6px 20px rgba(29,53,87,.25);
}
.auswahlleiste .form-control, .auswahlleiste .form-select { font-size: .85rem; }

/* ---------- Detailseiten: Bereiche ---------- */
.bereich { border: 1px solid; border-radius: 14px; padding: 1rem 1.1rem; height: 100%; }
.bereich > h2 { font-size: .8rem; text-transform: uppercase; letter-spacing: .05em; font-weight: 700; margin: 0 0 .75rem; display: flex; align-items: center; gap: .5rem; }
.bereich-rechnung { background: var(--rechnung-bg); border-color: var(--rechnung-rand); }
.bereich-rechnung > h2 { color: var(--rechnung-ton); }
.bereich-zahlung { background: var(--zahlung-bg); border-color: var(--zahlung-rand); }
.bereich-zahlung > h2 { color: var(--zahlung-ton); }
.bereich-axa { background: var(--axa-bg); border-color: var(--axa-rand); }
.bereich-axa > h2 { color: var(--axa-ton); }
.bereich-beihilfe { background: var(--bh-bg); border-color: var(--bh-rand); }
.bereich-beihilfe > h2 { color: var(--bh-ton); }
.bereich-dok { background: var(--dok-bg); border-color: var(--dok-rand); }
.bereich-dok > h2 { color: var(--dok-ton); }

/* Eingabefelder heben sich weiß und klar umrandet vom getönten Bereich ab */
.bereich .form-control, .bereich .form-select { background-color: #fff; border-color: #c9d1dc; }
.bereich .form-control:focus, .bereich .form-select:focus { border-color: #6b8fc7; box-shadow: 0 0 0 .2rem rgba(29,53,87,.12); }
.bereich .form-label { font-size: .78rem; font-weight: 600; color: #4b5563; margin-bottom: .2rem; }
.bereich .form-control[readonly] { background-color: transparent; border-color: transparent; padding-left: 0; font-weight: 600; }

/* Anzeigewerte (keine Eingabe) */
.anzeige { display: grid; grid-template-columns: auto 1fr; gap: .2rem 1rem; font-size: .9rem; }
.anzeige dt { color: var(--leise); font-weight: 500; }
.anzeige dd { margin: 0; font-weight: 600; font-variant-numeric: tabular-nums; }

.unterkasten { background: rgba(255,255,255,.75); border: 1px solid rgba(0,0,0,.06); border-radius: 10px; padding: .6rem .75rem; }
.unterkasten + .unterkasten { margin-top: .5rem; }
.eingabekasten { background: #fff; border: 1px dashed #c3cbd8; border-radius: 10px; padding: .65rem .75rem; }
.kassen-kopf { display: flex; justify-content: space-between; align-items: baseline; gap: .5rem; flex-wrap: wrap; }
.soll { font-size: .8rem; color: var(--leise); }
.betrag-gross { font-size: 1.25rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.liste-klein { list-style: none; padding: 0; margin: 0; font-size: .86rem; }
.liste-klein li { display: flex; justify-content: space-between; align-items: center; gap: .5rem; padding: .3rem 0; border-bottom: 1px solid rgba(0,0,0,.05); }
.liste-klein li:last-child { border-bottom: 0; }
.btn-x { border: 0; background: none; color: #9ca3af; padding: 0 .25rem; line-height: 1; font-size: 1.1rem; }
.btn-x:hover { color: #b91c1c; }

.kopfkarte { background: #fff; border: 1px solid var(--linie); border-radius: 14px; padding: .9rem 1.1rem; }
.hinweis-doppelt { background: var(--doppelt-bg); border: 1px solid #ddd0fb; border-left: 4px solid var(--doppelt); border-radius: 10px; padding: .6rem .9rem; font-size: .9rem; }
.gefahrzone { border: 1px solid #f3c9c9; background: #fff7f7; border-radius: 12px; padding: .8rem 1rem; }

.tabelle-weiss { background: #fff; border: 1px solid var(--linie); border-radius: 12px; overflow: hidden; }
.tabelle-weiss table { margin: 0; font-size: .88rem; }
.tabelle-weiss thead th { background: #f8fafc; font-size: .76rem; text-transform: uppercase; letter-spacing: .03em; color: #475569; font-weight: 600; }

.positions-tabelle input.form-control { min-width: 90px; }
.positions-tabelle td { vertical-align: middle; }

#vorschauRahmen { width: 100%; height: 80vh; border: 0; display: block; }

/* ---------- Anmeldung ---------- */
.anmelde-kopf { background: var(--kopf); color: #fff; padding: 2.5rem 1rem 4rem; text-align: center; }
.anmelde-kopf h1 { font-size: 1.35rem; font-weight: 700; margin: 0; }
.anmelde-kopf p { margin: .25rem 0 0; opacity: .75; font-size: .9rem; }
.anmelde-karte {
    max-width: 440px; margin: -2.5rem auto 2rem; background: #fff; border: 1px solid var(--linie);
    border-radius: 16px; box-shadow: 0 6px 20px rgba(29,53,87,.12); padding: 1.5rem;
}
.anmelde-karte.breit { max-width: 640px; }
.code-feld { font-size: 1.6rem; letter-spacing: .3em; text-align: center; font-variant-numeric: tabular-nums; }
.qr { width: 220px; max-width: 100%; margin: .5rem auto; }
.qr svg { display: block; width: 100%; height: auto; }
.schluessel { font-family: monospace; word-break: break-all; background: #f3f4f6; border-radius: 8px; padding: .5rem .75rem; }
.codes { display: grid; grid-template-columns: 1fr 1fr; gap: .4rem; font-family: monospace; font-size: 1.15rem; text-align: center; }
.codes div { background: #f3f4f6; border-radius: 8px; padding: .4rem; }
.btn-haupt { background: var(--kopf); border-color: var(--kopf); color: #fff; font-weight: 600; }
.btn-haupt:hover, .btn-haupt:focus { background: #142640; border-color: #142640; color: #fff; }

@media (max-width: 991.98px) {
    .matrix-rahmen { max-height: none; }
    .matrix tr.jahr td { top: 0; }
}
@media print {
    .kopfleiste, .filterleiste, .auswahlleiste, footer, .nicht-drucken { display: none !important; }
    .matrix-rahmen { max-height: none; overflow: visible; border: 0; }
    .matrix thead th, .matrix tr.jahr td { position: static; }
    body { background: #fff; }
}

/* ---------- Globaler Speichern-Knopf ---------- */
.speicherleiste { position: sticky; bottom: 0; z-index: 30; margin: 1rem -.75rem 0; padding: .6rem .75rem; background: rgba(255,255,255,.96); border-top: 1px solid #d5dbe5; box-shadow: 0 -4px 14px rgba(15,23,42,.07); backdrop-filter: blur(4px); }
.speicherleiste-innen { max-width: 1200px; margin: 0 auto; display: flex; justify-content: space-between; align-items: center; gap: 1rem; }
.speicher-status { color: #6b7280; font-size: .92rem; }
.speicherleiste.geaendert .speicher-status { color: #92400e; font-weight: 600; }
.speicherleiste.geaendert .speicher-status::before { content: "● "; color: #f59e0b; }
.aenderung-gruppe { font-weight: 600; font-size: .85rem; color: #374151; margin: .8rem 0 .25rem; }
.aenderung-gruppe:first-child { margin-top: 0; }
.aenderung { display: grid; grid-template-columns: 9.5rem 1fr; gap: .5rem; font-size: .9rem; padding: .2rem 0; border-bottom: 1px solid #eef0f4; }
.aenderung .alt { color: #9ca3af; text-decoration: line-through; }
.aenderung .neu { color: #166534; font-weight: 600; }
.aenderung .hinweis { grid-column: 2; font-size: .78rem; color: #92400e; }

/* ---------- Dashboard ---------- */
.dash-raster { display: grid; grid-template-columns: repeat(auto-fit, minmax(270px, 1fr)); gap: 1rem; }
.dash-raster-klein { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.dash-kachel { display: block; background: #fff; border: 1px solid var(--rand, #d9dee7); border-top: 4px solid #94a3b8; border-radius: 12px; padding: 1rem 1.15rem; color: inherit; text-decoration: none; box-shadow: 0 1px 2px rgba(15,23,42,.04); }
a.dash-kachel:hover { box-shadow: 0 4px 14px rgba(29,53,87,.12); color: inherit; }
.dash-kachel.axa { border-top-color: var(--axa-rand); }
.dash-kachel.bh { border-top-color: var(--bh-rand); }
.dash-kachel.zahlung { border-top-color: var(--zahlung-rand); }
.dash-kachel .titel { font-size: .8rem; color: var(--leise); text-transform: uppercase; letter-spacing: .04em; font-weight: 600; }
.dash-kachel .gross { font-size: 2.1rem; font-weight: 700; line-height: 1.2; font-variant-numeric: tabular-nums; margin: .15rem 0; }
.dash-kachel .mittel { font-size: 1.6rem; font-weight: 650; line-height: 1.25; font-variant-numeric: tabular-nums; }
.dash-kachel .klein-text { font-size: .85rem; color: var(--leise); }
.dash-kachel.warnung .gross, .dash-kachel.warnung .mittel { color: #9a3412; }
.aufstellung { display: grid; grid-template-columns: 1fr auto; gap: .15rem .75rem; margin: .4rem 0 0; font-size: .85rem; color: #4b5563; }
.aufstellung dt { font-weight: 400; } .aufstellung dd { margin: 0; text-align: right; font-variant-numeric: tabular-nums; }
.aufstellung dd span { color: var(--leise); }
.aufstellung a { color: inherit; }
.aufstellung .summe { border-top: 1px solid #e5e7eb; padding-top: .2rem; font-weight: 600; color: #111827; }
.stapel { display: flex; height: 30px; border-radius: 8px; overflow: hidden; background: #eef0f4; margin: .35rem 0; }
.stapel .seg { color: #fff; font-size: .78rem; font-weight: 600; display: flex; align-items: center; justify-content: center; white-space: nowrap; }
.seg-erstattet { background: #2f855a; } .seg-wartet { background: #d69e2e; } .seg-offen { background: #94a3b8; } .seg-kuerz { background: #c53030; } .seg-zahl-offen { background: #f6ad55; }
.legende { display: flex; flex-wrap: wrap; gap: .25rem 1.1rem; font-size: .82rem; color: #4b5563; }
.legende.vertikal { flex-direction: column; font-size: .95rem; gap: .5rem; }
.punkt { display: inline-block; width: 11px; height: 11px; border-radius: 3px; margin-right: .35rem; }
.jahresbalken { display: flex; align-items: flex-end; gap: 1.2rem; height: 210px; padding-top: 1.5rem; }
.jb { flex: 1; max-width: 140px; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; text-decoration: none; color: inherit; }
.jb .saeule { width: 100%; background: linear-gradient(#64748b, #94a3b8); border-radius: 6px 6px 0 0; min-height: 2px; }
.jb .wert { font-size: .78rem; font-variant-numeric: tabular-nums; margin-bottom: .2rem; }
.jb .jahr { font-weight: 600; margin-top: .25rem; }
.jb:hover .saeule { background: linear-gradient(#1d3557, #4a6a94); }

/* ---------- Menü-Buttons ---------- */
.kopfleiste .hauptnav-knoepfe { gap: .4rem; }
.kopfleiste .nav-knopf { border: 1px solid rgba(255,255,255,.28); border-radius: 8px; padding: .38rem .95rem; color: #fff; background: rgba(255,255,255,.08); font-weight: 500; }
.kopfleiste .nav-knopf:hover { background: rgba(255,255,255,.2); color: #fff; }
.kopfleiste .nav-knopf.active { background: #fff; color: var(--kopf); border-color: #fff; font-weight: 650; }
.kopfleiste .nav-knopf.neu { background: #f2a541; border-color: #f2a541; color: #1d3557; font-weight: 650; }
.kopfleiste .nav-knopf.neu:hover { background: #f7b95f; }

/* ---------- Kassen-Block auf der Rechnung: vom Rest der Seite abgesetzt ---------- */
.kassen-block { margin-top: 1.75rem; margin-bottom: 1.25rem; padding: .9rem 1rem 1rem; background: #eef2f8; border: 1px solid #cdd6e4; border-radius: 14px; }
.kassen-trenner { font-weight: 700; font-size: 1.02rem; color: var(--kopf); margin-bottom: .75rem; padding-bottom: .5rem; border-bottom: 2px solid #cdd6e4; }
.kassen-trenner span { font-weight: 400; font-size: .84rem; color: var(--leise); margin-left: .6rem; }

/* ---------- Einreichfrist: nicht eingereicht = rot, 30 Tage vor Fristende blinkend ---------- */
.chip-offen { background: #fde8e8; color: #b91c1c; border-color: #f2b4b4; font-weight: 600; }
.chip.frist-blinkt { animation: fristblink 1s ease-in-out infinite; }
.chip.frist-abgelaufen { background: #7f1d1d; color: #fff; border-color: #7f1d1d; }
@keyframes fristblink { 0%, 100% { background: #fde8e8; color: #b91c1c; box-shadow: 0 0 0 0 rgba(220,38,38,.0); } 50% { background: #dc2626; color: #fff; box-shadow: 0 0 0 4px rgba(220,38,38,.25); } }
.frist-hinweis { margin-top: .5rem; padding: .3rem .55rem; border-radius: 8px; font-size: .82rem; font-weight: 600; }
.frist-hinweis.blinkt { background: #fde8e8; color: #b91c1c; animation: fristblink 1s ease-in-out infinite; }
.frist-hinweis.abgelaufen { background: #7f1d1d; color: #fff; }
.filter-chip.frist-chip { border-color: #f2b4b4; color: #b91c1c; }
@media (prefers-reduced-motion: reduce) { .chip.frist-blinkt, .frist-hinweis.blinkt { animation: none; background: #dc2626; color: #fff; } }

/* Einreichfrist: 120 bis 31 Tage vorher gelb (ohne Blinken) */
.chip.frist-gelb { background: #fef3c7; color: #92400e; border-color: #f3d98b; }
.frist-hinweis.gelb { background: #fef3c7; color: #92400e; }

/* ---------- OCR: vorausgefüllte Felder zur Prüfung ---------- */
.ocr-gefuellt { background: #fff7d6 !important; border-color: #e0b400 !important; }

.ziehbar { cursor: grab; display: inline-block; padding: 2px 6px; border: 1px dashed #adb5bd; border-radius: 6px; background: #f8f9fa; }
.ziehbar:active { cursor: grabbing; }

/* ---------- Upload-Kasten und Prüf-Ampel (neue Rechnung) ---------- */
.dropzone { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 22px 16px; margin: 0; cursor: pointer; text-align: center;
    border: 2px dashed #9fb3c8; border-radius: 12px; background: #fff; transition: background .15s, border-color .15s; }
.dropzone:hover, .dropzone.dz-aktiv { background: #eef5fc; border-color: #0d6efd; }
.dz-symbol { font-size: 1.8rem; line-height: 1; }
.dz-titel { font-size: 1.05rem; font-weight: 600; color: #1f3a5f; }
.dz-text { font-size: .85rem; color: #6c757d; }
.ocr-fortschritt { padding: 6px 12px; margin-top: 10px; border-radius: 8px; background: #eef2f7; color: #35506e; }
.ocr-datei { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 6px 10px; margin-bottom: 6px; background: #fff; border: 1px solid #dde3ea; border-radius: 8px; }
.ocr-datei-name { font-weight: 600; flex: 1 1 220px; word-break: break-word; }
.ocr-datei select { width: auto; min-width: 150px; }
.ampel { border-radius: 10px; border: 1px solid; border-left-width: 8px; padding: 10px 14px; }
.ampel-kopf { font-weight: 700; margin-bottom: 6px; }
.ampel-zeile { font-size: .92rem; padding: 2px 0; }
.ampel-symbol { display: inline-block; width: 1.2em; font-weight: 700; }
.ampel.ampel-ok { background: #e7f5ec; border-color: #2e9d57; color: #14532d; }
.ampel.ampel-warn { background: #fff6db; border-color: #e0a800; color: #664d03; }
.ampel.ampel-fehler { background: #fdeaea; border-color: #d33a3a; color: #7a1717; }
.ampel-zeile.ampel-ok .ampel-symbol { color: #2e9d57; }
.ampel-zeile.ampel-warn .ampel-symbol { color: #b78103; }
.ampel-zeile.ampel-fehler .ampel-symbol { color: #d33a3a; }

.matrix .id-spalte { width: 1%; white-space: nowrap; text-align: right; color: #8a94a0; font-size: .8rem; padding-left: 4px; padding-right: 8px; }
.matrix .id-spalte a { color: inherit; text-decoration: none; }
.matrix .id-spalte a:hover { text-decoration: underline; }

/* ---------- Einreichungen & Bescheide ---------- */
.vorg-karte { border: 1px solid var(--linie); border-radius: 12px; background: #fff; padding: 12px 16px; height: 100%; border-top-width: 5px; }
.vorg-karte.vorg-axa { border-top-color: #4f6bd8; }
.vorg-karte.vorg-beihilfe { border-top-color: #2e9d57; }
.vorg-karte h2 { font-size: .8rem; text-transform: uppercase; letter-spacing: .05em; color: #475569; margin: 0 0 8px; font-weight: 700; }
.vorg-zahlen { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.vorg-zahlen > div { padding: 6px 8px; border-radius: 8px; background: #f8fafc; min-width: 0; }
.vz-titel { font-size: .72rem; color: #64748b; font-weight: 600; text-transform: uppercase; letter-spacing: .03em; }
.vz-zahl { font-size: 1.6rem; font-weight: 700; line-height: 1.15; color: #1e293b; }
.vz-text { font-size: .76rem; color: #64748b; }
.vz-ok { background: #e7f5ec !important; }
.vz-wartet-ok { background: #eef2ff !important; }
.vz-wartet-gelb { background: #fff6db !important; }
.vz-wartet-rot { background: #fdeaea !important; }
.vz-wartet-rot .vz-zahl { color: #b02a2a; }
.warte-ok { color: #475569; }
.warte-gelb { color: #8a5a00; font-weight: 600; }
.warte-rot { color: #b02a2a; font-weight: 700; }
.vorg-balken { height: 6px; min-width: 50px; background: #e5e9ef; border-radius: 4px; overflow: hidden; }
.vorg-balken > div { height: 100%; background: #2e9d57; }
@media (max-width: 767.98px) { .vorg-zahlen { grid-template-columns: repeat(2, 1fr); } }
.dropzone.dz-gefuellt { border-style: solid; border-color: #2e9d57; background: #f1faf4; }

/* ---------- Neuigkeiten ---------- */
.notiz-karte { background: #fff; border: 1px solid var(--linie); border-radius: 12px; padding: 12px 16px; margin-bottom: 12px; }
.notiz-karte.notiz-neu { border-color: #2e9d57; box-shadow: 0 0 0 2px #e7f5ec; }
.notiz-karte ul { padding-left: 1.2rem; font-size: .92rem; }
.notiz-karte li { margin-bottom: 3px; }

/* ---------- Timer und Info-Knopf in der Kopfleiste ---------- */
.sitzung-timer { color: rgba(255,255,255,.8); font-variant-numeric: tabular-nums; font-size: .85rem; white-space: nowrap; padding: 2px 8px; border-radius: 8px; background: rgba(255,255,255,.1); }
.sitzung-timer.warn { background: #f5b301; color: #3b2a00; font-weight: 600; }
.sitzung-timer.kritisch { background: #d63b3b; color: #fff; font-weight: 700; animation: timerblink 1s steps(2, start) infinite; }
@keyframes timerblink { 50% { opacity: .55; } }
.info-knopf { display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; border-radius: 50%; border: 1.5px solid rgba(255,255,255,.65);
    color: #fff; text-decoration: none; font: italic 700 1rem/1 Georgia, 'Times New Roman', serif; }
.info-knopf:hover, .info-knopf.active { background: #fff; color: var(--kopf); }

/* ---------- Profilmenü ---------- */
.profil-knopf { display: inline-flex; align-items: center; justify-content: center; width: 34px; height: 34px; border-radius: 50%; border: 0; padding: 0;
    background: rgba(255,255,255,.18); color: #fff; transition: background .15s; }
.profil-knopf:hover, .profil-knopf:focus-visible, .profil-knopf.active, .profil-knopf.show { background: #fff; color: var(--kopf); }
.profilmenue .dropdown-menu { min-width: 230px; margin-top: 6px; }

/* ---------- Nur-Lesen-Benutzer ---------- */
body[data-nurlesen] .speicherleiste, body[data-nurlesen] .auswahlleiste, body[data-nurlesen] .dropzone, body[data-nurlesen] .js-wahl, body[data-nurlesen] .js-wahl-alle { display: none !important; }
body[data-nurlesen] main form[method=post] input:not([type=hidden]), body[data-nurlesen] main form[method=post] select, body[data-nurlesen] main form[method=post] textarea { pointer-events: none; }
body[data-nurlesen] a, body[data-nurlesen] img, body[data-nurlesen] main span { -webkit-user-drag: none; user-drag: none; }
body[data-nurlesen] main { -webkit-user-select: text; }
