:root {
  --bg: #000000;
  --card: #151513;
  --card2: #1F1F1C;
  --line: #2E2E2A;
  --text: #FFFFFF;
  --muted: #A3A29B;
  --faint: #6B6A63;
  --lime: #C6FF3A;   /* Markenfarbe. War #c8f542 — ein eigenes Gruen. */
  --danger: #FF4D4D;
}

* { box-sizing: border-box; }

body {
  background: var(--bg);
  color: var(--text);
  font: 14px/1.5 -apple-system, BlinkMacSystemFont, sans-serif;
  margin: 0;
}

.wrap { max-width: 1000px; margin: 0 auto; padding: 22px 18px 70px; }
.topbar { display: flex; align-items: center; gap: 12px; margin-bottom: 20px; }
.topbar.compact { margin-bottom: 16px; }
.topbar h1 { font-weight: 900; letter-spacing: 1.6px; font-size: 18px; margin: 0; white-space: nowrap; }
.topbar h1 span { color: var(--lime); }
.topbar .spacer { flex: 1; }
.profile-menu { position: relative; }

.logo {
  width: 38px;
  height: 38px;
  border-radius: 11px;
  background: var(--lime);
  display: flex;
  align-items: center;
  justify-content: center;
  flex: none;
}

.avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--card2);
  border: 1px solid var(--line);
  color: var(--text);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  cursor: pointer;
  position: relative;
  padding: 0;
}

.avatar:hover { background: var(--card2); }

.menu {
  position: absolute;
  top: 46px;
  right: 0;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 8px;
  min-width: 220px;
  z-index: 20;
  box-shadow: 0 12px 40px rgba(0, 0, 0, .5);
}

.menu .mi { padding: 9px 12px; font-size: 13px; color: var(--muted); }
.menu button {
  width: 100%;
  text-align: left;
  background: none;
  color: var(--text);
  border: none;
  padding: 9px 12px;
  border-radius: 9px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}
.menu button:hover { background: var(--card2); }

h2 {
  font-size: 11px;
  letter-spacing: 1.5px;
  color: var(--muted);
  text-transform: uppercase;
  margin: 24px 0 9px;
}

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  overflow: hidden;
}

.card.pad { padding: 16px; }
.card.pad-sm { padding: 14px; }
.stack-gap { margin-bottom: 14px; }
.stack-gap-lg { margin-bottom: 18px; }
.space-top { margin-top: 10px; }
.space-top-lg { margin-top: 12px; }

table { border-collapse: collapse; width: 100%; }
th,
td {
  text-align: left;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
  font-size: 13px;
}
th {
  font-size: 10px;
  letter-spacing: 1px;
  color: var(--muted);
  text-transform: uppercase;
}
tr:last-child td { border-bottom: none; }

/* Lange Listen (Activity log, Waitlist) scrollen in sich, statt die Seite endlos
   wachsen zu lassen — sonst rutscht alles darunter aus dem Blick. Der Kopf bleibt
   beim Scrollen stehen, damit die Spalten zuordenbar bleiben. */
.tablescroll {
  max-height: 46vh;
  overflow-y: auto;
}
.tablescroll thead th {
  position: sticky;
  top: 0;
  background: var(--card);
  z-index: 1;
}
tr.click { cursor: pointer; }
tr.click:hover,
tr.click:focus { background: var(--card2); outline: none; }

.muted { color: var(--muted); font-size: 12px; }
.faint { color: var(--faint); font-size: 11px; }
.nowrap { white-space: nowrap; }
.center { text-align: center; }
.break-all { word-break: break-all; }

