/* ==========================================================================
   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.
   ========================================================================== */

: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], 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, 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; }
.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; }

/* --------------------------------------------------------------------------
   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 .menue { top: 42px; }
details.karte.block > summary { font-weight: 550; }
details > summary.leise:hover { color: var(--text); }

/* 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 { 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; }
  .detail { grid-template-columns: 1fr; }
  .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; scroll-snap-type: x proximity; }
  .spalte { width: 82vw; max-width: 300px; scroll-snap-align: start; }
  .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; }
}

/* 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; }
.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); }
