:root {
  --bg: #f5f7fa; --karte: #ffffff; --text: #1d2733; --gedaempft: #5b6877; --linie: #d8dee6;
  --akzent: #1f5fae; --akzent-text: #ffffff; --offen: #1f5fae; --kuerzung: #b26a00; --ablehnung: #b3261e; --ok: #1e7a3c;
}
@media (prefers-color-scheme: dark) {
  :root { --bg: #14181e; --karte: #1c222a; --text: #e6ebf1; --gedaempft: #9aa7b6; --linie: #323b47; --akzent: #6aa6ec; --akzent-text: #0e1620;
          --offen: #6aa6ec; --kuerzung: #e0a24a; --ablehnung: #ef8a82; --ok: #62c283; }
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text); font: 15px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
.kopf { background: var(--karte); border-bottom: 1px solid var(--linie); }
.kopf-innen { max-width: 1800px; margin: 0 auto; padding: 12px 16px; display: flex; gap: 16px; align-items: baseline; }
.marke { font-weight: 700; font-size: 18px; }
.titel { color: var(--gedaempft); }
.inhalt { max-width: 1800px; margin: 0 auto; padding: 16px; }
h1 { margin: 8px 0 4px; font-size: 24px; }
.hinweis { color: var(--gedaempft); max-width: 90ch; margin: 4px 0 12px; }
.meldung { min-height: 1.5em; margin: 4px 0 8px; font-weight: 600; }
.meldung.fehler { color: var(--ablehnung); }
.meldung.ok { color: var(--ok); }
.werkzeuge { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
input, select, button { font: inherit; color: inherit; }
input[type="search"], select, input.betrag { padding: 8px 10px; border: 1px solid var(--linie); border-radius: 8px; background: var(--karte); }
input[type="search"] { flex: 1 1 280px; max-width: 480px; }
button { padding: 8px 12px; border: 1px solid var(--linie); border-radius: 8px; background: var(--karte); cursor: pointer; }
button.haupt { background: var(--akzent); color: var(--akzent-text); border-color: var(--akzent); }
button:disabled { opacity: .55; cursor: default; }
:focus-visible { outline: 2px solid var(--akzent); outline-offset: 2px; }
.kennzahlen { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 12px; }
.kennzahl { background: var(--karte); border: 1px solid var(--linie); border-radius: 10px; padding: 10px 16px; min-width: 150px; }
.kennzahl .wert { font-size: 20px; font-weight: 700; }
.kennzahl .text { color: var(--gedaempft); font-size: 13px; }
.tabelle-rahmen { overflow-x: auto; background: var(--karte); border: 1px solid var(--linie); border-radius: 10px; }
table { border-collapse: collapse; width: 100%; font-size: 13px; }
th, td { padding: 6px 8px; border-bottom: 1px solid var(--linie); text-align: left; vertical-align: middle; white-space: nowrap; }
th { position: sticky; top: 0; background: var(--karte); font-weight: 600; font-size: 12px; white-space: normal; vertical-align: bottom; line-height: 1.25; }
th.zahl, td.zahl { min-width: 78px; }
th.sortierbar { cursor: pointer; user-select: none; }
th.sortierbar:hover { text-decoration: underline; }
.sortpfeil { color: var(--akzent); }
th.zahl, td.zahl { text-align: right; font-variant-numeric: tabular-nums; }
tr.art-offen td:first-child { border-left: 4px solid var(--offen); }
tr.art-kuerzung td:first-child { border-left: 4px solid var(--kuerzung); }
tr.art-bezahlt td:first-child { border-left: 4px solid var(--ok); }
tr.art-ablehnung td:first-child { border-left: 4px solid var(--ablehnung); }
tr.bezahlt td { color: var(--gedaempft); }
tr.bezahlt td:last-child, tr.bezahlt td:nth-last-child(2) { color: var(--text); }
tfoot td { font-weight: 700; }
.reiter { display: flex; gap: 4px; margin: 0 0 14px; border-bottom: 1px solid var(--linie); }
.reiter button { border: 0; border-bottom: 3px solid transparent; border-radius: 0; background: none; padding: 9px 16px; font-weight: 600; color: var(--gedaempft); }
.reiter button[aria-selected="true"] { color: var(--text); border-bottom-color: var(--akzent); }
#nbTabelle tr.nb-offen td:first-child { border-left: 4px solid var(--kuerzung); }
#nbTabelle tr:not(.nb-offen) td:first-child { border-left: 4px solid var(--ok); }
input.betrag { width: 100px; text-align: right; }
.aktion { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.klein { color: var(--gedaempft); font-size: 12px; }
dialog { width: min(640px, calc(100vw - 32px)); border: 1px solid var(--linie); border-radius: 12px; background: var(--karte); color: var(--text); padding: 20px; }
dialog::backdrop { background: rgba(0, 0, 0, .45); }
dialog h2 { margin: 0 0 4px; font-size: 18px; }
dialog label { display: block; font-weight: 600; margin: 8px 0 4px; }
dialog textarea { width: 100%; padding: 8px 10px; border: 1px solid var(--linie); border-radius: 8px; background: var(--bg); font: inherit; color: inherit; resize: vertical; }
.knoepfe { display: flex; gap: 8px; justify-content: flex-end; margin-top: 12px; }
.notizen { list-style: none; margin: 0 0 8px; padding: 0; display: grid; gap: 8px; max-height: 40vh; overflow: auto; }
.notizen li { border: 1px solid var(--linie); border-radius: 8px; padding: 8px 10px; }
.notiztext { white-space: pre-wrap; overflow-wrap: anywhere; }
/* Spaltenbreiten: Text darf umbrechen, damit alle Spalten bis zur Notiz auf einen normalen Bildschirm passen */
td.text { white-space: normal; min-width: 130px; max-width: 200px; overflow-wrap: anywhere; }
.fix-eingabe { min-width: 112px; }
.fix-datum { min-width: 130px; }
input.datum { padding: 7px 8px; border: 1px solid var(--linie); border-radius: 8px; background: var(--karte); width: 130px; }
.fix-aktion { min-width: 130px; }
.fix-notiz { min-width: 64px; }
@media (max-width: 700px) { .inhalt { padding: 12px; } h1 { font-size: 20px; } }
