/* Kasse Lindegar – schlichtes Layout ohne Framework */

:root {
  --text: #1d2328;
  --text-leise: #5b6670;
  --linie: #d9dee3;
  --flaeche: #f5f7f8;
  --weiss: #ffffff;
  --akzent: #1f5f5b;
  --akzent-dunkel: #164744;
  --fehler: #a4262c;
  --fehler-flaeche: #fbeaea;
  --erfolg-flaeche: #e7f3ec;
  --warnung: #8a5300;
  --warnung-flaeche: #fff4e0;
  --radius: 6px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 16px;
  line-height: 1.5;
  color: var(--text);
  background: var(--flaeche);
}

a { color: var(--akzent); }

h1 { font-size: 1.6rem; margin: 0 0 1rem; }
h2 { font-size: 1.15rem; margin: 1.5rem 0 .5rem; }

.kopf { background: var(--weiss); border-bottom: 1px solid var(--linie); }
.kopf-innen {
  max-width: 1100px; margin: 0 auto; padding: .75rem 1rem;
  display: flex; flex-wrap: wrap; align-items: center; gap: .75rem 1.5rem;
}
.marke { font-weight: 700; text-decoration: none; color: var(--text); }
.haupt { display: flex; flex-wrap: wrap; gap: .25rem 1rem; flex: 1; }
.haupt a { text-decoration: none; color: var(--text-leise); padding: .25rem 0; }
.haupt a[aria-current="page"] { color: var(--akzent); border-bottom: 2px solid var(--akzent); }
.konto { display: flex; align-items: center; gap: .75rem; font-size: .95rem; }
.konto form { margin: 0; }
.kassenname { color: var(--text-leise); }
.kassenwahl { display: flex; gap: .4rem; align-items: center; }

.inhalt { max-width: 1100px; margin: 0 auto; padding: 1.5rem 1rem 3rem; }
.fuss { max-width: 1100px; margin: 0 auto; padding: 1rem; color: var(--text-leise); font-size: .85rem; }

.karte {
  background: var(--weiss); border: 1px solid var(--linie); border-radius: var(--radius);
  padding: 1.5rem; margin-bottom: 1.5rem;
}
.karte.schmal { max-width: 460px; }
.karte.mittig { margin: 2rem auto; }

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

.kacheln { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 1rem; margin-bottom: 1rem; }
.kachel { background: var(--weiss); border: 1px solid var(--linie); border-radius: var(--radius); padding: 1rem; }
.kachel h2 { margin: 0 0 .25rem; font-size: .9rem; color: var(--text-leise); font-weight: 600; }
.gross { font-size: 1.6rem; font-weight: 600; margin: 0; }

.hinweis { color: var(--text-leise); font-size: .9rem; }

.feld { margin-bottom: 1rem; display: flex; flex-direction: column; gap: .3rem; }
.feld label { font-weight: 600; font-size: .95rem; }
.feld .ankreuzen { font-weight: 400; display: flex; gap: .5rem; align-items: center; }
input[type="text"], input[type="password"], input[type="date"], input[type="search"], input[type="number"], input[type="email"], select, textarea {
  font: inherit; padding: .5rem .6rem; border: 1px solid var(--linie); border-radius: var(--radius);
  background: var(--weiss); color: var(--text); width: 100%;
}
.kassenwahl select { width: auto; padding: .25rem .4rem; }
input:focus, select:focus, button:focus-visible, a:focus-visible {
  outline: 2px solid var(--akzent); outline-offset: 1px;
}
.hat-fehler input, .hat-fehler select { border-color: var(--fehler); }
.fehlertext { color: var(--fehler); margin: 0; font-size: .9rem; }

.knopf {
  display: inline-block; font: inherit; font-weight: 600; cursor: pointer; text-decoration: none;
  background: var(--akzent); color: var(--weiss); border: 1px solid var(--akzent);
  border-radius: var(--radius); padding: .5rem 1rem;
}
.knopf:hover { background: var(--akzent-dunkel); }
.knopf.zweitrangig { background: transparent; color: var(--akzent); }
.knopf.klein { padding: .25rem .6rem; font-size: .9rem; }
button.link {
  background: none; border: none; padding: 0; font: inherit; color: var(--akzent);
  text-decoration: underline; cursor: pointer;
}