.pill {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 99px;
  font-size: 11px;
  font-weight: 700;
  background: #22272f;
  color: var(--muted);
}
.pill.ok { color: #0b0d10; background: var(--lime); }
.pill.warn { color: #f5c542; background: rgba(245, 197, 66, .14); }
.pill.bad { color: var(--danger); background: rgba(255, 95, 86, .14); }

input,
select,
textarea {
  background: var(--card2);
  border: 1px solid var(--line);
  border-radius: 11px;
  color: var(--text);
  padding: 11px 13px;
  font-size: 14px;
  width: 100%;
  font-family: inherit;
}

textarea { min-height: 90px; resize: vertical; }
button {
  background: #fff;
  color: #000;
  border: none;
  border-radius: 99px;
  padding: 10px 18px;
  font-weight: 800;
  font-size: 13px;
  cursor: pointer;
}
button.ghost { background: var(--card2); color: var(--text); border: 1px solid var(--line); }
button.danger { background: transparent; color: var(--danger); border: 1px solid rgba(255, 95, 86, .5); }
button:disabled { opacity: .4; cursor: default; }
.full { width: 100%; }


/* ═══ Anmeldung zum Control ══════════════════════════════════════════════════
   Nach Apples Muster fuer Anmeldeblaetter gebaut, nicht nach Web-Gewohnheit:
     · Felder als EINE gruppierte Flaeche mit Haarlinie dazwischen — so wie in
       den iOS-Einstellungen. Zwei getrennte Kaesten sind ein Web-Reflex.
     · Kein Glas, kein Schein, keine Neon-Kante. Eine ruhige, leicht erhoehte
       Flaeche auf Schwarz.
     · Ein gefuellter Knopf in voller Breite. Apple macht die Hauptaktion
       deutlich, nicht dezent — Zurueckhaltung waere hier Unsicherheit.
     · Nur das Zeichen oben. Kein Titel: wer hier landet, weiss, wo er ist. */
.login {
  max-width: 320px;
  margin: 15vh auto 0;
  padding: 34px 26px 26px;
  border-radius: 20px;
  background: #161614;
  border: 1px solid rgba(255,255,255,.08);
}
.gate-head { text-align: center; margin-bottom: 28px; }
.gate-icon { width: 64px; height: 64px; border-radius: 23%; margin: 0 auto; display: block; }

.field-group {
  border-radius: 12px;
  background: rgba(255,255,255,.055);
  overflow: hidden;
  margin-bottom: 18px;
}
.field-group input {
  width: 100%;
  margin: 0;
  border: none;
  border-radius: 0;
  background: transparent;
  padding: 14px 15px;
  font-size: 16px;              /* 16px verhindert das Zoomen auf iOS */
  letter-spacing: -.01em;
}
/* Haarlinie zwischen den Feldern, links eingerueckt — Apples Trennerfuehrung. */
.field-group input + input {
  box-shadow: inset 0 1px 0 rgba(255,255,255,.09);
}
.field-group input:focus { outline: none; background: rgba(255,255,255,.03); }

.login button.full {
  width: 100%;
  border-radius: 12px;
  padding: 14px;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -.01em;
  background: #fff;
  color: #000;
  transition: opacity .18s ease;
}
.login button.full:hover:not([disabled]) { opacity: .88; }

/* Zweitrangige Aktionen bleiben zurueckhaltend. `.login button.full` faerbte auch
   „Sign out" und „Cancel" weiss — zwei gleich laute Bloecke direkt uebereinander,
   ohne Abstand. Apple setzt genau eine betonte Aktion pro Blatt. */
.login button.full + button.full { margin-top: 10px; }
.login button.full.ghost {
  background: transparent;
  color: var(--muted);
  border: 1px solid rgba(255,255,255,.10);
  font-weight: 500;
}
.login button.full.ghost:hover:not([disabled]) {
  background: rgba(255,255,255,.06);
  color: var(--text);
  opacity: 1;
}
.login button.full[disabled] { opacity: .45; cursor: default; }
.login .muted { font-size: 13px; letter-spacing: -.005em; }

}

.admin-policy p + p { margin-top: 8px; }
.control-legal { display:flex; justify-content:center; flex-wrap:wrap; gap:8px 16px; padding:28px 20px 36px; font-size:12px; }
.control-legal a { color:var(--muted); text-decoration:none; }
.control-legal a:hover { color:var(--text); }
.err { color: var(--danger); font-size: 12px; margin-top: 8px; }
.row { display: flex; gap: 9px; align-items: center; flex-wrap: wrap; }
.row.between { justify-content: space-between; }
.row.tight { gap: 8px; }
.back {
  color: var(--lime);
  cursor: pointer;
  font-weight: 700;
  font-size: 13px;
  margin-bottom: 16px;
  display: inline-block;
  padding: 0;
  border: 0;
  background: transparent;
}
.hidden { display: none !important; }

/* Ladezustand zwischen Anmeldung und Board (#booting). */
#booting { display: flex; flex-direction: column; align-items: center; gap: 14px; }
.spinner {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 2px solid var(--line);
  border-top-color: var(--lime);
  animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
/* Wer Bewegung reduziert haben will, bekommt einen ruhigen Punkt statt Rotation. */
@media (prefers-reduced-motion: reduce) {
  .spinner { animation: none; border-top-color: var(--line); background: var(--lime); }
}

.tabs { display: flex; gap: 8px; margin-bottom: 16px; flex-wrap: wrap; }
.tab {
  padding: 9px 17px;
  border-radius: 99px;
  background: var(--card2);
  border: 1px solid var(--line);
  color: var(--muted);
  font-weight: 800;
  font-size: 13px;
  cursor: pointer;
}
.tab.active { background: #fff; color: #000; border-color: #fff; }
.subtabs { display: flex; gap: 7px; margin-bottom: 14px; }
.subtab {
  padding: 6px 14px;
  border-radius: 99px;
  background: transparent;
  border: 1px solid var(--line);
  color: var(--muted);
  font-weight: 700;
  font-size: 12px;
  cursor: pointer;
}
.subtab.active { background: var(--card2); color: var(--text); border-color: var(--faint); }

.toast {
  position: fixed;
  bottom: 22px;
  left: 50%;
  transform: translateX(-50%);
  background: #fff;
  color: #000;
  font-weight: 800;
  padding: 11px 22px;
  border-radius: 99px;
  font-size: 13px;
  opacity: 0;
  transition: opacity .25s;
  pointer-events: none;
  z-index: 50;
}
.toast.show { opacity: 1; }

.statgrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; }
.stat { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 18px; }
.stat .n { font-size: 30px; font-weight: 900; letter-spacing: -1px; }
/* Schweregrad, nicht Marke: dieselbe Abstufung wie .pill im Attention-Block. */
.stat .n.warn { color: #f5c542; }
.stat .n.bad { color: var(--danger); }
.stat .l { font-size: 11px; letter-spacing: 1px; color: var(--muted); text-transform: uppercase; margin-top: 2px; }
/* Bezugswert: ohne ihn ist die Zahl darüber nicht einzuordnen. */
.stat .d { font-size: 11px; color: var(--muted); margin-top: 6px; }

/* ————— Activity-Charts ————— */
.acthead { display: flex; align-items: center; gap: 12px; }
.acthead h2 { flex: 1; }
.actctl { display: flex; align-items: center; gap: 8px; }
.seg { display: flex; border: 1px solid var(--line); border-radius: 9px; overflow: hidden; }
.segbtn {
  background: none; border: 0; color: var(--muted); font: inherit; font-size: 12px;
  padding: 5px 10px; cursor: pointer;
}
.segbtn.on { background: var(--card2); color: var(--text); }
.ghost.sm { font-size: 12px; padding: 5px 10px; }
.ghost.sm.on { background: var(--card2); color: var(--text); }

.chartgrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 12px; }
.chartgrid.astable { display: block; }
.chart { position: relative; padding: 16px 18px 12px; }
.charthead { display: flex; align-items: baseline; gap: 8px; margin-bottom: 10px; }
.charttitle {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 11px; letter-spacing: 1px; color: var(--muted); text-transform: uppercase;
}
.swatch { width: 8px; height: 8px; border-radius: 2px; flex: none; }
/* Leitzahl in derselben Schrift wie alles andere, proportionale Ziffern. */
.charttotal { font-size: 22px; font-weight: 900; letter-spacing: -0.5px; margin-left: auto; }
.chartsub { font-size: 11px; color: var(--faint); }
.chartsvg { width: 100%; height: auto; aspect-ratio: 460 / 130; display: block; overflow: visible; }
/* Achse als Haarlinie, eine Stufe von der Fläche abgesetzt. Nie gestrichelt. */
.axisline { stroke: var(--line); stroke-width: 1; }
.tick { fill: var(--faint); font-size: 9px; font-family: inherit; }
.peaklabel { fill: var(--muted); font-size: 10px; font-family: inherit; font-weight: 700; }
.hit { fill: transparent; cursor: default; }
.hit:hover, .hit:focus { fill: rgba(255, 255, 255, .04); outline: none; }
.chartempty { font-size: 11px; margin-top: 6px; }
.charttip {
  position: absolute; transform: translate(-50%, -100%);
  background: var(--card2); border: 1px solid var(--line); border-radius: 8px;
  padding: 5px 9px; font-size: 11px; white-space: nowrap; pointer-events: none; z-index: 5;
}
.num { text-align: right; font-variant-numeric: tabular-nums; }

/* Stand der Daten neben dem Aktualisieren-Knopf. */
.loadedat { font-size: 11px; color: var(--muted); margin-right: 10px; white-space: nowrap; }
.loadedat.stale { color: #f5c542; }

.dhead { display: flex; align-items: center; gap: 14px; margin-bottom: 6px; }
.dhead .av,
.avatar-image {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  border: 1px solid var(--line);
  flex: none;
}
.dhead .av {
  background: var(--card2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  font-weight: 900;
  color: var(--muted);
}
.avatar-image { object-fit: cover; }
.dhead .nm { font-size: 22px; font-weight: 900; }

.inforow { display: flex; justify-content: space-between; gap: 14px; padding: 12px 14px; border-bottom: 1px solid var(--line); }
.inforow:last-child { border-bottom: none; }
.inforow.click { cursor: pointer; }
.inforow.click:hover,
.inforow.click:focus { background: var(--card2); outline: none; }
.inforow .k { color: var(--muted); font-size: 12px; }
.inforow .v { font-weight: 600; text-align: right; word-break: break-all; }

.act { padding: 14px; border-bottom: 1px solid var(--line); }
.act:last-child { border-bottom: none; }
.act .lbl { font-size: 12px; color: var(--muted); margin-bottom: 7px; }
.act .cur { color: var(--faint); font-size: 11px; }
.act .form { display: flex; gap: 9px; margin-top: 8px; }
.act .form input { flex: 1; }

.bubble { background: var(--card2); border-radius: 14px; padding: 14px; margin-bottom: 12px; }
.bubble.reply { border-left: 3px solid var(--lime); }
.thread { max-height: 52vh; overflow-y: auto; padding: 6px 2px; margin-bottom: 6px; }
.thread.card { padding: 12px; }
.mrow { display: flex; margin-bottom: 5px; }
.mrow.team { justify-content: flex-end; }
.msg {
  max-width: 62%;
  background: #1d2127;
  border-radius: 16px;
  padding: 9px 13px;
  font-size: 13px;
  line-height: 1.45;
  word-break: break-word;
}
.mrow.team .msg { background: #fff; color: #0b0d10; }
.mmeta { display: block; font-size: 10px; color: var(--faint); margin-top: 3px; }
.mrow.team .mmeta { color: #8a919c; }
button.mdel {
  background: none;
  border: 0;
  border-radius: 0;
  color: var(--danger);
  cursor: pointer;
  font-size: 10px;
  opacity: 0;
  padding: 0;
  transition: opacity .15s;
  text-decoration: none;
}
.msg:hover .mdel,
.msg:focus-within .mdel { opacity: 1; }
.daychip { text-align: center; margin: 10px 0 8px; }
.daychip span { font-size: 10px; color: var(--muted); background: var(--card2); border-radius: 99px; padding: 3px 12px; }

.media-link {
  display: inline-flex;
  width: 52px;
  height: 52px;
  border-radius: 9px;
  align-items: center;
  justify-content: center;
  background: var(--card2);
  color: var(--text);
  text-decoration: none;
  font-weight: 800;
  overflow: hidden;
}
.media-thumb { width: 52px; height: 52px; object-fit: cover; }
.media-cell { width: 60px; }
.search { max-width: 380px; margin-bottom: 14px; }
.state-pad { padding: 20px; }
.inline-link { color: var(--lime); text-decoration: none; margin-left: 8px; }

@media (max-width: 680px) {
  .wrap { padding-inline: 12px; }
  .topbar h1 { font-size: 13px; letter-spacing: .8px; }
  .topbar { gap: 8px; }
  .card { overflow-x: auto; }
  th,
  td { padding: 10px; }
  .msg { max-width: 86%; }
  .act .form { flex-direction: column; }
}


/* ═══ Gemeldeter Beitrag im Fall ═════════════════════════════════════════════
   Ruhige Glasflaeche, kein Neon. Der Inhalt soll wirken, nicht der Rahmen. */
.post-preview {
  margin-top: 18px;
  padding: 18px 20px;
  border-radius: 16px;
  background: rgba(255,255,255,.045);
  border: 1px solid rgba(255,255,255,.08);
  -webkit-backdrop-filter: blur(20px) saturate(1.4);
  backdrop-filter: blur(20px) saturate(1.4);
}
.post-preview-head { font-size: 14px; margin-bottom: 10px; }
.post-preview-text {
  margin: 0 0 14px; font-size: 15px; line-height: 1.55; color: var(--text);
  white-space: pre-wrap; word-break: break-word;
}
.post-preview-media { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; }
.post-preview-media img {
  height: 190px; width: auto; border-radius: 12px; flex: none;
  background: var(--card2); object-fit: cover;
}
.post-preview-stats {
  display: flex; flex-wrap: wrap; gap: 8px 18px; margin-top: 14px;
  font-size: 11.5px; letter-spacing: .04em; color: var(--muted);
}

/* ═══ Weniger Neon, mehr Glas ════════════════════════════════════════════════
   Lime war ueber das ganze Board verteilt — Ueberschriften, Zaehler, Raender.
   Zwanzig kleine Akzente ergeben kein Signal, sondern Unruhe. Lime bleibt dem
   Logo und dem einen wichtigen Wert pro Ansicht; alles andere traegt Glas. */
.card {
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(255,255,255,.07);
  -webkit-backdrop-filter: blur(24px) saturate(1.4);
  backdrop-filter: blur(24px) saturate(1.4);
}
.pill, .tag { -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); }
button.ghost {
  background: rgba(255,255,255,.07);
  border: 1px solid rgba(255,255,255,.10);
  color: var(--text);
  -webkit-backdrop-filter: blur(18px); backdrop-filter: blur(18px);
}
button.ghost:hover { background: rgba(255,255,255,.12); }

/* Flaechendiagramm: duenne Linie, weicher Verlauf, betonter Endpunkt. */
.chartline { fill: none; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.chartdot { stroke: var(--bg); stroke-width: 2; }

/* Dringlichkeit in der Fallliste — alte Faelle stehen oben und tragen eine Marke. */
.case-urgent td { background: rgba(255,77,77,.05); }
.case-expired td { opacity: .58; }


/* ═══ Glasoptik im Dashboard ═════════════════════════════════════════════════
   Minimalistisch, aber vollstaendig: es verschwindet keine Information, nur der
   Rahmen tritt zurueck. Flaechen statt Kaesten, Haarlinien statt Raender,
   Zahlen tragen die Ansicht — nicht die Umrandung.
   Bewusst NICHT: farbige Kachelhintergruende, Schlagschatten, Neon-Kanten. */

.stat {
  background: rgba(255,255,255,.045);
  border: 1px solid rgba(255,255,255,.07);
  border-radius: 18px;
  padding: 20px;
  -webkit-backdrop-filter: blur(22px) saturate(1.4);
  backdrop-filter: blur(22px) saturate(1.4);
  transition: background .22s cubic-bezier(.32,.72,0,1);
}
.stat:hover { background: rgba(255,255,255,.07); }
/* Enger gesetzte Zahl, wie in der App. Weniger Gewicht, mehr Ruhe. */
.stat .n { font-size: 32px; font-weight: 800; letter-spacing: -.025em; }
.stat .l {
  font-size: 10px; letter-spacing: .18em; text-transform: uppercase;
  color: var(--faint); margin-top: 6px; font-weight: 700;
}
.stat .d { font-size: 11.5px; color: var(--muted); margin-top: 8px; }

/* Pillen: Glas statt gefuellter Blöcke. Der Farbton bleibt als Signal erhalten. */
.pill {
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.09);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  font-weight: 600; letter-spacing: .01em; padding: 4px 11px;
}
.pill.ok { color: var(--lime); background: rgba(198,255,58,.12); border-color: rgba(198,255,58,.24); }
.pill.warn { color: #f5c542; background: rgba(245,197,66,.11); border-color: rgba(245,197,66,.22); }
.pill.bad { color: var(--danger); background: rgba(255,77,77,.11); border-color: rgba(255,77,77,.22); }

/* Eingaben: Flaeche statt Kasten. */
input, select, textarea {
  background: rgba(255,255,255,.05);
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 12px;
  transition: border-color .18s ease, background .18s ease;
}
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: rgba(255,255,255,.26);
  background: rgba(255,255,255,.07);
}

/* Tabellen: Haarlinien statt Rahmen, Zeilen heben sich beim Ueberfahren. */
table th {
  font-size: 10px; letter-spacing: .18em; text-transform: uppercase;
  color: var(--faint); font-weight: 700;
  border-bottom: 1px solid rgba(255,255,255,.09);
}
table td { border-bottom: 1px solid rgba(255,255,255,.05); }
tbody tr { transition: background .16s ease; }
tbody tr:hover td { background: rgba(255,255,255,.035); }

/* Achsen fast unsichtbar — die Flaeche traegt das Diagramm. */
.axisline { stroke: rgba(255,255,255,.10); }
.tick { fill: var(--faint); }
.peaklabel { fill: var(--muted); font-weight: 600; }


/* ═══ Am Telefon ═════════════════════════════════════════════════════════════
   Pitch Control lief bisher faktisch nur am Rechner: Tabellen liefen aus dem
   Bild, die Kopfzeile brach um, Tippziele waren zu klein. Ein Kontrollzentrum,
   das man unterwegs nicht bedienen kann, wird unterwegs nicht bedient — und
   genau dann bleiben Faelle liegen. */
@media (max-width: 680px) {
  .wrap { padding-inline: 14px; }

  /* Anmeldung: volle Breite statt Kaertchen in der Mitte. */
  .login { max-width: none; margin: 8vh 14px 0; padding: 30px 22px 24px; border-radius: 22px; }
  .gate-icon { width: 58px; height: 58px; }

  /* Kopfzeile: Marke schrumpft, Bedienelemente behalten ihre Groesse. */
  .topbar { flex-wrap: wrap; row-gap: 10px; }
  .topbar h1 { font-size: 12.5px; letter-spacing: .06em; }
  .topbar .logo { width: 30px; height: 30px; }

  /* Reiter scrollen seitlich, statt zu stapeln. */
  .tabs { display: flex; overflow-x: auto; gap: 6px; scrollbar-width: none; }
  .tabs::-webkit-scrollbar { display: none; }
  .tabs > * { flex: none; }

  /* Tabellen: waagerecht scrollen statt die Seite zu sprengen. Der Rahmen
     bekommt den Scroll, nicht der Body. */
  .card { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  table { min-width: 520px; }
  th, td { padding: 11px 12px; font-size: 13px; }

  /* Kennzahlen zweispaltig — einspaltig waere eine endlose Kolonne. */
  .statgrid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .stat { padding: 16px; }
  .stat .n { font-size: 26px; }

  .chartgrid { grid-template-columns: 1fr; }

  /* Tippziele: Apple nennt 44 pt als Mindestmass. Darunter trifft man daneben. */
  button, .tabs > * { min-height: 44px; }
  button.ghost, .pill { min-height: 0; }

  /* Eingaben nie unter 16 px — sonst zoomt iOS beim Antippen in die Seite. */
  input, select, textarea { font-size: 16px; }

  .msg { max-width: 88%; }
  .act .form { flex-direction: column; align-items: stretch; }
  .row { gap: 8px; }
  .post-preview { padding: 15px 16px; }
  .post-preview-media img { height: 150px; }
}

/* Erst unter 340 px einspaltig: auf 375-px-iPhones sollen „Needs you" und die vier
   Kennzahlen gemeinsam auf den ersten Bildschirm passen (23.09.). */
@media (max-width: 340px) {
  .statgrid { grid-template-columns: 1fr; }
}


/* ═══ Dither Kit ═════════════════════════════════════════════════════════════
   Die Diagramme sind die unveraenderten Originalkomponenten aus der shadcn-
   Registry (landing/login/charts-src/components/dither-kit/), gebuendelt zu
   /login/charts.js. Sie setzen Tailwind-Hilfsklassen voraus; statt einen
   Tailwind-Build in eine abhaengigkeitsfreie Konsole zu ziehen, sind hier
   genau die benutzten Klassen auf die Pitch-Tokens abgebildet. */
.dk-fill { width: 100%; height: 100%; }
/* Deutlich groesser als vorher. Die Diagramme sind der Inhalt, nicht die Beilage. */
.dk-chart { height: 300px; }
.dk-chart.dk-donut { height: 300px; }
.insight--half .dk-chart { height: 320px; }
.insight--wide .dk-chart { height: 380px; }

.relative { position: relative; }   /* Ohne diese drei misst der Chart-Container
.h-full { height: 100%; }              null und es wird nichts gezeichnet. */
.w-full { width: 100%; }
.absolute { position: absolute; }
.inset-0 { inset: 0; }
.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.ml-auto { margin-left: auto; }
.mb-0\.5 { margin-bottom: 2px; }
.gap-0\.5 { gap: 2px; }
.gap-1\.5 { gap: 6px; }
.pl-2 { padding-left: 8px; }
.size-2 { width: 8px; height: 8px; }
.rounded-\[1px\] { border-radius: 1px; }
.pointer-events-none { pointer-events: none; }
.overflow-visible { overflow: visible; }
.font-mono { font-family: var(--mono, ui-monospace, SFMono-Regular, Menlo, monospace); }
.tabular-nums { font-variant-numeric: tabular-nums; }
.text-\[10px\] { font-size: 10px; }
.text-\[11px\] { font-size: 11px; }
.text-foreground { color: var(--text); }
.text-muted-foreground { color: var(--muted); }
.text-popover-foreground { color: var(--text); }
.fill-current { fill: currentColor; }
.fill-muted-foreground { fill: var(--muted); }
.stroke-border { stroke: rgba(255,255,255,.09); }

/* Zwoelf Spalten statt „so viele wie passen": nur so lassen sich Kacheln gezielt
   ueber die halbe oder volle Breite ziehen. Wenige grosse Ansichten schlagen viele
   kleine — ein Trichter mit sechs Stufen ist in einer Briefmarke nicht lesbar. */
.insightgrid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 14px; }
.insightgrid > .insight { grid-column: span 4; }
.insightgrid > .insight--half { grid-column: span 6; }
.insightgrid > .insight--wide { grid-column: span 12; }
.insight h3 { font-size: 11.5px; letter-spacing: .2em; text-transform: uppercase; color: var(--text); margin: 0 0 6px; }
.insight-hint { font-size: 13px; margin-bottom: 18px; line-height: 1.5; }
.section-title { font-size: 11px; letter-spacing: .22em; text-transform: uppercase;
  color: var(--faint); font-weight: 800; margin: 28px 0 12px; }
.bignumber { display: flex; flex-direction: column; gap: 8px; padding: 20px 0; }
.bignumber-n { font-size: 46px; font-weight: 800; letter-spacing: -.03em; line-height: 1; }
.bignumber-l { font-size: 12.5px; color: var(--muted); }
@media (max-width: 1100px) {
  .insightgrid > .insight { grid-column: span 6; }
}
@media (max-width: 680px) {
  .insightgrid > .insight,
  .insightgrid > .insight--half,
  .insightgrid > .insight--wide { grid-column: span 12; }
  .dk-chart, .insight--half .dk-chart, .insight--wide .dk-chart { height: 260px; }
}

/* Aktivitaets-Diagramme: etwas flacher als die Insights, sie stehen zu zweit nebeneinander. */
.dk-chart.dk-activity { height: 200px; }
.chartempty { padding: 0 18px 16px; font-size: 12.5px; }


/* ═══ Trichter als Stufenliste ═══════════════════════════════════════════════
   Als Balkendiagramm war das irrefuehrend — gleich breite Balken zeigen keinen
   Trichter. Hier traegt die Balkenlaenge den Anteil, und der groesste Absprung
   ist die einzige farbige Stelle. */
.steps { display: flex; flex-direction: column; gap: 14px; }
.step-head { display: flex; align-items: baseline; gap: 12px; }
.step-label { font-size: 14px; font-weight: 600; color: var(--text); }
.step-count { margin-left: auto; font-size: 17px; font-weight: 700;
  font-variant-numeric: tabular-nums; }
.step-track { height: 10px; border-radius: 999px; background: rgba(255,255,255,.06);
  margin: 8px 0 6px; overflow: hidden; }
.step-fill { height: 100%; border-radius: 999px; background: rgba(255,255,255,.34);
  transition: width .5s cubic-bezier(.32,.72,0,1); }
.step-fill.is-drop { background: var(--danger); box-shadow: 0 0 14px rgba(255,77,77,.4); }
.step-foot { display: flex; justify-content: space-between; gap: 12px;
  font-size: 11.5px; color: var(--faint); }
.step-lost { color: var(--danger); font-weight: 600; }

/* ═══ Explorer ═══════════════════════════════════════════════════════════════
   EIN grosses Feld statt vieler Briefmarken. Neue Auswertungen kommen als
   weiterer Knopf dazu — der Platzbedarf waechst nicht mit. */
.explorer-bar { display: flex; align-items: flex-start; gap: 20px; flex-wrap: wrap;
  margin-bottom: 20px; }
.explorer-heading { min-width: 220px; flex: 1; }
.explorer-heading h3 { margin-bottom: 6px; }
.explorer-chips { display: flex; flex-wrap: wrap; gap: 7px; }
.explorer-chips button {
  min-height: 0; padding: 9px 15px; font-size: 12.5px; font-weight: 600;
  letter-spacing: .01em; border-radius: 999px;
}
.explorer-chips button[aria-pressed="true"] {
  background: rgba(255,255,255,.92); color: #000; border-color: transparent;
}
/* min-height statt height war ein Fehler: ein Kind mit `height:100%` findet dann
   keinen Bezugswert, wird 0 hoch — und das Kit zeichnet in eine Flaeche ohne Hoehe.
   Die Buehne darf mitwachsen (Stufenliste), das Diagramm bekommt sie fest. */
.explorer-stage { min-height: 440px; }
.explorer-stage .steps { padding-top: 6px; }
.explorer-stage .dk-chart { height: 440px; }
.explorer-stage .dk-chart.dk-donut { height: 440px; margin: 0 auto; }

/* Viele Balken: waagerecht scrollen statt sie zu Strichen zu quetschen. Wenn aus
   acht Positionen dreissig werden, bleibt jeder Balken lesbar. */
.explorer-stage { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.explorer-stage > .dk-chart { min-width: 320px; }

@media (max-width: 680px) {
  /* Am Telefon: flacher, damit ueber dem Diagramm noch die Auswahl sichtbar ist. */
  .explorer-stage { min-height: 320px; }
  .explorer-stage .dk-chart { height: 320px; }
  /* Auswahl als eine scrollbare Zeile — gestapelt fraesse sie den halben Schirm. */
  .explorer-chips {
    flex-wrap: nowrap; overflow-x: auto; gap: 6px;
    padding-bottom: 4px; scrollbar-width: none;
    /* Andeuten, dass rechts mehr kommt. */
    mask-image: linear-gradient(to right, #000 88%, transparent);
  }
  .explorer-chips::-webkit-scrollbar { display: none; }
  .explorer-chips button { flex: none; padding: 9px 13px; font-size: 12.5px; }
  .explorer-bar { flex-direction: column; gap: 14px; }
  .explorer-heading { min-width: 0; }
  .insight-hint { font-size: 12.5px; }
}

/* ═══ Usage: eine Frage pro Block (23.09.2026) ═══════════════════════════════
   Die Ueberschrift ist die Frage, die Fusszeile nennt Quelle/Zeitraum/Zaehlweise.
   Balken sind bewusst neutral grau: Lime bleibt Marke und Erfolg, nie Datenreihe.
   Fehlende Werte ("n/a") sind gedaempft, damit sie nie wie eine gemessene 0 wirken. */
h2.first { margin-top: 4px; }
.search.flush { margin-bottom: 0; flex: 1 1 240px; }
.usage-intro { display: flex; flex-direction: column; gap: 8px; margin: 2px 0 14px; }
.usage-intro p { margin: 0; color: var(--muted); font-size: 13px; max-width: 72ch; }
.qsection { padding: 18px 18px 14px; margin-bottom: 14px; overflow: visible; }
.qhead { display: flex; align-items: baseline; gap: 12px; margin-bottom: 14px; }
.qhead h2 { margin: 0; flex: 1; font-size: 17px; letter-spacing: -.01em; text-transform: none;
  color: var(--text); font-weight: 800; }
.qtag { font-size: 10px; letter-spacing: .18em; text-transform: uppercase; color: var(--faint);
  font-weight: 700; white-space: nowrap; }
.qsub { font-size: 10.5px; letter-spacing: .18em; text-transform: uppercase; color: var(--faint);
  font-weight: 700; margin: 16px 0 8px; }
.qsub:first-of-type { margin-top: 0; }
.qnote + .qsub, .metrics + .qsub, .na-line + .qsub { margin-top: 18px; }
.qnote { margin: 10px 0 0; font-size: 12.5px; color: var(--muted); line-height: 1.5; }
.qfoot { margin: 14px 0 0; padding-top: 12px; border-top: 1px solid rgba(255,255,255,.06);
  font-size: 11.5px; color: var(--faint); line-height: 1.5; }
.na-line { margin: 0; }

.metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
@media (max-width: 900px) { .metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.metrics + .metrics, .bars + .metrics, .bars + .bars { margin-top: 10px; }
.metric { background: var(--card2); border-radius: 12px; padding: 12px 14px; min-width: 0; }
.metric .mv { font-size: 24px; font-weight: 900; letter-spacing: -.5px; line-height: 1.15;
  font-variant-numeric: tabular-nums; }
.metric .mv.na { color: var(--faint); font-size: 18px; font-weight: 700; }
.metric .mv.warn { color: #f5c542; }
.metric .mv.bad { color: var(--danger); }
.metric .ml { font-size: 12px; color: var(--text); margin-top: 4px; }
.metric .ms { font-size: 11px; color: var(--muted); margin-top: 2px; }

.bars { display: flex; flex-direction: column; gap: 8px; }
.bar { display: grid; grid-template-columns: minmax(150px, 220px) 1fr minmax(120px, auto); gap: 12px;
  align-items: center; font-size: 12.5px; }
.barlabel { color: var(--text); }
.bartrack { height: 8px; border-radius: 99px; background: var(--card2); overflow: hidden; }
.barfill { height: 100%; border-radius: 99px; background: #8f8d84; }
.barval { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.barval b { font-weight: 800; }

.gaplist { margin: 0; padding-left: 18px; display: flex; flex-direction: column; gap: 6px; font-size: 12.5px; }

@media (max-width: 680px) {
  .qsection { padding: 16px 14px 12px; }
  .qhead { flex-direction: column; gap: 4px; }
  .qhead h2 { font-size: 15.5px; }
  .bar { grid-template-columns: 1fr auto; row-gap: 4px; }
  .bartrack { grid-column: 1 / -1; grid-row: 2; }
  .metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .metric .mv { font-size: 21px; }
}

/* Nutzerfilter: eine Zeile, am Telefon seitlich scrollbar statt umzubrechen. */
#userFilters { max-width: 100%; overflow-x: auto; scrollbar-width: none; }
#userFilters::-webkit-scrollbar { display: none; }
#userFilters .segbtn { white-space: nowrap; flex: none; }

/* Gerät wird nach dem Code automatisch gemerkt (27.09.): nur ein Hinweis, kein Häkchen. */
.remember-note { margin: 12px 0 4px; font-size: 13px; text-align: left; }

/* App health (27.09., PITCH-CONTROL 6e) — gleiche Flächen wie Karten/Infozeilen. */
.healthsources { margin-bottom: 14px; }
.healthsources .qmore { margin: 0; padding: 10px 14px 12px; border-top: 1px solid var(--line); }
.incidenthead { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.incidenthead h2 { margin: 0; font-size: 20px; text-transform: none; letter-spacing: -.01em; color: var(--text); }
.incidentline { margin: 6px 0 16px; }
#view-incident .chart { margin-top: 14px; }
#view-incident .qmore { margin-top: 14px; }

/* Aufklappbare Details: Quelle, Zählweise, Methodik — erste Ebene bleibt kurz. */
.qmore { margin-top: 12px; font-size: 12.5px; color: var(--muted); line-height: 1.5; }
.qmore > summary { cursor: pointer; color: var(--muted); font-weight: 600; list-style: none; display: inline-flex;
  align-items: center; gap: 6px; padding: 4px 0; }
.qmore > summary::-webkit-details-marker { display: none; }
.qmore > summary::before { content: "▸"; font-size: 10px; transition: transform .15s ease; }
.qmore[open] > summary::before { transform: rotate(90deg); }
.qmore > summary:focus-visible { outline: 2px solid var(--lime); outline-offset: 2px; border-radius: 4px; }
.qmore p { margin: 8px 0 0; }
.qmore .qnote { margin-top: 8px; }
#healthBody .seg { display: inline-flex; margin-bottom: 12px; }
.notmeasured { padding: 16px 18px; }
.notmeasured > summary { font-size: 14px; color: var(--text, #e8e6dc); }
.usage-intro .qmore { margin-top: 6px; }
.admin-policy .qmore { margin-top: 4px; }
.bars + .qsub { margin-top: 18px; }
