/* Mimo's Cockpit – Design-System
   Tokens für Hell/Dunkel (Dunkel eigens abgestuft), Statusfarben nur mit Symbol + Text, Daten-Farben aus der geprüften Palette. */
:root {
  color-scheme: light;
  --flaeche: #f6f5f1;          /* Seitenfläche */
  --karte: #fdfdfb;            /* Karten-/Diagrammfläche */
  --karte-2: #f3f2ed;          /* abgesetzte Fläche in Karten */
  --tinte: #0b0b0b;
  --tinte-2: #52514e;
  --tinte-3: #807e78;
  --linie: #e4e3dc;
  --achse: #c3c2b7;
  --rand: rgba(11, 11, 11, 0.09);
  --hover: rgba(11, 11, 11, 0.045);
  --gut: #006300; --gut-flaeche: rgba(12, 163, 12, .11); --gut-mark: #0ca30c;
  --knapp: #8a5a00; --knapp-flaeche: rgba(250, 178, 25, .16); --knapp-mark: #e39b00;
  --schlecht: #b42323; --schlecht-flaeche: rgba(208, 59, 59, .10); --schlecht-mark: #d03b3b;
  --s1: #2a78d6; --s2: #eb6834; --s3: #1baf7a; --grau-reihe: #b5b3ab;
  --akzent: #f2b43c;           /* Marke (Bun) – sparsam */
  --seq-0: #f0efec; --seq-1: #cde2fb; --seq-2: #9ec5f4; --seq-3: #6da7ec; --seq-4: #3987e5; --seq-5: #256abf; --seq-6: #184f95; --seq-7: #0d366b;
  --radius: 16px;
  --schatten: 0 1px 2px rgba(20, 18, 10, .04), 0 1px 1px rgba(20, 18, 10, .02);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --flaeche: #0d0d0d; --karte: #1a1a19; --karte-2: #222220; --tinte: #ffffff; --tinte-2: #c3c2b7; --tinte-3: #8f8d86;
    --linie: #2c2c2a; --achse: #3c3c39; --rand: rgba(255,255,255,0.09); --hover: rgba(255,255,255,0.05);
    --gut: #3cc23c; --gut-flaeche: rgba(12, 163, 12, .18); --gut-mark: #0ca30c;
    --knapp: #f5c04a; --knapp-flaeche: rgba(250, 178, 25, .16); --knapp-mark: #fab219;
    --schlecht: #ee7c7c; --schlecht-flaeche: rgba(208, 59, 59, .2); --schlecht-mark: #e66767;
    --s1: #3987e5; --s2: #d95926; --s3: #199e70; --grau-reihe: #5d5c57;
    --seq-0: #2b2b29; --seq-1: #0d366b; --seq-2: #104281; --seq-3: #184f95; --seq-4: #1c5cab; --seq-5: #2a78d6; --seq-6: #5598e7; --seq-7: #9ec5f4;
    --schatten: none;
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --flaeche: #0d0d0d; --karte: #1a1a19; --karte-2: #222220; --tinte: #ffffff; --tinte-2: #c3c2b7; --tinte-3: #8f8d86;
  --linie: #2c2c2a; --achse: #3c3c39; --rand: rgba(255,255,255,0.09); --hover: rgba(255,255,255,0.05);
  --gut: #3cc23c; --gut-flaeche: rgba(12, 163, 12, .18); --gut-mark: #0ca30c;
  --knapp: #f5c04a; --knapp-flaeche: rgba(250, 178, 25, .16); --knapp-mark: #fab219;
  --schlecht: #ee7c7c; --schlecht-flaeche: rgba(208, 59, 59, .2); --schlecht-mark: #e66767;
  --s1: #3987e5; --s2: #d95926; --s3: #199e70; --grau-reihe: #5d5c57;
  --seq-0: #2b2b29; --seq-1: #0d366b; --seq-2: #104281; --seq-3: #184f95; --seq-4: #1c5cab; --seq-5: #2a78d6; --seq-6: #5598e7; --seq-7: #9ec5f4;
  --schatten: none;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--flaeche); color: var(--tinte); font: 15px/1.45 system-ui, -apple-system, "Segoe UI", sans-serif; }
a { color: inherit; }
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible, [tabindex]:focus-visible { outline: 2px solid var(--s1); outline-offset: 2px; }
h1 { font-size: 24px; line-height: 1.2; margin: 0; font-weight: 680; letter-spacing: -0.015em; }
h2 { font-size: 15.5px; margin: 0; font-weight: 620; letter-spacing: -0.005em; }
h3 { font-size: 14.5px; margin: 0; font-weight: 620; }
p { margin: 0; }
.unter { color: var(--tinte-2); font-size: 13px; margin-top: 2px; }
.leise { color: var(--tinte-3); }
.zahl, td, .r { font-variant-numeric: tabular-nums; }
.klein-text { font-size: 12px; }
.ein-zeiler { white-space: nowrap; }

/* ---------- Rahmen ---------- */
.kopf { position: sticky; top: 0; z-index: 20; background: color-mix(in srgb, var(--flaeche) 86%, transparent); backdrop-filter: saturate(1.4) blur(12px);
  -webkit-backdrop-filter: saturate(1.4) blur(12px); border-bottom: 1px solid var(--rand); }
