/* SEKalk – schlichtes Erscheinungsbild */
:root {
  --text: #1d2430;
  --leise: #5f6b7a;
  --linie: #d9dee5;
  --flaeche: #f4f6f8;
  --karte: #ffffff;
  --akzent: #1f5fa8;
  --rot: #c62828;
  --rot-hell: #fdecea;
  --gelb: #b7791f;
  --gelb-hell: #fff6dc;
  --gruen: #2e7d32;
  --gruen-hell: #e8f5e9;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; font: 15px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; font-feature-settings: "calt" 0; color: var(--text); background: var(--flaeche); }
a { color: var(--akzent); }
code { background: #eef1f4; padding: 0 .25em; border-radius: 3px; font-size: .92em; }
h1 { font-size: 1.5rem; margin: .2rem 0 1rem; }
h2 { font-size: 1.15rem; margin: 1rem 0 .6rem; }
h3 { font-size: 1rem; margin: .4rem 0; }

.kopf { display: flex; align-items: center; gap: 1.2rem; padding: .6rem 1.2rem; background: #17324d; color: #fff; flex-wrap: wrap; }
.kopf a { color: #dfe8f2; text-decoration: none; }
.kopf .marke { font-weight: 700; font-size: 1.15rem; color: #fff; }
.kopf nav { display: flex; gap: .9rem; flex-wrap: wrap; }
.kopf nav a.aktiv, .kopf nav a:hover { color: #fff; text-decoration: underline; }
.kopf .abmelden { margin-left: auto; display: flex; gap: .6rem; align-items: center; }
.kopf .abmelden button { color: #dfe8f2; border-color: #4a6784; }
.umgebung { background: #f0b429; color: #17324d; font-weight: 700; padding: .1rem .5rem; border-radius: 3px; font-size: .8rem; }

main { max-width: 1280px; margin: 0 auto; padding: 1.2rem; }
.karte { background: var(--karte); border: 1px solid var(--linie); border-radius: 6px; padding: 1rem 1.2rem; margin-bottom: 1rem; }
.karte.schmal { max-width: 560px; }
.karte.hinweis { border-color: var(--gelb); background: var(--gelb-hell); }
.anmeldung { margin: 3rem auto; }
.leise { color: var(--leise); font-size: .9em; }
.leer { color: var(--leise); font-style: italic; }
.rechts { text-align: right; }

.meldung { padding: .55rem .8rem; border-radius: 4px; margin: 0 0 .8rem; }
.meldung.ok { background: var(--gruen-hell); border: 1px solid #a5d6a7; }
.meldung.fehler { background: var(--rot-hell); border: 1px solid #ef9a9a; }

.formular { display: grid; gap: .8rem; }
.formular label { display: grid; gap: .25rem; font-weight: 600; }
.formular label.wahl { display: block; font-weight: 400; margin: .2rem 0; }
fieldset { border: 1px solid var(--linie); border-radius: 4px; }
input[type=text], input[type=password], input[type=search], select { padding: .45rem .55rem; border: 1px solid #b8c1cc; border-radius: 4px; font: inherit; }
button, .knopf { background: var(--akzent); color: #fff; border: 1px solid var(--akzent); border-radius: 4px; padding: .45rem .9rem; font: inherit; cursor: pointer; text-decoration: none; display: inline-block; }
button.leise { background: transparent; color: var(--akzent); border-color: #b8c1cc; padding: .2rem .55rem; font-size: .9em; }
button:disabled { opacity: .6; cursor: wait; }
form.zeile { display: flex; gap: .4rem; }

.tabelle { border-collapse: collapse; width: 100%; }
.tabelle th, .tabelle td { padding: .35rem .5rem; border-bottom: 1px solid var(--linie); text-align: left; vertical-align: top; }
.tabelle th { font-size: .85em; color: var(--leise); font-weight: 600; }
.tabelle th.rechts, .tabelle td.rechts { text-align: right; }
.tabelle.klein { font-size: .9em; }
.tabelle tr.ignoriert td { color: var(--leise); }
.tabelle tr.eingelesen td:last-child { color: var(--gruen); font-weight: 600; }
.tabelle tr.gesperrt td { color: var(--leise); text-decoration: line-through; }
.tabelle tr.gewaehlt td { background: #eef4fb; }

.marke-gruen, .marke-rot, .marke-gelb, .marke-grau { display: inline-block; padding: 0 .4rem; border-radius: 3px; font-size: .85em; margin-right: .3rem; }
.marke-gruen { background: var(--gruen-hell); color: var(--gruen); }
.marke-rot { background: var(--rot-hell); color: var(--rot); }
.marke-gelb { background: var(--gelb-hell); color: var(--gelb); }
.marke-grau { background: #eceff1; color: #546e7a; }
.ohne-zeit { color: var(--rot); font-weight: 600; }

.fortschritt { height: 22px; background: #e3e8ee; border-radius: 11px; overflow: hidden; }
.fortschritt .balken { height: 100%; background: var(--akzent); transition: width .3s; }
.fortschritt-text { margin: .5rem 0 1rem; }
.protokoll { padding-left: 1.2rem; }
.fertig-links { display: flex; gap: .6rem; }

.werkzeugleiste { display: flex; gap: .8rem; align-items: end; flex-wrap: wrap; margin-bottom: 1rem; }
.werkzeugleiste label { display: grid; gap: .2rem; font-size: .9em; font-weight: 600; }
.werkzeugleiste input[type=search] { min-width: 18rem; }

.kennzahlen { display: flex; gap: .6rem; flex-wrap: wrap; margin-bottom: .6rem; }
.kennzahlen > * { background: var(--karte); border: 1px solid var(--linie); border-radius: 6px; padding: .5rem .9rem; color: var(--text); text-decoration: none; }
.kennzahlen .zahl { font-size: 1.35rem; font-weight: 700; margin-right: .3rem; }
.kennzahlen a.rot { border-color: #ef9a9a; background: var(--rot-hell); }
.kennzahlen a.gelb { border-color: #f6d27a; background: var(--gelb-hell); }

details.kapitel > summary { cursor: pointer; font-weight: 600; font-size: 1.05rem; }
.nr { font-variant-numeric: tabular-nums; font-weight: 600; }
.titel-form { display: flex; gap: .5rem; align-items: end; margin: .6rem 0; flex-wrap: wrap; }
.titel-form input[type=text] { min-width: 26rem; }
.titel-form label { display: grid; gap: .2rem; font-weight: 600; }

.positionen { border-top: 1px solid var(--linie); }
.position-kopf, details.position > summary {
  display: grid; grid-template-columns: 14px 6.5rem 1fr 4rem 8rem 5.5rem; gap: .6rem; align-items: center; padding: .35rem .4rem;
}
.position-kopf { font-size: .85em; color: var(--leise); font-weight: 600; border-bottom: 1px solid var(--linie); }
details.position { border-bottom: 1px solid var(--linie); }
details.position > summary { cursor: pointer; list-style: none; }
details.position > summary::-webkit-details-marker { display: none; }
details.position > summary:hover { background: #f7f9fb; }
details.position[open] > summary { background: #eef4fb; }
details.position.rot > summary { background: var(--rot-hell); }
.ampel { width: 12px; height: 12px; border-radius: 50%; background: #cfd8dc; }
.ampel.gelb { background: #f0b429; }
.ampel.rot { background: var(--rot); }
.position-details { padding: .6rem .8rem 1rem 1.6rem; }
.spalten { display: grid; grid-template-columns: minmax(16rem, 1fr) 2fr; gap: 1.5rem; }
.langtext { white-space: pre-line; background: #fafbfc; border: 1px solid var(--linie); padding: .5rem .7rem; border-radius: 4px; font-size: .92em; }
.befunde { margin: 0 0 .6rem; padding-left: 1.2rem; }
.befunde li.rot { color: var(--rot); font-weight: 600; }
.befunde li.gelb { color: var(--gelb); }
.seiten a, .seiten strong { margin-right: .4rem; }
.filter a, .filter strong { margin-right: .7rem; }

@media (max-width: 800px) {
  .spalten { grid-template-columns: 1fr; }
  .position-kopf, details.position > summary { grid-template-columns: 12px 5.5rem 1fr 5rem; }
  .position-kopf span:nth-child(4), .position-kopf span:nth-child(6),
  details.position > summary > span:nth-child(4), details.position > summary > span:nth-child(6) { display: none; }
  .titel-form input[type=text] { min-width: 0; width: 100%; }
}
