/* Saalbelegung Dorfzentrum Heßlar – gemeinsames Stylesheet (Teilnehmer + Verwaltung) */

*, *::before, *::after { box-sizing: border-box; }

:root {
  --rot: #C00D0D;
  --rot-dunkel: #9E0B0B;
  --rot-hell: #FDEEEE;
  --bg: #F4F4F5;
  --karte: #FFFFFF;
  --text: #18181B;
  --text-2: #3F3F46;
  --muted: #71717A;
  --linie: #E4E4E7;
  --linie-2: #D4D4D8;
  --flaeche: #F4F4F5;
  --ok: #15803D;
  --ok-hell: #EAF7EF;
  --warn: #A15C07;
  --warn-hell: #FEF5E1;
  --info-hell: #F1F5FD;
  --wa: #1A9E4B;
  --wa-dunkel: #158540;
  --radius: 16px;
  --radius-s: 10px;
  --schatten: 0 1px 2px rgba(24, 24, 27, .04), 0 2px 10px rgba(24, 24, 27, .05);
  --schatten-hoch: 0 -8px 40px rgba(24, 24, 27, .18);
  --unten: env(safe-area-inset-bottom, 0px);
}

html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}
html.blatt-offen, html.blatt-offen body { overflow: hidden; }
img { max-width: 100%; }
a { color: var(--rot); }
h1, h2, h3 { line-height: 1.2; margin: 0; letter-spacing: -.01em; }
code { font-size: .9em; background: var(--flaeche); padding: .1em .35em; border-radius: 6px; }
[hidden] { display: none !important; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.ico { width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; vertical-align: middle; }
.ico-mini { width: 14px; height: 14px; color: var(--muted); stroke-width: 2.2; vertical-align: -2px; }

.gedimmt { color: var(--muted); }
.klein { font-size: .85rem; }
.mitte { text-align: center; }
.vorzeile { display: block; font-size: .72rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 42px; padding: 9px 16px;
  border: 1px solid transparent; border-radius: 12px;
  font: inherit; font-weight: 600; font-size: .95rem; line-height: 1.2;
  text-decoration: none; cursor: pointer; white-space: nowrap;
  background: var(--karte); color: var(--text);
  transition: background .15s, border-color .15s, transform .05s;
  -webkit-tap-highlight-color: transparent;
}
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .55; cursor: default; }
.btn-primaer { background: var(--rot); color: #fff; }
.btn-primaer:hover { background: var(--rot-dunkel); }
.btn-zweit { background: var(--karte); border-color: var(--linie-2); color: var(--text); }
.btn-zweit:hover { border-color: var(--muted); }
.btn-geist { background: transparent; border-color: var(--linie); color: var(--text-2); }
.btn-geist:hover { background: var(--flaeche); }
.btn-gefahr { background: var(--karte); border-color: #F3C4C4; color: var(--rot); }
.btn-gefahr:hover { background: var(--rot-hell); }
.btn-wa { background: var(--wa); color: #fff; }
.btn-wa:hover { background: var(--wa-dunkel); }
.btn-wa.erledigt { background: var(--ok-hell); color: var(--ok); border-color: #BFE5CC; }
.btn-voll { width: 100%; }
.btn-gross { min-height: 52px; font-size: 1.02rem; border-radius: 14px; }
.btn-klein { min-height: 34px; padding: 6px 12px; font-size: .85rem; border-radius: 10px; }
.btn.bestaetigen { background: var(--rot); color: #fff; border-color: var(--rot); }

.rund-knopf {
  display: inline-grid; place-items: center; width: 40px; height: 40px; flex: none;
  border: 1px solid var(--linie); border-radius: 50%; background: var(--karte); color: var(--text);
  cursor: pointer; padding: 0; -webkit-tap-highlight-color: transparent;
}
.rund-knopf:disabled { opacity: .35; cursor: default; }
.pille {
  display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--linie); background: var(--karte);
  border-radius: 999px; padding: 6px 12px; font: inherit; font-size: .85rem; font-weight: 600; color: var(--text-2); cursor: pointer;
}

/* ---------- Formulare ---------- */
.formular { display: grid; gap: 14px; }
.feld { display: grid; gap: 6px; margin: 0; }
.feld > span { font-size: .85rem; font-weight: 600; color: var(--text-2); }
.feld > span small, .feld > span em { font-weight: 400; color: var(--muted); font-style: normal; }
.feld-hilfe { margin: -8px 0 0; font-size: .8rem; color: var(--muted); }
input, select, textarea {
  width: 100%; min-height: 46px; padding: 10px 12px;
  border: 1px solid var(--linie-2); border-radius: 12px; background: #fff; color: var(--text);
  font: inherit; font-size: 16px; /* verhindert Zoom auf iOS */
  -webkit-appearance: none; appearance: none;
}
select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2371717A' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 10px center; background-size: 18px; padding-right: 36px;
}
select:disabled { color: var(--muted); background-color: var(--flaeche); }
textarea { min-height: 96px; resize: vertical; line-height: 1.45; }
input[type="date"], input[type="time"] { min-height: 46px; }

/* Zeitwahl: zwei Zeitfelder statt langer Listen, dazu Dauer- und Frei-Knöpfe */
.zeitwahl { display: grid; gap: 12px; }
.zw-felder { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: end; gap: 8px; }
.zw-felder > .feld { min-width: 0; }
.zw-strich { padding-bottom: 13px; color: var(--muted); font-weight: 700; }
input.zw-zeit { min-width: 0; font-size: 1.3rem; font-weight: 650; font-variant-numeric: tabular-nums; text-align: center; min-height: 52px; letter-spacing: .02em; padding-left: 8px; padding-right: 8px; }
input.zw-zeit::-webkit-date-and-time-value { text-align: center; }
.chips { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.chips:empty { display: none; }
.zw-label { font-size: .78rem; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; margin-right: 2px; }
.chip-knopf {
  min-height: 36px; padding: 6px 12px; border-radius: 999px; border: 1px solid var(--linie); background: var(--karte);
  font: inherit; font-size: .86rem; font-weight: 600; color: var(--text); cursor: pointer; font-variant-numeric: tabular-nums;
  -webkit-tap-highlight-color: transparent; transition: background .12s, border-color .12s, color .12s;
}
.chip-knopf:hover:not(:disabled) { border-color: var(--text-2); }
.chip-knopf[aria-pressed="true"] { background: var(--text); border-color: var(--text); color: #fff; }
.chip-knopf:disabled { opacity: .35; cursor: default; }
.chip-frei { border-color: color-mix(in srgb, var(--ok) 45%, var(--linie)); color: var(--ok); background: var(--ok-hell); }
.zw-hinweis { margin: 0; min-height: 1.3em; font-size: .88rem; font-weight: 600; display: flex; align-items: center; gap: 6px; }
.zw-hinweis.ok { color: var(--ok); }
.zw-hinweis.fehler { color: var(--rot); }
.leiste .wahl { position: absolute; top: -3px; bottom: -3px; border-radius: 6px; border: 2px solid var(--text); background: color-mix(in srgb, var(--text) 12%, transparent); z-index: 2; }
.leiste .wahl.wahl-konflikt { border-color: var(--rot); background: color-mix(in srgb, var(--rot) 22%, transparent); }
.leiste-gross { overflow: visible; }
input[type="color"] { padding: 4px; width: 56px; }
input[type="checkbox"], input[type="radio"] { width: 20px; height: 20px; min-height: 0; padding: 0; accent-color: var(--rot); -webkit-appearance: auto; appearance: auto; }
input:focus, select:focus, textarea:focus, .btn:focus-visible, .rund-knopf:focus-visible, button:focus-visible {
  outline: 3px solid rgba(192, 13, 13, .22); outline-offset: 1px; border-color: var(--rot);
}
.check { display: flex; align-items: center; gap: 10px; font-weight: 500; cursor: pointer; }

/* ---------- Hinweise & Chips ---------- */
.hinweis {
  display: flex; gap: 10px; align-items: flex-start;
  padding: 12px 14px; border-radius: 12px; background: var(--flaeche); color: var(--text-2); font-size: .9rem; margin: 0;
}
.hinweis .ico { margin-top: 1px; }
.hinweis-info { background: var(--ok-hell); color: #14532D; }
.hinweis-info .ico { color: var(--wa); }
.hinweis-ok { background: var(--ok-hell); color: #14532D; }
.hinweis-warn { background: var(--warn-hell); color: #713F12; }
.hinweis-fehler { background: var(--rot-hell); color: #7F1010; display: block; }

.chip {
  display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; border-radius: 999px;
  font-size: .72rem; font-weight: 600; background: var(--flaeche); color: var(--text-2); white-space: nowrap;
}
.chip-rot { background: var(--rot-hell); color: var(--rot); }
.chip-gelb { background: var(--warn-hell); color: var(--warn); }
.chip-gruen { background: var(--ok-hell); color: var(--ok); }
.chip-grau { background: var(--flaeche); color: var(--muted); }
.punkt { display: inline-block; width: 10px; height: 10px; border-radius: 50%; flex: none; }

/* ---------- Login / PIN ---------- */
.seite-login { min-height: 100vh; min-height: 100dvh; display: grid; place-items: center; padding: 24px 16px; border-top: 4px solid var(--rot); }
.login-karte {
  width: 100%; max-width: 380px; background: var(--karte); border-radius: 22px; box-shadow: var(--schatten);
  padding: 32px 24px 28px; text-align: center; display: grid; gap: 14px;
}
.login-karte .formular { text-align: left; margin-top: 4px; }
.login-karte h1 { font-size: 1.6rem; }
.login-karte p { margin: 0; }
.login-wappen { width: 84px; height: auto; margin: 0 auto 4px; }
.pin-feld { text-align: center; font-size: 1.6rem !important; letter-spacing: .4em; min-height: 58px; font-weight: 600; }
.fuss { text-align: center; font-size: .8rem; color: var(--muted); padding: 16px; }
.fuss a { color: var(--muted); }

/* =====================================================================
   Teilnehmer-Ansicht
   ===================================================================== */
.seite-app { border-top: 4px solid var(--rot); padding-bottom: calc(96px + var(--unten)); overflow-x: hidden; overflow-x: clip; }

.kopf {
  display: flex; align-items: center; gap: 12px;
  max-width: 720px; margin: 0 auto; padding: 14px 16px 10px;
}
.kopf-wappen { width: 44px; height: auto; flex: none; }
.kopf-text { flex: 1; min-width: 0; }
.kopf-titel { display: block; font-size: 1.3rem; font-weight: 750; letter-spacing: -.02em; }
.kopf-knopf {
  position: relative; display: inline-flex; text-decoration: none; align-items: center; gap: 6px;
  border: 1px solid var(--linie); background: var(--karte); border-radius: 999px; padding: 8px 12px;
  font: inherit; font-size: .88rem; font-weight: 600; color: var(--text-2); cursor: pointer;
}
.zaehler {
  position: absolute; top: -6px; right: -6px; min-width: 20px; height: 20px; padding: 0 6px;
  border-radius: 999px; background: var(--rot); color: #fff; font-size: .72rem; font-weight: 700; display: grid; place-items: center;
}

.app { max-width: 720px; margin: 0 auto; padding: 0 16px; }

.segment {
  display: flex; gap: 4px; padding: 4px; background: #E9E9EC; border-radius: 14px;
}
.segment > button {
  flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-height: 40px; border: 0; border-radius: 10px; background: transparent;
  font: inherit; font-size: .92rem; font-weight: 600; color: var(--text-2); cursor: pointer; padding: 6px 10px;
  -webkit-tap-highlight-color: transparent;
}
.segment > button[aria-selected="true"], .segment > button[aria-checked="true"] {
  background: var(--karte); color: var(--text); box-shadow: 0 1px 3px rgba(0, 0, 0, .1);
}
.segment-klein > button { min-height: 38px; font-size: .88rem; }
.segment > a {
  flex: 1; min-width: 0; display: grid; place-items: center; min-height: 38px; border-radius: 10px; padding: 6px 10px;
  font-size: .88rem; font-weight: 600; color: var(--text-2); text-decoration: none; white-space: nowrap; -webkit-tap-highlight-color: transparent;
}
.segment > a[aria-current="page"] { background: var(--karte); color: var(--text); box-shadow: 0 1px 3px rgba(0, 0, 0, .1); }
.g-reiter { margin: 20px 0 12px; }

.wochen-nav { display: flex; align-items: center; gap: 12px; margin: 16px 0 10px; }
.wochen-titel { flex: 1; text-align: center; display: grid; line-height: 1.25; }
.wochen-titel strong { font-size: 1.05rem; }
.wochen-titel span { font-size: .85rem; color: var(--muted); }
.pille-heute { display: flex; margin: -2px auto 10px; }

.tage { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.tag {
  position: relative; display: flex; align-items: stretch; gap: 12px;
  background: var(--karte); border-radius: var(--radius); box-shadow: var(--schatten);
  padding: 12px 12px 12px 14px; min-height: 72px;
}
.tag-buchbar { cursor: pointer; -webkit-tap-highlight-color: transparent; }
.tag-buchbar:active { background: #FAFAFA; }
.tag-vergangen { opacity: .55; box-shadow: none; }
.tag-heute { box-shadow: inset 4px 0 0 var(--rot), var(--schatten); }
.tag-datum { width: 40px; flex: none; display: flex; flex-direction: column; align-items: center; padding-top: 2px; }
.tag-wt { font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.tag-nr { font-size: 1.45rem; font-weight: 750; line-height: 1.1; }
.tag-we .tag-wt { color: var(--rot); }
.tag-heute-marke { font-size: .62rem; font-weight: 700; color: var(--rot); text-transform: uppercase; letter-spacing: .05em; }
.tag-inhalt { flex: 1; min-width: 0; display: grid; gap: 8px; align-content: center; }
.tag-frei { color: var(--muted); font-size: .9rem; }
.tag-plus {
  align-self: center; display: grid; place-items: center; width: 36px; height: 36px; flex: none;
  border-radius: 50%; border: 0; background: var(--rot-hell); color: var(--rot); cursor: pointer; padding: 0;
}
.tag-skelett { min-height: 72px; }
.tag-skelett span { display: block; background: linear-gradient(90deg, #F0F0F2, #E6E6E9, #F0F0F2); background-size: 200% 100%; animation: schimmer 1.2s infinite; border-radius: 8px; }
.tag-skelett span:first-child { width: 40px; }
.tag-skelett span:last-child { flex: 1; }
.tag-fehler { display: block; text-align: center; color: var(--text-2); }
.tag-fehler .pille { margin-top: 8px; }
@keyframes schimmer { to { background-position: -200% 0; } }

.leiste { position: relative; display: block; height: 6px; border-radius: 999px; background: #EDEDF0; overflow: hidden; }
.leiste i { position: absolute; top: 0; bottom: 0; border-radius: 999px; }
.leiste b { position: absolute; top: 0; bottom: 0; width: 1px; margin-left: -.5px; background: rgba(24, 24, 27, .22); pointer-events: none; }

.termine { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.termin { display: grid; grid-template-columns: 10px minmax(0, 1fr); align-items: center; gap: 1px 10px; line-height: 1.3; }
.termin-name { font-weight: 650; font-size: .95rem; min-width: 0; overflow-wrap: break-word; }
.termin-meta { grid-column: 2; display: flex; align-items: center; gap: 4px 8px; flex-wrap: wrap; }
.termin-zeit { font-variant-numeric: tabular-nums; font-size: .86rem; color: var(--text-2); white-space: nowrap; }
.termin-abgesagt .termin-zeit, .termin-abgesagt .termin-name { text-decoration: line-through; color: var(--muted); }
.termin-abgesagt .punkt { opacity: .35; }

.link-gruppe { display: inline-flex; align-items: center; gap: 8px; margin: 2px auto 0; padding: 8px 14px; border-radius: 999px; background: var(--flaeche); font-weight: 700; font-size: 1.05rem; }
.link-gruppe .punkt { width: 12px; height: 12px; }
.link-andere { display: block; margin-top: 14px; text-align: center; font-size: .88rem; color: var(--muted); }
.link-url { overflow-wrap: anywhere; font-size: .92rem; }
.angemeldet { margin: 14px 0 0; padding: 12px 14px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 12px; background: var(--karte); border-radius: 14px; font-size: .85rem; color: var(--muted); }
.angemeldet b { color: var(--text); font-weight: 600; }
.angemeldet-knoepfe { display: flex; gap: 8px; flex-wrap: wrap; }
.wa-hinweis { display: flex; gap: 8px; align-items: center; justify-content: center; font-size: .82rem; color: var(--muted); margin: 18px 4px 0; text-align: center; }
.wa-hinweis .ico { color: var(--wa); width: 18px; height: 18px; }

.aktionsleiste {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 20;
  padding: 12px 16px calc(12px + var(--unten));
  background: linear-gradient(to top, var(--bg) 70%, rgba(244, 244, 245, 0));
}
.aktionsleiste .btn { max-width: 688px; margin: 0 auto; display: flex; box-shadow: 0 6px 20px rgba(192, 13, 13, .28); }

/* ---------- Ansichtswahl & Monatskalender ---------- */
.ansicht-leiste { display: flex; gap: 8px; align-items: stretch; }
.ansicht-leiste #raumwahl { flex: 1 1 auto; min-width: 0; }
.ansicht-leiste .segment-icons { flex: none; }
.segment-icons > button { flex: none; width: 44px; min-width: 44px; padding: 0; display: grid; place-items: center; }
.segment-icons .ico { width: 20px; height: 20px; }
.monat { background: var(--karte); border-radius: var(--radius); box-shadow: var(--schatten); padding: 8px 8px 10px; }
.monat-kopf, .monat-tage { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.monat-kopf span { text-align: center; font-size: .7rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); padding: 4px 0 6px; }
.monat-kopf .we { color: var(--rot); }
.mt {
  position: relative; display: flex; flex-direction: column; align-items: center; gap: 4px; min-height: 56px; padding: 6px 2px 5px;
  border: 0; border-radius: 12px; background: transparent; font: inherit; color: var(--text); cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.mt:hover { background: var(--flaeche); }
.mt-nr { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; font-weight: 650; font-size: .95rem; font-variant-numeric: tabular-nums; }
.mt-balken { display: flex; flex-direction: column; gap: 2px; width: 72%; align-items: stretch; }
.mt-balken i { display: block; height: 4px; border-radius: 2px; }
.mt-balken em { font-style: normal; font-size: .6rem; font-weight: 700; color: var(--muted); line-height: 1; text-align: center; }
.mt-aus { opacity: .35; }
.mt-vorbei .mt-nr { color: var(--muted); }
.mt-we .mt-nr { color: var(--rot); }
.mt-heute .mt-nr { background: var(--rot); color: #fff; }
.mt-gewaehlt { background: var(--rot-hell); box-shadow: inset 0 0 0 1.5px var(--rot); }
.mt-gewaehlt:hover { background: var(--rot-hell); }
.tag-detail { margin-top: 10px; background: var(--karte); border-radius: var(--radius); box-shadow: var(--schatten); padding: 14px 16px 16px; display: grid; gap: 10px; }
.tag-detail:empty { display: none; }
.td-kopf { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.td-kopf b { font-size: 1.02rem; }
.td-kopf span { font-size: .85rem; color: var(--muted); font-weight: 600; }
.td-frei { margin: 0; color: var(--muted); font-size: .92rem; }
.leiste-gross { height: 10px; }
.leiste-skala { position: relative; display: block; height: 14px; margin-top: 2px; }
.leiste-skala span { position: absolute; top: 0; transform: translateX(-50%); font-size: .66rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.leiste-skala span:first-child { transform: none; }
.leiste-skala span:last-child { transform: translateX(-100%); }
.gruppe-fest { display: flex; align-items: center; gap: 10px; min-height: 46px; padding: 10px 12px; border-radius: 12px; background: var(--flaeche); font-weight: 650; }
.seite-app .kopf-titel.gruppen-titel { display: flex; align-items: center; min-width: 0; font-size: 1.2rem; line-height: 1.2; }
.gt-name { min-width: 0; overflow-wrap: anywhere; }
.kopf-knopf { flex: none; }

.termin-aktion {
  border: 1px solid #F3C4C4; background: #fff; color: var(--rot); border-radius: 999px; padding: 3px 11px;
  font: inherit; font-size: .76rem; font-weight: 700; cursor: pointer; -webkit-tap-highlight-color: transparent;
}
.termin-aktion-zurueck { color: var(--text-2); border-color: var(--linie-2); }
.termin-aktion.bestaetigen { background: var(--rot); border-color: var(--rot); color: #fff; }

/* ---------- Blätter (Bottom Sheets) ---------- */
.blatt {
  position: fixed; inset: 0; z-index: 50; background: rgba(24, 24, 27, 0);
  display: flex; align-items: flex-end; justify-content: center; transition: background .2s;
}
.blatt.offen { background: rgba(24, 24, 27, .45); }
.blatt-innen {
  width: 100%; max-width: 560px; max-height: 94vh; max-height: 94dvh;
  background: var(--karte); border-radius: 22px 22px 0 0; box-shadow: var(--schatten-hoch);
  display: flex; flex-direction: column; transform: translateY(100%); transition: transform .22s ease-out;
}
.blatt.offen .blatt-innen { transform: none; }
.blatt-kopf { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 16px 10px 20px; border-bottom: 1px solid var(--linie); }
.blatt-kopf h2 { font-size: 1.15rem; }
.blatt-inhalt { overflow-y: auto; -webkit-overflow-scrolling: touch; padding: 16px 20px 20px; overscroll-behavior: contain; }
.blatt-fuss { padding: 12px 20px calc(12px + var(--unten)); border-top: 1px solid var(--linie); }
@media (min-width: 620px) {
  .blatt { align-items: center; padding: 24px; }
  .blatt-innen { border-radius: 22px; max-height: 90vh; transform: translateY(24px); opacity: 0; transition: transform .2s, opacity .2s; }
  .blatt.offen .blatt-innen { opacity: 1; }
}

.tagesbelegung { background: var(--flaeche); border-radius: 12px; padding: 12px 14px; display: grid; gap: 8px; }
.tagesbelegung:empty { display: none; }
.tb-kopf { display: flex; align-items: center; gap: 6px; font-size: .85rem; font-weight: 600; color: var(--text-2); }
.tb-kopf .ico { width: 16px; height: 16px; }
.tb-frei { margin: 0; font-size: .88rem; color: var(--muted); }
.termine-kompakt .termin-name { font-size: .9rem; }

.zeit-frei { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

.erfolg { display: grid; gap: 14px; padding-bottom: calc(20px + var(--unten)); }
.erfolg h3 { text-align: center; font-size: 1.3rem; }
.erfolg-symbol { width: 64px; height: 64px; margin: 8px auto 0; border-radius: 50%; background: var(--ok-hell); color: var(--ok); display: grid; place-items: center; }
.erfolg-symbol .ico { width: 34px; height: 34px; stroke-width: 2.6; }
.erfolg-karte { display: grid; gap: 6px; padding: 14px 16px; border-radius: 14px; background: var(--flaeche); box-shadow: inset 4px 0 0 var(--f); }
.erfolg-karte b { font-size: 1.05rem; }
.erfolg-karte span { display: flex; align-items: center; gap: 8px; color: var(--text-2); font-size: .93rem; }
.erfolg-karte .ico { width: 17px; height: 17px; color: var(--muted); }

.meine { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.meine-karte { display: grid; gap: 4px; padding: 12px 14px; border-radius: 14px; border: 1px solid var(--linie); box-shadow: inset 4px 0 0 var(--f); }
.meine-kopf { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.meine-zeile { font-size: .9rem; color: var(--text-2); }
.meine-vorher { font-size: .8rem; color: var(--muted); text-decoration: line-through; }
.meine-karte .btn { justify-self: start; margin-top: 6px; }
.meine-inaktiv { opacity: .7; }
.meine-alt .meine-karte { opacity: .6; }
.zwischen { font-size: .8rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin: 22px 0 10px; }
.leer { text-align: center; color: var(--muted); padding: 24px 8px; }
.leer .ico { width: 36px; height: 36px; color: var(--linie-2); }

.toast {
  position: fixed; left: 50%; bottom: calc(92px + var(--unten)); z-index: 80; transform: translate(-50%, 12px); opacity: 0;
  background: #27272A; color: #fff; padding: 10px 16px; border-radius: 12px; font-size: .9rem; font-weight: 500;
  transition: opacity .2s, transform .2s; max-width: calc(100% - 32px); box-shadow: 0 8px 24px rgba(0, 0, 0, .2);
}
.toast.sichtbar { opacity: 1; transform: translate(-50%, 0); }

@media (min-width: 900px) {
  .app, .kopf { max-width: 760px; }
}


/* ---------- Gruppen-Link ---------- */
.gruppen-titel { display: inline-flex; align-items: center; gap: 10px; }
.login-karte .gruppen-titel { justify-content: center; }
.gruppen-titel .punkt { width: 12px; height: 12px; }
.seite-gruppe .kopf-titel { font-size: 1.2rem; }
.seite-gruppe { padding-bottom: calc(32px + var(--unten)); }
.g-erfolg { display: grid; gap: 12px; background: var(--karte); border-radius: var(--radius); box-shadow: var(--schatten); padding: 20px 18px; margin-top: 8px; }
.g-erfolg h2 { text-align: center; font-size: 1.25rem; }
.g-erfolg p { margin: 0; }
.g-teilen { display: grid; gap: 10px; background: var(--karte); border-radius: var(--radius); box-shadow: var(--schatten); padding: 16px; margin-top: 12px; }
.g-teilen-kopf { display: flex; align-items: center; gap: 8px; font-size: 1rem; }
.g-teilen-kopf .ico { color: var(--wa); }
.g-termine { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.g-termin { background: var(--karte); border-radius: var(--radius); box-shadow: var(--schatten), inset 4px 0 0 var(--f); padding: 14px 16px 14px 18px; display: grid; gap: 4px; }
.g-kopf { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.g-kopf b { font-size: 1.02rem; }
.g-zeile { color: var(--text-2); font-size: .93rem; font-variant-numeric: tabular-nums; }
.g-info { margin: 6px 0 0; font-size: .85rem; color: var(--muted); }
.g-info a { display: inline-block; margin-top: 4px; color: var(--wa-dunkel); font-weight: 600; }
.g-abgesagt { box-shadow: var(--schatten), inset 4px 0 0 var(--linie-2); }
.g-abgesagt .g-kopf b, .g-abgesagt .g-zeile { text-decoration: line-through; color: var(--muted); }
.g-aktion { margin: 6px 0 0; }
.g-absage { margin-top: 6px; }
.g-absage > summary { list-style: none; width: fit-content; }
.g-absage > summary::-webkit-details-marker { display: none; }
.g-absage[open] > summary { background: var(--rot-hell); border-color: #F3C4C4; color: var(--rot); }
.g-absage .formular { margin-top: 12px; padding: 14px; border-radius: 12px; background: var(--flaeche); }
.chip .ico-mini { width: 12px; height: 12px; }

/* =====================================================================
   Verwaltung
   ===================================================================== */
.seite-admin { background: var(--bg); }
.admin { display: grid; grid-template-columns: 248px 1fr; min-height: 100vh; }
.admin-nav {
  position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; gap: 18px;
  background: var(--karte); border-right: 1px solid var(--linie); border-top: 4px solid var(--rot); padding: 18px 14px;
}
.admin-marke { display: flex; align-items: center; gap: 10px; padding: 0 6px; text-decoration: none; color: inherit; }
.admin-marke img { width: 40px; }
.admin-marke b { display: block; font-size: 1.05rem; }
.admin-menue { display: grid; gap: 2px; }
.admin-menue a {
  display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 10px;
  color: var(--text-2); text-decoration: none; font-weight: 550; font-size: .94rem;
}
.admin-menue a:hover { background: var(--flaeche); }
.admin-menue a.aktiv { background: var(--rot-hell); color: var(--rot); }
.admin-menue .zahl { margin-left: auto; background: var(--wa); color: #fff; border-radius: 999px; font-size: .72rem; font-weight: 700; padding: 1px 7px; }
.admin-nutzer { margin-top: auto; display: grid; gap: 8px; padding: 12px 6px 0; border-top: 1px solid var(--linie); font-size: .85rem; color: var(--muted); }
.admin-nutzer form { margin: 0; }
.admin-nutzer a { color: var(--text-2); text-decoration: none; display: flex; align-items: center; gap: 8px; }

.admin-main { min-width: 0; padding: 26px 32px 60px; }
.admin-kopf { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 20px; }
.admin-kopf h1 { font-size: 1.55rem; letter-spacing: -.02em; }
.admin-kopf .zurueck { display: inline-flex; align-items: center; gap: 4px; font-size: .85rem; color: var(--muted); text-decoration: none; margin-bottom: 4px; }
.kopf-aktionen { display: flex; gap: 8px; flex-wrap: wrap; }
.flash { margin-bottom: 16px; }

.karte { background: var(--karte); border-radius: var(--radius); box-shadow: var(--schatten); padding: 20px; min-width: 0; }
.karte + .karte { margin-top: 16px; }
.karte-kopf { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 14px; flex-wrap: wrap; }
.karte-kopf h2 { font-size: 1.05rem; display: flex; align-items: center; gap: 8px; }
.karte-kopf h2 .ico { color: var(--muted); }
.raster { display: grid; gap: 16px; }
.raster .karte + .karte { margin-top: 0; }
.raster-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.raster-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.raster-haupt { grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); align-items: start; }
.raster-schmal { max-width: 920px; }
.feld-reihe { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; }
.formular-fuss { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; padding-top: 6px; }

.kennzahlen { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 16px; }
.kennzahl { background: var(--karte); border-radius: var(--radius); box-shadow: var(--schatten); padding: 16px 18px; }
.kennzahl b { display: block; font-size: 1.8rem; font-weight: 750; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.kennzahl span { font-size: .85rem; color: var(--muted); }
.kennzahl-akzent b { color: var(--wa); }

.tabelle-wrap { overflow-x: auto; margin: 0 -20px; padding: 0 20px; }
.tabelle { width: 100%; border-collapse: collapse; font-size: .92rem; }
.tabelle th { text-align: left; font-size: .75rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 650; padding: 8px 10px; border-bottom: 1px solid var(--linie); white-space: nowrap; }
.tabelle td { padding: 11px 10px; border-bottom: 1px solid var(--linie); vertical-align: middle; }
.tabelle tr:last-child td { border-bottom: 0; }
.tabelle tr.klickbar { cursor: pointer; }
.tabelle tr.klickbar:hover td { background: #FAFAFA; }
.tabelle .rechts { text-align: right; }
.tabelle .zahl { font-variant-numeric: tabular-nums; white-space: nowrap; }
.tabelle tr.inaktiv td { color: var(--muted); }
.tabelle tr.inaktiv td:first-child { text-decoration: line-through; }
.gruppe-zelle { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; }

.liste { list-style: none; margin: 0; padding: 0; }
.liste > li { display: flex; align-items: center; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--linie); }
.liste > li:last-child { border-bottom: 0; }
.liste-haupt { flex: 1; min-width: 0; display: grid; gap: 2px; }
.liste-haupt b { overflow-wrap: anywhere; }
.liste-haupt small { color: var(--muted); font-size: .84rem; }
.liste a.liste-link { color: inherit; text-decoration: none; display: flex; align-items: center; gap: 12px; flex: 1; min-width: 0; }
.leer-zeile { color: var(--muted); font-size: .92rem; padding: 6px 0; margin: 0; }

.filter { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; align-items: end; margin-bottom: 16px; }
.filter .btn { min-height: 46px; }

.zugang-box { display: grid; gap: 12px; }
.zugang-zeile { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 14px; background: var(--flaeche); border-radius: 12px; }
.zugang-zeile span { font-size: .8rem; color: var(--muted); display: block; }
.zugang-zeile b { font-size: 1rem; overflow-wrap: anywhere; }
.zugang-pin { font-size: 1.5rem !important; letter-spacing: .25em; font-variant-numeric: tabular-nums; }
.zugang-zeile.direktlink b { font-size: .85rem; font-weight: 500; }
.zugang-zeile span small { font-size: inherit; }
.pin-zelle { font-variant-numeric: tabular-nums; letter-spacing: .12em; }

.wa-box { display: grid; gap: 12px; padding: 16px; border-radius: 14px; background: var(--ok-hell); border: 1px solid #CDEBD7; }
.wa-box h3 { font-size: 1rem; display: flex; align-items: center; gap: 8px; color: #14532D; }
.wa-box h3 .ico { color: var(--wa); }
.wa-box textarea { min-height: 170px; font-size: .92rem; background: #fff; overflow: hidden; }
.wa-knoepfe { display: flex; flex-wrap: wrap; gap: 8px; }
.wa-knoepfe .btn { flex: 1 1 200px; }

.farbwahl { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.farbwahl label { position: relative; cursor: pointer; }
.farbwahl input[type="radio"] { position: absolute; opacity: 0; pointer-events: none; }
.farbwahl .farbe { display: block; width: 32px; height: 32px; border-radius: 50%; box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .6); }
.farbwahl input:checked + .farbe { box-shadow: 0 0 0 2px #fff, 0 0 0 4px var(--text); }
.farbwahl input:focus-visible + .farbe { outline: 3px solid rgba(192, 13, 13, .3); outline-offset: 3px; }

.reiter { display: flex; gap: 4px; flex-wrap: wrap; margin-bottom: 16px; border-bottom: 1px solid var(--linie); }
.reiter a { padding: 10px 14px; text-decoration: none; color: var(--muted); font-weight: 600; font-size: .92rem; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.reiter a.aktiv { color: var(--rot); border-color: var(--rot); }

.zeilen-form { display: grid; grid-template-columns: 1.4fr 1fr 1fr auto auto; gap: 8px; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--linie); }
.zeilen-form:last-of-type { border-bottom: 0; }
.zeilen-form input, .zeilen-form select { min-height: 40px; padding: 7px 10px; }
.zeilen-form .check { font-size: .85rem; white-space: nowrap; }
.zeilen-kopf { display: grid; grid-template-columns: 1.4fr 1fr 1fr auto auto; gap: 8px; font-size: .75rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 650; }

.gefahrzone { border: 1px solid #F3C4C4; }
.detail-liste { display: grid; grid-template-columns: auto 1fr; gap: 8px 16px; margin: 0; font-size: .92rem; }
.detail-liste dt { color: var(--muted); }
.detail-liste dd { margin: 0; overflow-wrap: anywhere; }

/* ---------- Kalender (Verwaltung): Tag · Woche · Monat · Liste ---------- */
.kal-leiste { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 16px; margin-bottom: 14px; }
.kal-nav { display: flex; align-items: center; gap: 8px; min-width: 0; }
.kal-titel { display: grid; margin-left: 6px; min-width: 0; }
.kal-titel h2 { margin: 0; font-size: 1.25rem; line-height: 1.2; white-space: nowrap; }
.kal-titel span { font-size: .82rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.kal-springen { position: relative; display: grid; place-items: center; width: 38px; height: 38px; border-radius: 999px; color: var(--text-2); cursor: pointer; }
.kal-springen:hover { background: var(--flaeche); }
.kal-springen input { position: absolute; inset: 0; opacity: 0; cursor: pointer; min-height: 0; padding: 0; border: 0; }
.kal-springen input::-webkit-calendar-picker-indicator { position: absolute; inset: 0; width: 100%; height: 100%; cursor: pointer; }
.kal-filter { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.kal-filter .segment { flex: none; width: auto; }
.kal-filter .segment-links > a { flex: none; }
.segment-links > a {
  flex: 1; display: grid; place-items: center; min-height: 34px; padding: 5px 14px; border-radius: 9px;
  text-decoration: none; color: var(--text-2); font-weight: 600; font-size: .88rem; white-space: nowrap;
}
.segment-links > a.aktiv { background: var(--karte); color: var(--text); box-shadow: 0 1px 3px rgba(0, 0, 0, .1); }
.schalter-pille { display: inline-flex; align-items: center; gap: 8px; min-height: 34px; padding: 5px 12px; border-radius: 999px; border: 1px solid var(--linie); background: var(--karte); color: var(--text-2); font-weight: 600; font-size: .85rem; text-decoration: none; }
.schalter-punkt { width: 26px; height: 16px; border-radius: 999px; background: var(--linie-2); position: relative; transition: background .15s; }
.schalter-punkt::after { content: ""; position: absolute; top: 2px; left: 2px; width: 12px; height: 12px; border-radius: 50%; background: #fff; transition: transform .15s; box-shadow: 0 1px 2px rgba(0,0,0,.2); }
.schalter-pille.an .schalter-punkt { background: var(--rot); }
.schalter-pille.an .schalter-punkt::after { transform: translateX(10px); }

/* Zeitraster */
.kal { --std: 42px; --zeitspalte: 56px; background: var(--karte); border-radius: var(--radius); box-shadow: var(--schatten); }
.kal-kopfzeile, .kal-ganztag, .kal-koerper { display: grid; grid-template-columns: var(--zeitspalte) repeat(var(--spalten), minmax(0, 1fr)); }
.kal-kopfzeile { position: sticky; top: 0; z-index: 6; background: var(--karte); border-radius: var(--radius) var(--radius) 0 0; border-bottom: 1px solid var(--linie); }
.kal-ecke { border-right: 1px solid var(--linie); }
.kal-ecke-text { display: grid; place-items: center; font-size: .66rem; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; text-align: center; line-height: 1.1; padding: 4px; }
.kal-kopf { position: relative; display: grid; justify-items: center; gap: 2px; padding: 10px 6px 9px; border-left: 1px solid var(--linie); color: var(--text); text-decoration: none; }
a.kal-kopf:hover { background: var(--flaeche); }
.kal-kopf small { font-size: .7rem; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .07em; }
.kal-kopf b { min-width: 32px; height: 32px; display: grid; place-items: center; font-size: 1.15rem; border-radius: 999px; }
.kal-kopf.heute small { color: var(--rot); }
.kal-kopf.heute b { color: #fff; background: var(--rot); }
.kal-kopf.wochenende small { color: var(--text-2); }
.kal-kopf-raum { justify-items: start; padding: 12px 14px; }
.kal-kopf-raum b { height: auto; font-size: 1rem; }
.kal-kopf-raum.heute b { color: var(--text); background: none; }
.kal-kopf-raum small, .kal-kopf-raum.heute small { text-transform: none; letter-spacing: 0; font-weight: 500; color: var(--muted); }
.kal-plus { position: absolute; top: 10px; right: 10px; width: 28px; height: 28px; display: grid; place-items: center; border-radius: 999px; color: var(--muted); }
.kal-plus:hover { background: var(--flaeche); color: var(--text); }
.kal-plus .ico { width: 18px; height: 18px; }
.kal-ganztag { border-bottom: 1px solid var(--linie); background: var(--flaeche); }
.kal-balken { grid-column: 2 / -1; display: grid; grid-template-columns: repeat(var(--spalten), minmax(0, 1fr)); gap: 3px 0; padding: 4px 0; }
.kal-balken-termin {
  margin: 0 3px; display: flex; align-items: center; gap: 6px; min-width: 0; padding: 0 8px; border-radius: 7px;
  background: var(--f); color: #fff; text-decoration: none; font-size: .78rem; white-space: nowrap; overflow: hidden;
}
.kal-balken-termin b { overflow: hidden; text-overflow: ellipsis; }
.kal-balken-termin span { opacity: .9; overflow: hidden; text-overflow: ellipsis; font-variant-numeric: tabular-nums; }
.kal-balken-termin.links-offen { border-top-left-radius: 0; border-bottom-left-radius: 0; margin-left: 0; }
.kal-balken-termin.rechts-offen { border-top-right-radius: 0; border-bottom-right-radius: 0; margin-right: 0; }
.kal-balken-termin.abgesagt { opacity: .45; text-decoration: line-through; }
.kal-zeiten { position: relative; border-right: 1px solid var(--linie); }
.kal-zeiten span { position: absolute; right: 8px; transform: translateY(-50%); font-size: .72rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.kal-spalte {
  position: relative; border-left: 1px solid var(--linie); cursor: copy;
  background-image:
    repeating-linear-gradient(to bottom, transparent 0, transparent calc(var(--std) / 2 - 1px), #F3F3F5 calc(var(--std) / 2 - 1px), #F3F3F5 calc(var(--std) / 2), transparent calc(var(--std) / 2), transparent calc(var(--std) - 1px), var(--linie) calc(var(--std) - 1px), var(--linie) var(--std));
}
.kal-zeiten + .kal-spalte, .kal-ecke + .kal-kopf { border-left: 0; }
.kal-spalte.wochenende { background-color: #FBFBFC; }
.kal-spalte.vergangen { background-color: #FAFAFA; }
.kal-spalte.heute { background-color: #FFFAFA; }
.kal-block {
  position: absolute; display: flex; flex-direction: column; gap: 1px; padding: 4px 7px; overflow: hidden; border-radius: 7px;
  background: #F4F4F5; background: color-mix(in srgb, var(--f) 15%, #fff); border-left: 3px solid var(--f);
  color: var(--text); text-decoration: none; font-size: .76rem; line-height: 1.25; cursor: pointer; z-index: 1;
  transition: box-shadow .15s;
}
.kal-block:hover { box-shadow: 0 6px 18px rgba(0, 0, 0, .14); z-index: 4; }
.kb-kopf { display: flex; align-items: center; gap: 4px; min-width: 0; }
.kb-kopf b { font-size: .8rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.kb-kopf .ico-mini { width: 12px; height: 12px; flex: none; color: var(--text-2); }
.kb-info { flex: none; width: 8px; height: 8px; border-radius: 50%; background: var(--wa); margin-left: auto; }
.kb-zeit { color: var(--text-2); font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kb-wer { color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: flex; align-items: center; gap: 3px; }
.kb-wer .ico-mini { width: 12px; height: 12px; flex: none; }
.kal-block.kurz { flex-direction: row; align-items: center; gap: 6px; padding-top: 1px; padding-bottom: 1px; }
.kal-block.kurz .kb-kopf { order: 2; min-width: 0; }
.kal-block.kurz .kb-zeit { order: 1; flex: none; }
.kal-block.info { box-shadow: inset 0 0 0 1.5px var(--wa); }
.kal-block.abgesagt { background: repeating-linear-gradient(135deg, #fff 0 6px, #F4F4F5 6px 12px); border-left-color: var(--muted); color: var(--muted); }
.kal-block.abgesagt b { text-decoration: line-through; color: var(--muted); }
.kal-jetzt { position: absolute; left: 0; right: 0; height: 2px; background: var(--rot); z-index: 5; pointer-events: none; }
.kal-jetzt::before { content: ""; position: absolute; left: -5px; top: -4px; width: 10px; height: 10px; border-radius: 50%; background: var(--rot); }
.kal-geist { position: absolute; left: 2px; right: 2px; border-radius: 7px; border: 2px dashed var(--rot); background: rgba(192, 13, 13, .06); color: var(--rot); font-size: .75rem; font-weight: 700; padding: 2px 6px; pointer-events: none; z-index: 3; font-variant-numeric: tabular-nums; }

/* Monat */
.kal-monat { background: var(--karte); border-radius: var(--radius); box-shadow: var(--schatten); overflow: hidden; }
.km-kopf, .km-raster { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.km-kopf span { padding: 10px; font-size: .72rem; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .07em; border-bottom: 1px solid var(--linie); }
.km-tag { min-height: 128px; padding: 6px 6px 8px; border-left: 1px solid var(--linie); border-bottom: 1px solid var(--linie); display: flex; flex-direction: column; gap: 3px; min-width: 0; cursor: copy; }
.km-tag:nth-child(7n + 1) { border-left: 0; }
.km-tag.wochenende { background: #FBFBFC; }
.km-tag.anderer-monat { background: #F7F7F8; }
.km-tag.anderer-monat .km-nr { color: var(--muted); font-weight: 500; }
.km-tag-kopf { display: flex; align-items: center; justify-content: space-between; }
.km-nr { white-space: nowrap; min-width: 28px; height: 28px; padding: 0 6px; display: grid; place-items: center; border-radius: 999px; font-weight: 700; font-size: .88rem; color: var(--text); text-decoration: none; font-variant-numeric: tabular-nums; }
.km-nr:hover { background: var(--flaeche); }
.km-tag.heute .km-nr { background: var(--rot); color: #fff; }
.km-plus { width: 26px; height: 26px; display: grid; place-items: center; border-radius: 999px; color: var(--muted); opacity: 0; transition: opacity .12s; }
.km-tag:hover .km-plus { opacity: 1; }
.km-plus:hover { background: var(--flaeche); color: var(--text); }
.km-plus .ico { width: 16px; height: 16px; }
.km-liste { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: minmax(0, 1fr); gap: 3px; }
.km-liste > li { min-width: 0; }
.km-termin {
  display: flex; align-items: center; gap: 5px; min-width: 0; padding: 2px 6px; border-radius: 6px; font-size: .76rem; line-height: 1.35;
  color: var(--text); text-decoration: none; background: color-mix(in srgb, var(--f) 13%, #fff); border-left: 3px solid var(--f);
}
.km-termin:hover { background: color-mix(in srgb, var(--f) 24%, #fff); }
.km-zeit { flex: none; color: var(--text-2); font-variant-numeric: tabular-nums; font-size: .72rem; }
.km-name { flex: 1; min-width: 0; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.km-raum { flex: none; font-size: .66rem; font-weight: 700; color: var(--text-2); background: rgba(255, 255, 255, .7); border-radius: 4px; padding: 0 4px; }
.km-termin.mehrtaegig { background: var(--f); color: #fff; }
.km-termin.mehrtaegig .km-zeit, .km-termin.mehrtaegig .km-raum { color: #fff; background: transparent; }
.km-termin.abgesagt { background: repeating-linear-gradient(135deg, #fff 0 5px, #F4F4F5 5px 10px); border-left-color: var(--muted); color: var(--muted); }
.km-termin.abgesagt .km-name { text-decoration: line-through; }
.km-termin.info { box-shadow: inset 0 0 0 1.5px var(--wa); }
.km-mehr { font-size: .75rem; font-weight: 600; color: var(--text-2); padding: 0 6px; text-decoration: none; }
.km-mehr:hover { color: var(--text); text-decoration: underline; }
.km-legende { display: flex; gap: 16px; margin: 10px 4px 0; font-size: .8rem; color: var(--muted); }

/* Liste (auch mobil für Tag/Woche) */
.kal-liste, .kal-mobil-liste { display: grid; gap: 12px; }
.kal-mobil-liste { display: none; }
.kl-tag { background: var(--karte); border-radius: var(--radius); box-shadow: var(--schatten); padding: 6px 8px 8px; }
.kl-tag.vergangen { opacity: .75; }
.kl-tag h3 { display: flex; align-items: center; gap: 8px; margin: 0; padding: 8px 8px 6px; font-size: .95rem; }
.kl-tag h3 > a:first-child { color: var(--text); text-decoration: none; }
.kl-tag h3 > a:first-child:hover { text-decoration: underline; }
.kl-plus { margin-left: auto; width: 30px; height: 30px; display: grid; place-items: center; border-radius: 999px; color: var(--muted); }
.kl-plus:hover { background: var(--flaeche); color: var(--text); }
.kl-plus .ico { width: 18px; height: 18px; }
.kl-frei { margin: 0 8px 6px; color: var(--muted); font-size: .88rem; }
.kl-zeile { display: grid; grid-template-columns: 104px 10px minmax(0, 1fr) auto auto; align-items: center; gap: 10px; padding: 9px 8px; border-radius: 10px; color: var(--text); text-decoration: none; }
.kl-zeile:hover { background: var(--flaeche); }
.kl-zeile + .kl-zeile { border-top: 1px solid var(--linie); }
.kl-zeit { font-variant-numeric: tabular-nums; font-weight: 600; font-size: .88rem; }
.kl-name { display: grid; min-width: 0; }
.kl-name b { display: flex; align-items: center; gap: 5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.kl-name small { color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.kl-name .ico-mini { width: 13px; height: 13px; color: var(--text-2); }
.kl-zeile.abgesagt .kl-name b, .kl-zeile.abgesagt .kl-zeit { text-decoration: line-through; color: var(--muted); }
.kl-status:empty { display: none; }


/* Raum-Auswahl als Radio-Segment (Verwaltung) */
.segment-radio label { flex: 1; position: relative; margin: 0; }
.segment-radio input { position: absolute; opacity: 0; pointer-events: none; }
.segment-radio span { display: grid; place-items: center; min-height: 38px; padding: 6px 10px; border-radius: 10px; font-weight: 600; font-size: .9rem; color: var(--text-2); cursor: pointer; }
.segment-radio input:checked + span { background: var(--karte); color: var(--text); box-shadow: 0 1px 3px rgba(0, 0, 0, .1); }
.segment-radio input:focus-visible + span { outline: 3px solid rgba(192, 13, 13, .22); }

.zeilen-raum { grid-template-columns: minmax(0, 1fr) 110px 200px 170px; }
.zeilen-zeit { grid-template-columns: minmax(0, 1fr) 100px 100px 84px 150px; }
.zeilen-optionen { display: flex; gap: 12px; flex-wrap: wrap; }
.zeilen-knoepfe { display: flex; gap: 6px; justify-content: flex-end; }
.zeilen-knoepfe .btn .ico { width: 16px; height: 16px; }
.zeilen-neu { background: var(--flaeche); margin: 8px -10px 0; padding: 10px; border-radius: 12px; border: 0; }
.admin-zeile-aktionen { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; margin: 0; }
.admin-zeile-aktionen input { width: 170px; min-height: 34px; padding: 6px 10px; font-size: .88rem; }
@media (max-width: 900px) {
  .zeilen-raum, .zeilen-zeit { grid-template-columns: 1fr 1fr; }
  .zeilen-raum > :first-child, .zeilen-zeit > :first-child { grid-column: 1 / -1; }
  .zeilen-knoepfe { grid-column: 1 / -1; justify-content: flex-start; }
  .admin-zeile-aktionen { flex: 1 0 100%; }
  .admin-zeile-aktionen input { flex: 1; width: auto; }
}

/* ---------- Verwaltung mobil ---------- */
@media (max-width: 1100px) {
  .kennzahlen { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .raster-haupt { grid-template-columns: 1fr; }
}
@media (max-width: 900px) {
  .admin { grid-template-columns: minmax(0, 1fr); }
  .admin-nav { min-width: 0; }
  .admin-nav {
    position: sticky; top: 0; z-index: 30; height: auto; flex-direction: row; flex-wrap: wrap; align-items: center;
    gap: 8px 12px; padding: 10px 12px 0; border-right: 0; border-bottom: 1px solid var(--linie);
  }
  .admin-marke img { width: 32px; }
  .admin-marke .vorzeile { display: none; }
  .admin-menue { order: 3; flex: 1 0 100%; display: flex; overflow-x: auto; gap: 2px; padding-bottom: 8px; scrollbar-width: none; }
  .admin-menue::-webkit-scrollbar { display: none; }
  .admin-menue a { white-space: nowrap; padding: 8px 10px; font-size: .88rem; }
  .admin-menue a .ico { width: 18px; height: 18px; }
  .admin-nutzer { margin: 0 0 0 auto; padding: 0; border: 0; display: flex; align-items: center; }
  .admin-nutzer .nutzer-name { display: none; }
  .admin-main { padding: 18px 14px 60px; }
  .admin-kopf h1 { font-size: 1.3rem; }
  .raster-2, .raster-3 { grid-template-columns: 1fr; }
  .karte { padding: 16px; }
  .tabelle-wrap { margin: 0 -16px; padding: 0 16px; }
  .kal { display: none; }
  .kal-mobil-liste { display: grid; }
  .kal-leiste, .kal-filter { width: 100%; }
  .kal-filter .segment { flex: 1 1 auto; }
  .km-tag { min-height: 64px; padding: 4px; }
  .km-plus, .km-mon { display: none; }
  .km-liste { display: flex; flex-wrap: wrap; gap: 3px; }
  .km-termin { width: 8px; height: 8px; padding: 0; border: 0; border-radius: 50%; background: var(--f); }
  .km-termin > * { display: none; }
  .km-mehr { font-size: .7rem; padding: 0; }
  .km-legende { display: none; }
  .kl-zeile { grid-template-columns: 78px 10px minmax(0, 1fr); }
  .kl-raum, .kl-status { grid-column: 3; justify-self: start; }
  .zeilen-form, .zeilen-kopf { grid-template-columns: 1fr 1fr; }
  .zeilen-kopf { display: none; }
  .zeilen-form > :first-child { grid-column: 1 / -1; }
  /* Tabellen als Karten */
  .tabelle-mobil thead { display: none; }
  .tabelle-mobil, .tabelle-mobil tbody, .tabelle-mobil tr, .tabelle-mobil td { display: block; width: 100%; }
  .tabelle-mobil tr { padding: 12px 0; border-bottom: 1px solid var(--linie); }
  .tabelle-mobil tr:last-child { border-bottom: 0; }
  .tabelle-mobil td { border: 0; padding: 2px 0; }
  .tabelle-mobil td[data-l]::before { content: attr(data-l) ": "; color: var(--muted); font-size: .82rem; }
  .tabelle-mobil td.rechts { display: none; }
  .tabelle-mobil td.zahl { display: inline-block; width: auto; margin-right: 10px; font-weight: 600; }
}
@media (max-width: 520px) {
  .kennzahl b { font-size: 1.5rem; }
  .filter { grid-template-columns: 1fr 1fr; }
}
@media print {
  .admin-nav, .kopf-aktionen, .kal-filter, .kal-nav .rund-knopf, .kal-nav .btn, .kal-springen, .aktionsleiste { display: none !important; }
  .admin { display: block; }
  .kal { display: block !important; box-shadow: none; }
  .kal-mobil-liste { display: none !important; }
  .kal-kopfzeile { position: static; }
}
