/* Verwaltung – baut auf style.css auf */
body.admin { padding-bottom: 80px; }

.tafel {
  background: rgba(20, 27, 49, .6); border: 1px solid var(--linie); border-radius: 8px;
  padding: 18px 20px 20px; margin-top: 16px; backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); min-width: 0;
}
.tafel-kopf { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; margin-bottom: 14px; }
.tafel-titel { margin: 0 0 14px; font-size: 12px; font-weight: 600; letter-spacing: .18em; text-transform: uppercase; color: var(--muted); }
.tafel-kopf .tafel-titel { margin: 0; }
.anmelde-tafel { max-width: 400px; margin: 0 auto; }

/* Reiter */
.reiter { display: flex; flex-wrap: wrap; gap: 0 28px; border-bottom: 1px solid var(--linie-stark); margin-bottom: 20px; }
.reiter button {
  background: none; border: none; padding: 10px 0 12px; cursor: pointer; white-space: nowrap;
  font-size: 13px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--leise);
  border-bottom: 3px solid transparent; margin-bottom: -1px;
}
.reiter button:hover { color: var(--text); text-shadow: var(--leuchten); }
.reiter button[aria-selected="true"] { color: var(--text); border-image: var(--regenbogen) 1; border-bottom-width: 3px; border-bottom-style: solid; }

.leiste { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; }
.leiste .arten { padding: 0; }
.arten.klein { padding: 0; gap: 6px; }
.arten.klein .chip { padding: 3px 11px; font-size: 12px; }

