/* Krypto-Cockpit – Farben und Maße wie im Entwurf; hell und dunkel folgen der Einstellung des Geräts */
:root {
  --bg: #e9eef0;
  --surface: #fafbfb;
  --surface-2: #e0e6e9;
  --ink: #0f1a20;
  --ink-2: #405058;
  --muted: #5f6d76;
  --line: #d0d8dc;
  --grid: #e0e6e9;
  --accent: #b0500e;
  --accent-ink: #ffffff;
  --accent-soft: rgba(176, 80, 14, .10);
  --good: #0ca30c;
  --warn: #fab219;
  --crit: #d03b3b;
  --crit-ink: #b42323;
  --good-ink: #006300;
  --series-1: #2a78d6;
  --series-2: #d9822b;
  --series-3: #1f9a87;
  --series-4: #8a63c9;
  --div-low: #2a78d6;
  --div-mid: #e2e8ea;
  --div-high: #e34948;
  --shadow: 0 1px 2px rgba(15, 26, 32, .06), 0 6px 20px rgba(15, 26, 32, .06);
  --schrift: "Source Sans 3", "Segoe UI", system-ui, -apple-system, sans-serif;
  --titel: "Schibsted Grotesk", "Segoe UI", system-ui, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, "Cascadia Mono", Consolas, monospace;
  --r: 10px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0b1114; --surface: #131a1f; --surface-2: #1c252b; --ink: #edf1f3; --ink-2: #b3bec4; --muted: #84939c;
    --line: #27323a; --grid: #212b31; --accent: #ee8a4c; --accent-ink: #1a0b02; --accent-soft: rgba(238, 138, 76, .14);
    --crit-ink: #f07b7b; --good-ink: #0ca30c; --series-1: #3987e5; --series-2: #eb9a4f; --series-3: #34b8a3; --series-4: #a585e0;
    --div-low: #3987e5; --div-mid: #333c42; --div-high: #e66767; --shadow: 0 1px 2px rgba(0, 0, 0, .3);
    color-scheme: dark;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html, body { min-height: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--schrift); font-size: 15px; line-height: 1.45; }
