:root {
  --fg: #1f1f24; --muted: #6b6b76; --line: #d6d6de; --bg: #f6f6f9; --surface: #fff;
  --accent: #7b6cf0; --accent2: #4fd8c4; --err: #c62828; --ok: #2e7d32;
  --selected: #f3f1ff; --focus: #e4e0ff; --defect: #fffaf0; --code: #f0f0f5;
  color-scheme: light;
}
[data-theme=dark] {
  --fg: #e6e6ec; --muted: #9a9aa8; --line: #3a3a46; --bg: #16161c; --surface: #20202a;
  --accent: #8f82ff; --err: #ff6b6b; --ok: #66c26b;
  --selected: #2c2850; --focus: #3b3570; --defect: #2c2718; --code: #2a2a36;
  color-scheme: dark;
}
* { box-sizing: border-box; }
body { margin: 0; font: 15px/1.45 "Segoe UI", Carlito, Calibri, system-ui, sans-serif; color: var(--fg); background: var(--bg); }
header.top { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px; padding: 14px 28px;
  background: var(--surface); border-bottom: 3px solid; border-image: linear-gradient(90deg, var(--accent2), var(--accent)) 1; }
header.top h1 { font-size: 20px; margin: 0; }
.actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
main { max-width: 1100px; margin: 24px auto; padding: 0 20px; }
main.narrow { max-width: 560px; }
.step { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 18px 22px; margin-bottom: 16px; }
.step.done { opacity: .85; }
.step h2 { font-size: 17px; margin: 0 0 12px; display: flex; align-items: center; gap: 10px; }
.step h3 { font-size: 15px; margin: 22px 0 8px; }
.num { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 50%;
  background: linear-gradient(135deg, var(--accent2), var(--accent)); color: #fff; font-size: 14px; }
.hidden { display: none !important; }
.muted { color: var(--muted); font-size: 13px; }
.badge { display: inline-block; padding: 1px 8px; border-radius: 10px; background: var(--selected); color: var(--accent); font-size: 12px; font-weight: 600; }

.choices { display: flex; flex-wrap: wrap; gap: 10px; }
.choice { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; min-width: 220px; color: inherit;
  padding: 12px 16px; border: 2px solid var(--line); border-radius: 8px; background: var(--surface); cursor: pointer; text-align: left; font: inherit; }
.choice img { height: 26px; margin-bottom: 6px; }
[data-theme=dark] .choice img { background: #fff; padding: 3px 6px; border-radius: 4px; box-sizing: content-box; }
.choice span { color: var(--muted); font-size: 13px; }
.choice:hover, .choice:focus-visible { border-color: var(--accent); outline: none; }
.choice.selected { border-color: var(--accent); background: var(--selected); }

button, a.button { font: inherit; cursor: pointer; border-radius: 6px; border: 1px solid var(--line); background: var(--surface);
  color: var(--fg); padding: 7px 14px; text-decoration: none; display: inline-block; }
button.primary { background: var(--accent); border-color: var(--accent); color: #fff; padding: 10px 22px; font-weight: 600; }
button:disabled { opacity: .5; cursor: default; }
button.ghost, a.button.ghost { background: transparent; }
button.icon, a.button.icon { padding: 6px; display: inline-flex; align-items: center; justify-content: center; }
.icon svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
button.danger { color: var(--err); }
form.inline { display: flex; gap: 8px; flex-wrap: wrap; }
form.stack { display: flex; flex-direction: column; gap: 6px; max-width: 380px; }
form.stack label { font-size: 13px; color: var(--muted); margin-top: 8px; }
form.stack .saveRow { margin-top: 12px; }
fieldset.adminAuth { display: flex; flex-direction: column; gap: 6px; border: 1px solid var(--line); border-radius: 6px; padding: 8px 10px; margin: 10px 0 0; }
fieldset.adminAuth legend { font-size: 13px; color: var(--muted); padding: 0 4px; }
input[type=text], input[type=date], input[type=password], input[type=email] {
  font: inherit; padding: 7px 10px; border: 1px solid var(--line); border-radius: 6px; background: var(--surface); color: var(--fg); }
input:focus { border-color: var(--accent); outline: 2px solid var(--focus); }
#recipient, #newUser { width: 340px; max-width: 100%; }

table.items { width: 100%; border-collapse: collapse; margin: 6px 0 8px; }
table.items th { text-align: left; font-size: 13px; color: var(--muted); padding: 4px 4px; border-bottom: 2px solid var(--line); }
table.items td { padding: 3px 4px; vertical-align: middle; }
table.items td input { width: 100%; padding: 6px 8px; border: 1px solid var(--line); border-radius: 5px; font: inherit; }
table.items .pos { width: 42px; text-align: center; color: var(--muted); font-weight: 600; }
table.items .del { width: 36px; text-align: center; }
table.items tbody { border-bottom: 1px solid var(--line); }
table.items tr.defect td { padding-top: 0; padding-bottom: 8px; }
table.items tr.defect input { background: var(--defect); }
table.items tr.defect .label { font-size: 12px; color: var(--muted); text-align: right; white-space: nowrap; }
button.x { border: none; background: none; color: var(--muted); font-size: 16px; padding: 2px 6px; }
button.x:hover { color: var(--err); }
button.add { margin-top: 4px; }

table.users { width: 100%; border-collapse: collapse; margin-top: 12px; }
table.users th { text-align: left; font-size: 13px; color: var(--muted); padding: 6px; border-bottom: 2px solid var(--line); }
table.users td { padding: 6px; border-bottom: 1px solid var(--line); vertical-align: middle; }
table.users .center { text-align: center; }
table.users .acts { text-align: right; }
table.users .acts button { padding: 4px 10px; font-size: 13px; margin: 2px 0 2px 6px; }

code { font: 14px/1.4 ui-monospace, Consolas, monospace; background: var(--code); padding: 2px 6px; border-radius: 4px; }
.cred { border: 1px solid var(--accent); background: var(--selected); border-radius: 8px; padding: 4px 14px; margin: 12px 0; }
.mfaSteps { padding-left: 20px; }
.mfaSteps li { margin-bottom: 10px; }
.qr { display: block; margin: 8px 0; border-radius: 6px; }
dialog { border: 1px solid var(--line); border-radius: 10px; background: var(--surface); color: var(--fg); padding: 18px 22px; max-width: 460px; }
dialog::backdrop { background: rgba(0, 0, 0, .45); }
dialog h3 { margin-top: 0; }

.dateRow { display: flex; align-items: center; gap: 10px; margin-top: 16px; }
.status { min-height: 1.4em; word-break: break-word; }
.status.err { color: var(--err); }
.status.ok { color: var(--ok); }
.saveRow { display: flex; gap: 10px; align-items: center; }

/* Einstellungen: Navigation links, Bereiche rechts */
.layout { display: flex; gap: 24px; align-items: flex-start; max-width: 1100px; margin: 24px auto; padding: 0 20px; }
.layout main.content { flex: 1; min-width: 0; margin: 0; padding: 0; max-width: none; }
nav.side { flex: 0 0 220px; position: sticky; top: 16px; display: flex; flex-direction: column; gap: 2px; }
nav.side #navAdmin { display: flex; flex-direction: column; gap: 2px; }
nav.side a { padding: 8px 12px; border-radius: 6px; color: var(--fg); text-decoration: none; border-left: 3px solid transparent; }
nav.side a:hover, nav.side a:focus-visible { background: var(--selected); outline: none; }
nav.side a.active { background: var(--selected); border-left-color: var(--accent); font-weight: 600; }
.navGroup { margin: 18px 0 4px 12px; font-size: 12px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.navWho { margin: 0 0 0 12px; font-size: 13px; color: var(--muted); word-break: break-all; }
.navWho strong { color: var(--fg); }
@media (max-width: 760px) {
  .layout { flex-direction: column; align-items: stretch; gap: 12px; }
  nav.side { position: static; flex: none; width: 100%; flex-direction: row; flex-wrap: wrap; align-items: center; }
  nav.side #navAdmin { flex-direction: row; flex-wrap: wrap; align-items: center; }
  .navGroup { margin: 0 4px 0 8px; }
  .navWho { flex-basis: 100%; margin-bottom: 4px; }
  .navWho br { display: none; }
}
.back { margin: 0 0 10px; font-size: 13px; }
.back a, .muted a { color: var(--accent); }
label.check { display: flex; gap: 8px; align-items: baseline; margin: 10px 0; max-width: 640px; }
.btnRow { display: flex; gap: 8px; flex-wrap: wrap; margin: 10px 0; }
.note { border: 1px solid var(--line); border-left: 3px solid var(--accent); border-radius: 6px; padding: 8px 12px; margin: 0 0 4px; }
.note.warn { border-left-color: var(--err); }
table.users tr.link { cursor: pointer; }
table.users tr.link:hover { background: var(--selected); }
table.nets { margin: 4px 0 10px; max-width: 760px; table-layout: fixed; }
table.nets td.net { width: 45%; overflow-wrap: anywhere; }
table.nets th:first-child { width: 45%; }
table.nets td.acts, table.nets th:last-child { width: 110px; }
table.nets td { overflow-wrap: anywhere; }
table.nets td.empty { color: var(--muted); font-size: 13px; }
form.inline input.net { width: 300px; max-width: 100%; }
#udNet { width: 400px; max-width: 100%; }
form.inline input.noteIn { width: 220px; max-width: 100%; }
