/* Kids-Admin-Portal — eigenes Stylesheet, keine fremden Quellen.
   Kein CDN, keine Schriftart von fremden Servern (Auftrag Teil 4). Die
   Content-Security-Policy erlaubt ohnehin nur 'self'. */

:root {
  --ton-text: #1c2430;
  --ton-schwach: #5b6775;
  --ton-linie: #d6dbe2;
  --ton-flaeche: #ffffff;
  --ton-grund: #f4f6f9;
  --ton-akzent: #1a4d8f;
  --ton-warnung: #8a4b00;
  --ton-warnung-flaeche: #fff5e6;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 16px;
  line-height: 1.5;
  color: var(--ton-text);
  background: var(--ton-grund);
}

.kopf {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  padding: 0.75rem 1.25rem;
  background: var(--ton-flaeche);
  border-bottom: 1px solid var(--ton-linie);
}

.kopf-untertitel { color: var(--ton-schwach); }

.kopf-rechts {
  display: flex;
  align-items: center;
  gap: 1rem;
  font-size: 0.9rem;
}

.nutzer { color: var(--ton-schwach); }

.rueckweg {
  color: var(--ton-akzent);
  text-decoration: none;
  font-weight: 600;
}
.rueckweg:hover { text-decoration: underline; }

.navi {
  display: flex;
  gap: 0.25rem;
  flex-wrap: wrap;
  padding: 0 1.25rem;
  background: var(--ton-flaeche);
  border-bottom: 1px solid var(--ton-linie);
}

.navi a {
  padding: 0.6rem 0.9rem;
  color: var(--ton-text);
  text-decoration: none;
  border-bottom: 3px solid transparent;
}
.navi a:hover { border-bottom-color: var(--ton-akzent); }

.inhalt {
  max-width: 68rem;
  margin: 0 auto;
  padding: 1.5rem 1.25rem 3rem;
}

h1 { font-size: 1.5rem; margin: 0 0 0.75rem; }
h2 { font-size: 1.1rem; margin: 0 0 0.5rem; }

.einleitung { color: var(--ton-schwach); max-width: 46rem; }

.kasten {
  background: var(--ton-flaeche);
  border: 1px solid var(--ton-linie);
  border-radius: 6px;
  padding: 1rem 1.25rem;
  margin: 1rem 0;
}

.kasten-warnung {
  background: var(--ton-warnung-flaeche);
  border-color: #f0c48a;
  color: var(--ton-warnung);
}

.hinweis { color: var(--ton-schwach); font-size: 0.92rem; }

.fuss {
  max-width: 68rem;
  margin: 0 auto;
  padding: 1rem 1.25rem 2rem;
  color: var(--ton-schwach);
  font-size: 0.85rem;
}

table { border-collapse: collapse; width: 100%; }
th, td { text-align: left; padding: 0.5rem 0.6rem; border-bottom: 1px solid var(--ton-linie); }
th { font-size: 0.85rem; color: var(--ton-schwach); text-transform: uppercase; letter-spacing: 0.02em; }

/* Marken, Knöpfe, Filterleiste (ab U2/U3) */
.marke {
  display: inline-block;
  padding: 0.1rem 0.45rem;
  margin-right: 0.3rem;
  border: 1px solid var(--ton-linie);
  border-radius: 4px;
  background: var(--ton-grund);
  font-size: 0.85rem;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}

.knopf {
  display: inline-block;
  padding: 0.45rem 0.9rem;
  border: 1px solid var(--ton-linie);
  border-radius: 5px;
  background: var(--ton-flaeche);
  color: var(--ton-text);
  font-size: 0.95rem;
  text-decoration: none;
  cursor: pointer;
}
.knopf:hover { border-color: var(--ton-akzent); }

.knopf-haupt {
  background: var(--ton-akzent);
  border-color: var(--ton-akzent);
  color: #fff;
  font-weight: 600;
}