h1, h2, h3 { font-family: var(--titel); margin: 0; letter-spacing: -.01em; text-wrap: balance; }
h1 { font-size: 26px; }
h2 { font-size: 17px; font-weight: 600; }
p { margin: 0; }
a { color: var(--accent); text-underline-offset: 3px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
.num { font-variant-numeric: tabular-nums; }
.mono { font-family: var(--mono); font-size: .9em; }
.klein { font-size: 13px; color: var(--muted); }

/* Marke */
.marke { display: flex; align-items: center; gap: 10px; font-family: var(--titel); font-weight: 700; font-size: 17px; color: var(--ink); text-decoration: none; }
.m-ring { fill: none; stroke: var(--accent); }
.m-nadel { fill: none; stroke: var(--ink); }
.m-mitte { fill: var(--ink); }

/* Knöpfe und Formulare – gilt auch für die Seiten von django-allauth */
.knopf, button, input[type="submit"] {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 42px; padding: 0 16px;
  border-radius: 8px; border: 1px solid transparent; background: var(--accent); color: var(--accent-ink);
  font: inherit; font-weight: 600; cursor: pointer; text-decoration: none;
}
.knopf.zweit { background: transparent; border-color: var(--line); color: var(--ink); }
.knopf.zweit:hover { background: var(--surface-2); }
.knopf.klein { min-height: 34px; padding: 0 12px; font-size: 13.5px; }
label { display: block; font-weight: 600; font-size: 14px; margin-bottom: 6px; }
input[type="text"], input[type="password"], input[type="number"], input:not([type]) {
  width: 100%; min-height: 42px; border: 1px solid var(--line); border-radius: 8px; background: var(--bg);
  padding: 0 12px; font: inherit; color: var(--ink);
}
input[type="checkbox"] { width: 18px; height: 18px; accent-color: var(--accent); }
form p, form > div { margin: 0 0 14px; }
.errorlist { margin: 4px 0 0; padding: 0; list-style: none; color: var(--crit-ink); font-size: 13.5px; }
.helptext { display: block; font-size: 13px; color: var(--muted); margin-top: 4px; }

/* Meldungen */
.meldungen { list-style: none; margin: 0 0 12px; padding: 10px 14px; border-radius: 8px; background: var(--accent-soft); font-size: 14px; }

/* Anmeldeseiten */
body.tor {
  display: flex; align-items: center; justify-content: center; min-height: 100vh; padding: 48px 16px;
  background-image: linear-gradient(var(--grid) 1px, transparent 1px), linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 40px 40px;
}
.torkarte {
  width: 100%; max-width: 420px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px;
  box-shadow: var(--shadow); padding: 28px; display: grid; gap: 16px;
}
.torkarte h1 { font-size: 24px; }
.torkarte img { display: block; max-width: 220px; height: auto; background: #fff; padding: 8px; border-radius: 8px; }
.torkarte code, .torkarte pre { font-family: var(--mono); font-size: 14px; word-break: break-all; white-space: pre-wrap; }
.torkarte ul { padding-left: 20px; }

/* App-Rahmen */
.app { display: grid; grid-template-columns: 236px minmax(0, 1fr); min-height: 100vh; }
.seitenleiste {
  position: sticky; top: 0; align-self: start; height: 100vh; overflow-y: auto;
  background: var(--surface); border-right: 1px solid var(--line); padding: 18px 12px;
  display: flex; flex-direction: column; gap: 10px;
}
.seitenleiste > .marke { padding: 0 8px 6px; }
.nav { display: grid; gap: 1px; }
.nav .gruppe { font-size: 11.5px; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); margin: 14px 10px 4px; }
.nav .gruppe:first-child { margin-top: 4px; }
.nav a, .nav .geplant { display: flex; align-items: center; gap: 8px; padding: 7px 10px; border-radius: 7px; font-weight: 600; font-size: 14.5px; text-decoration: none; }
.nav a { color: var(--ink-2); }
.nav a:hover { background: var(--surface-2); color: var(--ink); }
.nav a[aria-current="page"] { background: var(--accent-soft); color: var(--ink); }
.nav .geplant { color: var(--muted); font-weight: 400; }
.nav .geplant small { margin-left: auto; font-size: 11.5px; }
.nutzer { margin: auto 0 0; display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 12px 8px 0; border-top: 1px solid var(--line); }
.nutzer b { display: block; font-size: 14px; }
.nutzer span { display: block; font-size: 12.5px; color: var(--muted); }
.inhalt { min-width: 0; }
.kopf { padding: 20px clamp(16px, 3vw, 32px) 6px; }
.kopf .stand { color: var(--muted); font-size: 13.5px; }
.seite { padding: 10px clamp(16px, 3vw, 32px) 32px; display: grid; gap: 16px; }
.inhalt > .meldungen { margin: 8px clamp(16px, 3vw, 32px) 0; }
@media (max-width: 900px) {
  .app { grid-template-columns: minmax(0, 1fr); }
  .seitenleiste { position: static; height: auto; border-right: 0; border-bottom: 1px solid var(--line); padding: 10px 12px; gap: 6px; }
  /* Am Handy eine waagerechte Leiste statt der ganzen Liste – sonst begann der Inhalt erst unter dem ersten Bildschirm */
  .nav { display: flex; overflow-x: auto; gap: 4px; padding-bottom: 4px; scrollbar-width: thin; }
  .nav .gruppe, .nav .geplant { display: none; }
  .nav a { flex: none; white-space: nowrap; background: var(--surface-2); }
  .nutzer { margin: 0; padding: 8px 4px 0; }
}

/* Tafeln */
.raster { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 16px; }
.s12 { grid-column: span 12; } .s8 { grid-column: span 8; } .s7 { grid-column: span 7; } .s6 { grid-column: span 6; }
.s5 { grid-column: span 5; } .s4 { grid-column: span 4; } .s3 { grid-column: span 3; }
@media (max-width: 1100px) { .s8, .s7, .s6, .s5, .s4 { grid-column: span 12; } .s3 { grid-column: span 6; } }
@media (max-width: 560px) { .s3 { grid-column: span 12; } }
.tafel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 16px 18px; min-width: 0; display: flex; flex-direction: column; gap: 10px; }
.platzhalter { border-style: dashed; background: transparent; min-height: 110px; }
.kachel { gap: 3px; }
.kachel .l { font-size: 13px; color: var(--ink-2); }
.kachel .w { font-size: 22px; font-weight: 600; }
.kachel .s { font-size: 13px; color: var(--muted); }

