@import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap");
/* Kontiero – Oberfläche. Ruhig, hell, klare Hierarchie. */
:root {
  /* Markenblau wie Anaxys, eine Stufe dunkler: weiße Schrift erreicht so 4,5:1 (WCAG AA) */
  --bg: #f4f5f7; --karte: #ffffff; --text: #1c2430; --blass: #5d6878; --linie: #e3e6ea; --linie2: #cdd2d9;
  --marke: #2f74b5; --marke-dunkel: #255f96; --marke-hell: #e8f1fa; --seite: #2f74b5;
  --gut: #137a3a; --gut-hell: #e8f6ec; --warn: #a14a06; --warn-hell: #fef3c7; --fehler: #e11d48; --fehler-hell: #ffe4e6;
  --info: #0891b2; --info-hell: #e0f5fa; --grau: #f5f5f5;
  --radius: 11px; --schatten: 0 1px 3px rgba(0,0,0,.08), 0 1px 2px -1px rgba(0,0,0,.08);
}
* { box-sizing: border-box; }
html, body { height: 100%; }
body { margin: 0; font-family: Inter, "Segoe UI", Calibri, system-ui, -apple-system, Arial, sans-serif; font-size: 14px; color: var(--text);
  background: var(--bg); display: grid; grid-template-columns: 236px 1fr; }
code { font-size: 12px; background: var(--grau); padding: 1px 4px; border-radius: 4px; }

