:root {
  --grund: #f4f5f7; --flaeche: #fff; --flaeche2: #f8f9fb; --linie: #e3e6eb; --linie2: #cfd4dc;
  --text: #171a21; --leise: #5c6573; --akzent: #1d4ed8; --akzent-hell: #e8eefc; --akzent-text: #fff;
  --gut: #0f7a4d; --gut-hell: #e3f5ec; --warn: #9a5b00; --warn-hell: #fdf1d8;
  --schlecht: #b42318; --schlecht-hell: #fde8e6; --ki: #6d28d9; --ki-hell: #efe9fd;
  --rund: 10px; --schatten: 0 1px 2px rgba(16, 24, 40, .06);
}
@media (prefers-color-scheme: dark) { :root {
  --grund: #0f1217; --flaeche: #171b22; --flaeche2: #1c212a; --linie: #272d38; --linie2: #364050;
  --text: #e8ebf0; --leise: #98a2b3; --akzent: #6d9bff; --akzent-hell: #1b2a4a; --akzent-text: #0b1020;
  --gut: #4ade80; --gut-hell: #12301f; --warn: #fbbf24; --warn-hell: #3a2c08;
  --schlecht: #ff8a80; --schlecht-hell: #3d1512; --ki: #c4a7ff; --ki-hell: #2a1f4a; --schatten: none;
} }
* { box-sizing: border-box; }
html { font-size: 15px; }
body { margin: 0; background: var(--grund); color: var(--text);
  font: 400 1rem/1.5 "Segoe UI", system-ui, -apple-system, Roboto, sans-serif; }
a { color: var(--akzent); text-decoration: none; } a:hover { text-decoration: underline; }
h1 { font-size: 1.6rem; font-weight: 650; margin: 0; letter-spacing: -.01em; }
h2 { font-size: 1.05rem; font-weight: 650; margin: 2rem 0 .7rem; }
h3 { font-size: 1rem; font-weight: 650; margin: 0 0 .5rem; }
code { background: var(--flaeche2); border: 1px solid var(--linie); border-radius: 6px; padding: .1rem .4rem; }
.leise { color: var(--leise); } .klein { font-size: .87rem; } .r { text-align: right; }

.rahmen { display: grid; grid-template-columns: 250px minmax(0, 1fr); min-height: 100vh; }
.leiste { background: var(--flaeche); border-right: 1px solid var(--linie); padding: 1.2rem .9rem;
  display: flex; flex-direction: column; gap: 1.2rem; position: sticky; top: 0; height: 100vh; }
.marke { display: flex; gap: .7rem; align-items: center; color: var(--text); padding: 0 .4rem; }
.marke:hover { text-decoration: none; }
.marke-zeichen { width: 36px; height: 36px; border-radius: 9px; background: var(--akzent); color: var(--akzent-text);
  display: grid; place-items: center; font-weight: 700; font-size: 1.15rem; }
.marke strong { display: block; line-height: 1.2; } .marke small { color: var(--leise); font-size: .78rem; }
nav { display: flex; flex-direction: column; gap: 2px; }
nav a { display: flex; align-items: center; gap: .7rem; padding: .55rem .7rem; border-radius: 8px; color: var(--text); }
nav a:hover { background: var(--flaeche2); text-decoration: none; }
nav a.aktiv { background: var(--akzent-hell); color: var(--akzent); font-weight: 600; }
nav svg, .ablage svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.8;
  stroke-linecap: round; stroke-linejoin: round; flex: none; }
.punkt { width: 8px; height: 8px; border-radius: 50%; background: var(--schlecht); margin-left: auto; }
.leiste-fuss { margin-top: auto; font-size: .87rem; color: var(--leise); display: grid; gap: .6rem; padding: 0 .4rem; }
.leiste-fuss form { display: flex; justify-content: space-between; align-items: center; }
.status-zeile { display: flex; align-items: center; gap: .5rem; }
.lampe { width: 8px; height: 8px; border-radius: 50%; } .lampe.an { background: var(--gut); } .lampe.aus { background: var(--schlecht); }
.wer { font-weight: 600; color: var(--text); }
button.link { background: none; border: 0; color: var(--akzent); cursor: pointer; font: inherit; padding: 0; }

main { padding: 2rem 2.4rem 4rem; max-width: 1280px; width: 100%; }
.kopf { margin-bottom: 1.4rem; } .kopf p { margin: .3rem 0 0; }
.kopf.mit-wahl { display: flex; justify-content: space-between; align-items: flex-end; gap: 1rem; flex-wrap: wrap; }

