/* Gigi Schule: Alles rund um Abos, Testmonat, Verlosung, Stage Box und
   Registrierung gibt es hier nicht - die Schule betreibt ihren Server selbst. */
#landingPlans, #btnLandingPlans, #landingPlansTitle, #landingPlansAlle, #landingChosen,
#btnLandingDemo, #btnLandingSurvey, #btnSurvey, #btnStageBox, #lnkToggleRegister,
#surveyReminder, #trialNag, #lockedPlans, #btnInstall.nie { display: none !important; }

/* Verwaltung legt an, Lehrkraft unterrichtet: Klassen und Schueler kommen
   ausschliesslich aus dem Cockpit. Die Knoepfe dafuer gibt es deshalb im
   Lehrerbildschirm nicht mehr. Abgewiesen wird es zusaetzlich im api.php -
   das hier spart der Lehrkraft nur den Weg in eine Fehlermeldung. */
#btnNewBand, #btnAddMember, #btnManageBands { display: none !important; }

/* Konto loeschen: nur die Schulverwaltung, im Cockpit bei der Lehrkraft.
   Link und Fenster der Mutterversion fallen weg (Rueckmeldung El, 25.09.2026). */
#deleteAccountRow, #deleteAccountModal { display: none !important; }

/* Das alte Cockpit der Mutterversion (Abos, Umsaetze, Kontenliste) hat in
   der Schule nichts verloren - die Schule betreibt ihren Server selbst und
   hat keine Abos. Alles, was es zeigte, steht im Cockpit der
   Schulverwaltung. Zwei Fenster mit demselben Namen verwirren nur.
   Gilt ausschliesslich hier: schule.css laedt die Mutterversion nicht. */
#btnCockpit { display: none !important; }

/* Klassenname und Klassencode gehoeren der Schulverwaltung - mit beidem
   melden sich die Schueler an. build-schule.py kennzeichnet die beiden
   Felder, hier verschwinden sie. "Was sehen die Schueler" bleibt. */
.nur-verwaltung { display: none !important; }

.member-row.nur-lesen { display: flex; align-items: center; gap: 10px; padding: 5px 2px; }
.member-row.nur-lesen .meta { margin-left: auto; }

