/* diEDok – Weboberfläche. Farben aus Logo/Favicon: Signalrot + Anthrazit. */
:root {
  --red: #db271d;
  --red-dark: #b01e16;
  --red-soft: #fdecea;
  --ink: #181a20;
  --ink-2: #23262e;
  --ink-3: #2f333d;
  --paper: #f4f5f7;
  --surface: #ffffff;
  --line: #dfe2e8;
  --line-strong: #c9ced7;
  --text: #1c1f25;
  --muted: #5f6673;
  --ok: #1d7a47;
  --ok-soft: #e6f4ec;
  --warn: #9a6400;
  --warn-soft: #fff4dc;
  --test: #f2b705;
  --focus: #2563eb;
  --radius: 5px;
  --radius-sm: 4px;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", "Cascadia Mono", Consolas, monospace;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font: 14px/1.5 var(--font); color: var(--text); background: var(--paper); }
a { color: var(--red-dark); }
a:hover { color: var(--red); }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
h1 { font-size: 1.45rem; line-height: 1.25; margin: 0 0 .2rem; letter-spacing: -.012em; }
h2 { font-size: 1.02rem; margin: 0 0 .65rem; letter-spacing: -.005em; }
h3 { font-size: 1rem; margin: 0 0 .5rem; }
p { margin: 0 0 .75rem; }
.muted { color: var(--muted); }
.small { font-size: .85rem; }
.mono { font-family: var(--mono); font-size: .9em; }
.nowrap { white-space: nowrap; }
.right { text-align: right; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* ---------- Gerüst ---------- */
.shell { display: grid; grid-template-columns: 236px 1fr; min-height: 100vh; }
.sidebar { background: var(--ink); color: #c9ccd3; display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; overflow-y: auto; }
.brand { display: flex; align-items: center; gap: .6rem; padding: 1.25rem 1.25rem 1rem; border-bottom: 1px solid var(--ink-3); }
.brand img { width: 118px; height: auto; display: block; }
.brand .env { font-size: .7rem; font-weight: 700; background: var(--test); color: #1c1600; border-radius: 4px; padding: .1rem .4rem; }
.nav { padding: .75rem .6rem 1rem; flex: 1; }
.nav-group { margin-top: .85rem; }
.nav-group:first-child { margin-top: 0; }
.nav-title { font-size: .78rem; color: #8b909b; padding: 0 .65rem .3rem; }
.nav a { display: flex; align-items: center; gap: .6rem; color: #e3e5ea; text-decoration: none; padding: .38rem .65rem; border-radius: var(--radius-sm); font-size: .92rem; position: relative; }
.nav a:hover { background: var(--ink-2); color: #fff; }
.nav a.active { background: var(--ink-3); color: #fff; }
.nav a.active svg { opacity: 1; }
.nav a.active::before { content: ""; position: absolute; left: -.6rem; top: .35rem; bottom: .35rem; width: 3px; border-radius: 0 3px 3px 0; background: var(--red); }
.nav svg { width: 17px; height: 17px; flex: none; opacity: .7; }
.sidebar-foot { padding: .9rem 1.25rem 1.2rem; border-top: 1px solid var(--ink-3); font-size: .85rem; }
.sidebar-foot .who { color: #fff; font-weight: 600; }
.sidebar-foot form { margin-top: .5rem; }
.linkbtn { background: none; border: 0; color: #c9ccd3; padding: 0; font: inherit; cursor: pointer; text-decoration: underline; }
.linkbtn:hover { color: #fff; }

.main { min-width: 0; display: flex; flex-direction: column; }
.topbar { display: none; }
.context { background: var(--ink-2); color: #fff; padding: .5rem 2rem; font-size: .9rem; display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; }
.context.impersonating { background: var(--red-dark); }
.context form { margin: 0 0 0 auto; }
.context .btn { background: #fff; color: var(--red-dark); border-color: #fff; }
.demo-bar { background: var(--warn-soft); color: var(--warn); padding: .5rem 2rem; font-size: .9rem; border-bottom: 1px solid #f0d9a8; }
.content { padding: 1.4rem 1.75rem 2.5rem; max-width: 1320px; width: 100%; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.1rem; }
.page-head .lead { color: var(--muted); margin: .15rem 0 0; }
.actions { display: flex; gap: .5rem; flex-wrap: wrap; align-items: center; }

/* ---------- Bausteine ---------- */
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: .9rem 1.1rem 1rem; margin-bottom: 1rem; }
.panel > h2:first-child { margin-top: 0; }
.panel-head { display: flex; justify-content: space-between; align-items: center; gap: 1rem; margin-bottom: .75rem; flex-wrap: wrap; }
.panel-head h2 { margin: 0; }
.grid { display: grid; gap: 1rem; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.split { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 1rem; align-items: start; }

.figures { display: flex; gap: 0; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); margin-bottom: 1rem; overflow: hidden; flex-wrap: wrap; }
.figure { flex: 1 1 160px; padding: .75rem 1.1rem .8rem; border-right: 1px solid var(--line); }
.figure:last-child { border-right: 0; }
.figure .value { font-size: 1.55rem; font-weight: 650; line-height: 1.15; font-variant-numeric: tabular-nums; letter-spacing: -.01em; }
.figure .label { color: var(--muted); font-size: .84rem; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: .4rem; font: inherit; font-size: .9rem; font-weight: 600; line-height: 1.2;
  padding: .45rem .8rem; border-radius: var(--radius-sm); border: 1px solid var(--line-strong); background: var(--surface); color: var(--text); cursor: pointer; text-decoration: none; white-space: nowrap; }
.btn:hover { border-color: var(--muted); color: var(--text); }
.btn-primary { background: var(--red); border-color: var(--red); color: #fff; }
.btn-primary:hover { background: var(--red-dark); border-color: var(--red-dark); color: #fff; }
.btn-danger { color: var(--red-dark); border-color: #efb4af; }
.btn-danger:hover { background: var(--red-soft); color: var(--red-dark); border-color: var(--red); }
.btn-sm { padding: .25rem .55rem; font-size: .82rem; font-weight: 500; }
.btn-quiet { border-color: transparent; background: transparent; }
.btn-quiet:hover { background: var(--paper); border-color: var(--line); }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
form.inline { display: inline; margin: 0; }

.alert { border-radius: var(--radius-sm); padding: .6rem .85rem; margin-bottom: .9rem; border: 1px solid; border-left-width: 3px; }
.alert-ok { background: var(--ok-soft); border-color: #b9e0c9; color: #135a33; }
.alert-error { background: var(--red-soft); border-color: #f2bbb6; color: #8f1a13; }
.alert-info { background: #eef3fb; border-color: #c8d7f0; color: #23426e; }
.alert-warn { background: var(--warn-soft); border-color: #f0d9a8; color: #7a5000; }

.badge { display: inline-block; font-size: .76rem; font-weight: 600; line-height: 1.35; padding: .05rem .4rem; border-radius: 3px; background: #eceef2; color: #4b525e; white-space: nowrap; }
.badge-ok { background: var(--ok-soft); color: var(--ok); }
.badge-red { background: var(--red-soft); color: var(--red-dark); }
.badge-warn { background: var(--warn-soft); color: var(--warn); }
.type-chip { display: inline-flex; align-items: center; gap: .4rem; white-space: nowrap; }
.type-chip i { width: .7rem; height: .7rem; border-radius: 3px; display: inline-block; background: var(--c, #999); box-shadow: inset 0 0 0 1px rgba(0,0,0,.12); }

/* ---------- Tabellen ---------- */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); margin-bottom: 1rem; }
table { width: 100%; border-collapse: collapse; font-size: .93rem; }
th, td { text-align: left; padding: .5rem .75rem; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-weight: 600; color: var(--muted); font-size: .8rem; background: #f8f9fb; white-space: nowrap; padding-top: .45rem; padding-bottom: .45rem; }
tr:last-child td { border-bottom: 0; }
tbody tr:hover td { background: #fbfbfc; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
tr.is-cancelled td { color: var(--muted); text-decoration: line-through; }
tr.is-cancelled td.keep { text-decoration: none; }
.row-link { color: inherit; text-decoration: none; font-weight: 600; }
.row-link:hover { color: var(--red-dark); text-decoration: underline; }
td.edge { padding: 0; width: 4px; background: var(--c, transparent); }
.empty { padding: 2.5rem 1rem; text-align: center; color: var(--muted); }

/* ---------- Formulare ---------- */
label { display: block; font-weight: 600; font-size: .85rem; margin-bottom: .25rem; }
.field { margin-bottom: .75rem; }
.field .hint { font-weight: 400; color: var(--muted); font-size: .82rem; margin-top: .25rem; }
input[type=text], input[type=email], input[type=password], input[type=number], input[type=date], input[type=search], input[type=url], input[type=tel], select, textarea {
  width: 100%; font: inherit; padding: .42rem .6rem; border: 1px solid var(--line-strong); border-radius: var(--radius-sm); background: #fff; color: var(--text); }
textarea { min-height: 6rem; resize: vertical; }
input:focus, select:focus, textarea:focus { border-color: var(--focus); outline: 2px solid rgba(37, 99, 235, .2); outline-offset: 0; }
.check { display: flex; align-items: center; gap: .5rem; font-weight: 500; margin-bottom: .5rem; }
.check input { width: 1.05rem; height: 1.05rem; accent-color: var(--red); }
.form-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: .75rem 1rem; align-items: end; }
.filters { display: flex; flex-wrap: wrap; gap: .6rem; align-items: flex-end; padding: 0 0 .9rem; margin-bottom: .9rem; border-bottom: 1px solid var(--line); }
.filters .field { margin: 0; min-width: 130px; }
.filters .grow { flex: 1 1 220px; }
fieldset { border: 0; border-top: 1px solid var(--line); border-radius: 0; padding: .6rem 0 0; margin: .4rem 0 1rem; }
legend { font-weight: 600; padding: 0 .5rem 0 0; font-size: .9rem; }
details.inline-form > summary { cursor: pointer; list-style: none; display: inline-flex; }
details.inline-form > summary::-webkit-details-marker { display: none; }
details.inline-form[open] > summary { margin-bottom: .75rem; }
.multi { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: .1rem .75rem; max-height: 220px; overflow: auto; padding: .35rem .5rem; border: 1px solid var(--line-strong); border-radius: var(--radius-sm); background: #fff; }
.multi .check { margin: .15rem 0; font-size: .9rem; }

/* ---------- Einsatzdetail ---------- */
.mission-head { display: flex; gap: 1rem; align-items: flex-start; justify-content: space-between; flex-wrap: wrap; border-left: 4px solid var(--c, var(--red)); padding-left: .9rem; margin-bottom: 1.1rem; }
.mission-head .kicker { color: var(--muted); font-size: .92rem; }
.mission-head h1 { font-size: 1.6rem; }
dl.facts { display: grid; grid-template-columns: minmax(130px, max-content) 1fr; gap: .35rem 1rem; margin: 0; }
dl.facts dt { color: var(--muted); }
dl.facts dd { margin: 0; font-weight: 500; overflow-wrap: anywhere; }
.prose { white-space: pre-wrap; overflow-wrap: anywhere; }

/* Statuszeiten als Zeitleiste (FMS-Status) */
.timeline { list-style: none; margin: .5rem 0 .25rem; padding: 0; display: grid; grid-template-columns: repeat(var(--n, 7), minmax(0, 1fr)); position: relative; }
.timeline::before { content: ""; position: absolute; left: 0; right: 0; top: 1.05rem; height: 3px; background: var(--line); border-radius: 3px; }
.timeline li { position: relative; padding-top: 1.9rem; text-align: center; min-width: 0; }
.timeline li::before { content: ""; position: absolute; top: .7rem; left: 50%; width: .8rem; height: .8rem; margin-left: -.4rem; border-radius: 50%; background: var(--surface); border: 3px solid var(--line-strong); }
.timeline li.set::before { border-color: var(--red); background: var(--red); }
.timeline .t { font-size: 1.05rem; font-weight: 700; font-variant-numeric: tabular-nums; display: block; }
.timeline .s { font-size: .78rem; color: var(--muted); display: block; line-height: 1.25; padding: 0 .2rem; }
.timeline li.unset .t { color: var(--line-strong); }
.toggles { display: flex; flex-wrap: wrap; gap: .35rem; }

/* ---------- Statistik ---------- */
.bars { display: grid; gap: .35rem; }
.bar { display: grid; grid-template-columns: minmax(110px, 28%) 1fr 3.5rem; gap: .6rem; align-items: center; font-size: .9rem; }
.bar .track { background: var(--paper); border-radius: 4px; height: 1.1rem; overflow: hidden; }
.bar .fill { display: block; height: 100%; background: var(--c, var(--red)); border-radius: 4px; min-width: 2px; }
.bar .n { text-align: right; font-variant-numeric: tabular-nums; font-weight: 600; }
.chart { width: 100%; height: auto; display: block; }
.chart .axis { stroke: var(--line-strong); }
.chart .col { fill: var(--red); }
.chart .col:hover { fill: var(--red-dark); }
.chart text { font-size: 11px; fill: var(--muted); }

/* ---------- Anmeldung ---------- */
.auth { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1fr) minmax(320px, 460px); background: var(--surface); }
.auth-art { background: var(--ink); color: #c9ccd3; display: flex; flex-direction: column; justify-content: space-between; padding: 3rem; position: relative; overflow: hidden; }
.auth-art img { width: 210px; height: auto; }
.auth-art .claim { font-size: 1.6rem; line-height: 1.3; color: #fff; max-width: 22ch; font-weight: 600; }
.auth-art .stripes { position: absolute; right: -60px; bottom: -40px; width: 360px; height: 220px; transform: rotate(-24deg);
  background: repeating-linear-gradient(90deg, var(--red) 0 34px, transparent 34px 68px); opacity: .9; }
.auth-form { display: flex; flex-direction: column; justify-content: center; padding: 3rem 2.5rem; }
.auth-form h1 { margin-bottom: .35rem; }
.auth-form form { margin-top: 1.25rem; }
.auth-form .btn-primary { width: 100%; padding: .7rem; margin-top: .4rem; }
.plain { max-width: 560px; margin: 4rem auto; padding: 0 1.25rem; }

/* ---------- Responsiv ---------- */
@media (max-width: 1100px) {
  .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .split { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 860px) {
  .shell { grid-template-columns: 1fr; }
  .sidebar { position: fixed; inset: 0 auto 0 0; width: 272px; z-index: 20; transform: translateX(-100%); transition: transform .2s ease; }
  body.nav-open .sidebar { transform: none; }
  body.nav-open::after { content: ""; position: fixed; inset: 0; background: rgba(0,0,0,.4); z-index: 10; }
  .topbar { display: flex; align-items: center; gap: .75rem; background: var(--ink); color: #fff; padding: .6rem 1rem; position: sticky; top: 0; z-index: 5; }
  .topbar img { width: 92px; }
  .topbar button { background: none; border: 1px solid var(--ink-3); color: #fff; border-radius: 6px; padding: .35rem .55rem; font: inherit; }
  .content { padding: 1.25rem 1rem 2.5rem; }
  .context, .demo-bar { padding: .5rem 1rem; }
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .auth { grid-template-columns: 1fr; }
  .auth-art { padding: 1.5rem; min-height: 180px; }
  .auth-art .claim { font-size: 1.2rem; }
  .figure { border-right: 0; border-bottom: 1px solid var(--line); }
  .timeline { grid-template-columns: repeat(4, minmax(0, 1fr)); row-gap: .75rem; }
  .timeline::before { display: none; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
@media print {
  .sidebar, .topbar, .context, .demo-bar, .actions, .filters, .no-print { display: none !important; }
  .shell { display: block; }
  body { background: #fff; }
  .panel, .table-wrap { border-color: #bbb; }
}
.foot-link { color: #c9ccd3; }
.foot-link:hover { color: #fff; }

/* ---------- Newsletter ---------- */
.mail-preview { border: 1px solid var(--line); border-radius: var(--radius); background: #f3f4f6; max-height: 520px; overflow: auto; }
.code-block { font-family: var(--mono); font-size: .8rem; background: #f3f4f6; border: 1px solid var(--line); border-radius: 6px; padding: .6rem .75rem; white-space: pre-wrap; word-break: break-all; }

/* Zwei-Faktor-Anmeldung */
.plain-wide { max-width: 680px; }
.otp-input { font-family: var(--mono); font-size: 1.35rem; letter-spacing: .18em; max-width: 12rem; text-align: center; }
.mfa-steps { list-style: none; counter-reset: step; margin: 0; padding: 0; display: grid; gap: 1.25rem; }
.mfa-steps > li { counter-increment: step; position: relative; padding-left: 2.6rem; display: grid; gap: .4rem; }
.mfa-steps > li::before { content: counter(step); position: absolute; left: 0; top: -.1rem; width: 1.8rem; height: 1.8rem; border-radius: 50%;
  background: var(--red); color: #fff; font-weight: 700; display: grid; place-items: center; font-size: .9rem; }
.mfa-qr svg { width: 220px; height: 220px; display: block; border: 1px solid var(--line); border-radius: 8px; }
.mfa-secret { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; }
.mfa-secret code { font-family: var(--mono); font-size: .95rem; background: #f3f4f6; border: 1px solid var(--line); border-radius: 6px; padding: .3rem .5rem; word-break: break-all; }
.mfa-codes { list-style: none; padding: 0; margin: 0 0 1rem; display: grid; grid-template-columns: repeat(auto-fill, minmax(9.5rem, 1fr)); gap: .4rem; }
.mfa-codes code { font-family: var(--mono); font-size: 1.05rem; letter-spacing: .05em; }
@media print { .mfa-codes + .btn, .mfa-codes ~ .btn, .plain > p:last-child { display: none; } }

/* Hilfe-„?“ */
.help { position: relative; display: inline-grid; place-items: center; width: 1.05rem; height: 1.05rem; margin-left: .3rem; border-radius: 50%;
  border: 1px solid var(--line); color: var(--muted); background: #fff; font: 600 .7rem/1 system-ui, sans-serif; vertical-align: middle; cursor: help;
  user-select: none; letter-spacing: 0; text-transform: none; }
.help:hover, .help:focus { color: var(--red); border-color: var(--red); outline: none; }
.help::after { content: attr(data-help); position: absolute; z-index: 50; top: calc(100% + .45rem); left: -.5rem; width: max-content; max-width: min(22rem, 80vw);
  padding: .55rem .7rem; border-radius: 6px; background: #1d2129; color: #f3f4f6; font: 400 .82rem/1.45 system-ui, sans-serif; text-align: left;
  white-space: normal; box-shadow: 0 4px 14px rgba(0,0,0,.16); display: none; pointer-events: none; }
.help.help-left::after { left: auto; right: -.5rem; }
/* erst bei Bedarf einblenden – ein unsichtbarer Tooltip würde sonst auf schmalen Bildschirmen die Seite verbreitern */
.help:hover::after, .help:focus::after { display: block; }
h1 .help { font-size: .72rem; }

/* Tabellen: Suche und Sortierung */
.table-tools { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; margin: 0 0 .6rem; }
.table-tools input[type=search] { max-width: 20rem; }
.table-tools .count { color: var(--muted); font-size: .85rem; }
th[data-sort] { cursor: pointer; user-select: none; white-space: nowrap; }
th[data-sort]::after { content: '↕'; margin-left: .3rem; opacity: 0; font-size: .8em; }
th[data-sort]:hover::after, th[data-sort]:focus-visible::after { opacity: .45; }
th[data-sort][aria-sort=ascending]::after { content: '↑'; opacity: .9; }
th[data-sort][aria-sort=descending]::after { content: '↓'; opacity: .9; }
th[data-sort]:hover { color: var(--text); }
tr.is-filtered { display: none; }
th[data-sort] .th-link { color: inherit; text-decoration: none; }
th[data-sort]:has(.th-link)::after { content: none; }
th[data-sort] .th-link::after { content: '↕'; margin-left: .3rem; opacity: 0; font-size: .8em; }
th[data-sort]:hover .th-link::after { opacity: .45; }
th[data-sort][aria-sort=ascending] .th-link::after { content: '↑'; opacity: .9; }
th[data-sort][aria-sort=descending] .th-link::after { content: '↓'; opacity: .9; }

/* Einzelne Aufklapp-Aktion braucht keinen eigenen Kasten, solange sie geschlossen ist */
.panel:has(> details.inline-form:only-child:not([open])) { background: none; border: 0; padding: 0; margin-bottom: .75rem; }
/* Abschnittsnavigation (z. B. Einstellungen) als Reiterleiste statt Knopfreihe */
.subnav { display: flex; gap: 1.25rem; flex-wrap: wrap; border-bottom: 1px solid var(--line); margin: 0 0 1rem; }
.subnav a { color: var(--muted); text-decoration: none; font-weight: 600; font-size: .88rem; padding: .35rem 0 .5rem; margin-bottom: -1px; border-bottom: 2px solid transparent; }
.subnav a:hover { color: var(--text); border-bottom-color: var(--line-strong); }

/* ---------- Smartphone ---------- */
@media (max-width: 640px) {
  body { font-size: 14.5px; }
  /* Eingabefelder mit 16 px, sonst vergrößert iOS die Seite beim Antippen */
  input[type=text], input[type=email], input[type=password], input[type=number], input[type=date], input[type=search], input[type=url], input[type=tel], select, textarea { font-size: 16px; padding: .5rem .6rem; }
  .content { padding: 1rem .85rem 2rem; }
  h1 { font-size: 1.3rem; }
  .page-head { margin-bottom: .85rem; gap: .5rem; }
  .page-head .actions { width: 100%; }
  .btn { white-space: normal; text-align: center; }
  .btn:not(.btn-sm) { min-height: 2.5rem; }                       /* Tippfläche */
  .context { font-size: .82rem; padding: .45rem .85rem; gap: .5rem; }
  .context form { margin: 0; }
  .panel { padding: .8rem .85rem .9rem; }
  .figures { display: grid; grid-template-columns: 1fr 1fr; }
  .figure { border-right: 0; border-bottom: 1px solid var(--line); padding: .6rem .85rem; }
  .figure:nth-child(odd) { border-right: 1px solid var(--line); }
  .figure .value { font-size: 1.3rem; }
  .filters { display: grid; grid-template-columns: 1fr 1fr; }
  .filters .field { min-width: 0; }
  .filters .grow, .filters > .btn { grid-column: 1 / -1; }
  .form-row { grid-template-columns: 1fr; }
  dl.facts { grid-template-columns: minmax(105px, 38%) 1fr; }
  .mission-head h1 { font-size: 1.35rem; }
  /* Statuszeiten untereinander statt gequetschter Zeitleiste */
  .timeline { grid-template-columns: 1fr; row-gap: 0; }
  .timeline::before { display: block; left: .38rem; right: auto; top: .6rem; bottom: .6rem; width: 3px; height: auto; }
  .timeline li { display: flex; align-items: baseline; gap: .75rem; padding: .3rem 0 .3rem 1.6rem; text-align: left; }
  .timeline li::before { top: .55rem; left: 0; margin-left: 0; }
  .timeline .t { min-width: 3.2rem; }
  .timeline .s { font-size: .85rem; padding: 0; }
  .bar { grid-template-columns: minmax(90px, 38%) 1fr 2.8rem; }
  /* Tabellen als Liste: jede Zeile ein Block, Spaltenname vor dem Wert (data-label aus app.js) */
  table.stack thead { display: none; }
  table.stack, table.stack tbody, table.stack tr, table.stack td { display: block; width: 100%; }
  table.stack tr { padding: .55rem .85rem; border-bottom: 1px solid var(--line); position: relative; }
  table.stack tr:last-child { border-bottom: 0; }
  table.stack td { border: 0; padding: .1rem 0 .1rem 36%; position: relative; text-align: left; min-height: 1.4rem; }
  table.stack td::before { content: attr(data-label); position: absolute; left: 0; top: .2rem; width: calc(36% - .6rem); color: var(--muted); font-size: .78rem; font-weight: 600;
    font-family: var(--font); letter-spacing: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  table.stack td:not([data-label]), table.stack td[data-label=""] { padding-left: 0; }
  table.stack td:not([data-label])::before, table.stack td[data-label=""]::before { content: none; }
  table.stack td.is-empty:not(.edge) { display: none; }   /* leere Felder in der Listenansicht weglassen */
  table.stack td.right, table.stack td.num { text-align: left; }
  table.stack td.right:last-child { padding-top: .4rem; }
  table.stack td.edge { position: absolute; left: 0; top: 0; bottom: 0; width: 3px; padding: 0; display: block; }
  table.stack td.edge::before { content: none; }
  table.stack tbody tr:hover td { background: none; }
  .table-tools input[type=search] { max-width: none; }
  .subnav { gap: .9rem; overflow-x: auto; flex-wrap: nowrap; }
  .subnav a { white-space: nowrap; }
}
dl.merkmale dt { font-weight: 500; }
dl.merkmale dd { font-weight: 400; }

/* Verträge & Pakete */
.nav-badge { margin-left: auto; min-width: 1.25rem; padding: 0 .35rem; border-radius: 9px; background: var(--red); color: #fff; font-size: .72rem; font-weight: 700; line-height: 1.25rem; text-align: center; }
.usage { display: grid; gap: .25rem; min-width: 9rem; }
.usage-bar { height: 6px; background: #e6e8ec; border-radius: 3px; overflow: hidden; }
.usage-bar > span { display: block; height: 100%; background: var(--ok); }
.usage-bar.is-near > span { background: #d29a1e; }
.usage-bar.is-over > span { background: var(--red); }
.usage-text { font-size: .85rem; color: var(--muted); }
.usage-text strong { color: var(--ink, #1f2328); }
.pkg-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: .75rem; }
.pkg { border: 1px solid var(--line); border-radius: var(--radius); padding: .75rem .9rem; background: var(--surface); }
.pkg.is-current { border-color: var(--ink-3, #3a3f4a); box-shadow: inset 0 0 0 1px var(--ink-3, #3a3f4a); }
.pkg.is-suggested { border-color: var(--ok); box-shadow: inset 0 0 0 1px var(--ok); }
.pkg h3 { margin: 0 0 .25rem; font-size: 1rem; }
.pkg .price { font-weight: 700; font-size: 1.05rem; }
.pkg ul { margin: .4rem 0 0; padding-left: 1.1rem; font-size: .88rem; }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.auth-form .form-row { gap: .75rem; }
ol.notes { list-style: none; margin: 0 0 .75rem; padding: 0; border-left: 2px solid var(--line); }
ol.notes li { padding: .1rem 0 .75rem 1rem; position: relative; }
ol.notes li::before { content: ""; position: absolute; left: -6px; top: .45rem; width: 10px; height: 10px; border-radius: 50%; background: var(--surface); border: 2px solid var(--ink-3, #3a3f4a); }
.note-meta { font-size: .85rem; color: var(--muted); margin-bottom: .2rem; }

/* Hilfe & Wiki */
.wiki-search { display: flex; gap: .5rem; margin-bottom: 1rem; max-width: 640px; }
.wiki-search input { flex: 1; }
.wiki-cats { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 1rem; }
.wiki-cats .panel { margin: 0; }
.wiki-list { margin: 0; padding-left: 1.1rem; }
.wiki-list li { margin: .25rem 0; }
.wiki-hit { padding: .5rem 0; border-bottom: 1px solid var(--line); }
.wiki-hit p { margin: .2rem 0 0; }
.wiki-layout { display: grid; grid-template-columns: minmax(0, 1fr) 260px; gap: 1rem; align-items: start; }
.wiki-article { line-height: 1.6; max-width: 860px; }
.wiki-article h1 { margin-bottom: .2rem; }
.wiki-article h2 { margin-top: 1.6rem; }
.wiki-article h3 { margin-top: 1.2rem; }
.wiki-article pre { background: #f3f4f6; border: 1px solid var(--line); border-radius: var(--radius-sm); padding: .6rem .8rem; overflow-x: auto; }
.wiki-article code { background: #f3f4f6; padding: 0 .25rem; border-radius: 3px; font-size: .9em; }
.wiki-article pre code { background: none; padding: 0; }
.wiki-note { border-left: 3px solid var(--warn); background: var(--warn-soft); padding: .6rem .8rem; margin: .8rem 0; border-radius: 0 var(--radius-sm) var(--radius-sm) 0; }
.wiki-aside { position: sticky; top: 1rem; }
@media (max-width: 900px) { .wiki-layout { grid-template-columns: 1fr; } .wiki-aside { position: static; } }