.karte { background: var(--flaeche); border: 1px solid var(--linie); border-radius: var(--rund);
  padding: 1.1rem 1.2rem; box-shadow: var(--schatten); margin-bottom: 1rem; }
.karte.flach { padding: 0; overflow: hidden; }
.kacheln { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: .8rem; margin-bottom: 1rem; }
.kachel { background: var(--flaeche); border: 1px solid var(--linie); border-radius: var(--rund); padding: .9rem 1.1rem;
  box-shadow: var(--schatten); }
.kachel small { color: var(--leise); display: block; font-size: .85rem; }
.kachel b { font-size: 1.7rem; font-weight: 650; letter-spacing: -.02em; }
.kachel em { display: block; font-style: normal; font-size: .82rem; color: var(--leise); }
.kachel.gut b { color: var(--gut); } .kachel.schlecht b { color: var(--schlecht); }

.knopf { display: inline-flex; align-items: center; gap: .4rem; padding: .55rem 1rem; border-radius: 8px;
  border: 1px solid var(--linie2); background: var(--flaeche); color: var(--text); font: inherit; font-weight: 550;
  cursor: pointer; white-space: nowrap; }
.knopf:hover { background: var(--flaeche2); text-decoration: none; }
.knopf.haupt { background: var(--akzent); border-color: var(--akzent); color: var(--akzent-text); }
.knopf.haupt:hover { filter: brightness(1.08); }
.knopf.gefahr { color: var(--schlecht); } .knopf.klein { padding: .25rem .6rem; font-size: .87rem; }
.knopf:disabled { opacity: .45; cursor: not-allowed; }
input, select, textarea { font: inherit; color: var(--text); background: var(--flaeche); border: 1px solid var(--linie2);
  border-radius: 7px; padding: .45rem .6rem; }
input:focus, select:focus, textarea:focus, .knopf:focus-visible { outline: 2px solid var(--akzent); outline-offset: 1px; }
label { display: grid; gap: .25rem; font-size: .87rem; color: var(--leise); }
label input, label select, label textarea { font-size: 1rem; }
.zeile { display: flex; align-items: center; gap: .8rem; flex-wrap: wrap; }
.felder { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: .8rem; margin: .9rem 0; }
.felder .weit { grid-column: span 2; } .felder .voll { grid-column: 1 / -1; }

.pille { display: inline-flex; align-items: center; gap: .3rem; padding: .12rem .6rem; border-radius: 999px;
  font-size: .8rem; font-weight: 600; background: var(--flaeche2); color: var(--leise); white-space: nowrap; }
.pille.gut, .pille.fertig { background: var(--gut-hell); color: var(--gut); }
.pille.ki, .pille.liest { background: var(--ki-hell); color: var(--ki); }
.pille.warn, .pille.pruefen, .pille.neu { background: var(--warn-hell); color: var(--warn); }
.pille.schlecht, .pille.fehler { background: var(--schlecht-hell); color: var(--schlecht); }
.hinweis { border-radius: var(--rund); padding: .7rem 1rem; margin-bottom: 1rem; border: 1px solid; }
.hinweis.eng { margin: .6rem 0 0; padding: .45rem .8rem; font-size: .93rem; }
.hinweis.warn { background: var(--warn-hell); color: var(--warn); border-color: transparent; }
.hinweis.schlecht { background: var(--schlecht-hell); color: var(--schlecht); border-color: transparent; }
.meldungen { margin-bottom: 1rem; } .meldung { background: var(--akzent-hell); color: var(--akzent);
  border-radius: var(--rund); padding: .7rem 1rem; margin-bottom: .5rem; font-weight: 550; }
.leer { color: var(--leise); padding: 2rem; text-align: center; border: 1px dashed var(--linie2); border-radius: var(--rund); }

.tabelle { width: 100%; border-collapse: collapse; }
.tabelle th { text-align: left; font-size: .8rem; font-weight: 600; color: var(--leise); padding: .6rem .9rem;
  border-bottom: 1px solid var(--linie); background: var(--flaeche2); white-space: nowrap; }