.meldung { padding: .75rem 1rem; border-radius: var(--radius); margin-bottom: 1rem; border: 1px solid var(--linie); background: var(--weiss); }
.meldung-fehler { background: var(--fehler-flaeche); border-color: #f0c4c6; }
.meldung-erfolg { background: var(--erfolg-flaeche); border-color: #c4e2cf; }

.tabelle { width: 100%; border-collapse: collapse; background: var(--weiss); border: 1px solid var(--linie); }
.tabelle th, .tabelle td { text-align: left; padding: .55rem .75rem; border-bottom: 1px solid var(--linie); vertical-align: top; }
.tabelle th { font-size: .85rem; color: var(--text-leise); font-weight: 600; background: var(--flaeche); }
.tabelle td.aktionen { white-space: nowrap; }
.tabelle td.aktionen > * { display: inline-block; margin: 0 .75rem 0 0; }
.nowrap { white-space: nowrap; }

.marke-grau { color: var(--text-leise); }
.marke-warnung { color: var(--warnung); background: var(--warnung-flaeche); padding: 0 .4rem; border-radius: 4px; }

pre { background: var(--flaeche); padding: .75rem; border-radius: var(--radius); overflow-x: auto; }

.unsichtbar {
  position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap;
}

/* --- Etappe 2 --- */
.karte.mittel { max-width: 760px; }
.knopfleiste { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; }
.knopf.gefahr { background: transparent; color: var(--fehler); border-color: var(--fehler); }
.knopf.gefahr:hover { background: var(--fehler-flaeche); }
.rechts { margin-left: auto; }
form.inline { display: inline; }
textarea { resize: vertical; }
input[type="file"] { font: inherit; }

.zeile { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 0 1rem; }
fieldset.beleg { border: 1px solid var(--linie); border-radius: var(--radius); padding: .75rem 1rem 0; margin: 0 0 1rem; }
fieldset.beleg legend { font-weight: 600; padding: 0 .3rem; }

.filter { display: flex; flex-wrap: wrap; gap: .75rem 1rem; align-items: flex-end; margin-bottom: 1rem; }
.filter > div { display: flex; flex-direction: column; gap: .25rem; }
.filter label { font-size: .85rem; font-weight: 600; color: var(--text-leise); }
.filter .ankreuzen { font-weight: 400; color: var(--text); display: flex; gap: .4rem; align-items: center; padding-bottom: .5rem; }
.filter select, .filter input[type="search"] { width: auto; min-width: 12rem; }

.zahl { text-align: right; font-variant-numeric: tabular-nums; }
.tabelle th.zahl, .tabelle td.zahl { text-align: right; }
.zahl-links { font-variant-numeric: tabular-nums; }
.negativ { color: var(--fehler); }
.leise, tr.leise td { color: var(--text-leise); }
.tabelle tr.gruppe th { background: var(--weiss); color: var(--text); font-size: .95rem; padding-top: 1rem; border-bottom: 2px solid var(--linie); }
.tabelle tfoot td { font-weight: 600; background: var(--flaeche); }
.tabelle.kompakt { max-width: 640px; margin-bottom: 1rem; }
.tabelle.kompakt td, .tabelle.kompakt th { padding: .35rem .6rem; }
.tabelle.journal td .hinweis { font-size: .85rem; }
.zusammenfassung { background: var(--weiss); border: 1px solid var(--linie); border-radius: var(--radius); padding: .6rem .9rem; }
.marke-grau { font-size: .8rem; border: 1px solid var(--linie); border-radius: 4px; padding: 0 .35rem; margin-left: .3rem; }
dl.angaben { display: grid; grid-template-columns: max-content 1fr; gap: .3rem 1rem; }
dl.angaben dt { color: var(--text-leise); }
dl.angaben dd { margin: 0; }

/* --- Rechnungen und Mitglieder --- */
.abstand { margin-top: 1rem; }
.zwei-spalten { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 1rem; align-items: start; }
.zwei-spalten .karte { margin-bottom: 0; }
.marke-erfolg { color: #1d6b3a; background: var(--erfolg-flaeche); padding: 0 .4rem; border-radius: 4px; }
.tabelle td.einzug { padding-left: 1.75rem; }
.tabelle th.normal { font-weight: 400; font-size: .9rem; color: var(--text); }
.tabelle tr.gruppe th.normal a { margin-right: .75rem; }
.knopf[aria-current="page"] { background: var(--akzent); color: var(--weiss); }
ul.liste-schlicht { padding-left: 1.1rem; margin: 0 0 1rem; }

/* --- Einzelrechnungen --- */
.position { display: grid; grid-template-columns: 1fr 5.5rem 9rem; gap: .5rem; margin-bottom: .5rem; }
.position.kopf { font-size: .85rem; font-weight: 600; color: var(--text-leise); margin-bottom: .25rem; }
.position input { width: 100%; }
.abstand-unten { margin-bottom: .75rem; }
ul.fehlertext { padding-left: 1.1rem; margin: 0 0 .75rem; }

/* --- Abschluss --- */
.meldung-warnung { background: var(--warnung-flaeche); border-color: #ecd6a8; }
.pruefliste { list-style: none; padding: 0; margin: 0 0 1.25rem; background: var(--weiss); border: 1px solid var(--linie); border-radius: var(--radius); }
.pruefliste li { display: grid; grid-template-columns: 1.5rem 1fr auto; gap: .6rem; padding: .6rem .9rem; border-bottom: 1px solid var(--linie); align-items: start; }
.pruefliste li:last-child { border-bottom: 0; }
.pruefliste .symbol { display: inline-flex; justify-content: center; align-items: center; width: 1.4rem; height: 1.4rem; border-radius: 50%; font-size: .8rem; font-weight: 700; }
.pruefliste .stufe-ok .symbol { background: var(--erfolg-flaeche); color: #1d6b3a; }
.pruefliste .stufe-hinweis .symbol { background: var(--flaeche); color: var(--akzent); border: 1px solid var(--linie); }
.pruefliste .stufe-warnung .symbol { background: var(--warnung-flaeche); color: var(--warnung); }
.pruefliste .stufe-fehler .symbol { background: var(--fehler-flaeche); color: var(--fehler); }
.pruefliste li > span:last-child { white-space: nowrap; font-size: .95rem; }
.schritte { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1rem; margin-bottom: 1rem; }
.karte > h2:first-child { margin-top: 0; }
.schritte .karte { margin: 0; display: flex; flex-direction: column; align-items: flex-start; }
.schritte h3 { margin: 0 0 .25rem; font-size: 1rem; }
.schritte .hinweis { flex: 1; margin: 0 0 .75rem; }
.schritte form { margin: 0; }
.tabelle.abschluss { max-width: none; }
.tabelle tr.summe td, .tabelle tr.ergebnis td { font-weight: 600; background: var(--flaeche); }
.tabelle tr.ergebnis td { border-top: 2px solid var(--linie); }
.knopf[disabled] { opacity: .5; cursor: not-allowed; }

@media (max-width: 640px) {
  .haupt { order: 3; flex-basis: 100%; }
  .tabelle { display: block; overflow-x: auto; }
}
