/* Abdeckungsanalyse – Gestaltung angelehnt an den Feuerwehr-Auftritt von IT Florian Spengler.
   Navy und Feuerrot, eine Schrift (Archivo), Linien statt Schatten, Status nie nur über Farbe. */

@font-face {
  font-family: "Archivo";
  src: url("../vendor/archivo.woff2") format("woff2");
  font-weight: 400 800;
  font-stretch: 62% 125%;
  font-display: swap;
}

:root {
  --navy: #1f2d3d;
  --navy-2: #2f4459;
  --ink: #1b2430;
  --ink-2: #3a4655;
  --muted: #5b6774;
  --line: #dde2e7;
  --line-strong: #c4ccd4;
  --surface: #f4f6f8;
  --panel: #ffffff;
  --red: #af2b1e;
  --focus: #af2b1e;
  /* Status der Erreichbarkeit: immer zusammen mit Text oder Symbol */
  --ok: #2e7d4f;     --ok-fill: #cfe5d6;
  --warn: #b86e0f;   --warn-fill: #f4dfbc;
  --bad: #af2b1e;    --bad-fill: #f1d0cb;
  --font: "Archivo", "Helvetica Neue", Arial, sans-serif;
  --radius: 6px;
  --sidebar: 252px;
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { font-family: var(--font); font-size: 15px; line-height: 1.5; color: var(--ink); background: var(--surface); }
h1, h2, h3 { margin: 0; font-weight: 800; font-stretch: 80%; line-height: 1.1; letter-spacing: -0.005em; }
h1 { font-size: 30px; }
h2 { font-size: 19px; font-stretch: 88%; }
h3 { font-size: 16px; font-stretch: 92%; }
p { margin: 0 0 .8em; }
a { color: var(--navy); }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.num { font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- Grundaufbau ---------- */
.app { display: grid; grid-template-columns: var(--sidebar) 1fr; min-height: 100vh; }
.sidebar { background: var(--panel); border-right: 1px solid var(--line); display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; }
.brand { display: flex; gap: 12px; align-items: center; padding: 22px 20px 18px; text-decoration: none; color: inherit; }
.brand__mark { width: 10px; height: 34px; background: var(--red); flex: none; }
.brand__name { display: block; font-weight: 800; font-stretch: 78%; font-size: 21px; line-height: 1; }
.brand__by { display: block; font-size: 12.5px; color: var(--muted); margin-top: 4px; }
.org { margin: 4px 12px 14px; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--radius); }
.org__label { font-size: 12.5px; color: var(--muted); }
.org__name { font-weight: 700; }
.nav { display: grid; gap: 2px; padding: 0 12px; }
.nav a { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: var(--radius); text-decoration: none; color: var(--ink-2); font-weight: 600; position: relative; }
.nav a:hover { background: var(--surface); color: var(--ink); }
.nav a[aria-current="page"] { background: #eef2f6; color: var(--navy); }
.nav a[aria-current="page"]::before { content: ""; position: absolute; left: -12px; top: 8px; bottom: 8px; width: 3px; background: var(--red); border-radius: 0 2px 2px 0; }
.nav svg { width: 18px; height: 18px; flex: none; stroke: currentColor; fill: none; stroke-width: 1.8; }
.sidebar__foot { margin-top: auto; padding: 16px 20px 20px; border-top: 1px solid var(--line); font-size: 13.5px; }
.sidebar__foot button { background: none; border: 0; padding: 0; color: var(--navy); text-decoration: underline; cursor: pointer; }

.main { min-width: 0; display: flex; flex-direction: column; }
#view:focus { outline: none; }
.app > * { min-width: 0; }
.notice-bar { background: #fff8ea; border-bottom: 1px solid #ecd9b0; color: #6b4a0e; padding: 8px 28px; font-size: 13.5px; }
.page-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px; padding: 24px 28px 18px; }
.page-head p { margin: 6px 0 0; color: var(--muted); }
.content { padding: 0 28px 40px; display: grid; grid-template-columns: minmax(0, 1fr); gap: 20px; }

/* ---------- Bedienelemente ---------- */
.controls { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.segmented { display: inline-flex; border: 1px solid var(--line-strong); border-radius: var(--radius); background: var(--panel); padding: 2px; }
.segmented button { border: 0; background: none; padding: 6px 14px; border-radius: 4px; cursor: pointer; font-weight: 600; color: var(--ink-2); }
.segmented button[aria-pressed="true"] { background: var(--navy); color: #fff; }
.field { display: grid; gap: 4px; }
.field label, .field .label { font-size: 13px; font-weight: 600; color: var(--ink-2); }
select, input:not([type]), input[type="text"], input[type="number"], input[type="email"], input[type="password"] {
  border: 1px solid var(--line-strong); border-radius: var(--radius); background: var(--panel); padding: 8px 10px; min-height: 38px;
}
select:focus, input:focus { outline: none; border-color: var(--navy); box-shadow: 0 0 0 3px rgba(31,45,61,.15); }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border-radius: var(--radius); border: 1px solid transparent; padding: 8px 14px; font-weight: 700; cursor: pointer; min-height: 38px; text-decoration: none; }
.btn--primary { background: var(--navy); color: #fff; }
.btn--primary:hover { background: var(--ink); }
.btn--line { background: var(--panel); border-color: var(--line-strong); color: var(--ink); }
.btn--line:hover { border-color: var(--navy); }
.btn--danger { background: none; border: 0; color: var(--red); padding: 4px 6px; min-height: 0; font-weight: 600; }
.btn[disabled] { opacity: .55; cursor: not-allowed; }

/* ---------- Flächen ---------- */
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); }
.panel__head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 16px 18px 0; }
.panel__head p { margin: 4px 0 0; color: var(--muted); font-size: 13.5px; }
.panel__body { padding: 14px 18px 18px; }

/* Kennzahlen als eine Leiste */
.kpis { display: grid; grid-template-columns: repeat(4, 1fr); }
.kpi { padding: 16px 18px; }
.kpi + .kpi { border-left: 1px solid var(--line); }
.kpi__label { font-size: 13.5px; color: var(--ink-2); font-weight: 600; }
.kpi__value { font-size: 34px; font-weight: 800; font-stretch: 80%; line-height: 1.05; margin: 6px 0 4px; font-variant-numeric: tabular-nums; }
.kpi__value small { font-size: 18px; font-weight: 700; }
.kpi__sub { font-size: 13px; color: var(--muted); }
.kpi__sub strong { color: var(--ink-2); font-weight: 700; }

.grid-main { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(300px, 1fr); gap: 20px; align-items: start; }
.stack { display: grid; grid-template-columns: minmax(0, 1fr); gap: 20px; }

/* Karte (Skizze) */
.map { position: relative; border-top: 1px solid var(--line); background: #f7f8fa; border-radius: 0 0 var(--radius) var(--radius); overflow: hidden; }
.map svg { display: block; width: 100%; height: auto; }
.map__caption { position: absolute; left: 12px; bottom: 10px; font-size: 12px; color: var(--muted); background: rgba(255,255,255,.85); padding: 2px 6px; border-radius: 3px; }
.legend { display: flex; flex-wrap: wrap; gap: 8px 18px; padding: 12px 18px 16px; font-size: 13px; color: var(--ink-2); border-top: 1px solid var(--line); }
.legend span { display: inline-flex; align-items: center; gap: 7px; }
.sw { width: 14px; height: 14px; border-radius: 3px; border: 1.5px solid; flex: none; }
.sw--ok { background: var(--ok-fill); border-color: var(--ok); }
.sw--warn { background: var(--warn-fill); border-color: var(--warn); }
.sw--bad { background: var(--bad-fill); border-color: var(--bad); }
.sw--station { background: var(--navy); border-color: var(--navy); border-radius: 2px; }
.sw--neighbour { background: #fff; border-color: var(--navy); border-radius: 2px; }
.sw--risk { border-radius: 50%; background: #fff; border-color: var(--ink); }

/* Balken: eine Farbe, Wert immer als Text */
.bars { display: grid; gap: 14px; margin: 0; padding: 0; list-style: none; }
.bar__top { display: flex; justify-content: space-between; gap: 12px; font-size: 14px; }
.bar__name { font-weight: 600; }
.bar__val { font-weight: 800; font-variant-numeric: tabular-nums; }
.bar__track { position: relative; height: 10px; background: #edf0f3; border-radius: 4px; margin-top: 6px; }
.bar__fill { position: absolute; inset: 0 auto 0 0; background: var(--navy); border-radius: 4px; }
.bar__note { font-size: 12.5px; color: var(--muted); margin-top: 4px; }
.tooltip { position: fixed; z-index: 50; pointer-events: none; background: var(--ink); color: #fff; font-size: 13px; padding: 6px 9px; border-radius: 4px; max-width: 260px; }

/* Tabellen */
.table-wrap { overflow-x: auto; position: relative; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th { text-align: left; font-size: 13px; color: var(--muted); font-weight: 600; padding: 8px 10px; border-bottom: 1px solid var(--line); white-space: nowrap; }
td { padding: 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
tr:last-child td { border-bottom: 0; }
td.num, th.num { text-align: right; }
.status { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; font-size: 13.5px; white-space: nowrap; }
.status::before { content: ""; width: 9px; height: 9px; border-radius: 50%; }
.status--ok { color: var(--ok); } .status--ok::before { background: var(--ok); }
.status--warn { color: var(--warn); } .status--warn::before { background: var(--warn); }
.status--bad { color: var(--bad); } .status--bad::before { background: var(--bad); border-radius: 1px; transform: rotate(45deg); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line-strong); border-radius: 4px; padding: 2px 4px 2px 8px; font-size: 13px; background: #fafbfc; }
.chip b { font-weight: 700; }
.chip .btn--danger { font-size: 15px; line-height: 1; }

/* Leerer Zustand, erste Schritte */
.empty { padding: 28px; display: grid; gap: 14px; max-width: 640px; }
.steps { margin: 0; padding: 0; list-style: none; counter-reset: s; display: grid; gap: 10px; }
.steps li { counter-increment: s; display: grid; grid-template-columns: 28px 1fr; gap: 10px; align-items: start; }
.steps li::before { content: counter(s); width: 28px; height: 28px; border-radius: 4px; background: var(--navy); color: #fff; display: grid; place-items: center; font-weight: 800; font-size: 14px; }
.steps li.done::before { content: "✓"; background: var(--ok); }

/* Formulare und Dialoge */
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.form-grid .full { grid-column: 1 / -1; }
.form-actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 18px; }
dialog { border: 1px solid var(--line); border-radius: var(--radius); padding: 0; width: min(560px, 92vw); }
dialog::backdrop { background: rgba(27,36,48,.45); }
dialog .panel__head { padding-top: 18px; }
dialog form { padding: 14px 18px 18px; }
.hint { font-size: 13px; color: var(--muted); }
.error-text { color: var(--red); font-size: 13.5px; font-weight: 600; }
.skeleton { background: linear-gradient(90deg, #eef1f4 0, #f6f8fa 50%, #eef1f4 100%); background-size: 200% 100%; animation: sk 1.2s linear infinite; border-radius: 4px; }
@keyframes sk { to { background-position: -200% 0; } }

/* Anmeldung */
.login { min-height: 100vh; display: grid; place-items: center; padding: 24px; }
.login__box { width: min(400px, 100%); background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; }
.login__box h1 { font-size: 26px; margin: 18px 0 6px; }
.login__box form { display: grid; gap: 14px; margin-top: 18px; }

/* ---------- Responsiv ---------- */
.menu-toggle { display: none; }
/* Echte Karte (Schritt 2) */
.livemap { position: relative; height: 560px; background: #eef0f3; border-radius: var(--radius) var(--radius) 0 0; overflow: hidden; }
.livemap__state { position: absolute; inset: 0; display: grid; align-content: center; gap: 10px; padding: 28px; max-width: 560px; }
.livemap .maplibregl-ctrl-attrib { font-size: 11px; }
.sw--iso1 { background: rgba(31, 45, 61, .16); border-color: rgba(31, 45, 61, .8); }
.sw--iso2 { background: rgba(31, 45, 61, .29); border-color: rgba(31, 45, 61, .8); }
.sw--iso3 { background: rgba(31, 45, 61, .41); border-color: rgba(31, 45, 61, .8); }
.code { font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; font-size: 13px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 8px 12px; margin: 0; overflow-x: auto; }
.stack-sm { display: grid; gap: 14px; }
.stack-sm > .segmented { justify-self: start; }
#zones-result { display: grid; gap: 10px; }
#zones-result p { margin: 0; }
.field input { min-width: 0; }
.pick { border: 0; padding: 0; margin: 0; display: grid; gap: 6px; min-width: 0; }
.pick legend { margin-bottom: 6px; padding: 0; }
.pick__row { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 9px 12px; border: 1px solid var(--line); border-radius: var(--radius); cursor: pointer; }
.pick__row:hover { border-color: var(--line-strong); }
.pick__row:has(input:checked) { border-color: var(--navy); background: #f1f4f7; }
.pick__row input { accent-color: var(--navy); margin: 0; }

.sw--suggest { border-radius: 50%; background: #fff; border: 2px solid var(--red); }
.place-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 18px; background: #fbf1ef; border-top: 1px solid var(--line); color: var(--ink); font-weight: 600; font-size: 14px; }
.place-bar[hidden] { display: none; }
.suggest { list-style: none; margin: 6px 0 0; padding: 0; display: grid; gap: 6px; }
.suggest li { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 8px 10px 8px 12px; border: 1px solid var(--line); border-radius: var(--radius); }
.suggest .btn { min-height: 32px; padding: 5px 10px; }
.zone-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; font-size: 14px; }
.zone-list li { display: flex; gap: 8px; align-items: flex-start; }
.zone-list .sw { margin-top: 3px; }
#place-start[aria-pressed="true"] { border-color: var(--red); color: var(--red); }


/* Standorte und Fahrzeuge: Liste links, gewählter Standort rechts */
.st-filter { display: flex; flex-wrap: wrap; gap: 8px; padding: 12px 12px 0; }
.st-filter input[type="search"] { flex: 1 1 140px; min-width: 0; border: 1px solid var(--line-strong); border-radius: var(--radius); padding: 6px 10px; min-height: 36px; background: var(--panel); }
.st-filter .segmented button { padding: 5px 10px; font-size: 14px; }
.st-groups { list-style: none; margin: 0; padding: 4px 0 0; }
.st-group h3 { font-size: 13px; font-stretch: 100%; font-weight: 700; color: var(--ink-2); text-transform: uppercase; letter-spacing: .04em; padding: 12px 12px 0; }
.st-group .st-list { padding-top: 8px; }
.st-li { position: relative; }
.st-li[hidden], .st-group[hidden] { display: none; }
.st-move { position: absolute; right: 8px; bottom: 8px; display: flex; gap: 4px; }
.st-move[hidden] { display: none; }
.btn--icon { min-height: 28px; min-width: 28px; padding: 0 6px; font-size: 14px; line-height: 1; }
.st-li:has(.st-move:not([hidden])) .st-item { padding-right: 84px; }
.st-none { padding: 0 12px 12px; }

.st-toolbar { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px; }
.st-layout { display: grid; grid-template-columns: minmax(260px, 340px) minmax(0, 1fr); gap: 20px; align-items: start; }
.st-layout > * { min-width: 0; }
.st-list { list-style: none; margin: 0; padding: 0 12px 12px; display: grid; gap: 6px; }
.st-item { width: 100%; text-align: left; display: grid; gap: 6px; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); cursor: pointer; }
.st-item:hover { border-color: var(--line-strong); }
.st-item[aria-current="true"] { border-color: var(--navy); background: #f1f4f7; box-shadow: inset 3px 0 0 var(--red); }
.st-item.is-drop { border: 2px dashed var(--navy); background: #e8eef4; padding: 9px 11px; }
.st-item__top { display: flex; justify-content: space-between; gap: 8px; align-items: baseline; }
.chip--sm { padding: 0 6px; font-size: 12.5px; font-weight: 700; }
.st-vhead { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 10px; }
.btn-row { display: flex; flex-wrap: wrap; gap: 8px; }
.btn--sm { min-height: 30px; padding: 4px 10px; font-size: 13.5px; }
.btn--warn { color: var(--red); }
.btn--warn:hover { border-color: var(--red); }
.veh-row { cursor: grab; }
.veh-row:hover td { background: #fafbfc; }
.veh-row:focus-visible { outline: 3px solid var(--focus); outline-offset: -3px; }
.veh-row.is-dragging { opacity: .45; }
.row-actions { white-space: nowrap; text-align: right; }
.row-actions .btn + .btn { margin-left: 4px; }
.clipbar { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 10px; padding: 8px 14px; border: 1px solid var(--line-strong); border-left: 3px solid var(--navy); border-radius: var(--radius); background: var(--panel); font-size: 14px; }
.clipbar__actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.status-line { margin: 0; min-height: 1.2em; font-size: 14px; font-weight: 600; color: var(--ok); }
.status-line:empty { display: none; }
.checks { border: 0; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 6px 18px; align-items: center; }
.checks legend { width: 100%; margin-bottom: 4px; padding: 0; }
.checks label { display: inline-flex; gap: 6px; align-items: center; font-weight: 400; font-size: 15px; color: var(--ink); }
.checks input { accent-color: var(--navy); }
textarea { border: 1px solid var(--line-strong); border-radius: var(--radius); background: var(--panel); padding: 8px 10px; resize: vertical; }
textarea:focus { outline: none; border-color: var(--navy); box-shadow: 0 0 0 3px rgba(31,45,61,.15); }
.field [hidden], [hidden].field { display: none; }

@media (max-width: 1180px) {
  .grid-main { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 980px) {
  .st-layout { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 900px) {
  .app { grid-template-columns: 1fr; }
  .sidebar { position: static; height: auto; }
  .sidebar .org { display: none; }
  .sidebar__foot { display: flex; gap: 14px; align-items: baseline; margin: 0; padding: 4px 16px 10px; border-top: 0; }
  .sidebar__foot a { margin: 0; }
  .nav { grid-auto-flow: column; justify-content: start; overflow-x: auto; padding-bottom: 10px; }
  .nav a { white-space: nowrap; }
  .nav a[aria-current="page"]::before { left: 8px; right: 8px; top: auto; bottom: 2px; width: auto; height: 3px; }
  .kpis { grid-template-columns: 1fr 1fr; }
  .kpi:nth-child(3) { border-left: 0; }
  .kpi:nth-child(n+3) { border-top: 1px solid var(--line); }
  .page-head, .content { padding-left: 16px; padding-right: 16px; }
}
@media (max-width: 520px) {
  .livemap { height: 420px; }
  .kpis { grid-template-columns: 1fr; }
  .kpi + .kpi { border-left: 0; border-top: 1px solid var(--line); }
  .form-grid { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) { .skeleton { animation: none; } }

/* ---------- Anmeldung, Zugang, Konto ---------- */
.login { grid-template-rows: auto auto; align-content: center; gap: 18px; }
.login__box section > h1 { font-size: 26px; margin: 18px 0 6px; }
.login__box section > form { display: grid; gap: 14px; margin-top: 18px; }
.login__links { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; margin: 16px 0 0; font-size: 14px; }
.login__links .btn { color: #fff; }
.login__foot { align-self: start; text-align: center; font-size: 12.5px; color: var(--muted); max-width: 400px; justify-self: center; }
.login__foot p { margin: 0 0 4px; }
.login__foot a { color: var(--muted); }
.link-btn { background: none; border: 0; padding: 0; color: var(--navy); text-decoration: underline; cursor: pointer; font-size: 14px; }
.check { display: flex; gap: 8px; align-items: flex-start; font-size: 14px; line-height: 1.4; }
.check input { margin-top: 3px; width: 16px; height: 16px; flex: none; accent-color: var(--navy); }
.hint, .small { font-size: 12.5px; color: var(--muted); }
.ok-text { color: var(--ok); font-size: 14px; font-weight: 600; margin: 12px 0 0; }
.code-input { font-size: 22px; letter-spacing: .25em; font-variant-numeric: tabular-nums; }
.field input[readonly] { background: var(--surface); color: var(--muted); }

.konto-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 380px), 1fr)); gap: 20px; align-items: start; }
.konto-grid form { display: grid; gap: 12px; }
.kv { display: grid; grid-template-columns: max-content 1fr; gap: 6px 16px; margin: 0; font-size: 14px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
.badge { display: inline-block; padding: 1px 8px; border-radius: 999px; font-size: 12.5px; font-weight: 700; border: 1px solid var(--line-strong); color: var(--ink-2); background: var(--panel); white-space: nowrap; }
.badge--ok { border-color: var(--ok); color: var(--ok); }
.badge--warn { border-color: var(--warn); color: var(--warn); }
.badge--bad { border-color: var(--bad); color: var(--bad); }
.qr { display: flex; flex-wrap: wrap; gap: 16px; align-items: center; }
.qr img { width: 180px; height: 180px; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; }
.secret { font-family: ui-monospace, "Courier New", monospace; font-size: 14px; letter-spacing: .05em; overflow-wrap: anywhere; }
.codes { display: grid; grid-template-columns: repeat(2, max-content); gap: 6px 22px; padding: 12px 16px; margin: 0; list-style: none; border-left: 4px solid var(--red); background: var(--surface); font-family: ui-monospace, "Courier New", monospace; font-size: 15px; }
.inline-form { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; }
.inline-form .field { flex: 1 1 200px; }
td .btn-row { flex-wrap: nowrap; }
.sidebar__foot a { display: block; color: var(--ink); font-weight: 600; text-decoration: none; margin-bottom: 4px; }
.sidebar__foot a:hover { text-decoration: underline; }
@media (max-width: 520px) { .codes { grid-template-columns: max-content; } }
h1[tabindex="-1"]:focus { outline: none; }

/* ---------- Abdeckung ---------- */
.kpi--btn { all: unset; box-sizing: border-box; display: block; padding: 16px 18px; cursor: pointer; position: relative; }
.kpi--btn + .kpi--btn { border-left: 1px solid var(--line); }
.kpi--btn:hover { background: #f8f9fb; }
.kpi--btn[aria-pressed="true"]::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: var(--red); }
.kpi--btn:focus-visible { outline: 3px solid var(--focus); outline-offset: -3px; }
.sw { display: inline-block; width: 14px; height: 14px; border-radius: 2px; }
.sw--own { background: var(--navy); }
.sw--nb { background: #fff; border: 2.5px solid var(--navy); border-radius: 50%; }
.ln { display: inline-block; width: 26px; height: 0; border-top: 3px solid var(--navy); }
.ln--dash { border-top: 3px dashed #7d8b99; }
tfoot th, tfoot td { font-weight: 800; border-top: 2px solid var(--line-strong); border-bottom: 0; }
tbody th[scope="row"] { font-weight: 600; text-align: left; padding: 10px; border-bottom: 1px solid var(--line); color: var(--ink); font-size: 14px; white-space: normal; }
.suche-liste { position: absolute; top: 100%; left: 0; right: 0; z-index: 5; margin: 4px 0 0; padding: 4px; list-style: none; background: var(--panel); border: 1px solid var(--line-strong); border-radius: var(--radius); max-height: 260px; overflow: auto; }
.suche-liste button { all: unset; box-sizing: border-box; display: block; width: 100%; padding: 8px 10px; border-radius: 4px; cursor: pointer; }
.suche-liste button:hover, .suche-liste button:focus-visible { background: var(--surface); outline: none; }
input[type="search"] { border: 1px solid var(--line-strong); border-radius: var(--radius); padding: 8px 10px; min-height: 38px; background: var(--panel); }
@media (max-width: 900px) { .kpis .kpi--btn:nth-child(3) { border-left: 0; } .kpis .kpi--btn:nth-child(n+3) { border-top: 1px solid var(--line); } }
td.num, th.num { white-space: nowrap; }

/* Anmeldung: Bild links, Formular rechts; auf dem Handy Bild als Streifen oben */
.split { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1fr) minmax(400px, 30%); }
.split__bild { position: relative; overflow: hidden; background: #eaeef2; }
.split__bild img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; object-position: 50% 100%; }
@media (min-aspect-ratio: 2/1) { .split__bild img { object-fit: cover; } }
.split .login { min-height: 100vh; background: var(--panel); padding: 32px 40px; border-left: 1px solid var(--line); }
.split .login__box { border: 0; padding: 0; width: min(380px, 100%); }
.split .login__foot { max-width: 380px; }
@media (max-width: 900px) {
  .split { grid-template-columns: 1fr; grid-template-rows: 190px auto; }
  .split__bild img { object-fit: cover; object-position: 50% 64%; }
  .split .login { min-height: 0; border-left: 0; padding: 24px 16px 32px; align-content: start; }
}