/* Listen und Tabellen */
.liste { margin: 0; display: grid; }
.liste > div { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 14px; padding: 10px 0; border-top: 1px solid var(--grid); }
.liste > div:first-child { border-top: 0; }
.liste dt { font-weight: 600; }
.liste dd { margin: 0; }
.tabhuelle { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; font-size: 14.5px; }
th { font-weight: 600; font-size: 12.5px; color: var(--muted); text-align: left; padding: 6px; border-bottom: 1px solid var(--line); white-space: nowrap; }
td { padding: 8px 6px; border-bottom: 1px solid var(--grid); white-space: nowrap; }
td.umbruch { white-space: normal; }
/* Aktien: zehn Spalten – die langen Spaltenköpfe dürfen umbrechen, sonst passt die Tabelle nicht einmal am Rechner */
table.aktien th { white-space: normal; vertical-align: bottom; }
th.r, td.r { text-align: right; }
tr:last-child td { border-bottom: 0; }
tr.hervor td { background: var(--accent-soft); font-weight: 600; }
details summary { cursor: pointer; }
details[open] summary { margin-bottom: 6px; }

/* Status: immer Zeichen und Wort, nie nur Farbe */
.status { display: inline-flex; align-items: center; gap: 7px; font-weight: 600; }
.status i { width: 18px; height: 18px; border-radius: 50%; display: inline-grid; place-items: center; font-style: normal; font-size: 11px; font-weight: 700; color: #fff; }
.status.gut i { background: var(--good); }
.status.mittel i { background: var(--warn); color: #2a1d00; }
.status.schlecht i { background: var(--crit); }
.status.info i { background: var(--series-1); }
.auf { color: var(--good-ink); }
.ab { color: var(--crit-ink); }
.chip { display: inline-flex; align-items: center; font-size: 12px; padding: 2px 8px; border-radius: 999px; background: var(--surface-2); color: var(--ink-2); white-space: nowrap; }

/* Kopfzeile „Tafel“ und Markt in Zahlen */
.tafel > header { display: flex; flex-wrap: wrap; align-items: baseline; column-gap: 12px; row-gap: 2px; }
.tafel > header .unter { order: 3; flex-basis: 100%; color: var(--muted); font-size: 13px; }
.tafel > header .mehr { order: 2; margin-left: auto; font-size: 14px; font-weight: 600; }
.markt { display: flex; flex-wrap: wrap; gap: 8px 28px; }
.markt div { display: flex; align-items: baseline; gap: 8px; }
.markt span { font-size: 13px; color: var(--muted); }
.markt b { font-size: 16px; font-weight: 600; }

/* Top 10 */
.top10 tbody tr:hover td { background: var(--surface-2); }
td.rang { color: var(--muted); width: 28px; }
.coin b { font-weight: 600; }
.coin .k { color: var(--muted); font-family: var(--mono); font-size: 12px; margin-left: 7px; }
.spark { display: block; }
.spark-flaeche { fill: var(--series-1); fill-opacity: .10; }
.spark-linie { fill: none; stroke: var(--series-1); stroke-width: 1.6; stroke-linejoin: round; stroke-linecap: round; }
.spark-punkt { fill: var(--series-1); stroke: var(--surface); stroke-width: 1.5; }

/* Angst und Gier */
.ag { display: flex; align-items: center; gap: 14px; }
.ag-zahl { font-size: 52px; font-weight: 700; line-height: 1; font-family: var(--titel); }
.ag > div b { display: block; font-size: 19px; }
.ag > div span { font-size: 13px; color: var(--muted); }
.ag-skala { display: block; width: 100%; height: 16px; }
.ag-z1 { fill: var(--div-low); }
.ag-z2 { fill: color-mix(in oklab, var(--div-low) 45%, var(--div-mid)); }
.ag-z3 { fill: var(--div-mid); }
.ag-z4 { fill: color-mix(in oklab, var(--div-high) 45%, var(--div-mid)); }
.ag-z5 { fill: var(--div-high); }
.ag-marke { fill: var(--ink); }
.ag-namen { display: flex; justify-content: space-between; font-size: 12px; color: var(--muted); }
.ag-verlauf { display: block; width: 100%; height: 110px; }
.ag-gitter { stroke: var(--grid); stroke-width: 1; vector-effect: non-scaling-stroke; }
.ag-flaeche { fill: var(--series-1); fill-opacity: .10; }
.ag-linie { fill: none; stroke: var(--series-1); stroke-width: 2; vector-effect: non-scaling-stroke; stroke-linejoin: round; }

/* News */
.news { list-style: none; margin: 0; padding: 0; display: grid; }
.news li { display: grid; grid-template-columns: 52px minmax(0, 1fr) auto; gap: 4px 16px; padding: 14px 0; border-top: 1px solid var(--grid); }
.news li:first-child { border-top: 0; padding-top: 4px; }
.news .zeit { font-family: var(--mono); font-size: 12.5px; color: var(--muted); padding-top: 2px; line-height: 1.3; }
.news .quelle { font-size: 12.5px; color: var(--muted); }
.news h3 { font-family: var(--schrift); font-size: 16px; font-weight: 700; letter-spacing: 0; margin-top: 1px; }
.news .nk > p { margin-top: 3px; color: var(--ink-2); max-width: 75ch; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 9px; }
.punkte { display: grid; justify-items: end; align-content: start; gap: 5px; }
.punkte b { font-size: 17px; font-weight: 700; }
.punkte b span { font-size: 12.5px; font-weight: 400; color: var(--muted); }
.leiste10 { display: flex; gap: 2px; }
.leiste10 i { width: 5px; height: 12px; border-radius: 2px; background: var(--surface-2); }
.leiste10 i.an { background: var(--series-1); }
.warum { margin-top: 8px; font-size: 13.5px; color: var(--ink-2); }
.warum summary { cursor: pointer; color: var(--accent); font-weight: 600; width: max-content; }
.warum ul { margin: 6px 0 0; padding-left: 18px; }
.news .entscheid { margin-top: 9px; font-size: 13.5px; display: flex; gap: 7px; align-items: baseline; color: var(--ink-2); }
.entscheid i { font-style: normal; font-weight: 700; }
.entscheid.ja i { color: var(--good-ink); }
.entscheid.nein i { color: var(--muted); }
.aktionen { margin-top: 8px; font-size: 13px; }
@media (max-width: 640px) {
  .news li { grid-template-columns: minmax(0, 1fr) auto; }
  .news .nk { grid-column: 1 / -1; grid-row: 2; }
  .news .punkte { grid-column: 2; grid-row: 1; grid-auto-flow: column; align-items: center; }
}
.filter { display: flex; flex-wrap: wrap; gap: 10px 18px; align-items: center; margin: 0; }
.filter label { display: flex; align-items: center; gap: 8px; font-size: 14px; color: var(--ink-2); font-weight: 400; margin: 0; }
.filter select { min-height: 34px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); color: var(--ink); padding: 0 8px; font: inherit; font-size: 14px; }

/* Grafiken (Hebel, Zyklus) – Reihen r1 bis r4 in fester Reihenfolge; Long immer r1, Short immer r2 */
.grafik { display: block; width: 100%; height: auto; overflow: visible; }
/* Die Grafiken schrumpfen mit; auf schmalen Bildschirmen wächst die Schrift, damit sie lesbar bleibt */
@media (max-width: 700px) { .grafik .g-achse { font-size: 17px; } .grafik .g-text { font-size: 18px; } }
@media (max-width: 440px) { .grafik .g-achse { font-size: 21px; } .grafik .g-text { font-size: 22px; } }
.balkenliste { display: grid; gap: 9px; font-size: 14px; }
.bz { display: grid; grid-template-columns: minmax(80px, 8.5em) minmax(0, 1fr) 6.5em; align-items: center; gap: 10px; }
.bz > span:last-child { text-align: right; }
.bz.fett { font-weight: 700; }
.bb { display: block; width: 100%; height: 14px; }
.bb .g-basis { vector-effect: non-scaling-stroke; }
.anteilliste { display: grid; gap: 12px; font-size: 14px; }
.az { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 10px; }
.az .bb { grid-column: 1 / -1; height: 10px; }
.grafik text { font-family: var(--schrift); }
.g-achse { font-size: 12px; fill: var(--muted); }
.g-text { font-size: 13px; fill: var(--ink-2); }
.g-fett { font-weight: 700; fill: var(--ink); }
.g-gitter { stroke: var(--grid); stroke-width: 1; }
.g-basis { stroke: var(--line); stroke-width: 1; }
.g-referenz { stroke: var(--muted); stroke-width: 1; stroke-dasharray: 4 4; }
.g-fuehrung { fill: none; stroke: var(--muted); stroke-width: 1; }
.g-linie { fill: none; stroke-width: 1.6; stroke-linejoin: round; stroke-linecap: round; }
.g-linie.r1 { stroke: var(--series-1); stroke-width: 2.4; }
.g-linie.r2 { stroke: var(--series-2); }
.g-linie.r3 { stroke: var(--series-3); }
.g-linie.r4 { stroke: var(--series-4); }
.g-flaeche { fill-opacity: .10; stroke: none; }
.g-flaeche.r1 { fill: var(--series-1); }
.g-punkt { stroke: var(--surface); stroke-width: 1.5; }
.g-punkt.r1 { fill: var(--series-1); } .g-punkt.r2 { fill: var(--series-2); }
.g-punkt.r3 { fill: var(--series-3); } .g-punkt.r4 { fill: var(--series-4); }
.g-balken.r1 { fill: var(--series-1); }
.g-balken.r2 { fill: var(--series-2); }
.g-streifen { display: block; width: 100%; height: 16px; }
.g-marke { fill: var(--ink); }
.rb0 { fill: var(--div-low); }
.rb1 { fill: color-mix(in oklab, var(--div-low) 75%, var(--div-mid)); }
.rb2 { fill: color-mix(in oklab, var(--div-low) 50%, var(--div-mid)); }
.rb3 { fill: color-mix(in oklab, var(--div-low) 25%, var(--div-mid)); }
.rb4 { fill: var(--div-mid); }
.rb5 { fill: color-mix(in oklab, var(--div-high) 25%, var(--div-mid)); }
.rb6 { fill: color-mix(in oklab, var(--div-high) 50%, var(--div-mid)); }
.rb7 { fill: color-mix(in oklab, var(--div-high) 75%, var(--div-mid)); }
.rb8 { fill: var(--div-high); }

/* Legenden: Strich für Linien, Quadrat (fl) für Flächen und Balken */
.legende { display: flex; flex-wrap: wrap; gap: 4px 16px; font-size: 13px; color: var(--ink-2); }
.legende span { display: inline-flex; align-items: center; gap: 7px; }
.legende i { display: inline-block; width: 16px; height: 3px; border-radius: 2px; background: var(--muted); }
.legende i.fl { width: 11px; height: 11px; border-radius: 3px; }
.legende i.r1 { background: var(--series-1); } .legende i.r2 { background: var(--series-2); }
.legende i.r3 { background: var(--series-3); } .legende i.r4 { background: var(--series-4); }
.legende i.r-tag { background: color-mix(in oklab, var(--series-1) 45%, transparent); }
.legende i.r-woche { background: color-mix(in oklab, var(--series-1) 20%, transparent); }
.legende i.r-zone { background: color-mix(in oklab, var(--crit) 30%, transparent); }

/* Kennzahlen-Paare und Gewichtspunkte (Optionen) */
.paare { display: flex; flex-wrap: wrap; gap: 6px 28px; }
.paare div { display: flex; align-items: baseline; gap: 8px; }
.paare span { font-size: 13px; color: var(--muted); }
.paare b { font-size: 17px; font-weight: 600; }
.punkte4 { color: var(--series-1); letter-spacing: 1px; font-size: 12px; }

/* Hebel-Rechner */
.rechner-steuer { display: flex; flex-wrap: wrap; gap: 10px 18px; }
.rechner-steuer label { display: flex; align-items: center; gap: 8px; margin: 0; font-weight: 400; color: var(--ink-2); }
.rechner-steuer select { min-height: 36px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); color: var(--ink); padding: 0 8px; font: inherit; font-size: 14px; }
.rechner-hebel { display: grid; grid-template-columns: auto minmax(0, 1fr) 72px; align-items: center; gap: 12px; }
.rechner-hebel label { margin: 0; }
.rechner-hebel input[type="range"] { width: 100%; accent-color: var(--accent); }
.rechner-hebel output { font-weight: 700; text-align: right; }
.rechner-erg { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px 16px; }
.rechner-erg > div { display: grid; gap: 2px; align-content: start; }
.rechner-erg .l { font-size: 13px; color: var(--muted); }
.rechner-erg b { font-size: 18px; font-weight: 600; }
.r-zone { fill: var(--crit); fill-opacity: .14; }
.r-woche { fill: var(--series-1); fill-opacity: .16; }
.r-tag { fill: var(--series-1); fill-opacity: .38; }
.r-kurs { stroke: var(--ink); stroke-width: 2; }
.r-liq-linie { stroke: var(--crit); stroke-width: 2; }