.kopf-innen { max-width: 1280px; margin: 0 auto; padding: 9px 20px; display: flex; align-items: center; gap: 18px; }
.marke { display: flex; align-items: center; gap: 9px; text-decoration: none; font-weight: 720; font-size: 16px; white-space: nowrap; }
.marke svg { width: 30px; height: 30px; flex: none; }
.marke span b { font-weight: 450; color: var(--tinte-2); }
.nav { display: flex; gap: 2px; flex: 1; }
.nav a { text-decoration: none; padding: 7px 11px; border-radius: 10px; color: var(--tinte-2); font-weight: 540; font-size: 14px; display: inline-flex; align-items: center; gap: 5px; }
.nav a svg { width: 15px; height: 15px; }
.nav a:hover { background: var(--hover); color: var(--tinte); }
.nav a.aktiv { background: var(--tinte); color: var(--flaeche); }
.kopf-rechts { display: flex; align-items: center; gap: 10px; font-size: 12.5px; color: var(--tinte-3); white-space: nowrap; }
.kopf-rechts a { text-decoration: none; }
.kopf-rechts .symbol { display: inline-flex; padding: 5px; border-radius: 9px; color: var(--tinte-2); }
.kopf-rechts .symbol:hover { background: var(--hover); color: var(--tinte); }
.kopf-rechts .symbol svg { width: 18px; height: 18px; }
.punkt { width: 7px; height: 7px; border-radius: 50%; background: var(--gut-mark); display: inline-block; margin-right: 5px; vertical-align: 1px; }
.punkt.alt { background: var(--knapp-mark); } .punkt.fehler { background: var(--schlecht-mark); }

