:root {
  --bg: #f4f6f9;
  --surface: #ffffff;
  --surface-2: #f8fafc;
  --border: #e2e8f0;
  --text: #0f172a;
  --muted: #64748b;
  --accent: #0891b2;
  --accent-strong: #0e7490;
  --accent-soft: #ecfeff;
  --nav-bg: #0f172a;
  --nav-text: #cbd5e1;
  --nav-active: #06b6d4;
  --v-frei: #16a34a;
  --v-frei-soft: #dcfce7;
  --v-mask: #ca8a04;
  --v-mask-soft: #fef9c3;
  --v-lokal: #2563eb;
  --v-lokal-soft: #dbeafe;
  --v-block: #dc2626;
  --v-block-soft: #fee2e2;
  --shadow: 0 1px 2px rgba(15, 23, 42, .06), 0 1px 3px rgba(15, 23, 42, .08);
  --radius: 10px;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0b1220;
    --surface: #111a2e;
    --surface-2: #0f172a;
    --border: #1e293b;
    --text: #e2e8f0;
    --muted: #94a3b8;
    --accent: #22d3ee;
    --accent-strong: #67e8f9;
    --accent-soft: #083344;
    --nav-bg: #070d19;
    --v-frei-soft: #052e16;
    --v-mask-soft: #422006;
    --v-lokal-soft: #172554;
    --v-block-soft: #450a0a;
    --v-frei: #4ade80;
    --v-mask: #facc15;
    --v-lokal: #60a5fa;
    --v-block: #f87171;
    --shadow: none;
  }
}

