:root {
  --bg: #f5f6f8; --card: #ffffff; --text: #1d2330; --muted: #5d6676;
  --line: #e2e5ea; --accent: #242c53; --accent-text: #ffffff;
  --navy: #242c53; --gold: #cdbf3f; --soft: #f0f1f6;
  --ok-bg: #e7f4ec; --ok: #1d6b3c; --warn-bg: #fdf1e1; --warn: #8a5300;
  --err-bg: #fbe9e9; --err: #9b1c1c;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #12151b; --card: #1b2029; --text: #e6e9ef; --muted: #9aa3b2;
    --line: #2c3340; --accent: #cdbf3f; --accent-text: #1a1f3a; --soft: #222835;
    --ok-bg: #16301f; --ok: #7fd3a0; --warn-bg: #3a2a12; --warn: #f0b867;
    --err-bg: #3a1a1a; --err: #f19c9c;
  }
}
* { 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; }
/* Markenleiste bleibt in beiden Farbmodi weiss, damit das Logo stimmt */
header { background: #fff; border-bottom: 3px solid var(--gold); }
.wrap { max-width: 960px; margin: 0 auto; padding: 0 16px; }
header .wrap { display: flex; align-items: center; gap: 14px; padding-top: 14px; padding-bottom: 14px; }
header svg { width: 46px; height: 50px; flex: none; }
header .marke { font-size: 22px; font-weight: 500; letter-spacing: .32em; color: var(--navy); }
header .titel { margin-left: auto; text-align: right; color: var(--navy); }
header h1 { font-size: 17px; margin: 0; font-weight: 600; }
header span { display: block; color: #5d6676; font-size: 13px; }
main { padding: 28px 0 48px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 22px; }
.card + .card { margin-top: 20px; }
form { display: grid; grid-template-columns: 1fr 1fr 140px auto; gap: 14px; align-items: end; }
.veraltet { margin: 0 0 14px; padding: 10px 12px; border-radius: 8px; background: var(--warn-bg); color: var(--warn); font-size: 14px; }
label { display: block; font-size: 14px; color: var(--muted); margin-bottom: 5px; }
input { width: 100%; padding: 10px 12px; font: inherit; color: var(--text); background: var(--bg);
        border: 1px solid var(--line); border-radius: 7px; }
input:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
button.go { padding: 10px 22px; font: inherit; font-weight: 600; border: 0; border-radius: 7px;
            background: var(--accent); color: var(--accent-text); cursor: pointer; }
button.go:disabled { opacity: .6; cursor: wait; }
.hint { color: var(--muted); font-size: 14px; margin: 14px 0 0; }
.msg { margin-top: 18px; padding: 12px 14px; border-radius: 8px; background: var(--err-bg); color: var(--err); }
.kopf { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 16px; margin-bottom: 16px; }
.kopf h2 { font-size: 19px; margin: 0; }
.kopf .meta { color: var(--muted); font-size: 14px; }
.infos { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-bottom: 18px; }
.info { background: var(--soft); border-radius: 8px; padding: 12px 14px; font-size: 15px; }
.info h3 { margin: 0 0 4px; font-size: 13px; font-weight: 600; color: var(--muted); }
.info p { margin: 0; }
.info a { color: var(--text); }
.erledigt { padding: 12px 14px; border-radius: 8px; background: var(--ok-bg); color: var(--ok); }
table { width: 100%; border-collapse: collapse; font-size: 15px; }
th, td { text-align: left; padding: 10px 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-size: 13px; color: var(--muted); font-weight: 600; }
td.num, th.num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.art { color: var(--muted); font-size: 13px; }
.pill { display: inline-block; padding: 3px 9px; border-radius: 999px; font-size: 14px; white-space: nowrap; }
.termin { background: var(--ok-bg); color: var(--ok); }
.team { background: var(--warn-bg); color: var(--warn); }
h2.weitere { font-size: 17px; margin: 0 0 4px; }
.weitere-hint { color: var(--muted); font-size: 14px; margin: 0 0 12px; }
.liste { list-style: none; margin: 0; padding: 0; }
.liste li + li { border-top: 1px solid var(--line); }
.liste button { all: unset; box-sizing: border-box; width: 100%; display: grid; cursor: pointer;
                grid-template-columns: 110px 100px 1fr auto; gap: 12px; padding: 11px 6px; border-radius: 6px; }
.liste button:hover, .liste button:focus-visible { background: var(--soft); }
.liste .nr { font-weight: 600; }
.liste .dat, .liste .ort { color: var(--muted); }
.liste .anz { white-space: nowrap; font-size: 14px; }
@media (max-width: 640px) {
  form, .infos { grid-template-columns: 1fr; }
  thead { display: none; }
  tr { display: block; padding: 10px 0; border-bottom: 1px solid var(--line); }
  td { display: flex; justify-content: space-between; gap: 12px; border: 0; padding: 3px 0; text-align: right; }
  td::before { content: attr(data-l); color: var(--muted); font-size: 13px; text-align: left; }
  td.artikel { display: block; text-align: left; }
  td.artikel::before { content: none; }
  .liste button { grid-template-columns: 1fr auto; }
  .liste .ort { grid-column: 1 / -1; }
}
.defs { display: none; }
