:root {
  --blau: #1f4e78; --blau-hell: #e8f0f8; --text: #1d2730; --grau: #5d6b78; --linie: #dde3e9;
  --flaeche: #f5f7f9; --weiss: #fff; --rot: #b42318; --rot-hell: #fdecea; --gruen: #2e7d32; --gruen-hell: #e8f5e9;
  --gelb-hell: #fff7e0; --radius: 8px;
}
* { box-sizing: border-box; }
html { font-size: 15px; }
body { margin: 0; font-family: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif; color: var(--text); background: var(--flaeche); line-height: 1.45; }
a { color: var(--blau); }
h1 { font-size: 1.5rem; margin: .2rem 0 1rem; }
h2 { font-size: 1.15rem; margin: 1.6rem 0 .6rem; }

.kopf { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem 1.5rem; padding: .6rem 1.2rem; background: var(--blau); color: #fff; }
.kopf a { color: #fff; text-decoration: none; }
.marke { font-weight: 700; font-size: 1.05rem; }
.kopf nav { display: flex; flex-wrap: wrap; gap: .2rem; flex: 1; }
.kopf nav a { padding: .35rem .7rem; border-radius: 6px; opacity: .85; }
.kopf nav a:hover, .kopf nav a.aktiv { background: rgba(255,255,255,.16); opacity: 1; }
.wer { display: flex; align-items: center; gap: .8rem; font-size: .85rem; }
.wer span { opacity: .85; }
.wer .link { color: #fff; }

main { max-width: 1400px; margin: 0 auto; padding: 1.2rem; }

.hinweis { padding: .6rem .9rem; border-radius: var(--radius); margin: 0 0 1rem; }
.hinweis.ok { background: var(--gruen-hell); color: var(--gruen); }
.hinweis.fehler { background: var(--rot-hell); color: var(--rot); }
.hinweis.info { background: var(--blau-hell); color: var(--blau); }

.karte { background: var(--weiss); border: 1px solid var(--linie); border-radius: var(--radius); padding: 1.2rem; margin-bottom: 1rem; }
.karte.schmal { max-width: 420px; }
.karte h2 { margin-top: 0; }
.zweispaltig { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 1rem; align-items: start; }
@media (max-width: 900px) { .zweispaltig { grid-template-columns: 1fr; } }

.raster { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: .9rem 1.1rem; }
.feld { display: flex; flex-direction: column; gap: .25rem; }
.feld.breit { grid-column: 1 / -1; }
.feld > label { font-size: .82rem; font-weight: 600; color: var(--grau); }
.feld-bool { justify-content: end; }
.feld-bool label { font-weight: 500; color: var(--text); display: flex; gap: .4rem; align-items: center; padding: .45rem 0; }
.pflicht { color: var(--rot); }
.gesperrt { font-size: .75rem; opacity: .7; }
input, select, textarea, button { font: inherit; }
input:not([type=checkbox]), select, textarea {
  width: 100%; padding: .45rem .6rem; border: 1px solid #c9d2db; border-radius: 6px; background: #fff; color: var(--text);
}
input:focus, select:focus, textarea:focus { outline: 2px solid var(--blau); outline-offset: -1px; border-color: var(--blau); }
input:disabled, select:disabled { background: #f0f2f4; color: #4b5763; border-color: var(--linie); }
.mit-einheit { display: flex; align-items: center; gap: .4rem; }
.mit-einheit input { max-width: 7rem; }
.checkliste { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: .2rem .8rem; }
.checkliste label { font-weight: 400; color: var(--text); font-size: .9rem; }

button, .knopf {
  display: inline-block; padding: .45rem .9rem; border: 1px solid #c9d2db; border-radius: 6px; background: #fff;
  color: var(--text); cursor: pointer; text-decoration: none; white-space: nowrap;
}
button:hover, .knopf:hover { background: var(--flaeche); }
.primaer { background: var(--blau); border-color: var(--blau); color: #fff; }
.primaer:hover { background: #173d5e; }
.gefahr { color: var(--rot); border-color: #f0b4ae; }
button.link { background: none; border: 0; padding: 0; color: var(--blau); text-decoration: underline; }
button.link.gefahr { color: var(--rot); }
form.inline { display: inline; }
.aktionen { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem; margin-top: 1.2rem; }
.aktionen .rechts { margin-left: auto; }

.filter { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; margin-bottom: .8rem; }
.filter input[type=search] { flex: 1 1 280px; width: auto; }
.filter select { width: auto; max-width: 260px; }
.leiste { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: .6rem; margin: .4rem 0 .6rem; color: var(--grau); }
.leiste h2 { margin: 0; color: var(--text); }
.leiste .filter { margin: 0; }

.tabelle-scroll { overflow-x: auto; background: var(--weiss); border: 1px solid var(--linie); border-radius: var(--radius); }
table.liste { width: 100%; border-collapse: collapse; font-size: .9rem; }
.liste th { text-align: left; background: #eef2f6; color: var(--grau); font-weight: 600; font-size: .8rem; padding: .55rem .7rem; position: sticky; top: 0; white-space: nowrap; }
.liste td { padding: .5rem .7rem; border-top: 1px solid var(--linie); vertical-align: top; }
.liste tr:hover td { background: #fafcfe; }
.liste.kompakt td { padding: .3rem .5rem; }
.liste.kompakt input { padding: .3rem .45rem; }
.liste.klein { font-size: .82rem; }
.liste tr.geschlossen td { color: #9aa5b1; }
.liste tr.offen td:first-child { box-shadow: inset 3px 0 0 var(--rot); }
.liste tr.neu td { background: var(--gelb-hell); }
.zahl { text-align: right; white-space: nowrap; }
.nowrap { white-space: nowrap; }
.leer { text-align: center; color: var(--grau); padding: 1.5rem; }
.klein { font-size: .8rem; color: var(--grau); }
.marke-klein { display: inline-block; font-size: .7rem; padding: .05rem .4rem; border-radius: 10px; background: var(--blau-hell); color: var(--blau); margin-left: .2rem; }
.marke-klein.gruen { background: var(--gruen-hell); color: var(--gruen); }
.status-offen { color: var(--rot); font-weight: 600; }
.status-erledigt { color: var(--gruen); }
button.status-offen, button.status-erledigt { padding: .15rem .55rem; font-size: .8rem; }

.info-hc dl { display: grid; grid-template-columns: auto 1fr; gap: .3rem .8rem; margin: .6rem 0 0; font-size: .88rem; }
.info-hc dt { color: var(--grau); }
.info-hc dd { margin: 0; }

@media (max-width: 640px) {
  html { font-size: 14px; }
  main { padding: .8rem; }
  .kopf { padding: .6rem .8rem; }
  .filter select { max-width: none; flex: 1 1 45%; }
}
@media print {
  .kopf, .filter, .leiste .knopf, .aktionen { display: none; }
  body { background: #fff; }
  .tabelle-scroll { border: 0; overflow: visible; }
}
