:root {
  --bg: #f5f5f3; --card: #fff; --text: #1b1b1b; --muted: #6b6b6b; --line: #e2e2de;
  --accent: #c62828; --accent-soft: #fdecea; --ok: #2e7d32; --ok-soft: #e8f5e9; --warn: #8a6100; --warn-soft: #fff6dc;
  --head: #111; --chip: #efefec;
}
* { box-sizing: border-box; }
body { margin: 0; font: 15px/1.45 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; background: var(--bg); color: var(--text); }
a { color: inherit; }
header.top { background: var(--head); color: #fff; }
header.top .in { max-width: 1280px; margin: 0 auto; display: flex; align-items: center; gap: 22px; padding: 0 20px; height: 54px; }
.brand { font-weight: 800; letter-spacing: 3px; text-decoration: none; white-space: nowrap; }
.brand small { font-weight: 400; letter-spacing: 0; color: #bbb; margin-left: 6px; }
nav.main { display: flex; gap: 2px; flex: 1; overflow-x: auto; }
nav.main a { color: #ddd; text-decoration: none; padding: 7px 11px; border-radius: 6px; white-space: nowrap; font-size: 14px; }
nav.main a:hover { background: #2a2a2a; color: #fff; }
nav.main a.on { background: #fff; color: #111; font-weight: 600; }
.who { display: flex; gap: 8px; align-items: center; font-size: 13px; color: #bbb; white-space: nowrap; }
.who form { margin: 0; }
.who button { background: none; border: 1px solid #555; color: #ddd; padding: 4px 9px; border-radius: 6px; cursor: pointer; }
main { max-width: 1280px; margin: 0 auto; padding: 22px 20px 60px; }
h1 { font-size: 24px; margin: 0 0 4px; }
h2 { font-size: 17px; margin: 0 0 12px; }
.sub { color: var(--muted); margin: 0 0 18px; }
.row { display: flex; gap: 16px; flex-wrap: wrap; align-items: flex-start; }
.grow { flex: 1; min-width: 300px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 18px; margin-bottom: 18px; }
.card.tight { padding: 0; overflow: hidden; }
.card.tight h2 { padding: 16px 18px 0; }
.kopf { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.monatwahl { display: flex; align-items: center; gap: 6px; }
.monatwahl a, .monatwahl input { border: 1px solid var(--line); background: #fff; border-radius: 7px; padding: 6px 10px; text-decoration: none; font: inherit; }
table { width: 100%; border-collapse: collapse; }
th { text-align: left; font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); font-weight: 600; padding: 9px 10px; border-bottom: 1px solid var(--line); background: #fafaf8; }
td { padding: 8px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
tr:last-child td { border-bottom: 0; }
td.r, th.r { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
tr.we td { background: #fafaf7; color: #888; }
tr.heute td { box-shadow: inset 3px 0 0 var(--accent); }
tr.sum td { font-weight: 700; background: #fafaf8; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.chip { display: inline-block; padding: 2px 8px; border-radius: 99px; background: var(--chip); font-size: 12px; white-space: nowrap; }
.chip.ok { background: var(--ok-soft); color: var(--ok); }
.chip.warn { background: var(--warn-soft); color: var(--warn); }
.chip.rot { background: var(--accent-soft); color: var(--accent); }
form.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 12px; align-items: end; }
form.grid .w2 { grid-column: span 2; }
form.grid .wfull { grid-column: 1 / -1; }
label { display: block; font-size: 12px; font-weight: 600; color: var(--muted); margin-bottom: 4px; }
input, select, textarea { width: 100%; font: inherit; padding: 8px 10px; border: 1px solid #cfcfca; border-radius: 7px; background: #fff; color: var(--text); }
textarea { min-height: 70px; }
input[type=checkbox] { width: auto; }
.check { display: flex; gap: 8px; align-items: center; font-size: 14px; color: var(--text); font-weight: 400; padding: 8px 0; }
button, .btn { display: inline-block; font: inherit; font-weight: 600; padding: 8px 14px; border-radius: 7px; border: 1px solid #111; background: #111; color: #fff; cursor: pointer; text-decoration: none; white-space: nowrap; }
.btn.sec, button.sec { background: #fff; color: #111; border-color: #cfcfca; }
.btn.klein, button.klein { padding: 4px 9px; font-size: 13px; font-weight: 500; }
button.del { background: none; border: none; color: var(--accent); padding: 2px 4px; font-weight: 500; font-size: 13px; }
form.inline { display: inline; margin: 0; }
.flash { padding: 10px 14px; border-radius: 8px; margin-bottom: 14px; background: var(--ok-soft); color: var(--ok); }
.flash.fehler { background: var(--accent-soft); color: var(--accent); }
.flash.warn { background: var(--warn-soft); color: var(--warn); }
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 14px; margin-bottom: 18px; }
.kpi { background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 14px 16px; }
.kpi .z { font-size: 24px; font-weight: 700; font-variant-numeric: tabular-nums; }
.kpi .l { font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.actions { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
details summary { cursor: pointer; font-weight: 600; }
.scroll { overflow-x: auto; }
.login { max-width: 380px; margin: 10vh auto; }
.login .brand { display: block; text-align: center; font-size: 26px; color: #111; margin-bottom: 20px; }
@media (max-width: 760px) {
  header.top .in { flex-wrap: wrap; height: auto; padding: 10px 16px; gap: 8px; }
  nav.main { order: 3; width: 100%; }
  main { padding: 16px 16px 50px; }
  form.grid .w2 { grid-column: 1 / -1; }
  .hide-m { display: none; }
}
