/*
  Zentrale — Oberfläche.

  Dieselbe Familie wie die Belege- und die Bewerbungs-App: helles Papierweiß,
  Blau bis Cyan als Leitfarbe, keine Webfonts, dunkle Seitenleiste als
  Instrumentenbrett. Der erste Teil (bis „Zentrale“) ist aus der
  Bewerbungs-App übernommen, damit beide gleich aussehen; alles Neue steht
  darunter.
*/

:root {
  --bg: #f2f6fd;
  --flaeche: #ffffff;
  --flaeche-hoch: #e9f0ff;
  --rand: rgba(12, 38, 86, 0.10);
  --rand-fest: rgba(12, 38, 86, 0.18);
  --ink: #0b1b33;
  --ink-dim: #5b6b86;
  --blau: #0f6fff;
  --blau-weich: rgba(15, 111, 255, 0.11);
  --cyan: #00c2f0;
  --leucht: #27e0ff;
  --violett: #7b5cff;
  --gruen: #0a9d6c;
  --gruen-weich: rgba(10, 157, 108, 0.12);
  --warn: #c76a00;
  --warn-weich: rgba(199, 106, 0, 0.12);
  --rot: #d92d20;
  --rot-weich: rgba(217, 45, 32, 0.10);
  --nacht: #0a1830;
  --nacht-hoch: #12284d;
  --verlauf: linear-gradient(135deg, #0f6fff 0%, #00c2f0 100%);
  --verlauf-weich: linear-gradient(135deg, rgba(15,111,255,0.14), rgba(0,194,240,0.07));
  --glanz: 0 8px 26px rgba(15, 111, 255, 0.14);
  --glanz-hoch: 0 14px 40px rgba(15, 111, 255, 0.22);
  --schatten: 0 1px 2px rgba(12, 38, 86, 0.05), 0 6px 20px rgba(12, 38, 86, 0.06);
  --radius: 14px;
  --radius-gross: 20px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color-scheme: light;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

html, body { margin: 0; min-height: 100%; }
body {
  background:
    radial-gradient(60rem 36rem at 12% -8%, rgba(15, 111, 255, 0.10), transparent 70%),
    radial-gradient(48rem 30rem at 94% 4%, rgba(0, 194, 240, 0.10), transparent 70%),
    var(--bg);
  background-attachment: fixed;
  color: var(--ink);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, p { margin: 0; }
h1, h2 { text-wrap: balance; letter-spacing: -0.3px; }
h1 { font-size: 28px; font-weight: 720; }
h2 { font-size: 20px; font-weight: 680; }
h3 {
  font-size: 12px; font-weight: 650; text-transform: uppercase;
  letter-spacing: 0.8px; color: var(--ink-dim);
}
a { color: var(--blau); }
button, input, select, textarea { font: inherit; color: inherit; }
button { border: 0; background: none; cursor: pointer; -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 2px solid var(--blau); outline-offset: 2px; }

/* ---------- Gemeinsame Bausteine ---------- */

.karte {
  background: var(--flaeche);
  border: 1px solid var(--rand);
  border-radius: var(--radius-gross);
  box-shadow: var(--schatten);
}

.haupt {
  min-height: 48px; padding: 0 24px; border-radius: 999px;
  background: var(--verlauf); color: #fff; font-weight: 650;
  box-shadow: var(--glanz);
  transition: transform 140ms cubic-bezier(0.2, 0.9, 0.3, 1), box-shadow 140ms;
}
.haupt:hover { box-shadow: var(--glanz-hoch); }
.haupt:active { transform: translateY(1px) scale(0.985); }
.haupt:disabled { background: var(--flaeche-hoch); color: var(--ink-dim); box-shadow: none; cursor: default; }

.leise {
  min-height: 40px; padding: 0 16px; border-radius: 999px;
  background: var(--flaeche); border: 1px solid var(--rand-fest);
  color: var(--blau); font-weight: 600; font-size: 14px;
  display: inline-flex; align-items: center; gap: 6px; text-decoration: none;
}
.leise:hover { background: var(--flaeche-hoch); }
.leise.gefahr { color: var(--rot); }
.leise.klein { min-height: 32px; padding: 0 12px; font-size: 13px; }

.symbol {
  width: 32px; height: 32px; border-radius: 10px; color: var(--ink-dim);
  display: inline-grid; place-items: center; font-size: 15px; flex: none;
}
.symbol:hover { background: var(--flaeche-hoch); color: var(--ink); }
.symbol:disabled { opacity: 0.3; cursor: default; background: none; }

.feld { display: grid; gap: 6px; }
.feld > label, .feld > .beschriftung { font-weight: 620; font-size: 14px; }
.feld .stern { color: var(--blau); margin-left: 3px; }
.feld .hilfe { font-size: 13px; color: var(--ink-dim); }
.feld .fehler { font-size: 13px; color: var(--rot); font-weight: 550; }

input[type="text"], input[type="email"], input[type="tel"], input[type="date"],
input[type="number"], input[type="password"], input[type="search"], select, textarea {
  width: 100%; min-height: 46px; padding: 10px 14px;
  background: var(--flaeche); border: 1px solid var(--rand-fest); border-radius: 12px;
  transition: border-color 120ms, box-shadow 120ms;
}
textarea { min-height: 96px; resize: vertical; line-height: 1.45; }
input:focus, select:focus, textarea:focus {
  outline: none; border-color: var(--blau); box-shadow: 0 0 0 4px var(--blau-weich);
}
.ungueltig input, .ungueltig select, .ungueltig textarea { border-color: var(--rot); }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  min-height: 42px; padding: 0 16px; border-radius: 999px;
  background: var(--flaeche); border: 1px solid var(--rand-fest);
  font-weight: 560; font-size: 14.5px;
  transition: background 120ms, border-color 120ms, color 120ms;
}
.chip:hover { border-color: var(--blau); }
.chip[aria-pressed="true"] {
  background: var(--blau); border-color: var(--blau); color: #fff;
  box-shadow: 0 4px 14px rgba(15, 111, 255, 0.25);
}

.meldung {
  padding: 10px 14px; border-radius: 12px; font-size: 14px;
  background: var(--rot-weich); color: var(--rot);
}
.meldung.gut { background: var(--gruen-weich); color: var(--gruen); }
.dim { color: var(--ink-dim); }
.klein { font-size: 13px; }

/* ---------- Begleiter ---------- */

.bot { display: inline-block; line-height: 0; }
.botBild { display: block; overflow: visible; }
.bot-gross .botBild { width: 104px; }
.bot-mittel .botBild { width: 68px; }
.bot-klein .botBild { width: 40px; }
.botKoerper, .botSchatten, .botAugen { transform-box: fill-box; transform-origin: center; }
.botFroh, .botFlach { opacity: 0; }
.botKoerper { animation: botSchweben 3.8s ease-in-out infinite; }
.botSchatten { animation: botAtmen 3.8s ease-in-out infinite; }
.botLampe { animation: botLampe 2.6s ease-in-out infinite; }
[data-zustand="ruhig"] .botAugen { animation: botBlinken 5.4s infinite; }
[data-zustand="froh"] .botAugen, [data-zustand="fehler"] .botAugen { opacity: 0; }
[data-zustand="froh"] .botFroh, [data-zustand="fehler"] .botFlach { opacity: 1; }
[data-zustand="froh"] .botKoerper { animation: botHuepfen 700ms cubic-bezier(0.3, 1.6, 0.5, 1) 2, botSchweben 3.8s ease-in-out 1.4s infinite; }
@keyframes botSchweben { 50% { transform: translateY(-3px); } }
@keyframes botAtmen { 50% { transform: scaleX(0.88); opacity: 0.65; } }
@keyframes botLampe { 50% { opacity: 0.4; } }
@keyframes botBlinken { 0%, 46%, 50%, 100% { transform: scaleY(1); } 48% { transform: scaleY(0.1); } }
@keyframes botHuepfen { 40% { transform: translateY(-9px); } }

/* =====================================================================
   Cockpit
   ===================================================================== */

.cockpit { height: 100vh; overflow: hidden; }
.cockpit #app { height: 100%; }

/* --- Anmeldung --- */
.tor { height: 100%; display: grid; place-items: center; padding: 20px; }
.tor form { width: min(380px, 100%); padding: 32px 28px; display: grid; gap: 16px; text-align: center; justify-items: stretch; }
.tor .bot { justify-self: center; }

/* --- Rahmen --- */
.rahmen { height: 100%; display: grid; grid-template-columns: 224px 1fr; }
.leiste-seite {
  background:
    radial-gradient(18rem 14rem at 0% 0%, rgba(39, 224, 255, 0.16), transparent 70%),
    linear-gradient(180deg, var(--nacht) 0%, var(--nacht-hoch) 100%);
  color: #dbe7ff; padding: 18px 12px; display: flex; flex-direction: column; gap: 4px;
}
.leiste-seite .marke { display: flex; align-items: center; gap: 10px; padding: 4px 8px 18px; }
.leiste-seite .marke strong { display: block; color: #fff; font-size: 16px; letter-spacing: -0.2px; }
.leiste-seite .marke span { font-size: 12px; color: #8fa6cc; }
.leiste-seite nav { display: grid; gap: 4px; }
.leiste-seite nav button, .leiste-seite .unten button {
  display: flex; align-items: center; gap: 12px; width: 100%; text-align: left;
  padding: 11px 12px; border-radius: 12px; color: #b9cbec; font-weight: 580;
}
.leiste-seite nav button:hover, .leiste-seite .unten button:hover { background: rgba(255,255,255,0.06); color: #fff; }
.leiste-seite nav button[aria-current="page"] {
  background: linear-gradient(135deg, rgba(15,111,255,0.55), rgba(0,194,240,0.30));
  color: #fff; box-shadow: inset 0 0 0 1px rgba(39,224,255,0.35), 0 6px 22px rgba(0,150,255,0.25);
}
.leiste-seite nav .emoji { font-size: 17px; width: 22px; text-align: center; }
.leiste-seite .zahl {
  margin-left: auto; min-width: 22px; padding: 1px 7px; border-radius: 999px; text-align: center;
  background: var(--leucht); color: var(--nacht); font-size: 12px; font-weight: 750;
}
.leiste-seite .unten { margin-top: auto; }

.flaeche { min-width: 0; height: 100%; overflow: auto; }
.seite { padding: 26px 28px 60px; max-width: 1240px; display: grid; gap: 20px; }
.seitenkopf { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.seitenkopf p { color: var(--ink-dim); margin-top: 2px; }
.reihe { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }

/* --- Übersicht --- */
.kacheln { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 14px; }
.kachel { padding: 18px; display: grid; gap: 4px; text-align: left; }
button.kachel:hover { box-shadow: var(--glanz); border-color: rgba(15,111,255,0.3); }
.kachel .wert { font-size: 34px; font-weight: 740; letter-spacing: -1px; line-height: 1.1; }
.kachel .name { color: var(--ink-dim); font-weight: 560; font-size: 13.5px; }
.kachel.leuchtet { background: var(--verlauf); color: #fff; border: 0; box-shadow: var(--glanz-hoch); }
.kachel.leuchtet .name { color: rgba(255,255,255,0.85); }

.raster { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 14px; }
.tafel { padding: 18px; display: grid; gap: 12px; align-content: start; }
.balkenliste { display: grid; gap: 9px; }
.balkenzeile { display: grid; grid-template-columns: minmax(90px, 38%) 1fr 30px; gap: 10px; align-items: center; font-size: 14px; }
button.balkenzeile { width: 100%; text-align: left; padding: 3px 6px; margin: -3px -6px; border-radius: 8px; }
button.balkenzeile:hover { background: var(--flaeche-hoch); }
.balkenzeile .name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.balkenzeile .bahn { height: 10px; border-radius: 5px; background: var(--flaeche-hoch); overflow: hidden; }
.balkenzeile .bahn span { display: block; height: 100%; border-radius: 5px; background: var(--verlauf); min-width: 3px; }
.balkenzeile .anzahl { text-align: right; font-weight: 650; font-variant-numeric: tabular-nums; }
.balkenzeile.unter .name { padding-left: 14px; color: var(--ink-dim); }
.balkenzeile.unter .bahn span { background: var(--cyan); opacity: 0.75; }

.wochen { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 8px; align-items: end; height: 130px; }
.wochen .saeule { display: grid; grid-template-rows: 18px 1fr 18px; gap: 4px; height: 100%; text-align: center; font-size: 12px; color: var(--ink-dim); }
.wochen .saeule .stab { align-self: end; border-radius: 6px 6px 3px 3px; background: var(--verlauf); min-height: 3px; }
.wochen .saeule .n { font-weight: 650; color: var(--ink); align-self: end; }

/* --- Postfach --- */
.postfach { height: 100%; display: grid; grid-template-columns: 212px minmax(330px, 430px) 1fr; }
.postfach > * { min-height: 0; min-width: 0; }

.orte { padding: 22px 10px 20px 16px; overflow: auto; display: grid; gap: 14px; align-content: start; border-right: 1px solid var(--rand); }
.orte ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.orte button {
  width: 100%; display: flex; align-items: center; gap: 8px; text-align: left;
  padding: 8px 10px; border-radius: 10px; font-weight: 560; font-size: 14px;
}
.orte button:hover { background: var(--flaeche-hoch); }
.orte button[aria-pressed="true"] { background: var(--blau); color: #fff; }
.orte .unter button { padding-left: 34px; font-weight: 500; color: var(--ink-dim); }
.orte .unter button[aria-pressed="true"] { color: #fff; }
.orte .n { margin-left: auto; font-size: 12.5px; font-variant-numeric: tabular-nums; opacity: 0.75; }
.orte .neu {
  min-width: 18px; padding: 0 5px; border-radius: 9px; background: var(--leucht); color: var(--nacht);
  font-size: 11px; font-weight: 750; text-align: center;
}

.eingang { display: grid; grid-template-rows: auto 1fr; border-right: 1px solid var(--rand); background: rgba(255,255,255,0.55); }
.werkzeuge { padding: 18px 14px 12px; display: grid; gap: 10px; border-bottom: 1px solid var(--rand); }
.werkzeuge .zeile { display: flex; gap: 8px; }
.werkzeuge select { width: auto; min-height: 40px; padding: 6px 10px; font-size: 14px; }
.werkzeuge input[type="search"] { min-height: 40px; }
.reiter { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 2px; scrollbar-width: none; }
.reiter::-webkit-scrollbar { display: none; }
.reiter button {
  flex: none; padding: 6px 12px; border-radius: 999px; font-size: 13.5px; font-weight: 600;
  background: var(--flaeche); border: 1px solid var(--rand-fest); color: var(--ink-dim);
}
.reiter button[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: #fff; }
.reiter .n { opacity: 0.6; margin-left: 5px; font-variant-numeric: tabular-nums; }

.liste { overflow: auto; }
.liste .gruppe { padding: 12px 16px 6px; position: sticky; top: 0; background: rgba(242,246,253,0.94); backdrop-filter: blur(6px); z-index: 1; }
.zeile-b {
  width: 100%; display: grid; grid-template-columns: 42px 1fr auto; gap: 12px; text-align: left;
  padding: 12px 14px; border-bottom: 1px solid var(--rand); align-items: start;
}
.zeile-b:hover { background: var(--flaeche); }
.zeile-b[aria-current="true"] { background: var(--flaeche); box-shadow: inset 3px 0 0 var(--blau); }
.zeile-b .wer { font-weight: 560; display: flex; align-items: center; gap: 7px; }
.zeile-b.neu .wer { font-weight: 720; }
.zeile-b.neu .wer::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--blau); box-shadow: 0 0 0 3px var(--blau-weich); flex: none; }
.zeile-b .kurz { display: block; font-size: 13.5px; color: var(--ink-dim); margin: 1px 0 7px; }
.zeile-b .rechts { text-align: right; font-size: 12.5px; color: var(--ink-dim); display: grid; gap: 4px; justify-items: end; }
.zeile-b .gold { color: #e0a100; letter-spacing: 1px; }

.bild {
  width: 42px; height: 42px; border-radius: 14px; display: grid; place-items: center;
  font-weight: 700; font-size: 14px; color: #fff; background: var(--verlauf); flex: none;
}
.bild.f1 { background: linear-gradient(135deg, #7b5cff, #b06cff); }
.bild.f2 { background: linear-gradient(135deg, #0a9d6c, #2fd0a0); }
.bild.f3 { background: linear-gradient(135deg, #e0711b, #f5b03c); }
.bild.gross { width: 58px; height: 58px; border-radius: 18px; font-size: 19px; }

.marken { display: flex; flex-wrap: wrap; gap: 5px; }
.marke-k {
  padding: 2px 9px; border-radius: 999px; font-size: 12px; font-weight: 600;
  background: var(--flaeche-hoch); color: #33507d; white-space: nowrap;
}
.marke-k.art { background: var(--blau-weich); color: var(--blau); }
.marke-k.gut { background: var(--gruen-weich); color: var(--gruen); }
.marke-k.warn { background: var(--warn-weich); color: var(--warn); }
.marke-k.status-kontaktiert { background: rgba(123,92,255,0.12); color: var(--violett); }
.marke-k.status-eingeladen { background: var(--warn-weich); color: var(--warn); }
.marke-k.status-zusage { background: var(--gruen-weich); color: var(--gruen); }
.marke-k.status-absage { background: var(--rot-weich); color: var(--rot); }

.leer { padding: 60px 24px; text-align: center; color: var(--ink-dim); display: grid; gap: 10px; justify-items: center; align-content: center; }

.akte { overflow: auto; }
.akte .innen { padding: 24px 26px 60px; max-width: 760px; display: grid; gap: 18px; }
.akte .zurueck { display: none; }
.akte header { display: flex; gap: 16px; align-items: center; }
.akte header .kurz { color: var(--ink-dim); margin-top: 2px; }
.fakten { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; }
.fakt { padding: 12px 14px; border-radius: 14px; background: var(--flaeche); border: 1px solid var(--rand); }
.fakt .was { font-size: 12px; color: var(--ink-dim); font-weight: 600; }
.fakt .wert { font-weight: 650; margin-top: 2px; overflow-wrap: anywhere; }
.statuswahl { display: flex; flex-wrap: wrap; gap: 6px; }
.statuswahl button {
  padding: 7px 14px; border-radius: 999px; font-size: 13.5px; font-weight: 600;
  background: var(--flaeche); border: 1px solid var(--rand-fest); color: var(--ink-dim);
}
.statuswahl button[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: #fff; }
/* --- Formular-Baukasten --- */
.baukasten { display: grid; gap: 16px; }
.block { padding: 18px; display: grid; gap: 14px; }
.block > header { display: flex; align-items: center; gap: 10px; }
.block > header input[type="text"] { font-weight: 650; font-size: 16px; }
.emoji-feld { width: 54px !important; text-align: center; padding: 10px 4px !important; flex: none; }
.zweispaltig { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.eintraege { display: grid; gap: 6px; align-content: start; }
.eintrag { display: flex; align-items: center; gap: 6px; }
.eintrag input[type="text"] { min-height: 38px; padding: 6px 12px; }
.eintrag.aus input[type="text"] { color: var(--ink-dim); text-decoration: line-through; }

.schalter { position: relative; display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--ink-dim); font-weight: 600; cursor: pointer; flex: none; }
.schalter input { position: absolute; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.schalter i { width: 34px; height: 20px; border-radius: 10px; background: #c9d3e4; position: relative; transition: background 140ms; flex: none; }
.schalter i::after { content: ""; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: transform 140ms; box-shadow: 0 1px 3px rgba(0,0,0,0.2); }
.schalter input:checked + i { background: var(--blau); }
.schalter input:checked + i::after { transform: translateX(14px); }
.schalter input:disabled + i { opacity: 0.45; }
.schalter input:focus-visible + i { outline: 2px solid var(--blau); outline-offset: 2px; }

.linkzeile { display: grid; grid-template-columns: 1fr auto; gap: 8px; align-items: center; }
.linkzeile input { font-size: 13.5px; font-family: ui-monospace, "SF Mono", Menlo, monospace; }
.formzeile { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; }

.toast {
  position: fixed; left: 50%; bottom: 28px; transform: translateX(-50%); z-index: 50;
  padding: 11px 20px; border-radius: 999px; background: var(--nacht); color: #fff; font-weight: 560;
  box-shadow: 0 12px 34px rgba(10,24,48,0.35); animation: toast 220ms cubic-bezier(0.2, 0.9, 0.3, 1);
}
.toast.schlecht { background: var(--rot); }
@keyframes toast { from { opacity: 0; transform: translate(-50%, 10px); } }

/* =====================================================================
   Zentrale
   ===================================================================== */

input[type="time"] {
  width: 100%; min-height: 46px; padding: 10px 14px;
  background: var(--flaeche); border: 1px solid var(--rand-fest); border-radius: 12px;
}
textarea.kurz { min-height: 64px; }
.haupt.klein { min-height: 40px; padding: 0 18px; font-size: 14px; white-space: nowrap; }
.luft { flex: 1; }
.vorformatiert { white-space: pre-wrap; overflow-wrap: anywhere; }
.seite.schmal { max-width: 900px; }
.leer .gross { font-size: 34px; }

/* --- Farben der Personen: Kürzelbild und Kalender teilen sie sich --- */
.f0 { --f: #0f6fff; } .f1 { --f: #7b5cff; } .f2 { --f: #0a9d6c; }
.f3 { --f: #d9731c; } .f4 { --f: #d6336c; } .f5 { --f: #0b8fa8; }
.bild[class*=" f"], .bild[class^="f"] { background: linear-gradient(135deg, var(--f), color-mix(in srgb, var(--f) 62%, #fff)); }
.bild.klein { width: 26px; height: 26px; border-radius: 9px; font-size: 10.5px; }
.bild.mehr { background: var(--flaeche-hoch); color: var(--ink-dim); }
.stapel { display: flex; flex: none; }
.stapel .bild { margin-left: -6px; box-shadow: 0 0 0 2px var(--flaeche); }
.stapel .bild:first-child { margin-left: 0; }

.marke-k.rot { background: var(--rot-weich); color: var(--rot); }
.marke-k.status-laeuft { background: var(--blau-weich); color: var(--blau); }
.marke-k.status-wartet { background: rgba(123,92,255,0.12); color: var(--violett); }
.marke-k.urteil-ja, .marke-k.urteil-zusage { background: var(--gruen-weich); color: var(--gruen); }
.marke-k.urteil-vielleicht, .marke-k.urteil-zweiter { background: var(--warn-weich); color: var(--warn); }
.marke-k.urteil-nein, .marke-k.urteil-absage { background: var(--rot-weich); color: var(--rot); }

/* --- Seitenleiste: wer angemeldet ist --- */
.leiste-seite .kurzname { display: none; }
.leiste-seite .ich { padding: 10px 12px; display: grid; }
.leiste-seite .ich strong { color: #fff; font-size: 14px; }
.leiste-seite .ich span { font-size: 12px; color: #8fa6cc; }
.leiste-seite .zahl.ruhig { background: rgba(255,255,255,0.14); color: #fff; }

/* --- Zeilen: Aufgabe, Termin, Person --- */
.zeilen { display: grid; margin: 0 -8px; }
.tafelkopf { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 26px; }
.zeile-a {
  display: grid; grid-template-columns: 26px 1fr auto; gap: 10px; align-items: center;
  padding: 10px 8px; border-bottom: 1px solid var(--rand); cursor: pointer;
}
.zeilen > :last-child, .liste > .zeile-a:last-child { border-bottom: 0; }
.zeile-a:hover { background: var(--flaeche-hoch); }
.liste .zeile-a { border-radius: 0; padding: 12px 14px; }
.liste .zeile-a:hover { background: var(--flaeche); }
.zeile-a[aria-current="true"] { background: var(--flaeche); box-shadow: inset 3px 0 0 var(--blau); }
.zeile-a .mitte, .zeile-t .mitte, .zeile-p .mitte { min-width: 0; display: grid; gap: 5px; }
.zeile-a .titel, .zeile-t .titel, .zeile-p .titel { font-weight: 580; overflow-wrap: anywhere; }
.zeile-a.fertig .titel { text-decoration: line-through; color: var(--ink-dim); font-weight: 500; }
.zeile-a .rechts { display: flex; align-items: center; gap: 8px; }
.frei { font-size: 12px; color: var(--ink-dim); border: 1px dashed var(--rand-fest); border-radius: 999px; padding: 1px 8px; white-space: nowrap; }
.wer-klein { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--ink-dim); }

.rund {
  width: 24px; height: 24px; border-radius: 50%; border: 2px solid #b8c6dd; color: transparent;
  display: grid; place-items: center; font-size: 13px; font-weight: 800; line-height: 1;
  transition: background 120ms, border-color 120ms, color 120ms;
}
.rund:hover { border-color: var(--gruen); color: var(--gruen); }
.rund[aria-pressed="true"] { background: var(--gruen); border-color: var(--gruen); color: #fff; }

.zeile-t {
  display: grid; grid-template-columns: 58px 1fr auto; gap: 10px; align-items: center; width: 100%;
  padding: 10px 8px; border-bottom: 1px solid var(--rand); text-align: left;
}
.zeile-t:hover { background: var(--flaeche-hoch); }
.zeile-t .zeit { font-weight: 700; font-variant-numeric: tabular-nums; color: var(--blau); display: grid; font-size: 14px; }
.zeile-t .zeit small { font-weight: 500; color: var(--ink-dim); font-size: 12px; }

.zeile-p {
  display: grid; grid-template-columns: 42px 1fr auto; gap: 12px; align-items: center; width: 100%;
  padding: 10px 8px; border-bottom: 1px solid var(--rand); text-align: left;
}
button.zeile-p:hover { background: var(--flaeche-hoch); }
.zeile-p.aus { opacity: 0.55; }
.zeile-p .rechts { display: flex; align-items: center; gap: 10px; }
.zeilen .zeile-b { padding: 12px 8px; }
.zeilen .zeile-b:hover { background: var(--flaeche-hoch); }
.zeile-b .marken { margin-top: 2px; }

/* --- Mein Tag --- */
.zweier { display: grid; grid-template-columns: 1.15fr 1fr; gap: 14px; align-items: start; }
.spalte { display: grid; gap: 14px; align-content: start; min-width: 0; }
.zettel { position: relative; overflow: hidden; }
.zettel::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 3px; background: var(--verlauf); }
.tagkopf { padding: 12px 8px 2px; font-size: 12px; font-weight: 650; text-transform: uppercase; letter-spacing: 0.6px; color: var(--ink-dim); }

/* --- Aufgaben: offene Aufgabe --- */
.liste .gruppe.rot { color: var(--rot); }
.werkzeuge .zeile { align-items: center; }
.titelfeld {
  font-size: 22px !important; font-weight: 720; letter-spacing: -0.3px;
  border-color: transparent !important; background: transparent !important; padding: 6px 8px !important; margin: 0 -8px;
}
.titelfeld:hover { border-color: var(--rand-fest) !important; }
.titelfeld:focus { background: var(--flaeche) !important; border-color: var(--blau) !important; }
.akte .fakten { grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); }
.fakt select, .fakt input { min-height: 34px; padding: 4px 8px; margin-top: 4px; font-weight: 600; font-size: 14px; border-radius: 9px; }
.verlauf { display: grid; gap: 12px; }
.eintrag-v { display: grid; grid-template-columns: 26px 1fr; gap: 10px; align-items: start; font-size: 14px; }
.eintrag-v.ereignis { color: var(--ink-dim); }
.kopf-v { display: flex; justify-content: space-between; gap: 10px; align-items: baseline; }
.kopf-v .dim { font-size: 12px; white-space: nowrap; }
.blase { background: var(--flaeche); border: 1px solid var(--rand); border-radius: 4px 14px 14px 14px; padding: 9px 12px; margin-top: 4px; white-space: pre-wrap; overflow-wrap: anywhere; }
.antwort { display: grid; grid-template-columns: 1fr auto; gap: 8px; align-items: end; }

/* --- Fenster --- */
dialog.fenster {
  border: 0; padding: 0; border-radius: 22px; color: var(--ink); background: var(--bg);
  width: min(560px, calc(100vw - 24px)); box-shadow: 0 30px 80px rgba(10, 24, 48, 0.35);
}
dialog.fenster.breit { width: min(680px, calc(100vw - 24px)); }
dialog.fenster::backdrop { background: rgba(10, 24, 48, 0.45); backdrop-filter: blur(3px); }
dialog.fenster form { display: grid; grid-template-rows: auto 1fr auto; max-height: calc(100dvh - 40px); }
dialog.fenster header { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 18px 20px 6px; }
dialog.fenster .inhalt { padding: 10px 20px 18px; overflow: auto; display: grid; gap: 16px; align-content: start; }
dialog.fenster footer { display: flex; gap: 8px; align-items: center; padding: 12px 20px 16px; border-top: 1px solid var(--rand); background: var(--flaeche); }
dialog.fenster footer .haupt { min-height: 40px; }
.chip.mitbild { display: inline-flex; align-items: center; gap: 8px; padding-left: 7px; }
.chip.klein { min-height: 34px; font-size: 13px; padding-right: 12px; }
.chip.fest { cursor: default; }
.chip.fest:hover { border-color: var(--rand-fest); }
.eintrag .schalter { white-space: nowrap; color: var(--ink); font-size: 14px; }

/* --- Kalender --- */
.kalenderseite { max-width: none; }
.wer-leiste { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.wochenrahmen { overflow: auto; }
.woche { display: grid; grid-template-columns: 52px repeat(7, minmax(112px, 1fr)); min-width: 836px; }
.tagkopf-k { padding: 8px 6px; border-left: 1px solid var(--rand); border-bottom: 1px solid var(--rand); display: grid; gap: 3px; align-content: start; min-width: 0; }
.ecke { border-bottom: 1px solid var(--rand); }
.tagkopf-k .datum { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--ink-dim); font-weight: 600; padding: 0 2px 4px; }
.tagkopf-k .datum strong { font-size: 18px; color: var(--ink); width: 32px; height: 32px; display: grid; place-items: center; border-radius: 50%; }
.tagkopf-k.heute .datum strong { background: var(--verlauf); color: #fff; box-shadow: var(--glanz); }
.ganztag, .faellig {
  width: 100%; text-align: left; font-size: 12px; font-weight: 600; padding: 3px 7px; border-radius: 7px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.ganztag { background: var(--f); color: #fff; }
.faellig { background: var(--flaeche-hoch); color: #33507d; }
.stunden { display: grid; }
.stunden span { height: 46px; font-size: 11px; color: var(--ink-dim); text-align: right; padding-right: 8px; transform: translateY(-7px); font-variant-numeric: tabular-nums; }
.stunden span:first-child { visibility: hidden; }
.tagspalte {
  position: relative; height: calc(17 * 46px); border-left: 1px solid var(--rand); cursor: cell;
  background-image: linear-gradient(var(--rand) 1px, transparent 1px); background-size: 100% 46px;
}
.tagspalte.heute { background-color: rgba(15, 111, 255, 0.035); }
.tblock {
  position: absolute; border-radius: 8px; padding: 4px 7px; font-size: 12px; line-height: 1.3; text-align: left;
  overflow: hidden; color: #fff;
  background: linear-gradient(160deg, var(--f), color-mix(in srgb, var(--f) 78%, #fff));
  box-shadow: 0 2px 8px color-mix(in srgb, var(--f) 30%, transparent);
}
.tblock:hover { filter: brightness(1.06); z-index: 2; }
.tblock strong, .tblock span { display: block; }
.tblock strong { font-weight: 650; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tblock.kurz { padding: 1px 7px; }
.tblock.kurz span { display: none; }
.tblock span { opacity: 0.9; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tblock.belegt, .ganztag.belegt {
  color: var(--ink-dim); box-shadow: none;
  background: repeating-linear-gradient(135deg, #e3eaf6 0 6px, #eef2fa 6px 12px);
}
.jetzt { position: absolute; left: 0; right: 0; height: 2px; background: var(--rot); pointer-events: none; z-index: 3; }
.jetzt::before { content: ""; position: absolute; left: -4px; top: -3px; width: 8px; height: 8px; border-radius: 50%; background: var(--rot); }

/* --- Bereiche --- */
.raster.breit { grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); }
.bereichskarte { padding: 18px; display: grid; gap: 14px; align-content: start; }
.bereichskarte.meiner { border-color: rgba(15, 111, 255, 0.35); }
.bereichskarte > header { display: flex; align-items: center; gap: 12px; }
.bereichskarte > header > div:nth-child(2) { flex: 1; min-width: 0; }
.bereichskarte > header .emoji { font-size: 30px; }
.zahlen-b { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.zahl-b { background: var(--flaeche-hoch); border-radius: 12px; padding: 8px 10px; display: grid; }
.zahl-b strong { font-size: 20px; letter-spacing: -0.5px; }
.zahl-b span { font-size: 12px; color: var(--ink-dim); }
.zahl-b.warn { background: var(--warn-weich); } .zahl-b.warn strong { color: var(--warn); }
.zahl-b.rot { background: var(--rot-weich); } .zahl-b.rot strong { color: var(--rot); }
.bereichskarte > footer { display: flex; gap: 8px; flex-wrap: wrap; }

/* --- Probearbeiten --- */
.ablaufseite { display: grid; grid-template-columns: 1fr 340px; gap: 16px; align-items: start; }
.empfehlung { position: sticky; top: 16px; display: grid; gap: 14px; }
.urteil { padding: 18px; display: grid; gap: 12px; border-top: 4px solid #b8c6dd; }
.urteil .gross { font-size: 26px; font-weight: 740; letter-spacing: -0.5px; line-height: 1.15; }
.urteil ul { margin: 4px 0 0; padding-left: 18px; font-size: 14px; display: grid; gap: 3px; }
.urteil-ja .urteil { border-top-color: var(--gruen); background: linear-gradient(180deg, rgba(10,157,108,0.10), var(--flaeche) 46%); }
.urteil-ja .urteil .gross { color: var(--gruen); }
.urteil-vielleicht .urteil { border-top-color: var(--warn); background: linear-gradient(180deg, rgba(199,106,0,0.10), var(--flaeche) 46%); }
.urteil-vielleicht .urteil .gross { color: var(--warn); }
.urteil-nein .urteil { border-top-color: var(--rot); background: linear-gradient(180deg, rgba(217,45,32,0.09), var(--flaeche) 46%); }
.urteil-nein .urteil .gross { color: var(--rot); }
.punkte { display: flex; align-items: center; gap: 8px; }
.punkte .bahn { flex: 1; height: 10px; border-radius: 5px; background: var(--flaeche-hoch); overflow: hidden; }
.punkte .bahn span { display: block; height: 100%; border-radius: 5px; background: var(--verlauf); transition: width 300ms; }
.punkte strong { font-size: 20px; font-variant-numeric: tabular-nums; }
.schrittnr { width: 38px; height: 38px; border-radius: 13px; background: var(--verlauf); color: #fff; font-weight: 750; display: grid; place-items: center; flex: none; box-shadow: var(--glanz); }
.stationen { display: grid; gap: 8px; }
.station { display: flex; gap: 12px; padding: 12px 14px; border-radius: 14px; border: 1px solid var(--rand); background: #fbfcff; cursor: pointer; }
.station input { width: 22px; height: 22px; margin: 1px 0 0; flex: none; accent-color: var(--gruen); }
.station > div { flex: 1; min-width: 0; }
.station.fertig { background: var(--gruen-weich); border-color: rgba(10,157,108,0.25); }
.station p { font-size: 14px; margin-top: 3px; }
.station .achten { color: var(--ink-dim); font-size: 13.5px; }
.kopf-s { display: flex; justify-content: space-between; gap: 10px; align-items: baseline; }
.kriterien { display: grid; }
.kriterium { display: grid; grid-template-columns: 1fr auto; gap: 14px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--rand); }
.kriterium:last-child { border-bottom: 0; }
.kriterium .marke-k { margin-left: 8px; }
.noten { display: flex; gap: 6px; }
.note { width: 42px; height: 42px; border-radius: 13px; border: 1px solid var(--rand-fest); background: var(--flaeche); font-weight: 700; color: var(--ink-dim); transition: transform 100ms; }
.note:hover { border-color: var(--blau); color: var(--ink); }
.note:active { transform: scale(0.94); }
.note[aria-pressed="true"] { color: #fff; border-color: transparent; }
.note.n1[aria-pressed="true"], .note.n2[aria-pressed="true"] { background: var(--rot); }
.note.n3[aria-pressed="true"] { background: var(--warn); }
.note.n4[aria-pressed="true"], .note.n5[aria-pressed="true"] { background: var(--gruen); }

/* --- Schmaler --- */
@media (max-width: 1180px) {
  .postfach { grid-template-columns: minmax(300px, 400px) 1fr; grid-template-rows: auto 1fr; }
  .orte { grid-column: 1 / -1; border-right: 0; border-bottom: 1px solid var(--rand); padding: 12px 14px; display: flex; gap: 6px; overflow-x: auto; }
  .orte h3 { display: none; }
  .orte ul { display: flex; gap: 6px; }
  .orte li { display: flex; gap: 6px; }
  .orte button { width: auto; white-space: nowrap; border: 1px solid var(--rand-fest); border-radius: 999px; padding: 6px 12px; background: var(--flaeche); }
  .zweier, .ablaufseite { grid-template-columns: 1fr; }
  .empfehlung { position: static; }
}
@media (max-width: 860px) {
  .cockpit { height: 100dvh; }
  .rahmen { grid-template-columns: 1fr; grid-template-rows: 1fr auto; }
  .leiste-seite { order: 2; flex-direction: row; padding: 6px 8px calc(env(safe-area-inset-bottom, 0px) + 6px); gap: 0; }
  .leiste-seite .marke, .leiste-seite .unten { display: none; }
  .leiste-seite nav { grid-auto-flow: column; grid-auto-columns: 1fr; width: 100%; }
  .leiste-seite nav button { flex-direction: column; gap: 2px; padding: 6px 2px; font-size: 11px; text-align: center; position: relative; }
  .leiste-seite .lang { display: none; }
  .leiste-seite .kurzname { display: inline; }
  .leiste-seite .zahl { position: absolute; top: 2px; left: 54%; margin: 0; }
  .seite { padding: 18px 14px 40px; }
  .postfach { grid-template-columns: 1fr; position: relative; }
  .eingang { border-right: 0; }
  .akte { position: absolute; inset: 0; background: var(--bg); z-index: 3; display: none; }
  .postfach.offen .akte { display: block; }
  .akte .zurueck { display: inline-flex; }
  .akte .innen { padding: 14px 14px 50px; }
  .zweispaltig { grid-template-columns: 1fr; }
  .kriterium { grid-template-columns: 1fr; gap: 8px; }
  .zeile-p { grid-template-columns: 42px 1fr; }
  .zeile-p .rechts { grid-column: 2; flex-wrap: wrap; }
  h1 { font-size: 24px; }
  input, select, textarea { font-size: 16px; }  /* sonst zoomt iOS beim Antippen */
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
