/* ProDok · Verein Protect – Pflaume und Sand wie auf verein-protect.at, Systemschrift, immer hell */
:root { --plum: #5b2a4e; --plum-2: #7a3b69; --sand: #f1e4cf; --sand-2: #f8f1e6; --fg: #241c22; --muted: #6b6168; --line: #e3d8cb; --bg: #fffdfa; --card: #fff;
  --ok: #2f6b3e; --ok-bg: #e5f2e8; --warn: #a3361f; --warn-bg: #fbeae6; --mid: #8a5a00; --mid-bg: #fbf0d9; --on: #fff; color-scheme: light; }
* { box-sizing: border-box; }
body { margin: 0; font: 15px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; color: var(--fg); background: var(--bg); }
main { max-width: 1200px; margin: 0 auto; padding: 16px 16px 64px; }
h1 { font-size: 1.45rem; margin: 8px 0 14px; } h2 { font-size: 1.08rem; margin: 4px 0 10px; } h1 small { font-weight: 400; font-size: .9rem; }
a { color: var(--plum-2); } .muted { color: var(--muted); } .small { font-size: .85rem; } .nowrap { white-space: nowrap; } .pre { white-space: pre-wrap; }
.err { color: var(--warn); font-weight: 600; } .warn { color: var(--warn); font-weight: 600; }
.flash { background: var(--ok-bg); color: var(--ok); padding: 10px 14px; border-radius: 10px; font-weight: 500; }

/* Kopf */
.top { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 20px; padding: 10px 16px; background: var(--sand-2); border-bottom: 1px solid var(--line); }
.brand { display: flex; align-items: center; gap: 8px; text-decoration: none; color: var(--fg); font-weight: 700; letter-spacing: .04em; }
.brand small { font-weight: 400; color: var(--muted); letter-spacing: 0; }
.nav { display: flex; flex-wrap: wrap; gap: 2px; flex: 1; }
.nav a { padding: 6px 10px; border-radius: 8px; text-decoration: none; color: var(--fg); }
.nav a:hover { background: var(--sand); } .nav a.on { background: var(--plum); color: var(--on); }
.who { font-size: .9rem; } .inline { display: inline; }
button.link { background: none; border: 0; padding: 0; margin: 0; color: var(--plum-2); text-decoration: underline; min-height: 0; font: inherit; cursor: pointer; }

/* Formulare */
label { display: block; margin: 10px 0 4px; font-weight: 500; font-size: .9rem; }
input, select, textarea { font: inherit; color: inherit; background: var(--card); border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; width: 100%; }
input[type=checkbox] { width: auto; accent-color: var(--plum); }
input:focus-visible, select:focus-visible, textarea:focus-visible, button:focus-visible, a:focus-visible { outline: 2px solid var(--plum-2); outline-offset: 1px; }
textarea { resize: vertical; }
label.check { display: flex; gap: 8px; align-items: center; font-weight: 400; margin: 6px 0; }
fieldset { border: 1px solid var(--line); border-radius: 10px; margin: 14px 0; padding: 4px 14px 12px; } legend { font-weight: 600; padding: 0 6px; }
.form { max-width: 820px; } .narrow { max-width: 420px; margin: 24px auto; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; } @media (max-width: 640px) { .two { grid-template-columns: 1fr; } }
button, .btn { display: inline-block; font: 600 .92rem system-ui, sans-serif; padding: 9px 16px; border-radius: 8px; border: 1px solid var(--plum); background: var(--plum); color: var(--on);
  cursor: pointer; text-decoration: none; margin: 12px 6px 0 0; min-height: 40px; }
button.ghost, .btn.ghost { background: transparent; color: var(--plum-2); }
button.small, .btn.small { min-height: 32px; padding: 5px 12px; margin-top: 4px; }
.head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px; }
.head .btn, .head h1, .head h2 { margin-top: 0; margin-bottom: 8px; }
.filter { display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: flex-end; background: var(--sand-2); border: 1px solid var(--line); border-radius: 10px; padding: 6px 12px 12px; margin-bottom: 14px; }
.filter label { margin: 4px 0 0; font-size: .82rem; } .filter label input, .filter label select { display: block; margin-top: 2px; width: auto; max-width: 240px; }
.filter label.check { font-size: .9rem; margin-bottom: 8px; } .filter button { margin-top: 0; }
.actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: flex-end; margin-top: 10px; } .actions label { margin: 0; } .actions input { width: 240px; display: block; }
.checks { max-height: 320px; overflow: auto; columns: 2 260px; }
.danger { margin-top: 24px; border-top: 1px solid var(--line); }
.qr { width: 200px; max-width: 100%; background: #fff; border-radius: 8px; margin: 8px 0; } .qr svg { display: block; width: 100%; height: auto; }

/* Tabellen */
.tw { overflow-x: auto; border: 1px solid var(--line); border-radius: 10px; background: var(--card); }
table { border-collapse: collapse; width: 100%; } th, td { padding: 7px 10px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line); }
thead th { background: var(--sand-2); font-size: .85rem; white-space: nowrap; } tbody tr:last-child td { border-bottom: 0; }
tfoot th { background: var(--sand-2); } .num { text-align: right; white-space: nowrap; }
tr.off { opacity: .55; } tr.done td { background: var(--ok-bg); }
table.tn td { padding: 4px 6px; } table.log .diff { font-size: .85rem; max-width: 560px; } del { color: var(--warn); }