.reihe { display: inline-block; margin-right: 0.5rem; }

.filterleiste {
  display: flex;
  gap: 1rem;
  align-items: flex-end;
  flex-wrap: wrap;
}
.filterleiste label { font-size: 0.9rem; color: var(--ton-schwach); }
.filterleiste select, .filterleiste input[type="date"] { display: block; margin-top: 0.2rem; }
.ankreuz { display: flex; align-items: center; gap: 0.35rem; }

/* --- Vorschau-Band (nur AUTH_MODE=local) --------------------------------
   Absichtlich auffaellig: Niemand soll eine Vorschau mit erfundenen Daten
   fuer den Echtbetrieb halten. Im Echtbetrieb erscheint dieses Band nie. */
.vorschau-band {
  background: repeating-linear-gradient(
    45deg, #7a4a00, #7a4a00 12px, #915800 12px, #915800 24px);
  color: #fff;
  padding: 0.5rem 1.25rem;
  font-size: 0.9rem;
  text-align: center;
}
.vorschau-band strong { font-weight: 700; }

/* --- Statusuebersicht B1 (ab U4) ---------------------------------------- */

.summe { font-size: 1.02rem; margin: 0; }

.statustabelle { font-size: 0.94rem; }
.statustabelle td { vertical-align: top; }
.statustabelle th:nth-child(2), .statustabelle th:nth-child(3),
.statustabelle th:nth-child(4) { width: 3rem; }

/* Die Detailzeile traegt keine eigene Trennlinie — sie gehoert zur Zeile
   darueber und soll nicht wie ein eigener Datensatz aussehen. */
.detailzeile td { border-bottom: 1px solid var(--ton-linie); padding-top: 0; }
.detailzeile summary { cursor: pointer; color: var(--ton-akzent); font-size: 0.9rem; }
.detailzeile details[open] summary { margin-bottom: 0.75rem; }

.innentabelle { margin: 0 0 0.75rem; font-size: 0.9rem; background: var(--ton-grund); }
.innentabelle th, .innentabelle td { padding: 0.35rem 0.5rem; }

/* Farbe UND Text: Der Punkt ist eine Zugabe, nie der einzige Traeger der
   Information (Konzept B1). */
.punkt {
  display: inline-block;
  width: 0.6rem; height: 0.6rem;
  border-radius: 50%;
  margin-right: 0.4rem;
  vertical-align: baseline;
}
.punkt-offen { background: #b3401f; }
.punkt-wartet { background: #b98200; }
.punkt-teilweise { background: #4b7bb5; }
.punkt-fertig { background: #2e7d4f; }

button[disabled] { opacity: 0.5; cursor: not-allowed; }

p .reihe { display: inline-block; }

/* --- Loeschen B6 (ab U5) ------------------------------------------------ */

.exportliste { list-style: none; padding: 0; }
.exportliste li {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.3rem 0;
}
.exportliste form { margin: 0; }

.vermerkt { color: #2e7d4f; font-weight: 600; font-size: 0.9rem; }

.warnhinweis {
  background: var(--ton-warnung-flaeche);
  border-left: 3px solid #c0562f;
  color: var(--ton-warnung);
  padding: 0.6rem 0.9rem;
  margin: 0.75rem 0;
}

/* --- Spaltenbreiten und Vorlese-Hilfen (ab Template-Review) --------------
   Als Klassen statt als style-Attribut: Die Content-Security-Policy erlaubt
   nur `style-src 'self'` — ein Inline-Style wuerde vom Browser verworfen und
   die Spalte waere wieder unbeschriftet breit (Cross-Review CX-16). */
.spalte-zeile { width: 6rem; }
.spalte-ankreuz { width: 2.5rem; }

/* Text, der nur fuer Vorleseprogramme da ist. Sichtbar leer, aber vorhanden —
   damit eine Spalte ohne Beschriftung nicht namenlos bleibt (CX-17). */
.nur-vorlese {
  position: absolute;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}