/* Zyklus: Balken-Meter der Altcoin-Saison */
.meter { display: grid; gap: 4px; }
.meter-kopf { display: flex; justify-content: space-between; font-size: 14px; }
.meter .g-streifen { height: 12px; }
.m-bahn { fill: var(--surface-2); }
.m-fuellung { fill: var(--series-1); }
/* Umschalter (Links, damit er ohne Skript funktioniert) und Kacheln in einer Tafel */
.umschalter { display: inline-flex; flex-wrap: wrap; gap: 2px; padding: 3px; border-radius: 9px; background: var(--surface-2); width: max-content; max-width: 100%; }
.umschalter a { padding: 5px 12px; border-radius: 7px; font-size: 14px; font-weight: 600; color: var(--ink-2); text-decoration: none; }
.umschalter a:hover { color: var(--ink); }
.umschalter a[aria-current="true"] { background: var(--surface); color: var(--ink); box-shadow: var(--shadow); }
.kacheln3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 10px 18px; }
.kacheln3 > div { display: grid; gap: 1px; align-content: start; }
.kacheln3 .l { font-size: 13px; color: var(--muted); }
.kacheln3 b { font-size: 19px; font-weight: 600; }
.kacheln3 .s { font-size: 12.5px; color: var(--muted); }

/* Dauer der Bärenmärkte */
.dauerliste { display: grid; gap: 12px; font-size: 14px; }
.az.fett > span:first-child { font-weight: 700; }
.g-band { fill: var(--accent-soft); }
.g-balken.grau { fill: var(--muted); fill-opacity: .55; }
.dauerliste .az { grid-template-columns: auto minmax(0, 1fr); }
.dauerliste .az > span.num { text-align: right; }

