/* ==========================================================================
   DNHC Verwaltung – Oberfläche „Petrol & Aprikose“
   Eigenes Stylesheet ohne externe Abhängigkeiten (nur Systemschriften).

   Konzept:
   - Markenfarbe Petrol (#004c66): ruhig, vertrauenswürdig, „Bildung“.
   - Akzent Aprikose (#e7df02): Wärme, Hervorhebungen, aktive Markierung.
   - Warme, papierähnliche Grautöne statt kaltem Blaugrau.
   - Weiche Rundungen (8–14 px), feine Ränder, dezente Schatten.
   Alle Text/Hintergrund-Paare sind auf WCAG AA (≥ 4,5 : 1) ausgelegt.
   ========================================================================== */

/* „hidden“ gilt immer – auch bei Elementen, die sonst display:flex o. Ä. haben (z. B. Knöpfe) */
[hidden] { display: none !important; }

:root {
  color-scheme: light;

  /* Marke */
  --marke: #004c66;          /* Petrol – Weiß darauf 5,5 : 1 */
  --marke-dunkel: #003a4f;
  --marke-tief: #002c3c;
  --marke-hell: #e6f0f4;
  --marke-rand: #b9d2dc;
  --warm: #e7df02;           /* Aprikose – nur Flächen/Akzente, Text darauf dunkel */
  --warm-hell: #fbf8d4;
  --warm-text: #5e5a00;

  /* Kompatible Namen (werden auch in Vorlagen genutzt) */
  --akzent: var(--marke);
  --akzent-hell: var(--marke-hell);

  /* Neutrale Töne (warm) */
  --bg: #eef5f8;
  --flaeche: #ffffff;
  --flaeche-2: #f5f9fb;
  --flaeche-3: #e6f0f4;
  --rand: #d5e3e9;
  --rand-stark: #bfd3db;
  --text: #12303b;
  --text-leise: #4a5a60;     /* auf Weiß 5,6 : 1, auf --bg 5,2 : 1 */
  --text-blass: #6f8a94;

  /* Signalfarben */
  --gruen: #557f0a;
  --rot: #c02b0a;
  --rot-tief: #c02b0a;
  --orange: #ea580c;
  --gelb: #b45309;

  /* Seitenleiste */
  --seite: #00394d;
  --seite-2: #004c66;
  --seite-text: #d3e5eb;
  --seite-leise: #93b6c3;

  /* Form */
  --radius-s: 6px;
  --radius: 10px;
  --radius-l: 14px;
  --schatten-s: 0 1px 2px rgba(18, 48, 59, .06);
  --schatten: 0 1px 2px rgba(18, 48, 59, .05), 0 2px 6px rgba(18, 48, 59, .05);
  --schatten-m: 0 4px 12px rgba(18, 48, 59, .08), 0 1px 3px rgba(18, 48, 59, .06);
  --schatten-l: 0 16px 40px rgba(0, 57, 77, .16), 0 4px 12px rgba(0, 57, 77, .08);
  --fokus: 0 0 0 3px rgba(0, 76, 102, .22);

  --schrift: "Segoe UI Variable Text", "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont,
             "Helvetica Neue", Roboto, "Noto Sans", Arial, sans-serif;
  --schrift-titel: "Segoe UI Variable Display", "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont,
             "Helvetica Neue", Roboto, "Noto Sans", Arial, sans-serif;
  --schrift-mono: ui-monospace, "Cascadia Mono", "Consolas", "SFMono-Regular", Menlo, monospace;
}