/* Akte */
.card { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; margin: 12px 0; }
.tabs { display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 0 8px; } .tabs a { padding: 4px 12px; border: 1px solid var(--line); border-radius: 999px; text-decoration: none; background: var(--sand-2); }
dl { display: grid; grid-template-columns: max-content 1fr; gap: 4px 14px; margin: 6px 0; } dt { color: var(--muted); } dd { margin: 0; }
details summary { cursor: pointer; } details summary h2 { display: inline; }
.entry { border-left: 3px solid var(--plum-2); padding: 6px 12px; margin: 10px 0; background: var(--sand-2); border-radius: 0 8px 8px 0; }
.entry.note { border-color: var(--mid); } .entry.storno { opacity: .55; } .entry .meta { font-size: .87rem; color: var(--muted); margin-bottom: 4px; }
.tag { display: inline-block; font-size: .78rem; padding: 1px 8px; border-radius: 999px; background: var(--sand); color: var(--fg); }
.a-anwesend { color: var(--ok); } .a-entschuldigt { color: var(--mid); } .a-unentschuldigt { color: var(--warn); }
.tag.a-anwesend { background: var(--ok-bg); } .tag.a-entschuldigt { background: var(--mid-bg); } .tag.a-unentschuldigt { background: var(--warn-bg); }
.tag.s-aktiv { background: var(--ok-bg); color: var(--ok); } .tag.s-anfrage { background: var(--mid-bg); color: var(--mid); }

@media print { .top, .filter, .actions, button, .btn { display: none !important; } body { background: #fff; color: #000; } }
.filter .f label, .f { margin: 0; }
@media (max-width: 760px) {
  .top { padding: 8px 12px; } .who { margin-left: auto; }
  .nav { order: 3; flex: 0 0 100%; flex-wrap: nowrap; overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .nav a { white-space: nowrap; }
}
.conflict { border-color: var(--warn); background: var(--warn-bg); }
/* Gruppen */
.split { display: grid; grid-template-columns: 1.6fr 1fr; gap: 0 20px; align-items: start; } @media (max-width: 860px) { .split { grid-template-columns: 1fr; } }
ul.plain { list-style: none; padding: 0; margin: 0; } ul.plain li { padding: 5px 0; border-bottom: 1px solid var(--line); } ul.plain li:last-child { border-bottom: 0; }
.att-quick summary { cursor: pointer; color: var(--muted); font-size: .9rem; }
.att-quick label.att { display: flex; justify-content: space-between; align-items: center; gap: 10px; font-weight: 400; margin: 4px 0; }
.att-quick label.att select { width: auto; }
.inline-form { margin: 0; } .inline-form select { width: auto; }
details.quick { margin-top: 10px; } details.quick summary { cursor: pointer; font-weight: 500; }
.tabs.settings a.on { background: var(--plum); color: var(--on); border-color: var(--plum); }
table.tn textarea { min-height: 0; }
/* Anwesenheitsliste */
.print table.att-list td { height: 34px; } .print td.sig { width: 40%; }
.print-foot { margin-top: 24px; }
@media print { .noprint, .top { display: none !important; } main { padding: 0; } .print dl { margin-bottom: 16px; } }
table.radio { width: auto; margin: 6px 0; } table.radio th, table.radio td { padding: 4px 10px; border-bottom: 1px solid var(--line); background: none; }
table.radio thead th { font-size: .8rem; font-weight: 500; color: var(--muted); } table.radio td { text-align: center; }
table.radio input[type=radio] { width: 20px; height: 20px; accent-color: var(--plum); }
table.radio tbody th { font-weight: 400; text-align: left; }
.betreuung > .head { margin-top: 18px; }
.intro { color: var(--muted); max-width: 820px; margin: -6px 0 14px; font-size: .93rem; }
.demo { background: var(--warn-bg); color: var(--warn); padding: 8px 14px; border-radius: 10px; font-weight: 600; }
.kw { margin-left: 8px; font-size: .85rem; color: var(--muted); white-space: nowrap; }
.leistung { margin: 4px 0; font-size: .9rem; }
fieldset.rechte { columns: 2 320px; } fieldset.rechte legend { column-span: all; }
label.scope { display: flex; gap: 10px; align-items: center; font-weight: 500; margin: 6px 0; break-inside: avoid; } label.scope select { width: auto; }
fieldset.rechte label.check { break-inside: avoid; }
.icd-hits { display: flex; flex-direction: column; align-items: flex-start; gap: .25rem; margin-top: .35rem; max-height: 14rem; overflow: auto; }