main { max-width: 1280px; margin: 0 auto; padding: 24px 20px 100px; }
.seitenkopf { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px 16px; margin-bottom: 20px; flex-wrap: wrap; }
.seitenkopf .aktionen { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.brotkrumen { font-size: 13px; color: var(--tinte-3); margin-bottom: 2px; } .brotkrumen a { color: var(--tinte-2); }

.mobilnav { display: none; }
@media (max-width: 1100px) {
  .nav, .kopf-rechts .lang { display: none; }
  .kopf-innen { justify-content: space-between; padding: 9px 16px; }
  main { padding: 18px 16px 104px; }
  .mobilnav { display: flex; position: fixed; bottom: 0; left: 0; right: 0; z-index: 30; background: color-mix(in srgb, var(--karte) 92%, transparent);
    backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-top: 1px solid var(--rand); padding: 6px 4px calc(6px + env(safe-area-inset-bottom)); }
  .mobilnav a { flex: 1; text-align: center; text-decoration: none; font-size: 11px; color: var(--tinte-3); padding: 4px 0; display: flex; flex-direction: column; align-items: center; gap: 2px; }
  .mobilnav a svg { width: 23px; height: 23px; }
  .mobilnav a.aktiv { color: var(--tinte); font-weight: 650; }
  h1 { font-size: 21px; }
}

/* ---------- Raster & Karten ---------- */
.raster { display: grid; gap: 16px; align-items: start; }
.raster.zwei { grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); }
.raster.halb { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.raster.drei { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.raster.gleich { align-items: stretch; }
@media (max-width: 980px) { .raster.zwei, .raster.halb, .raster.drei { grid-template-columns: minmax(0, 1fr); } }
.abstand { margin-top: 16px; }
.abstand-gross { margin-top: 28px; }
.spalte { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.karte { background: var(--karte); border: 1px solid var(--rand); border-radius: var(--radius); padding: 18px 20px; box-shadow: var(--schatten); min-width: 0; }
.karte-kopf { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; margin-bottom: 14px; }
.karte-kopf h2 svg { width: 16px; height: 16px; vertical-align: -2px; color: var(--s1); margin-right: 2px; }
@media (max-width: 520px) { .karte { padding: 15px 15px; } }
.abschnitt-titel { display: flex; align-items: baseline; gap: 10px; margin: 28px 0 12px; }
.abschnitt-titel h2 { font-size: 17px; }

/* ---------- Kennzahlen: Hero, Kacheln, Leiste ---------- */
.held-band { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1.25fr) minmax(0, 1fr); gap: 16px; margin-bottom: 16px; }
.held-band.zwei { grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); }
@media (max-width: 980px) { .held-band, .held-band.zwei { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } .held-band > .held:first-child { grid-column: span 2; } }
@media (max-width: 620px) { .held-band, .held-band.zwei { grid-template-columns: minmax(0, 1fr); } .held-band > .held:first-child { grid-column: auto; } }
.held { background: var(--karte); border: 1px solid var(--rand); border-radius: var(--radius); padding: 18px 20px; box-shadow: var(--schatten); min-width: 0;
  display: flex; flex-direction: column; text-decoration: none; color: inherit; }
a.held:hover { border-color: var(--achse); }
.held .oben { display: flex; justify-content: space-between; align-items: center; gap: 8px; min-height: 24px; }
.held .lab { font-size: 13px; color: var(--tinte-2); font-weight: 540; }
.held .wert { font-size: 44px; font-weight: 700; letter-spacing: -0.025em; line-height: 1.05; margin-top: 8px; white-space: nowrap; }
.held.klein .wert { font-size: 32px; }
.held .zeile { font-size: 13px; color: var(--tinte-2); margin-top: 6px; }
.held .zeile b { color: var(--tinte); font-weight: 620; }
.held .fuss { margin-top: auto; padding-top: 10px; }
@media (max-width: 520px) { .held .wert { font-size: 38px; } .held.klein .wert { font-size: 28px; } }

.kacheln { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 16px; margin-bottom: 16px; }
.kachel { background: var(--karte); border: 1px solid var(--rand); border-radius: var(--radius); padding: 15px 17px; box-shadow: var(--schatten); min-width: 0; text-decoration: none; color: inherit; display: block; }
a.kachel:hover { border-color: var(--achse); }
.kachel .lab { font-size: 13px; color: var(--tinte-2); }
.kachel .wert { font-size: 26px; font-weight: 660; letter-spacing: -0.015em; margin-top: 2px; white-space: nowrap; }
.kachel .zusatz { font-size: 12.5px; color: var(--tinte-3); margin-top: 3px; }
@media (max-width: 520px) { .kacheln { grid-template-columns: 1fr 1fr; gap: 10px; } .kachel { padding: 12px 13px; } .kachel .wert { font-size: 21px; } }

/* Kennzahlen-Leiste: viele kleine Werte ruhig in einer Zeile */
.leiste { display: grid; grid-template-columns: repeat(auto-fit, minmax(128px, 1fr)); background: var(--karte); border: 1px solid var(--rand); border-radius: var(--radius);
  box-shadow: var(--schatten); margin-bottom: 16px; overflow: hidden; }
.leiste > div { padding: 13px 16px; border-right: 1px solid var(--linie); min-width: 0; }
.leiste > div:last-child { border-right: 0; }
.leiste .lab { font-size: 12.5px; color: var(--tinte-3); white-space: nowrap; }
.leiste .wert { font-size: 19px; font-weight: 640; margin-top: 1px; white-space: nowrap; letter-spacing: -0.01em; }
.leiste .zusatz { font-size: 12px; color: var(--tinte-3); margin-top: 1px; }
@media (max-width: 620px) { .leiste { grid-template-columns: 1fr 1fr; } .leiste > div { border-bottom: 1px solid var(--linie); } .leiste > div:nth-child(2n) { border-right: 0; } }

/* Status-Abzeichen: Farbe immer mit Symbol + Text */
.status { display: inline-flex; align-items: center; gap: 5px; font-size: 12.5px; font-weight: 620; padding: 3px 9px 3px 7px; border-radius: 999px; white-space: nowrap; }
.status::before { font-size: 11px; line-height: 1; }
.status.gut, .status.erreicht { background: var(--gut-flaeche); color: var(--gut); } .status.gut::before { content: "▲"; } .status.erreicht::before { content: "✓"; font-size: 12px; }
.status.knapp { background: var(--knapp-flaeche); color: var(--knapp); } .status.knapp::before { content: "■"; }
.status.warn { background: var(--schlecht-flaeche); color: var(--schlecht); } .status.warn::before { content: "▼"; }
.status.neutral { background: var(--karte-2); color: var(--tinte-2); } .status.neutral::before { content: none; }

/* Ziel-Balken: Ist (Füllung) + Soll-Markierung (Strich) */
.zielbalken { position: relative; height: 10px; border-radius: 5px; background: var(--seq-1); margin: 14px 0 8px; }
.zielbalken .ist { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 5px; background: var(--s1); max-width: 100%; }
.zielbalken.erreicht .ist { background: var(--gut-mark); }
.zielbalken .soll { position: absolute; top: -4px; bottom: -4px; width: 2px; margin-left: -1px; background: var(--tinte); border-radius: 1px; }
.zielbalken .soll::after { content: ""; position: absolute; left: -3px; top: -4px; border: 4px solid transparent; border-top-color: var(--tinte); }
.ziel-legende { display: flex; justify-content: space-between; gap: 8px; font-size: 12.5px; color: var(--tinte-2); }
.ziel-legende b { color: var(--tinte); font-weight: 620; }
.meter { height: 6px; border-radius: 3px; background: var(--seq-1); margin: 10px 0 6px; overflow: hidden; }
.meter i { display: block; height: 100%; background: var(--s1); border-radius: 3px; }
.meter.grau { background: var(--linie); } .meter.grau i { background: var(--tinte-2); }

/* Aufteilung Bar/Karte */
.aufteilung { display: flex; height: 12px; border-radius: 6px; overflow: hidden; gap: 2px; margin: 12px 0 8px; }
.aufteilung i { display: block; height: 100%; }
.aufteilung i:first-child { border-radius: 6px 0 0 6px; } .aufteilung i:last-child { border-radius: 0 6px 6px 0; }
.aufteilung-legende { display: flex; flex-wrap: wrap; gap: 4px 16px; font-size: 13px; color: var(--tinte-2); }
.aufteilung-legende span { display: inline-flex; align-items: center; gap: 6px; }
.aufteilung-legende i { width: 10px; height: 10px; border-radius: 2px; display: inline-block; }
.aufteilung-legende b { color: var(--tinte); font-weight: 620; }

.delta { font-size: 12.5px; font-weight: 640; white-space: nowrap; }
.delta.hoch { color: var(--gut); } .delta.runter { color: var(--schlecht); } .delta.gleich { color: var(--tinte-3); }
.delta .pfeil { font-size: 10px; margin-right: 2px; }
.spark { height: 30px; margin-top: 10px; }
.spark svg { display: block; width: 100%; height: 30px; overflow: visible; }

/* ---------- Bedienelemente ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; border: 1px solid var(--rand); background: var(--karte); color: var(--tinte); border-radius: 10px;
  padding: 7px 13px; font: inherit; font-size: 14px; font-weight: 560; cursor: pointer; text-decoration: none; white-space: nowrap; }
.btn:hover { background: var(--hover); border-color: var(--achse); }
.btn.primaer { background: var(--tinte); color: var(--flaeche); border-color: var(--tinte); }
.btn.primaer:hover { opacity: .9; }
.btn.klein { padding: 5px 10px; font-size: 13px; border-radius: 9px; }
.btn.text { border-color: transparent; background: none; padding-left: 4px; padding-right: 4px; color: var(--tinte-2); }
.btn.text:hover { color: var(--tinte); background: var(--hover); }
.btn[aria-disabled="true"], .btn[disabled] { opacity: .45; pointer-events: none; }
.btn svg { width: 16px; height: 16px; }
.link { color: var(--s1); font-weight: 560; text-decoration: none; } .link:hover { text-decoration: underline; }
.tagnav { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
input[type=date], input[type=month] { border: 1px solid var(--rand); background: var(--karte); color: var(--tinte); border-radius: 10px; padding: 6px 8px; font: inherit; font-size: 14px; }

.filter { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-bottom: 18px; }
.filter a { text-decoration: none; padding: 6px 12px; border-radius: 999px; border: 1px solid var(--rand); font-size: 13.5px; color: var(--tinte-2); background: var(--karte); }
.filter a:hover { background: var(--hover); color: var(--tinte); }
.filter a.aktiv { background: var(--tinte); color: var(--flaeche); border-color: var(--tinte); font-weight: 620; }
.filter form { display: flex; gap: 6px; align-items: center; margin-left: auto; }
.filter input[type=date] { font-size: 13px; padding: 5px 7px; }
@media (max-width: 700px) { .filter form { margin-left: 0; width: 100%; } .filter form input { flex: 1; min-width: 0; } }
.filterchips { display: flex; gap: 6px; flex-wrap: wrap; }
.filterchips button { font: inherit; font-size: 13px; border: 1px solid var(--rand); background: var(--karte); color: var(--tinte-2); border-radius: 999px; padding: 4px 11px; cursor: pointer; }
.filterchips button.aktiv { background: var(--tinte); color: var(--flaeche); border-color: var(--tinte); }

/* ---------- Tabellen ---------- */
.tabelle-rahmen { overflow-x: auto; margin: 0 -6px; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th { text-align: left; font-weight: 560; color: var(--tinte-3); font-size: 12.5px; padding: 6px; border-bottom: 1px solid var(--linie); white-space: nowrap; }
td { padding: 8px 6px; border-bottom: 1px solid var(--linie); vertical-align: top; }
tr:last-child td { border-bottom: 0; }
td.r, th.r { text-align: right; white-space: nowrap; }
tbody tr:hover td { background: var(--hover); }
tr.laufend td { color: var(--tinte-2); }
td a { text-decoration: none; font-weight: 520; } td a:hover { text-decoration: underline; }
.mini-balken { height: 6px; border-radius: 0 3px 3px 0; background: var(--s1); min-width: 2px; }
.balkenzelle { width: 26%; min-width: 70px; vertical-align: middle; }
.chip { display: inline-block; font-size: 12px; padding: 1px 8px; border-radius: 999px; border: 1px solid var(--rand); color: var(--tinte-2); white-space: nowrap; background: var(--karte); }
.chip.prio-hoch { border-color: var(--schlecht-mark); color: var(--schlecht); } .chip.prio-mittel { border-color: var(--knapp-mark); color: var(--knapp); }
.chip.ok { border-color: var(--gut-mark); color: var(--gut); }
.positionen { color: var(--tinte-2); font-size: 13px; }
details.tabelle-umschalter summary { cursor: pointer; color: var(--tinte-3); font-size: 12.5px; margin-top: 10px; list-style: none; }
details.tabelle-umschalter summary::-webkit-details-marker { display: none; }
details.tabelle-umschalter summary::before { content: "▸ "; }
details.tabelle-umschalter[open] summary::before { content: "▾ "; }

/* ---------- Hinweise ---------- */
.hinweis { border: 1px solid var(--rand); border-radius: 12px; padding: 10px 14px; background: var(--karte); font-size: 14px; margin-bottom: 16px; display: flex; gap: 10px; align-items: center; }
.hinweis.warn { border-color: var(--knapp-mark); } .hinweis.ok { border-color: var(--gut-mark); }
.hinweis .icon { font-weight: 700; }
.leer { color: var(--tinte-3); text-align: center; padding: 26px 10px; font-size: 14px; }
.cta { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; padding: 6px 0; }
.cta p { color: var(--tinte-2); font-size: 14px; }

.hinweisliste { list-style: none; margin: 0; padding: 0; }
.hinweisliste li { display: grid; grid-template-columns: 24px 1fr auto; gap: 11px; align-items: start; padding: 11px 0; border-bottom: 1px solid var(--linie); }
.hinweisliste li:first-child { padding-top: 2px; } .hinweisliste li:last-child { border-bottom: 0; padding-bottom: 0; }
.hinweisliste b { font-weight: 620; }
.hinweisliste p { margin-top: 1px; color: var(--tinte-2); font-size: 13.5px; }
.stufe { width: 22px; height: 22px; border-radius: 50%; display: inline-grid; place-items: center; font-size: 12px; font-weight: 800; color: #fff; margin-top: 0; }
.stufe.warn { background: var(--schlecht-mark); } .stufe.gut { background: var(--gut-mark); } .stufe.info { background: var(--tinte-3); }
.mehr-link { color: var(--tinte-3); padding: 2px; border-radius: 6px; } .mehr-link:hover { color: var(--tinte); background: var(--hover); }
.mehr-link svg { width: 18px; height: 18px; display: block; }

/* ---------- Übersicht ---------- */
.briefing { display: grid; grid-template-columns: auto repeat(3, minmax(0, 1fr)); gap: 18px; align-items: start; background: var(--karte); border: 1px solid var(--rand);
  border-left: 4px solid var(--akzent); border-radius: var(--radius); padding: 15px 18px; margin-bottom: 16px; box-shadow: var(--schatten); }
.briefing .kopfzeile { font-size: 12.5px; color: var(--tinte-3); font-weight: 600; display: flex; flex-direction: column; gap: 2px; min-width: 92px; }
.briefing .kopfzeile svg { width: 18px; height: 18px; color: var(--akzent); }
.briefing h3 { font-size: 12.5px; color: var(--tinte-3); font-weight: 600; margin-bottom: 2px; }
.briefing p { font-size: 14px; }
.briefing .fokus p { font-weight: 600; }
.nur-mobil { display: none; }
@media (max-width: 900px) {
  .briefing { grid-template-columns: minmax(0, 1fr); gap: 10px; } .briefing .kopfzeile { flex-direction: row; align-items: center; gap: 8px; }
  .briefing .fokus { order: -1; } .briefing .kopfzeile { order: -2; }
  .briefing:not(.offen) .teil { display: none; }
  .briefing:not(.offen) .nur-mobil { display: inline-flex; margin-top: 4px; padding-left: 0; }
}

.tippliste { list-style: none; margin: 0; padding: 0; }
.tippliste li a { display: grid; grid-template-columns: 22px 1fr; gap: 2px 11px; padding: 10px 0; border-bottom: 1px solid var(--linie); text-decoration: none; }
.tippliste li:first-child a { padding-top: 2px; } .tippliste li:last-child a { border-bottom: 0; padding-bottom: 0; }
.tippliste .nr { grid-row: span 2; width: 22px; height: 22px; border-radius: 50%; background: var(--tinte); color: var(--flaeche); font-size: 12px; font-weight: 700; display: grid; place-items: center; }
.tippliste b { font-weight: 620; }
.tippliste .leise { font-size: 13px; }

.tageliste { list-style: none; margin: 0; padding: 0; }
.tageliste li { display: grid; grid-template-columns: 1fr 64px auto; gap: 8px; padding: 9px 0; border-bottom: 1px solid var(--linie); align-items: center; font-size: 14px; }
.tageliste li:first-child { padding-top: 0; } .tageliste li:last-child { border-bottom: 0; }
.tageliste li.zu { color: var(--tinte-3); }
.tageliste .chip { margin-left: 6px; }
.tageliste .r { text-align: right; }
.vorbereitung { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 20px; margin-top: 10px; font-size: 14px; }
.vorbereitung div { display: flex; justify-content: space-between; gap: 8px; border-bottom: 1px dotted var(--linie); padding-bottom: 4px; }
.vorbereitung b { white-space: nowrap; }
@media (max-width: 520px) { .vorbereitung { grid-template-columns: 1fr; } }

/* ---------- Ereignisse ---------- */
.ereignisliste { list-style: none; margin: 0; padding: 0; }
.ereignisliste li { display: grid; grid-template-columns: 112px minmax(0, 1fr) auto; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--linie); align-items: start; }
.ereignisliste li:first-child { padding-top: 0; } .ereignisliste li:last-child { border-bottom: 0; }
.ereignisliste .datum { display: flex; flex-direction: column; font-size: 14px; }
.ereignisliste .inhalt b a { text-decoration: none; } .ereignisliste .inhalt b a:hover { text-decoration: underline; }
.ereignisliste .chips { display: flex; flex-wrap: wrap; gap: 5px; margin: 5px 0 3px; }
@media (max-width: 620px) { .ereignisliste li { grid-template-columns: minmax(0, 1fr) auto; } .ereignisliste .datum { grid-column: 1 / -1; flex-direction: row; gap: 8px; } }
details.eintragen > summary { list-style: none; cursor: pointer; display: inline-flex; }
details.eintragen > summary::-webkit-details-marker { display: none; }
details.eintragen[open] > summary { margin-bottom: 8px; }
.ereignis-form label { font-weight: 560; font-size: 13.5px; display: flex; flex-direction: column; gap: 4px; margin-top: 8px !important; }
.ereignis-form label > .eingabe { width: 100%; max-width: 420px; }
.ereignis-form .formzeile label > .eingabe { width: auto; }
select.eingabe { padding: 8px 10px; border: 1px solid var(--achse); border-radius: 10px; background: var(--flaeche); color: var(--tinte); font: inherit; font-size: 15px; }
.ereignis-chip { font-size: 11.5px; padding: 0 7px; margin-left: 6px; vertical-align: 1px; }
.tageliste .ereignisse { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 4px; margin-top: -2px; }

/* ---------- Ziel-Kalender ---------- */
.kalender { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
.kalender .wt { font-size: 12px; color: var(--tinte-3); text-align: center; padding-bottom: 2px; }
.kal-tag { position: relative; border-radius: 10px; padding: 7px 8px 8px; min-height: 62px; background: var(--karte-2); border: 1px solid transparent; text-decoration: none; color: inherit;
  display: flex; flex-direction: column; justify-content: space-between; min-width: 0; }
a.kal-tag:hover { border-color: var(--achse); }
.kal-tag .nr { font-size: 12px; font-weight: 640; color: var(--tinte-2); display: flex; justify-content: space-between; }
.kal-tag .betrag { font-size: 13.5px; font-weight: 640; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kal-tag .ziel { font-size: 11px; color: var(--tinte-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kal-tag .sym { font-size: 11px; font-weight: 800; }
.kal-tag.erreicht { background: var(--gut-flaeche); } .kal-tag.erreicht .sym { color: var(--gut); }
.kal-tag.knapp { background: var(--knapp-flaeche); } .kal-tag.knapp .sym { color: var(--knapp); }
.kal-tag.verfehlt { background: var(--schlecht-flaeche); } .kal-tag.verfehlt .sym { color: var(--schlecht); }
.kal-tag.heute { background: var(--karte); border: 2px solid var(--s1); }
.kal-tag.zukunft { background: transparent; border: 1px dashed var(--linie); }
.kal-tag.zu { background: transparent; opacity: .55; }
.kal-tag.leer { background: transparent; }
.kal-tag .sonder { position: absolute; right: 6px; bottom: 6px; width: 6px; height: 6px; border-radius: 50%; background: var(--akzent); }
.kalender.kompakt .kal-tag { min-height: 46px; padding: 5px 6px; }
.kalender.kompakt .kal-tag .ziel { display: none; }
@media (max-width: 620px) { .kal-tag { min-height: 50px; padding: 5px 5px 6px; border-radius: 8px; } .kal-tag .ziel { display: none; } .kal-tag .betrag { font-size: 11.5px; } .kalender { gap: 4px; } }
.kal-legende { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 12.5px; color: var(--tinte-2); margin-top: 12px; }
.kal-legende span { display: inline-flex; align-items: center; gap: 6px; }
.kal-legende i { width: 12px; height: 12px; border-radius: 3px; display: inline-block; }

/* ---------- Diagramme ---------- */
.diagramm { position: relative; width: 100%; }
.diagramm svg { display: block; width: 100%; overflow: visible; }
.diagramm svg text { fill: var(--tinte-3); font-size: 11.5px; font-family: inherit; font-variant-numeric: tabular-nums; }
.diagramm svg text.zelle-zahl { font-size: 11px; font-weight: 650; }
.diagramm .gitter { stroke: var(--linie); stroke-width: 1; shape-rendering: crispEdges; }
.diagramm .basis { stroke: var(--achse); stroke-width: 1; shape-rendering: crispEdges; }
.diagramm .fadenkreuz { stroke: var(--achse); stroke-width: 1; }
.diagramm .jetzt-linie { stroke: var(--tinte-3); stroke-width: 1; }
.diagramm .mark-hover { opacity: .78; }
.legende { display: flex; flex-wrap: wrap; gap: 14px; font-size: 12.5px; color: var(--tinte-2); margin-bottom: 8px; }
.legende span { display: inline-flex; align-items: center; gap: 6px; }
.legende i { display: inline-block; width: 14px; height: 2px; border-radius: 1px; }
.legende i.flaeche { width: 10px; height: 10px; border-radius: 2px; }
.legende i.strich { width: 14px; height: 0; border-top: 2px dashed; background: none !important; }
.tooltip { position: absolute; pointer-events: none; background: var(--karte); border: 1px solid var(--rand); border-radius: 10px; padding: 8px 10px;
  font-size: 12.5px; box-shadow: 0 8px 24px rgba(0,0,0,.14); z-index: 5; min-width: 120px; opacity: 0; transition: opacity .08s; white-space: nowrap; }
.tooltip.an { opacity: 1; }
.tooltip .tt-kopf { color: var(--tinte-3); margin-bottom: 4px; }
.tooltip .tt-zeile { display: flex; align-items: center; gap: 8px; }
.tooltip .tt-zeile i { width: 12px; height: 2px; border-radius: 1px; display: inline-block; flex: none; }
.tooltip .tt-zeile b { font-weight: 660; color: var(--tinte); font-variant-numeric: tabular-nums; }
.tooltip .tt-zeile span { color: var(--tinte-2); }
.skala { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--tinte-3); margin-top: 10px; }
.skala .stufen { display: flex; gap: 2px; }
.skala .stufen i { width: 18px; height: 10px; border-radius: 2px; display: inline-block; }

/* Besetzung je Stunde */
.besetzung { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 4px; margin-top: 12px; }
.besetzung div { text-align: center; border-radius: 8px; padding: 6px 2px; background: var(--karte-2); font-size: 12px; color: var(--tinte-3); }
.besetzung div b { display: block; font-size: 15px; color: var(--tinte); }
.besetzung div.spitze { background: var(--seq-1); } .besetzung div.spitze b { color: var(--tinte); }

/* ---------- KI-Berater ---------- */
.fliesstext p { margin: 0 0 8px; } .fliesstext p:last-child { margin: 0; }
.fliesstext ul, .nachricht ul { margin: 4px 0 8px; padding-left: 20px; }
.kennzahl-box { margin-top: 14px; background: var(--karte-2); border-radius: 12px; padding: 12px 14px; }
.kennzahl-box .lab { font-size: 13px; color: var(--tinte-2); } .kennzahl-box .wert { font-size: 22px; font-weight: 660; margin: 2px 0 4px; }
.kennzahl-box p { font-size: 14px; color: var(--tinte-2); }
.tipp header { display: flex; gap: 12px; align-items: flex-start; }
.tipp .nr { flex: none; width: 28px; height: 28px; border-radius: 50%; background: var(--tinte); color: var(--flaeche); display: grid; place-items: center; font-weight: 700; font-size: 14px; }
.tipp h2 { font-size: 16px; margin-bottom: 6px; }
.tipp .chips { display: flex; flex-wrap: wrap; gap: 6px; }
.tipp dl { margin: 14px 0 0; display: grid; grid-template-columns: 132px 1fr; gap: 9px 14px; font-size: 14.5px; }
.tipp dt { color: var(--tinte-3); font-size: 13px; padding-top: 1px; }
.tipp dd { margin: 0; }
.tipp dd.wirkung { font-weight: 600; }
@media (max-width: 600px) { .tipp dl { grid-template-columns: 1fr; gap: 2px; } .tipp dd { margin-bottom: 8px; } }
.tipp footer { display: flex; gap: 8px; margin-top: 14px; flex-wrap: wrap; }
.tipp.status-erledigt, .tipp.status-verworfen { opacity: .6; }
.liste-schlicht { margin: 8px 0 0; padding-left: 18px; font-size: 14px; } .liste-schlicht li { margin-bottom: 8px; }
.frage-box > p { margin-top: 6px; }
.notiz-form { display: flex; flex-direction: column; gap: 8px; margin-top: 12px; align-items: flex-start; }
textarea { width: 100%; border: 1px solid var(--achse); border-radius: 10px; padding: 9px 11px; font: inherit; font-size: 15px; background: var(--flaeche); color: var(--tinte); resize: vertical; }
.chat-verlauf { display: flex; flex-direction: column; gap: 10px; max-height: 540px; overflow-y: auto; margin-bottom: 10px; }
.chat-verlauf:empty { display: none; }
.nachricht { padding: 10px 12px; border-radius: 12px; font-size: 14.5px; max-width: 94%; }
.nachricht p { margin: 0 0 6px; } .nachricht p:last-child { margin: 0; }
.nachricht.user { align-self: flex-end; background: var(--tinte); color: var(--flaeche); border-bottom-right-radius: 4px; }
.nachricht.assistant { align-self: flex-start; background: var(--karte-2); border-bottom-left-radius: 4px; }
.nachricht.laedt { color: var(--tinte-3); display: flex; align-items: center; gap: 8px; }
.nachricht.fehler { border: 1px solid var(--schlecht-mark); color: var(--schlecht); }
.vorschlaege { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.chip-btn { font: inherit; font-size: 13px; border: 1px solid var(--rand); background: var(--karte-2); color: var(--tinte-2); border-radius: 999px; padding: 5px 11px; cursor: pointer; text-align: left; }
.chip-btn:hover { color: var(--tinte); border-color: var(--achse); }
.chat-eingabe { display: flex; gap: 8px; align-items: flex-end; }
.chat-eingabe textarea { flex: 1; min-height: 44px; font-size: 16px; }
.chat-eingabe .btn { height: 44px; }
.lader { width: 14px; height: 14px; border-radius: 50%; border: 2px solid var(--linie); border-top-color: var(--s1); animation: drehen .8s linear infinite; flex: none; }
@keyframes drehen { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .lader { animation-duration: 3s; } }
.kosten-wert { margin-top: 10px; } .kosten-wert b { font-size: 24px; letter-spacing: -0.01em; }
.wirkung-tabelle td:first-child { color: var(--tinte-2); }

/* ---------- Ergebnis, Matrix, Simulator ---------- */
.ergebnis-zeile { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; }
.ergebnis-zeile div { display: flex; flex-direction: column; gap: 2px; }
.ergebnis-zeile .lab { font-size: 12.5px; color: var(--tinte-3); }
.ergebnis-zeile b { font-size: 19px; font-weight: 640; }
.ergebnis-zeile .summe { border-left: 1px solid var(--linie); padding-left: 14px; }
.ergebnis-zeile .summe b { font-size: 24px; } .ergebnis-zeile b.gut { color: var(--gut); } .ergebnis-zeile b.schlecht { color: var(--schlecht); }
.ergebnis-zeile small { color: var(--tinte-3); }
@media (max-width: 760px) { .ergebnis-zeile { grid-template-columns: 1fr 1fr; } .ergebnis-zeile .summe { border-left: 0; padding-left: 0; grid-column: span 2; border-top: 1px solid var(--linie); padding-top: 8px; } }
.matrix { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.matrix > div { border-radius: 12px; padding: 13px 15px; background: var(--karte-2); border-top: 3px solid; }
.matrix ul { margin: 8px 0 0; padding: 0; list-style: none; font-size: 14px; }
.matrix li { padding: 3px 0; display: flex; justify-content: space-between; gap: 8px; }
.matrix li a { text-decoration: none; } .matrix li a:hover { text-decoration: underline; }
.matrix .feld-star { border-color: var(--gut-mark); } .matrix .feld-renner { border-color: var(--s1); }
.matrix .feld-raetsel { border-color: var(--knapp-mark); } .matrix .feld-penner { border-color: var(--schlecht-mark); }
@media (max-width: 700px) { .matrix { grid-template-columns: 1fr; } }
.simulator { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr); gap: 20px; align-items: start; }
.simulator label { display: block; font-size: 13.5px; font-weight: 560; margin-bottom: 12px; }
.simulator label small { display: block; font-weight: 400; color: var(--tinte-3); }
.simulator input[type=range] { width: 100%; accent-color: var(--s1); }
.simulator output { font-weight: 660; }
@media (max-width: 760px) { .simulator { grid-template-columns: 1fr; } }

/* ---------- Formulare (Ziele, Einstellungen) ---------- */
.formular label { display: block; margin-top: 14px; font-weight: 560; font-size: 14px; }
.formular label:first-of-type { margin-top: 4px; }
.formular label small { display: block; font-weight: 400; color: var(--tinte-3); font-size: 12.5px; margin-top: 1px; }
.feld { display: flex; align-items: center; gap: 6px; margin-top: 6px; max-width: 260px; }
.feld input { flex: 1; min-width: 0; }
.formular input:not([type=checkbox]):not([type=radio]):not([type=range]), .eingabe { border: 1px solid var(--achse); border-radius: 10px; padding: 8px 10px; font: inherit; font-size: 16px;
  background: var(--flaeche); color: var(--tinte); }
.feld i { font-style: normal; color: var(--tinte-3); }
label.haken { display: flex !important; gap: 8px; align-items: center; font-weight: 500 !important; }
.wahl { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 8px; }
.wahl label { margin: 0 !important; border: 1px solid var(--rand); border-radius: 12px; padding: 11px 13px; cursor: pointer; font-weight: 400 !important; display: flex !important; gap: 9px; align-items: flex-start; }
.wahl label b { display: block; font-weight: 620; }
.wahl label:has(input:checked) { border-color: var(--tinte); background: var(--karte-2); }
.wahl input { margin-top: 3px; }
@media (max-width: 620px) { .wahl { grid-template-columns: 1fr; } }
.formzeile { display: flex; gap: 8px; flex-wrap: wrap; align-items: flex-end; margin-top: 10px; }
.formzeile > * { flex: 0 1 auto; }
.formzeile input.eingabe { width: 140px; } .formzeile input.eingabe.breit { width: 220px; }
.kostentabelle input, .zieltabelle input { width: 96px; text-align: right; padding: 5px 8px !important; font-size: 14px !important; }
.speichern-leiste { position: sticky; bottom: 0; padding: 14px 0; background: linear-gradient(transparent, var(--flaeche) 35%); display: flex; justify-content: flex-end; z-index: 5; }
@media (max-width: 1100px) { .speichern-leiste { bottom: calc(60px + env(safe-area-inset-bottom)); } }
.mehr-liste { padding: 4px 0; } .mehr-liste a { display: flex; align-items: center; gap: 12px; padding: 14px 18px; text-decoration: none; border-bottom: 1px solid var(--linie); }
.mehr-liste a:last-child { border-bottom: 0; } .mehr-liste a > svg { width: 22px; height: 22px; color: var(--tinte-2); flex: none; }
.mehr-liste span { flex: 1; display: flex; flex-direction: column; } .mehr-liste small { color: var(--tinte-3); }

/* Login */
.login-seite { min-height: 100vh; display: grid; place-items: center; padding: 16px; }
.login { width: 100%; max-width: 360px; background: var(--karte); border: 1px solid var(--rand); border-radius: 20px; padding: 30px 24px; box-shadow: var(--schatten); }
.login .marke { justify-content: center; font-size: 18px; margin-bottom: 20px; }
.login label { display: block; font-size: 13px; color: var(--tinte-2); margin: 12px 0 4px; }
.login input { width: 100%; padding: 11px 12px; border-radius: 11px; border: 1px solid var(--achse); background: var(--flaeche); color: var(--tinte); font: inherit; font-size: 16px; }
.login .btn { width: 100%; margin-top: 18px; padding: 11px; font-size: 15px; }
.fehler { color: var(--schlecht); font-size: 14px; margin: 0 0 6px; }

@media (max-width: 600px) {
  .nur-breit, .balkenzelle { display: none; }
  /* Tippflächen: mindestens ~36 px */
  .btn.klein { min-height: 36px; padding: 6px 12px; }
  .filter a { padding: 8px 13px; }
  .filterchips button { padding: 7px 13px; }
  .mehr-link { padding: 8px; margin: -6px; }
  td a { display: inline-block; padding: 3px 0; }
  .kostentabelle input, .zieltabelle input { width: 78px; }
  table { font-size: 13.5px; }
  td, th { padding: 7px 5px; }
  .positionen { font-size: 12.5px; }
}
@media print { .kopf, .mobilnav, .filter, .tagnav, .aktionen { display: none; } main { padding: 0; } .karte, .kachel, .held { break-inside: avoid; box-shadow: none; } }