/* --------------------------------------------------------------------------
   Grundlagen
   -------------------------------------------------------------------------- */
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
html { -webkit-text-size-adjust: 100%; }
body {
  font: 14px/1.55 var(--schrift);
  color: var(--text); background: var(--bg);
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}
::selection { background: #cdebe5; color: var(--text); }
a { color: var(--marke); text-decoration: none; text-underline-offset: 2px; }
a:hover { color: var(--marke-dunkel); text-decoration: underline; }
a:focus-visible, button:focus-visible, summary:focus-visible, [tabindex]:focus-visible {
  outline: none; box-shadow: var(--fokus); border-radius: var(--radius-s);
}
h1, h2, h3 { font-family: var(--schrift-titel); color: var(--text); }
h1 { font-size: 26px; line-height: 1.2; font-weight: 700; letter-spacing: -.015em; margin: 0 0 4px; }
h2 { font-size: 16px; line-height: 1.3; font-weight: 650; margin: 28px 0 10px; letter-spacing: -.005em; }
code { font-family: var(--schrift-mono); font-size: 12.5px; background: var(--flaeche-3); border: 1px solid var(--rand); border-radius: 5px; padding: 1px 6px; }
hr { border: 0; border-top: 1px solid var(--rand); }
.leise { color: var(--text-leise); }
.klein { font-size: 12.5px; }
strong { font-weight: 650; }
summary { cursor: pointer; }

.ico {
  width: 18px; height: 18px; flex: none;
  fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round;
}

/* --------------------------------------------------------------------------
   Layout: Seitenleiste + Inhalt
   -------------------------------------------------------------------------- */
.rahmen { display: flex; min-height: 100vh; }
.menue-schalter { position: absolute; opacity: 0; pointer-events: none; width: 1px; height: 1px; }

.seitenleiste {
  width: 252px; flex: none; color: var(--seite-text);
  background:
    radial-gradient(120% 60% at 0% 0%, rgba(231, 223, 2, .10), transparent 60%),
    linear-gradient(180deg, var(--seite-2) 0%, var(--seite) 38%);
  position: sticky; top: 0; height: 100vh;
  display: flex; flex-direction: column;
  border-right: 1px solid rgba(0, 0, 0, .2);
}
.seitenleiste .marke-zeile { display: flex; align-items: center; gap: 10px; padding: 18px 16px 14px; }
.seitenleiste .marke {
  color: #fff; font-family: var(--schrift-titel); font-weight: 700; font-size: 15px; line-height: 1.15;
  display: flex; align-items: center; gap: 10px; text-decoration: none; letter-spacing: -.005em;
}
.seitenleiste .marke:hover { color: #fff; text-decoration: none; }
.marke-zeichen {
  width: 36px; height: 36px; border-radius: 11px; flex: none;
  display: inline-flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, #d4cc00 0%, var(--warm) 45%, #e9792f 100%);
  color: #004c66; font-weight: 800; font-size: 14px; letter-spacing: -.02em;
  box-shadow: 0 4px 12px rgba(231, 223, 2, .35), inset 0 1px 0 rgba(255, 255, 255, .45);
}
.marke-text small { display: block; font-weight: 500; font-size: 11.5px; color: var(--seite-leise); letter-spacing: .01em; margin-top: 2px; }
.menue-knopf { display: none; }

.nav-inhalt {
  flex: 1; min-height: 0; overflow-y: auto; padding: 4px 10px 12px;
  display: flex; flex-direction: column; gap: 1px;
  scrollbar-width: thin; scrollbar-color: rgba(255, 255, 255, .15) transparent;
}
.seitenleiste a {
  color: var(--seite-text); display: flex; align-items: center; gap: 10px;
  padding: 7px 10px; border-radius: 8px; position: relative; font-weight: 500;
  transition: background-color .15s, color .15s;
}
.seitenleiste a .ico { width: 17px; height: 17px; opacity: .8; }
.seitenleiste a:hover { background: rgba(255, 255, 255, .06); text-decoration: none; color: #fff; }
.seitenleiste a:hover .ico { opacity: 1; }
.seitenleiste a.aktiv { background: rgba(255, 255, 255, .10); color: #fff; }
.seitenleiste a.aktiv .ico { opacity: 1; color: var(--warm); }
.seitenleiste a.aktiv::before {
  content: ""; position: absolute; left: -10px; top: 7px; bottom: 7px; width: 3px;
  border-radius: 0 3px 3px 0; background: var(--warm);
}
.seitenleiste a:focus-visible { box-shadow: 0 0 0 2px rgba(231, 223, 2, .7); }
.seitenleiste .abschnitt-titel {
  font-size: 11px; font-weight: 650; text-transform: uppercase; letter-spacing: .08em;
  color: var(--seite-leise); padding: 18px 10px 6px; display: flex; justify-content: space-between; align-items: center;
}
.seitenleiste .abschnitt-titel a { padding: 0; color: var(--seite-leise); font-weight: 650; border-radius: 4px; }
.seitenleiste .abschnitt-titel a:hover { background: none; color: #fff; }
.seitenleiste .abschnitt-titel a[title] {
  width: 20px; height: 20px; justify-content: center; font-size: 13px; border-radius: 6px;
}
.seitenleiste .abschnitt-titel a[title]:hover { background: rgba(255, 255, 255, .1); }
.seitenleiste .projekt-link { font-weight: 400; }
.seitenleiste .projekt-link .punkt { width: 9px; height: 9px; border-radius: 3px; margin: 0 4px 0 4px; box-shadow: 0 0 0 2px rgba(255, 255, 255, .06); }
.seitenleiste .leer-hinweis { color: var(--seite-leise); font-size: 12.5px; padding: 4px 10px; }

.seitenleiste .fuss { padding: 10px; border-top: 1px solid rgba(255, 255, 255, .08); display: flex; flex-direction: column; gap: 1px; }
.konto {
  display: flex; align-items: center; gap: 10px; padding: 10px 8px 4px; margin-top: 6px;
  border-top: 1px solid rgba(255, 255, 255, .06);
}
.konto .avatar { width: 32px; height: 32px; font-size: 11.5px; background: linear-gradient(135deg, #2c8c82, var(--marke)); color: #fff; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .15); }
.konto-name { flex: 1; min-width: 0; line-height: 1.25; }
.konto-name strong { display: block; color: #fff; font-weight: 600; font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.konto-name span { font-size: 11.5px; color: var(--seite-leise); }
.konto form { margin: 0; }
.abmelden-knopf {
  width: 32px; height: 32px; border-radius: 8px; border: 1px solid rgba(255, 255, 255, .12);
  background: transparent; color: var(--seite-text); cursor: pointer; display: inline-flex; align-items: center; justify-content: center;
  transition: background-color .15s, color .15s;
}
.abmelden-knopf:hover { background: rgba(255, 255, 255, .1); color: #fff; }
.abmelden-knopf:focus-visible { outline: none; box-shadow: 0 0 0 2px rgba(231, 223, 2, .7); }
.abmelden-knopf .ico { width: 16px; height: 16px; }

.zaehler {
  margin-left: auto; background: var(--warm); color: #004c66; border-radius: 999px;
  font-size: 11px; font-weight: 700; padding: 0 7px; line-height: 19px; min-width: 20px; text-align: center;
}
.knopf .zaehler { margin-left: 2px; }
.punkt { width: 10px; height: 10px; border-radius: 3px; flex: none; display: inline-block; }

.inhalt { flex: 1; min-width: 0; padding: 30px 40px 72px; max-width: 1480px; }

/* Seitenkopf */
.kopf { display: flex; align-items: center; gap: 14px; margin-bottom: 22px; flex-wrap: wrap; }
.kopf > div > .leise { margin-top: 2px; font-size: 14px; }
.kopf h1 .status { font-family: var(--schrift); letter-spacing: 0; margin-left: 4px; position: relative; top: -2px; }
.kopf .rechts { margin-left: auto; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.kopf .rechts form { margin: 0; }
.pfad { font-size: 12.5px; margin-bottom: 8px; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.pfad a { color: var(--text-leise); display: inline-flex; align-items: center; gap: 6px; }
.pfad a:hover { color: var(--marke); }

/* --------------------------------------------------------------------------
   Grundelemente
   -------------------------------------------------------------------------- */
.karte { background: var(--flaeche); border: 1px solid var(--rand); border-radius: var(--radius-l); box-shadow: var(--schatten); }

.knopf {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  border: 1px solid var(--rand-stark); background: var(--flaeche); color: var(--text);
  padding: 7px 14px; min-height: 36px; border-radius: 9px;
  font: inherit; font-weight: 550; line-height: 1.2; cursor: pointer; text-decoration: none; white-space: nowrap;
  box-shadow: var(--schatten-s);
  transition: background-color .15s, border-color .15s, color .15s, box-shadow .15s, transform .05s;
}
.knopf:hover { background: var(--flaeche-2); border-color: #c6c0b3; color: var(--text); text-decoration: none; }
.knopf:active { transform: translateY(1px); }
.knopf:focus-visible { outline: none; box-shadow: var(--fokus); }
.knopf:disabled, .knopf[disabled] { opacity: .55; cursor: not-allowed; transform: none; }
.knopf.primaer {
  background: linear-gradient(180deg, #13867d 0%, var(--marke) 100%); border-color: var(--marke-dunkel); color: #fff;
  box-shadow: 0 1px 2px rgba(0, 76, 102, .25), inset 0 1px 0 rgba(255, 255, 255, .14);
}
.knopf.primaer:hover { background: var(--marke-dunkel); border-color: var(--marke-tief); color: #fff; }
.knopf.primaer:focus-visible { box-shadow: 0 0 0 3px rgba(0, 76, 102, .35); }
.knopf.gefahr { color: var(--rot-tief); }
.knopf.gefahr:hover { background: #fef2f2; border-color: #f3b4b4; color: var(--rot-tief); }
.knopf.klein { padding: 4px 10px; min-height: 28px; font-size: 12.5px; border-radius: 7px; }
.knopf.aktiv { background: var(--marke-hell); border-color: var(--marke-rand); color: var(--marke-tief); box-shadow: none; }
.knopf.aktiv .leise { color: var(--marke); }
summary.knopf { list-style: none; }
summary.knopf::-webkit-details-marker { display: none; }

/* Formularfelder */
input[type=text], input[type=date], input[type=search], input[type=password], input[type=email],
input[type=number], input[type=tel], input[type=url], input[type=time], input[type=datetime-local],
input[type=month], input:not([type]), select, textarea {
  font: inherit; color: var(--text); border: 1px solid var(--rand-stark); border-radius: 9px;
  padding: 8px 12px; min-height: 38px; background: var(--flaeche); width: 100%;
  box-shadow: inset 0 1px 1px rgba(18, 48, 59, .03);
  transition: border-color .15s, box-shadow .15s, background-color .15s;
}
input::placeholder, textarea::placeholder { color: var(--text-blass); }
input[type=text]:hover, input[type=date]:hover, input[type=search]:hover, input[type=password]:hover,
input[type=email]:hover, input[type=number]:hover, input[type=tel]:hover, input[type=url]:hover,
input[type=time]:hover, input[type=datetime-local]:hover, input:not([type]):hover, select:hover, textarea:hover { border-color: #bdb6a8; }
select {
  appearance: none; -webkit-appearance: none; padding-right: 34px; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%235d686c' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center; background-size: 12px;
}
select[multiple] { background-image: none; padding-right: 12px; min-height: 120px; }
textarea { resize: vertical; min-height: 80px; line-height: 1.5; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--marke); box-shadow: var(--fokus); }
input[type=checkbox], input[type=radio] { accent-color: var(--marke); width: 16px; height: 16px; margin: 0; flex: none; cursor: pointer; }
input[type=file] { font: inherit; color: var(--text-leise); }
input[type=file]::file-selector-button {
  font: inherit; font-weight: 550; margin-right: 10px; padding: 5px 10px; border-radius: 7px;
  border: 1px solid var(--rand-stark); background: var(--flaeche-2); color: var(--text); cursor: pointer;
}
input[type=file]::file-selector-button:hover { background: var(--flaeche-3); }
label { font-weight: 600; font-size: 12.5px; color: var(--text); display: block; margin-bottom: 5px; }
.feld { margin-bottom: 16px; }
fieldset { min-width: 0; }   /* sonst wächst ein fieldset auf die Mindestbreite seiner Tabelle und ragt aus der Karte */
.feld ul { list-style: none; padding: 0; margin: 0; columns: 2; }
.feld ul li { margin: 2px 0; }
.feld ul label { font-weight: 400; font-size: 14px; color: var(--text); display: flex; gap: 8px; align-items: center; }
.fehler { color: var(--rot-tief); font-size: 12.5px; margin-top: 4px; }
.fehler ul { margin: 0; padding-left: 18px; }

/* Meldungen */
.meldungen { list-style: none; padding: 0; margin: 0 0 20px; display: flex; flex-direction: column; gap: 8px; }
.meldungen li {
  padding: 11px 14px 11px 42px; border-radius: var(--radius); position: relative;
  background: #ecfaf3; color: #14532d; border: 1px solid #bfe8d2;
}
.meldungen li::before {
  content: "✓"; position: absolute; left: 13px; top: 50%; transform: translateY(-50%);
  width: 20px; height: 20px; border-radius: 50%; background: #16a34a; color: #fff;
  font-size: 12px; font-weight: 700; display: flex; align-items: center; justify-content: center;
}
.meldungen li.error { background: #fef2f2; color: #7f1d1d; border-color: #f6caca; }
.meldungen li.error::before { content: "!"; background: var(--rot-tief); }
.meldungen li.warning { background: #fffbeb; color: #78350f; border-color: #f6e0a8; }
.meldungen li.warning::before { content: "!"; background: #d97706; }
.meldungen li.info { background: #eff6ff; color: #1e3a8a; border-color: #c9dbfb; }
.meldungen li.info::before { content: "i"; background: #2563eb; }
/* Hinweis-Kasten auf der Karte (gelbe Inline-Farbe) */
.meldungen li[style] { padding-left: 14px; border-color: #f6e0a8; }
.meldungen li[style]::before { display: none; }

/* Leere Zustände */
.leer { padding: 36px 24px; text-align: center; color: var(--text-leise); }
.leer::before {
  content: ""; display: block; width: 44px; height: 44px; margin: 0 auto 10px; border-radius: 14px;
  background: var(--marke-hell) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='22' height='22' viewBox='0 0 24 24' fill='none' stroke='%230f766e' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M22 12h-6l-2 3h-4l-2-3H2'/%3E%3Cpath d='M5.45 5.11 2 12v6a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-6l-3.45-6.89A2 2 0 0 0 16.76 4H7.24a2 2 0 0 0-1.79 1.11z'/%3E%3C/svg%3E") no-repeat center;
}
li.leer { list-style: none; }

/* --------------------------------------------------------------------------
   Aufgabenzeilen
   -------------------------------------------------------------------------- */
.liste { list-style: none; margin: 0; padding: 0; }
.liste.karte { overflow: hidden; }
.karte > .liste:first-child .zeile:first-child { border-top-left-radius: var(--radius-l); border-top-right-radius: var(--radius-l); }
.zeile {
  display: flex; align-items: center; gap: 12px; padding: 10px 16px; min-height: 48px;
  border-bottom: 1px solid var(--rand); background: var(--flaeche); transition: background-color .12s;
}
.zeile:last-child { border-bottom: 0; }
.zeile:hover { background: var(--flaeche-2); }
.zeile form { margin: 0; display: flex; }
.zeile.erledigt .titel { color: var(--text-leise); text-decoration: line-through; }
.zeile .titel { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text); font-weight: 500; }
.zeile .titel:hover { color: var(--marke); text-decoration: none; }
.zeile .meta { display: flex; gap: 10px; align-items: center; color: var(--text-leise); font-size: 12.5px; white-space: nowrap; }
.haken {
  width: 20px; height: 20px; border-radius: 50%; border: 1.5px solid #a9a397; background: var(--flaeche);
  cursor: pointer; padding: 0; flex: none; display: inline-flex; align-items: center; justify-content: center;
  color: transparent; font-size: 11px; font-weight: 700; line-height: 1; transition: all .15s;
}
.haken:hover { border-color: var(--gruen); color: var(--gruen); background: #f0fdf4; }
.haken.an { background: var(--gruen); border-color: var(--gruen); color: #fff; }
.haken:disabled { cursor: default; }
.haken:focus-visible { outline: none; box-shadow: 0 0 0 3px rgba(85, 127, 10, .25); }
.avatar {
  width: 26px; height: 26px; border-radius: 50%; background: #d7efe9; color: var(--marke-tief);
  font-size: 10.5px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; flex: none;
  letter-spacing: .02em; box-shadow: 0 0 0 2px var(--flaeche);
}
.datum { font-variant-numeric: tabular-nums; }
.datum.ueberfaellig { color: var(--rot-tief); font-weight: 650; }
.datum.heute { color: var(--gruen); font-weight: 650; }
.prio { font-size: 11px; font-weight: 650; padding: 0 8px; border-radius: 999px; line-height: 20px; display: inline-block; white-space: nowrap; }
.prio.hoch { background: #fde4e1; color: #9f1d1d; }
.prio.mittel { background: #fcf9dc; color: #8a3b07; }
.prio.niedrig { background: #e3eefc; color: #1e4a8a; }
.etikett {
  font-size: 11.5px; padding: 0 8px; border-radius: 999px; line-height: 21px; background: var(--flaeche-3);
  color: var(--text); display: inline-flex; gap: 5px; align-items: center; font-weight: 500;
}
h1 .etikett { font-size: 12px; vertical-align: middle; font-family: var(--schrift); letter-spacing: 0; }

.gruppe-kopf { display: flex; align-items: center; gap: 8px; margin: 26px 0 10px; }
.gruppe-kopf h2 { margin: 0; }
.gruppe-kopf > .leise {
  font-size: 11.5px; font-weight: 650; background: var(--flaeche-3); color: var(--text-leise);
  border-radius: 999px; padding: 0 8px; line-height: 20px;
}
.schnell { display: flex; gap: 8px; padding: 6px 16px; background: var(--flaeche-2); border-top: 1px dashed var(--rand-stark); margin: 0; }
.karte > .schnell:last-child { border-radius: 0 0 var(--radius-l) var(--radius-l); }
.karte.schnell { border-radius: var(--radius-l); padding: 6px 16px; background: var(--flaeche); border-style: solid; }
.schnell input[type=text] { border: 0; padding: 6px 0; background: transparent; box-shadow: none; min-height: 34px; }
.schnell input[type=text]:focus { outline: none; box-shadow: none; }
.schnell input[type=text]::placeholder { color: var(--text-leise); }
.karte.schnell:focus-within { border-color: var(--marke); box-shadow: var(--fokus); }

/* --------------------------------------------------------------------------
   Board
   -------------------------------------------------------------------------- */
.board { display: flex; flex-wrap: wrap; gap: 16px; align-items: flex-start; padding: 2px 2px 20px; }
.spalte { width: 296px; flex: none; background: var(--flaeche-3); border: 1px solid var(--rand); border-radius: var(--radius-l); padding: 10px; }
.spalte-kopf { display: flex; align-items: center; gap: 8px; padding: 4px 6px 10px; font-weight: 650; font-family: var(--schrift-titel); }
.spalte-kopf .anzahl {
  color: var(--text-leise); font-weight: 650; font-size: 11.5px; background: var(--flaeche); border: 1px solid var(--rand);
  border-radius: 999px; padding: 0 8px; line-height: 19px; font-family: var(--schrift);
}
.spalte-kopf details { margin-left: auto; position: relative; }
.spalte-kopf summary {
  list-style: none; cursor: pointer; color: var(--text-leise); padding: 0 6px; border-radius: 6px; line-height: 24px; font-weight: 700;
}
.spalte-kopf summary:hover { background: rgba(18, 48, 59, .07); color: var(--text); }
.spalte-kopf summary::-webkit-details-marker { display: none; }
.menue { position: absolute; right: 0; top: 30px; z-index: 20; width: 240px; padding: 12px; box-shadow: var(--schatten-l); border-radius: var(--radius); }
.karten { min-height: 44px; display: flex; flex-direction: column; gap: 8px; border-radius: var(--radius); transition: background-color .15s; }
.kachel {
  background: var(--flaeche); border: 1px solid var(--rand); border-radius: var(--radius); padding: 11px 12px;
  box-shadow: var(--schatten); cursor: grab; transition: box-shadow .15s, transform .15s, border-color .15s;
}
.kachel:hover { box-shadow: var(--schatten-m); border-color: var(--rand-stark); transform: translateY(-1px); }
.kachel:active { cursor: grabbing; }
.kachel.zieht { opacity: .45; transform: rotate(1.5deg); }
.kachel form { margin: 0; display: flex; }
.kachel .oben { display: flex; gap: 10px; align-items: flex-start; }
.kachel .titel { flex: 1; color: var(--text); font-weight: 500; line-height: 1.4; padding-top: 1px; }
.kachel .titel:hover { color: var(--marke); text-decoration: none; }
.kachel .unten { display: flex; gap: 8px; align-items: center; margin-top: 10px; font-size: 12px; color: var(--text-leise); flex-wrap: wrap; }
.kachel .unten .avatar { margin-left: auto; }
.karten.ziel { outline: 2px dashed var(--marke-rand); outline-offset: 3px; background: rgba(0, 76, 102, .05); }
.spalte .schnell { border: 0; background: transparent; padding: 8px 0 0; }
.spalte .schnell input[type=text] { background: var(--flaeche); border: 1px dashed var(--rand-stark); padding: 6px 10px; border-radius: 9px; }
.spalte .schnell input[type=text]:focus { border-style: solid; border-color: var(--marke); box-shadow: var(--fokus); }
.neue-spalte { width: 270px; flex: none; }
.neue-spalte input[type=text] { border-style: dashed; background: transparent; }

/* --------------------------------------------------------------------------
   Aufgabe – Detail
   -------------------------------------------------------------------------- */
.detail { display: grid; grid-template-columns: minmax(0, 1fr) 310px; gap: 24px; align-items: start; }
.detail .titel-feld input {
  font-family: var(--schrift-titel); font-size: 22px; font-weight: 650; letter-spacing: -.01em;
  border-color: transparent; padding: 6px 8px; margin-left: -8px; width: calc(100% + 8px); box-shadow: none; background: transparent;
}
.detail .titel-feld input:hover { border-color: var(--rand); background: var(--flaeche-2); }
.detail .titel-feld input:focus { background: var(--flaeche); border-color: var(--marke); }
.felder { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
.verlauf { list-style: none; padding: 0; margin: 0; }
.verlauf li { display: flex; gap: 10px; padding: 8px 0; }
.verlauf .avatar { width: 30px; height: 30px; margin-top: 2px; }
.verlauf .system { color: var(--text-leise); font-size: 12.5px; padding: 4px 0 4px 40px; position: relative; }
.verlauf .system::before { content: ""; position: absolute; left: 14px; top: 50%; width: 6px; height: 6px; margin-top: -3px; border-radius: 50%; background: var(--rand-stark); }
.verlauf .blase {
  background: var(--flaeche-2); border: 1px solid var(--rand); border-radius: 4px 12px 12px 12px;
  padding: 9px 13px; flex: 1; white-space: pre-wrap; margin-top: 4px;
}
.seitenkasten { padding: 16px 18px; }
.seitenkasten + .seitenkasten { margin-top: 14px; }
.seitenkasten h3, .block h3, .formular-gruppe h3 {
  font-family: var(--schrift); font-size: 11.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .07em;
  color: var(--text-leise); margin: 0 0 12px;
}
.personen { display: flex; flex-wrap: wrap; gap: 6px; }

/* --------------------------------------------------------------------------
   Kalender
   -------------------------------------------------------------------------- */
.kalender {
  display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 1px;
  background: var(--rand); border: 1px solid var(--rand); overflow: hidden;
}
.kalender .wt {
  font-size: 11.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em;
  color: var(--text-leise); padding: 10px 10px; background: var(--flaeche-2);
}
.kalender .tag { min-height: 118px; padding: 8px; background: var(--flaeche); transition: background-color .12s; min-width: 0; }
.kalender .tag:hover { background: #fafcfd; }
.kalender .tag.fremd { background: var(--flaeche-2); color: var(--text-blass); }
.kalender .tag.fremd .nr { color: var(--text-blass); font-weight: 500; }
.kalender .nr {
  font-size: 12.5px; font-weight: 650; display: inline-flex; align-items: center; justify-content: center;
  min-width: 26px; height: 26px; border-radius: 50%; font-variant-numeric: tabular-nums;
}
.kalender .tag.heute { background: #f8fbfc; box-shadow: inset 0 0 0 2px var(--marke-rand); }
.kalender .tag.heute .nr { background: var(--marke); color: #fff; padding: 0; }
.kalender .eintrag {
  display: block; font-size: 12px; font-weight: 500; padding: 3px 8px; margin-top: 4px; border-radius: 6px;
  background: var(--marke-hell); color: var(--marke-tief); overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  transition: background-color .12s;
}
.kalender .eintrag:hover { background: #d3ece6; text-decoration: none; color: var(--marke-tief); }
.kalender .eintrag.erledigt { background: var(--flaeche-3); color: var(--text-leise); text-decoration: line-through; }

/* --------------------------------------------------------------------------
   Projekte
   -------------------------------------------------------------------------- */
.projekt-raster { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 16px; }
.projekt-kachel { padding: 18px 18px 16px; color: var(--text); display: block; transition: box-shadow .15s, transform .15s, border-color .15s; }
.projekt-kachel:hover { text-decoration: none; color: var(--text); border-color: var(--marke-rand); box-shadow: var(--schatten-m); transform: translateY(-2px); }
.projekt-kachel strong { font-family: var(--schrift-titel); font-size: 15px; }
.fortschritt { height: 6px; background: var(--flaeche-3); border-radius: 999px; overflow: hidden; margin-top: 12px; }
.fortschritt span { display: block; height: 100%; background: linear-gradient(90deg, #22a06b, var(--gruen)); border-radius: 999px; }

/* --------------------------------------------------------------------------
   Posteingang / Trefferlisten
   -------------------------------------------------------------------------- */
.post { display: flex; gap: 12px; align-items: center; padding: 12px 18px; border-bottom: 1px solid var(--rand); transition: background-color .12s; flex-wrap: wrap; }
.post:last-child { border-bottom: 0; }
.post:hover { background: var(--flaeche-2); }
.post.neu { background: #eef5f8; box-shadow: inset 3px 0 0 var(--marke); }
.post .text { flex: 1; min-width: 200px; color: var(--text); }
.post a.text:hover { color: var(--marke); text-decoration: none; }
.post .avatar { width: 32px; height: 32px; font-size: 11.5px; }
.karte > .post:first-child { border-top-left-radius: var(--radius-l); border-top-right-radius: var(--radius-l); }
.karte > .post:last-child { border-bottom-left-radius: var(--radius-l); border-bottom-right-radius: var(--radius-l); }

/* --------------------------------------------------------------------------
   Status-Etiketten (mit Farbpunkt)
   -------------------------------------------------------------------------- */
.status {
  font-size: 11.5px; font-weight: 650; padding: 0 9px 0 8px; border-radius: 999px; white-space: nowrap;
  display: inline-flex; align-items: center; gap: 6px; line-height: 22px; vertical-align: middle;
  background: var(--flaeche-3); color: #4b5457;
}
.status::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: .85; flex: none; }
.status.interessent, .status.bewerber, .status.neu { background: #e3edfd; color: #1d4a91; }
.status.aktiv, .status.rueckkehrer, .status.uebernommen { background: #dcf3e5; color: #14653a; }
.status.pausiert, .status.in_bearbeitung, .status.angefragt { background: #fdefcc; color: #7a4705; }
.status.gekuendigt, .status.beendet, .status.abgelehnt, .status.spam { background: #eeece7; color: #4a5a60; }

/* --------------------------------------------------------------------------
   Reiter
   -------------------------------------------------------------------------- */
.reiter {
  display: flex; gap: 2px; border-bottom: 1px solid var(--rand); margin-bottom: 16px; flex-wrap: wrap;
}
.reiter a {
  padding: 9px 12px 10px; color: var(--text-leise); border-bottom: 2px solid transparent; margin-bottom: -1px;
  font-weight: 550; display: inline-flex; align-items: center; gap: 2px; border-radius: 8px 8px 0 0;
  transition: color .15s, background-color .15s, border-color .15s;
}
.reiter a:hover { color: var(--text); text-decoration: none; background: rgba(18, 48, 59, .035); }
.reiter a.aktiv { color: var(--marke-tief); border-bottom-color: var(--marke); font-weight: 650; }
.reiter .n {
  font-size: 11px; font-weight: 650; background: var(--flaeche-3); border-radius: 999px; padding: 0 7px;
  margin-left: 6px; color: var(--text-leise); line-height: 18px;
}
.reiter a.aktiv .n { background: var(--marke-hell); color: var(--marke-tief); }

/* --------------------------------------------------------------------------
   Tabellen
   -------------------------------------------------------------------------- */
.tabelle { width: 100%; border-collapse: separate; border-spacing: 0; background: var(--flaeche); }
.tabelle th {
  text-align: left; font-size: 11.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em;
  color: var(--text-leise); padding: 11px 16px; border-bottom: 1px solid var(--rand); background: var(--flaeche-2); white-space: nowrap;
}
.tabelle td { padding: 12px 16px; border-bottom: 1px solid var(--rand); vertical-align: middle; }
.tabelle tr:last-child td { border-bottom: 0; }
.tabelle tr:hover td { background: #f7fafb; }
.tabelle td a strong { color: var(--text); }
.tabelle td a:hover strong { color: var(--marke); }
.tabelle tr.leise td { color: var(--text-leise); }
.karte > .tabelle tr:first-child th:first-child { border-top-left-radius: var(--radius-l); }
.karte > .tabelle tr:first-child th:last-child { border-top-right-radius: var(--radius-l); }
.karte > .tabelle tr:last-child td:first-child { border-bottom-left-radius: var(--radius-l); }
.karte > .tabelle tr:last-child td:last-child { border-bottom-right-radius: var(--radius-l); }
.block .tabelle, .formular-gruppe .tabelle { border: 1px solid var(--rand); border-radius: var(--radius); overflow: hidden; }
.block .tabelle th, .formular-gruppe .tabelle th { padding: 9px 12px; }
.block .tabelle td, .formular-gruppe .tabelle td { padding: 9px 12px; }
.formular-gruppe .tabelle input, .formular-gruppe .tabelle select { min-width: 90px; }
.block .tabelle select { min-width: 110px; }   /* Auswahlfelder in Bearbeitungs-Tabellen nicht auf den Pfeil zusammenschrumpfen */

/* --------------------------------------------------------------------------
   Kennzahlen (Übersicht)
   -------------------------------------------------------------------------- */
.kacheln { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 14px; margin-bottom: 26px; }
.kennzahl {
  --ton: var(--marke); --ton-hell: var(--marke-hell);
  padding: 16px 18px 16px; color: var(--text); display: flex; flex-direction: column; gap: 2px;
  position: relative; overflow: hidden; transition: box-shadow .15s, transform .15s, border-color .15s;
}
.kennzahl::after {
  content: ""; position: absolute; right: -28px; top: -28px; width: 96px; height: 96px; border-radius: 50%;
  background: var(--ton-hell); opacity: .7; pointer-events: none;
}
.kennzahl:hover { text-decoration: none; color: var(--text); border-color: var(--rand-stark); box-shadow: var(--schatten-m); transform: translateY(-2px); }
.kennzahl .kz-symbol {
  width: 36px; height: 36px; border-radius: 10px; display: inline-flex; align-items: center; justify-content: center;
  background: var(--ton-hell); color: var(--ton); margin-bottom: 10px; position: relative; z-index: 1;
}
.kennzahl .kz-symbol .ico { width: 19px; height: 19px; }
.kennzahl .wert { font-family: var(--schrift-titel); font-size: 30px; font-weight: 700; line-height: 1.1; letter-spacing: -.02em; font-variant-numeric: tabular-nums; position: relative; z-index: 1; }
.kennzahl .name { color: var(--text-leise); font-size: 13px; margin-top: 2px; position: relative; z-index: 1; }
.kennzahl.ton-blau { --ton: #1d5fc4; --ton-hell: #e6eefc; }
.kennzahl.ton-gruen { --ton: #557f0a; --ton-hell: #e2f5e9; }
.kennzahl.ton-warm { --ton: #b45309; --ton-hell: var(--warm-hell); }
.kennzahl.ton-violett { --ton: #6d4bc4; --ton-hell: #efeafb; }
.kennzahl.ton-grau { --ton: #4a5a60; --ton-hell: #efede8; }
.kennzahl.warnung { --ton: #c02b0a; --ton-hell: #fde7e5; border-color: #f4cdc8; }
.kennzahl.warnung .wert { color: var(--rot-tief); }
.zwei-spalten { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; }

/* Listeneinträge in Blöcken */
.eintraege { display: flex; flex-direction: column; }
.eintragzeile { display: flex; gap: 10px; align-items: center; padding: 9px 0; border-bottom: 1px solid var(--rand); min-height: 42px; }
.eintragzeile:last-child { border-bottom: 0; padding-bottom: 2px; }
.eintragzeile:first-child { padding-top: 2px; }
.eintragzeile > a:first-of-type { font-weight: 550; }
.eintragzeile .zeit {
  flex: none; width: 116px; font-size: 12.5px; font-weight: 600; color: var(--marke-tief);
  background: var(--marke-hell); border-radius: 7px; padding: 2px 8px; text-align: center; font-variant-numeric: tabular-nums;
}

/* --------------------------------------------------------------------------
   Akten (Kunde, Lehrkraft, Anfrage)
   -------------------------------------------------------------------------- */
.akte { display: grid; grid-template-columns: minmax(0, 1fr) 330px; gap: 20px; align-items: start; }
.akte > aside, .akte > div { min-width: 0; }
.angaben { display: grid; grid-template-columns: 150px 1fr; gap: 8px 14px; margin: 0; }
.angaben dt { color: var(--text-leise); font-size: 13px; padding-top: 1px; }
.angaben dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
.block { padding: 18px 20px; }
.block + .block { margin-top: 14px; }
.akte > aside > .block + .block, .akte > div > .block + .block { margin-top: 14px; }
.block h3 { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.block h3 .rechts { margin-left: auto; text-transform: none; letter-spacing: 0; font-weight: 550; }
.block h3 .chip { text-transform: none; letter-spacing: 0; }
.block > form { margin: 0; }
.block select + .knopf { width: 100%; }
.chip {
  display: inline-block; font-size: 12px; font-weight: 550; padding: 0 9px; line-height: 21px; border-radius: 999px;
  background: var(--marke-hell); color: var(--marke-tief); margin: 2px 4px 2px 0; white-space: nowrap;
}
.historie { color: var(--text-leise); text-decoration: line-through; }
.knopfleiste { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.knopfleiste > form { margin: 0; }
details.aufklapp > summary { cursor: pointer; list-style: none; }
details.aufklapp > summary::-webkit-details-marker { display: none; }
details.aufklapp { position: relative; }
details.aufklapp > .menue { top: calc(100% + 6px); width: 280px; max-width: calc(100vw - 32px); }
details.aufklapp > .menue .knopf { white-space: normal; }
details.aufklapp > .menue label.haken-feld { display: flex; gap: 8px; align-items: center; font-weight: 500; font-size: 14px; margin: 6px 0; }
details.karte.block > summary { font-weight: 550; }
details > summary.leise:hover { color: var(--text); }
/* Vorschlagszeilen (Lehrkraft kontaktieren): Name+Entfernung, Gründe, Knöpfe – bricht je nach Kartenbreite sauber um */
.vorschlag-liste { container-type: inline-size; }
.vorschlag-zeile {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "kopf knoepfe" "gruende knoepfe";
  gap: 4px 14px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--rand);
}
.vorschlag-zeile:last-child { border-bottom: 0; padding-bottom: 0; }
.vorschlag-kopf { grid-area: kopf; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; min-width: 0; }
.vorschlag-kopf .chip { margin: 0; white-space: normal; }
.vorschlag-gruende { grid-area: gruende; min-width: 0; }
.vorschlag-gruende:empty { display: none; }
.vorschlag-knoepfe { grid-area: knoepfe; display: flex; gap: 8px; align-items: center; }
.vorschlag-knoepfe form { margin: 0; display: flex; }
@container (max-width: 440px) {
  .vorschlag-zeile { grid-template-columns: minmax(0, 1fr); grid-template-areas: "kopf" "gruende" "knoepfe"; gap: 6px; }
  .vorschlag-knoepfe { margin-top: 4px; }
  .vorschlag-knoepfe > * { flex: 1 1 0; }
  .vorschlag-knoepfe .knopf { width: 100%; min-height: 40px; }
}

/* Formulare */
.formular-gruppe { padding: 20px 22px; }
.formular-gruppe + .formular-gruppe { border-top: 1px solid var(--rand); }
.formular-gruppe.knopfleiste { background: var(--flaeche-2); border-radius: 0 0 var(--radius-l) var(--radius-l); }
.formular-gruppe.fehler { background: #fef2f2; border-radius: var(--radius-l) var(--radius-l) 0 0; margin: 0; }
.formular-raster { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 0 18px; }
.formular-raster .feld.breit { grid-column: 1 / -1; }
.feld .hilfe, .hilfe { font-size: 12.5px; color: var(--text-leise); margin-top: 4px; }
.feld.haken-feld label { display: flex; gap: 10px; align-items: center; font-weight: 500; font-size: 14px; color: var(--text); margin-top: 26px; cursor: pointer; }

/* Such-/Filterleisten */
.such-raster { padding: 16px; display: grid; gap: 12px; align-items: end; }
.such-raster label { margin-bottom: 5px; }
.such-raster.aufgaben { grid-template-columns: 2fr 1fr 1fr 1fr auto; }
.such-raster.lehrkraft { grid-template-columns: 1fr 2fr 1fr 1fr auto; }
.such-raster .knopf { min-height: 38px; }

@media (max-width: 1100px) {
  .akte, .detail { grid-template-columns: minmax(0, 1fr) 290px; }
}
@media (max-width: 900px) {
  .akte, .zwei-spalten { grid-template-columns: 1fr; }
  .such-raster.aufgaben, .such-raster.lehrkraft { grid-template-columns: 1fr 1fr; }
  .such-raster > :first-child { grid-column: 1 / -1; }
}

/* --------------------------------------------------------------------------
   Anmelden
   -------------------------------------------------------------------------- */
body.anmelde-seite { background: var(--bg); }
.anmelde-rahmen { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); }
.anmelde-marke {
  position: relative; overflow: hidden; color: #e8f2f1; padding: 48px 56px;
  display: flex; flex-direction: column; justify-content: space-between;
  background:
    radial-gradient(60% 50% at 85% 15%, rgba(231, 223, 2, .30), transparent 70%),
    radial-gradient(70% 60% at 10% 100%, rgba(204, 51, 102, .30), transparent 70%),
    linear-gradient(160deg, #002c3c 0%, #00394d 70%);
}
.anmelde-marke::before, .anmelde-marke::after {
  content: ""; position: absolute; border-radius: 50%; border: 1px solid rgba(255, 255, 255, .08); pointer-events: none;
}
.anmelde-marke::before { width: 520px; height: 520px; right: -180px; bottom: -160px; }
.anmelde-marke::after { width: 340px; height: 340px; right: -90px; bottom: -70px; border-color: rgba(231, 223, 2, .22); }
.anmelde-marke .marke { display: flex; align-items: center; gap: 12px; font-family: var(--schrift-titel); font-weight: 700; font-size: 17px; color: #fff; position: relative; z-index: 1; }
.anmelde-marke .marke-zeichen { width: 42px; height: 42px; font-size: 16px; border-radius: 13px; }
.anmelde-marke h2 { color: #fff; font-size: 38px; line-height: 1.12; letter-spacing: -.025em; margin: 0 0 16px; font-weight: 700; max-width: 460px; }
.anmelde-marke h2 em { font-style: normal; color: #f0ea5a; }
.anmelde-marke p { max-width: 420px; color: #b9d0cf; font-size: 15px; margin: 0; }
.anmelde-marke .vorteile { list-style: none; padding: 0; margin: 28px 0 0; display: flex; flex-direction: column; gap: 10px; }
.anmelde-marke .vorteile li { display: flex; align-items: center; gap: 10px; color: #d6e6e5; }
.anmelde-marke .vorteile .ico { width: 18px; height: 18px; color: #f0ea5a; }
.anmelde-marke .fussnote { font-size: 12.5px; color: #8fb0ae; position: relative; z-index: 1; }
.anmelde-marke > div { position: relative; z-index: 1; }
.anmelde-formular { display: flex; align-items: center; justify-content: center; padding: 40px 24px; }
.anmelden { width: 100%; max-width: 380px; margin: 0; padding: 0; }
.anmelden h1 { font-size: 28px; margin-bottom: 6px; }
.anmelden > p.leise { margin: 0 0 26px; }
.anmelden .feld { margin-bottom: 18px; }
.anmelden input[type=text], .anmelden input[type=password] { min-height: 44px; font-size: 15px; }
.anmelden .knopf.primaer { width: 100%; min-height: 44px; font-size: 15px; margin-top: 6px; }
.anmelden .fehler { background: #fef2f2; border: 1px solid #f6caca; border-radius: var(--radius); padding: 10px 12px; margin: 0 0 18px; font-size: 13px; }
.anmelden .sicher { display: flex; align-items: center; gap: 8px; justify-content: center; margin-top: 22px; font-size: 12.5px; color: var(--text-leise); }
.anmelden .sicher .ico { width: 15px; height: 15px; }
.anmelden .mobil-marke { display: none; }

@media (max-width: 860px) {
  .anmelde-rahmen { grid-template-columns: 1fr; }
  .anmelde-marke { display: none; }
  .anmelde-formular { align-items: flex-start; padding-top: 12vh; }
  .anmelden .mobil-marke { display: flex; align-items: center; gap: 10px; font-weight: 700; font-family: var(--schrift-titel); margin-bottom: 28px; color: var(--text); }
}

/* --------------------------------------------------------------------------
   Handy & Tablet: Seitenleiste wird zur oberen Leiste mit Klappmenü
   -------------------------------------------------------------------------- */
@media (max-width: 900px) {
  .rahmen { flex-direction: column; }
  .seitenleiste {
    width: 100%; height: auto; position: sticky; top: 0; z-index: 50;
    border-right: 0; box-shadow: 0 2px 12px rgba(0, 57, 77, .25);
  }
  .seitenleiste .marke-zeile { padding: 10px 12px 10px 16px; }
  .marke-zeichen { width: 32px; height: 32px; border-radius: 10px; font-size: 13px; }
  .menue-knopf {
    display: inline-flex; margin-left: auto; width: 40px; height: 40px; border-radius: 10px; cursor: pointer;
    align-items: center; justify-content: center; color: #fff; border: 1px solid rgba(255, 255, 255, .14); margin-bottom: 0;
  }
  .menue-knopf:hover { background: rgba(255, 255, 255, .08); }
  .menue-knopf .ico { width: 20px; height: 20px; }
  .menue-knopf .zu { display: none; }
  .menue-schalter:focus-visible + .seitenleiste .menue-knopf { box-shadow: 0 0 0 2px rgba(231, 223, 2, .8); }
  .nav-inhalt, .seitenleiste .fuss { display: none; }
  .menue-schalter:checked + .seitenleiste { max-height: 100vh; overflow-y: auto; }
  .menue-schalter:checked + .seitenleiste .nav-inhalt { display: flex; flex: none; overflow: visible; padding-top: 0; }
  .menue-schalter:checked + .seitenleiste .fuss { display: flex; }
  .menue-schalter:checked + .seitenleiste .menue-knopf .auf { display: none; }
  .menue-schalter:checked + .seitenleiste .menue-knopf .zu { display: block; }
  .seitenleiste a { padding: 10px 12px; }
  .seitenleiste a.aktiv::before { left: -10px; }

  .inhalt { padding: 20px 16px 56px; }
  h1 { font-size: 22px; }
  .kopf { gap: 10px; margin-bottom: 16px; }
  .kopf .rechts { margin-left: 0; width: 100%; }
  .kopf .rechts form:has(input:not([type=hidden]), select) { flex: 1 1 100%; flex-wrap: wrap; }
  .kopf .rechts input[type=search], .kopf .rechts select { width: 100% !important; flex: 1 1 160px; }
  .kopf .rechts.legende { gap: 10px 14px; }
  /* Aufklapp-Menüs (Kündigen …, Vertrag wechseln …) klappen im Fluss unter dem Knopf auf statt über den Rand zu ragen */
  details.aufklapp[open]:has(> .menue) { flex: 1 1 100%; }
  details.aufklapp[open] > summary.knopf { width: 100%; }
  details.aufklapp > .menue { position: static; width: auto; max-width: none; margin-top: 8px; }
  details.aufklapp > summary.klein { display: inline-flex; align-items: center; min-height: 40px; }
  details.aufklapp-block > summary { min-height: 40px; }
  /* Tippflächen auf Touch-Geräten */
  .knopf { min-height: 40px; }
  .knopf.klein { min-height: 36px; padding: 6px 12px; }
  .haken { position: relative; }
  .haken::after { content: ""; position: absolute; inset: -10px; }
  .zurueck-knopf { min-height: 40px; }
  .spalte-kopf summary { min-width: 40px; min-height: 40px; display: flex; align-items: center; justify-content: center; }
  .schnell input[type=text] { min-height: 40px; }
  [id] { scroll-margin-top: 76px; }   /* Sprungziele nicht unter der festen Kopfleiste */
  .detail { grid-template-columns: 1fr; }
  .detail .titel-feld input { font-size: 19px; }
  .zeile { padding: 10px 12px; }
  .zeile .meta .etikett { display: none; }
  .kacheln { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .kennzahl { padding: 14px; }
  .kennzahl .wert { font-size: 26px; }
  .kennzahl .kz-symbol { width: 32px; height: 32px; margin-bottom: 8px; }
  .angaben { grid-template-columns: 112px 1fr; }
  .block { padding: 16px; }
  .formular-gruppe { padding: 16px; }
  .felder { grid-template-columns: 1fr; }
  .feld ul { columns: 1; }
  .board { margin: 0 -16px; padding: 2px 16px 20px; }
  .spalte { width: auto; max-width: none; }   /* Spalten stehen untereinander/umbrechend und nutzen die volle Breite */
  .kalender .tag { min-height: 74px; padding: 4px; }
  .kalender .wt { padding: 8px 4px; text-align: center; letter-spacing: .02em; }
  .kalender .eintrag { font-size: 10.5px; padding: 1px 4px; border-radius: 4px; }
  .kalender .nr { min-width: 22px; height: 22px; font-size: 11.5px; }
  .eintragzeile { flex-wrap: wrap; }
  .eintragzeile .zeit { width: auto; }
  .tabelle th, .tabelle td { padding-left: 12px; padding-right: 12px; }
}
@media (max-width: 520px) {
  .such-raster.aufgaben, .such-raster.lehrkraft { grid-template-columns: 1fr; }
  .kacheln { grid-template-columns: 1fr 1fr; }
  .kennzahl::after { display: none; }
  .post .klein { flex-basis: 100%; padding-left: 44px; }
  .knopf.klein { min-height: 40px; }
  /* Knopfleiste im Seitenkopf füllt die Zeilen gleichmäßig statt ausgefranst umzubrechen */
  .kopf .rechts:not(.legende) > * { flex: 1 1 auto; }
  .kopf .rechts:not(.legende) > form:has(input[type=search]) { flex-basis: 100%; }
  .kopf .rechts:not(.legende) > form > .knopf,
  .kopf .rechts:not(.legende) > details > summary.knopf { width: 100%; }
}

/* Bewegung reduzieren, wenn gewünscht */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
  .kachel:hover, .kennzahl:hover, .projekt-kachel:hover { transform: none; }
}

/* Druck */
@media print {
  .seitenleiste, .menue-schalter, .kopf .rechts { display: none !important; }
  .inhalt { padding: 0; }
  .karte { box-shadow: none; }
}

/* Leere Zustände innerhalb von Blöcken und Tabellen etwas kompakter */
.block .leer, .tabelle .leer { padding: 22px 12px; }
.block .leer::before { width: 36px; height: 36px; border-radius: 11px; background-size: 18px; margin-bottom: 8px; }

/* Namen in der ersten Tabellenspalte nicht umbrechen */
.tabelle td:first-child > a { white-space: nowrap; }

/* Tabellen in Blöcken: eigener Rahmen mit waagerechtem Scrollen bei Platzmangel */
.tabelle-rahmen { border: 1px solid var(--rand); border-radius: var(--radius); overflow: visible; }
.tabelle-rahmen .tabelle { border: 0; border-radius: 0; overflow: visible; }
.block .tabelle th { white-space: normal; }

/* --------------------------------------------------------------------------
   CI „Der Nachhilfe Coach“ (Farben von der-nachhilfe-coach.de) + Logo
   Petrol #004C66 · Gelb #E7DF02 · Magenta #CC3366 · Grün #557F0A
   -------------------------------------------------------------------------- */
:root { --magenta: #cc3366; --magenta-hell: #fbe9ef; }
.marke-logo { display: block; height: 44px; width: auto; max-width: 100%; object-fit: contain; }
.seitenleiste .marke { min-width: 0; }
.seitenleiste .marke { gap: 10px; }
.seitenleiste .marke-text small { margin-top: 0; }
.anmelde-marke .marke-logo.gross { height: 96px; }
.logo-flaeche { display: inline-flex; background: var(--marke); padding: 10px 14px; border-radius: 12px; }
.logo-flaeche .marke-logo { height: 40px; }

.karten-nadel { background: none; border: 0; filter: drop-shadow(0 1px 1.5px rgba(0, 0, 0, .35)); }

/* Keine inneren Scrollbalken: Inhalte immer vollständig zeigen */
.tabelle td, .tabelle th { white-space: normal; overflow-wrap: anywhere; }
.karte, .block, .tabelle-rahmen { overflow: visible; }
.spalte { flex: 1 1 260px; }
@media (max-width: 760px) {
  /* Tabellen auf dem Handy als untereinanderstehende Karten statt seitlich scrollen */
  .tabelle, .tabelle tbody, .tabelle tr, .tabelle td { display: block; width: 100%; }
  .tabelle tr:has(th) { display: none; }
  .tabelle tr { padding: 10px 4px; border-bottom: 1px solid var(--rand); }
  .tabelle td { border: 0; padding: 3px 12px; }
}

/* Unterlagen-Checkliste (Lehrkräfte) */
.checkliste { list-style: none; margin: 0; padding: 0; }
.checkliste li { display: flex; gap: 12px; align-items: flex-start; padding: 9px 0; border-bottom: 1px solid var(--rand); }
.checkliste li:last-child { border-bottom: 0; }
.haken-symbol { flex: none; width: 24px; height: 24px; border-radius: 50%; border: 2px solid var(--rand-stark);
  display: inline-flex; align-items: center; justify-content: center; font-weight: 700; font-size: 14px; color: #fff; margin-top: 1px; }
.checkliste li.erfuellt .haken-symbol { background: var(--gruen); border-color: var(--gruen); }
.cl-inhalt { flex: 1; min-width: 0; }
.link-knopf { background: none; border: 0; color: var(--rot); cursor: pointer; font: inherit; padding: 0 4px; }
.unterlagen-stand { display: inline-flex; gap: 3px; }
.unterlagen-stand i { width: 10px; height: 10px; border-radius: 50%; background: var(--rand-stark); display: inline-block; }
.unterlagen-stand i.ok { background: var(--gruen); }
details.aufklapp-block > summary { cursor: pointer; list-style: none; display: flex; align-items: center; }
details.aufklapp-block > summary::-webkit-details-marker { display: none; }
details.aufklapp-block .aufklapp-pfeil { margin-left: auto; color: var(--text-leise); transition: transform .15s; }
details.aufklapp-block:not([open]) .aufklapp-pfeil { transform: rotate(-90deg); }
/* Seitenmenü: Einträge nie zusammenquetschen (sonst überlappen sie bei niedrigen Fenstern) */
.nav-inhalt > *, .seitenleiste .fuss > * { flex-shrink: 0; }
@media (max-width: 760px) {
  /* Spaltennamen in der Karten-Ansicht anzeigen */
  .tabelle td[data-label] { padding-left: 120px; position: relative; min-height: 24px; }
  .tabelle td[data-label]::before {
    content: attr(data-label); position: absolute; left: 12px; top: 4px; width: 100px;
    color: var(--text-leise); font-size: 11.5px; font-weight: 600; text-transform: uppercase; letter-spacing: .03em;
  }
}
/* Kundenliste: weitere Kinder derselben Familie optisch zusammenhängend */
.kundenliste tr.folgezeile td { border-top: 0; padding-top: 2px; }
.kundenliste th { white-space: nowrap; overflow-wrap: normal; }
.kundenliste td:nth-child(2), .kundenliste td:nth-child(3), .kundenliste td:nth-child(6) { white-space: nowrap; overflow-wrap: normal; }

/* Alle Listen: Spaltenköpfe immer einzeilig. Passt eine Tabelle nicht mehr in die Breite,
   wird sie (per app.js) automatisch zur Karten-Ansicht mit Beschriftung je Zeile. */
.tabelle th { white-space: nowrap; overflow-wrap: normal; }
.tabelle.gestapelt, .tabelle.gestapelt tbody, .tabelle.gestapelt tr, .tabelle.gestapelt td { display: block; width: 100%; }
.tabelle.gestapelt tr:has(th) { display: none; }
.tabelle.gestapelt tr { padding: 10px 4px; border-bottom: 1px solid var(--rand); }
.tabelle.gestapelt td { border: 0; padding: 3px 12px; }
.tabelle.gestapelt td[data-label], .tabelle td[data-label] { --label-breite: 140px; }
.tabelle.gestapelt td[data-label] { padding-left: calc(var(--label-breite) + 20px); position: relative; min-height: 24px; }
.tabelle.gestapelt td[data-label]::before {
  content: attr(data-label); position: absolute; left: 12px; top: 4px; width: var(--label-breite);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  color: var(--text-leise); font-size: 11.5px; font-weight: 600; text-transform: uppercase; letter-spacing: .03em;
}
@media (max-width: 760px) {
  .tabelle td[data-label] { padding-left: 160px; }
  .tabelle td[data-label]::before { width: 140px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
}
/* Kundenliste kompakt, damit sie auch im halben Fenster als Tabelle passt */
.kundenliste { font-size: 13px; }
.kundenliste th { font-size: 11px; letter-spacing: 0; }
.kundenliste th, .kundenliste td { padding-left: 8px; padding-right: 8px; }
.kundenliste td:first-child > a { white-space: normal; }
.kundenliste .status, .kundenliste .chip { font-size: 11.5px; white-space: nowrap; }
.kundenliste td:last-child .status { white-space: normal; }
/* Statistik: einfache Balken (eine Farbe, Wert immer als Text daneben) */
.balken-zeile { display: grid; grid-template-columns: minmax(90px, 34%) 1fr auto; gap: 10px; align-items: center; padding: 4px 0; }
.balken-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; }
.balken-spur { height: 10px; background: #eef5f8; border-radius: 4px; overflow: hidden; }
.balken { display: block; height: 100%; background: var(--marke, #004c66); border-radius: 0 4px 4px 0; min-width: 2px; }
.balken-zeile:hover .balken { background: #0a6584; }
.balken-wert { font-size: 12.5px; color: var(--text-leise); white-space: nowrap; font-variant-numeric: tabular-nums; }

/* ==========================================================================
   Design-Überarbeitung (Herbst 2026)
   Ziel: ruhiger, freundlicher, hochwertiger – Bedienung und Struktur bleiben gleich.
   Nur Optik; alle Klassen wie bisher. Dieser Block steht bewusst am Ende und
   überschreibt frühere Regeln. Feste Vorgaben bleiben unangetastet:
   - keine inneren Scrollbalken (Seite scrollt als Ganzes),
   - Tabellen-Spaltenköpfe einzeilig + Karten-Ansicht über .gestapelt,
   - Seitenmenü-Einträge schrumpfen nie (.nav-inhalt > * { flex-shrink: 0 }).
   Kontraste: alle Text/Hintergrund-Paare ≥ 4,5 : 1, Fokusrahmen ≥ 3 : 1.
   ========================================================================== */

/* ---------- 1. Farb- und Form-Token (nur CI-Farben) ---------- */
:root {
  --marke-tief: #00374a;
  --marke-hell: #e6f0f4;
  --marke-zart: #f2f8fa;              /* Hover-Flächen */
  --marke-rand: #b7d0da;
  --titel: #0b3443;                   /* Überschriften: Petrol-Schwarz */
  --text-label: #557482;              /* kleine Beschriftungen, ca. 4,8 : 1 auf Weiß */

  --rand: #d5e3e9;
  --rand-zart: #e4eef2;
  --rand-stark: #c3d6de;

  /* Gefahr/Warnung = CI-Magenta (Text-Ton dunkler für Kontrast) */
  --magenta: #cc3366;
  --magenta-text: #a8285a;            /* ca. 6,3 : 1 auf Weiß */
  --magenta-hell: #fcebf1;
  --magenta-rand: #f1c3d3;
  --rot: var(--magenta-text);
  --rot-tief: var(--magenta-text);

  /* Grün (ok/aktiv) und Gelb (Akzent) */
  --gruen-text: #3f5f07;
  --gruen-hell: #eef5e1;
  --gelb-text: #5c5800;
  --gelb-hell: #fbf8d2;

  --radius-s: 8px;
  --radius: 12px;
  --radius-l: 16px;

  /* Weiche, petrolgetönte Schatten */
  --schatten-s: 0 1px 2px rgba(0, 55, 74, .06);
  --schatten: 0 1px 2px rgba(0, 55, 74, .04), 0 6px 18px -8px rgba(0, 55, 74, .10);
  --schatten-m: 0 2px 4px rgba(0, 55, 74, .05), 0 14px 30px -12px rgba(0, 55, 74, .18);
  --schatten-l: 0 24px 48px -16px rgba(0, 55, 74, .28), 0 4px 12px rgba(0, 55, 74, .08);

  /* Barrierefreier Fokus: weißer Spalt + kräftiger Petrol-Ring */
  --fokus: 0 0 0 2px #fff, 0 0 0 4px var(--marke);
  --fokus-feld: 0 0 0 1px var(--marke), 0 0 0 4px rgba(0, 76, 102, .16);
}

/* ---------- 2. Grundlagen & Typografie ---------- */
body {
  background:
    radial-gradient(1100px 340px at 70% -140px, rgba(0, 76, 102, .07), transparent 70%),
    linear-gradient(180deg, #e9f2f6 0, var(--bg) 280px) no-repeat,
    var(--bg);
}
::selection { background: #cfe3eb; color: var(--titel); }
h1, h2, h3 { color: var(--titel); }
h1 { font-size: 27px; font-weight: 700; letter-spacing: -.02em; line-height: 1.2; }
h2 { font-size: 17px; font-weight: 650; letter-spacing: -.01em; margin: 30px 0 12px; }
a:hover { color: var(--marke-tief); }

/* Fokus überall gut sichtbar (Tastatur) */
a:focus-visible, button:focus-visible, summary:focus-visible, [tabindex]:focus-visible,
.knopf:focus-visible, .knopf.primaer:focus-visible { outline: none; box-shadow: var(--fokus); }

/* ---------- 3. Seitenleiste ---------- */
.seitenleiste {
  background:
    radial-gradient(90% 40% at 0% 0%, rgba(231, 223, 2, .07), transparent 70%),
    linear-gradient(180deg, #00506b 0%, #004259 34%, #00374a 100%);
  border-right: 0;
  box-shadow: inset -1px 0 0 rgba(255, 255, 255, .05), 4px 0 24px -12px rgba(0, 40, 54, .45);
  /* Die ganze Leiste scrollt als Einheit – Menü wird nie in einen kleinen Kasten gequetscht */
  overflow-y: auto; scrollbar-width: thin; scrollbar-color: rgba(255, 255, 255, .18) transparent;
}
.seitenleiste > * { flex-shrink: 0; }
.seitenleiste .marke-zeile { padding: 16px 18px 12px; border-bottom: 1px solid rgba(255, 255, 255, .07); margin-bottom: 4px; }
.seitenleiste .marke-text small {
  font-size: 10.5px; font-weight: 650; letter-spacing: .12em; text-transform: uppercase; color: #a9c8d3;
}
.nav-inhalt { padding: 4px 12px 10px; gap: 1px; flex: 1 0 auto; overflow: visible; min-height: auto; }
.seitenleiste a { padding: 6px 11px; border-radius: 10px; color: #d6e7ed; font-weight: 500; font-size: 13.5px; }
.seitenleiste a .ico { opacity: .72; }
.seitenleiste a:hover { background: rgba(255, 255, 255, .07); color: #fff; }
.seitenleiste a.aktiv {
  background: linear-gradient(90deg, rgba(255, 255, 255, .15), rgba(255, 255, 255, .07));
  color: #fff; font-weight: 600;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .06);
}
.seitenleiste a.aktiv::before { left: -12px; top: 8px; bottom: 8px; width: 4px; border-radius: 0 4px 4px 0; }
.seitenleiste a:focus-visible, .abmelden-knopf:focus-visible { box-shadow: 0 0 0 2px var(--warm); }
.seitenleiste .abschnitt-titel { font-size: 10.5px; letter-spacing: .12em; color: #8fb3c1; padding: 14px 11px 4px; }
.seitenleiste .abschnitt-titel a { color: #8fb3c1; }
.seitenleiste .fuss { padding: 8px 12px 10px; border-top: 1px solid rgba(255, 255, 255, .08); background: rgba(0, 0, 0, .08); }
.konto { border-top: 1px solid rgba(255, 255, 255, .07); }
.konto .avatar { background: var(--warm); color: var(--marke-tief); box-shadow: 0 0 0 2px rgba(255, 255, 255, .14); }
.zaehler { background: var(--warm); color: var(--marke-tief); box-shadow: 0 1px 2px rgba(0, 0, 0, .15); }
/* Ein-/Ausklappen der Seitenleiste (nur Desktop; auf dem Handy gibt es das Klappmenü oben) */
.einklappen-knopf {
  margin-left: auto; flex: none; width: 30px; height: 30px; border-radius: 9px; border: 0; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
  background: rgba(255, 255, 255, .08); color: #d6e7ed; transition: background-color .15s, transform .2s;
}
.einklappen-knopf:hover { background: rgba(255, 255, 255, .16); color: #fff; }
.einklappen-knopf .ico { width: 16px; height: 16px; }
.menue-eingeklappt .seitenleiste { width: 68px; }
.menue-eingeklappt .einklappen-knopf { margin: 0 auto; transform: rotate(180deg); }
.menue-eingeklappt .seitenleiste .marke-zeile { flex-direction: column; gap: 8px; padding: 14px 8px 10px; }
.menue-eingeklappt .seitenleiste .marke-text, .menue-eingeklappt .seitenleiste .abschnitt-titel,
.menue-eingeklappt .seitenleiste .projekt-link, .menue-eingeklappt .seitenleiste .leer-hinweis,
.menue-eingeklappt .konto-name { display: none; }
/* eingeklappt: Logo proportional verkleinern, nie stauchen */
.menue-eingeklappt .seitenleiste .marke { justify-content: center; }
.menue-eingeklappt .seitenleiste .marke-logo { width: 50px; height: auto; max-width: 50px; }
.menue-eingeklappt .nav-inhalt, .menue-eingeklappt .seitenleiste .fuss { padding-left: 10px; padding-right: 10px; }
.menue-eingeklappt .seitenleiste a { font-size: 0; justify-content: center; padding: 9px 0; position: relative; }
.menue-eingeklappt .seitenleiste a .ico { width: 19px; height: 19px; }
.menue-eingeklappt .seitenleiste a .zaehler { position: absolute; top: 3px; right: 6px; font-size: 9px; min-width: 15px; height: 15px; padding: 0 4px; }
.menue-eingeklappt .seitenleiste a.aktiv::before { left: -10px; }
.menue-eingeklappt .konto { justify-content: center; flex-wrap: wrap; gap: 6px; }
@media (max-width: 900px) { .einklappen-knopf { display: none; } .menue-eingeklappt .seitenleiste { width: auto; } }

/* ---------- 4. Inhalt & Seitenkopf ---------- */
.inhalt { padding: 34px 44px 80px; }
.kopf { margin-bottom: 24px; gap: 16px; }
.kopf > div > .leise { margin-top: 4px; font-size: 14px; color: var(--text-label); }
.kopf h1 .status { top: -3px; }
.pfad { margin-bottom: 10px; }
.pfad a { color: var(--text-label); font-weight: 500; }
/* Auswahlfelder im Kopf (z. B. Monat/Jahr in der Statistik) nicht abschneiden */
.kopf .rechts form select { width: auto; }

/* ---------- 5. Karten & Blöcke ---------- */
.karte { border-color: var(--rand-zart); box-shadow: var(--schatten); }
.block { padding: 20px 22px; }
.block + .block,
.akte > aside > .block + .block, .akte > div > .block + .block { margin-top: 16px; }
/* Im Zwei-Spalten-Raster keinen zusätzlichen Abstand (sonst steht die rechte Spalte versetzt) */
.zwei-spalten { gap: 18px; }
.zwei-spalten > .block + .block, .zwei-spalten > .karte + .karte { margin-top: 0; }

/* Blocküberschriften: freundlich in Satzschreibung statt kleiner Großbuchstaben */
.seitenkasten h3, .block h3, .formular-gruppe h3 {
  font-family: var(--schrift-titel); font-size: 15px; font-weight: 650; text-transform: none;
  letter-spacing: -.005em; color: var(--titel); margin: 0 0 14px; line-height: 1.35;
}
.block h3 .rechts { font-family: var(--schrift); font-size: 13px; font-weight: 550; }
.block h3 .klein.leise { font-family: var(--schrift); font-weight: 500; }

.angaben { gap: 10px 16px; }
.angaben dt { color: var(--text-label); }

/* Listenzeilen in Blöcken */
.eintragzeile { border-bottom-color: var(--rand-zart); min-height: 44px; padding: 10px 0; }
.eintragzeile > a:first-of-type { font-weight: 600; color: var(--titel); }
.eintragzeile > a:first-of-type:hover { color: var(--marke); }
.eintragzeile .zeit { border-radius: 8px; padding: 3px 8px; }
/* Namen nicht auf drei Zeilen quetschen: lieber Zusatzangaben in die nächste Zeile umbrechen */
.eintragzeile { flex-wrap: wrap; row-gap: 4px; }
.eintragzeile > a:first-of-type, .eintragzeile > span[style*="flex"] { min-width: min(11em, 100%); }

/* Leere Zustände: ruhiges Petrol-Symbol im Kreis */
.leer::before {
  background: var(--marke-hell) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='22' height='22' viewBox='0 0 24 24' fill='none' stroke='%23004c66' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M22 12h-6l-2 3h-4l-2-3H2'/%3E%3Cpath d='M5.45 5.11 2 12v6a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-6l-3.45-6.89A2 2 0 0 0 16.76 4H7.24a2 2 0 0 0-1.79 1.11z'/%3E%3C/svg%3E") no-repeat center;
  border-radius: 50%;
}
.block .leer::before { background-size: 18px; border-radius: 50%; }

/* ---------- 6. Kennzahl-Kacheln (Übersicht, Statistik) ---------- */
.kacheln { gap: 16px; margin-bottom: 28px; grid-template-columns: repeat(auto-fill, minmax(215px, 1fr)); }
.kennzahl {
  --ton: var(--marke); --ton-hell: #e2eef3;
  padding: 18px 20px; gap: 3px; border-color: var(--rand-zart);
  /* Farbschimmer in der Ecke als Hintergrund – bleibt sicher innerhalb der Karte */
  background:
    radial-gradient(180px 120px at 100% 0%, var(--ton-hell), transparent 72%),
    var(--flaeche);
}
.kennzahl::after { display: none; }          /* alte Deko-Kreise ragten aus der Karte heraus */
.kennzahl:hover { border-color: var(--marke-rand); box-shadow: var(--schatten-m); transform: translateY(-2px); }
.kennzahl .kz-symbol {
  width: 40px; height: 40px; border-radius: 12px; margin-bottom: 12px;
  background: var(--ton-hell); color: var(--ton);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--ton) 12%, transparent);
}
.kennzahl .kz-symbol .ico { width: 20px; height: 20px; stroke-width: 1.9; }
.kennzahl .wert { font-size: 31px; font-weight: 700; color: var(--titel); letter-spacing: -.025em; }
.kennzahl .name { color: var(--text-leise); font-size: 13px; line-height: 1.4; }
.kennzahl.ton-blau    { --ton: #1d6382; --ton-hell: #e1eef5; }
.kennzahl.ton-gruen   { --ton: #557f0a; --ton-hell: #ebf3dc; }
.kennzahl.ton-warm    { --ton: #6b6600; --ton-hell: #f9f5c4; }
.kennzahl.ton-violett { --ton: #8a3f72; --ton-hell: #f6e9f1; }
.kennzahl.ton-grau    { --ton: #4a5a60; --ton-hell: #ebf1f3; }
.kennzahl.warnung {
  --ton: var(--magenta); --ton-hell: var(--magenta-hell);
  border-color: var(--magenta-rand);
  box-shadow: inset 0 3px 0 var(--magenta), var(--schatten);
}
.kennzahl.warnung:hover { border-color: var(--magenta); box-shadow: inset 0 3px 0 var(--magenta), var(--schatten-m); }
.kennzahl.warnung .wert { color: var(--magenta-text); }

/* ---------- 7. Knöpfe ---------- */
.knopf { border-color: var(--rand-stark); color: var(--titel); border-radius: 10px; font-weight: 600; }
.knopf:hover { background: var(--marke-zart); border-color: var(--marke-rand); color: var(--marke-tief); }
.knopf.primaer {
  background: linear-gradient(180deg, #0a5d7b 0%, var(--marke) 100%);
  border-color: #003f55; color: #fff;
  box-shadow: 0 1px 2px rgba(0, 55, 74, .25), 0 4px 10px -4px rgba(0, 76, 102, .45), inset 0 1px 0 rgba(255, 255, 255, .12);
}
.knopf.primaer:hover { background: var(--marke-tief); border-color: #002a39; color: #fff; }
.knopf.gefahr { color: var(--magenta-text); }
.knopf.gefahr:hover { background: var(--magenta-hell); border-color: var(--magenta-rand); color: var(--magenta-text); }
.knopf.klein { border-radius: 8px; }
.knopf.aktiv { background: var(--marke); border-color: var(--marke); color: #fff; box-shadow: none; }
.knopf.aktiv .leise { color: #cfe3eb; }
.knopf:focus-visible, .knopf.primaer:focus-visible { box-shadow: var(--fokus); }

/* ---------- 8. Reiter ---------- */
.reiter { gap: 4px; margin-bottom: 18px; }
.reiter a { padding: 10px 14px 10px; border-bottom-width: 3px; border-radius: 10px 10px 0 0; }
.reiter a:hover { color: var(--titel); background: rgba(0, 76, 102, .05); }
.reiter a.aktiv { color: var(--marke-tief); border-bottom-color: var(--marke); }
.reiter .n { background: #e3edf1; }
.reiter a.aktiv .n { background: var(--marke); color: #fff; }

/* ---------- 9. Status-Etiketten & Chips (CI-Farben) ---------- */
.status {
  font-weight: 600; background: #edf2f4; color: #46575e;
  box-shadow: inset 0 0 0 1px color-mix(in srgb, currentColor 14%, transparent);
}
.status.interessent, .status.bewerber, .status.neu { background: #e3eff5; color: #0d4a62; }
.status.aktiv, .status.rueckkehrer, .status.uebernommen { background: var(--gruen-hell); color: var(--gruen-text); }
.status.pausiert, .status.in_bearbeitung, .status.angefragt { background: var(--gelb-hell); color: var(--gelb-text); }
.status.pausiert::before, .status.in_bearbeitung::before, .status.angefragt::before { background: #b5ad00; opacity: 1; }
.status.gekuendigt, .status.abgelehnt { background: var(--magenta-hell); color: var(--magenta-text); }
.status.beendet, .status.spam { background: #edf2f4; color: #4a5a60; }

/* Chips: Ring per Schatten statt Rahmen (ändert die Breite nicht) */
.chip { background: #eaf2f6; color: var(--marke-tief); box-shadow: inset 0 0 0 1px #d6e5ec; }
.prio.hoch { background: var(--magenta-hell); color: var(--magenta-text); }
.prio.mittel { background: var(--gelb-hell); color: var(--gelb-text); }
.prio.niedrig { background: #e3eff5; color: #0d4a62; }
.etikett { background: #eaf2f6; color: var(--marke-tief); }
.datum.heute { color: var(--gruen-text); }

/* ---------- 10. Tabellen ---------- */
/* Gleiche Schriftgrößen/Innenabstände wie bisher (sonst schalten Listen früher auf Karten um) –
   nur Farben, Linien und Zustände sind neu. */
.tabelle th { color: var(--text-label); background: #f3f8fa; border-bottom-color: var(--rand); }
.tabelle td { border-bottom-color: var(--rand-zart); }
.tabelle tr:hover td { background: var(--marke-zart); }
.tabelle td a strong { color: var(--titel); font-weight: 650; }
.tabelle td a:hover strong { color: var(--marke); }
/* Mehrere Knöpfe in einer Zelle (Ändern/Beenden) nebeneinander statt untereinander */
.tabelle td:has(> .knopf) > form { display: inline-block; margin: 0; }
/* Kundenliste: Status darf umbrechen – aber nur zwischen Wörtern, als sauberes Etikett */
.kundenliste td:last-child .status { overflow-wrap: normal; word-break: normal; line-height: 1.3; padding-top: 3px; padding-bottom: 3px; border-radius: 10px; }
.block .tabelle, .formular-gruppe .tabelle, .tabelle-rahmen { border-color: var(--rand-zart); }
/* Abgerundete Kopfzeile auch innerhalb von .tabelle-rahmen (Kopf ragte über die Ecken) */
.tabelle-rahmen .tabelle tr:first-child th:first-child { border-top-left-radius: calc(var(--radius) - 1px); }
.tabelle-rahmen .tabelle tr:first-child th:last-child { border-top-right-radius: calc(var(--radius) - 1px); }

/* Karten-Ansicht (app.js setzt .gestapelt, auf dem Handy immer): jede Zeile als ruhige Karte */
.tabelle.gestapelt tr { padding: 12px 4px; border-bottom: 1px solid var(--rand-zart); transition: background-color .12s; }
.tabelle.gestapelt tr:last-child { border-bottom: 0; }
.tabelle.gestapelt tr:hover { background: var(--marke-zart); }
.tabelle.gestapelt tr:hover td { background: transparent; }
.tabelle.gestapelt td { padding: 4px 16px; border-radius: 0 !important; }
.tabelle.gestapelt td[data-label] { padding-left: calc(var(--label-breite) + 24px); }
.tabelle.gestapelt td[data-label]::before {
  left: 16px; top: 6px; color: var(--text-label); font-size: 11px; font-weight: 650; letter-spacing: .05em;
}
/* Karten-Ansicht: Werte und Beschriftungen linksbündig (rechtsbündige Betragsspalten rückten sonst ab),
   Eingabefelder in Bearbeitungs-Tabellen nutzen die Breite */
.tabelle.gestapelt td, .tabelle.gestapelt td[data-label]::before { text-align: left !important; }
.tabelle.gestapelt td input:not([type=checkbox]):not([type=radio]):not([type=hidden]), .tabelle.gestapelt td select { width: 100% !important; max-width: 340px; }
.tabelle.gestapelt td[data-label]:has(input:not([type=hidden]):not([type=checkbox]):not([type=radio]), select)::before { top: 50%; transform: translateY(-50%); }
/* Aktionszellen (ohne Spaltennamen) in der Karten-Ansicht: Knöpfe nebeneinander statt untereinander */
.tabelle.gestapelt td:not([data-label]):has(.knopf) { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; padding-top: 8px; }
.tabelle.gestapelt td:not([data-label]):has(.knopf) form { margin: 0; display: inline-flex; }
@media (max-width: 760px) {
  .tabelle tr { padding: 12px 2px; border-bottom-color: var(--rand-zart); }
  .tabelle tr:hover td { background: transparent; }
  .tabelle td { padding: 4px 14px; border-radius: 0 !important; }
  .tabelle td[data-label] { padding-left: 154px; }
  .tabelle td, .tabelle td[data-label]::before { text-align: left !important; }
  .tabelle td input:not([type=checkbox]):not([type=radio]):not([type=hidden]), .tabelle td select { width: 100% !important; max-width: 340px; }
  .tabelle td[data-label]:has(input:not([type=hidden]):not([type=checkbox]):not([type=radio]), select)::before { top: 50%; transform: translateY(-50%); }
  .tabelle td:not([data-label]):has(.knopf) { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; padding-top: 8px; }
  .tabelle td:not([data-label]):has(.knopf) form { margin: 0; display: inline-flex; }
  .tabelle td[data-label]::before {
    left: 14px; top: 6px; width: 130px; color: var(--text-label); font-size: 11px; font-weight: 650; letter-spacing: .05em;
  }
}

/* ---------- 11. Formulare ---------- */
input[type=text], input[type=date], input[type=search], input[type=password], input[type=email],
input[type=number], input[type=tel], input[type=url], input[type=time], input[type=datetime-local],
input[type=month], input:not([type]), select, textarea {
  border-color: var(--rand-stark); border-radius: 10px; background-color: #fff;
  box-shadow: inset 0 1px 2px rgba(0, 55, 74, .04);
}
input[type=text]:hover, input[type=date]:hover, input[type=search]:hover, input[type=password]:hover,
input[type=email]:hover, input[type=number]:hover, input[type=tel]:hover, input[type=url]:hover,
input[type=time]:hover, input[type=datetime-local]:hover, input:not([type]):hover, select:hover, textarea:hover { border-color: #9dbccb; }
input:focus, select:focus, textarea:focus { border-color: var(--marke); box-shadow: var(--fokus-feld); }
input::placeholder, textarea::placeholder { color: #6f8a94; }
select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23004c66' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
}
select[multiple] { background-image: none; }
label { color: #26444f; }
.feld .hilfe, .hilfe { color: var(--text-label); }
.formular-gruppe { padding: 22px 24px; }
.formular-gruppe + .formular-gruppe { border-top-color: var(--rand-zart); }
.formular-gruppe.knopfleiste { background: #f5f9fb; }
.formular-gruppe.fehler { background: var(--magenta-hell); }
.karte.schnell:focus-within { border-color: var(--marke); box-shadow: var(--fokus-feld); }
input[type=file]::file-selector-button { border-radius: 8px; background: var(--marke-zart); border-color: var(--rand-stark); color: var(--titel); }
.such-raster { padding: 18px; }

/* ---------- 12. Meldungen (CI-Töne) ---------- */
.meldungen li { background: #f2f7e8; color: #34510a; border-color: #d3e3b5; box-shadow: var(--schatten-s); }
.meldungen li::before { background: var(--gruen); }
.meldungen li.error { background: var(--magenta-hell); color: #7d1d43; border-color: var(--magenta-rand); }
.meldungen li.error::before { background: var(--magenta); }
.meldungen li.warning { background: var(--gelb-hell); color: var(--gelb-text); border-color: #ebe38a; }
.meldungen li.warning::before { background: var(--warm); color: var(--marke-tief); }
.meldungen li.info { background: #e8f2f6; color: var(--marke-tief); border-color: var(--marke-rand); }
.meldungen li.info::before { background: var(--marke); }

/* ---------- 13. Statistik-Balken & Fortschritt ---------- */
.balken-zeile { padding: 5px 0; gap: 12px; }
.balken-name { color: var(--titel); }
.balken-spur { background: #e6f0f4; border-radius: 999px; }
.balken-spur .balken { border-radius: 999px; background: linear-gradient(90deg, #2a7896, var(--marke)); }
.balken-zeile:hover .balken-spur .balken { background: linear-gradient(90deg, #3a8aa8, #005a78); }
.balken-wert { color: var(--text-label); }
.fortschritt span { background: linear-gradient(90deg, #7aa52a, var(--gruen)); }

/* ---------- 14. Kleinkram aus älteren Bereichen auf CI-Farben ---------- */
.avatar { background: #dcebf1; }
.kalender .eintrag:hover { background: #d4e6ee; }
.kalender .tag.heute { box-shadow: inset 0 0 0 2px var(--marke); }
.haken:hover { background: var(--gruen-hell); }
.post.neu { background: var(--marke-zart); }
.checkliste li { border-bottom-color: var(--rand-zart); }

/* ---------- 15. Anmeldeseite ---------- */
.anmelde-formular { background: radial-gradient(600px 420px at 50% 35%, #fff, transparent 75%); }
.anmelden h1 { font-size: 30px; }
.anmelden .knopf.primaer, .anmelden input[type=text], .anmelden input[type=password] { min-height: 46px; border-radius: 12px; }
.anmelden .fehler { background: var(--magenta-hell); border-color: var(--magenta-rand); }

/* ---------- 16. Halbes Fenster & Handy ---------- */
@media (max-width: 1200px) {
  .inhalt { padding: 28px 28px 72px; }
}
@media (max-width: 900px) {
  .seitenleiste { box-shadow: 0 4px 18px rgba(0, 40, 54, .3); }
  .seitenleiste .marke-zeile { padding: 10px 12px 10px 16px; border-bottom: 0; margin-bottom: 0; }
  .menue-schalter:checked + .seitenleiste .marke-zeile { border-bottom: 1px solid rgba(255, 255, 255, .08); margin-bottom: 6px; }
  .inhalt { padding: 22px 16px 56px; }
  h1 { font-size: 23px; }
  .kacheln { gap: 12px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .kennzahl { padding: 15px 16px; }
  .kennzahl .kz-symbol { width: 34px; height: 34px; border-radius: 10px; margin-bottom: 10px; }
  .kennzahl .wert { font-size: 26px; }
  .block { padding: 18px; }
  .formular-gruppe { padding: 18px; }
}
@media (max-width: 520px) {
  .kennzahl { padding: 14px; }
  .kennzahl .name { font-size: 12.5px; }
}

/* Autovervollständigung (Schulen/Ämter) */
.vervollstaendigen { position: relative; }
.vervollstaendigen input { width: 100%; }
.vervollstaendigen-liste { position: absolute; z-index: 30; left: 0; right: 0; top: calc(100% + 4px); background: #fff;
  border: 1px solid var(--rand, #d5e3e9); border-radius: 12px; box-shadow: 0 12px 28px rgba(0, 76, 102, .14); overflow: hidden; }
.vv-zeile { display: block; width: 100%; text-align: left; background: none; border: 0; padding: 9px 12px; cursor: pointer;
  border-bottom: 1px solid #eef5f8; font: inherit; color: inherit; }
.vv-zeile:last-child { border-bottom: 0; }
.vv-zeile:hover, .vv-zeile:focus-visible { background: #eef5f8; outline: none; }
.vv-zeile strong { display: block; color: #004c66; }
.vv-zeile span, .vv-leer { font-size: 12.5px; color: var(--text-leise, #5b7480); }
.vv-leer { padding: 10px 12px; }
/* Verlauf je Schüler */
.verlauf { list-style: none; margin: 8px 0 0; padding: 0; }
.verlauf li { display: flex; gap: 10px; padding: 5px 0; border-bottom: 1px solid #eef5f8; font-size: 13px; }
.verlauf li:last-child { border-bottom: 0; }
.verlauf .zeit { flex: none; width: 82px; color: var(--text-leise, #5b7480); font-variant-numeric: tabular-nums; }
.verlauf .art-lehrerwechsel { color: #cc3366; font-weight: 600; }
/* Zurück-Knopf oben auf jeder Seite */
.zurueck-knopf { display: inline-flex; align-items: center; gap: 4px; margin: -10px 0 12px; padding: 4px 10px 4px 6px;
  border-radius: 9px; color: var(--marke, #004c66); font-size: 13.5px; font-weight: 600; text-decoration: none; }
.zurueck-knopf:hover { background: rgba(0, 76, 102, .07); text-decoration: none; }
.zurueck-knopf .ico { width: 16px; height: 16px; }
@media print { .zurueck-knopf { display: none; } }
/* Vorbelegtes Zuweisungsformular hervorheben */
.karte.hervorgehoben { box-shadow: 0 0 0 3px rgba(231, 223, 2, .75), var(--schatten, 0 6px 20px rgba(0, 76, 102, .12)); }
/* Aufgaben-Titel: wächst mit dem Text, kein Abschneiden */
textarea.titel-eingabe { field-sizing: content; min-height: 0; resize: none; overflow: hidden; }
