:root {
  --bg: #f4f6fa;
  --surface: #ffffff;
  --surface-2: #eef1f7;
  --text: #16202f;
  --muted: #5a6577;
  --border: #d9dfe9;
  --accent: #1b4fd8;
  --accent-strong: #143ca8;
  --accent-soft: #e6edff;
  --ok: #17703c;
  --ok-soft: #e3f5ea;
  --warn: #8a5a00;
  --warn-soft: #fff3d6;
  --danger: #b42318;
  --danger-soft: #fdeceb;
  --radius: 10px;
  --shadow: 0 1px 2px rgba(16, 24, 40, .06), 0 1px 3px rgba(16, 24, 40, .08);
  --shadow-lg: 0 12px 32px rgba(16, 24, 40, .16);
  --topbar-h: 72px;
  --on-accent: #ffffff;
  color-scheme: light;
}
:root[data-theme="dark"] {
  --bg: #0f141c;
  --surface: #171e29;
  --surface-2: #1f2835;
  --text: #e6eaf1;
  --muted: #9aa5b6;
  --border: #2c3747;
  --accent: #7aa2ff;
  --accent-strong: #a3bfff;
  --accent-soft: #1c2b4d;
  --ok: #6fd69a;
  --ok-soft: #133022;
  --warn: #f2c15e;
  --warn-soft: #3a2d10;
  --danger: #ff8a80;
  --danger-soft: #3b1715;
  --shadow: 0 1px 2px rgba(0, 0, 0, .4);
  --shadow-lg: 0 12px 32px rgba(0, 0, 0, .5);
  --on-accent: #0b1220;
  color-scheme: dark;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0f141c;
    --surface: #171e29;
    --surface-2: #1f2835;
    --text: #e6eaf1;
    --muted: #9aa5b6;
    --border: #2c3747;
    --accent: #7aa2ff;
    --accent-strong: #a3bfff;
    --accent-soft: #1c2b4d;
    --ok: #6fd69a;
    --ok-soft: #133022;
    --warn: #f2c15e;
    --warn-soft: #3a2d10;
    --danger: #ff8a80;
    --danger-soft: #3b1715;
    --shadow: 0 1px 2px rgba(0, 0, 0, .4);
    --shadow-lg: 0 12px 32px rgba(0, 0, 0, .5);
    --on-accent: #0b1220;
    color-scheme: dark;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font: 15px/1.55 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
}
a { color: var(--accent); }
a:hover { color: var(--accent-strong); }
h1, h2, h3 { line-height: 1.25; margin: 0 0 .5em; }
h1 { font-size: 1.6rem; }
h2 { font-size: 1.1rem; }
p { margin: 0 0 1em; }
code, kbd { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
kbd { border: 1px solid var(--border); border-bottom-width: 2px; border-radius: 4px; padding: 0 .35em; font-size: .85em; background: var(--surface); }
small { color: var(--muted); font-weight: normal; }
.muted { color: var(--muted); }
.center { text-align: center; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--surface); padding: 8px 12px; z-index: 100; }
.skip:focus { left: 8px; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
svg { stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* Topbar */
.topbar {
  position: sticky; top: 0; z-index: 20;
  display: grid; grid-template-columns: 240px 1fr auto; align-items: center; gap: 24px;
  height: var(--topbar-h); padding: 0 24px;
  background: var(--surface); border-bottom: 1px solid var(--border);
}
.topbar__brand { display: flex; align-items: center; gap: 8px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 700; font-size: 1.1rem; color: var(--text); text-decoration: none; }
.brand__mark { display: inline-grid; place-items: center; width: 32px; height: 32px; border-radius: 8px; background: var(--accent); color: var(--on-accent); font-size: 1.5rem; line-height: 1; padding-bottom: 3px; }
.brand--center { justify-content: center; display: flex; margin-bottom: 24px; }
.topbar__user { grid-column: 3; display: flex; align-items: center; gap: 8px; }
.user-chip { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--text); padding: 4px 8px; border-radius: var(--radius); }
.user-chip:hover { background: var(--surface-2); color: var(--text); }
.user-chip__text { display: flex; flex-direction: column; line-height: 1.2; }
.user-chip__text small { font-size: .8rem; }
.avatar { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); font-weight: 700; }
.icon-btn { display: inline-grid; place-items: center; width: 40px; height: 40px; border: 0; border-radius: var(--radius); background: transparent; color: var(--muted); cursor: pointer; }
.icon-btn:hover { background: var(--surface-2); color: var(--text); }
.icon-btn svg { width: 22px; height: 22px; }
.nav-toggle { display: none; }

/* Suche */
.search { position: relative; max-width: 820px; width: 100%; justify-self: center; }
.search__icon { position: absolute; left: 16px; top: 50%; width: 20px; height: 20px; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
.search .search__input {
  width: 100%; height: 48px; padding: 0 48px 0 48px;
  font-size: 1rem; color: var(--text);
  background: var(--surface-2); border: 1px solid var(--border); border-radius: 12px;
  transition: border-color .15s, box-shadow .15s, background .15s;
}
.search__input::placeholder { color: var(--muted); }
.search .search__input:focus { outline: none; background: var(--surface); border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.search__input::-webkit-search-cancel-button { cursor: pointer; }
.search__hint { position: absolute; right: 14px; top: 50%; transform: translateY(-50%); color: var(--muted); }
.search__input:focus ~ .search__hint, .search__input:not(:placeholder-shown) ~ .search__hint { display: none; }
.search__results {
  position: absolute; left: 0; right: 0; top: calc(100% + 8px);
  max-height: min(70vh, 560px); overflow-y: auto;
  background: var(--surface); border: 1px solid var(--border); border-radius: 12px; box-shadow: var(--shadow-lg);
  padding: 8px;
}
.search__group + .search__group { margin-top: 6px; border-top: 1px solid var(--border); padding-top: 6px; }
.search__group-label { font-size: .75rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); padding: 6px 10px; }
.search__item { display: block; padding: 8px 10px; border-radius: 8px; color: var(--text); text-decoration: none; }
.search__item strong { display: block; font-weight: 600; }
.search__item span { display: block; font-size: .85rem; color: var(--muted); }
.search__item mark { background: var(--warn-soft); color: inherit; border-radius: 2px; }
.search__item:hover, .search__item[aria-selected="true"] { background: var(--accent-soft); color: var(--text); }
.search__empty { padding: 12px 10px; color: var(--muted); }
.search__all { display: block; padding: 8px 10px; margin-top: 6px; border-top: 1px solid var(--border); font-size: .9rem; }

/* Layout */
.shell { display: grid; grid-template-columns: 240px 1fr; min-height: calc(100vh - var(--topbar-h)); }
.shell--nonav { grid-template-columns: 1fr; }
.sidebar { background: var(--surface); border-right: 1px solid var(--border); padding: 16px 12px; }
.sidebar ul { list-style: none; margin: 0; padding: 0; }
.sidebar a { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 8px; color: var(--text); text-decoration: none; font-weight: 500; }
.sidebar a:hover { background: var(--surface-2); color: var(--text); }
.sidebar a[aria-current="page"] { background: var(--accent-soft); color: var(--accent); }
.sidebar .icon { width: 20px; height: 20px; flex: none; }
.sidebar__heading { margin: 20px 12px 6px; font-size: .75rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.main { padding: 32px; width: 100%; min-width: 0; }
.main:focus { outline: none; }
.page-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; margin-bottom: 24px; flex-wrap: wrap; }
.page-head h1 { margin: 0; }
.page-head p { margin: 4px 0 0; }
.page-head__actions { display: flex; gap: 8px; flex-wrap: wrap; }

.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); padding: 20px 24px; margin-bottom: 20px; }
.card--highlight { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 20px; }
.grid-2 > .card { margin-bottom: 0; }
.grid-2 + .card { margin-top: 20px; }
.stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 16px; margin-bottom: 20px; }
.stat { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px 20px; display: flex; flex-direction: column; }
.stat__value { font-size: 1.8rem; font-weight: 700; }
.stat__label { color: var(--muted); }
.roadmap { margin: 0; padding-left: 1.2em; }
.roadmap li { margin: 4px 0; }
.roadmap .is-done::marker { content: "✓  "; color: var(--ok); }
.facts { display: grid; grid-template-columns: max-content 1fr; gap: 6px 20px; margin: 0; }
.facts dt { color: var(--muted); }
.facts dd { margin: 0; }
.empty { text-align: center; padding: 32px; }
.empty__code { font-size: 3rem; font-weight: 800; color: var(--accent); margin: 0; }
.result-list { list-style: none; margin: 0; padding: 0; }
.result-list li + li { border-top: 1px solid var(--border); }
.result-list a { display: block; padding: 8px 0; text-decoration: none; }