.tabelle th.r { text-align: right; }
.tabelle td { padding: .6rem .9rem; border-bottom: 1px solid var(--linie); vertical-align: middle; }
.tabelle tr:last-child td { border-bottom: 0; }
.tabelle tr.klick { cursor: pointer; } .tabelle tr.klick:hover td { background: var(--flaeche2); }
.tabelle tfoot td { font-weight: 650; background: var(--flaeche2); border-top: 1px solid var(--linie); }
.tabelle th.breit { width: 14%; }

.ablage { display: grid; justify-items: center; gap: .3rem; padding: 2.6rem 1rem; border: 2px dashed var(--linie2);
  border-radius: 14px; background: var(--flaeche); cursor: pointer; color: var(--leise); transition: .15s; }
.ablage:hover, .ablage.drueber { border-color: var(--akzent); background: var(--akzent-hell); color: var(--akzent); }
.ablage svg { width: 34px; height: 34px; } .ablage strong { font-size: 1.1rem; color: var(--text); }
.ablage input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.dateiliste { list-style: none; padding: 0; margin: .8rem 0; display: grid; gap: .35rem; }
.dateiliste li { background: var(--flaeche); border: 1px solid var(--linie); border-radius: 8px; padding: .45rem .8rem;
  display: flex; justify-content: space-between; gap: 1rem; }
.erklaerung { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: .8rem; margin-top: 2rem; }
.erklaerung div { background: var(--flaeche); border: 1px solid var(--linie); border-radius: var(--rund); padding: 1rem; }
.erklaerung h3 { margin: .5rem 0 .2rem; } .erklaerung p { margin: 0; color: var(--leise); font-size: .93rem; }
.nr { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 50%;
  background: var(--akzent-hell); color: var(--akzent); font-weight: 700; font-size: .87rem; }

.schritte { list-style: none; display: flex; gap: .5rem; padding: 0; margin: 0 0 1.4rem; flex-wrap: wrap; }
.schritte li { display: flex; align-items: center; gap: .5rem; padding: .4rem .9rem .4rem .45rem; border-radius: 999px;
  background: var(--flaeche); border: 1px solid var(--linie); color: var(--leise); font-weight: 550; }
.schritte span { display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%;
  background: var(--flaeche2); font-size: .82rem; font-weight: 700; }
.schritte .jetzt { border-color: var(--akzent); color: var(--akzent); background: var(--akzent-hell); }
.schritte .jetzt span { background: var(--akzent); color: var(--akzent-text); }
.schritte .erledigt { color: var(--gut); } .schritte .erledigt span { background: var(--gut-hell); }

.kosten { display: flex; justify-content: space-between; align-items: center; gap: 1.5rem; flex-wrap: wrap; }
.lesen { text-align: center; padding: 2.4rem 1.5rem; }
.prozent { font-size: 3.4rem; font-weight: 700; letter-spacing: -.03em; line-height: 1; }
.balken { height: 12px; background: var(--flaeche2); border-radius: 999px; overflow: hidden; margin: 1.2rem auto .8rem;
  max-width: 560px; border: 1px solid var(--linie); }
.balken div { height: 100%; background: var(--akzent); border-radius: 999px; transition: width .6s ease; }

.buendelung .zeile { justify-content: space-between; padding: .4rem 0; border-top: 1px solid var(--linie); }
.schein { padding: 0; } .schein[open] { padding-bottom: 1.1rem; }
.schein > *:not(summary) { margin-left: 1.2rem; margin-right: 1.2rem; }
.schein summary { display: flex; align-items: center; gap: .8rem; padding: .85rem 1.2rem; cursor: pointer; list-style: none;
  flex-wrap: wrap; }