/* Kennzahlen */
.kacheln { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-top: 16px; }
.kachel {
  background: rgba(20, 27, 49, .6); border: 1px solid var(--linie); border-radius: 8px; padding: 14px 16px;
  display: flex; flex-direction: column; gap: 2px; min-width: 0;
}
.kachel-name { font-size: 11px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--leise); }
.kachel b { font-size: 26px; font-weight: 600; font-variant-numeric: tabular-nums; line-height: 1.25; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.trend { font-size: 12px; color: var(--leise); font-variant-numeric: tabular-nums; }
.trend.hoch { color: var(--gruen); }
.trend.runter { color: var(--rot); }

/* Verlauf (Säulendiagramm) */
.verlauf { position: relative; }
.flaeche { position: relative; height: 200px; margin-left: 36px; }
.gitter { position: absolute; left: 0; right: 0; border-top: 1px solid var(--linie); }
.gitter span { position: absolute; right: calc(100% + 8px); top: -8px; font-size: 11px; color: var(--leise); font-variant-numeric: tabular-nums; white-space: nowrap; }
.balken-reihe, .saeulen-flaeche { position: absolute; inset: 0; display: flex; align-items: flex-end; gap: 2px; }
.spalte { flex: 1; height: 100%; display: flex; align-items: flex-end; min-width: 0; cursor: default; }
.saeule { width: 100%; max-width: 28px; margin: 0 auto; background: var(--cyan); border-radius: 3px 3px 0 0; min-height: 2px; transition: background .12s; }
.saeule.null { background: var(--linie-stark); min-height: 1px; }
.spalte:hover .saeule { background: #8fd3ef; }
.achse { display: flex; gap: 2px; margin-left: 36px; padding-top: 6px; }
.achse span { flex: 1; min-width: 0; text-align: center; font-size: 11px; color: var(--leise); white-space: nowrap; overflow: visible; font-variant-numeric: tabular-nums; }
.saeulen-flaeche { position: relative; height: 90px; }
.saeulen .achse { margin-left: 0; }
.tooltip {
  position: absolute; z-index: 50; pointer-events: none; background: var(--text); color: var(--navy0);
  font-size: 13px; font-weight: 600; padding: 5px 9px; border-radius: 4px; white-space: nowrap; font-variant-numeric: tabular-nums;
}
.leer-hinweis { color: var(--leise); font-size: 14px; margin: 10px 0 0; list-style: none; }

/* Raster */
.raster { display: grid; gap: 0 16px; }
.raster.zwei { grid-template-columns: 3fr 2fr; }
.raster.vier { grid-template-columns: repeat(4, 1fr); }

/* Ranglisten und Balkenlisten */
.rangliste, .balkenliste { list-style: none; margin: 0; padding: 0; }
.rangliste li { padding: 10px 0; border-bottom: 1px solid var(--linie); counter-increment: rang; display: grid; grid-template-columns: 22px 1fr; gap: 2px 8px; }
.rangliste li::before { content: counter(rang); grid-row: 1 / span 3; font-size: 13px; font-weight: 600; color: var(--leise); font-variant-numeric: tabular-nums; padding-top: 1px; }
.rangliste li.leer-hinweis::before { content: none; }
.rangliste li:last-child { border-bottom: none; }
.rang-text { min-width: 0; }
.rang-text a { font-weight: 600; text-decoration: none; }
.rang-text a:hover { text-shadow: var(--leuchten); }
.rang-text small { display: block; color: var(--leise); font-size: 13px; }
.rang-zahlen { display: flex; flex-wrap: wrap; gap: 0 14px; font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; }
.rang-zahlen b { color: var(--text); }
.rang-balken { grid-column: 2; height: 4px; border-radius: 2px; background: var(--linie); margin-top: 6px; overflow: hidden; }
.rang-balken div { height: 100%; background: var(--cyan); border-radius: 2px; }
.balkenliste li { display: grid; grid-template-columns: 1fr auto; gap: 0 10px; padding: 6px 0; font-size: 14px; }
.balkenliste .rang-balken { grid-column: 1 / -1; margin-top: 4px; }
.bl-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bl-zahl { color: var(--muted); font-variant-numeric: tabular-nums; }

/* Archiv & Speicher */
.archiv-zahlen { display: flex; flex-wrap: wrap; gap: 14px 36px; }
.archiv-zahlen div { display: flex; flex-direction: column; }
.archiv-zahlen b { font-size: 22px; font-weight: 600; font-variant-numeric: tabular-nums; }
.archiv-zahlen span { font-size: 12px; color: var(--leise); letter-spacing: .06em; }
.speicher { margin-top: 18px; }
.speicher-balken { display: flex; gap: 2px; height: 10px; border-radius: 5px; background: var(--linie); overflow: hidden; }
.speicher-balken div { height: 100%; }
.sp-aufnahmen { background: var(--cyan); }
.sp-rest { background: var(--lila); }
.sp-frei { background: var(--linie-stark); }
.speicher-legende { display: flex; flex-wrap: wrap; gap: 4px 20px; margin-top: 8px; font-size: 13px; color: var(--muted); }
.speicher-legende i { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 6px; vertical-align: -1px; }
.kleingedruckt { font-size: 13px; color: var(--leise); margin: 18px 0 0; max-width: 72ch; }

/* Aufnahmen-Tabelle */
.sammel {
  position: sticky; top: 0; z-index: 20; display: flex; flex-wrap: wrap; align-items: center; gap: 6px 20px;
  margin-top: 12px; padding: 10px 16px; border-radius: 6px; background: var(--navy-panel); border: 1px solid var(--blau);
}
.sammel strong { font-size: 14px; }
.tabelle { margin-top: 12px; }
.zeile {
  display: grid; grid-template-columns: 28px 92px minmax(0, 1fr) 110px 150px 56px 60px 60px 96px; gap: 0 12px;
  align-items: baseline; padding: 10px 6px; border-bottom: 1px solid var(--linie); font-size: 14px;
}
.zeile:hover { background: rgba(255, 255, 255, .03); }
.zeile.gewaehlt { background: rgba(90, 140, 230, .14); }
.kopfzeile { font-size: 11px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--leise); border-bottom-color: var(--linie-stark); }
.kopfzeile:hover { background: none; }
.wahl { display: flex; align-items: center; cursor: pointer; align-self: center; }
.wahl input { width: 16px; height: 16px; accent-color: var(--blau); cursor: pointer; margin: 0; }
.rechts { text-align: right; }
.z-datum, .z-zahl { font-variant-numeric: tabular-nums; color: var(--muted); }
.z-titel { min-width: 0; }
.z-titel a { font-weight: 600; text-decoration: none; }
.z-titel a:hover { text-shadow: var(--leuchten); }
.z-titel small { display: block; color: var(--leise); font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.z-art, .z-prediger { color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.z-aktion { text-align: right; }
.z-aktion .textknopf { font-size: 13px; }
.etikett {
  font-style: normal; font-size: 10px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase;
  border: 1px solid var(--linie-stark); border-radius: 3px; padding: 0 5px; margin-left: 4px; color: var(--muted);
}
.etikett.aus { border-color: rgba(232, 106, 90, .5); color: var(--rot); }
.zeile.versteckt .z-titel a, .zeile.versteckt .z-datum { opacity: .55; }
.zeilen-leer { padding: 24px 6px; }

/* Bearbeiten-Dialog */
.dialog-breit { width: min(680px, calc(100vw - 24px)); }
.anhoeren audio { width: 100%; margin-bottom: 18px; height: 40px; }
.transkripte { border-bottom: 1px solid var(--linie-stark); }
.transkript-zeile { display: flex; align-items: baseline; gap: 16px; padding: 6px 0; }
.feld .transkripte span { letter-spacing: 0; text-transform: none; font-weight: 500; font-size: 14px; }
.feld .transkripte .tz-name { color: var(--text); min-width: 72px; }
.feld .transkripte .tz-status { color: var(--muted); flex: 1; }
.info { display: grid; grid-template-columns: max-content 1fr; gap: 3px 16px; margin: 20px 0 0; font-size: 13px; }
.info dt { color: var(--leise); }
.info dd { margin: 0; color: var(--muted); word-break: break-all; }

/* Schalter */
.schalter { display: flex; align-items: flex-start; gap: 14px; padding: 12px 0; cursor: pointer; border-bottom: 1px solid var(--linie); }
.schalter.breit { grid-column: 1 / -1; border-bottom: none; padding-bottom: 0; }
.schalter input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.schalter-knopf {
  flex-shrink: 0; width: 40px; height: 22px; border-radius: 11px; background: var(--linie-stark); position: relative; transition: background .15s; margin-top: 1px;
}
.schalter-knopf::after {
  content: ""; position: absolute; left: 3px; top: 3px; width: 16px; height: 16px; border-radius: 50%; background: var(--text); transition: transform .15s;
}
.schalter input:checked + .schalter-knopf { background: var(--gruen); }
.schalter input:checked + .schalter-knopf::after { transform: translateX(18px); }
.schalter input:focus-visible + .schalter-knopf { outline: 2px solid var(--cyan); outline-offset: 2px; }
.schalter b { display: block; font-weight: 600; }
.schalter small { display: block; color: var(--leise); font-size: 13px; margin-top: 2px; }
.einstellungen .feld { margin-top: 18px; }
.werkzeuge { list-style: none; margin: 0; padding: 0; }
.werkzeuge li { padding: 8px 0; border-bottom: 1px solid var(--linie); }
.werkzeuge li:last-child { border-bottom: none; }
.werkzeuge a { font-weight: 600; text-decoration: none; }
.werkzeuge a:hover { text-shadow: var(--leuchten); }
.werkzeuge small { display: block; color: var(--leise); font-size: 13px; }

@media (max-width: 960px) {
  .kacheln { grid-template-columns: repeat(2, 1fr); }
  .raster.zwei, .raster.drei { grid-template-columns: 1fr; }
  .raster.zwei.eng { grid-template-columns: 1fr 1fr; }
  .raster.vier { grid-template-columns: 1fr 1fr; }
  .zeile { grid-template-columns: 28px 92px minmax(0, 1fr) 130px 56px 60px 60px 96px; }
  .z-art, .zeile > :nth-child(4) { display: none; }
}
@media (max-width: 700px) {
  .kacheln { grid-template-columns: 1fr 1fr; gap: 10px; }
  .kachel b { font-size: 22px; }
  .raster.vier { grid-template-columns: 1fr; }
  .tafel { padding: 16px 14px; }
  .flaeche { height: 160px; }
  .kopfzeile { display: none; }
  .zeile {
    grid-template-columns: 28px minmax(0, 1fr) auto; grid-template-areas: "w t a" "w d a"; gap: 0 10px; align-items: center;
  }
  .zeile .wahl { grid-area: w; }
  .zeile .z-titel { grid-area: t; }
  .zeile .z-datum { grid-area: d; font-size: 13px; }
  .zeile .z-aktion { grid-area: a; }
  .zeile .z-art, .zeile .z-prediger, .zeile .z-zahl { display: none; }
  .felder { grid-template-columns: 1fr; }
}
#aSuche {
  width: 100%; border: none; border-bottom: 1px solid var(--linie); background: transparent;
  padding: 12px 0; font-size: 17px; outline: none; border-radius: 0;
}
#aSuche:focus { border-bottom-color: var(--muted); }
#aSuche::placeholder { color: var(--leise); }

/* Erweiterte Auswertung */
.raster.drei { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.raster.zwei.gleich { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.raster.eng { gap: 0 20px; }
.leiste-rechts { display: flex; gap: 20px; }
.tafel-text { font-size: 13px; color: var(--leise); margin: -6px 0 14px; }
.tafel-text b { color: var(--text); }
.saeulen.kurve .tafel-text { margin: 10px 0 0; }
.unter-titel { font-size: 11px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--leise); margin: 18px 0 8px; }
.raster .unter-titel:first-child { margin-top: 4px; }
.balkenliste .zusatz { display: block; font-size: 13px; color: var(--leise); padding-top: 10px; }
.balkenliste.warnung .rang-balken div { background: var(--gelb); }
.archiv-zahlen.klein { gap: 12px 24px; }
.archiv-zahlen.klein b { font-size: 19px; }
.aufnahme-statistik { margin-top: 18px; }
.aufnahme-statistik .flaeche { margin-left: 30px; }
.aufnahme-statistik .achse { margin-left: 30px; }

.live {
  display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; font-size: 14px; color: var(--muted);
  margin-bottom: 14px; min-height: 22px;
}
.live b { color: var(--text); font-weight: 600; }
.live a { color: var(--text); text-decoration: none; border-bottom: 1px solid var(--linie-stark); }
.live a:hover { border-bottom-color: var(--text); text-shadow: var(--leuchten); }
.live-punkt { width: 9px; height: 9px; border-radius: 50%; background: var(--leise); }
.live-punkt.an { background: var(--gruen); box-shadow: 0 0 0 0 rgba(70, 200, 90, .6); animation: puls 2s infinite; }
@keyframes puls { 70% { box-shadow: 0 0 0 8px rgba(70, 200, 90, 0); } 100% { box-shadow: 0 0 0 0 rgba(70, 200, 90, 0); } }

.heatmap { overflow-x: auto; }
.hm-raster { display: grid; grid-template-columns: 28px repeat(24, minmax(14px, 1fr)); gap: 3px; min-width: 460px; }
.hm-tag, .hm-stunde { font-size: 11px; color: var(--leise); font-variant-numeric: tabular-nums; }
.hm-tag { align-self: center; }
.hm-stunde { text-align: left; }
.hm-zelle { aspect-ratio: 1.6; border-radius: 3px; background: rgba(59, 178, 224, var(--a)); box-shadow: inset 0 0 0 1px var(--linie); }
.hm-zelle:hover { box-shadow: inset 0 0 0 2px var(--text); }
.hm-legende { display: flex; align-items: center; gap: 8px; margin-top: 10px; font-size: 12px; color: var(--leise); }
.hm-legende i { width: 90px; height: 8px; border-radius: 4px; background: linear-gradient(90deg, rgba(59, 178, 224, .12), var(--cyan)); }

.auswahl-gruppe { border: none; padding: 0; margin: 0; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.abstand-oben { margin-top: 26px; }
.radio { display: flex; gap: 12px; align-items: flex-start; padding: 10px 0; border-bottom: 1px solid var(--linie); cursor: pointer; }
.radio input { accent-color: var(--gruen); width: 18px; height: 18px; margin: 2px 0 0; flex-shrink: 0; }
.radio b { display: block; font-weight: 600; }
.radio small { display: block; color: var(--leise); font-size: 13px; margin-top: 2px; }
@media (max-width: 700px) {
  .raster.zwei.gleich, .raster.zwei.eng { grid-template-columns: 1fr; }
  .leiste-rechts { width: 100%; justify-content: space-between; }
}
@media (max-width: 960px) { .raster.drei { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } }
@media (max-width: 700px) { .raster.drei { grid-template-columns: minmax(0, 1fr); } }

/* Themen-Reiter in der Übersicht */
.themen { display: flex; flex-wrap: wrap; gap: 8px; margin: 18px 0 4px; }
.themen button {
  flex: 1 1 150px; background: rgba(20, 27, 49, .6); border: 1px solid var(--linie); border-radius: 8px; padding: 12px 14px;
  cursor: pointer; text-align: left; font-size: 14px; font-weight: 600; color: var(--muted); position: relative; overflow: hidden;
}
.themen button:hover { color: var(--text); border-color: var(--linie-stark); box-shadow: 0 0 14px rgba(255, 255, 255, .08); }
.themen button.aktiv { color: var(--text); border-color: var(--muted); background: rgba(255, 255, 255, .06); }
.themen button.aktiv::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: var(--regenbogen); }

/* Kacheln mit Mini-Verlauf */
.kachel { position: relative; padding-bottom: 38px; }
.sparkline { position: absolute; left: 12px; right: 12px; bottom: 10px; width: calc(100% - 24px); height: 26px; }
.sp-linie { fill: none; stroke: var(--cyan); stroke-width: 1.5; vector-effect: non-scaling-stroke; }
.sp-flaeche { fill: rgba(59, 178, 224, .12); stroke: none; }

/* Erkenntnisse */
.einsichten { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-top: 16px; }
.einsicht { background: rgba(20, 27, 49, .6); border: 1px solid var(--linie); border-radius: 8px; padding: 14px 16px; min-width: 0; }
.einsicht b, .einsicht a { display: block; font-size: 17px; font-weight: 600; margin-top: 4px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-decoration: none; }
.einsicht a:hover { text-shadow: var(--leuchten); }
.einsicht small { display: block; color: var(--leise); font-size: 13px; margin-top: 2px; }

/* Ring-Diagramme */
.kreis { display: flex; align-items: center; gap: 18px; }
.kreis-bild { position: relative; width: 120px; height: 120px; flex-shrink: 0; }
.kreis-bild svg { width: 100%; height: 100%; display: block; }
.kreis-bild circle { transition: stroke-width .12s; cursor: default; }
.kreis-bild circle:hover { stroke-width: 20; }
.kreis-mitte { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; pointer-events: none; padding: 0 30px; }
.kreis-mitte b { font-size: 19px; font-weight: 600; font-variant-numeric: tabular-nums; line-height: 1.1; }
.kreis-mitte span { font-size: 11px; color: var(--leise); line-height: 1.2; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 64px; }
.legende { list-style: none; margin: 0; padding: 0; flex: 1; min-width: 0; }
.legende li { display: grid; grid-template-columns: 10px minmax(0, 1fr) auto; align-items: center; gap: 8px; padding: 4px 0; font-size: 14px; }
.legende i { width: 10px; height: 10px; border-radius: 3px; }
.treue-raster { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 24px; align-items: start; }
.treue-raster .unter-titel { margin-top: 18px; }
.raster.vier { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.raster.vier .kreis { flex-direction: column; align-items: stretch; }
.raster.vier .kreis-bild { margin: 0 auto 8px; }
@media (max-width: 960px) {
  .einsichten { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .raster.vier { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .treue-raster { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 700px) {
  .einsichten { grid-template-columns: minmax(0, 1fr); }
  .themen button { flex: 1 1 40%; padding: 10px 12px; font-size: 13px; }
  .raster.vier { grid-template-columns: minmax(0, 1fr); }
  .raster.vier .kreis { flex-direction: row; }
}
.legende .bl-name { white-space: normal; overflow: visible; line-height: 1.25; }
@media (max-width: 700px) {
  .reiter { gap: 0 18px; }
  .reiter button { font-size: 12px; letter-spacing: .1em; }
}
