/* MWP Compliance Manager - Oberflaeche V1.2.
 * Schlicht und ruhig: neutrale Flaechen, duenne Linien, eine Akzentfarbe, keine Schatten,
 * keine Animationen. Farbe traegt nur Information (Warnung, ueberfaellig, erhoehtes Risiko, erledigt).
 * Aufbau wie im Property Navigator: Navigation links, Kontextleiste oben, Arbeitsflaeche in der Mitte.
 */
:root {
  --bg: #F5F6F7;
  --surface: #FFFFFF;
  --surface-2: #F3F4F6;
  --border: #DDE0E4;
  --border-strong: #C3C8CF;
  --text: #1A1E23;
  --text-2: #454C55;
  --muted: #6B737D;
  --accent: #1F3F66;
  --accent-hover: #17304E;
  --accent-soft: #E9EEF4;
  --on-accent: #FFFFFF;
  --bad: #A4262C;   --bad-soft: #FBEDEE;
  --warn: #8A5700;  --warn-soft: #FBF3E2;
  --ok: #24693D;    --ok-soft: #EBF4EE;
  --backdrop: rgba(20, 24, 30, .45);
  --radius: 4px;
  --sidebar-w: 208px;
  font-family: "Segoe UI Variable Text", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  color: var(--text);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #14171B; --surface: #1B1F24; --surface-2: #23282E; --border: #313740; --border-strong: #454D58;
    --text: #E6E9ED; --text-2: #BCC3CC; --muted: #8E97A2;
    --accent: #8FB3DC; --accent-hover: #A9C5E6; --accent-soft: #232F3D; --on-accent: #10161D;
    --bad: #F0959A; --bad-soft: #3A2224; --warn: #E3B75E; --warn-soft: #352B18; --ok: #7FCB98; --ok-soft: #1D3024;
    --backdrop: rgba(0, 0, 0, .6);
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #14171B; --surface: #1B1F24; --surface-2: #23282E; --border: #313740; --border-strong: #454D58;
  --text: #E6E9ED; --text-2: #BCC3CC; --muted: #8E97A2;
  --accent: #8FB3DC; --accent-hover: #A9C5E6; --accent-soft: #232F3D; --on-accent: #10161D;
  --bad: #F0959A; --bad-soft: #3A2224; --warn: #E3B75E; --warn-soft: #352B18; --ok: #7FCB98; --ok-soft: #1D3024;
  --backdrop: rgba(0, 0, 0, .6);
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: var(--bg); }
body { font-size: 14px; line-height: 1.45; color: var(--text); -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; }
[hidden] { display: none !important; }
svg.i { width: 16px; height: 16px; flex: none; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
h1, h2, h3 { text-wrap: balance; }

#auth:not(:empty) { height: 100%; overflow-y: auto; }
#app { display: flex; height: 100%; }

/* ---------- Navigation links ---------- */
.sidebar { width: var(--sidebar-w); flex: none; height: 100%; background: var(--surface); border-right: 1px solid var(--border);
  display: flex; flex-direction: column; padding: 18px 0 12px; }
.brand { display: block; padding: 0 20px 18px; }
.brand-text { font-weight: 700; font-size: 15px; letter-spacing: .04em; }
.brand-text small { display: block; font-weight: 400; font-size: 12.5px; color: var(--muted); letter-spacing: 0; }
#nav { display: flex; flex-direction: column; overflow-y: auto; }
.nav-item { padding: 8px 20px; color: var(--text-2); border-left: 3px solid transparent; }
.nav-item:hover { background: var(--surface-2); color: var(--text); }
.nav-item.active { border-left-color: var(--accent); color: var(--text); font-weight: 600; background: var(--surface-2); }
.nav-sep { height: 1px; background: var(--border); margin: 8px 20px; }

.userbox-wrap { margin-top: auto; position: relative; padding: 10px 12px 0; border-top: 1px solid var(--border); }
.userbox { width: 100%; display: flex; align-items: center; gap: 8px; text-align: left; padding: 6px 8px; border: 0; background: none; border-radius: var(--radius); }
.userbox:hover { background: var(--surface-2); }
.userbox .who { flex: 1; min-width: 0; line-height: 1.35; }
.userbox .who b { display: block; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.userbox .who span { display: block; font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.userbox > svg.i { width: 14px; height: 14px; color: var(--muted); transform: rotate(-90deg); }
.menu { position: absolute; left: 12px; right: 12px; bottom: calc(100% + 2px); background: var(--surface); border: 1px solid var(--border-strong);
  border-radius: var(--radius); padding: 4px; z-index: 40; min-width: 220px; }
.menu-head { padding: 6px 10px 2px; font-size: 12px; color: var(--muted); }
.menu-item { width: 100%; display: flex; gap: 10px; padding: 7px 10px; border: 0; background: transparent; border-radius: 3px; text-align: left; }
.menu-item:hover { background: var(--surface-2); }
.menu-item.on { font-weight: 600; }
.menu-item small { color: var(--muted); margin-left: auto; font-weight: 400; }
.menu-sep { height: 1px; background: var(--border); margin: 4px; }

/* ---------- Kontextleiste und Arbeitsflaeche ---------- */
main { flex: 1; min-width: 0; height: 100%; overflow-y: auto; }
.topbar { display: flex; align-items: center; gap: 12px; padding: 10px 28px; background: var(--surface); border-bottom: 1px solid var(--border); min-height: 42px; }
.topbar .ctx { display: flex; align-items: baseline; gap: 8px; color: var(--muted); font-size: 13px; }
.topbar .ctx b { color: var(--text); font-weight: 600; }
.page { padding: 24px 28px 48px; max-width: 1400px; }
.page-head { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; flex-wrap: wrap; }
.page-head h1 { font-size: 22px; font-weight: 600; margin: 0; letter-spacing: -.01em; }
.spacer { flex: 1; }
.page-sub { color: var(--muted); margin: -8px 0 16px; max-width: 80ch; }
.back { display: inline-block; color: var(--accent); margin-bottom: 8px; font-size: 13px; }
.back:hover { text-decoration: underline; }
.back svg.i { display: none; }
.muted { color: var(--muted); }
.small { font-size: 12.5px; }
.nowrap { white-space: nowrap; }
a.link, .link { color: var(--accent); background: none; border: 0; padding: 0; }
a.link:hover, .link:hover { text-decoration: underline; }

/* ---------- Schaltflaechen ---------- */
.btn { display: inline-flex; align-items: center; gap: 6px; padding: 7px 14px; border-radius: var(--radius); border: 1px solid var(--border-strong); background: var(--surface); white-space: nowrap; }
.btn:hover { background: var(--surface-2); }
.btn svg.i { display: none; }
.btn.ghost svg.i { display: block; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--on-accent); font-weight: 600; }
.btn.primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); }
.btn.danger { color: var(--bad); }
.btn.sm { padding: 4px 10px; font-size: 13px; }
.btn.ghost { border-color: transparent; background: transparent; padding: 4px 6px; }
.btn.block { width: 100%; justify-content: center; padding: 9px 14px; }
.btn:disabled { opacity: .5; cursor: default; }