.schein summary::-webkit-details-marker { display: none; }
.schein summary::after { content: "▾"; margin-left: auto; color: var(--leise); transition: .15s; }
.schein[open] summary::after { transform: rotate(180deg); }
.schein.auffaellig { border-left: 4px solid var(--schlecht); }
.titel { display: grid; line-height: 1.25; margin-right: auto; } .titel .leise { font-size: .87rem; }
.haken input { width: 18px; height: 18px; accent-color: var(--akzent); }
.pruefflaeche { display: grid; gap: 1rem; grid-template-columns: minmax(0, 1fr); }
.pruefflaeche.mit-bild { grid-template-columns: minmax(0, 1.5fr) minmax(260px, 1fr); }
.tabellenrahmen { border: 1px solid var(--linie); border-radius: 8px; overflow: auto; max-height: 70vh; }
.positionen th { position: sticky; top: 0; z-index: 1; }
.positionen td { padding: .35rem .6rem; }
.positionen tr.rot td { background: var(--schlecht-hell); }
.positionen input.artikel { width: 11.5rem; font-family: Consolas, "Cascadia Mono", monospace; padding: .3rem .5rem; }
.positionen input.menge { width: 4.6rem; text-align: right; padding: .3rem .5rem; }
.positionen .ort { font-family: Consolas, "Cascadia Mono", monospace; font-size: .9rem; white-space: nowrap; }
.positionen .bez { font-size: .93rem; }
.positionen label.pille { cursor: pointer; }
.scanbild { position: sticky; top: 1rem; align-self: start; }
.scanbild img { width: 100%; border: 1px solid var(--linie2); border-radius: 8px; display: block; background: #fff; }
.seitenwahl { display: flex; gap: .3rem; flex-wrap: wrap; margin-bottom: .5rem; }
.seitenwahl button { font: inherit; font-size: .82rem; padding: .2rem .6rem; border-radius: 999px; cursor: pointer;
  border: 1px solid var(--linie2); background: var(--flaeche); color: var(--text); }
.seitenwahl button.aktiv { background: var(--akzent); border-color: var(--akzent); color: var(--akzent-text); }
.aktionsleiste { position: sticky; bottom: 0; display: flex; gap: .7rem; align-items: center; flex-wrap: wrap;
  background: var(--grund); padding: .9rem 0; border-top: 1px solid var(--linie); margin-top: 1rem; }

.anteil { display: flex; height: 16px; border-radius: 999px; overflow: hidden; gap: 2px; }
.anteil .gut { background: var(--gut); } .anteil .ki { background: var(--ki); }
.legende { display: flex; gap: 1.6rem; flex-wrap: wrap; margin-top: .7rem; font-size: .93rem; }
.legende i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: .4rem; }
.legende i.gut { background: var(--gut); } .legende i.ki { background: var(--ki); }
.mini { height: 8px; background: var(--flaeche2); border-radius: 999px; overflow: hidden; min-width: 70px; }
.mini div { height: 100%; background: var(--akzent); border-radius: 999px; } .mini.ki div { background: var(--ki); }
.saeulen { display: flex; align-items: flex-end; gap: 6px; height: 150px; }
.saeulen > div { flex: 1; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 4px; }
.saeulen span { width: 100%; max-width: 28px; background: var(--akzent); border-radius: 5px 5px 0 0; min-height: 3px; }
.saeulen small { color: var(--leise); font-size: .75rem; }

.suche { display: flex; gap: .6rem; margin-bottom: .5rem; } .suche input { flex: 1; max-width: 420px; }
.steckbrief { padding-top: .2rem; }
.anmelden { max-width: 380px; margin: 9vh auto 0; }
.anmelden .karte { display: grid; gap: .9rem; margin-top: 1.2rem; }

@media (max-width: 900px) {
  .rahmen { grid-template-columns: 1fr; }
  .leiste { position: static; height: auto; flex-direction: row; flex-wrap: wrap; align-items: center; }
  nav { flex-direction: row; flex-wrap: wrap; } .leiste-fuss { margin: 0 0 0 auto; }
  main { padding: 1.2rem 1rem 3rem; }
  .pruefflaeche.mit-bild { grid-template-columns: 1fr; } .scanbild { position: static; }
  .felder .weit { grid-column: auto; }
}
@media print { .leiste, .aktionsleiste { display: none; } .rahmen { display: block; } }

/* Kontrolle: Filter und Lagerort von Hand */
.filter { display: flex; align-items: center; gap: 1.2rem; flex-wrap: wrap; position: sticky; top: 0; z-index: 3; }
.filter .wahl { display: flex; grid: none; align-items: center; gap: .45rem; font-size: 1rem; color: var(--text); cursor: pointer; }
.filter .wahl input { width: 17px; height: 17px; accent-color: var(--akzent); }
.filter #alle-ok { margin-left: auto; }
.positionen input.ortfeld { width: 9.5rem; font-family: Consolas, "Cascadia Mono", monospace; padding: .3rem .5rem; font-size: .9rem; }
.positionen tr.rot input.ortfeld { border-color: var(--schlecht); }
.gefiltert-weg { display: none !important; }
.positionen td.r { white-space: nowrap; }
.positionen input.artikel { width: 9.5rem; }
@media (max-width: 1250px) {
  .pruefflaeche.mit-bild { grid-template-columns: 1fr; }
  .scanbild { position: static; max-width: 640px; }
}
