/* Rechnungen – Oberfläche */
:root {
	--hintergrund: #f4f5f7;
	--flaeche: #ffffff;
	--text: #1f2328;
	--leise: #6a737d;
	--rand: #d8dce1;
	--primaer: #1f5f99;
	--primaer-hover: #174a78;
	--ok: #1a7f37;
	--warnung: #9a6700;
	--fehler: #c62828;
	--radius: 6px;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

body {
	margin: 0;
	font: 15px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
	color: var(--text);
	background: var(--hintergrund);
}

h1 { font-size: 1.4rem; margin: 0 0 1rem; }
h2 { font-size: 1.1rem; margin: 1.2rem 0 .6rem; }

/* Kopfzeile */
.kopf {
	display: flex; flex-wrap: wrap; align-items: center; gap: .5rem 1rem;
	padding: .6rem 1rem; background: var(--primaer); color: #fff;
}
.kopf .marke { color: #fff; font-weight: 600; font-size: 1.1rem; margin-right: auto; }
.kopf .hauptmenue { display: flex; flex-wrap: wrap; align-items: center; gap: .25rem 1.4rem; margin-right: auto; }
.kopf .hauptmenue a { color: #dce8f3; text-decoration: none; font-size: 1.05rem; padding: .15rem 0; border-bottom: 2px solid transparent; }
.kopf .hauptmenue a:hover { color: #fff; }
.kopf .hauptmenue a.aktiv { color: #fff; border-bottom-color: #fff; }
.kopf-rechts { display: flex; align-items: center; gap: .75rem; }
.kopf .abmelden { margin: 0; }
.kopf .abmelden button { background: transparent; border: 1px solid #9fc0de; color: #fff; padding: .2rem .6rem; }

/* Menü „Einstellungen“ */
.einstellungen { position: relative; }
.einstellungen summary { list-style: none; cursor: pointer; color: #dce8f3; padding: .2rem .1rem; }
.einstellungen summary::-webkit-details-marker { display: none; }
.einstellungen summary::after { content: " ▾"; font-size: .8em; }
.einstellungen summary:hover, .einstellungen[open] summary, .einstellungen.aktiv summary { color: #fff; }
.einstellungen.aktiv summary { text-decoration: underline; }
.einstellungen-liste {
	position: absolute; right: 0; top: calc(100% + .45rem); z-index: 50; min-width: 17rem;
	display: flex; flex-direction: column; padding: .4rem 0;
	background: var(--flaeche); border: 1px solid var(--rand); border-radius: var(--radius);
	box-shadow: 0 6px 18px rgba(0, 0, 0, .15);
}
.einstellungen-liste .wer { margin: 0 0 .3rem; padding: .3rem 1rem .5rem; border-bottom: 1px solid var(--rand); color: var(--leise); font-size: .9rem; }
.einstellungen-liste .wer strong { color: var(--text); font-weight: 600; }
.einstellungen-liste a { color: var(--text); text-decoration: none; padding: .45rem 1rem; }
.einstellungen-liste a:hover, .einstellungen-liste a:focus { background: var(--hintergrund); }
.einstellungen-liste a.aktiv { color: var(--primaer); font-weight: 600; }

main { padding: 1rem; max-width: 1200px; margin: 0 auto; }

.karte { background: var(--flaeche); border: 1px solid var(--rand); border-radius: var(--radius); padding: 1.25rem; }
.karte.schmal { max-width: 420px; margin: 2rem auto; }

.titelzeile { display: flex; justify-content: space-between; align-items: center; gap: 1rem; margin-bottom: 1rem; }
.titelzeile h1 { margin: 0; }

/* Formulare */
label { display: block; margin-bottom: .9rem; font-weight: 500; }
label small { font-weight: 400; color: var(--leise); }
input[type=text], input[type=password], input[type=email], input[type=date], input[type=number], input[type=search], select, textarea {
	display: block; width: 100%; margin-top: .25rem; padding: .5rem .6rem;
	font: inherit; border: 1px solid var(--rand); border-radius: var(--radius); background: #fff;
}
input:focus, select:focus, textarea:focus { outline: 2px solid #9fc0de; border-color: var(--primaer); }
input[readonly] { background: var(--hintergrund); color: var(--leise); }
label.checkbox { font-weight: 400; display: flex; gap: .5rem; align-items: center; }
label.checkbox input { margin: 0; }
label.zeile { display: flex; align-items: center; justify-content: space-between; gap: 1rem; font-weight: 400; }
label.zeile select { width: auto; min-width: 10rem; margin: 0; }
fieldset { border: 1px solid var(--rand); border-radius: var(--radius); padding: .75rem 1rem .25rem; margin: 0 0 1rem; }
legend { padding: 0 .3rem; font-weight: 600; }
.feld-mit-knopf { display: flex; gap: .5rem; align-items: stretch; margin-top: .25rem; }
.feld-mit-knopf input { margin: 0; }

button {
	font: inherit; cursor: pointer; padding: .45rem .9rem;
	border: 1px solid var(--rand); border-radius: var(--radius); background: #fff; color: var(--text);
}
button:hover { background: var(--hintergrund); }
button:disabled { opacity: .6; cursor: default; }
button.primaer { background: var(--primaer); border-color: var(--primaer); color: #fff; }
button.primaer:hover { background: var(--primaer-hover); }
button.gefahr { color: var(--fehler); }
.knopfleiste { display: flex; justify-content: flex-end; gap: .5rem; margin-top: 1rem; }

/* Hinweise */
.hinweis { background: #eef5fb; border-left: 3px solid var(--primaer); padding: .5rem .75rem; }
.fehler { color: var(--fehler); }
p.fehler { background: #fdeeee; border-left: 3px solid var(--fehler); padding: .5rem .75rem; }
.leise { color: var(--leise); }
.marke-klein { display: inline-block; font-size: .8rem; padding: 0 .45rem; border-radius: 999px; background: var(--hintergrund); border: 1px solid var(--rand); }
.marke-klein.ok { color: var(--ok); border-color: #a6d8b4; background: #eefaf1; }
.marke-klein.warnung { color: var(--warnung); border-color: #e6cc80; background: #fff8e1; }
.marke-klein.fehler { color: var(--fehler); border-color: #f0b0b0; background: #fdeeee; }
.marke-klein.su { color: var(--primaer); border-color: #9fc0de; background: #eef5fb; }
ul.liste { padding-left: 1.2rem; }

.meldung {
	position: fixed; left: 50%; bottom: 1.25rem; transform: translateX(-50%); z-index: 100;
	max-width: calc(100% - 2rem); padding: .6rem 1rem; border-radius: var(--radius);
	color: #fff; box-shadow: 0 4px 16px rgba(0,0,0,.2);
}
.meldung.ok { background: var(--ok); }
.meldung.fehler { background: var(--fehler); color: #fff; }

/* Tabellen */
.tabelle { width: 100%; border-collapse: collapse; }
.tabelle th, .tabelle td { text-align: left; padding: .55rem .5rem; border-bottom: 1px solid var(--rand); vertical-align: top; }
.tabelle th { font-size: .85rem; color: var(--leise); font-weight: 600; }
.tabelle td.aktionen { white-space: nowrap; text-align: right; }
.tabelle td.aktionen button { padding: .25rem .55rem; font-size: .85rem; margin-left: .25rem; }

/* Dialoge */
.dialog-hintergrund {
	position: fixed; inset: 0; z-index: 50; background: rgba(20, 30, 40, .45);
	display: flex; align-items: flex-start; justify-content: center; padding: 3rem 1rem; overflow-y: auto;
}
.dialog-hintergrund[hidden] { display: none; }
.dialog { background: var(--flaeche); border-radius: var(--radius); padding: 1.25rem; width: 100%; max-width: 520px; }
.dialog h2 { margin-top: 0; }

/* Handy: Tabellen werden zu Karten, Dialoge ganzseitig */
@media (max-width: 720px) {
	.kopf { padding: .5rem .75rem; }
	.kopf .hauptmenue { gap: .25rem 1rem; }
	.kopf .hauptmenue a { font-size: 1rem; }
	.kopf-rechts { margin-left: auto; }
	main { padding: .5rem; }
	.karte { padding: 1rem; }
	.tabelle thead { display: none; }
	.tabelle, .tabelle tbody, .tabelle tr, .tabelle td { display: block; width: 100%; }
	.tabelle tr { border: 1px solid var(--rand); border-radius: var(--radius); margin-bottom: .75rem; padding: .5rem .75rem; }
	.tabelle td { border: 0; padding: .2rem 0; }
	.tabelle td[data-titel]::before { content: attr(data-titel); display: block; font-size: .75rem; color: var(--leise); }
	.tabelle td.aktionen { text-align: left; white-space: normal; padding-top: .5rem; }
	.tabelle td.aktionen button { margin: 0 .25rem .25rem 0; }
	.dialog-hintergrund { padding: 0; }
	.dialog { max-width: none; min-height: 100%; border-radius: 0; }
	label.zeile { flex-direction: column; align-items: stretch; gap: .25rem; }
	label.zeile select { width: 100%; }
}

/* ---------- Übersicht (Etappe 3) ---------- */
body.breit main { max-width: none; }

.filter {
	display: flex; flex-wrap: wrap; align-items: flex-end; gap: .5rem .9rem;
	background: var(--flaeche); border: 1px solid var(--rand); border-radius: var(--radius);
	padding: .75rem 1rem; margin-bottom: 1rem;
}
.filter label { margin: 0; font-size: .85rem; color: var(--leise); }
.filter select, .filter input[type=date], .filter input[type=search], .filter input[type=text] { min-width: 9rem; padding: .35rem .5rem; color: var(--text); }
.filter label.breit input { min-width: 16rem; }
.filter label.betrag input { min-width: 0; width: 7rem; }
.filter label.checkbox { color: var(--text); font-size: .9rem; padding-bottom: .4rem; }
.filter .schalter-vorschau { margin-left: auto; }

.arbeitsbereich { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1rem; align-items: start; }
.arbeitsbereich.mit-vorschau { grid-template-columns: minmax(0, 1fr) minmax(340px, 34%); }
#liste { font-size: .9rem; }
#liste td { white-space: nowrap; }
#liste td.spalte-lieferant { white-space: normal; min-width: 10rem; }
#liste td.spalte-nummer { white-space: normal; word-break: break-word; max-width: 11rem; }
/* Datum bricht nie um, auch nicht in der Handy-Ansicht */
.tabelle td.spalte-datum, .datum { white-space: nowrap !important; }
#liste th.status-spalte, #liste td.status-spalte { width: 2.5rem; text-align: center; }
div.dt-container .dt-length label { display: inline; font-weight: 400; margin: 0 0 0 .4rem; }
div.dt-container .dt-length select { display: inline-block; width: auto; }
#liste td .fehlertext { white-space: normal; }
.filter-mehr { display: none; }

/* Mit Vorschau wird es eng: Art und Richtung erst auf großen Bildschirmen */
@media (max-width: 1700px) {
	.mit-vorschau #liste .spalte-art, .mit-vorschau #liste .spalte-richtung { display: none; }
}
.arbeitsbereich .vorschau { display: none; }
.arbeitsbereich.mit-vorschau .vorschau { display: block; position: sticky; top: 1rem; }
.arbeitsbereich.laedt .liste { opacity: .55; transition: opacity .2s; }

.liste { padding: .75rem; overflow-x: auto; }
.zeitraum-text { margin: 0 0 .5rem; font-size: .85rem; }
.tabelle .zahl { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.tabelle .mitte { text-align: center; }
.tabelle tbody tr { cursor: pointer; }
.tabelle tbody tr:hover { background: #f0f5fa; }
.tabelle tbody tr.gewaehlt { background: #e1ecf7; }
.tabelle tr.zeile-fehler td { background: #fff8f6; }
.tabelle tr.zeile-fehler.gewaehlt td { background: #fbe7e2; }
.tabelle tr.zeile-geloescht td { color: var(--leise); text-decoration: line-through; }
.tabelle tr.zeile-geloescht td.status-spalte { text-decoration: none; }
.fehlertext { font-size: .8rem; color: var(--fehler); text-decoration: none; }
.hinweistext { font-size: .8rem; color: var(--leise); }
#liste td .hinweistext { white-space: normal; }

.status { display: inline-flex; align-items: center; justify-content: center; width: 1.4rem; height: 1.4rem; border-radius: 50%; font-size: .8rem; font-weight: 700; color: #fff; }
.status.ok { background: var(--ok); }
.status.fehler { background: var(--fehler); }
.status.stimmig { background: var(--warnung); }
.status.geloescht { background: var(--leise); }
.status-text { display: none; }
.geprueft { color: var(--ok); font-weight: 700; }

.summen { border-top: 2px solid var(--rand); margin-top: .75rem; padding-top: .5rem; }
.summen h2 { font-size: 1rem; margin: 0 0 .5rem; }
.summen-liste { display: grid; grid-template-columns: auto auto; justify-content: end; gap: .2rem 2rem; margin: 0; }
.summen-liste dt { text-align: right; }
.summen-liste dd { margin: 0; text-align: right; font-variant-numeric: tabular-nums; }
.summen-liste .gesamt { font-weight: 700; border-top: 1px solid var(--rand); padding-top: .2rem; }

.vorschau { padding: .75rem; }
.vorschau-kopf { margin-bottom: .5rem; }
.vorschau-kopf p { margin: .4rem 0; }
.vorschau-titel { font-size: 1.05rem; }
.fehler-box { background: #fdeeee; border-left: 3px solid var(--fehler); padding: .4rem .6rem; color: var(--fehler); }
#vorschau-rahmen { width: 100%; height: calc(100vh - 13rem); min-height: 420px; border: 1px solid var(--rand); border-radius: var(--radius); background: #fafafa; }

/* DataTables an das Layout anpassen */
div.dt-container .dt-paging .dt-paging-button { padding: .2rem .6rem; }
div.dt-container .dt-layout-row { margin: .5rem 0; }
table.dataTable > thead > tr > th { border-bottom: 1px solid var(--rand); }

@media (max-width: 1000px) {
	.arbeitsbereich.mit-vorschau { grid-template-columns: minmax(0, 1fr); }
	.arbeitsbereich.mit-vorschau .vorschau { position: static; }
}

@media (max-width: 720px) {
	.filter { padding: .6rem; }
	.filter label, .filter label.breit, .filter label.betrag { flex: 1 1 45%; }
	.filter select, .filter input[type=search], .filter label.breit input, .filter label.betrag input { width: 100%; min-width: 0; }
	.filter .schalter-vorschau { display: none; }
	.arbeitsbereich .vorschau, .arbeitsbereich.mit-vorschau .vorschau { display: none; }
	.filter-mehr { display: block; width: 100%; order: 99; }
	.filter:not(.offen) .mehr { display: none; }
	.liste { padding: .5rem; }
	div.dt-container .dt-length { display: none; }

	/* Belege als kompakte Karten mit zwei Spalten */
	#liste tbody tr { display: grid; grid-template-columns: 1fr 1fr; gap: .15rem .75rem; }
	#liste td { white-space: normal; min-width: 0; }
	#liste td.spalte-lieferant, #liste td.status-spalte { grid-column: 1 / -1; }
	#liste td.status-spalte::before { display: none; }
	#liste td.spalte-art:not(:empty), #liste td.spalte-richtung:not(:empty) { display: block !important; }
	#liste td { text-align: left !important; }
	.status-text { display: inline; margin-left: .4rem; font-weight: 600; }
	.tabelle td.zahl, .tabelle td.mitte { text-align: left; }
	.tabelle td:empty { display: none; }
	.summen-liste { justify-content: stretch; }
}

/* ---------- Bearbeitung (Etappe 4) ---------- */
.unsichtbar { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
button.klein { padding: .2rem .55rem; font-size: .85rem; }

.arbeitsbereich.mit-bearbeitung .liste { display: none; }
.bearbeitung { padding: .9rem 1rem 1rem; }
.bearbeitung.laedt { opacity: .6; transition: opacity .2s; }

.b-kopf { display: flex; align-items: flex-start; gap: .75rem; margin-bottom: .5rem; }
.b-titel { flex: 1; min-width: 0; font-size: 1.05rem; overflow-wrap: anywhere; }
.b-titel .leise { font-size: .85rem; }
.b-blaettern { display: flex; align-items: center; gap: .35rem; white-space: nowrap; }
.b-blaettern button { padding: .2rem .65rem; font-size: 1.1rem; line-height: 1.2; }
.b-blaettern span { font-size: .85rem; min-width: 3.5rem; text-align: center; }
.bearbeitung.ungespeichert .b-titel strong::after { content: " ●"; color: var(--warnung); font-size: .8rem; }

.b-status { display: flex; flex-wrap: wrap; gap: .35rem .5rem; align-items: center; margin-bottom: .5rem; }
.b-status p { flex: 1 1 100%; margin: .2rem 0; }

.reiter { display: flex; align-items: flex-end; gap: .25rem; border-bottom: 1px solid var(--rand); margin-bottom: .9rem; }
.reiter button { border: 1px solid transparent; border-bottom: 0; border-radius: var(--radius) var(--radius) 0 0; background: transparent; color: var(--leise); margin-bottom: -1px; }
.reiter button.aktiv { border-color: var(--rand); background: var(--flaeche); color: var(--text); font-weight: 600; }
.reiter .b-beleg-link { margin-left: auto; font-size: .9rem; padding-bottom: .4rem; }

.b-gruppe { border: 1px solid var(--rand); border-radius: var(--radius); padding: .6rem .9rem .3rem; margin: 0 0 .9rem; }
.b-gruppe legend, .b-gruppe summary { font-weight: 600; padding: 0 .3rem; }
details.b-gruppe { padding: .5rem .9rem; }
details.b-gruppe summary { cursor: pointer; padding: 0; }
details.b-gruppe[open] summary { margin-bottom: .5rem; }
.raster { display: grid; grid-template-columns: repeat(auto-fill, minmax(10.5rem, 1fr)); gap: 0 .9rem; }
.raster label { margin-bottom: .6rem; font-size: .9rem; }
.raster label.breit { grid-column: span 2; }
.b-formular input, .b-formular select { padding: .35rem .5rem; }
.b-formular label small { display: inline; margin-left: .3rem; }
.b-formular.nur-lesen input:disabled, .b-formular.nur-lesen select:disabled { background: var(--hintergrund); color: var(--text); border-color: transparent; opacity: 1; }

.b-brutto { max-width: 14rem; font-size: .9rem; }
.b-brutto input, .steuerzeilen input { text-align: right; font-variant-numeric: tabular-nums; }
.steuerzeilen { border-collapse: collapse; margin-bottom: .4rem; }
.steuerzeilen th { font-size: .8rem; color: var(--leise); font-weight: 600; text-align: right; padding: 0 .3rem .2rem; }
.steuerzeilen td { padding: .15rem .3rem; }
.steuerzeilen td:first-child input { width: 4.5rem; }
.steuerzeilen input { width: 7.5rem; margin: 0; }
.steuerzeilen .z-brutto { background: #fafbfc; }
/* Steuersatz per Klick */
.steuerzeilen td.z-satz-zelle { white-space: nowrap; }
.steuerzeilen td.z-satz-zelle input { display: inline-block; width: 3.6rem; vertical-align: middle; }
.satz-wahl { display: inline-flex; gap: 2px; margin-left: .3rem; vertical-align: middle; }
.satz-wahl[hidden] { display: none; }
button.satz-knopf { padding: .2rem .35rem; min-width: 2rem; font-size: .8rem; line-height: 1.2; font-variant-numeric: tabular-nums; }
button.satz-knopf.aktiv { background: var(--primaer); border-color: var(--primaer); color: #fff; }
.steuerzeilen th:first-child { text-align: left; }
.steuerzeilen.ungueltig { outline: 2px solid var(--fehler); outline-offset: 2px; border-radius: 2px; }
.b-summe { font-size: .85rem; color: var(--leise); margin: .5rem 0 .25rem; font-variant-numeric: tabular-nums; }
.b-summe strong { color: var(--text); font-weight: 600; }
.b-pruefung { font-size: .9rem; margin: .25rem 0 .5rem; }
.b-pruefung.ok { color: var(--ok); }
.b-pruefung.fehler { color: var(--fehler); }

input.ungueltig, select.ungueltig { border-color: var(--fehler); outline-color: #f0b0b0; }
input.warnung-feld { border-color: #d4a72c; background: #fff8e1; }
.feldfehler { display: block; font-size: .8rem; font-weight: 400; color: var(--fehler); margin-top: .15rem; }

.b-info { font-size: .8rem; overflow-wrap: anywhere; }
.b-aktionen { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; margin-top: .5rem; }
.b-aktionen .abstand { flex: 1; }
.b-hinweis { font-size: .8rem; text-align: right; margin: .35rem 0 0; }

.vorschau-knoepfe { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem .75rem; margin-top: .4rem; }
.vorschau-kategorie { display: inline-flex; flex-wrap: wrap; align-items: center; gap: .4rem; font-size: .9rem; }
.vorschau-kategorie .vk-wahl { display: flex; align-items: center; gap: .4rem; margin: 0; font-weight: 600; }
.vorschau-kategorie select { min-width: 0; max-width: 14rem; padding: .2rem .4rem; font-weight: normal; }
.vorschau-kategorie .vk-neu { display: inline-flex; gap: .3rem; align-items: center; }
.vorschau-kategorie .vk-neu[hidden] { display: none; }
.vorschau-kategorie .vk-neu input { width: 12rem; padding: .2rem .4rem; }
.vk-vorschlag { margin: .3rem 0 0; }

/* Historie */
.b-historie { font-size: .9rem; }
.h-eintrag { border-left: 3px solid var(--rand); padding: .2rem 0 .2rem .75rem; margin-bottom: .9rem; }
.h-kopf .leise { margin-left: .3rem; font-size: .85rem; }
.h-werte { border-collapse: collapse; margin-top: .3rem; font-size: .85rem; }
.h-werte th { text-align: left; font-weight: 500; color: var(--leise); padding: .1rem .75rem .1rem 0; vertical-align: top; white-space: nowrap; }
.h-werte td { padding: .1rem .4rem .1rem 0; vertical-align: top; overflow-wrap: anywhere; }
.h-werte .h-alt { color: var(--leise); text-decoration: line-through; }
.h-werte .h-pfeil { color: var(--leise); }
.b-historie details summary { cursor: pointer; color: var(--primaer); font-size: .85rem; }

@media (max-width: 720px) {
	body.bearbeitung-offen .filter { display: none; }
	.bearbeitung { padding: .75rem; }
	.b-kopf { flex-wrap: wrap; }
	.b-kopf #b-schliessen { order: -1; }
	.b-titel { flex: 1 1 100%; order: 2; }
	.b-blaettern { margin-left: auto; }
	.raster { grid-template-columns: 1fr 1fr; }
	.raster label.breit { grid-column: 1 / -1; }
	.steuerzeilen { width: 100%; }
	.steuerzeilen th, .steuerzeilen td { padding: .1rem .15rem; }
	.steuerzeilen input, .steuerzeilen td:first-child input { width: 100%; min-width: 0; padding: .3rem; }
	.steuerzeilen td:first-child { width: 4.6rem; }
	.steuerzeilen td.z-satz-zelle input { display: block; width: 100%; }
	.satz-wahl { display: flex; margin: .2rem 0 0; gap: 1px; }
	button.satz-knopf { flex: 1; min-width: 0; padding: .25rem 0; font-size: .75rem; }
	.steuerzeilen td:last-child { width: 2rem; }
	.b-aktionen button { flex: 1 1 auto; }
	.b-aktionen .abstand { display: none; }
	.b-hinweis { text-align: left; }
}

/* Geprüft-Knopf in der Liste */
.pruef-knopf {
	width: 1.6rem; height: 1.6rem; padding: 0; border-radius: 50%;
	border: 1.5px solid #b8c0c8; background: #fff; color: #b8c0c8; font-weight: 700; line-height: 1;
}
.pruef-knopf:hover, .pruef-knopf:focus-visible { border-color: var(--ok); color: var(--ok); background: #eefaf1; }
.pruef-knopf:disabled { opacity: .5; }

/* ---------- Neue Rechnung und Auslese-Aufträge (Etappe 5) ---------- */
.aktionsleiste { display: flex; flex-wrap: wrap; align-items: flex-start; gap: .5rem 1rem; margin-bottom: .75rem; }
.aktionsleiste #neu-knopf { white-space: nowrap; }
.auftraege { flex: 1; display: flex; flex-direction: column; gap: .35rem; min-width: 0; }
.auftrag {
	display: flex; flex-wrap: wrap; align-items: center; gap: .25rem .75rem;
	background: var(--flaeche); border: 1px solid var(--rand); border-left: 4px solid var(--primaer);
	border-radius: var(--radius); padding: .35rem .6rem; font-size: .9rem;
}
.auftrag.a-fertig { border-left-color: var(--ok); }
.auftrag.a-fehler { border-left-color: var(--fehler); }
.auftrag .a-name { font-weight: 600; max-width: 22rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.auftrag .a-firma { font-size: .85rem; }
.auftrag .a-status { font-size: .85rem; }
.auftrag.a-fertig .a-status { color: var(--ok); font-weight: 600; }
.auftrag.a-fehler .a-status { color: var(--fehler); font-weight: 600; }
.auftrag .a-fehler { flex-basis: 100%; font-size: .8rem; color: var(--fehler); }
.auftrag .a-knoepfe { margin-left: auto; display: flex; gap: .35rem; }
.drehen { width: .9rem; height: .9rem; border: 2px solid #c9d7e5; border-top-color: var(--primaer); border-radius: 50%; animation: drehen 1s linear infinite; }
@keyframes drehen { to { transform: rotate(360deg); } }

#neu-form .raster { display: grid; grid-template-columns: 1fr 1fr; gap: 0 .9rem; }
#neu-form input[type=file] { display: block; margin-top: .35rem; width: 100%; font: inherit; }
fieldset.auswahl label.checkbox { margin-bottom: .4rem; }
fieldset.auswahl small { margin-left: .2rem; }
.fortschritt { height: .5rem; background: var(--hintergrund); border-radius: 999px; overflow: hidden; margin: .5rem 0; }
.fortschritt div { height: 100%; width: 0; background: var(--primaer); transition: width .2s; }
#b-auslesen, #b-verwerfen { white-space: nowrap; }

@media (max-width: 720px) {
	body.bearbeitung-offen .aktionsleiste { display: none; }
	.aktionsleiste #neu-knopf { width: 100%; }
	.auftrag .a-name { max-width: 100%; }
	.auftrag .a-knoepfe { margin-left: 0; flex-basis: 100%; }
	.auftrag .a-knoepfe button { flex: 1; }
	#neu-form .raster { grid-template-columns: 1fr; }
}

/* ---------- Kontoumsätze ---------- */
.knopf-link {
	display: inline-block; padding: .45rem .9rem; border: 1px solid var(--rand); border-radius: var(--radius);
	background: #fff; color: var(--text); text-decoration: none; white-space: nowrap;
}
.knopf-link:hover { background: var(--hintergrund); }
.klein-text { font-size: .85rem; }
.abstand-oben { margin-top: 1rem; }
h2.ohne-abstand { margin-top: 0; }
.betrag-ein { color: var(--ok); }
.betrag-aus { color: var(--text); }
.summen-liste dd.betrag-ein { color: var(--ok); }

#umsatz-liste { font-size: .9rem; }
#umsatz-liste td { white-space: nowrap; }
#umsatz-liste td.spalte-name, #umsatz-liste td.spalte-zweck { white-space: normal; overflow-wrap: anywhere; }
#umsatz-liste td.spalte-zweck { min-width: 16rem; }
#umsatz-liste td.spalte-zweck .marke-klein { white-space: nowrap; }
#umsatz-liste tr.umsatz-detailzeile, #umsatz-liste tr.umsatz-detailzeile:hover { cursor: default; background: #f7f9fb; }
.umsatz-details { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: .15rem 1rem; margin: .25rem .5rem; font-size: .85rem; white-space: normal; }
.umsatz-details dt { color: var(--leise); }
.umsatz-details dd { margin: 0; overflow-wrap: anywhere; }

.einlesen-vorschau p { margin: .4rem 0; }
.einlesen-gruppe { border: 1px solid var(--rand); border-radius: var(--radius); padding: .5rem .75rem; margin-bottom: .6rem; font-size: .9rem; }
.einlesen-gruppe label { margin: .2rem 0 .5rem; }
.einlesen-warnung { font-size: .85rem; color: var(--warnung); margin-bottom: .5rem; }
.einlesen-warnung summary { cursor: pointer; }
.einlesen-warnung ul { margin: .3rem 0; padding-left: 1.2rem; }

#konten-tabelle td.iban { white-space: nowrap; font-variant-numeric: tabular-nums; }
.tabelle tr.zeile-inaktiv td { color: var(--leise); }
.tabelle td.umbruch { overflow-wrap: anywhere; }
#konten-tabelle tbody tr, #importe-tabelle tbody tr { cursor: default; }
#konten-tabelle tbody tr:hover, #importe-tabelle tbody tr:hover { background: transparent; }

@media (max-width: 720px) {
	.aktionsleiste .knopf-link { width: 100%; text-align: center; }
	#umsatz-liste tbody tr:not(.umsatz-detailzeile) { display: grid; grid-template-columns: 1fr auto; gap: .15rem .75rem; }
	#umsatz-liste td { white-space: normal; min-width: 0 !important; border: 0 !important; }
	#umsatz-liste td.spalte-name, #umsatz-liste td.spalte-zweck { grid-column: 1 / -1; }
	#umsatz-liste td.zahl { text-align: right !important; }
	.umsatz-details { grid-template-columns: 1fr; }
}

/* ---------- Abgleich ---------- */
.ansichten { display: flex; gap: .25rem; border-bottom: 1px solid var(--rand); margin-bottom: .75rem; }
.ansichten button { border: 1px solid transparent; border-bottom: 0; border-radius: var(--radius) var(--radius) 0 0; background: transparent; color: var(--leise); margin-bottom: -1px; }
.ansichten button.aktiv { border-color: var(--rand); background: var(--flaeche); color: var(--text); font-weight: 600; }

.status.abg-offen { background: #fff; color: #9aa4ae; border: 1.5px solid #b8c0c8; }
.status.abg-teilweise { background: #fff8e1; color: var(--warnung); border: 1.5px solid #d4a72c; }
#umsatz-liste th.status-spalte, #umsatz-liste td.status-spalte { width: 2.5rem; text-align: center; }
#umsatz-liste td.spalte-abgleich { white-space: normal; min-width: 9rem; font-size: .85rem; }
.schnell-vorschlag { display: flex; align-items: center; gap: .4rem; }
.schnell-vorschlag span { color: var(--primaer); }
.vorschlag-knopf { flex: none; }

.arbeitsbereich.mit-abgleich { grid-template-columns: minmax(0, 1fr) minmax(360px, 32%); }
@media (max-width: 1500px) {
	.mit-abgleich #umsatz-liste .spalte-abgleich { display: none; }
}
.abgleich { padding: .9rem 1rem; position: sticky; top: 1rem; max-height: calc(100vh - 2rem); overflow-y: auto; font-size: .9rem; }
.abgleich.laedt { opacity: .6; }
.abgleich h3 { font-size: .95rem; margin: 1rem 0 .4rem; }
.ab-kopf { position: relative; padding-right: 2rem; margin-bottom: .5rem; }
.ab-betrag { font-size: 1.4rem; font-weight: 600; font-variant-numeric: tabular-nums; }
.ab-schliessen { position: absolute; right: 0; top: 0; padding: .1rem .55rem; font-size: 1.2rem; line-height: 1.2; }
.abgleich .umsatz-details { margin: .25rem 0 .5rem; }
.ab-status { border-radius: var(--radius); padding: .4rem .6rem; margin: .5rem 0; }
.ab-status.offen { background: #fff8e1; border-left: 3px solid #d4a72c; }
.ab-status.teilweise { background: #fff8e1; border-left: 3px solid #d4a72c; }
.ab-status.erledigt { background: #eefaf1; border-left: 3px solid var(--ok); color: var(--ok); font-weight: 600; }
.ab-liste { list-style: none; margin: 0; padding: 0; }
.ab-liste li { display: flex; gap: .5rem; justify-content: space-between; align-items: flex-start; padding: .45rem 0; border-bottom: 1px solid var(--rand); }
.ab-liste li.ab-sicher { background: #f3f8fd; margin: 0 -.5rem; padding: .45rem .5rem; border-radius: var(--radius); }
.ab-text { min-width: 0; overflow-wrap: anywhere; }
.ab-rechts { display: flex; flex-direction: column; align-items: flex-end; gap: .3rem; white-space: nowrap; font-variant-numeric: tabular-nums; }
.ab-hinweis { font-size: .85rem; color: var(--warnung); margin-top: .2rem; }
.ab-teilbetrag { font-size: .85rem; margin: .5rem 0 0; max-width: 16rem; }
.ab-teilbetrag input { padding: .3rem .5rem; }
#ab-suche { margin: 0 0 .25rem; padding: .35rem .5rem; }
.ab-erklaeren { display: grid; gap: .4rem; }
.ab-erklaeren select, .ab-erklaeren input { margin: 0; padding: .35rem .5rem; }
.ab-erklaeren button { justify-self: start; }
.ab-historie { margin-top: 1rem; font-size: .85rem; }
.ab-historie summary { cursor: pointer; color: var(--primaer); }
.ab-historie ul { padding-left: 1rem; }
.tabelle tr.ueberfaellig td:nth-child(n) { color: var(--fehler); }
#offene-liste tbody tr { cursor: default; }

.zeile-form { display: flex; gap: .5rem; align-items: center; margin-bottom: .75rem; }
.zeile-form input { margin: 0; max-width: 22rem; }
.erklaerungen-liste { list-style: none; padding: 0; margin: 0; }
.erklaerungen-liste li { display: flex; flex-wrap: wrap; align-items: center; gap: .3rem .5rem; padding: .35rem 0; border-bottom: 1px solid var(--rand); }
.erklaerungen-liste li.inaktiv .e-text { color: var(--leise); }
.erklaerungen-liste .e-knoepfe { margin-left: auto; display: flex; gap: .3rem; }
.erklaerungen-liste .zeile-form { margin: 0; flex: 1; }
#erklaerungen-firma { width: auto; margin: 0; }

@media (max-width: 1000px) {
	.arbeitsbereich.mit-abgleich { grid-template-columns: minmax(0, 1fr); }
	.abgleich { position: fixed; inset: 0; z-index: 40; max-height: none; border-radius: 0; }
	body.abgleich-offen { overflow: hidden; }
}
@media (max-width: 720px) {
	.ansichten button { flex: 1; }
	#umsatz-liste td.status-spalte { grid-column: 1 / -1; }
	#umsatz-liste td.spalte-abgleich:empty { display: none; }
	.zeile-form { flex-wrap: wrap; }
	.erklaerungen-liste .e-knoepfe { margin-left: 0; }
}
.hinweis.warnung-box { background: #fff8e1; border-left-color: #d4a72c; margin-bottom: 1rem; }
.hinweis code { font-size: .85em; }
.hinweis p, .hinweis ul { margin: .25rem 0; }
.hinweis ul { padding-left: 1.25rem; }

/* ---------- Etappe 6: Ablage, Zielordner, Export, Lieferanten ---------- */
.link-knopf { background: none; border: 0; padding: 0; color: var(--primaer); text-decoration: underline; cursor: pointer; font: inherit; }
.link-knopf:hover { color: var(--primaer-hover); }
.b-ablage { font-size: .85rem; color: var(--leise); }
#ablage-ordner label.spaeter { margin-top: .3rem; padding-top: .4rem; border-top: 1px solid var(--rand); }
#ablage-pfad { margin: .25rem 0 0; min-height: 1.2em; overflow-wrap: anywhere; }
.dialog.breit { max-width: 900px; }
.umzug-liste { max-height: 50vh; overflow-y: auto; margin-bottom: .75rem; }
.umzug-liste .tabelle { font-size: .85rem; }
.umzug-hinweis button { margin-top: .4rem; }
.ziel-tabelle td.nr { width: 2rem; }
.ziel-tabelle tbody tr { cursor: default; }
.ziel-tabelle tbody tr:hover { background: transparent; }
.ziel-tabelle td.aktionen button[data-aktion=hoch], .ziel-tabelle td.aktionen button[data-aktion=runter] { padding: .2rem .5rem; }
.liste-kopf { display: flex; justify-content: space-between; align-items: baseline; gap: .5rem; }
.liste-kopf .zeitraum-text { margin-bottom: .5rem; }
.liste-kopf #export-knopf { flex: none; }
.lieferant-feld { position: relative; }
.vorschlaege { position: absolute; left: 0; right: 0; top: 100%; z-index: 30; margin-top: 2px; max-height: 18rem; overflow-y: auto;
	background: var(--flaeche); border: 1px solid var(--rand); border-radius: var(--radius); box-shadow: 0 6px 18px rgba(0, 0, 0, .12); font-weight: 400; }
.vorschlaege .vorschlag { display: block; padding: .4rem .6rem; cursor: pointer; border-bottom: 1px solid var(--rand); }
.vorschlaege .vorschlag:last-child { border-bottom: 0; }
.vorschlaege .vorschlag small { display: block; color: var(--leise); }
.vorschlaege .vorschlag:hover, .vorschlaege .vorschlag.aktiv { background: #eef5fb; }

/* ---------- Verbesserungen 2: Mehrfachauswahl im Abgleich ---------- */
#umsatz-liste th.status-spalte, #umsatz-liste td.status-spalte { width: 4rem; white-space: nowrap; }
.u-wahl { display: inline-flex; align-items: center; justify-content: center; margin: 0; padding: .3rem; vertical-align: middle; cursor: pointer; font-weight: 400; }
.u-wahl input { width: 1.05rem; height: 1.05rem; margin: 0; cursor: pointer; }
.tabelle tbody tr.markiert { background: #e8f1fb; }
.tabelle tbody tr.markiert.gewaehlt { background: #d6e6f6; }

.mehrfach {
	position: fixed; z-index: 30; left: 50%; bottom: 1rem; transform: translateX(-50%);
	width: min(60rem, calc(100% - 2rem)); display: flex; flex-wrap: wrap; align-items: center; gap: .5rem .75rem;
	background: var(--flaeche); border: 1px solid var(--primaer); border-radius: var(--radius);
	box-shadow: 0 6px 24px rgba(0, 0, 0, .18); padding: .75rem 1rem;
}
.mehrfach-info { flex: 1 1 100%; }
.mehrfach select, .mehrfach input { flex: 1 1 12rem; width: auto; margin: 0; padding: .4rem .5rem; }
.mehrfach-knoepfe { display: flex; gap: .5rem; }
body.mit-mehrfach main { padding-bottom: 9rem; }

@media (max-width: 720px) {
	.mehrfach { bottom: 0; width: 100%; border-radius: 0; border-width: 1px 0 0; padding: .6rem .75rem; }
	.mehrfach select, .mehrfach input, .mehrfach-knoepfe { flex-basis: 100%; }
	.mehrfach-knoepfe button { flex: 1; }
	body.mit-mehrfach main { padding-bottom: 14rem; }
	#umsatz-liste td.status-spalte { text-align: left; }
}

/* ---------- Verbesserungen 2: Belegimporte ---------- */
.import-hinweis {
	display: flex; flex-wrap: wrap; align-items: baseline; gap: .25rem 1rem; margin-bottom: .75rem; padding: .45rem .75rem;
	background: var(--flaeche); border: 1px solid var(--rand); border-left: 3px solid var(--ok); border-radius: var(--radius); font-size: .85rem;
}
.import-hinweis[hidden] { display: none; }
.import-hinweis.mit-fehlern { border-left-color: #d4a72c; }
.import-titel { font-weight: 600; color: var(--leise); }
.import-fehler { color: var(--fehler); font-weight: 600; }
.import-alle { margin-left: auto; white-space: nowrap; }

.filter-flach { border: 0; padding: 0; background: transparent; margin: .75rem 0; }
.import-zahlen { display: flex; flex-wrap: wrap; gap: .5rem; margin: .75rem 0 .25rem; }
.import-zahlen div { border: 1px solid var(--rand); border-radius: var(--radius); padding: .4rem .9rem; min-width: 7rem; }
.import-zahlen dt { font-size: .8rem; color: var(--leise); }
.import-zahlen dd { margin: 0; font-size: 1.4rem; font-weight: 600; font-variant-numeric: tabular-nums; }
.import-zahlen .ok dd { color: var(--ok); }
.import-zahlen .fehler dd { color: var(--fehler); }
.import-ordner { margin-top: .5rem; }
.import-ordner p { margin: .3rem 0; }

.import-laeufe { margin-top: 1rem; }
.import-laeufe.laedt { opacity: .55; }
.lauf { margin-bottom: .6rem; padding: 0; }
.lauf summary { display: flex; flex-wrap: wrap; align-items: center; gap: .3rem 1rem; padding: .75rem 1rem; cursor: pointer; }
.lauf-zeit { font-weight: 600; font-variant-numeric: tabular-nums; }
.lauf-chips { margin-left: auto; display: flex; flex-wrap: wrap; gap: .3rem; }
.lauf-inhalt { padding: 0 1rem 1rem; border-top: 1px solid var(--rand); }
.lauf-inhalt h3 { font-size: .9rem; margin: .75rem 0 .3rem; }
.lauf-gruende { margin: 0 0 .5rem; padding-left: 1.2rem; font-size: .9rem; }
.lauf-belege { font-size: .85rem; margin-top: .5rem; }
.lauf-belege tbody tr { cursor: default; }
.lauf-belege td .status { width: 1.1rem; height: 1.1rem; font-size: .7rem; vertical-align: -.15rem; }
.lauf-stand { white-space: nowrap; }
.lauf-stand.offen { color: var(--fehler); font-weight: 600; }
.lauf-stand.geloescht { color: var(--leise); }

@media (max-width: 720px) {
	.import-alle { margin-left: 0; }
	.import-lauf { flex-basis: 100%; }
	.lauf-chips { margin-left: 0; }
	.lauf-belege tbody tr { display: grid; grid-template-columns: auto 1fr; gap: .1rem .75rem; }
	.lauf-belege td { min-width: 0; }
	.lauf-belege tr.zeile-fehler { background: #fff8f6; }
	.lauf-belege tr.zeile-fehler td { background: transparent; }
	.lauf-belege td:nth-child(2), .lauf-belege td:nth-child(3), .lauf-belege td:nth-child(4) { grid-column: 1 / -1; }
}

/* Ort der Datei in der Nextcloud */
.datei-pfad { font-size: .8rem; overflow-wrap: anywhere; margin-top: .15rem; }
.datei-pfad code, code.datei-pfad { font-size: .8rem; user-select: all; }

/* ---------- Kasse ---------- */
.aktionsleiste.mit-ansichten { align-items: flex-end; border-bottom: 1px solid var(--rand); margin-bottom: .75rem; }
.mit-ansichten .ansichten { border-bottom: 0; margin-bottom: -1px; flex: 1; }
.mit-ansichten .kasse-buchen-knopf { margin-bottom: .35rem; }
.kasse-block { border: 1px solid var(--rand); border-radius: var(--radius); padding: .6rem .9rem; margin-bottom: .75rem; background: #fbfcfd; }
.kasse-block h2 { font-size: 1rem; margin: 0; }
.kasse-block p { margin: .4rem 0 0; }
.kasse-kopf { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: .5rem 1rem; }
.kasse-knoepfe { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem 1rem; font-size: .9rem; }
.kasse-zahlen { display: flex; flex-wrap: wrap; gap: .5rem; margin: .6rem 0 0; }
.kasse-zahlen div { border: 1px solid var(--rand); border-radius: var(--radius); padding: .3rem .8rem; min-width: 8.5rem; background: var(--flaeche); }
.kasse-zahlen dt { font-size: .8rem; color: var(--leise); }
.kasse-zahlen dd { margin: 0; font-size: 1.15rem; font-weight: 600; font-variant-numeric: tabular-nums; }
.kasse-zahlen .gesamt { border-color: var(--primaer); }
.kasse-zahlen dd.betrag-ein { color: var(--ok); }
.kasse-kurz { display: flex; flex-wrap: wrap; align-items: center; gap: .25rem .75rem; }
.kasse-kurz + .kasse-kurz { margin-top: .35rem; }
.art-wahl { display: flex; gap: 1.5rem; margin-bottom: .75rem; }
.zwei-felder { display: grid; grid-template-columns: 1fr 1fr; gap: 0 1rem; }
.kasse-rechnung-gewaehlt { margin-bottom: .75rem; padding: .4rem .6rem; background: var(--hintergrund); border-radius: var(--radius); }
#kasse-rechnung-treffer { margin-bottom: .75rem; }
.zaehlen-vergleich { justify-content: start; margin-bottom: .75rem; }
.ab-kasse-knoepfe { display: flex; gap: .5rem; margin: .25rem 0 .5rem; }
.ab-bargeld-feld p { margin: 0 0 .4rem; }
button.gefahr.bestaetigen { background: var(--fehler); color: #fff; }
.kasse-korrektur h3 { margin: 1rem 0 .4rem; font-size: 1rem; }
.kasse-korrektur .zeile-form select { max-width: 24rem; }
@media (max-width: 720px) {
	.mit-ansichten .ansichten { flex-basis: 100%; }
	.mit-ansichten .kasse-buchen-knopf { width: 100%; }
	.zwei-felder { grid-template-columns: 1fr; }
	.kasse-zahlen div { flex: 1 1 45%; min-width: 0; }
}
.titel-knoepfe { display: flex; flex-wrap: wrap; gap: .5rem; justify-content: flex-end; }

/* ---------- Kategorien ---------- */
.marke-klein.kategorie-marke { color: #5b4a8a; border-color: #cfc4ea; background: #f5f2fc; white-space: nowrap; }
#liste td .kategorie-marke, #umsatz-liste td .kategorie-marke { margin-top: .2rem; }
.b-kategorie { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem .75rem; padding: .5rem .9rem; }
.b-kategorie-wahl { display: flex; align-items: center; gap: .5rem; font-weight: 600; margin: 0; }
.b-kategorie-wahl select { min-width: 14rem; font-weight: normal; }
.b-kategorie-neu { display: inline-flex; gap: .4rem; align-items: center; }
.b-kategorie-neu[hidden] { display: none; }
.b-kategorie-vorschlag { flex: 1 1 100%; margin: 0; }
#sammel-tabelle tbody tr { cursor: default; }
#sammel-tabelle tbody tr:hover { background: transparent; }
#sammel-tabelle select { max-width: 16rem; }
#sammel-tabelle .s-neu { display: block; margin-top: .3rem; max-width: 16rem; }
#sammel-tabelle .s-neu[hidden] { display: none; }
.summen .summe-kategorie { margin-top: .75rem; }

/* ---------- Jahresbericht ---------- */
.jb-filter { margin-bottom: .5rem; }
.jb-tabelle tbody tr, .jb-tabelle tfoot tr { cursor: default; }
.jb-tabelle tbody tr:hover { background: transparent; }
.jb-tabelle tfoot td { border-top: 2px solid var(--rand); font-weight: 600; }
.jb-tabelle tfoot tr.jb-umbuchung td { font-weight: normal; color: var(--leise); border-top: 0; }
.jb-tabelle tr.jb-ohne td:first-child a, .jb-tabelle tr.jb-offen td:first-child a { color: var(--warnung); }
#jahresbericht.laedt .jb-tabelle { opacity: .5; }
@media (max-width: 720px) {
	.b-kategorie-wahl { flex-wrap: wrap; width: 100%; }
	.b-kategorie-wahl select { min-width: 0; width: 100%; }
	.jb-tabelle tfoot { display: block; }
	.jb-tabelle tfoot tr { border: 1px solid var(--rand); border-radius: var(--radius); margin-bottom: .75rem; padding: .5rem .75rem; display: block; }
	.jb-tabelle tfoot td { display: block; border: 0; padding: .2rem 0; }
	.jb-tabelle tfoot td[data-titel]::before { content: attr(data-titel); display: block; font-size: .75rem; color: var(--leise); font-weight: normal; }
}
.ab-kategorie { display: flex; flex-wrap: wrap; align-items: center; gap: .3rem .5rem; margin-top: .35rem; font-size: .9rem; }
.ab-kategorie label { display: flex; align-items: center; gap: .4rem; margin: 0; white-space: nowrap; min-width: 0; max-width: 100%; }
.ab-kategorie select { min-width: 0; max-width: 13rem; padding: .2rem .4rem; }
.ab-kategorie.fehlt select { border-color: #d4a72c; background: #fff8e1; }
.ab-kategorie-neu { display: inline-flex; gap: .3rem; }
.ab-kategorie-neu[hidden] { display: none; }
.ab-kategorie-neu input { width: 11rem; padding: .2rem .4rem; }

/* ---------- Wiederkehrende Zahlungen ---------- */
.marke-klein.wk-marke { color: #1d6b6b; border-color: #9fd3d3; background: #eef9f9; white-space: nowrap; }
.wk-filter { margin-left: .5rem; color: var(--text); }
.wk-filter button { padding: 0 .4rem; margin-left: .2rem; line-height: 1.3; }
.wk-hinweise { margin: 0 0 .75rem; background: #fff8e1; border-left: 3px solid #d4a72c; padding: .4rem .75rem; font-size: .9rem; }
.wk-hinweise summary { cursor: pointer; font-weight: 600; color: var(--warnung); }
.wk-hinweise ul { list-style: none; margin: .4rem 0 0; padding: 0; }
.wk-hinweise li { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .25rem .75rem; padding: .25rem 0; border-top: 1px solid #f0e2b5; }
.wk-hinweis-knoepfe { display: inline-flex; gap: .3rem; }
.wk-warnung { color: var(--warnung); font-size: .85rem; }
.ab-wk { border: 1px solid #9fd3d3; background: #eef9f9; border-radius: var(--radius); padding: .5rem .65rem; margin: .5rem 0; font-size: .9rem; }
.ab-wk > div + * { margin-top: .4rem; }
.ab-wk .ab-hinweis { margin-top: .4rem; }
.ab-wk-merken { margin: .75rem 0 .25rem; }
#wk-tabelle tbody tr, #wk-vorschlaege tbody tr { cursor: default; }
#wk-tabelle tbody tr:hover, #wk-vorschlaege tbody tr:hover { background: transparent; }
#wk-tabelle tr.inaktiv td:first-child strong { color: var(--leise); }
.tabelle td.aktionen .knopf-link { padding: .25rem .55rem; font-size: .85rem; margin-left: .25rem; }
#wk-summe { margin: 0 0 .75rem; }
#wk-form .raster { grid-template-columns: repeat(auto-fill, minmax(12rem, 1fr)); }
#wk-form label.checkbox { margin-bottom: .45rem; }
#wk-form label.checkbox.leise { color: var(--leise); }
#wk-form .wk-erkennen p { margin: 0 0 .6rem; }
#wk-seite .titelzeile { justify-content: flex-start; flex-wrap: wrap; }
#wk-seite .titelzeile h1 { white-space: nowrap; }
#wk-firma { width: auto; max-width: 18rem; }
#wk-neu { margin-left: auto; white-space: nowrap; }
#wk-form .wk-loeschen { margin-right: auto; }
@media (max-width: 720px) {
	.tabelle td.aktionen .knopf-link { margin: 0 .25rem .25rem 0; }
	#wk-form .raster { grid-template-columns: 1fr; }
	#wk-form .raster label.breit { grid-column: auto; }
	.wk-hinweise li { flex-direction: column; align-items: flex-start; }
}

/* ---------- Eigene Dateiformate (Zuordnungsfenster) ---------- */
.kf-kopf { display: grid; grid-template-columns: 2fr 1fr 1.4fr; gap: 0 .75rem; align-items: end; }
.kf-kopf label.checkbox { grid-column: 1 / -1; }
.kf-tabelle { font-size: .88rem; margin-bottom: .4rem; }
.kf-tabelle td { padding: .3rem .5rem; vertical-align: middle; }
.kf-tabelle td:first-child { width: 30%; }
.kf-tabelle select { margin: 0; }
.kf-tabelle select + select { margin-top: .25rem; }
.kf-beispiel { color: var(--leise); font-size: .82rem; overflow-wrap: anywhere; width: 30%; }
.kf-fehler { display: block; font-size: .8rem; font-weight: 400; }
.kf-fehler:empty { display: none; }
.kf-probe { margin: .75rem 0; }
.kf-probe-tabelle { max-height: 40vh; overflow: auto; border: 1px solid var(--rand); border-radius: var(--radius); }
.kf-probe-tabelle .tabelle { font-size: .82rem; }
.kf-probe-tabelle td { padding: .3rem .5rem; }
.kf-knoepfe { margin-bottom: .5rem; }
@media (max-width: 720px) {
	.kf-kopf { grid-template-columns: 1fr; }
	.kf-tabelle td:first-child, .kf-beispiel { width: 100%; }
}

/* Läufe „Rechnungen sammeln“ */
.lauf-jetzt { margin: .25rem 0 .75rem; }
.lauf-jetzt button { margin-left: .5rem; }
.lauf-einstellungen { flex-wrap: wrap; align-items: flex-end; }
.lauf-einstellungen label { display: flex; align-items: center; gap: .35rem; font-weight: 400; margin: 0; }
.lauf-einstellungen input { width: 5rem; }
#laeufe-firmen td label.checkbox { margin: 0; }

/* Umkategorisieren */
.umzug-nachher { border: 1px solid var(--rand); border-radius: var(--radius); padding: .4rem .75rem .6rem; margin: .75rem 0 0; }
.umzug-nachher legend { font-size: .9rem; padding: 0 .3rem; }
.umzug-nachher .haken { display: inline-flex; align-items: center; gap: .35rem; margin-right: 1rem; font-weight: normal; }
.umzug-neu[hidden] { display: none; }
