:root {
  --bg: #f6f6f4;
  --karte: #fff;
  --text: #1f2328;
  --leise: #5b636b;
  --linie: #dcdcd6;
  --akzent: #2f5d8a;
  --akzent-text: #fff;
  --fehler: #a33a2a;
}
@media (prefers-color-scheme: dark) {
  :root { --bg: #17191c; --karte: #202327; --text: #e8e8e4; --leise: #a0a7ad; --linie: #34383d; --akzent: #7fb0e0; --akzent-text: #0f1f2e; --fehler: #e8806f; }
}
* { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
a { color: var(--akzent); }
.kopf {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: .5rem 1rem; padding: .75rem 1rem;
  background: var(--karte); border-bottom: 1px solid var(--linie);
}
.marke { font-weight: 600; text-decoration: none; color: var(--text); }
.nav { display: flex; flex-wrap: wrap; align-items: center; gap: .25rem 1rem; }
.nav a { text-decoration: none; padding: .25rem 0; }
.inline { display: inline; margin: 0; }
button.link {
  background: none; border: 0; padding: .25rem 0; font: inherit;
  color: var(--akzent); cursor: pointer; width: auto;
}
.inhalt { max-width: 60rem; margin: 0 auto; padding: 1rem; }
.karte {
  background: var(--karte); border: 1px solid var(--linie);
  border-radius: 8px; padding: 1rem 1.25rem; margin-bottom: 1rem;
}
.schmal { max-width: 26rem; margin-left: auto; margin-right: auto; }
h1 { font-size: 1.4rem; margin: 0 0 .75rem; }
h2 { font-size: 1.1rem; margin: 1.25rem 0 .5rem; }
label { display: block; margin: .75rem 0 .25rem; font-weight: 500; }
input[type=text], input[type=password], input:not([type]) {
  width: 100%; padding: .55rem .6rem; font: inherit;
  color: var(--text); background: var(--bg);
  border: 1px solid var(--linie); border-radius: 6px;
}
button[type=submit], button[type=button] {
  margin-top: 1rem; padding: .6rem 1rem; font: inherit; cursor: pointer;
  color: var(--akzent-text); background: var(--akzent); border: 0; border-radius: 6px;
}
button.link[type=submit] { margin: 0; color: var(--akzent); background: none; padding: .25rem 0; }
.fehler { color: var(--fehler); margin: .4rem 0; }
.hinweis { background: var(--bg); border-left: 3px solid var(--akzent); padding: .5rem .75rem; }
.hilfe { color: var(--leise); font-size: .875rem; }
.hilfe ul { margin: .25rem 0; padding-left: 1.2rem; }
.meldungen { list-style: none; margin: 0 0 1rem; padding: 0; }
.meldungen li { background: var(--karte); border: 1px solid var(--linie); border-left: 3px solid var(--akzent); padding: .5rem .75rem; border-radius: 6px; }
.meldungen li.error { border-left-color: var(--fehler); }

/* Wochenseite */
.inhalt.breit { max-width: 90rem; }
.unsichtbar { position: absolute; left: -9999px; }
select { font: inherit; padding: .4rem .5rem; color: var(--text); background: var(--bg); border: 1px solid var(--linie); border-radius: 6px; }
button:disabled { opacity: .5; cursor: not-allowed; }
button.zweit, button.klein { color: var(--text); background: var(--bg); border: 1px solid var(--linie); }
.wochenkopf { margin-bottom: 1rem; }
.kopfzeile { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem 1.5rem; }
.wochenwahl { display: flex; gap: .5rem; align-items: center; margin: 0; }
.macstatus { margin: 0; color: var(--leise); }
.macstatus.wartet { color: var(--fehler); }
.wochenaktionen { display: flex; flex-wrap: wrap; gap: .5rem 1rem; }
.wochenaktionen button { margin-top: .75rem; }
.hinweis.probe { margin: .75rem 0 0; }
.auftraege { list-style: none; margin: .75rem 0 0; padding: 0; }
.auftraege li { display: flex; flex-wrap: wrap; gap: .25rem 1rem; align-items: center; }
.zwei { display: grid; grid-template-columns: 38fr 62fr; gap: 1rem; align-items: start; }
.liste, .detail { background: var(--karte); border: 1px solid var(--linie); border-radius: 8px; }
.detail { padding: 1rem 1.25rem; min-width: 0; }
.themenliste { list-style: none; margin: 0; padding: 0; }
.themenliste li { border-bottom: 1px solid var(--linie); }
.themenliste li:last-child { border-bottom: 0; }
.themenliste a { display: flex; gap: .75rem; padding: .7rem .9rem; text-decoration: none; color: var(--text); align-items: flex-start; }
.themenliste li.aktiv { background: var(--bg); box-shadow: inset 3px 0 0 var(--akzent); }
.themenliste li.abgelehnt { opacity: .6; }
.themenliste .nr { font-weight: 600; min-width: 1.5rem; color: var(--leise); }
.themenliste .text { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.themenliste .meta { color: var(--leise); font-size: .85rem; }
.marken { display: flex; flex-direction: column; align-items: flex-end; gap: .15rem; font-size: .8rem; }
.detail .marken { flex-direction: row; justify-content: flex-start; gap: .5rem; }
.marken span { border: 1px solid var(--linie); border-radius: 999px; padding: 0 .5rem; white-space: nowrap; }
.marke-vorgemerkt, .marke-abgeschickt, .radar-fertig { border-color: var(--akzent) !important; }
.marke-abgelehnt, .radar-fehler, .radar-aufgegeben { border-color: var(--fehler) !important; color: var(--fehler); }
.leise { color: var(--leise); }
.zurueck { display: none; margin: 0 0 .5rem; }
.reiter { display: flex; flex-wrap: wrap; gap: .25rem; border-bottom: 1px solid var(--linie); margin: 1rem 0; }
.reiter a { padding: .4rem .8rem; text-decoration: none; border-bottom: 2px solid transparent; color: var(--leise); }
.reiter a.aktiv { color: var(--text); border-bottom-color: var(--akzent); font-weight: 600; }
.detail h1 .nr { color: var(--leise); }
.fakten { display: grid; grid-template-columns: max-content 1fr; gap: .25rem 1rem; }
.fakten dt { color: var(--leise); }
.fakten dd { margin: 0; }
.entscheidung { display: flex; flex-wrap: wrap; gap: .5rem 1rem; align-items: flex-end; }
.entscheidung button { margin-top: 0; }
.ablehnen { display: flex; flex-wrap: wrap; gap: .5rem; align-items: flex-end; }
.ablehnen label { width: 100%; margin: 0; }
.ablehnen input[type=text] { flex: 1; min-width: 12rem; }
.probleme li { background: var(--bg); border-left: 3px solid var(--fehler); padding: .35rem .6rem; list-style: none; margin-bottom: .35rem; }
.markdown pre { overflow-x: auto; background: var(--bg); padding: .6rem; border-radius: 6px; }
.markdown table { border-collapse: collapse; }
.markdown th, .markdown td { border: 1px solid var(--linie); padding: .25rem .5rem; }
@media (max-width: 799px) {
  .zwei { grid-template-columns: 1fr; }
  .zwei.mit-detail .liste, .zwei:not(.mit-detail) .detail { display: none; }
  .zurueck { display: block; }
}

.entscheidungsbox { border: 1px solid var(--linie); border-radius: 8px; padding: .6rem .9rem; margin: .75rem 0; background: var(--bg); }
.entscheidungsbox p { margin: .25rem 0; }
.entscheidungsbox .entscheidung { margin-top: .5rem; }
.klein { font-size: .85rem; }
.ergebnisse { list-style: none; padding: 0; }
.ergebnisse li { border-bottom: 1px solid var(--linie); padding: .5rem 0; }
.ergebnisse p { margin: .25rem 0; }
.urteil { font-size: .8rem; border-radius: 999px; padding: .05rem .55rem; border: 1px solid var(--linie); }
.urteil-ok { color: #1f6b3a; border-color: #1f6b3a; }
.urteil-warn { color: #8a5a00; border-color: #8a5a00; }
.urteil-schlecht { color: var(--fehler); border-color: var(--fehler); }
@media (prefers-color-scheme: dark) {
  .urteil-ok { color: #7fd09a; border-color: #7fd09a; }
  .urteil-warn { color: #f0c060; border-color: #f0c060; }
}
.keine-probleme { color: var(--leise); }

/* Adminbereich */
.tabelle { width: 100%; border-collapse: collapse; margin-bottom: 1rem; }
.tabelle th, .tabelle td { text-align: left; padding: .4rem .5rem; border-bottom: 1px solid var(--linie); vertical-align: middle; }
.zeile { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; margin: 0; }
.zeile form { margin: 0; }
code.einmal { display: inline-block; padding: .4rem .7rem; font-size: 1.15rem; background: var(--bg); border: 1px solid var(--linie); border-radius: 6px; word-break: break-all; user-select: all; }
button[type=submit].gefahr { color: #fff; background: #a33a2a; }
@media (prefers-color-scheme: dark) {
  button[type=submit].gefahr { color: #1c0a07; background: #f0948a; }
}