/* Formulare */
.form { display: flex; flex-direction: column; gap: 16px; }
.form--narrow { max-width: 480px; display: flex; flex-direction: column; gap: 16px; }
.form--inline { flex-direction: row; align-items: flex-end; flex-wrap: wrap; gap: 12px; margin-bottom: 12px; }
.form--inline .field { flex: 1 1 200px; }
.form--narrow > .btn { align-self: flex-start; }
.form__actions { display: flex; gap: 8px; flex-wrap: wrap; }
.field { display: flex; flex-direction: column; gap: 6px; font-weight: 600; }
.field small { font-weight: normal; }
input[type=text], input[type=email], input[type=url], input[type=password], input[type=search], input[type=date], input[type=time], input[type=number], select, textarea {
  font: inherit; color: var(--text); background: var(--surface);
  border: 1px solid var(--border); border-radius: 8px; padding: 9px 12px; width: 100%;
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.input--code { font-family: ui-monospace, monospace; font-size: 1.3rem; letter-spacing: .2em; text-align: center; }
.check { display: flex; align-items: center; gap: 8px; }
.check input, .radio input { width: 18px; height: 18px; accent-color: var(--accent); }
.radio { display: inline-flex; padding: 4px; cursor: pointer; }
[data-customer-field][hidden], [data-password-field][hidden] { display: none; }
.check-hint { display: block; margin: -4px 0 12px 26px; color: var(--muted); font-size: .85rem; }
tr.is-disabled { opacity: .45; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-height: 40px; padding: 0 16px; font: inherit; font-weight: 600;
  border: 1px solid var(--border); border-radius: 8px; background: var(--surface); color: var(--text);
  text-decoration: none; cursor: pointer;
}
.btn:hover { background: var(--surface-2); color: var(--text); }
.btn--primary { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.btn--primary:hover { background: var(--accent-strong); border-color: var(--accent-strong); color: var(--on-accent); }
.btn--ghost { background: transparent; }
.btn--danger { color: var(--danger); border-color: var(--danger); background: transparent; }
.btn--danger:hover { background: var(--danger-soft); color: var(--danger); }
.btn--block { width: 100%; }
.danger-zone { margin-top: 24px; }

.alert { border-radius: 8px; padding: 12px 16px; margin-bottom: 16px; border: 1px solid transparent; }
.alert ul { margin: 0; padding-left: 1.2em; }
.alert--error { background: var(--danger-soft); color: var(--danger); border-color: var(--danger); }
.alert--success { background: var(--ok-soft); color: var(--ok); border-color: var(--ok); }
.alert--warning { background: var(--warn-soft); color: var(--warn); border-color: var(--warn); }
.alert--info { background: var(--accent-soft); color: var(--accent-strong); border-color: var(--accent); }
.badge { display: inline-block; padding: 1px 8px; border-radius: 999px; font-size: .8rem; font-weight: 600; background: var(--surface-2); color: var(--muted); }
.badge--ok { background: var(--ok-soft); color: var(--ok); }
.badge--warn { background: var(--warn-soft); color: var(--warn); }

/* Tabellen */
.table-wrap { overflow-x: auto; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); margin-bottom: 20px; }
.card .table-wrap { box-shadow: none; }
.table { width: 100%; border-collapse: collapse; }
.table th, .table td { padding: 10px 14px; text-align: left; border-bottom: 1px solid var(--border); vertical-align: top; }
.table thead th { font-size: .8rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); background: var(--surface-2); }
.table tbody tr:last-child > * { border-bottom: 0; }
.table thead th small { display: block; text-transform: none; letter-spacing: 0; }
.table--matrix td { white-space: nowrap; }
.level { font-size: .85rem; padding: 2px 8px; border-radius: 999px; }
.level--0 { color: var(--muted); }
.level--1 { background: var(--accent-soft); color: var(--accent); }
.level--2 { background: var(--ok-soft); color: var(--ok); }
.pager { display: flex; align-items: center; gap: 12px; }

/* 2FA */
.steps { margin: 0; padding-left: 1.2em; display: grid; gap: 24px; }
.qr { display: block; background: #fff; padding: 8px; border-radius: 8px; border: 1px solid var(--border); margin: 12px 0; }
.secret { display: inline-block; font-size: 1.05rem; letter-spacing: .08em; background: var(--surface-2); padding: 6px 10px; border-radius: 6px; word-break: break-all; }
.codes { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 8px; }
.codes code { display: block; background: var(--surface-2); padding: 6px 10px; border-radius: 6px; text-align: center; }

/* Anmeldeseiten */
.auth { min-height: 100vh; display: grid; place-items: center; padding: 24px 16px; }
.auth__card { width: 100%; max-width: 420px; background: var(--surface); border: 1px solid var(--border); border-radius: 14px; box-shadow: var(--shadow-lg); padding: 32px; }
.auth__card h1 { font-size: 1.35rem; }

/* Mobil */
@media (max-width: 900px) {
  :root { --topbar-h: 120px; }
  .topbar { grid-template-columns: 1fr auto; grid-template-areas: "brand user" "search search"; row-gap: 8px; column-gap: 12px; height: auto; min-height: var(--topbar-h); padding: 10px 16px 12px; }
  .topbar__brand { grid-area: brand; }
  .topbar__user { grid-area: user; grid-column: auto; }
  .search { grid-area: search; }
  .nav-toggle { display: inline-grid; }
  .user-chip__text { display: none; }
  .search__hint { display: none; }
  .shell { grid-template-columns: 1fr; }
  .sidebar { position: fixed; top: var(--topbar-h); left: 0; bottom: 0; width: 260px; z-index: 15; transform: translateX(-100%); transition: transform .2s; box-shadow: var(--shadow-lg); }
  .sidebar.is-open { transform: none; }
  .main { padding: 20px 16px; }
  .search .search__input { height: 44px; font-size: 16px; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }

/* ---------- Schritt 2: Kern-Doku ---------- */
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .92em; }
.num { text-align: right; font-variant-numeric: tabular-nums; }
.small { font-size: .9rem; }
.req { color: var(--danger); text-decoration: none; border: 0; }
.crumbs { display: flex; flex-wrap: wrap; gap: 6px; font-size: .9rem; margin-bottom: 8px; color: var(--muted); }
.crumbs a { color: var(--muted); text-decoration: none; }
.crumbs a:hover { color: var(--accent); text-decoration: underline; }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--border); margin-bottom: 24px; overflow-x: auto; scrollbar-width: thin; }
.tabs a { padding: 10px 16px; color: var(--muted); text-decoration: none; font-weight: 600; border-bottom: 3px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.tabs a:hover { color: var(--text); }
.tabs a[aria-current="page"] { color: var(--accent); border-bottom-color: var(--accent); }
.section-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.section-head h2 { margin: 0; }
.card__head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-bottom: 8px; }
.card__head h2, .card__head h3 { margin: 0; }
.card__actions { margin: 12px 0 0; }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; }
.cards > .card { margin: 0; }
.card--item h3 { font-size: 1.05rem; margin-bottom: 4px; }
.card--item p { margin: 0 0 8px; }
.card:target, .journal__entry:target article { box-shadow: 0 0 0 3px var(--accent); }
.facts--compact { gap: 2px 16px; font-size: .95rem; }
.person + .person { margin-top: 12px; }
.counts { list-style: none; display: flex; gap: 16px; padding: 0; margin: 16px 0 0; flex-wrap: wrap; }
.counts a { text-decoration: none; }
.prose { max-width: 80ch; }
.btn--small { min-height: 32px; padding: 0 12px; font-size: .9rem; }
.filter { display: flex; gap: 8px; align-items: center; }
.filter select { width: auto; min-width: 200px; }
.form-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px 20px; }
.form-grid + .form-grid { margin-top: 16px; }
.form-grid__full { grid-column: 1 / -1; }
.card > .form-grid:first-child { margin-top: 0; }
textarea { resize: vertical; line-height: 1.5; }
.radios { border: 0; padding: 0; margin: 16px 0 0; display: flex; flex-direction: column; gap: 6px; }
.radios legend { font-weight: 600; margin-bottom: 6px; }
.tag { display: inline-block; padding: 1px 8px; border-radius: 999px; font-size: .78rem; font-weight: 600; background: var(--surface-2); color: var(--muted); text-decoration: none; }
.tag--device { background: var(--accent-soft); color: var(--accent); }
.tag--shared { background: var(--ok-soft); color: var(--ok); }
.tag--internal { background: var(--warn-soft); color: var(--warn); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.table tr.is-muted td { color: var(--muted); }
.recent { list-style: none; margin: 0; padding: 0; }
.recent li { display: flex; flex-direction: column; padding: 8px 0; }
.recent li + li { border-top: 1px solid var(--border); }
.recent a { text-decoration: none; }

.journal { list-style: none; margin: 0; padding: 0; }
.journal__date { font-size: .8rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); margin: 20px 0 8px; }
.journal__date:first-child { margin-top: 0; }
.journal__entry article { border: 1px solid var(--border); border-left: 3px solid var(--accent); border-radius: 8px; padding: 12px 16px; background: var(--surface); }
.journal__entry + .journal__entry { margin-top: 10px; }
.journal__head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.journal__head h3 { font-size: 1rem; margin: 0; }
.journal__tags { display: flex; gap: 6px; flex-wrap: wrap; }
.journal__body { margin: 8px 0; white-space: normal; overflow-wrap: anywhere; }
.journal__meta { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; font-size: .82rem; color: var(--muted); }
@media (max-width: 600px) {
  .filter, .filter select { width: 100%; min-width: 0; }
  .section-head > * { flex: 1 1 100%; }
  .facts { grid-template-columns: 1fr; gap: 0; }
  .facts dd { margin-bottom: 8px; }
}

