/* Terminwahl – schlicht, mobil zuerst, nur Systemschriften */
:root {
  --text: #1d2733;
  --hell: #f4f6f8;
  --rand: #b9c3cd;
  --primaer: #1c5fa8;
  --primaer-dunkel: #144a85;
  --gefahr: #a8231c;
  --ok-bg: #e4f4e6;
  --fehler-bg: #fbe5e3;
  --hinweis-bg: #fff4d6;
}
* { box-sizing: border-box; }
html { font-size: 112.5%; }
body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  line-height: 1.5;
  color: var(--text);
  background: #fff;
}
.container { max-width: 52rem; margin: 0 auto; padding: 0 1rem; }
.bereich-admin .container { max-width: 64rem; }
.sprung { position: absolute; left: -999px; }
.sprung:focus { left: 0.5rem; top: 0.5rem; background: #fff; padding: 0.5rem; z-index: 10; }
h1 { font-size: 1.6rem; line-height: 1.25; margin: 1.2rem 0 0.8rem; }
h2 { font-size: 1.25rem; margin: 1.2rem 0 0.5rem; }
h3 { font-size: 1.05rem; margin: 1rem 0 0.4rem; }
a { color: var(--primaer); }
a:hover { color: var(--primaer-dunkel); }
:focus-visible { outline: 3px solid #f5a800; outline-offset: 2px; }

.kopf { background: var(--hell); border-bottom: 1px solid var(--rand); }
.kopf-innen { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding-top: 0.6rem; padding-bottom: 0.6rem; }
.schulname { margin: 0; font-weight: 700; font-size: 1.1rem; }
.nav { background: #fff; border-top: 1px solid var(--rand); }
.nav-innen { display: flex; flex-wrap: wrap; gap: 0.25rem 0.5rem; padding-top: 0.4rem; padding-bottom: 0.4rem; }
.nav a { padding: 0.5rem 0.7rem; border-radius: 0.4rem; text-decoration: none; min-height: 44px; display: inline-flex; align-items: center; }
.nav a:hover { background: var(--hell); }
.nav a.aktiv { background: var(--primaer); color: #fff; }
.fuss { padding: 2rem 1rem; font-size: 0.9rem; }

.karte { border: 1px solid var(--rand); border-radius: 0.6rem; padding: 1rem; margin: 1rem 0; background: #fff; }
.karte-warnung { border-color: #d6a400; background: #fffaea; }
.karte > h2:first-child { margin-top: 0; }
fieldset { border: 1px solid var(--rand); border-radius: 0.6rem; margin: 1rem 0; padding: 0.8rem 1rem 1rem; min-width: 0; }
legend { font-weight: 700; padding: 0 0.4rem; font-size: 1.15rem; }
.ort { margin: 0 0 0.6rem; color: #4a5866; }
.hilfe, .klein { font-size: 0.88rem; color: #4a5866; }
.gross { font-size: 1.5rem; }
.text { max-width: 40rem; }

label { display: block; font-weight: 600; margin: 0.8rem 0 0.25rem; }
input[type=text], input[type=password], input[type=date], input[type=time], input[type=number], input[type=file], select, textarea {
  width: 100%; font: inherit; padding: 0.65rem 0.7rem; border: 2px solid var(--rand); border-radius: 0.4rem; background: #fff; color: inherit; min-height: 48px;
}
textarea { min-height: 8rem; }
.code-feld { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 1.4rem; letter-spacing: 0.15em; text-transform: uppercase; }
label.haken, label.zeit { display: flex; align-items: center; gap: 0.7rem; font-weight: 400; margin: 0.4rem 0; min-height: 48px; cursor: pointer; }
input[type=checkbox] { width: 1.5rem; height: 1.5rem; flex: none; accent-color: var(--primaer); }
.zeiten { display: grid; grid-template-columns: repeat(auto-fill, minmax(13rem, 1fr)); gap: 0.4rem 0.8rem; }
label.zeit { border: 2px solid var(--rand); border-radius: 0.5rem; padding: 0.3rem 0.7rem; margin: 0; }
label.zeit:has(input:checked) { border-color: var(--primaer); background: #e9f1fa; }
.nur-sr { position: absolute; left: -999px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; font: inherit; font-weight: 600; min-height: 48px; padding: 0.55rem 1.2rem;
  border: 2px solid var(--primaer); border-radius: 0.5rem; background: #fff; color: var(--primaer); cursor: pointer; text-decoration: none; margin-top: 0.8rem;
}
.btn:hover { background: #e9f1fa; color: var(--primaer-dunkel); }
.btn-primary { background: var(--primaer); color: #fff; }
.btn-primary:hover { background: var(--primaer-dunkel); color: #fff; }
.btn-gefahr { border-color: var(--gefahr); color: var(--gefahr); }
.btn-gefahr:hover { background: var(--fehler-bg); color: var(--gefahr); }
.btn-leise { border-color: transparent; margin-top: 0; background: transparent; }
.btn-klein { min-height: 44px; padding: 0.3rem 0.8rem; margin-top: 0.4rem; font-size: 0.95rem; }
.btn[disabled] { opacity: 0.5; cursor: not-allowed; }
.knopfreihe { display: flex; flex-wrap: wrap; gap: 0 0.8rem; }
form.inline { display: inline; margin: 0; }
.inline-h { display: inline; font-size: 1.25rem; }
summary { cursor: pointer; min-height: 44px; padding: 0.4rem 0; font-weight: 600; }

.meldung { padding: 0.8rem 1rem; border-radius: 0.5rem; margin: 1rem 0; border-left: 6px solid; }
.meldung-ok { background: var(--ok-bg); border-color: #2e8b3d; }
.meldung-fehler { background: var(--fehler-bg); border-color: var(--gefahr); }
.meldung-hinweis { background: var(--hinweis-bg); border-color: #d6a400; }

.termin-gross { background: #e9f1fa; border-color: var(--primaer); }
.liste-zeiten { font-size: 1.15rem; }
.liste-zeiten li { margin: 0.3rem 0; }

.kacheln { display: grid; grid-template-columns: repeat(auto-fit, minmax(10rem, 1fr)); gap: 0.8rem; margin: 1rem 0; }
.kachel { border: 1px solid var(--rand); border-radius: 0.6rem; padding: 0.8rem; background: var(--hell); }
.kachel .zahl { display: block; font-size: 2rem; font-weight: 700; line-height: 1.1; }

.scroll { overflow-x: auto; }
.tabelle { border-collapse: collapse; width: 100%; font-size: 0.95rem; }
.tabelle th, .tabelle td { border-bottom: 1px solid var(--rand); padding: 0.45rem 0.6rem; text-align: left; vertical-align: middle; }
.tabelle th { background: var(--hell); }
.tabelle tr.dublette td { background: var(--hinweis-bg); }
.auswahl-liste { max-height: 24rem; overflow-y: auto; border: 1px solid var(--rand); border-radius: 0.5rem; padding: 0.3rem 0.8rem; }

.raster-form { display: grid; grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr)); gap: 0 1rem; }
.raster-form .voll { grid-column: 1 / -1; }
.zeile { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.3rem 1rem; border-bottom: 1px solid var(--hell); padding: 0.3rem 0; }
.zeilenform { display: flex; flex-wrap: wrap; align-items: center; gap: 0.3rem 0.8rem; margin: 0; }
.zeilenform label { display: flex; align-items: center; gap: 0.4rem; font-weight: 400; margin: 0; }
.zeilenform input[type=time], .zeilenform input[type=number], .zeilenform select { width: auto; min-width: 7rem; }
.reihe label { margin-top: 0.4rem; }

.balkenliste { list-style: none; padding: 0; }
.balkenliste li { display: grid; grid-template-columns: 9rem 1fr; gap: 0.2rem 0.8rem; align-items: center; padding: 0.3rem 0; }
.balkenliste .b-zahl { grid-column: 2; font-size: 0.88rem; color: #4a5866; }
meter { width: 100%; height: 1.2rem; }
.namensliste { columns: 2 14rem; }

@media (min-width: 40rem) {
  html { font-size: 118.75%; }
  .balkenliste li { grid-template-columns: 9rem minmax(8rem, 20rem) 1fr; }
  .balkenliste .b-zahl { grid-column: auto; }
}