:root[data-theme="dark"] {
    --bg: #0b1220;
    --surface: #111a2e;
    --surface-2: #0f172a;
    --border: #1e293b;
    --text: #e2e8f0;
    --muted: #94a3b8;
    --accent: #22d3ee;
    --accent-strong: #67e8f9;
    --accent-soft: #083344;
    --nav-bg: #070d19;
    --v-frei-soft: #052e16;
    --v-mask-soft: #422006;
    --v-lokal-soft: #172554;
    --v-block-soft: #450a0a;
    --v-frei: #4ade80;
    --v-mask: #facc15;
    --v-lokal: #60a5fa;
    --v-block: #f87171;
    --shadow: none;
}
:root { color-scheme: light; }
:root[data-theme="dark"] { color-scheme: dark; }

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  font-size: 14px;
  line-height: 1.5;
  color: var(--text);
  background: var(--bg);
}
a { color: var(--accent); }
h1, h2, h3 { margin: 0; line-height: 1.25; }
h1 { font-size: 22px; font-weight: 700; }
h2 { font-size: 16px; font-weight: 600; }
h3 { font-size: 13px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
code, pre, .mono { font-family: var(--mono); font-size: 12.5px; }
pre { white-space: pre-wrap; word-break: break-word; margin: 0; }

/* Layout */
.app { display: grid; grid-template-columns: 232px 1fr; min-height: 100vh; }
.nav { background: var(--nav-bg); color: var(--nav-text); padding: 20px 14px; display: flex; flex-direction: column; gap: 4px; position: sticky; top: 0; height: 100vh; }
.brand { display: flex; align-items: center; gap: 10px; padding: 4px 8px 20px; color: #fff; }
.brand-mark { width: 30px; height: 30px; border-radius: 8px; background: linear-gradient(135deg, #06b6d4, #2563eb); display: grid; place-items: center; font-weight: 700; }
.brand small { display: block; color: var(--nav-text); font-size: 11px; font-weight: 500; }
.nav a { color: var(--nav-text); text-decoration: none; padding: 8px 10px; border-radius: 8px; display: flex; align-items: center; gap: 10px; font-weight: 500; }
.nav a:hover { background: rgba(255, 255, 255, .06); color: #fff; }
.nav a.active { background: rgba(6, 182, 212, .14); color: var(--nav-active); }
.nav .spacer { flex: 1; }
.nav .who { font-size: 12px; padding: 10px; border-top: 1px solid rgba(255, 255, 255, .08); }
.nav .who a { padding: 4px 0; display: inline; }

.main { padding: 28px 32px 60px; max-width: 1440px; width: 100%; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 20px; flex-wrap: wrap; }
.page-head p { margin: 4px 0 0; color: var(--muted); }
.view { display: none; }
.view.active { display: block; }

/* Cards and grids */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); padding: 18px 20px; }
.card + .card { margin-top: 16px; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.grid { display: grid; gap: 16px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin-bottom: 16px; }
.kpi { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px 18px; box-shadow: var(--shadow); }
.kpi .label { color: var(--muted); font-size: 12px; font-weight: 500; }
.kpi .value { font-size: 26px; font-weight: 700; margin-top: 4px; font-variant-numeric: tabular-nums; }
.kpi .sub { color: var(--muted); font-size: 12px; }
.kpi.frei .value { color: var(--v-frei); }
.kpi.mask .value { color: var(--v-mask); }
.kpi.lokal .value { color: var(--v-lokal); }
.kpi.block .value { color: var(--v-block); }

/* Forms */
label.field { display: block; margin-bottom: 14px; }
label.field > span, .field-label { display: block; font-weight: 600; font-size: 13px; margin-bottom: 5px; }
.hint { color: var(--muted); font-size: 12px; margin-top: 4px; }
input[type=text], input[type=password], input[type=number], input[type=date], select, textarea {
  width: 100%; padding: 8px 10px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface-2);
  color: var(--text); font: inherit;
}
textarea { resize: vertical; min-height: 90px; }
textarea.mono { font-family: var(--mono); font-size: 12.5px; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--accent); outline-offset: -1px; }
input:disabled, select:disabled, textarea:disabled { opacity: .7; cursor: not-allowed; }
.check { display: flex; gap: 10px; align-items: flex-start; margin-bottom: 12px; cursor: pointer; }
.check input { margin-top: 3px; accent-color: var(--accent); }
.check b { display: block; font-weight: 600; }
.check small { color: var(--muted); }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.row > .grow { flex: 1; min-width: 160px; }

.btn { display: inline-flex; align-items: center; gap: 6px; padding: 8px 14px; border-radius: 8px; border: 1px solid var(--border);
  background: var(--surface); color: var(--text); font: inherit; font-weight: 600; cursor: pointer; text-decoration: none; white-space: nowrap; }
.btn:hover { border-color: var(--accent); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn.primary:hover { background: var(--accent-strong); }
.btn.danger { color: var(--v-block); }
.btn.small { padding: 4px 10px; font-size: 12px; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip { border: 1px solid var(--border); background: var(--surface-2); border-radius: 999px; padding: 4px 10px; font-size: 12px; cursor: pointer; color: var(--text); font: inherit; font-size: 12px; }
.chip:hover { border-color: var(--accent); color: var(--accent); }

/* Verdict badges */
.badge { display: inline-flex; align-items: center; gap: 5px; border-radius: 999px; padding: 2px 9px; font-size: 12px; font-weight: 600; white-space: nowrap; }
.badge::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.v-extern_frei { background: var(--v-frei-soft); color: var(--v-frei); }
.v-extern_maskiert { background: var(--v-mask-soft); color: var(--v-mask); }
.v-nur_lokal { background: var(--v-lokal-soft); color: var(--v-lokal); }
.v-blockiert { background: var(--v-block-soft); color: var(--v-block); }
.v-none { background: var(--surface-2); color: var(--muted); }
.tag { display: inline-block; border: 1px solid var(--border); border-radius: 6px; padding: 1px 7px; font-size: 12px; background: var(--surface-2); }
.status-ok { color: var(--v-frei); }
.status-error { color: var(--v-block); }
.status-blocked { color: var(--v-block); }

/* Test bench */
.verdict-banner { border-radius: var(--radius); padding: 16px 18px; display: flex; gap: 16px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.verdict-banner .title { font-size: 20px; font-weight: 700; }
.verdict-banner .route { font-size: 13px; }
.meter { width: 180px; }
.meter .bar { height: 8px; border-radius: 999px; background: var(--border); overflow: hidden; }
.meter .fill { height: 100%; border-radius: 999px; }
.meter .caption { display: flex; justify-content: space-between; font-size: 12px; margin-top: 4px; }
.reasons { list-style: none; margin: 0; padding: 0; }
.reasons li { padding: 8px 0; border-bottom: 1px solid var(--border); display: flex; gap: 10px; align-items: flex-start; }
.reasons li:last-child { border-bottom: none; }
.sev { flex: none; width: 8px; height: 8px; border-radius: 50%; margin-top: 7px; }
.sev.info { background: var(--muted); }
.sev.warn { background: var(--v-mask); }
.sev.critical { background: var(--v-block); }
.src { font-size: 11px; color: var(--muted); border: 1px solid var(--border); border-radius: 4px; padding: 0 5px; margin-left: 6px; }
.textview { background: var(--surface-2); border: 1px solid var(--border); border-radius: 8px; padding: 12px 14px; max-height: 360px; overflow: auto; white-space: pre-wrap; word-break: break-word; }
mark.ent { background: var(--v-mask-soft); color: inherit; border-radius: 4px; padding: 0 2px; border-bottom: 2px solid var(--v-mask); }
mark.ent[data-l=PERSON] { background: #ede9fe; border-color: #7c3aed; }
mark.ent[data-l=GEHEIMNIS] { background: var(--v-block-soft); border-color: var(--v-block); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) mark.ent[data-l=PERSON] { background: #2e1065; } }
:root[data-theme="dark"] mark.ent[data-l=PERSON] { background: #2e1065; }
.ph { color: var(--accent); font-weight: 600; }

/* Tables */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 9px 10px; border-bottom: 1px solid var(--border); vertical-align: top; }
th { font-size: 12px; color: var(--muted); font-weight: 600; background: var(--surface-2); position: sticky; top: 0; }
tbody tr.click { cursor: pointer; }
tbody tr.click:hover { background: var(--surface-2); }
td.num { text-align: right; font-variant-numeric: tabular-nums; }
.pager { display: flex; gap: 10px; align-items: center; justify-content: flex-end; margin-top: 12px; color: var(--muted); }

/* Charts */
.chart { width: 100%; height: 220px; }
.legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12px; color: var(--muted); margin-top: 8px; }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 5px; vertical-align: -1px; }
.hbar { display: grid; grid-template-columns: 170px 1fr 44px; gap: 10px; align-items: center; margin-bottom: 8px; font-size: 13px; }
.hbar .track { height: 8px; background: var(--surface-2); border-radius: 999px; overflow: hidden; border: 1px solid var(--border); }
.hbar .fill { height: 100%; background: var(--accent); }
.hbar .n { text-align: right; font-variant-numeric: tabular-nums; color: var(--muted); }
.empty { color: var(--muted); padding: 18px 0; text-align: center; }

/* Flow diagram */
.flow { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; }
.flow .step { border: 1px solid var(--border); border-radius: var(--radius); padding: 12px; background: var(--surface-2); position: relative; }
.flow .step b { display: block; margin-bottom: 4px; }
.flow .step small { color: var(--muted); }
.flow .step .n { width: 22px; height: 22px; border-radius: 50%; background: var(--accent); color: #fff; display: grid; place-items: center; font-size: 12px; font-weight: 700; margin-bottom: 8px; }

/* Drawer, modal, toast */
.drawer-bg, .modal-bg { position: fixed; inset: 0; background: rgba(15, 23, 42, .45); display: none; z-index: 20; }
.drawer-bg.open, .modal-bg.open { display: block; }
.drawer { position: fixed; top: 0; right: 0; height: 100vh; width: min(640px, 100vw); background: var(--surface); border-left: 1px solid var(--border);
  transform: translateX(100%); transition: transform .2s ease; z-index: 21; overflow-y: auto; padding: 22px 24px; }
.drawer.open { transform: none; }
.modal { position: fixed; left: 50%; top: 12vh; transform: translateX(-50%); width: min(520px, calc(100vw - 32px)); background: var(--surface);
  border: 1px solid var(--border); border-radius: 12px; padding: 22px; z-index: 22; display: none; box-shadow: 0 20px 50px rgba(0, 0, 0, .25); }
.modal.open { display: block; }
.modal .actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 18px; }
.kv { display: grid; grid-template-columns: 150px 1fr; gap: 6px 12px; font-size: 13px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; word-break: break-word; }
.toast { position: fixed; bottom: 22px; right: 22px; background: var(--text); color: var(--bg); padding: 10px 16px; border-radius: 8px; z-index: 30;
  opacity: 0; transform: translateY(8px); transition: all .2s; pointer-events: none; font-weight: 500; }
.toast.show { opacity: 1; transform: none; }
.toast.err { background: var(--v-block); color: #fff; }
.savebar { position: sticky; bottom: 0; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 12px 16px;
  display: flex; gap: 10px; align-items: center; margin-top: 16px; box-shadow: 0 -4px 12px rgba(15, 23, 42, .06); }
.savebar input { flex: 1; }
.keybox { background: var(--surface-2); border: 1px dashed var(--accent); border-radius: 8px; padding: 12px; word-break: break-all; }
.notice { background: var(--accent-soft); border: 1px solid var(--accent); border-radius: 8px; padding: 10px 12px; font-size: 13px; }
.muted { color: var(--muted); }
.right { text-align: right; }
.mt { margin-top: 16px; }
.hidden { display: none !important; }

/* Login */
.login-wrap { min-height: 100vh; display: grid; place-items: center; padding: 16px; background: radial-gradient(1200px 500px at 20% -10%, rgba(6, 182, 212, .18), transparent), var(--bg); }
.login { width: min(400px, 100%); }
.login .brand { color: var(--text); padding: 0 0 18px; }
.login .brand small { color: var(--muted); }
.error { background: var(--v-block-soft); color: var(--v-block); border-radius: 8px; padding: 8px 12px; margin-bottom: 14px; font-weight: 500; }

@media (max-width: 1100px) {
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .flow { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 860px) {
  .app { grid-template-columns: 1fr; }
  .nav { position: static; height: auto; flex-direction: row; flex-wrap: wrap; padding: 10px 16px; }
  .nav .brand { padding: 4px 8px; width: 100%; }
  .nav .spacer { display: none; }
  .nav .who { border: none; width: 100%; padding: 4px 8px; }
  .main { padding: 20px 16px 48px; }
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .hbar { grid-template-columns: 110px 1fr 36px; }
  .kv { grid-template-columns: 1fr; }
}

/* Endpoint register (F22) */
.reg-row td { background: var(--bg, #f7f8fa); }
.reg-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px 14px; padding: 4px 0; }
.reg-grid label { display: grid; gap: 3px; font-size: 12.5px; color: var(--muted, #5b6678); }
.reg-grid input { width: 100%; }
@media (max-width: 860px) { .reg-grid { grid-template-columns: 1fr; } }
.tag-danger { background: #fee2e2; color: #b91c1c; }
.reg-grid label.check { display: flex; align-items: center; gap: 8px; flex-direction: row; }
.rec { margin-bottom: 10px; padding: 12px 14px; }
.rec-foot { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 8px; font-size: 13px; }
.reg-grid textarea { width: 100%; }

/* Setup assistant */
.setup { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.setup .card-head h2 { display: flex; align-items: center; gap: 10px; }
.step-no { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--accent, #0e7490); color: #fff; font-size: 13px; }
.tag-ok { background: #dcfce7; color: #15803d; }
.savebar.inline { position: static; padding: 6px 0 0; border: 0; box-shadow: none; flex-wrap: wrap; }
.savebar.inline select, .savebar.inline input[type=text] { max-width: 360px; }
.checklist { list-style: none; padding: 0; margin: 8px 0; font-size: 14px; }
.checklist li { padding: 3px 0; }
.checklist li.ok { color: #15803d; }
.checklist li.todo { color: var(--muted, #5b6678); }
.demo-sentences ol { padding-left: 20px; font-size: 13.5px; }
.link-copy { border: 0; background: none; text-align: left; color: inherit; padding: 2px 0; cursor: copy; }
.link-copy:hover { color: var(--accent, #0e7490); text-decoration: underline; }
td.small { font-size: 11.5px; }
.nav-lang { margin: 8px 12px 0; background: none; border: 1px solid rgba(255,255,255,.25); color: inherit; border-radius: 8px; padding: 5px 10px; font-size: 13px; cursor: pointer; text-align: left; opacity: .85; }
.nav-lang:hover { opacity: 1; }

/* ---------------------------------------------------------------- Modernisierung 2026-09 */
:root { --radius: 12px; --ring: 0 0 0 3px color-mix(in srgb, var(--accent) 28%, transparent); }
body { font-size: 14.5px; letter-spacing: -0.005em; }
svg.i { width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.nav { padding: 18px 12px; gap: 2px; overflow-y: auto; }
.nav a { padding: 8px 10px; font-size: 14px; }
.nav a svg.i { width: 18px; height: 18px; opacity: .85; }
.nav a.active svg.i { opacity: 1; }
.nav a.active { box-shadow: inset 3px 0 0 var(--nav-active); }
.brand-mark { color: #fff; box-shadow: 0 4px 14px rgba(6, 182, 212, .35); }
.nav-tools { display: flex; gap: 6px; margin: 10px 4px 0; }
.nav-tool { flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: 6px; background: rgba(255,255,255,.04);
  border: 1px solid rgba(255,255,255,.12); color: var(--nav-text); border-radius: 8px; padding: 6px 8px; font: inherit; font-size: 12px; cursor: pointer; }
.nav-tool:hover { color: #fff; border-color: rgba(255,255,255,.3); }
.nav-tool svg.i { width: 15px; height: 15px; }
.nav .who .logout { display: inline-flex; align-items: center; gap: 4px; }
.nav .who .logout svg.i { width: 13px; height: 13px; }
.page-head h1 { font-size: 24px; letter-spacing: -0.02em; }
.card { transition: box-shadow .15s ease, border-color .15s ease; }
.btn { border-radius: 9px; transition: background .15s ease, border-color .15s ease, transform .05s ease; }
.btn:active { transform: translateY(1px); }
.btn svg.i { width: 16px; height: 16px; }
.btn.small svg.i { width: 14px; height: 14px; }
.btn:focus-visible, .nav a:focus-visible, .nav-tool:focus-visible, .help-dot:focus-visible, .chip:focus-visible { outline: none; box-shadow: var(--ring); }
input:focus, select:focus, textarea:focus { outline: none; box-shadow: var(--ring); border-color: var(--accent); }
.kpi { position: relative; overflow: hidden; }
.kpi::after { content: ""; position: absolute; inset: auto 0 0 0; height: 3px; background: var(--border); }
.kpi.frei::after { background: var(--v-frei); } .kpi.mask::after { background: var(--v-mask); }
.kpi.lokal::after { background: var(--v-lokal); } .kpi.block::after { background: var(--v-block); }

/* Kontexthilfe */
.help-dot { display: inline-grid; place-items: center; width: 18px; height: 18px; margin-left: 6px; padding: 0; border: 0; border-radius: 50%;
  background: transparent; color: var(--muted); cursor: help; vertical-align: -3px; }
.help-dot:hover { color: var(--accent); background: var(--accent-soft); }
.help-dot svg.i { width: 15px; height: 15px; }
.vg-tooltip { position: absolute; z-index: 1000; background: #0f172a; color: #f1f5f9; font-size: 12.5px; line-height: 1.45; font-weight: 500;
  padding: 8px 11px; border-radius: 8px; box-shadow: 0 10px 30px rgba(2, 6, 23, .35); pointer-events: none; animation: vg-tip .12s ease-out; }
:root[data-theme="dark"] .vg-tooltip { background: #e2e8f0; color: #0f172a; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .vg-tooltip { background: #e2e8f0; color: #0f172a; } }
@keyframes vg-tip { from { opacity: 0; transform: translateY(2px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .vg-tooltip, .btn { animation: none; transition: none; } }
[data-help]:not(.help-dot) { }

/* Einrichtungsassistent (Stepper) */
.stepper-bar { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 8px; margin-bottom: 10px; }
.stepper-step { display: flex; align-items: center; gap: 8px; text-align: left; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--border);
  background: var(--surface); color: var(--text); font: inherit; font-size: 13px; cursor: pointer; min-width: 0; }
.stepper-step .t { font-weight: 600; line-height: 1.25; font-size: 12.5px; }
.stepper-step .dot { flex: none; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; font-size: 12px;
  background: var(--surface-2); border: 1px solid var(--border); color: var(--muted); }
.stepper-step .dot svg.i { width: 14px; height: 14px; }
.stepper-step.ok .dot { background: var(--v-frei-soft); color: var(--v-frei); border-color: transparent; }
.stepper-step.on { border-color: var(--accent); box-shadow: var(--ring); }
.stepper-step.on .dot { background: var(--accent); color: #fff; border-color: transparent; }
.stepper-progress { height: 4px; border-radius: 999px; background: var(--border); overflow: hidden; margin-bottom: 18px; }
.stepper-progress i { display: block; height: 100%; background: linear-gradient(90deg, var(--accent), var(--v-frei)); transition: width .3s ease; }
.setup.stepped > li { display: none; }
.setup.stepped > li.current { display: block; }
.stepper-nav { display: flex; align-items: center; gap: 12px; margin-top: 16px; flex-wrap: wrap; }
.stepper-nav .muted { color: var(--muted); flex: 1; text-align: center; }
.stepper-all { margin: 0 0 0 8px; font-size: 13px; }
@media (max-width: 1100px) { .stepper-bar { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 640px) { .stepper-bar { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* Kontrast: helle Akzentfarbe im Dunkelmodus → dunkle Schrift auf Primärflächen */
:root[data-theme="dark"] .btn.primary, :root[data-theme="dark"] .stepper-step.on .dot, :root[data-theme="dark"] .step-no { color: #042f3a; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .btn.primary, :root:not([data-theme="light"]) .stepper-step.on .dot,
  :root:not([data-theme="light"]) .step-no { color: #042f3a; } }

/* Mandantenwahl */
.tenant-pick { display: flex; align-items: center; gap: 8px; margin: 0 4px 10px; padding: 6px 8px; border-radius: 9px; background: rgba(255,255,255,.05);
  border: 1px solid rgba(255,255,255,.1); color: var(--nav-text); }
.tenant-pick select { background: transparent; border: 0; color: #fff; padding: 2px 0; font-weight: 600; min-width: 0; flex: 1; width: 100%; text-overflow: ellipsis; }
.tenant-pick select option { color: #0f172a; }
.tenant-pick svg.i { width: 16px; height: 16px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

.nav-badge { margin-left: auto; background: #f59e0b; color: #111827; border-radius: 999px; font-size: 11px; font-weight: 700; padding: 1px 7px; }