/* ---------- Schritt 3: Lizenzen und Verträge ---------- */
.badge--danger { background: var(--danger-soft); color: var(--danger); }
.filters { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 20px; }
.filters .field { flex: 0 1 220px; font-size: .9rem; }
.subhead { font-size: .95rem; margin: 18px 0 8px; }
.card > .subhead:first-of-type { margin-top: 4px; }
.table-wrap--flat { box-shadow: none; margin-bottom: 8px; }
.deadlines { list-style: none; margin: 0; padding: 0; }
.deadlines__item { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 10px 0 10px 12px; border-left: 3px solid var(--border); flex-wrap: wrap; }
.deadlines__item + .deadlines__item { border-top: 1px solid var(--border); }
.deadlines__item--abgelaufen { border-left-color: var(--danger); }
.deadlines__item--bald { border-left-color: var(--warn); }
.deadlines__item--ok { border-left-color: var(--ok); }
.deadlines__item > div:first-child { display: flex; flex-direction: column; }
.deadlines__item a { text-decoration: none; }
.deadlines__when { display: flex; align-items: center; gap: 10px; font-size: .9rem; color: var(--muted); flex-wrap: wrap; }
.code { background: var(--surface-2); border: 1px solid var(--border); border-radius: 6px; padding: 10px 12px; overflow-x: auto; font-size: .85rem; white-space: pre-wrap; word-break: break-all; }
@media (max-width: 600px) { .filters .field { flex: 1 1 100%; } }
.facts + .prose { margin-top: 12px; }

/* ---------- Schritt 4: Zugangsdaten über Bitwarden ---------- */
.form-layout { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 20px; align-items: start; }
.form-layout > .form { min-width: 0; }
.form-layout__aside { position: sticky; top: calc(var(--topbar-h) + 16px); }
@media (max-width: 1100px) { .form-layout { grid-template-columns: minmax(0, 1fr); } .form-layout__aside { position: static; } }
.howto { margin: 0 0 12px; padding-left: 1.3em; color: var(--muted); }
.howto li + li { margin-top: 4px; }
.table--credentials td { vertical-align: top; }
.table--credentials .cred__main { min-width: 260px; }
.cred__notes { margin-top: 4px; }
.cred__actions { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 8px; }
.table--credentials .nowrap { white-space: nowrap; }
.copyable { overflow-wrap: anywhere; }
@media (max-width: 700px) {
  .table--credentials thead { display: none; }
  .table--credentials, .table--credentials tbody, .table--credentials tr, .table--credentials td { display: block; width: 100%; }
  .table--credentials tr { padding: 12px 16px; border-bottom: 1px solid var(--border); }
  .table--credentials tr:last-child { border-bottom: 0; }
  .table--credentials td { border: 0; padding: 2px 0; }
  .table--credentials td[data-label] { display: grid; grid-template-columns: 84px minmax(0, 1fr); gap: 8px; }
  .table--credentials td[data-label]::before { content: attr(data-label); color: var(--muted); font-family: system-ui, sans-serif; font-size: .85rem; }
  .table--credentials .cred__main { min-width: 0; padding-bottom: 8px; }
}
.copyable { display: inline-flex; align-items: center; gap: 6px; }
.btn-copy { border: 1px solid var(--border); background: var(--surface-2); color: var(--muted); border-radius: 6px; padding: 0 6px; min-height: 26px; cursor: pointer; font-size: .85rem; line-height: 1; }
.btn-copy:hover { color: var(--text); border-color: var(--muted); }
.btn-copy.is-copied { color: var(--ok); border-color: var(--ok); }
.btn--bw { white-space: nowrap; }
.pwgen__out { display: flex; gap: 8px; flex-wrap: wrap; }
.pwgen__value { flex: 1 1 200px; min-width: 0; font-size: 1.05rem; letter-spacing: .02em; }
.pwgen__strength { margin: 8px 0 12px; color: var(--muted); }
.pwgen__strength strong.is-weak { color: var(--danger); }
.pwgen__strength strong.is-ok { color: var(--warn); }
.pwgen__strength strong.is-strong { color: var(--ok); }
.pwgen__opts { display: grid; gap: 8px; margin-bottom: 12px; }
.pwgen__opts input[type=range] { width: 100%; accent-color: var(--accent); }
.form-layout__aside .pwgen__opts { grid-template-columns: 1fr; }
.form-layout__aside .pwgen__value { flex-basis: 100%; }
.form-layout__aside .pwgen__out .btn { flex: 1 1 0; }
.pwgen .check { align-items: flex-start; }

