/* Dokumentengenerator Fachbereich Kindertagesstätten
   Variante B "Werkbank". Farben und Typografie nach ARCHITEKTUR.md.

   Schriften: Rubik für den Fließtext, Kalam als Akzent. Die Dateien liegen
   später unter renderer/assets/fonts und werden hier selbst ausgeliefert.
   Kein Abruf bei Google, damit ohne Einwilligung nichts nach außen geht. */

@font-face {
  font-family: Rubik; font-style: normal; font-weight: 300; font-display: swap;
  src: url("/schriften/Rubik-Light.ttf") format("truetype");
}
@font-face {
  font-family: Rubik; font-style: normal; font-weight: 400; font-display: swap;
  src: url("/schriften/Rubik-Regular.ttf") format("truetype");
}
@font-face {
  font-family: Rubik; font-style: normal; font-weight: 500; font-display: swap;
  src: url("/schriften/Rubik-Medium.ttf") format("truetype");
}
@font-face {
  font-family: Rubik; font-style: normal; font-weight: 600 700; font-display: swap;
  src: url("/schriften/Rubik-Bold.ttf") format("truetype");
}
@font-face {
  font-family: Kalam; font-style: normal; font-weight: 700; font-display: swap;
  src: url("/schriften/Kalam-Bold.ttf") format("truetype");
}

:root {
  --navy: #21274C;
  --navy-hell: #3A4068;
  --beere: #CC1552;
  --beere-dunkel: #9E1040;
  --grau: #8B90A6;
  --text: #21274C;
  --text-weich: #454A63;
  --linie: #E6E8F0;
  --linie-weich: #F0F2F8;
  --flaeche: #F4F6FB;
  --werkbank: #EEF1F7;
  --weiss: #ffffff;
  --gruen-bg: #E7F5EC;
  --gruen-fg: #1F6B3B;
  --gelb-bg: #FFF4E0;
  --gelb-fg: #8A5A00;
  --rot-bg: #FDECEF;
  --rot-fg: #9E1040;
  --radius: 11px;
}

* { box-sizing: border-box; }

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

body.werkbank { background: var(--werkbank); }
body.dunkel { background: var(--navy); }

a { color: var(--beere); }
a:hover { color: var(--beere-dunkel); }

h1 { font-size: 28px; font-weight: 700; margin: 0 0 6px; }
h2 { font-size: 20px; font-weight: 700; margin: 0 0 10px; }

:focus-visible {
  outline: 3px solid var(--beere);
  outline-offset: 2px;
}

.huelle { min-height: 100vh; display: flex; flex-direction: column; }
.inhalt { flex: 1; width: 100%; max-width: 1180px; margin: 0 auto; padding: 32px 24px 48px; }
.inhalt.breit { max-width: 100%; padding: 0; }