.schule-box { border: 1px solid #334155; border-radius: 10px; padding: 12px 14px; margin: 12px 0; }
.schule-box h3 { margin: 0 0 8px; font-size: 16px; }
.schule-form { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 8px 12px; }
.schule-form label { display: flex; flex-direction: column; gap: 4px; font-size: 13px; color: #94a3b8; }
.schule-zugang { border: 2px solid #16a34a; border-radius: 10px; padding: 10px 14px; margin: 12px 0; background: rgba(22,163,74,.08); }
.schule-zugang pre { white-space: pre-wrap; font-size: 14px; background: rgba(0,0,0,.2); padding: 10px; border-radius: 8px; }
.schule-liste { display: flex; flex-direction: column; gap: 8px; max-height: 45vh; overflow-y: auto; }
.schule-lehrer { border: 1px solid #334155; border-radius: 10px; padding: 10px 12px; }
.schule-lehrer .klassen { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0; }
.schule-lehrer .klasse { background: #1e293b; border-radius: 8px; padding: 4px 8px; font-size: 13px; }
.btn.klein { padding: 4px 10px; font-size: 13px; min-height: 0; }
.btn.gefahr { border-color: #b91c1c; color: #fca5a5; }
body.day-mode .schule-box, body.day-mode .schule-lehrer { border-color: #cbd5e1; }
body.day-mode .schule-lehrer .klasse { background: #f1f5f9; }


/* =====================================================================
   Cockpit der Schulverwaltung (Sept 2026)

   Naeher am Instrumentenbrett als an einer Tabelle: Zahlen gross und in
   gleicher Zeichenbreite, Zustaende als Leuchten, Auslastung als Balken.

   Zwei Regeln, an die sich das hier haelt:
   - Es blinkt nur, was gerade wirklich passiert. Blinken ohne Anlass
     macht ein Cockpit unlesbar.
   - Farbe steht nie allein. Neben jeder Leuchte steht eine Zahl oder ein
     Wort - sonst waere das Brett fuer Farbenblinde nutzlos.
   ===================================================================== */

.ck-modal { max-width: 1100px; }

/* ---- Reiter ---- */
.ck-reiter { display: flex; gap: 6px; flex-wrap: wrap; margin: 4px 0 14px; border-bottom: 1px solid #334155; padding-bottom: 10px; }
.ck-reiter button { background: transparent; border: 1px solid #334155; color: #94a3b8; border-radius: 8px;
  padding: 6px 12px; font-size: 14px; cursor: pointer; font-family: inherit; transition: color .15s, border-color .15s, background-color .15s; }
.ck-reiter button:hover { color: #e2e8f0; border-color: #475569; }
.ck-reiter button.an { background: #1e293b; color: #93c5fd; border-color: #3b82f6; font-weight: bold;
  box-shadow: 0 0 0 1px rgba(59,130,246,.35), 0 0 14px rgba(59,130,246,.22); }
.ck-reiter button[disabled] { opacity: .45; cursor: default; }
.ck-seite { display: none; }
.ck-seite.an { display: block; }

/* ---- Maschinenleiste ueber den Kacheln ---- */
.ck-sys { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px 20px;
  border: 1px solid #334155; border-radius: 10px; padding: 11px 14px; margin-bottom: 14px;
  background: linear-gradient(180deg, rgba(30,41,59,.75), rgba(15,23,42,.55)); }
.ck-anzeige { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 4px 7px;
  padding-left: 14px; border-left: 1px solid #334155; }
.ck-anzeige:first-child { padding-left: 0; border-left: 0; }
.ck-anzeige-name { font-size: 11px; letter-spacing: .09em; text-transform: uppercase; color: #94a3b8; }
.ck-anzeige-wert { font-size: 14px; font-variant-numeric: tabular-nums; font-feature-settings: "tnum"; white-space: nowrap; }
.ck-anzeige .ck-balken { grid-column: 2 / 4; }

/* ---- Kennzahlen ---- */
.ck-zahlen { display: grid; grid-template-columns: repeat(auto-fit, minmax(128px, 1fr)); gap: 10px; margin-bottom: 18px; }
.ck-kachel { position: relative; overflow: hidden; border: 1px solid #334155; border-radius: 10px;
  padding: 12px 12px 10px; background: linear-gradient(180deg, rgba(30,41,59,.7), rgba(15,23,42,.45)); }
.ck-kachel::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 3px; background: #475569; }
.ck-kachel.farbe-a::before { background: #60a5fa; }
.ck-kachel.farbe-b::before { background: #a78bfa; }
.ck-kachel.farbe-c::before { background: #38bdf8; }
.ck-kachel.farbe-d::before { background: #f472b6; }
.ck-kachel.farbe-e::before { background: #fbbf24; }
.ck-kachel b { display: block; font-size: 30px; line-height: 1.05;
  font-variant-numeric: tabular-nums; font-feature-settings: "tnum"; }
.ck-kachel span { font-size: 12px; color: #94a3b8; }
.ck-kachel.hervor { border-color: #334155; }
.ck-kachel.hervor::before { background: #475569; }
.ck-kachel.hervor.wach { border-color: #16a34a; background: linear-gradient(180deg, rgba(22,163,74,.22), rgba(22,163,74,.06)); }
.ck-kachel.hervor.wach::before { background: #22c55e; }
.ck-kachel.hervor.wach b { color: #4ade80; }
.ck-kachel.blitz { animation: ckBlitz .7s ease-out; }
@keyframes ckBlitz {
  0%   { box-shadow: 0 0 0 1px rgba(147,197,253,.9), 0 0 22px rgba(147,197,253,.55); }
  100% { box-shadow: 0 0 0 1px rgba(147,197,253,0), 0 0 0 rgba(147,197,253,0); }
}

/* ---- Kopfzeile mit Takt ---- */
.ck-kopfzeile { display: flex; align-items: center; gap: 10px; margin: 4px 0 8px; }
.ck-takt { display: inline-flex; align-items: center; font-size: 12px; color: #94a3b8;
  font-variant-numeric: tabular-nums; font-feature-settings: "tnum"; }

/* ---- Leuchten ---- */
.ck-led { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 7px;
  background: #475569; vertical-align: middle; flex: none; }
.ck-led.aus   { background: #334155; box-shadow: inset 0 0 0 1px #475569; }
.ck-led.gruen { background: #22c55e; box-shadow: 0 0 9px rgba(34,197,94,.9); }
.ck-led.gelb  { background: #f59e0b; box-shadow: 0 0 9px rgba(245,158,11,.9); }
.ck-led.rot   { background: #ef4444; box-shadow: 0 0 9px rgba(239,68,68,.9); }
.ck-led.puls  { animation: ckPuls 1.25s ease-in-out infinite; }
@keyframes ckPuls { 0%,100% { opacity: 1; } 50% { opacity: .28; } }

/* ---- Live-Zeilen ---- */
.ck-live { display: flex; flex-direction: column; gap: 8px; max-height: 46vh; overflow-y: auto; }
.ck-zeile { display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  border: 1px solid #334155; border-radius: 10px; padding: 10px 12px; background: rgba(30,41,59,.35);
  transition: border-color .3s, background-color .3s, opacity .3s; }
.ck-zeile.ruht { opacity: .58; }
.ck-zeile.wach { border-color: #475569; background: rgba(30,41,59,.6); }
.ck-zeile.laeuft { border-color: #16a34a; background: rgba(22,163,74,.12);
  box-shadow: 0 0 0 1px rgba(22,163,74,.35), 0 0 18px rgba(22,163,74,.14); }
.ck-zeile .ck-klasse { font-weight: bold; }
.ck-zeile .ck-lehrer { color: #94a3b8; font-size: 13px; }
.ck-zeile .ck-rechts { margin-left: auto; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.ck-anzahl { font-size: 22px; font-variant-numeric: tabular-nums; font-feature-settings: "tnum"; }
.ck-anzahl.ck-still { color: #64748b; }
.ck-anzahl small { font-size: 12px; color: #94a3b8; margin-left: 4px; font-weight: normal; }
.ck-marke { font-size: 12px; border: 1px solid #334155; border-radius: 999px; padding: 2px 9px; color: #94a3b8; white-space: nowrap; }
.ck-marke.an { border-color: #16a34a; color: #4ade80; }

/* ---- Balken ---- */
.ck-messer { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px; }
.ck-messer .feld { border: 1px solid #334155; border-radius: 10px; padding: 12px 14px;
  background: linear-gradient(180deg, rgba(30,41,59,.7), rgba(15,23,42,.45)); }
.ck-messer .kopf { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 8px; }
.ck-messer .kopf b { font-size: 14px; }
.ck-messer .wert { font-size: 22px; font-variant-numeric: tabular-nums; font-feature-settings: "tnum"; }
.ck-balken { height: 12px; border-radius: 6px; background: rgba(127,127,127,.2); overflow: hidden;
  box-shadow: inset 0 0 0 1px rgba(127,127,127,.18); }
.ck-balken.schmal { height: 6px; border-radius: 3px; }
.ck-balken > i { display: block; height: 100%; width: 0; border-radius: inherit; background: #22c55e;
  box-shadow: 0 0 10px rgba(34,197,94,.55);
  transition: width .45s ease, background-color .45s ease; }
.ck-balken.gelb > i { background: #f59e0b; box-shadow: 0 0 10px rgba(245,158,11,.55); }
.ck-balken.rot  > i { background: #ef4444; box-shadow: 0 0 10px rgba(239,68,68,.6); }
.ck-messer .fuss { font-size: 12px; color: #94a3b8; margin-top: 6px; }

/* ---- Klassen und Schueler ---- */
.ck-spalten { display: grid; grid-template-columns: minmax(220px, 1fr) minmax(260px, 1.3fr); gap: 14px; }
@media (max-width: 720px) { .ck-spalten { grid-template-columns: 1fr; } }
.ck-wahl { display: flex; flex-direction: column; gap: 6px; max-height: 42vh; overflow-y: auto; }
.ck-wahl button { text-align: left; background: transparent; border: 1px solid #334155; color: inherit;
  border-radius: 8px; padding: 8px 10px; cursor: pointer; font-family: inherit; font-size: 14px; }
.ck-wahl button:hover { border-color: #475569; }
.ck-wahl button.an { border-color: #3b82f6; background: #1e293b; }
.ck-wahl .meta { display: block; font-size: 12px; }
.ck-schueler { display: flex; flex-direction: column; gap: 6px; max-height: 34vh; overflow-y: auto; margin-bottom: 10px; }
.ck-schueler .reihe { display: flex; align-items: center; gap: 10px; border: 1px solid #334155;
  border-radius: 8px; padding: 6px 10px; }
.ck-schueler .reihe .instr { color: #94a3b8; font-size: 13px; margin-left: auto; }

.ck-hinweis { border: 1px dashed #475569; border-radius: 10px; padding: 14px 16px; color: #94a3b8; font-size: 14px; }
.ck-fuss { font-size: 12px; color: #64748b; margin-top: 10px; }

/* Wer Bewegung im Bild nicht vertraegt, bekommt dieselben Zustaende
   ohne Animation - Farbe und Beschriftung reichen dafuer aus. */
@media (prefers-reduced-motion: reduce) {
  .ck-led.puls, .ck-kachel.blitz { animation: none; }
  .ck-balken > i { transition: none; }
}

body.day-mode .ck-kachel,
body.day-mode .ck-zeile,
body.day-mode .ck-sys,
body.day-mode .ck-messer .feld { background: #f8fafc; border-color: #cbd5e1; }
body.day-mode .ck-reiter { border-color: #cbd5e1; }
body.day-mode .ck-reiter button { border-color: #cbd5e1; color: #475569; }
body.day-mode .ck-reiter button.an { background: #e0e7ff; color: #1d4ed8; }
body.day-mode .ck-wahl button { border-color: #cbd5e1; }
body.day-mode .ck-wahl button.an { background: #e0e7ff; }
body.day-mode .ck-schueler .reihe { border-color: #cbd5e1; }
body.day-mode .ck-led.aus { background: #cbd5e1; box-shadow: inset 0 0 0 1px #94a3b8; }