/* ---------- Flaechen ---------- */
.box { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px 18px; }
.box h3 { margin: 0 0 12px; font-size: 14px; font-weight: 600; display: flex; align-items: center; gap: 8px; }
.box h3 .count { font-weight: 400; color: var(--muted); font-size: 13px; }
.box.flush { padding: 0; overflow: hidden; }
.box + .box { margin-top: 16px; }
.grid-2 { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.grid-2 > .box + .box { margin-top: 0; }
.grid-main { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 16px; align-items: start; }
.stack > * + * { margin-top: 16px; }
.kv { display: grid; grid-template-columns: 170px minmax(0, 1fr); row-gap: 6px; column-gap: 12px; margin: 0; }
.kv dt { color: var(--muted); min-width: 0; overflow-wrap: break-word; }
.kv dd { margin: 0; min-width: 0; overflow-wrap: break-word; }
.kv dd ul { margin: 0; padding-left: 16px; }

/* Zustaende: nur Text, Farbe nur wo sie etwas bedeutet */
.state.warn { color: var(--warn); font-weight: 600; }
.state.bad { color: var(--bad); font-weight: 600; }
.state.ok { color: var(--ok); }
.pill { font-size: 12px; color: var(--text-2); border: 1px solid var(--border); border-radius: 3px; padding: 0 6px; white-space: nowrap; }
.pill.red { color: var(--bad); border-color: currentColor; }
.pill.orange { color: var(--warn); border-color: currentColor; }
.avatar { display: none; }

.list { display: flex; flex-direction: column; }
.li { display: flex; align-items: center; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--border); }
.li:last-child { border-bottom: 0; }
.li.click { cursor: pointer; }
.li.click:hover b { text-decoration: underline; }
.li .grow { flex: 1; min-width: 0; }
.li b { font-weight: 600; }
.li .sub { color: var(--muted); font-size: 12.5px; }
.li .sub.state.bad { color: var(--bad); }
.li .sub.state.warn { color: var(--warn); }
.li > svg.i { display: none; }
.li.inactive b, tr.inactive td { color: var(--muted); }
.li .row-actions { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.empty-state { color: var(--muted); }

.info-note, .warn-note, .ok-note, .err-note { border-left: 3px solid var(--border-strong); background: var(--surface-2); padding: 9px 12px; font-size: 13px; border-radius: 0 var(--radius) var(--radius) 0; }
.info-note svg.i, .warn-note svg.i, .ok-note svg.i, .err-note svg.i { display: none; }
.info-note { border-left-color: var(--accent); }
.warn-note { border-left-color: var(--warn); background: var(--warn-soft); }
.ok-note { border-left-color: var(--ok); background: var(--ok-soft); }
.err-note { border-left-color: var(--bad); background: var(--bad-soft); }

.tabs { display: flex; gap: 0; border-bottom: 1px solid var(--border); margin: 16px 0; overflow-x: auto; }
.tabs a { padding: 8px 14px; color: var(--text-2); border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.tabs a:hover { color: var(--text); }
.tabs a.on { color: var(--text); font-weight: 600; border-bottom-color: var(--accent); }
.tabs .count { color: var(--muted); font-weight: 400; margin-left: 4px; }

.filters { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 12px; }
.filters select, .filters input { font: inherit; color: var(--text); border: 1px solid var(--border-strong); border-radius: var(--radius); padding: 6px 10px; background: var(--surface); max-width: 100%; }
.filters input[type=search] { min-width: 310px; }
.filters .result-count { color: var(--muted); font-size: 13px; }

/* ---------- Tabellen ---------- */
.tbl-wrap { overflow-x: auto; }
.tbl { width: 100%; border-collapse: collapse; }
.tbl th { text-align: left; font-size: 12.5px; font-weight: 600; color: var(--muted); padding: 9px 12px; border-bottom: 1px solid var(--border-strong); white-space: nowrap; }
.tbl th.sort { cursor: pointer; user-select: none; }
.tbl th.sort:hover { color: var(--text); }
.tbl th .arrow { display: inline-block; width: 10px; margin-left: 3px; font-size: 10px; }
.tbl td { padding: 9px 12px; border-bottom: 1px solid var(--border); vertical-align: top; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl tr.click { cursor: pointer; }
.tbl tr.click:hover td { background: var(--surface-2); }
.tbl td.name { font-weight: 600; min-width: 200px; }
.tbl td .sub { color: var(--muted); font-size: 12.5px; font-weight: 400; }
.tbl td.num, .tbl th.num { text-align: right; font-variant-numeric: tabular-nums; }
.tbl td.mono { font-variant-numeric: tabular-nums; white-space: nowrap; }
.tbl td.actions { text-align: right; white-space: nowrap; }
.tbl td.indent { padding-left: 30px; color: var(--text-2); }
.tbl.fixed { table-layout: fixed; }
.tbl.compact th, .tbl.compact td { padding-left: 10px; padding-right: 10px; }
.tbl.compact td { white-space: nowrap; }
.tbl.compact td.name { white-space: normal; min-width: 170px; }
.tbl td.empty { color: var(--muted); padding: 18px 12px; }
.diff { font-size: 12.5px; color: var(--text-2); margin-top: 3px; overflow-wrap: anywhere; }
.diff del { color: var(--muted); }
.diff ins { text-decoration: none; font-weight: 600; color: var(--text); }

/* ---------- Kundenansicht ---------- */
.cust-head { display: flex; align-items: flex-start; gap: 16px; flex-wrap: wrap; }
.cust-head h1 { font-size: 22px; font-weight: 600; margin: 0 0 4px; letter-spacing: -.01em; }
.cust-head h1 .nr { color: var(--muted); font-weight: 400; }
.cust-head .line { color: var(--text-2); }
.cust-head .actions { display: flex; gap: 8px; flex-wrap: wrap; }
.timeline { border-left: 1px solid var(--border-strong); margin-left: 4px; padding-left: 18px; }
.tl-item { position: relative; padding: 0 0 16px; min-width: 0; overflow-wrap: anywhere; }
.tl-item:last-child { padding-bottom: 0; }
.tl-item::before { content: ""; position: absolute; left: -22px; top: 6px; width: 7px; height: 7px; border-radius: 50%; background: var(--border-strong); }
.tl-item .date { color: var(--muted); font-size: 12.5px; font-variant-numeric: tabular-nums; }
.version { border-top: 1px solid var(--border); padding: 12px 0; }
.version:first-of-type { border-top: 0; padding-top: 0; }
.version .period { color: var(--muted); font-size: 12.5px; margin-bottom: 4px; }
.version.old { color: var(--text-2); }

/* ---------- Formulare ---------- */
.form-page { max-width: 860px; }
.form-section { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px 18px; }
.form-section + .form-section { margin-top: 16px; }
.form-section > h3 { margin: 0 0 4px; font-size: 14px; font-weight: 600; }
.form-section > p.lead { margin: 0 0 12px; color: var(--muted); font-size: 13px; }
.form-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 16px; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 16px; }
.form-grid.cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.field { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.field.full { grid-column: 1 / -1; }
.field.span-2 { grid-column: span 2; }
.field.span-3 { grid-column: span 3; }
.field label, .field .label { font-size: 12.5px; font-weight: 600; color: var(--text-2); }
.field .req { color: var(--bad); }
.field input:not([type=checkbox]):not([type=radio]), .field select, .field textarea {
  font: inherit; border: 1px solid var(--border-strong); border-radius: var(--radius); padding: 7px 10px; background: var(--surface); color: var(--text); max-width: 100%; min-width: 0; width: 100%; }
.field input:focus, .field select:focus, .field textarea:focus { outline: 2px solid var(--accent); outline-offset: -1px; }
.field input[readonly] { background: var(--surface-2); color: var(--text-2); }
.field .hint { font-size: 12px; color: var(--muted); }
.check-inline { display: flex; align-items: center; gap: 8px; cursor: pointer; font-size: 14px !important; font-weight: 400 !important; color: var(--text) !important; }
.check-inline input, .checklist input { width: 15px; height: 15px; accent-color: var(--accent); flex: none; margin: 2px 0 0; }
.checklist { border: 1px solid var(--border-strong); border-radius: var(--radius); padding: 4px 0; }
.checklist label { display: flex; align-items: flex-start; gap: 10px; padding: 5px 10px; cursor: pointer; font-size: 14px; font-weight: 400; color: var(--text); }
.checklist label:hover { background: var(--surface-2); }
.checklist .ref { color: var(--muted); font-size: 12.5px; }
.radio-row { display: flex; gap: 20px; flex-wrap: wrap; padding: 4px 0; }
.radio-row label { display: flex; align-items: center; gap: 6px; font-size: 14px; font-weight: 400; color: var(--text); cursor: pointer; }
.role-grid { border: 1px solid var(--border); border-radius: var(--radius); }
.role-row { display: flex; align-items: center; gap: 12px; padding: 6px 10px; border-top: 1px solid var(--border); }
.role-row:first-child { border-top: 0; }
.role-row span { flex: 1; }
.role-row select { width: 190px !important; }
.form-error { border-left: 3px solid var(--bad); background: var(--bad-soft); padding: 9px 12px; margin-bottom: 12px; }

/* ---------- Dialoge ---------- */
.modal-backdrop { position: fixed; inset: 0; background: var(--backdrop); display: flex; align-items: center; justify-content: center; z-index: 100; padding: 20px; }
.modal { background: var(--surface); border: 1px solid var(--border-strong); border-radius: 6px; width: min(600px, 100%); max-width: calc(100vw - 32px); max-height: calc(100% - 40px); display: flex; flex-direction: column; }
.modal.small { width: min(430px, 100%); }
.modal.wide { width: min(800px, calc(100vw - 32px)); }
.modal-head { padding: 16px 20px 4px; display: flex; align-items: center; gap: 10px; }
.modal-head h3 { margin: 0; font-size: 16px; font-weight: 600; flex: 1; }
.modal-body { padding: 8px 20px 4px; overflow-y: auto; }
.modal-foot { padding: 12px 20px 16px; display: flex; justify-content: flex-end; gap: 8px; }
.modal-error { border-left: 3px solid var(--bad); background: var(--bad-soft); padding: 9px 12px; margin: 2px 0 12px; display: none; }
.modal-error.show { display: block; }
.secret { font-family: ui-monospace, Consolas, Menlo, monospace; font-size: 18px; letter-spacing: .04em; text-align: center; background: var(--surface-2); border: 1px solid var(--border-strong); border-radius: var(--radius); padding: 14px; user-select: all; margin: 12px 0; }

#toast-root { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); z-index: 200; display: flex; flex-direction: column; gap: 8px; align-items: center; }
.toast { background: var(--text); color: var(--surface); padding: 9px 16px; border-radius: var(--radius); max-width: min(560px, calc(100vw - 32px)); }
.toast.error { background: var(--bad); color: var(--surface); }

/* ---------- Anmeldung ---------- */
.auth { min-height: 100%; display: flex; align-items: center; justify-content: center; padding: 24px 16px; }
.auth-card { width: min(400px, 100%); background: var(--surface); border: 1px solid var(--border); border-radius: 6px; padding: 28px 28px 24px; }
.auth-card.wide { width: min(500px, 100%); }
.auth-brand { margin-bottom: 20px; padding-bottom: 16px; border-bottom: 1px solid var(--border); }
.auth-brand b { font-size: 16px; display: block; }
.auth-brand span { color: var(--muted); font-size: 12.5px; }
.auth-card h1 { font-size: 18px; font-weight: 600; margin: 0 0 4px; }
.auth-card p.lead { color: var(--text-2); margin: 0 0 16px; }
.auth-card .field { margin-bottom: 12px; }
.auth-foot { margin-top: 16px; color: var(--muted); font-size: 12.5px; }
.auth-link { background: none; border: 0; padding: 0; color: var(--accent); }

.placeholder { max-width: 640px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px 22px; }
.placeholder svg.i { display: none; }
.placeholder h2 { margin: 0 0 6px; font-size: 16px; font-weight: 600; }
.placeholder p { color: var(--text-2); margin: 6px 0; }

/* ---------- Schmale Fenster ---------- */
@media (max-width: 1100px) {
  .grid-2, .grid-main { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 860px) {
  #app { flex-direction: column; height: auto; min-height: 100%; }
  .sidebar { width: 100%; height: auto; border-right: 0; border-bottom: 1px solid var(--border); padding: 12px 0 8px; }
  .brand { padding: 0 16px 8px; }
  #nav { flex-direction: row; overflow-x: auto; padding: 0 8px; }
  .nav-item { white-space: nowrap; padding: 6px 10px; border-left: 0; border-bottom: 2px solid transparent; }
  .nav-item.active { border-bottom-color: var(--accent); background: none; }
  .nav-sep { display: none; }
  .userbox-wrap { margin-top: 6px; }
  .menu { bottom: auto; top: calc(100% + 2px); }
  main { height: auto; overflow: visible; }
  .topbar, .page { padding-left: 16px; padding-right: 16px; }
  .form-grid, .form-grid.cols-4 { grid-template-columns: minmax(0, 1fr); }
  .field.full, .field.span-2, .field.span-3 { grid-column: auto; }
  .kv { grid-template-columns: minmax(0, 1fr); row-gap: 0; }
  .kv dd { margin-bottom: 8px; }
  .filters input[type=search] { min-width: 0; width: 100%; }
  .role-row { flex-wrap: wrap; }
}

/* ---------- V1.3: Eigentumsbaum (schlicht) ---------- */
.otree, .otree ul { list-style: none; margin: 0; padding: 0; }
.otree ul { margin-left: 10px; padding-left: 18px; border-left: 1px solid var(--border-strong); }
.otree li { padding-top: 8px; }
.onode { display: flex; gap: 12px; align-items: baseline; }
.onode .pct { min-width: 62px; font-weight: 600; font-variant-numeric: tabular-nums; }
.onode.root { padding-bottom: 2px; }
button.link.small { font-size: 12.5px; margin-left: 6px; }
.box h3 { flex-wrap: wrap; }
.grid-2 > *, .grid-main > * { min-width: 0; }
.onode > span:last-child { min-width: 0; overflow-wrap: anywhere; }

/* ---------- V1.4: Onboarding ---------- */
.progress-line { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; font-size: 14px; }
.progress-line a { color: var(--text-2); white-space: nowrap; }
.progress-line a:hover { text-decoration: underline; }
.progress-line a.erledigt { color: var(--text); }
.progress-line a.erledigt .mark { color: var(--ok); }
.progress-line a.pruefen .mark, .progress-line a.offen .mark { color: var(--warn); }
.progress-line .arrow { color: var(--border-strong); }
ul.missing { margin: 0 0 12px; padding: 8px 12px 8px 28px; background: var(--warn-soft); border-left: 3px solid var(--warn); font-size: 13px; }
.checklist.two { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.risk-table td { vertical-align: middle; }
.risk-table .field input { padding: 5px 8px; }
.count.state.warn { font-weight: 600; }
@media (max-width: 860px) { .checklist.two { grid-template-columns: minmax(0, 1fr); } }

/* ---------- V1.6: Wizard, Onboarding-Status, Unterschriftenpaket ---------- */
.progress-line a.here { color: var(--text); font-weight: 600; text-decoration: underline; text-underline-offset: 4px; }
.wizard-head { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.wizard-head h1 { font-size: 20px; font-weight: 600; margin: 0; }
.wizard-step { font-size: 16px; font-weight: 600; margin: 20px 0 10px; }
.wizard-step .muted { font-weight: 400; font-size: 13px; }
.wizard-nav { display: flex; gap: 8px; margin-top: 18px; flex-wrap: wrap; }
.wizard-nav .spacer { flex: 1; }
.wizard-body > .box + .box, .wizard-body > .box + .grid-2, .wizard-body > .grid-2 + .box { margin-top: 16px; }
h2.part { font-size: 15px; font-weight: 600; margin: 22px 0 10px; }
h2.part:first-child { margin-top: 0; }
.steplist { list-style: none; margin: 0; padding: 0; }
.steplist li { display: flex; gap: 8px; padding: 3px 0; }
.steplist .mark { width: 14px; flex: none; color: var(--warn); }
.steplist li.erledigt .mark { color: var(--ok); }
.steplist .items { color: var(--warn); font-size: 13px; }
.logo-preview { max-height: 56px; max-width: 220px; border: 1px solid var(--border); padding: 4px; background: #fff; }
.question { margin: 2px 0 8px 25px; padding: 6px 10px; border-left: 2px solid var(--border-strong); font-size: 13px; }
.question .radio-row { margin-top: 4px; }
.field.span-4 { grid-column: 1 / -1; }

/* Zwei-Faktor-Anmeldung (V1.6.1) */
.steps-list { margin: 0 0 12px; padding-left: 20px; color: var(--text-2); }
.steps-list li { margin-bottom: 3px; }
.qr-box { display: flex; justify-content: center; margin: 4px 0 10px; }
.qr-box svg { width: 200px; height: 200px; border: 1px solid var(--border); border-radius: var(--radius); background: #fff; }
.manual-secret { margin: 0 0 14px; font-size: 13px; }
.manual-secret summary { cursor: pointer; color: var(--accent); }
.manual-secret .secret { font-size: 15px; }
.otp-input { font-family: ui-monospace, Consolas, Menlo, monospace; font-size: 18px; letter-spacing: .12em; }
.recovery-codes { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 12px; margin: 8px 0 12px; padding: 12px; background: var(--surface-2); border: 1px solid var(--border-strong); border-radius: var(--radius); user-select: all; }
.recovery-codes code { font-family: ui-monospace, Consolas, Menlo, monospace; font-size: 15px; text-align: center; }
.auth .check { display: flex; gap: 8px; align-items: center; font-size: 13.5px; }
@media print { .recovery-codes { border-color: #000; } }
.logout-btn { display: inline-flex; align-items: center; gap: 6px; }
.logout-btn svg { width: 15px; height: 15px; }
hr.thin { border: 0; border-top: 1px dashed var(--border); margin: 4px 0; }
/* V1.7: Vorschau der erstellten Dokumente (neutral, schwarz auf weiss wie die PDF-Datei) */
.doc-preview-bar { display: flex; align-items: center; gap: 8px; margin: 4px 0 6px; }
.doc-preview { background: #fff; color: #000; border: 1px solid var(--border); border-radius: 6px; padding: 22px 26px; max-height: 55vh; overflow: auto; font-size: 12.5px; line-height: 1.45; }
.doc-preview h2 { font-size: 17px; margin: 0 0 2px; color: #000; }
.doc-preview h4 { font-size: 13px; margin: 14px 0 4px; color: #000; }
.doc-preview p { margin: 4px 0; }
.doc-preview .dp-sub { color: #444; margin-bottom: 10px; }
.doc-preview .dp-small { font-size: 11px; color: #333; }
.doc-preview .dp-foot { font-size: 10.5px; color: #555; border-top: 1px solid #ccc; margin-top: 16px; padding-top: 4px; }
.doc-preview table { border-collapse: collapse; width: 100%; margin: 6px 0; }
.doc-preview .dp-kv td { padding: 1px 12px 1px 0; vertical-align: top; }
.doc-preview .dp-kv td:first-child { width: 34%; }
.doc-preview .dp-tbl th, .doc-preview .dp-tbl td { border: 1px solid #999; padding: 3px 5px; text-align: left; vertical-align: top; font-size: 11.5px; }
.doc-preview .dp-tbl th { background: #eee; }
.doc-preview .dp-sign { display: flex; gap: 22px; margin: 34px 0 6px; }
.doc-preview .dp-sign div { flex: 1; border-top: 1px solid #000; padding-top: 3px; font-size: 11px; }
