/* =========================================================================
   Rankmonitor – gemeinsames Stylesheet
   Vanilla CSS, keine externen Ressourcen, kein Build-Schritt.
   1 Tokens · 2 Basis · 3 App-Hülle + Seitenleiste · 4 Inhaltskopf
   5 Kundenübersicht · 6 Keyword-Tabelle · 7 SERP-Kontext
   8 Detail/Diagramm · 9 Leerzustände · 10 Login · 11 Report/Druck
   ========================================================================= */

/* ---------- 1 Tokens ---------------------------------------------------- */
:root {
  --schrift: ui-sans-serif, system-ui, -apple-system, "Segoe UI", "Helvetica Neue", sans-serif;
  --schrift-zahl: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, monospace;

  --fl-grund: #f4f4f1;
  --fl-blatt: #ffffff;
  --fl-blatt-2: #fafaf8;
  --fl-hover: #f0f0ed;
  --li-rahmen: #e4e4de;
  --li-rahmen-stark: #cdcdc4;

  --tx-stark: #14161a;
  --tx: #34383f;
  --tx-leise: #6d7380;

  --ak: #2b3a8f;
  --ak-flaeche: #e9ecf9;
  --ak-tx: #22307a;

  --gut: #1a6c46;
  --gut-flaeche: #e4f1ea;
  --schlecht: #a8331c;
  --schlecht-flaeche: #fae8e3;
  --warn: #8a5c00;
  --warn-flaeche: #faf0d8;
  --neu: #5b4a8f;
  --neu-flaeche: #eee9fa;

  --r: 3px;
  --r-gross: 6px;
  --schatten: 0 1px 2px rgba(20, 22, 26, .05);
  --seitenleiste-breite: 272px;
  --inhalt-max: 1360px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --fl-grund: #0f1013;
    --fl-blatt: #181a1e;
    --fl-blatt-2: #1d2025;
    --fl-hover: #23262c;
    --li-rahmen: #2b2f36;
    --li-rahmen-stark: #3b4049;

    --tx-stark: #ededec;
    --tx: #c9cdd4;
    --tx-leise: #8e959f;

    --ak: #93a6ff;
    --ak-flaeche: #1d2340;
    --ak-tx: #b3c0ff;

    --gut: #63c795;
    --gut-flaeche: #14291f;
    --schlecht: #f08b73;
    --schlecht-flaeche: #2e1a15;
    --warn: #d8ac4e;
    --warn-flaeche: #2b2313;
    --neu: #b3a4e8;
    --neu-flaeche: #221d33;

    --schatten: 0 1px 2px rgba(0, 0, 0, .45);
  }
}

/* ---------- 2 Basis ---------------------------------------------------- */
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--fl-grund);
  color: var(--tx);
  font: 400 15px/1.5 var(--schrift);
  text-wrap: pretty;
  font-variant-numeric: tabular-nums;
}

h1, h2, h3 { color: var(--tx-stark); font-weight: 600; margin: 0; letter-spacing: -.012em; }
h1 { font-size: 21px; }
h2 { font-size: 15px; }
h3 { font-size: 14px; }

a { color: var(--ak); text-decoration: none; }
a:hover { color: var(--ak-tx); text-decoration: underline; }
p { margin: 0 0 10px; }
p:last-child { margin-bottom: 0; }

.zahl { font-family: var(--schrift-zahl); }
.leise { color: var(--tx-leise); }
.klein { font-size: 12.5px; }
.mini { font-size: 11.5px; }
.oberzeile {
  font-size: 10.5px; letter-spacing: .1em; text-transform: uppercase;
  color: var(--tx-leise); font-weight: 600;
}

