:root {
  --blue: #1f4f7f;
  --blue2: #4a78b0;
  --bg: #f3f5f9;
  --card: #fff;
  --text: #1d2430;
  --muted: #6b7380;
  --line: #d4d9e2;
  --ok: #2e7d32;
  --err: #c62828;
}
* { box-sizing: border-box; }
body { margin: 0; font: 16px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; background: var(--bg); color: var(--text); }
[hidden] { display: none !important; }

.top { background: #0e2a47; color: #fff; padding: 12px 16px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; }
.top h1 { margin: 0; font-size: 1.3rem; }
.top nav { display: flex; flex-wrap: wrap; gap: 6px; }
.top nav a { color: #fff; text-decoration: none; padding: 6px 10px; border-radius: 6px; background: rgba(255,255,255,.12); font-size: .9rem; }
.top nav a:hover { background: rgba(255,255,255,.25); }
.top nav a.active { background: #fff; color: var(--blue); font-weight: 600; }
/* Farbgruppen der Kopfleisten-Knöpfe */
.top nav .nav-admin  { background: #2f6fb5; }
.top nav .nav-help   { background: #0f8577; }
.top nav .nav-home   { background: #3f7d2a; }
.top nav .nav-logout { background: #b3261e; }
.top nav a.nav-admin:hover  { background: #3b82d0; }
.top nav a.nav-help:hover   { background: #13a08f; }
.top nav a.nav-home:hover   { background: #4b9532; }
.top nav .navbtn.nav-logout:hover { background: #d0302a; }
/* Knopf der gerade geöffneten Seite: inaktiv (blass, gestrichelt, nicht klickbar) – Gruppenfarbe bleibt erkennbar */
.top nav .nav-current { color: #fff; padding: 6px 10px; border-radius: 6px; font-size: .9rem;
  opacity: .45; border: 1px dashed rgba(255,255,255,.6); cursor: default; user-select: none; }
.top nav .nav-current:not(.nav-admin):not(.nav-help):not(.nav-home) { background: rgba(255,255,255,.12); }
/* Verwaltungs-Knopf rechts etwas abgesetzt */


main { padding: 16px; }
.card { background: var(--card); border-radius: 10px; padding: 16px 18px; max-width: 1100px; margin: 0 auto 16px; box-shadow: 0 1px 3px rgba(0,0,0,.08); }
/* Tabellen-Karten: genau so breit wie die Tabelle, höchstens Bildschirmbreite */
.card.fit { width: fit-content; max-width: 100%; }
.card h2 { margin: 0 0 8px; font-size: 1.15rem; color: var(--blue); }
.card-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 8px; }
.card-head h2 { margin: 0; }
.hint, .small { color: var(--muted); font-size: .9rem; }
.msg { padding: 10px 14px; border-radius: 8px; margin-bottom: 14px; font-weight: 600; }
.msg.ok { background: #e7f4e8; color: var(--ok); }
.msg.err { background: #fdeaea; color: var(--err); }

.name-form { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end; }
.name-form label { display: flex; flex-direction: column; font-size: .85rem; color: var(--muted); gap: 4px; flex: 1 1 200px; }
input[type=text], input[type=password], input[type=number], input[type=date], select, textarea { font: inherit; padding: 9px 11px; border: 1px solid var(--line); border-radius: 7px; }
input:focus { outline: 2px solid var(--blue2); outline-offset: 1px; }

.btn { display: inline-block; font: inherit; font-size: .95rem; padding: 9px 16px; border-radius: 7px; border: 1px solid var(--line); background: #fff; color: var(--text); text-decoration: none; cursor: pointer; }
.btn:hover { background: #eef2f8; }
.btn.primary { background: var(--blue); border-color: var(--blue); color: #fff; }
.btn.primary:hover { background: #173d63; }
.btn.small { padding: 5px 11px; font-size: .85rem; }
form.inline { display: inline; margin: 0; }
.actions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: flex-end; margin-top: 16px; }

.slot-groups { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.slot-group { border: 1px solid var(--line); border-radius: 9px; padding: 8px 14px 12px; margin: 0; }
.slot-group legend { font-weight: 700; color: var(--blue); padding: 0 6px; }
.slot-row { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; padding: 7px 0; border-bottom: 1px dashed var(--line); }
.slot-row:last-child { border-bottom: 0; }
.slot-time { min-width: 95px; font-weight: 600; }
.slot-boxes { display: flex; flex-wrap: wrap; gap: 6px; }
.chk { display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px; border: 1px solid var(--line); border-radius: 20px; cursor: pointer; user-select: none; font-size: .92rem; }
.chk input { width: 18px; height: 18px; margin: 0; accent-color: var(--blue); }
.chk:has(input:checked) { background: #e3ecf7; border-color: var(--blue2); }

.summary { padding-left: 20px; }
.summary li { margin: 3px 0; }

.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
table.overview { border-collapse: separate; border-spacing: 0; width: auto; font-size: .85rem; }
.overview th, .overview td { border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 4px 7px; text-align: center; white-space: nowrap; }
.overview thead tr:first-child th { border-top: 1px solid var(--line); }
.overview th:first-child, .overview td:first-child { border-left: 1px solid var(--line); }
.overview thead th { background: var(--blue); color: #fff; font-weight: 600; }
.overview thead th.task { background: var(--blue2); font-size: .75rem; white-space: normal; hyphens: manual; }
.overview th.name, .overview td.name { text-align: left; }
.overview td.field { text-align: left; min-width: 9em; }
.overview td.empty { color: var(--muted); font-style: italic; }
.overview tbody tr:nth-child(even) { background: #f6f8fb; }
/* Namensspalte bleibt beim seitlichen Scrollen stehen */
.overview .name { position: sticky; left: 0; z-index: 1; background: #fff; }
.overview thead .name { background: var(--blue); z-index: 2; }
.overview tbody tr:nth-child(even) td.name { background: #f6f8fb; }
.overview tfoot td.name { background: #d9ddeb; }
.overview td.mark.on { color: var(--blue); font-weight: 700; background: #e3ecf7; }
.overview tr.missing td.name { color: #9aa1ab; font-style: italic; }
.legend-missing { color: #9aa1ab; font-style: italic; }
.overview tfoot td { background: #d9ddeb; font-weight: 700; }
.overview td.wrap { white-space: normal; text-align: left; }
.btn-del { border: 0; background: none; color: var(--err); cursor: pointer; font-size: 1rem; }

.text-field { display: flex; flex-direction: column; gap: 6px; font-size: .92rem; padding-top: 6px; }
.text-field input { width: 100%; }

footer { text-align: center; color: var(--muted); font-size: .8rem; padding: 10px; }
footer a { color: var(--muted); }

/* ---------- Bedarf (Soll) in der Summenzeile ---------- */
.overview .need { font-weight: 400; opacity: .75; }
.overview tfoot td.low { background: #f9d9d9; color: var(--err); }
.overview tfoot td.full { background: #d6efd8; color: var(--ok); }
.legend-low { color: var(--err); font-weight: 600; }
.legend-full { color: var(--ok); font-weight: 600; }

/* ---------- Startseite ---------- */
.intro-text { margin-bottom: 14px; padding: 10px 14px; background: #f3f6fb; border-left: 4px solid var(--blue2); border-radius: 6px; }
.list-cards { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); max-width: 1100px; margin: 0 auto; }
.list-cards .card { margin: 0; display: flex; flex-direction: column; }
.list-card .actions { margin-top: auto; padding-top: 10px; }
.meta { display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: center; color: var(--muted); font-size: .9rem; margin: 0 0 10px; }
.badge { padding: 2px 9px; border-radius: 12px; font-size: .8rem; font-weight: 600; }
.badge.offen { background: #d6efd8; color: var(--ok); }
.badge.geschlossen { background: #eceff3; color: var(--muted); }
.actions.left { justify-content: flex-start; }

/* ---------- Verwaltung ---------- */
.top.admin { background: #161b22; }
.top.admin nav a.active { color: #2b3440; }
.navbtn { font: inherit; font-size: .9rem; color: #fff; padding: 6px 10px; border-radius: 6px; background: rgba(255,255,255,.12); border: 0; cursor: pointer; }
.navbtn:hover { background: rgba(255,255,255,.25); }
.card.narrow, .msg.narrow { max-width: 520px; margin-left: auto; margin-right: auto; }
.msg { max-width: 1100px; margin-left: auto; margin-right: auto; }
.msg ul { margin: 6px 0 0; padding-left: 20px; font-weight: 400; }
.stack { display: flex; flex-direction: column; gap: 12px; }
.stack label, .name-form label { display: flex; flex-direction: column; gap: 4px; font-size: .85rem; color: var(--muted); }
.stack .btn { align-self: flex-start; }
textarea { width: 100%; resize: vertical; }
select { max-width: 100%; }
.name-form label { min-width: 0; }
.btn.danger { color: var(--err); border-color: #e7b4b4; }
.btn.danger:hover { background: #fdeaea; }
table.admin-lists { border-collapse: collapse; width: 100%; font-size: .9rem; }
.admin-lists th, .admin-lists td { padding: 8px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: middle; }
.admin-lists th { background: #eef2f8; }
.admin-lists td.num { text-align: center; }
.admin-lists td.acts { display: flex; flex-wrap: wrap; gap: 5px; }
.status-select { padding: 5px 8px; font-size: .85rem; }
.status-select.offen { border-color: var(--ok); }
.status-select.entwurf { border-color: #d9a400; }
code { background: #eef2f8; padding: 1px 5px; border-radius: 4px; }

/* ---------- Editor ---------- */
/* zweispaltig: links Editor, rechts mitlaufende Vorschau (je halbe Breite); schmal → untereinander */
main.editor { padding-top: 12px; }
.editor-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.editor-col { min-width: 0; container-type: inline-size; container-name: editor; }
main.editor .card { max-width: none; margin: 0 0 16px; }
.preview-col { position: sticky; top: calc(var(--bar-h, 64px) + 12px); max-height: calc(100vh - var(--bar-h, 64px) - 24px);
  overflow-y: auto; overflow-x: hidden; min-width: 0; border-radius: 10px; }
main.editor .preview-col .card { margin: 0; border-top: 4px solid var(--blue2); }
.preview-title { font-weight: 700; margin: 0 0 8px; color: var(--text); }
.preview .overview td.ph { color: #9aa1ab; font-style: italic; }
.preview .overview td.hl { background: #fff8dc; }
.overview th.field { white-space: normal; min-width: 9em; max-width: 16em; vertical-align: middle; }
.overview th .fq, .overview th .fp { display: block; font-size: .72rem; font-weight: 400; line-height: 1.25; margin-top: 3px; }
.overview th .fp { font-style: italic; opacity: .8; }
.check.inline { align-items: center; gap: 6px; font-size: .85rem; color: var(--muted); padding-bottom: 8px; white-space: nowrap; }
.preview-sub { margin: 22px 0 4px; font-size: 1.05rem; color: var(--blue); border-top: 1px solid var(--line); padding-top: 14px; }
.form-preview { pointer-events: none; }
.form-preview .slot-groups { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.form-preview .hl { outline: 3px solid #f2b705; outline-offset: 2px; border-radius: 8px; background: #fff8dc; }
.preview .overview th.hl { background: #f2b705; color: #1d2430; box-shadow: inset 0 0 0 2px #b38600; }
.bar-preview { display: inline-block; }
body.preview-hidden .editor-layout { grid-template-columns: minmax(0, 1fr); }
body.preview-hidden .preview-col { display: none; }

@media (max-width: 1199px) {
  .editor-layout { grid-template-columns: minmax(0, 1fr); }
  .preview-col { position: static; max-height: none; overflow: visible; }
  body.preview-hidden .preview-col { display: block; }
  .bar-preview { display: none !important; }
}

.editor-bar { position: sticky; top: 0; z-index: 5; display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px;
  margin: 0 0 16px; padding: 10px 14px; background: #3a6ea5; color: #fff; border-radius: 10px; box-shadow: 0 2px 8px rgba(0,0,0,.25); }
/* Text und Link in der blauen Leiste hervorheben (Knöpfe bleiben unverändert) */
.editor-bar .bar-info, .editor-bar .palette-hint { color: #fff; font-weight: 600; font-size: .9rem; }
.editor-bar .bar-info a { color: #ffe08a; font-weight: 700; text-decoration: underline; text-underline-offset: 3px; }
.editor-bar .bar-info a:hover { color: #fff; }
.editor-bar .palette-hint.warn { color: #ffd2d2; }
.editor-bar > span:last-child { display: flex; gap: 6px; flex-wrap: wrap; }
.grid2 { display: grid; gap: 12px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
label.field { display: flex; flex-direction: column; gap: 4px; font-size: .85rem; color: var(--muted); }
label.field.wide { grid-column: 1 / -1; }
label.field input, label.field select, label.field textarea { color: var(--text); }
.checks { display: flex; flex-direction: column; gap: 8px; margin-top: 14px; }
.check { display: flex; gap: 10px; align-items: flex-start; cursor: pointer; }
.check input { width: 18px; height: 18px; margin-top: 2px; accent-color: var(--blue); }
.check small { display: block; color: var(--muted); }

.ibtn { font: inherit; font-size: .85rem; padding: 4px 9px; border-radius: 6px; border: 1px solid var(--line); background: #fff; color: var(--text); cursor: pointer; white-space: nowrap; }
.ibtn:hover { background: #eef2f8; }
.ibtn.del { color: var(--err); }
.ibtn.del:hover { background: #fdeaea; }
.ibtn.add { color: var(--blue); border-style: dashed; }
.ibtn.big { padding: 8px 14px; font-size: .95rem; }
.row-btns { display: inline-flex; gap: 4px; flex-wrap: nowrap; }

.groups { display: flex; flex-direction: column; gap: 14px; }
.group-card { border: 1px solid var(--line); border-left: 5px solid var(--blue); border-radius: 9px; padding: 10px 12px; background: #fbfcfe; }
.group-head { display: flex; gap: 8px; align-items: center; }
.grp-no { flex: none; width: 26px; height: 26px; border-radius: 50%; background: var(--blue); color: #fff; display: grid; place-items: center; font-size: .8rem; font-weight: 700; }
.group-label { flex: 1; min-width: 0; font-weight: 700; font-size: 1.05rem; }
.times-head { display: grid; grid-template-columns: minmax(330px, 380px) 1fr; gap: 10px; margin: 10px 0 2px; padding-left: 2px; }
.time-row { display: grid; grid-template-columns: minmax(330px, 380px) 1fr; gap: 10px; align-items: start; padding: 8px 0; border-top: 1px dashed var(--line); }
.time-main { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.time-label { flex: 1 1 90px; min-width: 0; }
.tasks { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.task-chip { display: inline-flex; align-items: center; gap: 4px; padding: 3px 4px 3px 3px; border: 1px solid var(--blue2); border-radius: 8px; background: #e9f0f9; }
.task-chip input[type=text] { padding: 5px 7px; width: 9.5em; }
.need-in { display: inline-flex; align-items: center; gap: 4px; font-size: .75rem; color: var(--muted); }
.need-in input { width: 4.2em; padding: 5px 6px; }
.single-in { cursor: pointer; }
.single-in input { width: auto; padding: 0; margin: 0; }
.group-foot { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 6px; }
.generator { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: 8px; padding: 8px; background: #eef2f8; border-radius: 7px; font-size: .9rem; }
.generator input { width: 4.5em; padding: 5px 6px; }

.fields { display: flex; flex-direction: column; gap: 10px; }
.field-row { display: grid; grid-template-columns: auto 1fr 90px auto; gap: 8px; align-items: end; padding: 10px; border: 1px solid var(--line); border-radius: 9px; background: #fbfcfe; }
.field-row input { width: 100%; min-width: 0; }
.field-row > .grip { align-self: center; }
.subs-wrap { grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: center; gap: 6px; padding-top: 4px; border-top: 1px dashed var(--line); }
.subs { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.sub-chip { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 6px; max-width: 100%; padding: 3px 6px 3px 3px; border: 1px solid var(--blue2); border-radius: 8px; background: #e9f0f9; }
.sub-chip input[type=text] { padding: 5px 7px; width: 11em; max-width: 100%; min-width: 0; }
.subs-wrap, .subs { min-width: 0; max-width: 100%; }
.field-row .subs-wrap { flex: 1 1 100%; }
.sub-chip .grip { width: 20px; min-height: 26px; font-size: 1rem; }
.sub-chip .check.inline { padding-bottom: 0; }
.subs { flex-direction: column; align-items: stretch; width: 100%; }
.sub-chip { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 4px 8px; padding: 6px 8px; }
.sub-fields { grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: flex-end; gap: 8px; }
.sub-chip.num { background: #fdf3dc; border-color: #d9a400; }
.sub-chip label.field { flex: 1 1 180px; }
.sub-chip label.field.unit-in { flex: 0 1 140px; }
.sub-chip label.field.calc-in { flex: 0 1 170px; }
.sub-chip .need-in { padding-bottom: 6px; }
.sub-type { font-size: .75rem; font-weight: 700; color: var(--blue); }
.sub-chip.num .sub-type { color: #8a6500; }
.subs-wrap .group-foot { width: 100%; }
.overview td .unit { font-weight: 400; opacity: .8; }
.sub-chip label.field input { width: 100%; }
.dd-ph-sub { display: block; min-height: 44px; }
body[data-dd="sub"] .subs { outline: 2px dashed #b9cbe4; outline-offset: 2px; border-radius: 8px; min-height: 36px; }
/* Eintragen: Freitext-Spalte als kleine Tabelle (Spaltenkopf / Überschriften / Eingabefelder) */
.slot-group.text-block { grid-column: 1 / -1; padding: 12px; }
table.entry-grid { border-collapse: collapse; width: 100%; }
.entry-grid th, .entry-grid td { border: 1px solid var(--line); padding: 8px 10px; text-align: left; vertical-align: middle; }
.entry-grid th.eg-head { background: var(--blue); color: #fff; font-size: 1.05rem; text-align: center; padding: 14px 10px; }
.entry-grid th.eg-sub { background: #e3ecf7; color: var(--blue); font-weight: 700; }
.entry-grid .eg-cell { min-width: 9em; }
.entry-grid .eg-cell.num { width: 1%; white-space: nowrap; }
.entry-grid .eg-cell.num input { width: 6em; }
.entry-grid input { width: 100%; min-width: 0; }
/* Eintragen (alt): 1. Unterspalte mit Frage darüber, weitere Unterspalten daneben */
.text-subs { display: flex; flex-wrap: wrap; gap: 8px; align-items: flex-end; }
.text-sub { display: flex; flex-direction: column; gap: 4px; flex: 1 1 180px; font-size: .92rem; }
.text-sub.sum:not(.first) { flex: 0 1 170px; }
.text-input { display: flex; align-items: center; gap: 6px; }
.text-sub input { width: 100%; min-width: 0; }
.text-sub .unit { color: var(--muted); font-size: .9rem; white-space: nowrap; }
.overview th.field.sub { font-weight: 600; }

/* ---------- Drag & Drop ---------- */
.grip { flex: none; display: inline-grid; place-items: center; width: 26px; min-height: 30px; border-radius: 6px; color: var(--muted);
  font-size: 1.15rem; line-height: 1; cursor: grab; touch-action: none; user-select: none; -webkit-user-select: none; }
.grip:hover { background: #e3ecf7; color: var(--blue); }
.task-chip .grip { width: 20px; min-height: 26px; font-size: 1rem; }

.palette { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.palette-hint.warn { color: var(--err); font-weight: 600; }
.pal-chip { display: inline-flex; align-items: center; gap: 5px; padding: 5px 10px; border: 1px dashed var(--blue2); border-radius: 16px;
  background: #f3f7fc; color: var(--blue); font-size: .85rem; font-weight: 600; cursor: grab; touch-action: none; user-select: none; -webkit-user-select: none; }
.pal-chip:hover { background: #e3ecf7; }
.pal-icon { font-size: 1rem; }
.pal-short { display: none; }

body[data-dd], body[data-dd] * { cursor: grabbing !important; user-select: none; -webkit-user-select: none; }
.dd-ghost { position: fixed; left: 0; top: 0; z-index: 1000; pointer-events: none; opacity: .92; max-height: 200px; overflow: hidden;
  box-shadow: 0 8px 24px rgba(0,0,0,.25); transform-origin: 0 0; background: #fff; border-radius: 9px; }
.dd-ph { border: 2px dashed var(--blue2); background: #e3ecf7; border-radius: 9px; box-sizing: border-box; }
.dd-ph-group { min-height: 60px; }
.dd-ph-time { min-height: 44px; margin: 4px 0; }
.dd-ph-field { min-height: 56px; }
.dd-ph-task { display: inline-block; min-width: 110px; min-height: 34px; }
/* gültige Ablagebereiche während des Ziehens hervorheben */
body[data-dd="group"] .groups,
body[data-dd="time"] .times,
body[data-dd="field"] .fields { outline: 2px dashed #b9cbe4; outline-offset: 4px; border-radius: 6px; min-height: 48px; }
body[data-dd="task"] .tasks { outline: 2px dashed #b9cbe4; outline-offset: 2px; border-radius: 8px; min-height: 36px; }
body[data-dd="field"] .fields:empty::before,
body[data-dd="group"] .groups:empty::before { content: "hierher ziehen"; display: block; padding: 12px; color: var(--muted); font-size: .85rem; }

/* Editor-Zeilen richten sich nach der Breite der Editor-Spalte, nicht nach dem Fenster */
@container editor (max-width: 680px) {
  .times-head { display: none; }
  .time-row { grid-template-columns: 1fr; }
}
@container editor (max-width: 900px) {
  .field-row { display: flex; flex-wrap: wrap; align-items: flex-end; }
  .field-row .field { flex: 1 1 40%; }
  .field-row .field.short { flex: 0 1 110px; }
}
@container editor (max-width: 520px) {
  .grid2 { grid-template-columns: 1fr; }
}

/* ---------- Anleitung ---------- */
main.guide .card { max-width: 1000px; }
.guide h3 { color: var(--blue); font-size: 1rem; margin: 16px 0 6px; }
.guide p, .guide li, .guide dd { line-height: 1.55; }
.toc { columns: 2; column-gap: 32px; padding-left: 20px; }
.toc li { margin: 3px 0; }
.toc a { color: var(--blue); }
.ill { margin: 12px 0 16px; }
.ill svg { width: 100%; height: auto; display: block; border: 1px solid var(--line); border-radius: 10px; background: #f8fafd; }
.ill figcaption { font-size: .88rem; color: var(--muted); margin-top: 6px; }
.ill text { font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; font-size: 14px; fill: var(--text); }
.ill .t-s { font-size: 12.5px; } .ill .t-xs { font-size: 11px; } .ill .t-b { font-weight: 700; }
.ill .t-c { text-anchor: middle; } .ill .t-white { fill: #fff; } .ill .t-blue { fill: var(--blue); }
.ill .t-muted { fill: #6b7380; } .ill .t-red { fill: #c62828; } .ill .t-green { fill: #2e7d32; } .ill .t-gold { fill: #8a6500; }
.ill .s-page { fill: #f3f5f9; stroke: #c9d1dd; } .ill .s-dark { fill: #0e2a47; } .ill .s-bar { fill: #3a6ea5; }
.ill .s-chip { fill: #f3f7fc; stroke: #4a78b0; stroke-dasharray: 3 2; } .ill .s-blue { fill: #1f4f7f; stroke: #fff; } .ill .s-blue2 { fill: #4a78b0; stroke: #fff; }
.ill .s-card { fill: #fff; stroke: #d4d9e2; } .ill .s-light { fill: #e3ecf7; stroke: #b9cbe4; } .ill .s-num { fill: #fdf3dc; stroke: #d9a400; }
.ill .s-group { fill: #fbfcfe; stroke: #d4d9e2; } .ill .s-white { fill: #fff; stroke: #d4d9e2; } .ill .s-chip2 { fill: #e9f0f9; stroke: #4a78b0; }
.ill .s-row { fill: #fff; stroke: #d4d9e2; } .ill .s-row2 { fill: #f6f8fb; stroke: #d4d9e2; } .ill .s-foot { fill: #d9ddeb; stroke: #c9d1dd; }
.ill .s-low { fill: #f9d9d9; stroke: #c9d1dd; } .ill .s-full { fill: #d6efd8; stroke: #b5d9b8; } .ill .s-input { fill: #fff; stroke: #9aa7b8; }
.ill .s-arrow { fill: none; stroke: #e08a00; stroke-width: 2; stroke-dasharray: 6 4; } .ill .s-arrow2 { fill: none; stroke: #4a78b0; stroke-width: 3; }
.ill .s-arrowhead { fill: #e08a00; } #eintragen .ill .s-arrowhead { fill: #4a78b0; }
table.guide-table { border-collapse: collapse; width: 100%; margin: 8px 0 12px; font-size: .95rem; }
.guide-table th, .guide-table td { border: 1px solid var(--line); padding: 8px 10px; text-align: left; vertical-align: top; }
.guide-table th { background: #eef2f8; color: var(--blue); width: 11em; white-space: nowrap; }
.ill.ill-small svg { max-width: 460px; }
.guide-table.matrix th { width: auto; text-align: center; }
.guide-table.matrix th:first-child { text-align: left; }
.guide-table.matrix td:not(:first-child) { text-align: center; white-space: nowrap; font-weight: 600; color: var(--blue); }
.faq dt { font-weight: 700; color: var(--blue); margin-top: 12px; }
.faq dd { margin: 4px 0 0 0; }
kbd { border: 1px solid var(--line); border-bottom-width: 2px; border-radius: 4px; padding: 0 5px; font-size: .85em; background: #fff; }
@media (max-width: 700px) { .toc { columns: 1; } .guide-table th { white-space: normal; width: auto; } }
@media print { main.guide .card { break-inside: avoid; } }

/* ---------- Fußzeile mit Copyright, Popup-Seiten ---------- */
.site-foot { display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 18px 10px 22px; color: var(--muted); font-size: .82rem; }
.site-foot .copy { font-weight: 600; color: #3d4654; }
.site-foot .brand { color: #3d4654; }
.site-foot .brand a { font-weight: 700; }
.site-foot a { color: var(--blue); }
.top.popup-top { position: sticky; top: 0; z-index: 10; }
.top.popup-top nav { gap: 6px; }
pre.license { white-space: pre-wrap; word-wrap: break-word; font-size: .82rem; line-height: 1.45; background: #f8fafd; border: 1px solid var(--line); border-radius: 8px; padding: 14px; max-width: 100%; overflow-x: auto; }

/* ---------- rotes Bestätigungs-Popup (Löschen) ---------- */
.hp-modal { position: fixed; inset: 0; z-index: 2000; background: rgba(20, 0, 0, .55); display: flex; align-items: center; justify-content: center; padding: 16px; }
.hp-modal-box { width: 100%; max-width: 460px; background: #fff; border-radius: 12px; overflow: hidden; border: 3px solid #c62828;
  box-shadow: 0 18px 50px rgba(0,0,0,.45); animation: hpPop .15s ease-out; }
.hp-modal-head { background: #c62828; color: #fff; font-weight: 800; font-size: 1.15rem; padding: 14px 18px; letter-spacing: .02em; }
.hp-modal-body { padding: 18px 18px 6px; font-size: 1.02rem; color: #3a0d0d; white-space: pre-line; font-weight: 600; }
.hp-modal-hint { padding: 4px 18px 14px; font-size: .85rem; color: #8a2a2a; }
.hp-modal-actions { display: flex; justify-content: flex-end; gap: 10px; padding: 12px 18px 16px; background: #fdeaea; }
.hp-danger .btn.hp-ok { background: #c62828; border-color: #a31f1f; color: #fff; font-weight: 700; }
.hp-danger .btn.hp-ok:hover { background: #a31f1f; }
/* Rückfrage (orange) und Hinweis (blau) – gleiche Form, andere Farbe */
.hp-modal.hp-warn .hp-modal-box { border-color: #d97706; }
.hp-modal.hp-warn .hp-modal-head { background: #d97706; }
.hp-modal.hp-warn .hp-modal-body { color: #3d2a05; }
.hp-modal.hp-warn .hp-modal-actions { background: #fff4e0; }
.hp-warn .btn.hp-ok { background: #d97706; border-color: #b45f05; color: #fff; font-weight: 700; }
.hp-modal.hp-info { background: rgba(5, 20, 40, .5); }
.hp-modal.hp-info .hp-modal-box { border-color: var(--blue); }
.hp-modal.hp-info .hp-modal-head { background: var(--blue); }
.hp-modal.hp-info .hp-modal-body { color: var(--text); }
.hp-modal.hp-info .hp-modal-actions { background: #e3ecf7; }
.hp-info .btn.hp-ok { background: var(--blue); border-color: var(--blue); color: #fff; font-weight: 700; }
@keyframes hpPop { from { transform: scale(.94); opacity: 0; } to { transform: none; opacity: 1; } }
/* angemeldeter Admin in der Kopfleiste */
.top nav .who { color: #fff; font-size: .85rem; opacity: .9; padding: 6px 4px; white-space: nowrap; }
.admin-lists .owner { font-size: .8rem; color: var(--muted); }
.admin-lists .owner select { padding: 3px 6px; font-size: .8rem; }
.role-badge { display: inline-block; padding: 1px 8px; border-radius: 10px; font-size: .78rem; font-weight: 700; background: #e3ecf7; color: var(--blue); }
.role-badge.haupt { background: #fff1c2; color: #8a6500; }
.log-table td { font-size: .85rem; }

@media (max-width: 800px) {
  .admin-lists td.acts { min-width: 220px; }
  .palette-hint { display: none; }
  .editor-bar { padding: 6px 8px; gap: 6px; flex-wrap: nowrap; }
  .editor-bar .bar-info, .editor-bar .bar-extra { display: none; }
  .editor-bar .btn.primary { padding: 6px 12px; font-size: .9rem; }
  .palette { flex-wrap: nowrap; gap: 4px; min-width: 0; }
  .pal-chip { padding: 4px 7px; font-size: .75rem; gap: 3px; }
  .pal-long, .pal-icon { display: none; }
  .editor-bar > span:last-child { flex: none; }
  .pal-short { display: inline; }
}

@media (max-width: 700px) {
  main { padding: 8px; }
  .card { padding: 12px; border-radius: 8px; }
  .top h1 { font-size: 1.1rem; }
  .top nav a { padding: 5px 8px; font-size: .82rem; }
  table.overview { font-size: .75rem; }
  .overview th, .overview td { padding: 3px 5px; }
  .slot-groups { grid-template-columns: 1fr; }
}

@media print {
  @page { size: A4 landscape; margin: 10mm; }
  body { background: #fff; font-size: 11pt; }
  .noprint { display: none !important; }
  main { padding: 0; max-width: none; }
  .card { box-shadow: none; padding: 0; margin: 0 0 8mm; max-width: none; }
  .card.fit { width: auto; }
  .table-wrap { overflow: visible; }
  .overview .name { position: static; }
  table.overview { font-size: 8.5pt; }
  .overview th, .overview td { border-color: #888; padding: 2px 3px; }
  .overview thead th, .overview thead th.task, .overview tfoot td, .overview td.mark.on, .overview tbody tr:nth-child(even) {
    -webkit-print-color-adjust: exact; print-color-adjust: exact;
  }
  .overview thead { display: table-header-group; }
  .overview tr { page-break-inside: avoid; }
}