/* ---------- Seitenleiste (wie Anaxys: Markenblau, weiße Schrift) ---------- */
.seite { background: var(--seite); color: #fff; display: flex; flex-direction: column; height: 100vh; position: sticky; top: 0; padding: 14px 10px; }
.logo { display: flex; gap: 10px; align-items: center; padding: 4px 8px 20px; color: #fff; }
.logo-zeichen { width: 46px; height: 34px; display: grid; place-items: center; color: #fff; }
.logo-zeichen .lnx { width: 42px; height: 28px; fill: none; stroke: currentColor; stroke-width: 4.2; stroke-linecap: round; stroke-linejoin: round; }
.logo b { display: block; font-size: 16px; letter-spacing: .1px; }
.logo small { color: #fff; opacity: .95; font-size: 11.5px; }
.seite nav { display: flex; flex-direction: column; gap: 1px; }
.seite nav::before { content: "Belegerfassung"; font-size: 12px; color: #fff; opacity: .95; padding: 6px 10px 6px; }
.seite nav a { display: flex; align-items: center; gap: 9px; padding: 7px 10px; border-radius: 6px; color: #fff; text-decoration: none; font-weight: 500; font-size: 14px; }
.seite nav a:hover { background: rgba(255,255,255,.12); }
.seite nav a.aktiv { background: rgba(255,255,255,.2); }
.seite nav svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.seite nav b { margin-left: auto; background: rgba(255,255,255,.25); color: #fff; border-radius: 6px; padding: 0 7px; font-size: 11px; }
.seite nav b:empty { display: none; }
.seite-unten { margin-top: auto; display: flex; flex-direction: column; gap: 10px; }
.status-chips { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 4px; }
.chip { font: inherit; font-size: 11.5px; padding: 2px 9px; border-radius: 6px; border: 1px solid rgba(255,255,255,.35); background: transparent; color: #fff; cursor: default; }
button.chip { cursor: pointer; }
.chip.an { background: rgba(255,255,255,.18); }
.chip.aus { opacity: .85; }
.nutzer { display: flex; gap: 10px; align-items: center; border-radius: 8px; padding: 8px; cursor: pointer; }
.nutzer:hover { background: rgba(255,255,255,.12); }
.avatar { width: 32px; height: 32px; border-radius: 8px; background: #fff; color: var(--seite); display: grid; place-items: center; font-weight: 700; font-size: 13px; flex: none; }
.nutzer-text { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.nutzer-text small { color: #fff; opacity: .95; font-size: 11px; }
.nutzer select { background: transparent; color: #fff; border: 0; padding: 0; font-weight: 600; font-size: 13.5px; width: 100%; cursor: pointer; }
.nutzer select option { color: var(--text); }

/* ---------- Grundelemente ---------- */
main { padding: 26px 30px 40px; min-width: 0; }
h1 { font-size: 30px; margin: 0; font-weight: 700; letter-spacing: -.5px; }
h2 { font-size: 18px; margin: 0; }
.klein { font-size: 12.5px; color: var(--blass); }
select, input, textarea { font: inherit; padding: 8px 10px; border: 1px solid var(--linie2); border-radius: 8px; background: #fff; color: var(--text); }
input:focus, select:focus, textarea:focus { outline: 3px solid var(--marke-hell); border-color: var(--marke); }
input:disabled, select:disabled { background: #f6f8fa; color: #4a5565; }
button { font: inherit; padding: 8px 14px; border: 1px solid var(--linie2); border-radius: 8px; background: #fff; cursor: pointer; color: var(--text); font-weight: 500; }
button:hover:not(:disabled) { border-color: var(--marke); }
button:disabled { opacity: .45; cursor: not-allowed; }
button.primaer, button.schwarz { background: var(--marke); color: #fff; border-color: var(--marke); font-weight: 600; }
button.primaer:hover:not(:disabled), button.schwarz:hover:not(:disabled) { background: var(--marke-dunkel); }
button.gut { background: var(--gut); color: #fff; border-color: var(--gut); }
button.gefahr { color: var(--fehler); border-color: #f1b5ae; background: #fff; }
.knopf-klein { padding: 4px 10px; font-size: 12.5px; }
a { color: var(--marke); }

/* ---------- Liste ---------- */
.listenkopf { display: flex; align-items: center; gap: 16px; margin-bottom: 18px; }
.listenkopf h1 { margin-right: auto; }
.listenkopf .anzahl { color: var(--blass); font-weight: 400; font-size: 15px; margin-left: 8px; }
.split { position: relative; display: inline-flex; }
.split .schwarz:first-child:not(:only-child) { border-radius: 8px 0 0 8px; }
.split .pfeil { border-radius: 0 8px 8px 0; border-left: 1px solid rgba(255,255,255,.3); padding: 8px 10px; }
.menue { position: absolute; top: calc(100% + 4px); left: 0; z-index: 30; background: #fff; border: 1px solid var(--linie); border-radius: 10px; box-shadow: 0 12px 32px rgba(16,24,40,.14); min-width: 220px; padding: 6px; display: flex; flex-direction: column; }
.menue[hidden] { display: none; }
.menue.rechts, .split .menue { left: auto; right: 0; }
.menue button { border: 0; text-align: left; padding: 9px 12px; border-radius: 6px; background: none; font-weight: 400; }
.menue button:hover:not(:disabled) { background: var(--grau); }
.menue label { display: flex; gap: 8px; padding: 6px 10px; font-weight: 400; color: var(--text); white-space: nowrap; }
#zeilen-menue { position: absolute; }
.reiter { display: flex; gap: 4px; border-bottom: 1px solid var(--linie); margin-bottom: 14px; flex-wrap: wrap; }
.reiter button { border: 0; background: none; border-radius: 0; padding: 10px 12px; color: #404040; font-weight: 500; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.reiter button.aktiv { color: var(--text); border-bottom-color: var(--marke); font-weight: 600; }
.reiter button .zahl-klein { background: var(--grau); color: var(--blass); border-radius: 999px; padding: 0 7px; font-size: 11.5px; margin-left: 6px; }
.reiter button.aktiv .zahl-klein { background: var(--marke-hell); color: var(--marke); }
.leiste { display: flex; gap: 10px; align-items: center; margin-bottom: 14px; flex-wrap: wrap; }
.leiste input[type=search] { min-width: 260px; }
.karte { background: var(--karte); border: 1px solid var(--linie); border-radius: var(--radius); box-shadow: var(--schatten); }
table { width: 100%; border-collapse: separate; border-spacing: 0; background: var(--karte); border: 1px solid var(--linie); border-radius: var(--radius); box-shadow: var(--schatten); overflow: hidden; }
th, td { padding: 11px 14px; text-align: left; border-bottom: 1px solid var(--linie); vertical-align: top; }
tbody tr:last-child td { border-bottom: 0; }
th { font-size: 12.5px; color: var(--blass); font-weight: 500; background: #fff; letter-spacing: 0 !important; letter-spacing: .04em; white-space: nowrap; }
table.liste th { cursor: pointer; }
table.liste th.spaltenwahl { position: relative; width: 44px; cursor: default; }
tbody tr { cursor: pointer; transition: background .1s; }
tbody tr:hover { background: #f6fafb; }
td.zahl, th.zahl { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
td.zeilenmenue { width: 44px; }
.zwei { max-width: 300px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 500; }
.minus { color: #b4332a; font-weight: 600; } .plus { color: var(--gut); font-weight: 600; }
button.ohne { border: 0; background: none; padding: 2px 8px; letter-spacing: 1px; color: var(--blass); }
button.ohne-rand { letter-spacing: 1px; }
.offen { color: var(--warn); font-size: 12.5px; font-weight: 500; }
.leer { padding: 48px 20px; text-align: center; color: var(--blass); background: var(--karte); border: 1px dashed var(--linie2); border-radius: var(--radius); }
.leer h3 { color: var(--text); margin: 0 0 6px; }
.ablage { border: 1.5px dashed var(--linie2); border-radius: var(--radius); padding: 14px; text-align: center; color: var(--blass); background: #fbfcfd; margin-bottom: 14px; transition: all .15s; }
.ablage.drueber { border-color: var(--marke); background: var(--marke-hell); color: var(--marke); }
.hinweisband { display: flex; gap: 22px; background: var(--karte); border: 1px solid var(--linie); border-radius: var(--radius); padding: 12px 16px; margin-bottom: 16px; box-shadow: var(--schatten); flex-wrap: wrap; }
.hinweisband div { display: flex; gap: 10px; align-items: center; color: var(--blass); font-size: 13px; }
.hinweisband b { width: 24px; height: 24px; border-radius: 50%; background: var(--marke-hell); color: var(--marke); display: grid; place-items: center; font-size: 12px; flex: none; }

/* Status */
.status { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; white-space: nowrap; background: var(--grau); color: #475467; }
.status-Bereit { background: var(--warn-hell); color: var(--warn); }
.status-Freigegeben { background: var(--gut-hell); color: var(--gut); }
.status-Gebucht-Vorschau { background: var(--info-hell); color: var(--info); }
.status-Abgelehnt { background: var(--fehler-hell); color: var(--fehler); }
.status-Gelöscht { background: var(--grau); color: #98a2b3; }
.punkt { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 8px; background: #98a2b3; vertical-align: 1px; }
.punkt-Bereit { background: #e8a317; } .punkt-Freigegeben { background: var(--gut); } .punkt-Gebucht-Vorschau { background: var(--info); }
.punkt-Abgelehnt { background: var(--fehler); } .punkt-Gelöscht { background: #d0d5dd; }

/* ---------- Einzelbeleg ---------- */
.beleg { display: grid; grid-template-columns: minmax(360px, 1fr) minmax(460px, 580px) 116px; gap: 20px; height: calc(100vh - 66px); }
.betrachter { background: #f4f5f7; border-radius: var(--radius); overflow: hidden; display: grid; grid-template-columns: 64px 1fr; position: relative; border: 1px solid var(--linie); }
.daumen { overflow-y: auto; padding: 10px 8px; display: flex; flex-direction: column; gap: 8px; border-right: 1px solid var(--linie); background: #fafbfc; }
.daumen img { width: 100%; border: 1px solid var(--linie2); border-radius: 3px; cursor: pointer; background: #fff; }
.daumen img:hover { border-color: var(--marke); }
.seiten { overflow: auto; padding: 18px; display: block; text-align: center; }
.blatt { display: block; margin: 0 auto 14px; max-width: none; background: #fff; box-shadow: 0 1px 3px rgba(16,24,40,.12), 0 6px 18px rgba(16,24,40,.08); transition: width .15s; }
.zoomknoepfe { position: absolute; right: 16px; bottom: 16px; display: flex; flex-direction: column; gap: 8px; }
.rund { width: 36px; height: 36px; border-radius: 8px; display: grid; place-items: center; background: #fff; border: 1px solid var(--linie2); color: var(--text); text-decoration: none; font-size: 18px; padding: 0; box-shadow: var(--schatten); }
.rund:hover { border-color: var(--marke); }
.leerbeleg { grid-column: 1 / -1; display: flex; align-items: center; justify-content: center; color: var(--blass); padding: 40px; text-align: center; }
.erfassung { overflow-y: auto; padding: 0 6px 30px 2px; }
.aktionsleiste { display: flex; gap: 8px; align-items: center; justify-content: flex-end; position: sticky; top: 0; background: var(--bg); padding: 0 0 12px; z-index: 4; flex-wrap: wrap; }
.aktionsleiste #b-zurueck { margin-right: auto; border: 0; background: none; font-weight: 600; padding-left: 0; color: var(--blass); }
.herkunft { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; font-size: 13px; color: var(--blass); margin-bottom: 12px; }
.stempel { font-size: 11px; color: var(--marke); background: var(--marke-hell); padding: 2px 8px; border-radius: 999px; font-weight: 600; }
.naechster { border-radius: var(--radius); padding: 12px 14px; margin-bottom: 12px; background: var(--info-hell); color: #1d3a8a; border: 1px solid #cdd9fb; }
.naechster.ok { background: var(--gut-hell); color: #0f5132; border-color: #bfe3cf; }
.naechster.warn { background: var(--warn-hell); color: #6b3d00; border-color: #f5d9a8; }
.naechster b { display: block; margin-bottom: 2px; }
.naechster ul { margin: 6px 0 0; padding-left: 0; list-style: none; }
.naechster li { padding: 3px 0; }
.naechster li a { cursor: pointer; text-decoration: underline; text-underline-offset: 2px; color: inherit; }
.pruefbox { display: none; }
.vorschau { background: var(--karte); border: 1.5px solid #cdd9fb; border-radius: var(--radius); padding: 14px 16px; margin-bottom: 12px; }
.vorschau h3 { margin: 0 0 8px; color: var(--info); font-size: 15px; }
.vorschau table { box-shadow: none; }
.vorschau pre { background: #f6f8fa; padding: 8px; border-radius: 6px; font-size: 11px; max-height: 220px; overflow: auto; }
.schritt { background: var(--karte); border: 1px solid var(--linie); border-radius: var(--radius); margin: 0 0 10px; box-shadow: var(--schatten); }
.schritt.auf { padding-bottom: 16px; border-color: #b9d9de; }
.sk { display: flex; align-items: center; gap: 14px; padding: 14px 16px; cursor: pointer; font-size: 16px; font-weight: 600; }
.sk .nr { width: 28px; height: 28px; border-radius: 50%; background: var(--grau); display: inline-flex; align-items: center; justify-content: center; font-size: 13px; color: var(--blass); }
.schritt.auf .sk .nr { background: var(--marke); color: #fff; }
.sk .st { flex: 1; }
.sk .icon { font-size: 12px; font-weight: 600; padding: 2px 8px; border-radius: 999px; }
.sk .icon.ok { color: var(--gut); background: var(--gut-hell); } .sk .icon.offen { color: var(--warn); background: var(--warn-hell); }
.schritt .rumpf { padding: 2px 16px 4px 58px; display: grid; grid-template-columns: 1fr 1fr; gap: 12px 14px; }
.feld { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.feld.breit { grid-column: 1 / -1; }
.feld > label { font-size: 12.5px; color: #475467; font-weight: 500; display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.feld input, .feld select { width: 100%; }
.feld input.betrag { text-align: right; font-variant-numeric: tabular-nums; }
.feld.unsicher input, .feld.unsicher select { border-color: #e9b45a; background: #fffaf0; }
.blink { animation: blink 1.2s ease 2; }
@keyframes blink { 50% { box-shadow: 0 0 0 4px #fde3b0; } }
.konf { font-size: 10.5px; padding: 1px 7px; border-radius: 999px; font-weight: 600; }
.konf.hoch { background: var(--gut-hell); color: var(--gut); }
.konf.niedrig { background: var(--warn-hell); color: var(--warn); cursor: pointer; border: 1px solid #f5d9a8; }
.konf.niedrig:hover { background: #ffe8c2; }
.konf.manuell { background: var(--grau); color: var(--blass); }
button.weiter { margin: 14px 16px 0 58px; width: calc(100% - 74px); background: var(--marke-hell); color: var(--marke); border: 0; font-weight: 600; padding: 10px; }
button.weiter:hover { background: #d3eaee; }
button.plus-link { border: 0; background: none; padding: 2px 0; color: var(--marke); font-weight: 600; text-align: left; }
button.plus-link:disabled { display: none; }
.umschalter, .radios { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; padding-top: 4px; }
.umschalter label, .radios label { display: flex; gap: 6px; align-items: center; font-size: 14px; color: var(--text); font-weight: 400; }
.unterkopf { display: block; margin-top: 6px; font-size: 13px; color: var(--text); }
.kontokarte { border: 1px solid var(--linie); border-radius: 8px; padding: 10px 12px; background: #fbfcfd; }
.zeile { grid-column: 1 / -1; border: 1px solid var(--linie); border-radius: 10px; padding: 12px; display: grid; grid-template-columns: 1fr 1fr; gap: 10px 12px; background: #fcfdfe; }
.zeile .weg-zeile { width: 40px; }
.lohn { grid-column: 1 / -1; display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 8px; background: #fff; padding: 10px; border-radius: 8px; border: 1px solid var(--linie); }
.lohn .feld.breit { grid-column: 1 / -1; }
.summen { grid-column: 1 / -1; display: grid; gap: 4px; background: var(--grau); border-radius: 10px; padding: 12px 14px; font-variant-numeric: tabular-nums; }
.summen div { display: flex; justify-content: space-between; font-size: 13px; color: var(--blass); }
.summen div b { color: var(--text); font-size: 14px; }
.deckung { grid-column: 1 / -1; font-size: 13px; }
.schrittnav { display: flex; flex-direction: column; gap: 2px; padding-top: 52px; border-left: 1px solid var(--linie, #e3e7ec); padding-left: 6px; }
.schrittnav a { display: flex; align-items: center; gap: 7px; padding: 6px 4px; border-radius: 6px; color: var(--blass); cursor: pointer; font-size: 12px; line-height: 1.2; white-space: nowrap; }
.schrittnav a b { flex: 0 0 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; font-size: 11px; font-weight: 600; background: var(--grau); color: inherit; }
.schrittnav a.hat-offen b { background: var(--warn-hell); color: #6b3d00; }
.schrittnav a.aktiv b { background: var(--marke); color: #fff; }
.schrittnav a:hover { background: var(--grau); }
.schrittnav a.aktiv { color: var(--marke); font-weight: 600; }
.protokoll-box { margin: 14px 4px; font-size: 13px; color: var(--blass); }
.protokoll li { margin: 3px 0; }

/* ---------- Formulare, Dialoge, Meldungen ---------- */
.formular { display: grid; grid-template-columns: repeat(6, 1fr) auto; gap: 8px; margin-bottom: 14px; background: var(--karte); padding: 12px; border: 1px solid var(--linie); border-radius: var(--radius); box-shadow: var(--schatten); }
dialog { border: 0; border-radius: 14px; width: min(620px, 92vw); box-shadow: 0 24px 64px rgba(16,24,40,.25); padding: 22px; }
dialog::backdrop { background: rgba(13,37,48,.45); }
dialog textarea { width: 100%; font-family: Consolas, monospace; font-size: 12px; }
.aktionen { display: flex; justify-content: flex-end; gap: 8px; margin-top: 12px; }
.meldung { position: fixed; bottom: 22px; left: 50%; transform: translateX(-50%); background: #16202c; color: #fff; padding: 11px 18px; border-radius: 10px; max-width: 80vw; z-index: 40; box-shadow: 0 10px 30px rgba(0,0,0,.25); }
.meldung.fehler { background: var(--fehler); }
@media (max-width: 1200px) { .beleg { grid-template-columns: 1fr minmax(440px, 1fr); } .schrittnav { display: none; } }
@media (max-width: 1000px) { body { grid-template-columns: 1fr; } .seite { position: static; height: auto; } .beleg { grid-template-columns: 1fr; height: auto; } .betrachter { height: 70vh; } }

.tabellenrahmen { overflow-x: auto; border-radius: var(--radius); }
.tabellenrahmen table.liste th.spaltenwahl .menue { position: fixed; }
table.liste td:first-child { white-space: nowrap; }
table.liste td { white-space: nowrap; }
table.liste .zwei { max-width: 240px; }

.neukredit { margin-top: 10px; background: #f7faff; border: 1px solid #cddcf3; border-radius: 11px; padding: 14px 16px; font-size: 13.5px; color: var(--text); }
.nk-kopf { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.nk-kopf b { color: #1d4f8a; font-size: 14px; }
.nk-formular { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 14px; margin-top: 14px; }
.nk-feld { display: flex; flex-direction: column; gap: 4px; }
.nk-feld:first-child, .nk-feld:nth-child(4) { grid-column: 1 / -1; }
.nk-feld label { font-size: 12.5px; color: var(--blass); font-weight: 500; }
.nk-feld input, .nk-feld select { width: 100%; padding: 9px 11px; font-size: 14px; box-sizing: border-box; background: #fff; }
.nk-feld.unsicher input { background: #fffbea; border-color: #e9c46a; }
.nk-hinweis { font-size: 11.5px; color: var(--blass); }
.nk-aktion { grid-column: 1 / -1; display: flex; justify-content: flex-end; }
.nk-aktion button { padding: 9px 18px; font-size: 14px; }
@media (max-width: 900px) { .nk-formular { grid-template-columns: 1fr; } }

button.schwarz.gedimmt { opacity: .55; }
.sk .icon.offen { font-size: 11.5px; }

.brot { font-size: 13px; color: var(--blass); margin-bottom: 4px; }
.brot b { color: var(--text); font-weight: 500; }
.neukredit .nk-feld:not(.unsicher) input, .neukredit .nk-feld:not(.unsicher) select { background: #fff !important; border-color: #d9dee6 !important; }

/* ---------- Überarbeitung Oberfläche 23.10.2026 ---------- */
:focus-visible { outline: 2px solid var(--marke); outline-offset: 2px; }
.seite :focus-visible { outline-color: #fff; }
input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 3px solid var(--marke-hell); outline-offset: 0; }
h1 { font-size: 28px; letter-spacing: -.4px; }
.seitentext { margin: -6px 0 16px; max-width: 72ch; }

/* Liste: ruhiger, Betrag neutral, Fälligkeit sichtbar */
table.liste th, table.liste td { padding: 12px 12px; }
table.liste td { vertical-align: middle; }
table.liste .zwei { max-width: 220px; }
.minus { color: var(--text); font-weight: 600; }
.plus { color: #137a3a; font-weight: 600; }
.klein.iban { font-variant-numeric: tabular-nums; letter-spacing: .1px; }
.ueberfaellig { color: #b42318; font-weight: 600; }
.klein.ueberfaellig { font-weight: 500; }
.offen-klein { color: var(--warn); font-weight: 500; margin-top: 3px; }
.status { padding: 2px 9px; font-size: 12px; }
.status-Entwurf { background: #eef0f3; color: #3f4a59; }
.status-Bereit { background: #e8f1fa; color: #1f5e99; }
.status-Freigegeben { background: #e6f4ea; color: #137a3a; }
.status-Gebucht-Vorschau { background: #e3f1ee; color: #0f6b5c; }
.status-Abgelehnt { background: #fdecea; color: #b42318; }
.ablage { padding: 10px; font-size: 13px; }
.reiter button { color: #3f4a59; }

/* Einzelbeleg */
.herkunft { gap: 10px; }
.herkunft .beleg-id { color: var(--text); font-weight: 600; font-variant-numeric: tabular-nums; }
.naechster ul { margin-top: 8px; }
.naechster li { padding: 4px 0 4px 14px; position: relative; }
.naechster li::before { content: ""; position: absolute; left: 2px; top: 12px; width: 5px; height: 5px; border-radius: 50%; background: currentColor; opacity: .6; }
.konf { font-size: 11px; padding: 1px 8px; font-weight: 600; white-space: nowrap; }
.konf.niedrig { cursor: pointer; }
.konf.niedrig:focus-visible { outline: 2px solid var(--warn); outline-offset: 1px; }
.sk { min-height: 56px; }

/* Prüfliste */
table.pruef td { vertical-align: top; }
table.pruef td:first-child { width: 240px; }
table.pruef td:first-child .klein { max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; margin: 2px 0 6px; }
.nowrap { white-space: nowrap; }
ul.punkte { margin: 0; padding-left: 16px; }
ul.punkte li { margin: 2px 0; }

/* Objekte: Formular bricht um statt aus dem Bild zu laufen */
.formular.objektform { grid-template-columns: 90px 110px minmax(200px, 2fr) 90px minmax(120px, 1fr); }
.formular.objektform #o-betreuer, .formular.objektform #o-buchhalter { grid-column: span 2; }
.formular.objektform #o-speichern { grid-column: -2 / -1; }

/* Schmale Fenster und Handy */
@media (max-width: 1000px) {
  .seite { padding: 10px; }
  .seite nav { flex-direction: row; overflow-x: auto; gap: 4px; }
  .seite nav::before { display: none; }
  .seite nav a { white-space: nowrap; }
  .logo { padding-bottom: 8px; }
  .status-chips { display: none; }
  .seite-unten { margin-top: 8px; }
  main { padding: 18px 16px 32px; }
  .formular.objektform { grid-template-columns: 1fr 1fr; }
  .formular.objektform #o-strasse, .formular.objektform #o-speichern, .formular.objektform #o-betreuer, .formular.objektform #o-buchhalter { grid-column: 1 / -1; }
  .reiter { flex-wrap: nowrap; overflow-x: auto; }
  .reiter button { white-space: nowrap; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }
@media (max-width: 1000px) {
  body { grid-template-columns: minmax(0, 1fr); }
  .leiste > input, .leiste > select { flex: 1 1 100%; min-width: 0 !important; }
  .listenkopf { flex-wrap: wrap; }
}

.formular.kreditorform { grid-template-columns: minmax(180px, 2fr) minmax(200px, 2fr) 1fr 1fr; }
.formular.kreditorform #k-ort { grid-column: span 2; }
.listenkopf > div:first-child { margin-right: auto; }
.formular.regelform { grid-template-columns: minmax(140px, 2fr) minmax(220px, 3fr) auto 64px auto; align-items: center; }
@media (max-width: 1000px) { .formular.kreditorform, .formular.regelform { grid-template-columns: 1fr; } .formular.kreditorform #k-anlegen { grid-column: auto; } }

/* Benutzerwechsel: sichtbarer Block, das native Auswahlfeld liegt unsichtbar darüber (Tastatur und Dropdown bleiben erhalten) */
.nutzer { position: relative; display: grid; grid-template-columns: 34px 1fr 16px; gap: 10px; align-items: center; padding: 8px 10px; border-radius: 8px; }
.nutzer:hover, .nutzer:focus-within { background: rgba(255,255,255,.14); }
.nutzer:focus-within { outline: 2px solid #fff; outline-offset: 1px; }
.nutzer .avatar { width: 34px; height: 34px; }
.nutzer-text { display: flex; flex-direction: column; gap: 1px; min-width: 0; line-height: 1.25; }
.nutzer-text b { font-size: 14px; font-weight: 600; color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nutzer-text small { font-size: 12px; color: #fff; opacity: .9; }
.nutzer-pfeil { width: 16px; height: 16px; fill: none; stroke: #fff; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.nutzer select#benutzer { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; border: 0; padding: 0; margin: 0; font-size: 14px; }

/* ---------- Feinschliff Runde 2 ---------- */
/* Felder in einer Zeile stehen immer auf gleicher Höhe: Label einzeilig, Eingabe unten bündig */
.schritt .rumpf { align-items: end; }
.feld > label { flex-wrap: wrap; row-gap: 3px; min-height: 20px; }
/* Eingaben einer Zeile bleiben unten bündig, auch wenn ein Label bei Zoom umbricht */
.feld > label .konf { flex: none; }
.feld > input, .feld > select, .feld > div > select { height: 40px; }
.feld textarea { min-height: 40px; }
input[type=date] { height: 40px; }
.radios { gap: 10px 22px; }
.radios label { white-space: nowrap; }
.umschalter label { white-space: nowrap; }

/* Aktionsleiste: alle Knöpfe 38px hoch, Rückweg als Link mit Pfeil */
.aktionsleiste > button, .aktionsleiste .split > button { height: 38px; }
.aktionsleiste #b-zurueck { display: inline-flex; align-items: center; gap: 4px; color: var(--text); font-weight: 500; }
.aktionsleiste #b-zurueck svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.aktionsleiste #b-zurueck:hover { color: var(--marke); }
#b-mehr { width: 42px; padding: 0; letter-spacing: 1px; }

/* Abgelehnt-Box */
.naechster.fehler { background: #fdecea; color: #7a1a12; border-color: #f4c7c1; }

/* Kontokarte und Summen */
.kontokarte { display: flex; flex-direction: column; gap: 2px; }
.kontokarte > span { color: var(--blass); font-size: 12.5px; }
.summen div span { color: var(--blass); }

/* Buchungsvorschau: Tabelle bleibt in der Karte */
.vorschau { overflow: hidden; }
.vorschau h3 { color: var(--text); }
.vorschau table { display: block; overflow-x: auto; font-size: 12.5px; }
.vorschau th, .vorschau td { padding: 8px 10px; }
.vorschau td:nth-child(6) { min-width: 220px; white-space: normal; }

/* Einfache Tabellen: Inhalt mittig zur Zeile (Löschen-Knopf steht auf Texthöhe) */
table:not(.liste):not(.pruef) td { vertical-align: middle; }
.chip { padding: 4px 10px; }

/* Protokoll */
.protokoll { padding-left: 16px; }
.protokoll li .klein { font-variant-numeric: tabular-nums; margin-right: 4px; }

@media (max-width: 1000px) { main > table { display: block; overflow-x: auto; } }

/* Mehrfachauswahl */
th.wahl, td.wahl { width: 40px; padding-left: 14px !important; padding-right: 0 !important; cursor: pointer; }
td.wahl input, th.wahl input { width: 17px; height: 17px; margin: 0; cursor: pointer; accent-color: var(--marke); vertical-align: middle; }
tbody tr.gewaehlt { background: #eef5fc; }
tbody tr.gewaehlt:hover { background: #e5effa; }
.auswahlleiste { position: sticky; top: 8px; z-index: 6; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; background: var(--karte); border: 1px solid #c9dcf0; box-shadow: 0 6px 20px rgba(28,36,48,.10); border-radius: var(--radius); padding: 10px 14px; margin-bottom: 12px; }
.auswahlleiste b { margin-right: auto; }
.auswahlleiste button { height: 36px; }
button.ohne-rahmen { border-color: transparent; background: none; color: var(--blass); }
button.ohne-rahmen:hover:not(:disabled) { color: var(--text); border-color: transparent; }
button.gefahr-voll { background: #b42318; border-color: #b42318; color: #fff; font-weight: 600; }
button.gefahr-voll:hover { background: #912018; }
.formular > * { min-width: 0; }
@media (max-width: 1000px) { .formular.objektform { grid-template-columns: minmax(0,1fr) minmax(0,1fr); } }

/* E-Mail-Dialog */
.mailform { display: flex; flex-direction: column; gap: 6px; }
.mailform h3 { margin: 0 0 2px; font-size: 18px; }
.mailform label { font-size: 12.5px; color: #475467; font-weight: 500; margin-top: 8px; }
.mailform input, .mailform textarea { width: 100%; font-family: inherit; font-size: 14px; }
.mailform textarea { line-height: 1.45; resize: vertical; }

.box-aktion { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 10px; }
.box-aktion button { height: 36px; background: #fff; border-color: #e7b3ac; color: #7a1a12; font-weight: 600; }
.box-aktion button:hover:not(:disabled) { border-color: #b42318; }
.box-aktion .klein { color: #7a1a12; opacity: .85; }

/* Aktionsleiste bleibt einzeilig, auch bei Browser-Zoom: Texte kürzen sich nach verfügbarer Breite */
.erfassung { container-type: inline-size; }
.aktionsleiste { flex-wrap: nowrap; }
.aktionsleiste > *, .aktionsleiste .split > button { flex: none; white-space: nowrap; }
.aktionsleiste .kurz { display: none; }
@container (max-width: 620px) { .aktionsleiste #b-speichern .lang { display: none; } .aktionsleiste #b-speichern .kurz { display: inline; } }
@container (max-width: 470px) { .aktionsleiste #b-zurueck .lang { display: none; } .aktionsleiste > button { padding-left: 10px; padding-right: 10px; } }
.umschalter { flex-wrap: wrap; }

input.pflicht-fehlt { border-color: #b42318 !important; outline: 3px solid #fdecea !important; }
input.pflicht-fehlt::placeholder { color: #b42318; }
/* Buchungsvorschau: Tabelle passt in die Karte, Buchungstext bricht um */
.vorschau table { display: table; width: 100%; table-layout: auto; }
.vorschau td:nth-child(6) { min-width: 0; white-space: normal; overflow-wrap: anywhere; }
.vorschau th, .vorschau td { white-space: nowrap; }
.vorschau td:nth-child(6), .vorschau th:nth-child(6) { white-space: normal; }
.vorschau-tabelle { overflow-x: auto; border-radius: 8px; }
.vorschau td:nth-child(6) { min-width: 190px; overflow-wrap: break-word; }
.vorschau td:nth-child(3), .vorschau td:nth-child(4) { white-space: normal; min-width: 70px; }
.vorschau tr.vorschau-text td { white-space: normal !important; min-width: 0 !important; padding-top: 0; color: var(--text); }
.vorschau tbody tr:not(.vorschau-text) td { border-bottom: 0; }
.vorschau td:nth-child(6) { min-width: 0; }
.vorschau th, .vorschau td { padding: 7px 7px; } .vorschau th:first-child, .vorschau td:first-child { padding-left: 10px; }
@container (max-width: 600px) { .vorschau table { font-size: 11.5px; } .vorschau th, .vorschau td { padding: 6px 5px; } }

.upload-fehler { display: flex; gap: 16px; justify-content: space-between; align-items: flex-start; background: #fdecea; color: #7a1a12; border: 1px solid #f4c7c1; border-radius: var(--radius); padding: 12px 16px; margin-bottom: 12px; }
.upload-fehler ul { margin: 6px 0 0; padding-left: 18px; }
.upload-fehler li { margin: 3px 0; }
.upload-fehler .dateiname { font-weight: 600; overflow-wrap: anywhere; }
/* Sehr breite Bildschirme: Inhalt nicht endlos strecken */
main { max-width: 1840px; }
/* Ausgehend/Eingehend mittig zur Betragszeile */
.feld > .umschalter { min-height: 40px; padding-top: 0; align-items: center; }

tbody tr:focus-visible { outline: 2px solid var(--marke); outline-offset: -2px; background: #eef5fc; }
.sk:focus-visible { outline: 2px solid var(--marke); outline-offset: -2px; border-radius: var(--radius); }
/* Kontrast (WCAG AA): Stempel und Zähler in der Seitenleiste */
.stempel { color: #255f96; }
.seite nav b { background: #fff; color: #255f96; font-weight: 700; }
/* Nachtlauf Z1: Übersicht für die Freigabe */
.naechster dl.uebersicht { display: grid; grid-template-columns: max-content 1fr; gap: 2px 14px; margin: 8px 0 0; }
.naechster dl.uebersicht dt { color: inherit; }
.naechster dl.uebersicht dd { margin: 0; font-weight: 600; overflow-wrap: anywhere; }
/* Nachtlauf Z5: Beim Springen zu Schritt oder Feld nicht unter der festen Knopfleiste landen */
[id^="schritt-"], .sk, .feld input, .feld select, .feld textarea { scroll-margin-top: 96px; scroll-margin-bottom: 24px; }
/* Prüfpunkt-Links: Klickfläche mindestens 24 px hoch */
.naechster ul a { display: inline-block; padding: 4px 0; }
.naechster .zuvor { display: block; margin-top: 4px; font-weight: 600; }
/* Nachtlauf Z13: Meldung per Klick schließbar (die bleibende Fehlermeldung darf nichts dauerhaft verdecken) */
.meldung { cursor: pointer; }
@media (max-width: 700px) { .meldung { bottom: auto; top: 12px; max-width: calc(100vw - 32px); } }
/* Anmeldung (Server) */
.anmeldung { position: fixed; inset: 0; z-index: 60; display: grid; place-items: center; background: var(--marke); padding: 16px; }
body.abgemeldet .seite, body.abgemeldet main { visibility: hidden; }
.anmelde-karte { width: min(380px, 100%); background: #fff; border-radius: 14px; padding: 28px 28px 22px; display: flex; flex-direction: column; gap: 6px; box-shadow: 0 18px 50px rgba(0,0,0,.22); }
.anmelde-kopf { display: flex; gap: 12px; align-items: center; margin-bottom: 14px; color: var(--marke); }
.anmelde-kopf .lnx { width: 42px; height: 28px; fill: none; stroke: currentColor; stroke-width: 4.2; stroke-linecap: round; }
.anmelde-kopf b { display: block; font-size: 17px; color: var(--text); }
.anmelde-kopf small { color: var(--blass); font-size: 12px; }
.anmelde-karte h1 { font-size: 20px; margin: 0 0 8px; }
.anmelde-karte label { font-size: 13px; color: var(--blass); margin-top: 6px; }
.anmelde-karte button[type=submit] { margin-top: 14px; padding: 11px; }
.an-fehler { color: var(--fehler); font-size: 13px; margin: 6px 0 0; }
.an-hilfe { margin: 10px 0 0; }
.nutzer.fest { cursor: default; grid-template-columns: 34px 1fr; }
.nutzer.fest .nutzer-pfeil { display: none; }
.nutzer.fest:hover { background: none; }
.abmelden { margin: 4px 10px 0; background: transparent; color: #fff; border: 1px solid rgba(255,255,255,.5); padding: 5px 10px; font-size: 12.5px; }
.abmelden:hover { background: rgba(255,255,255,.14); }
.anmeldung[hidden] { display: none; }