.feld, .knopf, .waehler {
  font: inherit; color: var(--tx-stark);
  background: var(--fl-blatt);
  border: 1px solid var(--li-rahmen-stark);
  border-radius: var(--r);
  padding: 6px 9px; font-size: 13.5px;
}
.feld:focus-visible, .knopf:focus-visible, .waehler:focus-visible,
summary:focus-visible, a:focus-visible, input:focus-visible {
  outline: 2px solid var(--ak); outline-offset: 1px;
}
.knopf { cursor: pointer; font-weight: 500; }
.knopf:hover { background: var(--fl-hover); }
.knopf--haupt { background: var(--ak); border-color: var(--ak); color: #fff; }
@media (prefers-color-scheme: dark) { .knopf--haupt { color: #0f1013; } }
.knopf--haupt:hover { filter: brightness(1.08); }
.knopf--breit { width: 100%; padding: 10px; font-size: 15px; }
.knopf--leise { border-color: transparent; background: transparent; color: var(--tx-leise); }
.knopf--leise:hover { background: var(--fl-hover); color: var(--tx-stark); }

.marke { display: flex; align-items: center; gap: 8px; font-weight: 600; color: var(--tx-stark); font-size: 14.5px; }
.marke__zeichen {
  width: 22px; height: 22px; border-radius: var(--r); background: var(--ak); color: #fff;
  display: grid; place-items: center; font-size: 11px; font-weight: 700; flex: none;
}
@media (prefers-color-scheme: dark) { .marke__zeichen { color: #0f1013; } }
.marke__zusatz { color: var(--tx-leise); font-weight: 400; }

/* ---------- 3 App-Hülle + Seitenleiste --------------------------------- */
.app-huelle { display: grid; grid-template-columns: var(--seitenleiste-breite) minmax(0, 1fr); align-items: start; }

.seitenleiste {
  position: sticky; top: 0; height: 100vh; overflow-y: auto;
  background: var(--fl-blatt); border-right: 1px solid var(--li-rahmen);
  display: flex; flex-direction: column;
}
.seitenleiste__kopf { padding: 14px 14px 12px; border-bottom: 1px solid var(--li-rahmen); }
.seitenleiste__block { padding: 12px 14px; border-bottom: 1px solid var(--li-rahmen); }
.seitenleiste__block:last-of-type { border-bottom: 0; }
.seitenleiste__titel {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  margin-bottom: 8px;
}
.seitenleiste__fuss {
  margin-top: auto; padding: 10px 14px;
  border-top: 1px solid var(--li-rahmen);
  display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--tx-leise);
}
.nutzer {
  width: 24px; height: 24px; border-radius: 50%; flex: none;
  background: var(--fl-hover); border: 1px solid var(--li-rahmen-stark);
  display: grid; place-items: center; font-size: 10.5px; font-weight: 600; color: var(--tx);
}

/* Mandantenliste: der Kundenwechsel ist die oberste Ebene der Navigation */
.mandantenliste { display: flex; flex-direction: column; gap: 1px; }
.mandantenliste__eintrag {
  display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 2px 8px;
  padding: 6px 8px; border-radius: var(--r); color: var(--tx); border: 1px solid transparent;
}
.mandantenliste__eintrag:hover { background: var(--fl-hover); text-decoration: none; }
.mandantenliste__eintrag[aria-current="true"] { background: var(--ak-flaeche); border-color: color-mix(in srgb, var(--ak) 30%, transparent); }
.mandantenliste__name { font-size: 13.5px; font-weight: 600; color: var(--tx-stark); }
.mandantenliste__zahl { font-family: var(--schrift-zahl); font-size: 12px; color: var(--tx-leise); }
.mandantenliste__zeile2 { grid-column: 1 / -1; font-size: 11.5px; color: var(--tx-leise); display: flex; gap: 6px; align-items: center; }
.risikopunkt { width: 6px; height: 6px; border-radius: 50%; background: var(--schlecht); flex: none; }
.risikopunkt--offen { background: var(--li-rahmen-stark); }

.navliste { display: flex; flex-direction: column; gap: 1px; }
.navliste a {
  padding: 6px 8px; border-radius: var(--r); color: var(--tx-leise); font-size: 13.5px; font-weight: 500;
}
.navliste a:hover { background: var(--fl-hover); color: var(--tx-stark); text-decoration: none; }
.navliste a[aria-current="page"] { background: var(--fl-hover); color: var(--tx-stark); }

/* Filter */
.filtergruppe { border-top: 1px dashed var(--li-rahmen); padding: 10px 0 2px; }
.filtergruppe:first-of-type { border-top: 0; padding-top: 0; }
.filtergruppe > summary {
  list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between;
  font-size: 11.5px; letter-spacing: .06em; text-transform: uppercase; font-weight: 600; color: var(--tx-leise);
  padding: 2px 0 6px;
}
.filtergruppe > summary::-webkit-details-marker { display: none; }
.filtergruppe > summary::after { content: "−"; font-size: 13px; }
.filtergruppe:not([open]) > summary::after { content: "+"; }
.filterzeile {
  display: flex; align-items: center; gap: 7px;
  padding: 3px 0; font-size: 13px; color: var(--tx); cursor: pointer;
}
.filterzeile input { margin: 0; accent-color: var(--ak); }
.filterzeile__zahl { margin-left: auto; font-family: var(--schrift-zahl); font-size: 11.5px; color: var(--tx-leise); }
.filterzeile:hover { color: var(--tx-stark); }

.aktive-filter { display: flex; flex-wrap: wrap; gap: 5px; }
.filtermarke {
  display: inline-flex; align-items: center; gap: 5px;
  background: var(--ak-flaeche); color: var(--ak-tx);
  border: 1px solid color-mix(in srgb, var(--ak) 25%, transparent);
  border-radius: 999px; padding: 2px 4px 2px 8px; font-size: 11.5px; font-weight: 600;
}
.filtermarke button {
  border: 0; background: transparent; color: inherit; cursor: pointer;
  font: inherit; line-height: 1; padding: 1px 3px; border-radius: 999px;
}
.filtermarke button:hover { background: rgba(0, 0, 0, .08); }

/* Mobile: Seitenleiste wird zu einem aufklappbaren Block über dem Inhalt */
.seitenleiste-schalter { display: none; }
@media (max-width: 980px) {
  .app-huelle { grid-template-columns: minmax(0, 1fr); }
  .seitenleiste {
    position: static; height: auto; border-right: 0;
    border-bottom: 1px solid var(--li-rahmen);
  }
  .seitenleiste__kopf { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
  .seitenleiste-schalter { display: inline-flex; }
  .seitenleiste__ausklapp { display: none; }
  .seitenleiste[data-offen] .seitenleiste__ausklapp { display: block; }
}

/* ---------- 4 Inhaltskopf + Seitenraster -------------------------------- */
.inhalt { min-width: 0; }
.inhaltskopf {
  position: sticky; top: 0; z-index: 20;
  background: color-mix(in srgb, var(--fl-grund) 88%, transparent);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--li-rahmen);
  padding: 12px 22px;
}
.inhaltskopf__innen {
  max-width: var(--inhalt-max); margin: 0 auto;
  display: flex; align-items: flex-end; justify-content: space-between; gap: 14px; flex-wrap: wrap;
}
.brotkrumen { display: flex; gap: 6px; align-items: center; font-size: 12px; color: var(--tx-leise); margin-bottom: 4px; }
.brotkrumen span { color: var(--li-rahmen-stark); }
.kopfzeile-meta { font-size: 12.5px; color: var(--tx-leise); margin-top: 4px; }
.aktionen { display: flex; gap: 8px; flex-wrap: wrap; }

.seite { max-width: var(--inhalt-max); margin: 0 auto; padding: 18px 22px 72px; }
.seite--schmal { max-width: 1060px; }

.blatt { background: var(--fl-blatt); border: 1px solid var(--li-rahmen); border-radius: var(--r-gross); box-shadow: var(--schatten); }
.blatt__kopf {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  padding: 11px 14px; border-bottom: 1px solid var(--li-rahmen);
}
.blatt__koerper { padding: 14px; }
.blatt + .blatt { margin-top: 14px; }

.raster-2 { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); gap: 14px; align-items: start; }
@media (max-width: 900px) { .raster-2 { grid-template-columns: minmax(0, 1fr); } }

.hinweisbalken {
  display: flex; gap: 10px; align-items: flex-start;
  padding: 9px 12px; border-radius: var(--r-gross);
  border: 1px solid var(--li-rahmen); background: var(--fl-blatt);
  font-size: 13.5px;
}
.hinweisbalken--warn { border-color: color-mix(in srgb, var(--warn) 40%, var(--li-rahmen)); background: var(--warn-flaeche); }
.hinweisbalken--info { border-color: color-mix(in srgb, var(--ak) 30%, var(--li-rahmen)); background: var(--ak-flaeche); }
.hinweisbalken__zeichen { flex: none; font-weight: 700; color: var(--tx-stark); }

/* Kennzahlenband über dem Inhalt */
.kennzahlenband {
  display: flex; flex-wrap: wrap; gap: 1px; background: var(--fl-blatt);
  border: 1px solid var(--li-rahmen); border-radius: var(--r-gross); overflow: hidden;
  margin-bottom: 14px;
}
.kennzahlenband > div { background: var(--fl-blatt); padding: 10px 12px; flex: 1 1 148px; min-width: 148px; outline: 1px solid var(--li-rahmen); }
.kennzahlenband .kpi__wert { font-family: var(--schrift-zahl); font-size: 21px; color: var(--tx-stark); line-height: 1.1; }
.kennzahlenband .kpi__label { font-size: 11px; color: var(--tx-leise); margin-top: 3px; }
.kennzahlenband > div[data-warnung] .kpi__wert { color: var(--schlecht); }

/* ---------- 5 Kundenübersicht ------------------------------------------ */
.kunden-raster { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
.kunde {
  display: flex; flex-direction: column; gap: 11px;
  background: var(--fl-blatt); border: 1px solid var(--li-rahmen);
  border-radius: var(--r-gross); box-shadow: var(--schatten); padding: 13px; color: var(--tx);
}
a.kunde:hover { border-color: var(--ak); text-decoration: none; }
.kunde__kopf { display: flex; gap: 10px; align-items: flex-start; }
.kunde__zeichen {
  flex: none; width: 32px; height: 32px; border-radius: var(--r);
  background: var(--fl-hover); border: 1px solid var(--li-rahmen);
  display: grid; place-items: center; font-size: 11.5px; font-weight: 700; color: var(--tx-leise);
}
.kunde__titel { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.kunde__name { font-weight: 600; color: var(--tx-stark); font-size: 15px; }
.kunde__meta { font-size: 12px; color: var(--tx-leise); }
.kpi-reihe {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px; background: var(--li-rahmen); border: 1px solid var(--li-rahmen);
  border-radius: var(--r); overflow: hidden;
}
.kpi { background: var(--fl-blatt-2); padding: 7px 9px; }
.kpi__wert { font-family: var(--schrift-zahl); font-size: 18px; color: var(--tx-stark); line-height: 1.15; }
.kpi__wert--klein { font-size: 13.5px; }
.kpi__label { font-size: 10.5px; letter-spacing: .04em; color: var(--tx-leise); margin-top: 2px; }
.kunde__fuss { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 11.5px; color: var(--tx-leise); flex-wrap: wrap; }

.delta { font-family: var(--schrift-zahl); font-weight: 600; font-size: 13px; white-space: nowrap; }
.delta--auf { color: var(--gut); }
.delta--ab { color: var(--schlecht); }
.delta--gleich { color: var(--tx-leise); }
.delta--neu { color: var(--neu); font-family: var(--schrift); font-weight: 600; font-size: 12px; }

.plakette {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 1px 6px; border-radius: var(--r);
  font-size: 11.5px; font-weight: 600; line-height: 1.5;
  border: 1px solid transparent; white-space: nowrap;
}
.plakette--neutral { background: var(--fl-hover); color: var(--tx-leise); border-color: var(--li-rahmen); }
.plakette--gut { background: var(--gut-flaeche); color: var(--gut); border-color: color-mix(in srgb, var(--gut) 30%, transparent); }
.plakette--warn { background: var(--warn-flaeche); color: var(--warn); border-color: color-mix(in srgb, var(--warn) 35%, transparent); }
.plakette--schlecht { background: var(--schlecht-flaeche); color: var(--schlecht); border-color: color-mix(in srgb, var(--schlecht) 30%, transparent); }
.plakette--neu { background: var(--neu-flaeche); color: var(--neu); border-color: color-mix(in srgb, var(--neu) 30%, transparent); }
.plakette-gruppe { display: flex; flex-wrap: wrap; gap: 4px; }

/* ---------- 6 Keyword-Tabelle ------------------------------------------ */
.tabellenkopf {
  display: flex; gap: 8px; align-items: center; flex-wrap: wrap;
  padding: 9px 14px; border-bottom: 1px solid var(--li-rahmen); background: var(--fl-blatt-2);
  border-radius: var(--r-gross) var(--r-gross) 0 0;
}
.tabellenkopf__suche { min-width: 200px; flex: 1 1 200px; }
.segment { display: flex; border: 1px solid var(--li-rahmen-stark); border-radius: var(--r); overflow: hidden; }
.segment button, .segment a {
  padding: 5px 9px; font-size: 12.5px; background: var(--fl-blatt); color: var(--tx-leise);
  border: 0; cursor: pointer; font-family: inherit;
}
.segment > * + * { border-left: 1px solid var(--li-rahmen-stark); }
.segment [aria-pressed="true"], .segment [aria-current="true"] { background: var(--ak-flaeche); color: var(--ak-tx); font-weight: 600; }

.tabelle-rollbereich { overflow-x: auto; }
.kw-tabelle { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.kw-tabelle th, .kw-tabelle td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--li-rahmen); vertical-align: middle; }
.kw-tabelle thead th {
  position: sticky; top: 0; z-index: 10;
  background: var(--fl-blatt); color: var(--tx-leise);
  font-size: 10.5px; letter-spacing: .07em; text-transform: uppercase; font-weight: 600;
  white-space: nowrap; border-bottom: 1px solid var(--li-rahmen-stark); padding: 8px 12px;
}
.kw-tabelle tbody tr:hover { background: var(--fl-hover); }
.kw-tabelle tbody tr:last-child td { border-bottom: 0; }
.kw-tabelle tbody tr[data-risiko] { box-shadow: inset 2px 0 0 var(--schlecht); }

.kw-name { min-width: 220px; }
.kw-name a { font-weight: 600; font-size: 14px; color: var(--tx-stark); }
.kw-name a:hover { color: var(--ak); }
.kw-meta { display: flex; gap: 8px; align-items: center; font-size: 11.5px; color: var(--tx-leise); margin-top: 2px; }

.position-zelle { width: 96px; white-space: nowrap; }
.position { font-family: var(--schrift-zahl); font-size: 19px; font-weight: 600; color: var(--tx-stark); }
.position--keine { font-size: 12px; font-family: var(--schrift); font-weight: 500; color: var(--tx-leise); white-space: normal; display: inline-block; max-width: 96px; line-height: 1.35; }

.volumen-zelle { width: 86px; white-space: nowrap; }
.volumen { font-family: var(--schrift-zahl); font-size: 15px; font-weight: 600; color: var(--tx-stark); }

.url-zelle { max-width: 230px; }
.url { font-family: var(--schrift-zahl); font-size: 11.5px; color: var(--tx-leise); word-break: break-all; line-height: 1.4; }
.url b { color: var(--tx-stark); font-weight: 600; }

.wettbewerber { list-style: none; margin: 0; padding: 0; font-size: 12px; }
.wettbewerber li { display: flex; gap: 6px; color: var(--tx-leise); line-height: 1.55; }
.wettbewerber li b { color: var(--tx); font-weight: 500; }
.wettbewerber .rang { font-family: var(--schrift-zahl); color: var(--li-rahmen-stark); width: 13px; flex: none; }
.wettbewerber li[data-eigen] b { color: var(--ak-tx); font-weight: 700; }

.sparkline { display: block; width: 96px; height: 26px; }
.sparkline .linie { fill: none; stroke: var(--tx-leise); stroke-width: 1.5; }
.sparkline .linie--auf { stroke: var(--gut); }
.sparkline .linie--ab { stroke: var(--schlecht); }
.sparkline .punkt { fill: var(--tx-stark); }
.sparkline .lueckelinie { fill: none; stroke: var(--li-rahmen-stark); stroke-width: 1.5; stroke-dasharray: 3 3; }

.tabellenfuss {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  padding: 9px 14px; border-top: 1px solid var(--li-rahmen); font-size: 12.5px; color: var(--tx-leise);
}

@media (max-width: 900px) {
  .kw-tabelle thead { display: none; }
  .kw-tabelle, .kw-tabelle tbody, .kw-tabelle tr, .kw-tabelle td { display: block; width: auto; }
  .kw-tabelle tr {
    border: 1px solid var(--li-rahmen); border-radius: var(--r-gross);
    margin: 10px; padding: 2px 0; background: var(--fl-blatt);
  }
  .kw-tabelle td { border: 0; padding: 4px 12px; }
  .kw-tabelle td[data-label]::before {
    content: attr(data-label);
    display: inline-block; min-width: 96px;
    font-size: 10.5px; letter-spacing: .06em; text-transform: uppercase;
    color: var(--tx-leise); font-weight: 600;
  }
  .kw-tabelle td.kw-name {
    background: var(--fl-blatt-2); border-bottom: 1px solid var(--li-rahmen);
    padding: 9px 12px; margin-bottom: 3px; border-radius: var(--r-gross) var(--r-gross) 0 0;
  }
  .position-zelle, .url-zelle, .volumen-zelle { width: auto; max-width: none; }
}

/* ---------- 7 SERP-Kontext --------------------------------------------- */
.sicht-zelle { width: 150px; }
.sichtbarkeit { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 600; }
.sichtbarkeit__punkt { width: 8px; height: 8px; border-radius: 50%; flex: none; }
.sichtbarkeit--frei { color: var(--gut); }
.sichtbarkeit--frei .sichtbarkeit__punkt { background: var(--gut); }
.sichtbarkeit--teil { color: var(--warn); }
.sichtbarkeit--teil .sichtbarkeit__punkt { background: var(--warn); }
.sichtbarkeit--verdeckt { color: var(--schlecht); }
.sichtbarkeit--verdeckt .sichtbarkeit__punkt { background: var(--schlecht); }
.sichtbarkeit--unbekannt { color: var(--tx-leise); }
.sichtbarkeit--unbekannt .sichtbarkeit__punkt { background: var(--tx-leise); }
.sicht-grund { display: block; font-size: 11.5px; font-weight: 400; color: var(--tx-leise); margin-top: 2px; }

.serp-zelle { width: 200px; }
.serp-kontext { display: flex; gap: 10px; align-items: flex-start; }
.serp-stapel { flex: none; width: 30px; }
.serp-stapel rect { stroke-width: 1; }
.serp-stapel .sb-rahmen { fill: none; stroke: var(--li-rahmen-stark); }
.serp-stapel .sb-aio { fill: var(--warn-flaeche); stroke: var(--warn); }
.serp-stapel .sb-lp-ohne { fill: var(--schlecht-flaeche); stroke: var(--schlecht); }
.serp-stapel .sb-lp-mit { fill: var(--gut-flaeche); stroke: var(--gut); }
.serp-stapel .sb-feature { fill: var(--fl-hover); stroke: var(--li-rahmen-stark); }
.serp-stapel .sb-organisch-fremd { fill: none; stroke: var(--li-rahmen-stark); stroke-dasharray: 2 2; }
.serp-stapel .sb-eigen { fill: var(--ak-flaeche); stroke: var(--ak); stroke-width: 1.6; }
.serp-notizen { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.serp-notiz { font-size: 11.5px; color: var(--tx-leise); line-height: 1.4; }
.serp-notiz b { color: var(--tx-stark); font-weight: 600; }

.legende {
  display: flex; flex-wrap: wrap; gap: 6px 16px; align-items: center;
  padding: 9px 14px; border-top: 1px solid var(--li-rahmen);
  font-size: 11.5px; color: var(--tx-leise); background: var(--fl-blatt-2);
  border-radius: 0 0 var(--r-gross) var(--r-gross);
}
.legende__eintrag { display: inline-flex; gap: 6px; align-items: center; }
.legende__muster { width: 13px; height: 9px; border-radius: 1.5px; border: 1px solid var(--li-rahmen-stark); flex: none; }
.legende__muster--aio { background: var(--warn-flaeche); border-color: var(--warn); }
.legende__muster--lp-ohne { background: var(--schlecht-flaeche); border-color: var(--schlecht); }
.legende__muster--lp-mit { background: var(--gut-flaeche); border-color: var(--gut); }
.legende__muster--eigen { background: var(--ak-flaeche); border-color: var(--ak); }
.legende__muster--feature { background: var(--fl-hover); }

/* ---------- 8 Detail + Diagramm ---------------------------------------- */
.detail-kopf { display: flex; flex-wrap: wrap; gap: 12px 26px; align-items: flex-start; }
.detail-kopf__block { display: flex; flex-direction: column; gap: 2px; }
.detail-kopf__wert { font-size: 14.5px; color: var(--tx-stark); font-weight: 600; }

.diagramm { display: block; width: 100%; height: auto; }
.diagramm .achse { stroke: var(--li-rahmen); stroke-width: 1; }
.diagramm .netz { stroke: var(--li-rahmen); stroke-width: 1; stroke-dasharray: 2 4; }
.diagramm .achstext { fill: var(--tx-leise); font: 500 11px var(--schrift-zahl); }
.diagramm .achstext--x { font-family: var(--schrift); }
.diagramm .verlauf { fill: none; stroke: var(--ak); stroke-width: 2.25; stroke-linejoin: round; stroke-linecap: round; }
.diagramm .verlauf-lucke { fill: none; stroke: var(--tx-leise); stroke-width: 1.75; stroke-dasharray: 4 4; }
.diagramm .flaeche { fill: var(--ak); opacity: .07; }
.diagramm .punkt { fill: var(--fl-blatt); stroke: var(--ak); stroke-width: 2; }
.diagramm .punkt--jetzt { fill: var(--ak); }
.diagramm .band-aio { fill: var(--warn); opacity: .12; }
.diagramm .band-aio-linie { stroke: var(--warn); stroke-width: 1; stroke-dasharray: 3 3; }
.diagramm .bandtext { fill: var(--warn); font: 600 10.5px var(--schrift); }
.diagramm .fehlend-flaeche { fill: var(--tx-leise); opacity: .07; }
.diagramm .fehlend-text { fill: var(--tx-leise); font: 500 10.5px var(--schrift); }
.diagramm .sb-rahmen { fill: none; stroke: var(--li-rahmen-stark); }

.ereignisliste { list-style: none; margin: 0; padding: 0; }
.ereignisliste li {
  display: grid; grid-template-columns: 72px 1fr; gap: 10px;
  padding: 7px 0; border-bottom: 1px dashed var(--li-rahmen); font-size: 13px;
}
.ereignisliste li:last-child { border-bottom: 0; }
.ereignisliste time { font-family: var(--schrift-zahl); font-size: 11.5px; color: var(--tx-leise); }

.historie { width: 100%; border-collapse: collapse; font-size: 13px; }
.historie th, .historie td { text-align: left; padding: 7px 10px; border-bottom: 1px solid var(--li-rahmen); white-space: nowrap; }
.historie thead th {
  font-size: 10.5px; letter-spacing: .06em; text-transform: uppercase;
  color: var(--tx-leise); font-weight: 600; background: var(--fl-blatt-2);
}
.historie td:first-child { font-family: var(--schrift-zahl); color: var(--tx-leise); }
.historie tbody tr:hover { background: var(--fl-hover); }
.historie-rollbereich { overflow-x: auto; }

.kennzahl-liste { display: grid; gap: 1px; background: var(--li-rahmen); border: 1px solid var(--li-rahmen); border-radius: var(--r); overflow: hidden; margin: 0; }
.kennzahl-liste > div { display: flex; justify-content: space-between; gap: 12px; padding: 7px 10px; background: var(--fl-blatt); font-size: 13px; }
.kennzahl-liste dt { color: var(--tx-leise); }
.kennzahl-liste dd { margin: 0; }
.kennzahl-liste b { color: var(--tx-stark); font-family: var(--schrift-zahl); font-weight: 600; }

/* ---------- 9 Leerzustände --------------------------------------------- */
.leer { display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center; padding: 40px 20px; max-width: 460px; margin: 0 auto; }
.leer__bild { color: var(--li-rahmen-stark); }
.leer h2 { font-size: 16px; }
.leer p { color: var(--tx-leise); font-size: 13.5px; }
.leer__aktionen { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; margin-top: 4px; }

.duenn-hinweis {
  display: flex; gap: 8px; align-items: center; font-size: 12.5px; color: var(--tx-leise);
  padding: 7px 10px; border: 1px dashed var(--li-rahmen-stark); border-radius: var(--r); background: var(--fl-blatt-2);
}
.platzhalter-zeile { color: var(--tx-leise); font-size: 12.5px; }
.platzhalter-balken { height: 9px; border-radius: 2px; background: var(--fl-hover); display: block; }

/* ---------- 10 Login --------------------------------------------------- */
.anmelde-buehne { min-height: 100vh; display: grid; place-items: center; padding: 24px; }
.anmelde-karte {
  width: 100%; max-width: 368px; background: var(--fl-blatt);
  border: 1px solid var(--li-rahmen); border-radius: var(--r-gross);
  box-shadow: var(--schatten); padding: 26px 24px 22px;
}
.anmelde-karte .marke { margin-bottom: 20px; }
.anmelde-feldgruppe { display: flex; flex-direction: column; gap: 5px; margin-bottom: 14px; }
.anmelde-feldgruppe label { font-size: 12.5px; font-weight: 600; color: var(--tx-stark); }
.anmelde-karte .feld { width: 100%; padding: 9px 10px; font-size: 14.5px; }
.anmelde-zeile { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 18px; font-size: 13px; }
.anmelde-merken { display: inline-flex; align-items: center; gap: 6px; color: var(--tx-leise); }
.anmelde-fuss { margin-top: 18px; text-align: center; font-size: 11.5px; color: var(--tx-leise); }

/* ---------- 11 Report + Druck ------------------------------------------ */
.report { max-width: 900px; margin: 0 auto; padding: 20px 20px 80px; }
.report-blatt { background: var(--fl-blatt); border: 1px solid var(--li-rahmen); border-radius: var(--r-gross); box-shadow: var(--schatten); padding: 40px 44px; }
.report-kopf { display: flex; justify-content: space-between; align-items: flex-start; gap: 20px; flex-wrap: wrap; padding-bottom: 16px; border-bottom: 2px solid var(--tx-stark); margin-bottom: 24px; }
.report-kopf h1 { font-size: 24px; }
.report-kopf__meta { font-size: 12.5px; color: var(--tx-leise); text-align: right; }
.report-abschnitt { margin-bottom: 26px; break-inside: avoid; }
.report-abschnitt > h2 { font-size: 12px; letter-spacing: .09em; text-transform: uppercase; color: var(--tx-leise); padding-bottom: 6px; border-bottom: 1px solid var(--li-rahmen); margin-bottom: 14px; }
.report-kpi { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.report-kpi > div { border-left: 2px solid var(--li-rahmen-stark); padding-left: 10px; }
.report-kpi .kpi__wert { font-size: 23px; }
@media (max-width: 620px) { .report-kpi { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.report-tabelle { width: 100%; border-collapse: collapse; font-size: 13px; }
.report-tabelle th, .report-tabelle td { text-align: left; padding: 8px; border-bottom: 1px solid var(--li-rahmen); vertical-align: top; }
.report-tabelle thead th { font-size: 10.5px; letter-spacing: .07em; text-transform: uppercase; color: var(--tx-leise); font-weight: 600; border-bottom: 1px solid var(--tx-leise); }
.report-tabelle .zahl { font-size: 14px; font-weight: 600; color: var(--tx-stark); }
.report-fliess { font-size: 14px; max-width: 64ch; }
.report-fliess ul { margin: 0; padding-left: 18px; }
.report-fliess li { margin-bottom: 6px; }
.report-notiz { font-size: 12px; color: var(--tx-leise); border-top: 1px solid var(--li-rahmen); padding-top: 10px; margin-top: 8px; }
.druckleiste {
  position: sticky; top: 0; z-index: 30;
  display: flex; gap: 10px; align-items: center; justify-content: space-between; flex-wrap: wrap;
  background: var(--fl-blatt); border-bottom: 1px solid var(--li-rahmen);
  padding: 9px 20px; font-size: 13px; color: var(--tx-leise);
}

@media print {
  :root {
    --fl-grund: #fff; --fl-blatt: #fff; --fl-blatt-2: #fff; --fl-hover: #fff;
    --li-rahmen: #cfcfc7; --li-rahmen-stark: #9a9a92;
    --tx-stark: #000; --tx: #1c1c1c; --tx-leise: #555;
    --ak: #1a2a6e; --ak-tx: #1a2a6e; --ak-flaeche: #eceff9;
    --schatten: none;
  }
  @page { size: A4 portrait; margin: 14mm 14mm 16mm; }
  body { background: #fff; font-size: 10.5pt; }
  .druckleiste, .seitenleiste, .inhaltskopf, .nicht-drucken { display: none !important; }
  .app-huelle { display: block; }
  .report { max-width: none; padding: 0; }
  .report-blatt { border: 0; padding: 0; box-shadow: none; }
  .report-abschnitt { page-break-inside: avoid; }
  .report-tabelle { font-size: 9.5pt; }
  .report-tabelle thead { display: table-header-group; }
  .report-tabelle tr { page-break-inside: avoid; }
  a { color: #000; text-decoration: none; }
}

/* Innerer Seitenkopf (Detailseiten) */
.seitenkopf { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 14px; }

/* ---------- 12 Keyword-Recherche ---------------------------------------- */
.recherche-form { display: flex; flex-direction: column; gap: 14px; }

.recherche-form__art { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 8px; }
.wahlkarte {
  display: flex; flex-direction: column; gap: 3px; cursor: pointer;
  padding: 10px 12px; border: 1px solid var(--li-rahmen-stark);
  border-radius: var(--r); background: var(--fl-blatt); line-height: 1.4;
}
.wahlkarte:hover { background: var(--fl-hover); }
.wahlkarte input { position: absolute; opacity: 0; pointer-events: none; }
.wahlkarte b { font-size: 13.5px; color: var(--tx-stark); }
.wahlkarte--aktiv { border-color: var(--ak); box-shadow: inset 0 0 0 1px var(--ak); }

.eingabe { display: flex; flex-direction: column; gap: 4px; }
.eingabe .feld { width: 100%; }
.eingabe textarea.feld { resize: vertical; min-height: 62px; font-family: var(--schrift); }

.feldreihe { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-start; }
.feldreihe > .eingabe { flex: 1 1 220px; min-width: 0; }
.feldreihe > .eingabe--klein { flex: 0 1 130px; }