.ueberspringen {
  position: absolute; left: -9999px; top: 0; background: var(--navy); color: #fff;
  padding: 12px 18px; z-index: 50;
}
.ueberspringen:focus { left: 8px; top: 8px; color: #fff; }

/* ---------- Kopf und Fuß ---------- */

.kopf {
  background: var(--weiss);
  border-bottom: 1px solid var(--linie);
  padding: 14px 24px;
  display: flex; flex-wrap: wrap; gap: 18px;
  align-items: center; justify-content: space-between;
}
.kopf.navy { background: var(--navy); border-bottom: 0; color: #fff; }
.kopf.navy a { color: #fff; }

.marke { display: flex; align-items: center; gap: 13px; text-decoration: none; color: inherit; }
.marke .zeichen {
  width: 34px; height: 34px; border-radius: 6px 14px 6px 14px; background: var(--beere);
  display: flex; align-items: center; justify-content: center; flex: none;
}
.marke .name { font-size: 15px; font-weight: 700; line-height: 1.2; }
.marke .unter { font-size: 12px; color: var(--grau); }
.kopf.navy .marke .unter { color: #AEB4C9; }

.navigation { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.navigation a {
  text-decoration: none; color: var(--text-weich); padding: 11px 15px; border-radius: 999px;
  font-size: 14px; min-height: 44px; display: inline-flex; align-items: center;
}
.navigation a.aktiv { background: var(--linie-weich); color: var(--navy); font-weight: 500; }
.navigation a:hover { background: var(--linie-weich); }

.person { display: flex; align-items: center; gap: 9px; padding-left: 14px; border-left: 1px solid var(--linie); }
.person .kreis {
  width: 34px; height: 34px; border-radius: 50%; background: var(--navy); color: #fff;
  font-size: 12px; font-weight: 600; display: flex; align-items: center; justify-content: center; flex: none;
}
.person .zeile { font-size: 13px; line-height: 1.3; }
.person .mail { color: var(--grau); font-size: 12px; }

.fuss {
  background: var(--navy); color: #fff; padding: 18px 24px; font-size: 12.5px;
  display: flex; flex-wrap: wrap; gap: 12px; justify-content: space-between; align-items: center;
}
.fuss .leise { color: #AEB4C9; }

/* ---------- Knöpfe ---------- */

.knopf, button.knopf, a.knopf {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  min-height: 44px; padding: 0 18px; border-radius: var(--radius);
  font: inherit; font-size: 15px; font-weight: 600; cursor: pointer;
  border: 0; background: var(--beere); color: #fff; text-decoration: none;
}
.knopf:hover { background: var(--beere-dunkel); color: #fff; }
.knopf.ruhig { background: var(--weiss); color: var(--text-weich); border: 1px solid #D7DCE8; font-weight: 500; }
.knopf.ruhig:hover { background: var(--linie-weich); color: var(--navy); }
.knopf.dunkel { background: var(--navy); }
.knopf.dunkel:hover { background: #151A36; }
.knopf.voll { width: 100%; }
.knopf.klein { min-height: 44px; padding: 0 13px; font-size: 13.5px; font-weight: 500; }
.knopf[disabled] { opacity: .5; cursor: not-allowed; }

.zurueck {
  text-decoration: none; color: var(--text-weich); font-size: 14px;
  min-height: 44px; display: inline-flex; align-items: center; gap: 8px;
}
.kopf.navy .zurueck { color: #fff; }

/* ---------- Felder ---------- */

label { display: block; font-size: 13px; font-weight: 500; margin-bottom: 6px; }
label.zeile { display: flex; align-items: center; justify-content: space-between; gap: 12px; font-size: 14.5px; font-weight: 400; margin: 0; }

input[type="text"], input[type="email"], input[type="search"], input[type="file"], select, textarea {
  width: 100%; min-height: 44px; padding: 10px 13px;
  border: 1px solid #D7DCE8; border-radius: 9px; font: inherit; font-size: 15px;
  background: var(--weiss); color: var(--text);
}
textarea { line-height: 1.55; resize: vertical; }
input[type="checkbox"], input[type="radio"] { width: 20px; height: 20px; accent-color: var(--beere); flex: none; }

.feld { margin-bottom: 16px; }
.hilfe { font-size: 12.5px; color: var(--grau); line-height: 1.5; margin: 6px 0 0; }

fieldset { border: 0; padding: 0; margin: 0 0 18px; }
legend {
  font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
  color: var(--grau); padding: 0; margin-bottom: 10px;
}

.schalterliste label.zeile {
  padding: 11px 0; border-top: 1px solid var(--linie-weich); cursor: pointer; min-height: 44px;
}

/* ---------- Karten und Listen ---------- */

.karte { background: var(--weiss); border: 1px solid var(--linie); border-radius: 14px; padding: 20px 22px; }
.karte.flach { padding: 0; overflow: hidden; }

.gitter { display: grid; gap: 14px; }
.gitter.fuenf { grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); }
.gitter.vier { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
.gitter.zwei { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }

.spalten { display: flex; flex-wrap: wrap; gap: 24px; }
.spalten .haupt { flex: 999 1 560px; min-width: 0; }
.spalten .rand { flex: 1 1 300px; min-width: 0; display: flex; flex-direction: column; gap: 16px; }

.liste a.eintrag, .liste .eintrag {
  text-decoration: none; color: inherit; display: flex; flex-wrap: wrap; gap: 14px;
  align-items: center; padding: 15px 18px; border-bottom: 1px solid var(--linie-weich);
  min-height: 44px;
}
.liste a.eintrag:hover { background: #FAFBFE; }
.liste .eintrag:last-child { border-bottom: 0; }
.eintrag .titel { display: block; font-size: 15px; font-weight: 600; margin-bottom: 3px; }
.eintrag .meta { display: block; font-size: 12.5px; color: var(--grau); }
.eintrag .wachsen { flex: 999 1 220px; min-width: 0; }
.eintrag .zeit { font-size: 12.5px; color: var(--grau); text-align: right; }

.marke-abschnitt {
  font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
  color: var(--grau); margin: 0 0 12px;
}

.plakette { font-size: 12px; font-weight: 600; padding: 5px 11px; border-radius: 999px; display: inline-block; }
.plakette.entwurf { background: var(--linie-weich); color: var(--text-weich); }
.plakette.zur_freigabe { background: var(--gelb-bg); color: var(--gelb-fg); }
.plakette.freigegeben { background: var(--gruen-bg); color: var(--gruen-fg); }
.plakette.offen { background: var(--rot-bg); color: var(--rot-fg); }

.hinweis {
  background: #FFFBF2; border-left: 3px solid #F29200; border-radius: 10px;
  padding: 14px 18px; font-size: 14px; line-height: 1.55; color: #7A4E00; margin-bottom: 20px;
}
.hinweis.gut { background: var(--gruen-bg); border-left-color: var(--gruen-fg); color: #14502C; }
.hinweis.ruhig { background: #F0F4FF; border-left-color: var(--beere); color: var(--text-weich); }

.kalam { font-family: Kalam, "Segoe Script", cursive; font-size: 18px; color: var(--beere); }

.leer { text-align: center; padding: 48px 20px; color: var(--grau); }

/* ---------- Werkbank ---------- */

.werkbank-kopf {
  background: var(--navy); color: #fff; padding: 12px 24px;
  display: flex; flex-wrap: wrap; gap: 16px; align-items: center; justify-content: space-between;
}
.werkbank-kopf .plakette { background: var(--navy-hell); color: #fff; }
.werkbank-kopf .leise { font-size: 12.5px; color: #AEB4C9; }
.werkbank-kopf strong { font-size: 15px; font-weight: 600; }

.werkbank-flaeche { flex: 1; display: flex; flex-wrap: wrap; align-items: stretch; }

.seite-links {
  flex: 1 1 340px; min-width: 0; background: var(--weiss);
  border-right: 1px solid var(--linie); padding: 20px 22px 32px;
}
.seite-rechts {
  flex: 1 1 340px; min-width: 0; background: var(--weiss);
  border-left: 1px solid var(--linie); padding: 20px 22px 32px;
  display: flex; flex-direction: column; gap: 20px;
}
.mitte {
  flex: 999 1 520px; min-width: 0; padding: 24px;
  display: flex; flex-direction: column; align-items: center; gap: 14px;
}

.reiter { display: flex; gap: 6px; margin-bottom: 20px; background: var(--linie-weich); padding: 4px; border-radius: 10px; }
.reiter a {
  flex: 1; min-height: 44px; display: flex; align-items: center; justify-content: center;
  border-radius: 8px; text-decoration: none; color: var(--text-weich);
  font-size: 14px; background: transparent;
}
.reiter a.aktiv { background: var(--weiss); color: var(--navy); font-weight: 600; }

.themenwahl { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 8px; }
.themenwahl label {
  min-height: 44px; padding: 0 13px; border-radius: 999px; border: 1.5px solid var(--linie);
  background: var(--weiss); font-size: 13px; font-weight: 500; cursor: pointer;
  display: inline-flex; align-items: center; gap: 8px; margin: 0;
}
.themenwahl input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.themenwahl input:focus-visible + .text { outline: 3px solid var(--beere); outline-offset: 3px; }
.themenwahl .punkt { width: 10px; height: 10px; border-radius: 50%; display: inline-block; flex: none; }
.themenwahl label.gewaehlt { border-color: var(--navy); background: var(--navy); color: #fff; }

.layoutwahl { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 10px; }
.layoutwahl label {
  border: 2px solid var(--linie); background: var(--weiss); border-radius: var(--radius);
  padding: 10px; cursor: pointer; margin: 0; text-align: left;
}
.layoutwahl label.gewaehlt { border-color: var(--beere); }
.layoutwahl .muster { display: block; height: 52px; border-radius: 6px; margin-bottom: 8px; }
.layoutwahl .muster.liste { background: repeating-linear-gradient(180deg, #E6E8F0 0 3px, #fff 3px 9px); }
.layoutwahl .muster.karten { background: repeating-linear-gradient(90deg, #EEF1F7 0 26px, #fff 26px 32px); }
.layoutwahl .titel { display: block; font-size: 14px; font-weight: 600; }
.layoutwahl .hinweistext { display: block; font-size: 12px; color: var(--grau); }

.vorschau-leiste { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; align-self: stretch; }
.vorschau-leiste a {
  min-height: 44px; display: inline-flex; align-items: center; padding: 0 14px; border-radius: 9px;
  border: 1px solid #D7DCE8; background: var(--weiss); color: var(--text-weich);
  font-size: 13.5px; text-decoration: none;
}
.vorschau-leiste a.aktiv { background: var(--navy); border-color: var(--navy); color: #fff; }

.blatt {
  background: var(--weiss); width: 100%; max-width: 460px; aspect-ratio: 210 / 297;
  border-radius: 4px; box-shadow: 0 10px 30px rgba(33, 39, 76, .13); border: 0;
}
.blatt.druck { aspect-ratio: 216 / 303; }
.blatt-hinweis { font-size: 12.5px; color: var(--grau); text-align: center; }

.block {
  border: 1px solid var(--linie); border-radius: var(--radius); padding: 14px; margin-bottom: 14px;
}
.block .kopfzeile { display: flex; gap: 10px; align-items: center; justify-content: space-between; margin-bottom: 10px; }

.kommentar { border: 1px solid var(--linie); border-radius: var(--radius); padding: 13px 14px; margin-bottom: 11px; }
.kommentar.offen { background: #FFFBF2; }
.kommentar .zeile1 { display: flex; gap: 9px; align-items: center; margin-bottom: 7px; flex-wrap: wrap; }
.kommentar .nummer {
  width: 22px; height: 22px; border-radius: 50%; background: #F29200; color: #fff;
  font-size: 11px; font-weight: 700; display: flex; align-items: center; justify-content: center; flex: none;
}
.kommentar .text { font-size: 14px; line-height: 1.5; color: var(--text-weich); margin-bottom: 9px; }
.kommentar.erledigt { opacity: .62; }

.verlauf { font-size: 13px; color: var(--text-weich); }
.verlauf div { display: flex; gap: 10px; padding: 6px 0; }
.verlauf .zeit { color: var(--grau); width: 54px; flex: none; }

.aufwand { font-size: 26px; font-weight: 700; line-height: 1.1; }

/* ---------- Tabellen ---------- */

table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { text-align: left; padding: 11px 12px; border-bottom: 1px solid var(--linie-weich); }
th { font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--grau); }

/* ---------- Medien ---------- */

.medienkarte { background: var(--weiss); border: 1px solid var(--linie); border-radius: 13px; overflow: hidden; display: flex; flex-direction: column; }
.medienkarte .bild { aspect-ratio: 4 / 3; background: var(--linie-weich); display: flex; align-items: center; justify-content: center; position: relative; }
.medienkarte .bild img { width: 100%; height: 100%; object-fit: cover; }
.medienkarte .bild .plakette { position: absolute; top: 9px; left: 9px; }
.medienkarte .leib { padding: 12px 13px 14px; display: flex; flex-direction: column; gap: 5px; flex: 1; }
.medienkarte .name { font-size: 13.5px; font-weight: 600; line-height: 1.3; word-break: break-word; }
.medienkarte .recht { font-size: 12px; color: var(--grau); line-height: 1.45; }
.stichwort { font-size: 11px; background: var(--linie-weich); color: var(--text-weich); padding: 3px 8px; border-radius: 999px; display: inline-block; }

/* ---------- Anmeldung ---------- */

.anmeldung { min-height: 100vh; display: flex; flex-wrap: wrap; align-items: stretch; }
.anmeldung .werbung {
  flex: 1 1 420px; min-width: 0; background: var(--navy); color: #fff;
  padding: 56px 44px; display: flex; flex-direction: column; justify-content: space-between; gap: 40px;
}
.anmeldung .werbung h1 { font-size: 32px; line-height: 1.15; margin-bottom: 16px; }
.anmeldung .werbung p { color: #C7CCDD; font-size: 16px; line-height: 1.6; max-width: 460px; }
.anmeldung .werbung ul { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 13px; max-width: 460px; }
.anmeldung .werbung li { display: flex; gap: 12px; align-items: flex-start; font-size: 14.5px; color: #E4E7F0; }
.anmeldung .formular {
  flex: 999 1 460px; min-width: 0; background: var(--flaeche);
  padding: 56px 44px; display: flex; align-items: center; justify-content: center;
}
.anmeldung .formular .innen { width: 100%; max-width: 430px; }

@media (max-width: 720px) {
  .inhalt { padding: 24px 16px 40px; }
  .anmeldung .werbung, .anmeldung .formular { padding: 32px 20px; }
  .kopf { padding: 12px 16px; }
  .seite-links, .seite-rechts, .mitte { padding: 18px 16px 28px; }
}

@media print {
  .kopf, .fuss, .navigation, .seite-links, .seite-rechts { display: none; }
}
