:root {
  --bg: #f5f4f0;
  --card: #ffffff;
  --text: #1f2328;
  --muted: #646a73;
  --line: #e2e0d9;
  --accent: #2f6f5e;
  --accent-text: #ffffff;
  --accent-soft: #e3efe9;
  --warn: #a4430d;
  --warn-soft: #fbe9dd;
  --err: #b42318;
  --err-soft: #fde8e6;
  --s-neu: #2457a6;
  --s-in_arbeit: #8a5a00;
  --s-fertig: #2f6f5e;
  --s-abgeholt: #646a73;
  --s-abgelehnt: #b42318;
  --radius: 12px;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #15171a;
    --card: #1e2125;
    --text: #e6e6e3;
    --muted: #9aa0a8;
    --line: #30343a;
    --accent: #5fb39a;
    --accent-text: #0d1f19;
    --accent-soft: #1d3029;
    --warn: #f0a46c;
    --warn-soft: #3a2618;
    --err: #f2867a;
    --err-soft: #3b1d1a;
    --s-neu: #7aa7ec;
    --s-in_arbeit: #e3b55c;
    --s-fertig: #5fb39a;
    --s-abgeholt: #9aa0a8;
    --s-abgelehnt: #f2867a;
  }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
.wrap { max-width: 760px; margin: 0 auto; padding: 24px 16px 64px; }
header.top { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 20px; }
header.top a { color: var(--muted); text-decoration: none; font-size: 14px; }
h1 { font-size: 26px; line-height: 1.2; margin: 0 0 6px; }
h2 { font-size: 18px; margin: 28px 0 10px; }
h3 { font-size: 15px; margin: 0 0 8px; }
p { margin: 0 0 12px; }
.muted { color: var(--muted); }
.small { font-size: 14px; }
a { color: var(--accent); }
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
  margin-bottom: 14px;
}
label { display: block; font-weight: 600; font-size: 14px; margin: 14px 0 6px; }
label .opt { font-weight: 400; color: var(--muted); }
input[type=text], input[type=email], input[type=password], input[type=number], input[type=date],
select, textarea {
  width: 100%;
  font: inherit;
  color: var(--text);
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
}
textarea { min-height: 110px; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
input[type=file] { font: inherit; font-size: 14px; max-width: 100%; }
.row { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; }
@media (max-width: 520px) { .row { grid-template-columns: 1fr; } }
.choice { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.choice label {
  margin: 0;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 14px;
  cursor: pointer;
  background: var(--bg);
}
.choice label small { display: block; font-weight: 400; color: var(--muted); }
.choice input { margin-right: 6px; }
.choice label:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
button, .btn {
  display: inline-block;
  font: inherit;
  font-weight: 600;
  border: 1px solid var(--accent);
  background: var(--accent);
  color: var(--accent-text);
  border-radius: 8px;
  padding: 10px 16px;
  cursor: pointer;
  text-decoration: none;
}
button.secondary, .btn.secondary { background: transparent; color: var(--accent); }
button.danger { background: transparent; border-color: var(--err); color: var(--err); }
button.big { width: 100%; padding: 13px; margin-top: 18px; font-size: 17px; }
.btns { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.alert { border-radius: 10px; padding: 12px 14px; margin-bottom: 14px; }
.alert.err { background: var(--err-soft); color: var(--err); }
.alert.ok { background: var(--accent-soft); }
.alert ul { margin: 0; padding-left: 18px; }
.badge {
  display: inline-block;
  font-size: 13px;
  font-weight: 600;
  padding: 2px 10px;
  border-radius: 999px;
  border: 1px solid currentColor;
  white-space: nowrap;
}
.s-neu { color: var(--s-neu); }
.s-in_arbeit { color: var(--s-in_arbeit); }
.s-fertig { color: var(--s-fertig); }
.s-abgeholt { color: var(--s-abgeholt); }
.s-abgelehnt { color: var(--s-abgelehnt); }
.urgent { color: var(--warn); font-weight: 600; }
dl.facts { display: grid; grid-template-columns: max-content 1fr; gap: 4px 16px; margin: 0; }
dl.facts dt { color: var(--muted); }
dl.facts dd { margin: 0; overflow-wrap: anywhere; }
.pre { white-space: pre-wrap; overflow-wrap: anywhere; }
ul.files { list-style: none; margin: 0; padding: 0; }
ul.files li { padding: 6px 0; border-bottom: 1px solid var(--line); overflow-wrap: anywhere; }
ul.files li:last-child { border-bottom: 0; }
.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li { padding: 10px 0 10px 14px; border-left: 2px solid var(--line); margin-left: 4px; }
.timeline li .when { font-size: 13px; color: var(--muted); }
.timeline li.mail_in { border-left-color: var(--s-neu); }
.timeline li.mail_out { border-left-color: var(--accent); }
.timeline li.note { border-left-color: var(--s-in_arbeit); }
.timeline li.system .pre { color: var(--warn); }
.list { list-style: none; margin: 0; padding: 0; }
.list li { border-bottom: 1px solid var(--line); }
.list li:last-child { border-bottom: 0; }
.list a { display: block; padding: 12px 2px; color: inherit; text-decoration: none; }
.list a:hover .t { text-decoration: underline; }
.list .t { font-weight: 600; overflow-wrap: anywhere; }
.list .meta { font-size: 14px; color: var(--muted); }
.dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--s-neu); margin-right: 6px; vertical-align: middle; }
details summary { cursor: pointer; font-weight: 600; }
.check { display: flex; gap: 8px; align-items: center; font-weight: 400; }
.check input { width: auto; }
.inline-form { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.inline-form select, .inline-form input { width: auto; flex: 1 1 140px; }
.card > .row:first-child > div:first-child > label { margin-top: 0; }
@media (min-width: 521px) { .card > .row:first-child > div:nth-child(2) > label { margin-top: 0; } }
.sbtns { display: flex; flex-wrap: wrap; gap: 8px; }
.sbtns .sbtn {
  flex: 1 1 auto;
  background: transparent;
  border: 1px solid currentColor;
  padding: 11px 14px;
  font-weight: 600;
}
.sbtns .sbtn:hover { background: color-mix(in srgb, currentColor 10%, transparent); }
.sbtns .sbtn.current {
  background: color-mix(in srgb, currentColor 18%, transparent);
  border-width: 2px;
  cursor: default;
}