/* ---------- Schritt 5: Branding ---------- */
.brand--logo { gap: 12px; }
.brand__logo { display: block; height: 36px; width: auto; max-width: 200px; object-fit: contain; }
.brand--center .brand__logo { height: 56px; max-width: 260px; }
.brand--center.brand--logo { flex-direction: column; gap: 10px; }
.brand__logo--dark { display: none; }
:root[data-theme="dark"] .brand__logo--light { display: none; }
:root[data-theme="dark"] .brand__logo--dark { display: block; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .brand__logo--light { display: none; }
  :root:not([data-theme="light"]) .brand__logo--dark { display: block; }
}
.theme-toggle { margin: 0; }
.theme-toggle__sun { display: none; }
:root[data-theme="dark"] .theme-toggle__sun { display: block; }
:root[data-theme="dark"] .theme-toggle__moon { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-toggle__sun { display: block; }
  :root:not([data-theme="light"]) .theme-toggle__moon { display: none; }
}
.auth__welcome { color: var(--muted); white-space: normal; }
.form-layout--wide { grid-template-columns: minmax(0, 1fr) 360px; }
@media (max-width: 1100px) { .form-layout--wide { grid-template-columns: minmax(0, 1fr); } }
.uploads { display: grid; gap: 16px; margin-top: 16px; }
.upload > * { min-width: 0; }
.upload { display: grid; grid-template-columns: 160px minmax(0, 1fr); gap: 16px; align-items: start; padding-top: 16px; border-top: 1px solid var(--border); }
.upload__preview { display: grid; place-items: center; height: 80px; border-radius: 8px; border: 1px solid var(--border); padding: 8px; }
.upload__preview img { max-width: 100%; max-height: 60px; object-fit: contain; }
.upload__preview--light { background: #ffffff; }
.upload__preview--dark { background: #171e29; }
.upload__body .field { margin-bottom: 4px; }
.upload__body p { margin: 0 0 6px; }
input[type=file] { font: inherit; max-width: 100%; }
@media (max-width: 600px) { .upload { grid-template-columns: 1fr; } }
.color-pick { display: flex; gap: 20px; align-items: flex-end; flex-wrap: wrap; margin-bottom: 12px; }
.color-pick__row { display: flex; gap: 8px; align-items: center; }
.color-pick input[type=color] { width: 48px; height: 42px; padding: 2px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface); cursor: pointer; }
.color-pick input[type=text] { width: 120px; }
.presets { display: flex; gap: 8px; flex-wrap: wrap; padding-bottom: 4px; }
.preset { width: 34px; height: 34px; padding: 3px; border-radius: 50%; border: 2px solid transparent; background: none; cursor: pointer; }
.preset:hover, .preset.is-active { border-color: var(--text); }
.preset__swatch { display: block; width: 100%; height: 100%; border-radius: 50%; }
.preset__swatch--0f766e { background: #0f766e; }
.preset__swatch--15803d { background: #15803d; }
.preset__swatch--1b4fd8 { background: #1b4fd8; }
.preset__swatch--334155 { background: #334155; }
.preset__swatch--7c3aed { background: #7c3aed; }
.preset__swatch--b91c1c { background: #b91c1c; }
.preset__swatch--be185d { background: #be185d; }
.preset__swatch--c2410c { background: #c2410c; }

.radio-line { display: flex; align-items: center; gap: 8px; cursor: pointer; }
.radio-line input { width: 18px; height: 18px; accent-color: var(--accent); }
.preview-pair { display: grid; gap: 12px; margin-bottom: 12px; }
.preview { --p-accent: #1b4fd8; --p-soft: #e6edff; --p-on: #ffffff; border-radius: 10px; padding: 12px 14px; border: 1px solid; }
.preview p { margin: 0 0 8px; }
.preview p:last-child { margin: 0; }
.preview--light { background: #ffffff; color: #16202f; border-color: #d9dfe9; }
.preview--dark { background: #171e29; color: #e6eaf1; border-color: #2c3747; }
.preview__label { font-size: .75rem; text-transform: uppercase; letter-spacing: .05em; opacity: .7; }
.preview__mark { display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 6px; background: var(--p-accent); color: var(--p-on); font-weight: 700; }
.preview__nav span { display: inline-block; padding: 4px 10px; border-radius: 6px; background: var(--p-soft); color: var(--p-accent); font-weight: 600; font-size: .9rem; }
.preview__link { color: var(--p-accent); }
.preview__soft { background: var(--p-soft); color: var(--p-accent); }
.preview__btn { background: var(--p-accent); border-color: var(--p-accent); color: var(--p-on); }
.profile-theme { display: flex; gap: 12px; flex-wrap: wrap; align-items: flex-end; }

/* ---------- E-Mail-Versand ---------- */
.choice-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 12px; }
.choice-card { position: relative; display: flex; flex-direction: column; gap: 4px; padding: 14px 14px 14px 44px; border: 1px solid var(--border); border-radius: 10px; cursor: pointer; background: var(--surface); }
.choice-card input { position: absolute; left: 14px; top: 16px; width: 18px; height: 18px; accent-color: var(--accent); margin: 0; }
.choice-card:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); box-shadow: 0 0 0 1px var(--accent); }
.choice-card:has(input:focus-visible) { outline: 2px solid var(--accent); outline-offset: 2px; }
.choice-card__title { font-weight: 700; }
.choice-card__desc { color: var(--muted); font-size: .88rem; }
.more { margin-top: 14px; }
.more summary { cursor: pointer; color: var(--muted); font-size: .92rem; }
[data-section][hidden], [data-gmail][hidden], [data-req-from][hidden] { display: none; }

/* ---------- Schritt 6: Netzwerke, IP-Belegung, Dateien ---------- */
.tabs a { padding-left: 12px; padding-right: 12px; }
@media (min-width: 701px) { .tabs { flex-wrap: wrap; } }
.counts--inline { margin-top: 8px; }
.ip-legend { list-style: none; display: flex; flex-wrap: wrap; gap: 6px 18px; margin: 0 0 10px; padding: 0; color: var(--muted); }
.ip-legend li { display: inline-flex; align-items: center; gap: 6px; }
.ip-legend .ip-cell { width: 14px; min-height: 14px; height: 14px; }
.ip-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(38px, 1fr)); gap: 3px; margin-bottom: 18px; }
.ip-cell { display: inline-grid; place-items: center; min-height: 28px; border-radius: 4px; font: .75rem/1 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; border: 1px solid var(--border); background: var(--surface); color: var(--muted); text-decoration: none; }
.ip-cell--geraet { background: var(--accent); border-color: var(--accent); color: var(--on-accent); font-weight: 600; }
a.ip-cell--geraet:hover { background: var(--accent-strong); color: var(--on-accent); }
.ip-cell--gateway { background: var(--ok-soft); border-color: var(--ok); color: var(--ok); font-weight: 600; }
.ip-cell--dhcp { background: var(--accent-soft); border-style: dashed; color: var(--accent-strong); }
.ip-cell--doppelt { background: var(--danger); border-color: var(--danger); color: #fff; font-weight: 600; }
.gallery { list-style: none; margin: 0 0 14px; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.gallery__item { border: 1px solid var(--border); border-radius: 8px; overflow: hidden; background: var(--surface-2); display: flex; flex-direction: column; }
.gallery__item img { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; background: var(--surface-2); }
.gallery__meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; padding: 6px 8px; font-size: .85rem; }
.gallery__name { flex: 1 1 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.filelist { list-style: none; margin: 0 0 14px; padding: 0; }
.filelist__item { display: flex; align-items: flex-start; gap: 12px; padding: 10px 0; border-top: 1px solid var(--border); }
.filelist__item:first-child { border-top: 0; }
.filelist__ext { flex: 0 0 auto; display: inline-grid; place-items: center; width: 42px; height: 42px; border-radius: 6px; background: var(--accent-soft); color: var(--accent-strong); font: 600 .7rem/1 ui-monospace, monospace; }
.filelist__main { flex: 1 1 auto; min-width: 0; overflow-wrap: anywhere; }
.link-btn { border: 0; background: none; padding: 0; color: var(--accent); font: inherit; cursor: pointer; text-decoration: underline; }
.link-btn--danger { color: var(--danger); }
.att-upload { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 10px 16px; align-items: end; border-top: 1px solid var(--border); padding-top: 14px; }
.att-upload .check, .att-upload small { grid-column: 1 / -1; }
.att-upload .btn { justify-self: start; }
.att-upload input[type="file"] { padding: 6px; }
.journal__files { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0 0; padding: 0; }
.journal__files img { display: block; width: 96px; height: 72px; object-fit: cover; border-radius: 6px; border: 1px solid var(--border); }
@media (max-width: 700px) {
  .att-upload { grid-template-columns: 1fr; }
  .gallery { grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); }
}
.facts + h3, .prose + h3 { margin-top: 18px; }

/* ---------- Schritt 7: Wissen und Checklisten ---------- */
.filter--row { flex-wrap: wrap; margin-bottom: 16px; }
.markdown { max-width: 80ch; overflow-wrap: anywhere; }
.markdown h2, .markdown h3, .markdown h4 { margin-top: 1.4em; }
.markdown h2:first-child, .markdown h3:first-child { margin-top: 0; }
.markdown pre { background: var(--surface-2); border: 1px solid var(--border); border-radius: 8px; padding: 12px 14px; overflow-x: auto; font-size: .88rem; line-height: 1.45; }
.markdown code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .9em; }
.markdown :not(pre) > code { background: var(--surface-2); padding: 1px 5px; border-radius: 4px; }
.markdown blockquote { margin: 1em 0; padding: 8px 14px; border-left: 4px solid var(--accent); background: var(--accent-soft); border-radius: 0 8px 8px 0; }
.markdown hr { border: 0; border-top: 1px solid var(--border); margin: 1.5em 0; }
.markdown li { margin: 3px 0; }
.markdown .md-task { list-style: none; margin-left: -1.2em; }
.markdown .md-task.is-done { color: var(--muted); }
.md-help { display: grid; grid-template-columns: auto 1fr; gap: 6px 10px; margin: 0 0 12px; }
.md-help dt { white-space: nowrap; }
.md-help dd { margin: 0; color: var(--muted); }
.runs { list-style: none; margin: 0; padding: 0; }
.runs__item { display: flex; align-items: center; gap: 16px; padding: 10px 0; border-top: 1px solid var(--border); }
.runs__item:first-child { border-top: 0; }
.runs__item--overdue .runs__main > a { color: var(--warn); }
.runs__main { flex: 1 1 auto; min-width: 0; overflow-wrap: anywhere; }
.runs__progress { flex: 0 0 auto; display: flex; align-items: center; gap: 8px; color: var(--muted); }
.runs__progress progress { width: 110px; height: 8px; accent-color: var(--accent); }
.runs__progress--big progress { width: 160px; }
.cl-steps { list-style: none; margin: 0 0 16px; padding: 0; }
.cl-steps__heading { margin: 18px 0 6px; font-weight: 700; font-size: .8rem; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); }
.cl-steps__heading:first-child { margin-top: 0; }
.cl-steps__item { display: flex; align-items: flex-start; gap: 12px; padding: 8px 0; border-top: 1px solid var(--border); }
.cl-steps__item form { margin: 0; }
.cl-steps__box { flex: 0 0 auto; display: inline-grid; place-items: center; width: 28px; height: 28px; border: 2px solid var(--border); border-radius: 6px; background: var(--surface); color: transparent; font-weight: 700; padding: 0; cursor: pointer; }
span.cl-steps__box { cursor: default; }
.cl-steps__box:hover { border-color: var(--accent); }
.cl-steps__item.is-done .cl-steps__box { background: var(--ok); border-color: var(--ok); color: #fff; }
.cl-steps__item.is-done .cl-steps__text > span { color: var(--muted); text-decoration: line-through; }
.cl-steps__text { display: flex; flex-direction: column; min-width: 0; overflow-wrap: anywhere; padding-top: 3px; }
.cl-steps__who:empty { display: none; }
.cl-steps__add { display: flex; gap: 8px; }
.cl-steps__add input { flex: 1 1 auto; }
.form-layout__aside > .card + .card { margin-top: 16px; }
.form-layout__aside .card.form > form { margin: 0 0 10px; }
@media (max-width: 700px) {
  .runs__item { flex-wrap: wrap; gap: 6px; }
  .runs__progress progress { width: 90px; }
}
.field[hidden] { display: none; }

/* ---------- Schritt 8: Domains, Doku-Ampel ---------- */
.nowrap { white-space: nowrap; }
.ampel { display: inline-flex; align-items: center; gap: 6px; font-size: .875rem; font-weight: 600; white-space: nowrap; }
.ampel__dot { width: 12px; height: 12px; border-radius: 50%; background: var(--muted); box-shadow: 0 0 0 3px var(--surface-2, transparent); flex: none; }
.ampel--gruen { color: var(--ok); }
.ampel--gruen .ampel__dot { background: var(--ok); box-shadow: 0 0 0 3px var(--ok-soft); }
.ampel--gelb { color: var(--warn); }
.ampel--gelb .ampel__dot { background: #e0a100; box-shadow: 0 0 0 3px var(--warn-soft); }
.ampel--rot { color: var(--danger); }
.ampel--rot .ampel__dot { background: var(--danger); box-shadow: 0 0 0 3px var(--danger-soft); }
.doku-checks { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 0 32px; }
.doku-checks__item { display: flex; align-items: baseline; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--border); }
.doku-checks__label { flex: 1; min-width: 0; }
.doku-checks__item form { margin-left: auto; flex: none; }
.doku-checks__item .link-btn { white-space: nowrap; color: var(--muted); font-size: .8125rem; }
.doku-checks__icon { width: 20px; height: 20px; border-radius: 50%; display: inline-grid; place-items: center; font-size: .75rem; font-weight: 700; flex: none; transform: translateY(3px); }
.doku-checks__item.is-ok .doku-checks__icon { background: var(--ok-soft); color: var(--ok); }
.doku-checks__item.is-missing .doku-checks__icon { background: var(--danger-soft); color: var(--danger); }
.doku-checks__item.is-skipped { color: var(--muted); }
.doku-checks__item.is-skipped .doku-checks__icon { background: var(--border); color: var(--muted); }
.gaps { list-style: none; margin: 0; padding: 0; }
.gaps__item { display: grid; grid-template-columns: 72px 1fr; gap: 12px; align-items: start; padding: 10px 0; border-bottom: 1px solid var(--border); }
.gaps__item:last-child { border-bottom: 0; }
.page-head__actions form { display: inline; }
.break { overflow-wrap: anywhere; }

/* ---------- Schritt 9: Hersteller-Sync, Verknüpfungen ---------- */
.field__error { color: var(--danger); }
.links { list-style: none; margin: 0 0 16px; padding: 0; }
.links__item { display: flex; align-items: baseline; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--border); }
.links__item form { margin-left: auto; }
.links__rel { flex: none; min-width: 120px; color: var(--muted); font-size: .875rem; }
.link-form { display: grid; grid-template-columns: minmax(180px, 1.2fr) minmax(180px, 1fr) minmax(160px, 1fr) auto; gap: 12px; align-items: end; }
@media (max-width: 800px) { .link-form { grid-template-columns: 1fr; } .links__rel { min-width: 90px; } }
.sync-runs { list-style: none; margin: 0; padding: 0; }
.sync-runs__item { border-bottom: 1px solid var(--border); padding: 8px 0; }
.sync-runs__item summary { cursor: pointer; display: flex; flex-wrap: wrap; gap: 8px; align-items: baseline; }
.sync-runs__details { margin-top: 8px; max-height: 320px; overflow: auto; white-space: pre-wrap; }
.section-head .page-head__actions form, .page-head__actions form { display: inline; }

/* ---------- Schritt 10: Notfallhandbuch, Etiketten ---------- */
.steps-list { margin: 0; padding-left: 1.4em; }
.steps-list li + li { margin-top: 6px; }
.steps-list--plain { list-style: none; padding-left: 0; }
.table--form td { padding: 6px 8px; vertical-align: middle; }
.table--form input[type=text], .table--form select { width: 100%; min-width: 8em; }
.table--form td.num input { width: 3.5em; min-width: 0; text-align: right; }

/* ---------- Schritt 11: Versionsverlauf ---------- */
.rev-list { list-style: none; margin: 0; padding: 0; }
.rev-list__actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.rev-change { display: grid; grid-template-columns: minmax(120px, 200px) 1fr; gap: 4px 16px; padding: 6px 0; border-top: 1px solid var(--border); }
.rev-change__label { color: var(--muted); }
.rev-change del { color: var(--danger, #b42318); text-decoration: line-through; }
.rev-change ins { color: var(--ok, #157f3d); text-decoration: none; font-weight: 600; }
.rev-diff, .rev-text { margin: 0; white-space: pre-wrap; word-break: break-word; font-size: .85rem; background: var(--surface-2); border-radius: 6px; padding: 8px 10px; max-height: 420px; overflow: auto; }
.rev-diff__line { display: block; }
.rev-diff__line.is-add { background: color-mix(in srgb, #16a34a 16%, transparent); }
.rev-diff__line.is-del { background: color-mix(in srgb, #dc2626 16%, transparent); }
@media (max-width: 640px) { .rev-change { grid-template-columns: 1fr; } }
[data-for-type][hidden], [data-no-custom][hidden] { display: none; }

/* ---------- Teilen per Link ---------- */
.share-box__list { list-style: none; margin: 0 0 12px; padding: 0; }
.share-box__list li { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 8px 0; border-top: 1px solid var(--border); }
.share-box__list li:first-child { border-top: 0; }
.share-box__list form { margin: 0; }
.share-box__new summary, .share-box__new-summary { cursor: pointer; font-weight: 600; margin-bottom: 8px; }
.share-link { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; background: var(--surface-2); border: 1px solid var(--border); border-radius: 8px; padding: 10px 12px; }
.share-link .mono { overflow-wrap: anywhere; }
.share-page { min-height: 100vh; display: flex; flex-direction: column; }
.share-page__head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; padding: 14px 24px; border-bottom: 1px solid var(--border); background: var(--surface); }
.share-page__head .brand { margin: 0; }
.share-page__main { flex: 1; width: 100%; max-width: 900px; margin: 0 auto; padding: 24px 16px; }
.share-page__card h1 { font-size: 1.5rem; margin-bottom: 4px; }
.share-page__card--narrow { max-width: 420px; margin: 40px auto; }
.share-page__foot { text-align: center; padding: 16px; border-top: 1px solid var(--border); }
.token-list td form { margin: 0; }
@media print { .share-page__head, .share-page__foot { border: 0; } }

/* ---------- Schritt 15: Menü im Kundenkontext ---------- */
.ctx-pick { display: flex; gap: 6px; margin: 0 4px 12px; }
.ctx-pick input { flex: 1; min-width: 0; height: 36px; padding: 0 10px; font-size: .92rem; color: var(--text); background: var(--surface-2); border: 1px solid var(--border); border-radius: 8px; }
.ctx-pick input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); background: var(--surface); }
.ctx-pick__go { width: 36px; height: 36px; flex: none; border: 1px solid var(--border); }
.ctx-pick__go svg { width: 18px; height: 18px; }
.ctx-recent a { font-weight: 400; font-size: .92rem; padding: 6px 12px; }
.ctx-recent .icon { width: 16px; height: 16px; color: var(--muted); }
.ctx-head { display: flex; align-items: center; justify-content: space-between; gap: 4px; margin: 20px 0 6px; padding: 6px 4px 6px 12px; border-radius: 8px; background: var(--accent-soft); }
.ctx-head__title { margin: 0; color: var(--accent); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-transform: none; letter-spacing: 0; font-size: .95rem; }
.ctx-head__clear { width: 30px; height: 30px; flex: none; }
.ctx-head__clear svg { width: 16px; height: 16px; }
.ctx-nav { border-left: 2px solid var(--accent-soft); margin-left: 8px !important; padding-left: 4px !important; }
.ctx-nav a { padding: 7px 10px; }
.search__scope { display: flex; align-items: center; gap: 8px; padding: 4px 10px 8px; font-size: .88rem; color: var(--muted); border-bottom: 1px solid var(--border); margin-bottom: 6px; cursor: pointer; }
.search__scope input { margin: 0; }
.search-scope-switch { display: inline-flex; gap: 8px; align-items: center; margin-bottom: 16px; }
@media (max-width: 900px) { .sidebar { overflow-y: auto; } }
.all-lists { margin: -8px 0 20px; font-size: .92rem; }

/* ---------- Schritt 13: Zeiterfassung ---------- */
.inline-form { display: inline; margin: 0; }
.actions-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 0 0 12px; }
.time-presets { margin: -8px 0 16px; }
.field--button { flex: 0 0 auto !important; }
.table--times .time-desc { min-width: 220px; white-space: pre-line; }
.table .nowrap { white-space: nowrap; }
.quota { margin: 0 0 10px; font-size: .92rem; }
.quota__bar { display: block; width: 100%; height: 8px; max-width: 420px; margin-top: 4px; }
.timer { display: inline-flex; align-items: center; gap: 6px; padding: 4px 6px 4px 10px; border-radius: 999px; background: var(--warn-soft); color: var(--text); font-size: .88rem; white-space: nowrap; }
.timer a { color: inherit; text-decoration: none; max-width: 180px; overflow: hidden; text-overflow: ellipsis; }
.timer__clock { font-variant-numeric: tabular-nums; font-weight: 700; }
.timer__dot { width: 8px; height: 8px; border-radius: 50%; background: var(--danger); animation: timerblink 1.6s infinite; }
.timer--long { background: var(--danger-soft); }
.timer .btn { min-height: 28px; padding: 0 10px; }
.timer-start .btn { min-height: 34px; }
@keyframes timerblink { 50% { opacity: .3; } }
.device-pick { max-height: 220px; overflow-y: auto; border: 1px solid var(--border); border-radius: 8px; padding: 8px 12px; background: var(--surface); }
.device-pick .check { padding: 3px 0; }
.week-day { margin-bottom: 8px; }
.week-day h3 { display: flex; justify-content: space-between; font-size: 1rem; margin: 18px 0 8px; }
@media (max-width: 900px) { .timer a { max-width: 90px; } .timer-start { display: none; } }
/* Stoppuhr in der Kundenansicht: nur mobil, am Desktop steht sie oben in der Leiste */
.quick-timer { display: none; }
@media (max-width: 900px) {
  .quick-timer { display: flex; align-items: center; gap: 12px; margin: 0 0 16px; }
  .quick-timer__btn { min-height: 52px; font-size: 1.05rem; font-weight: 700; padding: 0 22px; }
  .quick-timer__btn--start { width: 100%; justify-content: center; }
  .quick-timer--running { padding: 10px 10px 10px 14px; border-radius: 12px; background: var(--warn-soft); }
  .quick-timer__info { flex: 1; min-width: 0; display: flex; flex-direction: column; color: inherit; text-decoration: none; }
  .quick-timer__info small { color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .quick-timer .btn--danger { background: var(--danger); color: #fff; }
  .quick-timer__clock { font-size: 1.5rem; font-weight: 700; font-variant-numeric: tabular-nums; line-height: 1.2; }
}
@media (prefers-reduced-motion: reduce) { .timer__dot { animation: none; } }
.row--muted td { color: var(--muted); }

/* ---------- Schritt 17: NetBox, Zeitplan ---------- */
.ip-cell--reserviert { background: var(--warn-soft); border-color: var(--warn); color: var(--warn); font-weight: 600; }
.check-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 4px 14px; margin: 6px 0 8px; }
.check-grid--wide { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 8px 18px; }
.check-grid--wide .check { align-items: flex-start; }
.check-grid--wide .check input { flex: none; margin-top: 2px; }
.check--inline { display: inline-flex; margin-right: 14px; }
.form-details { margin: 8px 0 0; }
.form-details > summary { cursor: pointer; font-weight: 600; margin-bottom: 10px; }
.form-details ul { margin: 6px 0 8px; padding-left: 1.3em; }
.form-details li + li { margin-top: 4px; }
.error-text { color: var(--danger); }
.source-tag { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: .85rem; color: var(--muted); }
.count-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 6px 18px; }
.count-list li { display: flex; justify-content: space-between; gap: 10px; border-bottom: 1px solid var(--border); padding: 4px 0; }
.card--spaced { margin-top: 24px; }

/* Hinweisbalken DEV-Umgebung (Environment::banner) */
.env-banner {
  padding: 4px 16px; text-align: center; font-size: .8125rem; line-height: 1.4;
  background: repeating-linear-gradient(-45deg, #f2c15e 0 14px, #e8b24a 14px 28px);
  color: #2b1d00;
}
.env-banner strong { letter-spacing: .08em; margin-right: .5em; }

/* ---------- Schritt 19b: Sicherheit und Nachweise ---------- */
.plain-list { list-style: none; margin: 0; padding: 0; }
.plain-list li { padding: 6px 0; border-bottom: 1px solid var(--border); }
.plain-list li:last-child { border-bottom: 0; }
.doc-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px 20px; }
.doc-list li { display: block; padding-left: 52px; position: relative; min-height: 36px; }
.doc-list li .btn { position: absolute; left: 0; top: 0; }
.hint-line { color: var(--muted); }
.hint-line::before { content: "◆ "; color: var(--accent); font-size: .7em; vertical-align: 1px; }
.text-warn { color: var(--warn); font-weight: 600; }
.table--controls td:first-child { min-width: 260px; }
.control-meta { display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 0 12px; }
.status-choice { border: 0; padding: 0; min-width: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; margin: 4px 0 12px; }
.status-choice label { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border: 1px solid var(--border); border-radius: 10px; cursor: pointer; }
.status-choice input:checked + span { font-weight: 700; }
.status-choice label:has(input:checked) { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.suggestion-box { background: var(--ok-soft); border-radius: 10px; padding: 10px 14px; margin: 0 0 12px; }
.suggestion-box--warn { background: var(--warn-soft); }

/* ---------- Schritt 21: Datensicherung ---------- */
.codes--backup { grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); max-width: 680px; }
.codes--backup code { font-size: 1.1rem; letter-spacing: .08em; padding: 8px 6px; }
details.danger-zone > summary { cursor: pointer; }
details.danger-zone[open] > summary { margin-bottom: 8px; }

/* ---------- Schritt 22a: Schwachstellen ---------- */
.badge--cvss { min-width: 2.6em; text-align: center; font-variant-numeric: tabular-nums; text-decoration: none; }
.badge--cvss-kritisch { background: var(--danger); color: var(--surface); }
.badge--cvss-hoch { background: var(--danger-soft); color: var(--danger); }
.badge--cvss-mittel { background: var(--warn-soft); color: var(--warn); }
a.badge { text-decoration: none; }
a.badge:hover { text-decoration: underline; }
.table--vulns td { vertical-align: top; }
.table--vulns .vuln-check { width: 36px; }
.table--vulns .vuln-check input { width: 18px; height: 18px; }
.vuln-bulk { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end; padding-top: 12px; border-top: 1px solid var(--border); }
.vuln-bulk .field { flex: 0 1 200px; font-size: .9rem; margin: 0; }
.vuln-bulk .vuln-bulk__note { flex: 1 1 320px; }
.stat--link { text-decoration: none; color: inherit; }
.stat--link:hover { border-color: var(--accent); }
.stat--danger .stat__value { color: var(--danger); }
.stat--warn .stat__value { color: var(--warn); }
.card--alert { border-left: 4px solid var(--danger); }
.filters .check--inline { align-self: flex-end; min-height: 40px; display: inline-flex; align-items: center; gap: 6px; }
.filters .field--button { flex: 0 0 auto; align-self: flex-end; }
.form-grid--tight { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
.page-head__actions form.vuln-search { display: flex; flex-wrap: nowrap; }
.vuln-search input { width: 190px; min-width: 0; }
.page-head__actions > .vuln-search { align-self: center; }
.table--vulns td a strong { white-space: nowrap; }

/* ---------- Schritt 24a: Verwaltung als eigener Bereich ---------- */
.sidebar__admin { margin-top: 20px; padding-top: 12px; border-top: 1px solid var(--border); }
.sidebar__admin a { position: relative; }
.dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; flex: none; background: var(--muted); }
.dot--ok { background: var(--ok); }
.dot--warn { background: var(--warn); }
.dot--info { background: var(--muted); }
.sidebar__admin .dot { margin-left: auto; }
.admin-gear { position: relative; }
.admin-gear.has-dot::after { content: ""; position: absolute; top: 8px; right: 8px; width: 8px; height: 8px; border-radius: 50%; background: var(--warn); box-shadow: 0 0 0 2px var(--surface); }
.admin-gear[aria-current="page"] { background: var(--accent-soft); color: var(--accent); }
.admin-back { margin-bottom: 8px; color: var(--muted) !important; font-weight: 600 !important; }
.admin-back:hover { color: var(--text) !important; }
.sidebar--admin .admin-nav + .sidebar__heading { margin-top: 16px; }
.admin-group { margin-bottom: 24px; }
.admin-group__title { margin: 0 0 10px; font-size: .8rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.admin-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.admin-tile { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); color: var(--text); text-decoration: none; }
.admin-tile:hover { border-color: var(--accent); color: var(--text); }
.admin-tile--warn { border-color: var(--warn); background: linear-gradient(var(--warn-soft), var(--warn-soft)) top / 100% 4px no-repeat, var(--surface); }
.admin-tile__icon { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 8px; background: var(--accent-soft); color: var(--accent); flex: none; }
.admin-tile__icon .icon { width: 20px; height: 20px; }
.admin-tile__body { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.admin-tile__desc { font-size: .875rem; color: var(--muted); }
.admin-tile__state { display: flex; align-items: flex-start; gap: 6px; margin-top: 4px; font-size: .85rem; font-weight: 600; }
.admin-tile__state--ok { color: var(--ok); }
.admin-tile__state--warn { color: var(--warn); }
.admin-tile__state--info { color: var(--muted); font-weight: 500; }
.admin-tile__state .dot { margin-top: .45em; }
@media (max-width: 600px) { .admin-tiles { grid-template-columns: 1fr; } }
/* ---------- Schritt 23a: Netzplan ---------- */
.netzplan { margin-bottom: 20px; }
.__________cytoscape_container { position: relative; }
.netzplan__toolbar select { width: auto; max-width: 100%; }
.netzplan__toolbar { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; margin-bottom: 10px; }
.netzplan__toolbar select, .netzplan__search input { min-height: 36px; }
.netzplan__export { display: inline-flex; gap: 6px; align-items: center; margin-left: auto; }
.netzplan--overview .netzplan__search, .netzplan--overview #np-type, .netzplan--overview #np-net, .netzplan--overview .check--inline { display: none; }
.netzplan__search { flex: 1 1 240px; max-width: 360px; }
.netzplan__search input { width: 100%; }
.netzplan__edit { background: var(--accent-soft); border: 1px solid var(--border); border-radius: var(--radius); padding: 10px 14px; margin-bottom: 10px; }
.netzplan__edit p { margin: 0 0 8px; }
.netzplan__edit p:last-child { margin: 6px 0 0; }
.netzplan__edit-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.netzplan__edit-actions form { display: inline; margin: 0; }
.netzplan__stage { position: relative; display: flex; gap: 12px; }
.netzplan__canvas { flex: 1 1 auto; min-width: 0; height: 68vh; min-height: 420px; background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius); position: relative; overflow: hidden; }
.netzplan__loading { padding: 24px; margin: 0; }
.netzplan__info { flex: 0 0 300px; max-height: 68vh; overflow: auto; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); padding: 14px 16px; position: relative; }
.netzplan__info[hidden] { display: none; }
.netzplan__info h3 { margin: 0 28px 8px 0; font-size: 1.05rem; word-break: break-word; }
.netzplan__info h4 { margin: 14px 0 6px; font-size: .9rem; }
.netzplan__info-type { margin: 0 0 2px; }
.netzplan__close { position: absolute; top: 6px; right: 8px; border: 0; background: none; font-size: 1.5rem; line-height: 1; color: var(--muted); cursor: pointer; padding: 4px 8px; }
.netzplan__dl { display: grid; grid-template-columns: auto 1fr; gap: 4px 10px; margin: 8px 0 12px; font-size: .9rem; }
.netzplan__dl dt { color: var(--muted); }
.netzplan__dl dd { margin: 0; word-break: break-word; }
.netzplan__conns, .netzplan__members { list-style: none; padding: 0; margin: 0 0 12px; font-size: .9rem; }
.netzplan__conns li, .netzplan__members li { padding: 3px 0; border-bottom: 1px solid var(--border); }
.netzplan__legend { display: flex; flex-wrap: wrap; gap: 6px 16px; list-style: none; padding: 0; margin: 10px 0 0; align-items: center; }
.np-dot { display: inline-block; width: 12px; height: 12px; border-radius: 3px; border: 2px solid var(--border); vertical-align: -1px; background: var(--surface); }
.np-dot--ok { border-color: var(--ok); }
.np-dot--warn { border-color: var(--warn); }
.np-dot--danger { border-color: var(--danger); border-width: 3px; }
.np-line { display: inline-block; width: 26px; border-top: 2px solid var(--muted); vertical-align: middle; }
.np-line--dashed { border-top: 2px dashed var(--border); }
.np-line--ha { border-top: 3px dotted var(--accent); }
.np-line--missing { border-top: 2px dashed var(--danger); }
.netzplan__customer { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.netzplan__dialog { border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); color: var(--text); box-shadow: var(--shadow-lg); padding: 20px 22px; width: min(640px, calc(100vw - 32px)); }
.netzplan__dialog::backdrop { background: rgba(10, 16, 28, .45); }
.netzplan__dialog h3 { margin-top: 0; }
.netzplan__dialog-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 16px; margin-bottom: 16px; }
.netzplan__dialog [data-np-delete-form] { margin-top: 12px; }
@media (max-width: 900px) {
  .netzplan__canvas { height: 62vh; min-height: 360px; }
  .netzplan__info { position: fixed; left: 0; right: 0; bottom: 0; max-height: 55vh; border-radius: var(--radius) var(--radius) 0 0; z-index: 50; box-shadow: var(--shadow-lg); padding-bottom: 24px; }
  .netzplan__search { max-width: none; }
  .netzplan__dialog-grid { grid-template-columns: 1fr; }
}

/* ---------- Schritt 24b: Dashboard aus Bausteinen ---------- */
.dash-head { align-items: flex-start; }
.dash-tabs { display: flex; flex-wrap: wrap; gap: 4px; margin: -4px 0 16px; border-bottom: 1px solid var(--border); }
.dash-tabs a { padding: 8px 14px; border-radius: 8px 8px 0 0; color: var(--muted); text-decoration: none; font-weight: 600; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.dash-tabs a:hover { color: var(--text); background: var(--surface-2); }
.dash-tabs a[aria-current="page"] { color: var(--accent); border-bottom-color: var(--accent); }
.dash-tabs__start { color: var(--warn); font-size: .85em; }
.dash-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 20px; align-items: start; grid-auto-flow: row dense; }
.dash-w { grid-column: span 3; margin: 0; min-width: 0; }
.dash-w--s { grid-column: span 2; }
.dash-w--l { grid-column: 1 / -1; }
.dash-w--plain { background: none; border: 0; box-shadow: none; padding: 0; }
.dash-w--plain .stats, .dash-w--plain .all-lists { margin: 0; }
.dash-w__head { align-items: center; }
.dash-w__head h2 { flex: 1; min-width: 0; }
.dash-w__tools { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.icon-btn--small { width: 30px; height: 30px; font-size: 1rem; }
.dash-w__lead { margin: 0 0 6px; font-weight: 600; }
.dash-w.is-loading .dash-w__body { opacity: .5; }
.dash-w--empty, .dash-w--denied, .dash-w--unknown { border-style: dashed; }
.dash-w__grip { cursor: grab; color: var(--muted); font-size: 1.2rem; line-height: 1; user-select: none; }
.dash-grid--edit .dash-w { outline: 2px dashed transparent; outline-offset: 2px; }
.dash-grid--edit .dash-w:hover { outline-color: var(--border); }
.dash-w.is-dragging { opacity: .4; }
.dash-w.is-drop-target { outline-color: var(--accent) !important; }
.dash-w__edit { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--border); }
.dash-w__edit form { display: inline-flex; gap: 4px; margin: 0; }
.dash-edit__hint { margin: 0 0 12px; color: var(--muted); }
.dash-edit__row { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; }
.dash-edit__row form { margin: 0; }
.dash-edit__row .inline-form { display: flex; gap: 8px; align-items: flex-end; flex-wrap: wrap; }
.dash-edit__row label, #neue-ansicht label { display: flex; flex-direction: column; gap: 4px; font-weight: 600; font-size: .9rem; }
#neue-ansicht .inline-form { display: flex; gap: 10px; align-items: flex-end; flex-wrap: wrap; }
.dash-catalog { margin: 28px 0 20px; }
.dash-catalog h2 { font-size: 1.1rem; }
.dash-catalog__list { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 10px; }
.dash-catalog__item { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 14px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); margin: 0; }
.dash-empty { grid-column: 1 / -1; }
.stat--link { color: inherit; text-decoration: none; }
.stat--link:hover { border-color: var(--accent); }
.stat--warn .stat__value { color: var(--warn); }
.stat--danger .stat__value { color: var(--danger); }
.dash-checks { border: 0; padding: 0; margin: 16px 0 0; }
.dash-checks legend { font-weight: 600; margin-bottom: 4px; }
@media (max-width: 900px) { .dash-w, .dash-w--s { grid-column: 1 / -1; } .dash-grid { gap: 16px; } }
.dash-catalog__item .btn { white-space: nowrap; flex: none; }

/* Schritt 24c: gespeicherte Filter und neue Bausteine */
.saved-filters { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: -8px 0 20px; font-size: .9rem; }
.saved-filters__label { font-weight: 600; color: var(--muted); }
.saved-filters__chip { display: inline-block; padding: 3px 12px; border-radius: 999px; border: 1px solid var(--border); background: var(--surface); color: inherit; text-decoration: none; }
.saved-filters__chip:hover { border-color: var(--accent); }
.saved-filters__chip.is-active { background: var(--accent-soft); border-color: var(--accent); color: var(--accent); font-weight: 600; }
.saved-filters__actions { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-left: 4px; }
.saved-filters__actions .inline-form { display: inline-flex; align-items: center; gap: 6px; }
.saved-filters__save > summary { list-style: none; cursor: pointer; display: inline-flex; align-items: center; }
.saved-filters__save > summary::-webkit-details-marker { display: none; }
.saved-filters__save[open] > summary { display: none; }
.saved-filters__form { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.saved-filters__form input[name="name"] { min-width: 240px; min-height: 32px; }
.saved-filters__form small { flex-basis: 100%; }
.dash-filter__desc { margin: -4px 0 6px; }
.dash-count { display: flex; flex-direction: column; text-decoration: none; color: inherit; }
.dash-count__value { font-size: 2.2rem; font-weight: 700; line-height: 1.1; }
.dash-count__label { color: var(--muted); font-size: .9rem; }
.dash-count--alert .dash-count__value { color: var(--danger); }
.dash-links { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.dash-links a { display: inline-block; padding: 6px 12px; border-radius: 8px; background: var(--surface-2); text-decoration: none; font-weight: 600; }
.dash-links a:hover { background: var(--accent-soft); color: var(--accent); }
.dash-note > :first-child { margin-top: 0; }
.dash-note > :last-child { margin-bottom: 0; }
.dash-filter__list li > .badge { align-self: flex-start; margin: 2px 0; }

/* ---------- Schritt 26a: Gruppen und Kundenumfang ---------- */
.scope-box { border: 1px solid var(--border); border-radius: var(--radius, 8px); padding: 12px 16px 14px; margin: 4px 0 8px; display: flex; flex-direction: column; gap: 8px; }
.scope-box legend { font-weight: 600; padding: 0 6px; }
.scope-box [data-scope-detail] { display: flex; flex-direction: column; gap: 8px; padding-left: 4px; }
.scope-box [data-scope-detail][hidden] { display: none; }
.check-list { display: flex; flex-direction: column; gap: 4px; max-height: 260px; overflow-y: auto; }
.field-label { font-size: .9rem; font-weight: 600; margin: 4px 0 0; }
.group-tree { list-style: none; margin: 0; padding: 0; }
.group-tree ul { list-style: none; margin: 0; padding-left: 22px; border-left: 2px solid var(--border); }
.group-tree li { margin: 0; }
.group-tree__row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 8px 0; border-bottom: 1px solid var(--border); }
.group-tree__name { font-weight: 600; }
.group-tree__meta { color: var(--muted); font-size: .9rem; }
.group-tree__actions { margin-left: auto; display: flex; gap: 8px; }
.scope-note { display: inline-flex; align-items: center; gap: 6px; font-size: .85rem; color: var(--muted); }
