:root {
  --grund: #f4f5f7; --karte: #fff; --text: #1d2330; --leise: #5d6675; --linie: #d9dde3;
  --akzent: #1f4fd1; --akzent-text: #fff; --gefahr: #b42318; --ok: #e7f6ec; --ok-text: #14532d;
  --fehler: #fdecea; --streifen: #f7f8fa;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --grund: #14171c; --karte: #1d2128; --text: #e6e9ee; --leise: #9aa3b2; --linie: #343a45;
    --akzent: #6d95ff; --akzent-text: #0b1020; --gefahr: #ff8a80; --ok: #12301f; --ok-text: #b7f0c8;
    --fehler: #3a1a17; --streifen: #222730;
  }
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--grund); color: var(--text); font: 16px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
a { color: var(--akzent); }
main { max-width: 1100px; margin: 0 auto; padding: 16px; }

.leiste { display: flex; flex-wrap: wrap; gap: 8px 20px; align-items: center; padding: 10px 16px; background: var(--karte); border-bottom: 1px solid var(--linie); }
.marke { font-weight: 700; text-decoration: none; color: var(--text); }
.leiste nav { display: flex; flex-wrap: wrap; gap: 4px; flex: 1; }
.leiste nav a, .unternav a { padding: 6px 10px; border-radius: 6px; text-decoration: none; color: var(--text); }
.leiste nav a.aktiv, .unternav a.aktiv { background: var(--grund); font-weight: 600; }
.abmelden { margin: 0; }
.unternav { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 12px; }

.karte { background: var(--karte); border: 1px solid var(--linie); border-radius: 10px; padding: 16px 18px; margin-bottom: 16px; }
.karte.schmal { max-width: 420px; margin: 40px auto; }
.karte.hervor { border-color: var(--akzent); }
.gedimmt { opacity: .6; }
h1 { font-size: 1.3rem; margin: 0 0 12px; }
h2 { font-size: 1.1rem; margin: 18px 0 10px; }
h3.tag { font-size: .95rem; margin: 14px 0 6px; color: var(--leise); }
.klein { font-size: .85rem; color: var(--leise); }
.pre { white-space: pre-line; }

.stapel { display: flex; flex-direction: column; gap: 12px; }
.raster { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.raster .breit { grid-column: span 2; }
@media (max-width: 420px) { .raster .breit { grid-column: 1 / -1; } }
label { display: flex; flex-direction: column; gap: 4px; font-size: .9rem; font-weight: 600; }
label.haken { flex-direction: row; align-items: center; gap: 8px; font-weight: 400; }
input, select, textarea { font: inherit; padding: 9px 10px; border: 1px solid var(--linie); border-radius: 7px; background: var(--karte); color: var(--text); width: 100%; min-width: 0; }
input[type=checkbox] { width: auto; }
input[type=color] { padding: 2px; height: 42px; }
input.kurz { max-width: 80px; }
textarea { resize: vertical; }
input:focus, select:focus, textarea:focus, button:focus-visible { outline: 2px solid var(--akzent); outline-offset: 1px; }

button, .knopf { font: inherit; font-weight: 600; padding: 9px 16px; border-radius: 7px; border: 1px solid var(--akzent); background: var(--akzent); color: var(--akzent-text); cursor: pointer; text-decoration: none; display: inline-block; }
button.leise, .knopf.leise { background: transparent; color: var(--akzent); }
button.gefahr { background: transparent; border-color: var(--gefahr); color: var(--gefahr); }
.zeile { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
form.rechts { display: flex; justify-content: flex-end; margin-top: 12px; }
form.inline { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: 4px 0 0; }
form.inline input:not(.kurz) { max-width: 220px; }
form.inline select { max-width: 130px; }
form.inline button { padding: 6px 10px; }
.filter { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end; margin-bottom: 12px; }
.filter label { min-width: 150px; }

.hinweis { padding: 10px 14px; border-radius: 8px; }
.hinweis.ok { background: var(--ok); color: var(--ok-text); }
.hinweis.fehler { background: var(--fehler); color: var(--gefahr); }

.eintraege, .liste, .personen { list-style: none; margin: 0; padding: 0; }
.eintraege li a { display: grid; grid-template-columns: auto 1fr; gap: 2px 12px; padding: 8px 10px; border: 1px solid var(--linie); border-radius: 8px; margin-bottom: 6px; color: var(--text); text-decoration: none; }
.eintraege .zeit { grid-row: span 2; color: var(--leise); font-size: .9rem; min-width: 110px; }
.eintraege .projekt { font-weight: 600; font-size: .9rem; }
.eintraege .text { white-space: pre-line; }
.liste li { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; align-items: center; padding: 6px 0; border-bottom: 1px solid var(--linie); }
.liste li form { margin: 0; }
.personen li { padding: 10px 0; border-bottom: 1px solid var(--linie); }
.summen { margin: 12px 0 0; padding-left: 18px; }
.link { font-family: ui-monospace, Consolas, monospace; font-size: .85rem; }

.tabelle-rahmen { overflow-x: auto; }
.tabelle { width: 100%; border-collapse: collapse; font-size: .9rem; }
.tabelle th, .tabelle td { border: 1px solid var(--linie); padding: 5px 7px; text-align: left; vertical-align: top; }
.tabelle th { background: var(--grund); }
.tabelle tbody tr:nth-child(even) td { background: var(--streifen); }
.tabelle tr.leer td { color: var(--leise); }
.tabelle tfoot td { background: var(--grund); }
.tabelle.spalten input[type=text], .tabelle.spalten input:not([type]) { padding: 5px 8px; }
.zahl { text-align: right !important; }
.nowrap { white-space: nowrap; }

.vorschau .vkopf { display: flex; justify-content: space-between; gap: 16px; align-items: flex-start; }
.vorschau .vkopf img, .logo-zeile img { max-width: 200px; max-height: 64px; }
.logo-zeile { display: flex; gap: 16px; align-items: center; }
.vtitel { margin: 18px 0 10px; }
.unterschriften { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; margin-top: 48px; }
.unterschriften span { border-top: 1px solid var(--leise); padding-top: 4px; font-size: .85rem; color: var(--leise); }
[hidden] { display: none !important; }
@media (max-width: 600px) {
  .leiste { gap: 6px 12px; }
  .leiste nav { order: 3; flex-basis: 100%; }
  .leiste nav a { padding: 4px 8px; }
  .abmelden { margin-left: auto; }
  .abmelden button { padding: 5px 10px; }
}
.fuss { max-width: 1100px; margin: 0 auto; padding: 8px 16px 24px; font-size: .85rem; color: var(--leise); }
.text { max-width: 760px; }
.text h2 { margin-top: 22px; }
.text li { margin-bottom: 6px; }
.klein-knopf { padding: 4px 10px; font-size: .85rem; }
details.loeschen { margin-top: 6px; }
details.loeschen summary { cursor: pointer; }
.mit-knopf { display: flex; gap: 6px; align-items: center; }
.mit-knopf input { flex: 1; }