/* „Wie lese ich das?“ */
details.info { font-size: 13.5px; color: var(--ink-2); border-top: 1px solid var(--grid); padding-top: 8px; margin-top: auto; }
details.info summary { color: var(--accent); font-weight: 600; width: max-content; }
details.info p { margin: 6px 0 0; max-width: 80ch; }

/* Ampeln: Zeichen und Wort, nie Farbe allein */
.gesamtbild { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; }
.zaehler { display: inline-flex; flex-wrap: wrap; gap: 4px 12px; font-size: 13px; color: var(--muted); }
.zaehler span { display: inline-flex; align-items: center; gap: 5px; }
.zaehler i { width: 9px; height: 9px; border-radius: 50%; }
.ampeln { display: grid; gap: 14px; }
.ampel { display: grid; grid-template-columns: 22px minmax(0, 1fr); column-gap: 10px; row-gap: 4px; align-items: center; }
.ampel > :not(.ampel-zeichen) { grid-column: 2; }
.ampel-zeichen { grid-row: 1; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font-size: 12px; font-weight: 700; color: #fff; }
.ampel-zeichen.gut { background: var(--good); }
.ampel-zeichen.mittel { background: var(--warn); color: #2a1d00; }
.ampel-zeichen.schlecht { background: var(--crit); }
.ampel-zeichen.info { background: var(--series-1); }
.ampel-kopf { display: flex; justify-content: space-between; gap: 10px; font-size: 14.5px; }
.ampel-text { font-size: 13px; color: var(--ink-2); }
.messleiste { display: block; width: 100%; height: 12px; }
.z-gut, .z-mittel, .z-schlecht, .z-info { fill-opacity: .25; }
.z-gut { fill: var(--good); } .z-mittel { fill: var(--warn); } .z-schlecht { fill: var(--crit); } .z-info { fill: var(--series-1); }
.aktiv { fill-opacity: 1; }
.zaehler i.z-gut { background: var(--good); } .zaehler i.z-mittel { background: var(--warn); } .zaehler i.z-schlecht { background: var(--crit); }
/* Liquidations-Heatmap */
.heatmap-raster { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 3fr); gap: 16px 24px; align-items: start; }
@media (max-width: 1100px) { .heatmap-raster { grid-template-columns: minmax(0, 1fr); } }
.unterkopf { font-family: var(--schrift); font-size: 14px; font-weight: 700; margin: 0 0 6px; color: var(--ink-2); }
.hm-verlauf { display: block; width: 100%; height: 360px; color: var(--ink); touch-action: pan-y; border-radius: 6px; }
@media (max-width: 640px) { .hm-verlauf { height: 300px; } }
/* Termine */
table.termine tr.monat th { padding-top: 16px; font-size: 13px; text-transform: uppercase; letter-spacing: .08em; color: var(--ink-2); border-bottom: 1px solid var(--line); }
table.termine td { vertical-align: top; }
.termin-form input[type="date"] { min-height: 42px; border: 1px solid var(--line); border-radius: 8px; background: var(--bg); padding: 0 12px; font: inherit; color: var(--ink); }.filter label { flex-wrap: wrap; max-width: 100%; }
.filter select { max-width: 100%; }
@media (max-width: 700px) {
  table.termine, table.termine tbody, table.termine td { display: block; }
  table.termine thead { display: none; }
  table.termine tr.monat { display: block; }
  table.termine tr.monat th { display: block; }
  table.termine tr:not(.monat) { display: grid; grid-template-columns: auto auto minmax(0, 1fr); align-items: start; gap: 4px 10px; padding: 10px 6px; border-bottom: 1px solid var(--grid); }
  table.termine td { border: 0; padding: 0; text-align: left; }
  table.termine td:nth-child(4), table.termine td:nth-child(5) { grid-column: 1 / -1; white-space: normal; }
}@media (max-width: 700px) { table.termine .chip { white-space: normal; } }
