:root {
  --rot: #b71c1c;
  --rot-hell: #fdecea;
  --text: #1f2328;
  --leise: #667085;
  --rand: #e4e7ec;
  --flaeche: #f6f7f9;
  --gruen: #2e7d32;
  --gelb: #f9a825;
  --blau: #1565c0;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body {
  margin: 0;
  font: 16px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color: var(--text);
  background: var(--flaeche);
}
a { color: var(--rot); text-decoration: none; }
a:hover { text-decoration: underline; }
h1 { font-size: 1.5rem; margin: .2em 0 .6em; }
h2 { font-size: 1.15rem; margin: 0 0 .6em; }
h3 { font-size: 1rem; margin: 1em 0 .4em; }

.kopf {
  background: var(--rot); color: #fff;
  display: flex; flex-wrap: wrap; align-items: center; gap: .5rem 1.5rem;
  padding: .6rem 1rem;
}
.kopf a, .kopf .link { color: #fff; }
.marke { font-weight: 700; font-size: 1.1rem; }
.navi { display: flex; flex-wrap: wrap; gap: .3rem 1rem; align-items: center; }
.inline { display: inline; margin: 0; }
.link { background: none; border: 0; padding: 0; font: inherit; cursor: pointer; }

.inhalt { max-width: 1100px; margin: 0 auto; padding: 1rem; }
.titelzeile { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: .5rem; }
.spalten { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 1rem; }
.karte {
  background: #fff; border: 1px solid var(--rand); border-radius: 10px;
  padding: 1rem; margin-bottom: 1rem;
}
.schmal { max-width: 480px; margin: 1rem auto; }
.leise { color: var(--leise); }
.klein { font-size: .85rem; }

.kacheln { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: .6rem; margin-bottom: 1rem; }
.kachel { background: #fff; border: 1px solid var(--rand); border-radius: 10px; padding: .7rem; color: var(--leise); font-size: .9rem; }
.kachel .zahl { display: block; font-size: 1.6rem; font-weight: 700; color: var(--text); }

.eintrag {
  display: block; padding: .6rem .2rem; border-bottom: 1px solid var(--rand); color: var(--text);
}
.eintrag:hover { background: var(--flaeche); text-decoration: none; }
.eintrag .leise { display: block; font-size: .9rem; }
.eintrag-flach { padding: .3rem 0; }
.abgesagt { text-decoration: line-through; color: var(--leise); }
.vergangen { color: var(--leise); }
.farbpunkt { display: inline-block; width: .7em; height: .7em; border-radius: 50%; margin-right: .4em; }

.hinweis { padding: .5rem .7rem; border-left: 4px solid var(--blau); background: #eef4fb; margin-bottom: .4rem; border-radius: 4px; }
.hinweis.warnung { border-color: var(--gelb); background: #fff8e1; }
.meldung { padding: .7rem 1rem; border-radius: 8px; margin-bottom: 1rem; background: #e8f5e9; }
.meldung.error { background: var(--rot-hell); color: var(--rot); }

label { display: block; margin-bottom: .8rem; }
input, select, textarea {
  font: inherit; width: 100%; padding: .55rem .6rem; margin-top: .2rem;
  border: 1px solid #c9ced6; border-radius: 6px; background: #fff;
}
input[type="checkbox"] { width: auto; }
.filter { display: flex; flex-wrap: wrap; gap: .5rem; align-items: end; margin-bottom: 1rem; }
.filter input, .filter select { width: auto; margin: 0; }
.filter label { margin: 0; }

.knopf {
  display: inline-block; background: var(--rot); color: #fff; border: 0; border-radius: 6px;
  padding: .55rem 1rem; font: inherit; cursor: pointer;
}
.knopf:hover { text-decoration: none; opacity: .9; }
.knopf.leicht { background: #fff; color: var(--rot); border: 1px solid var(--rot); }

.daten { display: grid; grid-template-columns: max-content 1fr; gap: .3rem 1rem; margin: 0; }
.daten dt { color: var(--leise); }
.daten dd { margin: 0; }
.foto { float: right; width: 110px; height: 110px; object-fit: cover; border-radius: 8px; margin: 0 0 .5rem .5rem; }
.kontakt { padding: .5rem 0; border-bottom: 1px solid var(--rand); }
.kontakt .knopf { margin: .3rem .3rem 0 0; padding: .35rem .7rem; }
.marken { margin-top: .3rem; }
.marke-klein { display: inline-block; font-size: .75rem; padding: .05rem .5rem; border-radius: 99px; background: var(--flaeche); border: 1px solid var(--rand); }

.tabelle { width: 100%; border-collapse: collapse; background: #fff; }
.tabelle th, .tabelle td { text-align: left; padding: .45rem .5rem; border-bottom: 1px solid var(--rand); vertical-align: top; }
.tabelle th { font-size: .85rem; color: var(--leise); }
.scroll { overflow-x: auto; }

/* Anwesenheit */
.zaehler { display: flex; flex-wrap: wrap; gap: .4rem; }
.status { display: inline-block; padding: .1rem .55rem; border-radius: 99px; background: var(--flaeche); font-size: .85rem; }
.status-anwesend { background: #e8f5e9; color: var(--gruen); }
.status-verspaetet { background: #fff8e1; color: #8d6e00; }
.status-entschuldigt { background: #eef4fb; color: var(--blau); }
.status-unentschuldigt { background: var(--rot-hell); color: var(--rot); }
.sync { padding: .5rem .7rem; border-radius: 6px; background: #fff8e1; margin: .5rem 0; }
.sync.fehler { background: var(--rot-hell); color: var(--rot); }

.person { display: flex; justify-content: space-between; align-items: center; gap: .5rem; padding: .45rem 0; border-bottom: 1px solid var(--rand); }
.person .name { color: var(--text); flex: 1; }
.knoepfe { display: flex; gap: .3rem; }
.knoepfe button {
  width: 44px; height: 44px; border-radius: 8px; border: 1px solid #c9ced6; background: #fff;
  font-weight: 700; font-size: 1rem; cursor: pointer; color: var(--leise);
}
.knoepfe button:disabled { cursor: default; opacity: .6; }
.knoepfe .s-anwesend.aktiv { background: var(--gruen); border-color: var(--gruen); color: #fff; }
.knoepfe .s-verspaetet.aktiv { background: var(--gelb); border-color: var(--gelb); color: #fff; }
.knoepfe .s-entschuldigt.aktiv { background: var(--blau); border-color: var(--blau); color: #fff; }
.knoepfe .s-unentschuldigt.aktiv { background: var(--rot); border-color: var(--rot); color: #fff; }

/* Ausbildung */
.matrix .mitte { text-align: center; }
.matrix td, .matrix th { vertical-align: middle; }
.matrix td:first-child, .matrix th:first-child {
  position: sticky; left: 0; background: #fff; min-width: 9rem; white-space: nowrap; z-index: 1;
}
.matrix .stand { white-space: nowrap; }
.matrix tr.verliehen td { color: var(--leise); }
.haken {
  width: 40px; height: 40px; border-radius: 8px; border: 1px solid #c9ced6; background: #fff;
  font-weight: 700; font-size: 1.1rem; color: transparent; cursor: pointer;
}
.haken.aktiv { background: var(--gruen); border-color: var(--gruen); color: #fff; }
.haken:disabled { cursor: default; opacity: .6; }
.anforderungen li { margin-bottom: .4rem; }
.fortschritt { height: 8px; background: var(--flaeche); border-radius: 99px; overflow: hidden; margin-top: .2rem; }
.fortschritt span { display: block; height: 100%; background: var(--gruen); }

.qr svg { width: 220px; height: 220px; display: block; margin: .5rem auto; }
.schluessel { display: block; word-break: break-all; padding: .5rem; background: var(--flaeche); border-radius: 6px; }

.nur-drucken { display: none; }
@media print {
  .kopf, .nicht-drucken { display: none !important; }
  .nur-drucken { display: block; }
  body { background: #fff; font-size: 11pt; }
  .karte { border: 0; padding: 0; }
  a { color: inherit; }
}
@media (max-width: 480px) {
  .inhalt { padding: .6rem; }
  .knoepfe button { width: 40px; height: 40px; }
}
