/* ==========================================================================
   gympet.css v3 – Elternsprechtag
   Ruhiges, helles Design: klare Typografie, dezente Flächen,
   Schulfarben (Logo) nur als Akzent.
   ========================================================================== */

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
img, svg { display: block; max-width: 100%; }
input, button, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: none; }
button:disabled { cursor: not-allowed; }
ul, ol { list-style: none; }
a { color: inherit; text-decoration: none; }
[hidden], .hidden { display: none !important; }

/* ---------- Tokens ---------- */
:root {
  --bg:            #f4f6f9;
  --surface:       #ffffff;
  --surface-2:     #f8fafc;
  --surface-3:     #eef2f6;
  --border:        #e1e6ed;
  --border-strong: #cdd5df;

  --text:          #1f2a37;
  --text-muted:    #4b5563;
  --text-soft:     #6b7280;

  --primary:       #1d4f91;
  --primary-600:   #163d70;
  --primary-tint:  #eaf1fa;
  --primary-line:  #c7d7ee;

  --success:       #2e7d32;
  --success-600:   #24632a;
  --success-tint:  #edf7ee;
  --success-line:  #c8e3ca;

  --warning:       #8a5a00;
  --warning-strong:#b7791f;
  --warning-tint:  #fff6e5;
  --warning-line:  #f0d6a2;

  --danger:        #b42318;
  --danger-600:    #912018;
  --danger-tint:   #fdeceb;
  --danger-line:   #f3c0bb;

  --brand-blue:    #3ea8e5;
  --brand-green:   #84b819;
  --brand-red:     #e84c3d;

  --radius-sm: 6px;
  --radius:    8px;
  --radius-lg: 12px;
  --shadow-sm: 0 1px 2px rgba(16, 24, 40, 0.05);
  --shadow:    0 4px 12px rgba(16, 24, 40, 0.08);
  --shadow-lg: 0 24px 60px rgba(16, 24, 40, 0.22);
  --ring:      0 0 0 3px rgba(29, 79, 145, 0.18);

  --nav-h: 64px;
  --container: 1040px;
  --font: "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", "Cascadia Mono", Consolas, Menlo, monospace;
  color-scheme: light;
}

body {
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.55;
  color: var(--text);
  background: var(--bg);
  min-height: 100vh;
  padding-top: var(--nav-h);
  -webkit-font-smoothing: antialiased;
}
body.login { padding-top: 0; }

h1, h2, h3, h4 { color: var(--text); font-weight: 650; line-height: 1.25; letter-spacing: -0.01em; }
h1 { font-size: 1.75rem; }
h2 { font-size: 1.25rem; }
h3 { font-size: 1.05rem; }
p { color: var(--text-muted); }
b, strong { font-weight: 650; }
p a:not(.btn), .field__hint a, .link {
  color: var(--primary); text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px;
}
p a:not(.btn):hover, .link:hover { color: var(--primary-600); }
kbd {
  font-family: var(--mono); font-size: 0.75em; padding: 1px 6px; border-radius: 4px;
  border: 1px solid var(--border-strong); background: var(--surface-2); color: var(--text-muted);
}
::selection { background: var(--primary-tint); color: var(--text); }

.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 20px; }
.stack > * + * { margin-top: 20px; }
.stack-sm > * + * { margin-top: 10px; }
.stack-lg > * + * { margin-top: 32px; }
.muted { color: var(--text-muted); }
.soft { color: var(--text-soft); }
.text-sm { font-size: 0.9rem; }
.text-xs { font-size: 0.8rem; }
.nowrap { white-space: nowrap; }

.section-title {
  display: flex; align-items: center; gap: 10px;
  font-size: 1.05rem; font-weight: 650; color: var(--text); margin-bottom: 12px;
}
.section-title i { color: var(--primary); font-size: 0.95em; }

/* ---------- Barrierefreiheit ---------- */
.mg-skip {
  position: absolute; left: 12px; top: -60px; z-index: 300;
  background: var(--primary); color: #fff; padding: 10px 14px; border-radius: var(--radius-sm);
}
.mg-skip:focus { top: 12px; }
a:focus-visible, button:focus-visible, summary:focus-visible, .btn:focus-visible {
  outline: 2px solid var(--primary); outline-offset: 2px;
}
input:focus, textarea:focus, select:focus { outline: none; }

/* ---------- Ladebalken ---------- */
html.mg-busy body::after {
  content: ""; position: fixed; top: 0; left: 0; right: 0; height: 2px; z-index: 400;
  background: linear-gradient(90deg, transparent, var(--primary), transparent);
  background-size: 200% 100%; animation: mg-bar 1s linear infinite;
}
@keyframes mg-bar { from { background-position: 100% 0; } to { background-position: -100% 0; } }
@keyframes mg-spin { to { transform: rotate(360deg); } }

/* ---------- Navigation ---------- */
.app-nav {
  position: fixed; top: 0; left: 0; right: 0; height: var(--nav-h); z-index: 100;
  background: var(--surface); border-bottom: 1px solid var(--border);
}
.app-nav::before {
  content: ""; position: absolute; top: 0; left: 0; right: 0; height: 3px;
  background: linear-gradient(90deg, var(--brand-blue) 0 33.3%, var(--brand-green) 33.3% 66.6%, var(--brand-red) 66.6% 100%);
}
.app-nav__inner {
  height: 100%; max-width: var(--container); margin: 0 auto; padding: 3px 20px 0;
  display: flex; align-items: center; gap: 12px;
}
.app-nav__brand { display: flex; align-items: center; gap: 12px; margin-right: auto; min-width: 0; }
.app-nav__brand img { width: 34px; height: 34px; }
.brand-text { display: flex; flex-direction: column; line-height: 1.15; min-width: 0; }
.brand-text b { font-size: 1rem; color: var(--text); }
.brand-text small { font-size: 0.78rem; color: var(--text-soft); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.app-nav__links { display: flex; align-items: center; gap: 2px; }
.app-nav__link {
  position: relative; display: inline-flex; align-items: center; gap: 8px;
  height: 40px; padding: 0 12px; border-radius: var(--radius-sm);
  color: var(--text-muted); font-size: 0.92rem; font-weight: 550;
}
.app-nav__link:hover { color: var(--text); background: var(--surface-3); }
.app-nav__link.is-active { color: var(--primary); }
.app-nav__link.is-active::after {
  content: ""; position: absolute; left: 12px; right: 12px; bottom: -11px; height: 2px; background: var(--primary);
}
.app-nav__link .mg-caret { font-size: 0.65rem; opacity: 0.7; }
.app-nav__menu { position: relative; }
.app-nav__dropdown {
  position: absolute; top: calc(100% + 10px); right: 0; z-index: 120; min-width: 260px;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 6px; display: none;
}
.app-nav__menu.open .app-nav__dropdown { display: block; }
.app-nav__dropdown a {
  display: flex; align-items: center; gap: 10px; padding: 9px 12px;
  border-radius: var(--radius-sm); font-size: 0.92rem; color: var(--text);
}
.app-nav__dropdown a i { width: 16px; text-align: center; color: var(--text-soft); }
.app-nav__dropdown a:hover { background: var(--surface-3); }
@media (max-width: 720px) {
  .app-nav__link .label, .brand-text small { display: none; }
  .app-nav__link { padding: 0 10px; }
}
@media (max-width: 420px) { .brand-text { display: none; } }

/* ---------- Seitenkopf ---------- */
.hero {
  position: relative; margin-top: 28px; padding: 26px 30px 24px;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}
.hero__decoration { display: none; }
.hero__content { position: relative; max-width: 760px; }
.hero__eyebrow {
  display: inline-flex; align-items: center; gap: 8px; margin-bottom: 10px;
  font-size: 0.8rem; font-weight: 600; color: var(--primary);
}
.hero__title { font-size: 1.85rem; font-weight: 650; }
.hero__date { margin-top: 6px; font-size: 1.05rem; color: var(--text-muted); }
.hero__date b { color: var(--text); }
.hero__subtitle { margin-top: 8px; color: var(--text-muted); max-width: 70ch; }
.mg-hero-pills { margin-top: 16px; display: flex; flex-wrap: wrap; gap: 8px; }
.hero--compact { padding: 22px 28px 20px; }
@media (max-width: 640px) {
  .hero { padding: 20px 18px; margin-top: 18px; }
  .hero__title { font-size: 1.5rem; }
}

/* ---------- Karten ---------- */
.card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg);
  padding: 22px 24px; box-shadow: var(--shadow-sm);
}
.card__header { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.card__header .section-title { margin-bottom: 0; }
@media (max-width: 600px) { .card { padding: 18px 16px; } }

/* ---------- Kennzahlen ---------- */
.stat-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 14px; }
@media (max-width: 760px) { .stat-grid { grid-template-columns: 1fr 1fr; } .stat--featured { grid-column: 1 / -1; } }
.stat {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg);
  padding: 18px 20px; box-shadow: var(--shadow-sm);
}
.stat--featured { display: flex; align-items: center; gap: 18px; }
.stat__meta { flex: 1; min-width: 0; }
.stat__label { font-size: 0.82rem; font-weight: 600; color: var(--text-soft); }
.stat__value { font-size: 1.9rem; font-weight: 650; color: var(--text); margin-top: 2px; line-height: 1.2; }
.stat__value .unit { font-size: 0.95rem; font-weight: 500; color: var(--text-soft); margin-left: 4px; }
.stat__hint { font-size: 0.85rem; color: var(--text-soft); margin-top: 2px; }
.stat--success .stat__value { color: var(--success); }
.stat--warning .stat__value { color: var(--warning-strong); }
.donut { width: 84px; height: 84px; flex: none; }
.donut__bg { stroke: var(--surface-3); }
.donut__fill { stroke: var(--primary); transition: stroke-dashoffset 0.5s ease; }
.donut__number { fill: var(--text); font-size: 21px; font-weight: 650; font-family: var(--font); }

/* ---------- Badges ---------- */
.pill {
  display: inline-flex; align-items: center; gap: 6px; padding: 2px 10px; border-radius: 999px;
  font-size: 0.78rem; font-weight: 600; line-height: 1.6; white-space: nowrap; border: 1px solid transparent;
}
.pill .dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; flex: none; }
.pill i { font-size: 0.85em; }
.pill--primary { background: var(--primary-tint); color: var(--primary); border-color: var(--primary-line); }
.pill--success { background: var(--success-tint); color: var(--success); border-color: var(--success-line); }
.pill--warning { background: var(--warning-tint); color: var(--warning); border-color: var(--warning-line); }
.pill--danger  { background: var(--danger-tint);  color: var(--danger);  border-color: var(--danger-line); }
.pill--neutral { background: var(--surface-3);    color: var(--text-muted); border-color: var(--border); }
button.pill { cursor: pointer; }
a.pill:hover, button.pill:hover { border-color: var(--border-strong); color: var(--text); }

/* ---------- Schaltflächen ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 9px 16px; border-radius: var(--radius-sm); border: 1px solid transparent;
  font-size: 0.93rem; font-weight: 600; white-space: nowrap; line-height: 1.35;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}
.btn:disabled, .btn.is-disabled { opacity: 0.45; pointer-events: none; }
.btn--primary { background: var(--primary); color: #fff; }
.btn--primary:hover { background: var(--primary-600); }
.btn--success { background: var(--success); color: #fff; }
.btn--success:hover { background: var(--success-600); }
.btn--danger { background: var(--surface); color: var(--danger); border-color: var(--danger-line); }
.btn--danger:hover { background: var(--danger-tint); border-color: var(--danger); }
.btn--danger-solid, .dialog__footer .btn--danger { background: var(--danger); color: #fff; border-color: var(--danger); }
.btn--danger-solid:hover, .dialog__footer .btn--danger:hover { background: var(--danger-600); }
.btn--warning { background: var(--surface); color: var(--warning); border-color: var(--warning-line); }
.btn--warning:hover { background: var(--warning-tint); border-color: var(--warning-strong); }
.btn--ghost { background: var(--surface); color: var(--text); border-color: var(--border-strong); }
.btn--ghost:hover { background: var(--surface-3); }
.btn--sm { padding: 6px 12px; font-size: 0.86rem; }
.btn--lg { padding: 12px 20px; font-size: 1rem; }
.btn--block { width: 100%; }
.btn--icon { width: 40px; height: 40px; padding: 0; }
.btn--sm.btn--icon { width: 34px; height: 34px; }
.btn.is-loading { position: relative; color: transparent !important; }
.btn.is-loading::after {
  content: ""; position: absolute; width: 16px; height: 16px; border-radius: 50%;
  border: 2px solid var(--text-soft); border-right-color: transparent; animation: mg-spin 0.8s linear infinite;
}

/* ---------- Formulare ---------- */
.field { display: block; }
fieldset.field { border: 0; margin-left: 0; margin-right: 0; margin-bottom: 0; padding: 0; min-width: 0; }
fieldset.field > legend { padding: 0; }
.field__label { display: block; font-size: 0.88rem; font-weight: 600; margin-bottom: 6px; color: var(--text); }
.field__hint { display: block; font-size: 0.84rem; color: var(--text-soft); margin-top: 6px; }
.input, .select, .textarea {
  width: 100%; padding: 10px 12px; border-radius: var(--radius-sm);
  background: var(--surface); border: 1px solid var(--border-strong); color: var(--text); font-size: 0.95rem;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.input::placeholder, .textarea::placeholder { color: #9aa3ae; }
.input:focus, .select:focus, .textarea:focus { border-color: var(--primary); box-shadow: var(--ring); }
.input[readonly] { background: var(--surface-2); color: var(--text-muted); }
.textarea { resize: vertical; min-height: 88px; line-height: 1.5; }
.select {
  appearance: none; padding-right: 36px;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'><path fill='%234b5563' d='M2.5 4.5l3.5 3.5 3.5-3.5z'/></svg>");
  background-repeat: no-repeat; background-position: right 12px center; background-size: 12px 12px;
}
.field-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 560px) { .field-grid { grid-template-columns: 1fr; } }
.check {
  display: flex; align-items: flex-start; gap: 10px; cursor: pointer; user-select: none; font-size: 0.93rem;
  padding: 10px 12px; border-radius: var(--radius-sm); border: 1px solid var(--border); background: var(--surface);
}
.check:hover { border-color: var(--border-strong); }
.check input[type="checkbox"], .check input[type="radio"] { width: 17px; height: 17px; margin-top: 2px; accent-color: var(--primary); flex: none; }
.switch { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; user-select: none; font-size: 0.86rem; color: var(--text-muted); }
.switch input { position: absolute; opacity: 0; pointer-events: none; }
.switch__track {
  position: relative; width: 36px; height: 20px; border-radius: 999px; flex: none;
  background: var(--border-strong); transition: background 0.15s;
}
.switch__track::after {
  content: ""; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%;
  background: #fff; box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2); transition: transform 0.15s;
}
.switch input:checked + .switch__track { background: var(--primary); }
.switch input:checked + .switch__track::after { transform: translateX(16px); }
.switch input:focus-visible + .switch__track { box-shadow: var(--ring); }

/* ---------- Hinweise ---------- */
.banner {
  display: flex; gap: 12px; align-items: center; padding: 12px 16px; border-radius: var(--radius);
  font-size: 0.93rem; border: 1px solid; color: var(--text);
}
.banner__icon { font-size: 1.05rem; flex: none; }
.banner--info    { background: var(--primary-tint); border-color: var(--primary-line); }
.banner--info .banner__icon, .banner--info b { color: var(--primary); }
.banner--success { background: var(--success-tint); border-color: var(--success-line); }
.banner--success .banner__icon, .banner--success b { color: var(--success); }
.banner--warning { background: var(--warning-tint); border-color: var(--warning-line); }
.banner--warning .banner__icon, .banner--warning b { color: var(--warning); }
.banner--danger  { background: var(--danger-tint);  border-color: var(--danger-line); }
.banner--danger .banner__icon, .banner--danger b { color: var(--danger); }
.mg-banner__text { flex: 1; min-width: 0; }
.mg-banner__btn { flex: none; }
@media (max-width: 560px) {
  .banner { flex-wrap: wrap; align-items: flex-start; }
  .mg-banner__text { flex: 1 1 calc(100% - 40px); }
  .mg-banner__btn { margin-left: 30px; }
}

/* ---------- Leerer Zustand ---------- */
.empty {
  padding: 40px 20px; text-align: center; color: var(--text-soft);
  border: 1px dashed var(--border-strong); border-radius: var(--radius); background: var(--surface-2);
}
.empty__icon { font-size: 1.6rem; margin-bottom: 8px; color: #9aa3ae; }
.empty__text { color: var(--text-muted); }

/* ---------- Listen (Einladungen) ---------- */
.req-list { display: flex; flex-direction: column; gap: 8px; }
.req-item {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 12px 14px;
  border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface);
}
.req-item__main { flex: 1; min-width: 0; }
.mg-req-intro { margin-bottom: 14px; max-width: 75ch; }
.mg-req-icon { font-size: 1.1rem; flex: none; }
.mg-req-icon.is-ok { color: var(--success); }
.mg-req-icon.is-open { color: var(--warning-strong); }
.mg-req-mail { display: flex; align-items: baseline; gap: 2px; flex-wrap: wrap; }
.mg-req-mail .mg-note-flag { margin-left: 8px; }
.mg-req-status { font-size: 0.84rem; color: var(--text-soft); margin-top: 2px; }
.mg-req-actions { display: flex; gap: 6px; flex: none; }
.mg-empty-small {
  padding: 16px; text-align: center; color: var(--text-soft); font-size: 0.93rem;
  border: 1px dashed var(--border-strong); border-radius: var(--radius); background: var(--surface-2);
}
@media (max-width: 560px) {
  .req-item__main { flex-basis: calc(100% - 36px); }
  .mg-req-actions { width: 100%; justify-content: flex-end; }
}

/* ---------- Tagesübersicht (Mini-Map) ---------- */
.slot-strip-wrap {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg);
  padding: 16px 20px; box-shadow: var(--shadow-sm);
}
.slot-strip-wrap__header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; flex-wrap: wrap; gap: 8px; }
.slot-strip-wrap__title { font-size: 0.9rem; font-weight: 650; color: var(--text); }
.slot-strip-legend { display: flex; gap: 14px; font-size: 0.8rem; color: var(--text-soft); flex-wrap: wrap; }
.slot-strip-legend__item { display: inline-flex; align-items: center; gap: 6px; }
.slot-strip-legend__swatch { width: 12px; height: 12px; border-radius: 3px; border: 1px solid transparent; }
.slot-strip-legend__swatch--available { background: var(--success-tint); border-color: var(--success-line); }
.slot-strip-legend__swatch--matched   { background: var(--primary); }
.slot-strip-legend__swatch--blocked   { background: var(--warning-tint); border-color: var(--warning-strong); }
.slot-strip-legend__swatch--occupied  { background: var(--surface-3); border-color: var(--border-strong); }
.slot-strip { display: grid; grid-template-columns: repeat(auto-fill, minmax(34px, 1fr)); gap: 5px; }
.strip-cell {
  height: 42px; border-radius: 5px; border: 1px solid var(--border); background: var(--surface-2);
  display: flex; flex-direction: column; align-items: center; justify-content: center; line-height: 1.05;
  font-family: var(--mono); color: var(--text-soft); cursor: pointer; transition: transform 0.1s;
}
.strip-cell:hover { transform: translateY(-1px); border-color: var(--border-strong); }
.strip-cell__h { font-size: 10px; font-weight: 700; }
.strip-cell__m { font-size: 9px; opacity: 0.85; }
.strip-cell[data-state="available"] { background: var(--success-tint); border-color: var(--success-line); color: var(--success); }
.strip-cell[data-state="event"], .strip-cell[data-state="matched"] { background: var(--primary); border-color: var(--primary); color: #fff; }
.strip-cell[data-state="blocked"] { background: var(--warning-tint); border-color: var(--warning-strong); color: var(--warning); }
.strip-cell[data-state="occupied"], .strip-cell[data-state="none"] { background: var(--surface-3); color: #9aa3ae; }
.strip-cell.is-now { outline: 2px solid var(--danger); outline-offset: 2px; }

/* ---------- Zeitleiste ---------- */
.timeline { display: flex; flex-direction: column; gap: 8px; }
.slot {
  display: grid; grid-template-columns: 84px minmax(0, 1fr) auto; align-items: center; gap: 16px;
  padding: 14px 18px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  scroll-margin-top: calc(var(--nav-h) + 20px); transition: border-color 0.15s, background 0.3s;
}
.slot__time { font-size: 1.3rem; font-weight: 650; font-variant-numeric: tabular-nums; color: var(--text); }
.slot__body { min-width: 0; }
.slot__meta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 4px; }
.slot__meta .pill { font-size: 0.74rem; padding: 1px 8px; }
.slot__name { font-size: 1rem; font-weight: 600; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.slot__name--muted { color: var(--text-soft); font-weight: 400; }
.slot__detail { font-size: 0.88rem; color: var(--text-muted); margin-top: 2px; }
.slot__detail i { color: var(--text-soft); margin-right: 4px; }
.slot__detail .sep { color: var(--border-strong); margin: 0 8px; }
.slot__actions { display: flex; gap: 8px; flex: none; align-items: center; }
.slot[data-state="event"] { box-shadow: inset 4px 0 0 var(--primary); }
.slot[data-state="blocked"] { background: #fffcf5; box-shadow: inset 4px 0 0 var(--warning-strong); }
.slot.slot--free { padding-top: 9px; padding-bottom: 9px; background: var(--surface-2); }
.slot.slot--free .slot__time { font-size: 1.1rem; color: var(--text-soft); font-weight: 600; }
.slot.slot--free:hover { border-color: var(--border-strong); }
.mg-free-line { margin-bottom: 0; }
.mg-free-line .slot__name--muted { font-size: 0.9rem; }
.slot--new { background: linear-gradient(90deg, var(--success-tint), var(--surface) 40%); }
.slot--now { border-color: var(--danger); }
.slot--now .slot__time::after {
  content: "jetzt"; display: block; margin-top: 2px; font-size: 0.68rem; font-weight: 700;
  letter-spacing: 0.08em; text-transform: uppercase; color: var(--danger);
}
@keyframes slot-flash { 0% { background: #fff1c2; } 100% { background: var(--surface); } }
.slot--flash { animation: slot-flash 1.6s ease-out 1; }
.slot--fresh { animation: slot-flash 2.4s ease-out 1; }
.slot__edit {
  width: 100%; margin-top: 2px; padding: 8px 10px; border-radius: var(--radius-sm);
  background: var(--surface); border: 1px dashed var(--warning-line); font-size: 0.93rem; color: var(--text);
}
.slot__edit:focus { border-style: solid; border-color: var(--warning-strong); box-shadow: 0 0 0 3px rgba(183, 121, 31, 0.15); }
.slot__edit.is-saving { border-style: solid; border-color: var(--primary); }
.slot__edit.is-saved { border-style: solid; border-color: var(--success); }
.slot__pdf-toggle { display: none; }
.slot[data-state="blocked"] .slot__pdf-toggle { display: inline-flex; }
.slot__meta .slot__pdf-toggle { margin-left: 4px; font-size: 0.8rem; gap: 8px; }
.slot__meta .switch__track { width: 30px; height: 17px; }
.slot__meta .switch__track::after { width: 13px; height: 13px; }
.slot__meta .switch input:checked + .switch__track::after { transform: translateX(13px); }
.slot__info {
  grid-column: 1 / -1; display: none; margin-top: 4px; padding: 16px 18px;
  background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius-sm); font-size: 0.93rem;
}
.slot__info.open { display: block; }
.slot__info dl { display: grid; grid-template-columns: max-content 1fr; gap: 6px 18px; }
.slot__info dt { color: var(--text-soft); font-size: 0.86rem; }
.slot__info dd { color: var(--text); min-width: 0; overflow-wrap: anywhere; }
.slot__info dd a { color: var(--primary); text-decoration: underline; text-underline-offset: 3px; }
.slot__info .comment { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--border); color: var(--text-muted); white-space: pre-wrap; }
.mg-class {
  display: inline-block; margin-left: 8px; padding: 0 7px; border-radius: 4px; vertical-align: 1px;
  background: var(--surface-3); color: var(--text-muted); font-size: 0.8rem; font-weight: 600;
}
.mg-note-flag { color: var(--warning-strong); font-size: 0.85rem; }
.mg-divider {
  display: flex; align-items: center; gap: 8px; margin: 12px 0 2px;
  font-size: 0.84rem; font-weight: 650; color: var(--warning);
}
@media (max-width: 600px) {
  .slot { grid-template-columns: 50px minmax(0, 1fr) auto; gap: 10px; padding: 12px; }
  .slot.slot--free { padding-top: 7px; padding-bottom: 7px; }
  .slot__time, .slot.slot--free .slot__time { font-size: 1rem; }
  .slot__actions { flex-direction: column; gap: 6px; }
  .slot__actions .btn--sm { width: 36px; height: 36px; padding: 0; }
  .slot__info { padding: 12px; }
  .slot__info dl { grid-template-columns: 1fr; gap: 2px; }
  .slot__info dd { margin-bottom: 6px; }
  .btn-label { display: none; }
  .mg-free-line .slot__name--muted { display: none; }
}

/* ---------- Werkzeugleiste der Zeitleiste ---------- */
.mg-tl-header { flex-wrap: wrap; }
.mg-toolbar { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.mg-filters { display: inline-flex; padding: 3px; gap: 2px; border-radius: var(--radius); background: var(--surface-3); border: 1px solid var(--border); }
.mg-filters button { padding: 6px 12px; border-radius: var(--radius-sm); font-size: 0.88rem; font-weight: 600; color: var(--text-muted); }
.mg-filters button:hover { color: var(--text); }
.mg-filters button[aria-pressed="true"] { background: var(--surface); color: var(--text); box-shadow: var(--shadow-sm); }
.mg-filters [data-count] { margin-left: 4px; font-size: 0.78rem; color: var(--text-soft); font-variant-numeric: tabular-nums; }
.mg-search { position: relative; display: flex; align-items: center; flex: 1; min-width: 200px; max-width: 320px; }
.mg-search > i { position: absolute; left: 12px; color: var(--text-soft); font-size: 0.85rem; pointer-events: none; }
.mg-search input {
  width: 100%; padding: 8px 40px 8px 34px; border-radius: var(--radius-sm);
  background: var(--surface); border: 1px solid var(--border-strong); font-size: 0.92rem;
}
.mg-search input:focus { border-color: var(--primary); box-shadow: var(--ring); }
.mg-search kbd { position: absolute; right: 10px; pointer-events: none; }
@media (max-width: 640px) {
  .mg-filters { width: 100%; justify-content: space-between; }
  .mg-filters button { padding: 6px 8px; font-size: 0.82rem; }
  .mg-search { max-width: none; }
  .mg-search kbd { display: none; }
}
.mg-menu { position: relative; }
.mg-menu .mg-caret { font-size: 0.65rem; opacity: 0.7; }
.mg-menu__list {
  position: absolute; right: 0; top: calc(100% + 6px); z-index: 60; min-width: 270px; display: none;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); padding: 6px;
}
.mg-menu.open .mg-menu__list { display: block; }
.mg-menu__list button {
  display: flex; width: 100%; align-items: center; gap: 10px; text-align: left;
  padding: 9px 12px; border-radius: var(--radius-sm); color: var(--text); font-size: 0.92rem;
}
.mg-menu__list button i { width: 16px; text-align: center; color: var(--text-soft); }
.mg-menu__list button:hover { background: var(--surface-3); }
.mg-menu__list button.is-danger, .mg-menu__list button.is-danger i { color: var(--danger); }
.mg-menu__list hr { border: 0; border-top: 1px solid var(--border); margin: 6px 4px; }

/* ---------- Live-Anzeige ---------- */
.mg-live {
  background: var(--surface); border: 1px solid var(--primary-line); border-radius: var(--radius-lg);
  box-shadow: inset 4px 0 0 var(--primary), var(--shadow-sm); padding: 16px 20px;
}
.mg-live__head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.mg-live__head .dot { animation: mg-pulse 1.4s ease-in-out infinite; }
@keyframes mg-pulse { 50% { opacity: 0.25; } }
.mg-live__clock { font-variant-numeric: tabular-nums; color: var(--text-muted); font-weight: 600; }
.mg-live__body { display: grid; gap: 8px; }
.mg-live__line {
  display: grid; grid-template-columns: 130px 1fr auto; gap: 14px; align-items: center; width: 100%; text-align: left;
  padding: 10px 14px; border-radius: var(--radius-sm); background: var(--surface-2); border: 1px solid var(--border);
}
button.mg-live__line:hover { border-color: var(--border-strong); }
.mg-live__label { font-size: 0.82rem; font-weight: 700; color: var(--primary); }
.mg-live__text { font-weight: 600; color: var(--text); min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mg-live__meta { color: var(--warning); font-weight: 600; font-size: 0.9rem; white-space: nowrap; font-variant-numeric: tabular-nums; }
@media (max-width: 600px) {
  .mg-live__line { grid-template-columns: 1fr auto; }
  .mg-live__label { grid-column: 1 / -1; }
}

/* ---------- Notizen ---------- */
.mg-note-wrap { display: block; margin-top: 14px; }
.mg-note__label { display: flex; align-items: center; gap: 6px; margin-bottom: 6px; font-size: 0.86rem; font-weight: 650; color: var(--warning); }
.mg-note__status { margin-left: auto; font-weight: 600; color: var(--success); }
.mg-note { min-height: 64px; font-size: 0.92rem; background: #fffdf7; border-color: var(--warning-line); }
.mg-note:focus { border-color: var(--warning-strong); box-shadow: 0 0 0 3px rgba(183, 121, 31, 0.15); }
.req-item .mg-note-wrap { margin-top: 10px; }

/* ---------- Hilfe ---------- */
.mg-help summary { cursor: pointer; list-style: none; display: flex; align-items: center; gap: 10px; font-weight: 650; color: var(--text); }
.mg-help summary::-webkit-details-marker { display: none; }
.mg-help summary > i:first-child { color: var(--primary); }
.mg-help .mg-chev { margin-left: auto; color: var(--text-soft); transition: transform 0.15s; }
.mg-help[open] .mg-chev { transform: rotate(90deg); }
.mg-help__grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 18px; margin-top: 18px; }
.mg-help h3 { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; font-size: 0.97rem; }
.mg-help h3 i { color: var(--primary); }
.mg-help p { font-size: 0.9rem; }
.mg-help__wide { grid-column: 1 / -1; }
.help-video__player, .help-video video { display: block; width: 100%; max-width: 640px; border-radius: var(--radius-sm); background: #000; }
.help-video { margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--border); text-align: left; }
.help-video summary { cursor: pointer; list-style: none; display: flex; align-items: center; gap: 8px; font-size: 0.92rem; font-weight: 600; color: var(--primary); }
.help-video summary::-webkit-details-marker { display: none; }
.help-video video { margin-top: 12px; }

/* ---------- Dialoge ---------- */
dialog.dialog {
  border: none; padding: 0; background: transparent; margin: auto; color: var(--text);
  width: calc(100% - 28px); max-width: 560px;
}
dialog.dialog::backdrop { background: rgba(17, 24, 39, 0.45); }
.dialog__inner {
  display: flex; flex-direction: column; max-height: calc(100vh - 28px); overflow: hidden;
  background: var(--surface); border-radius: var(--radius-lg); box-shadow: var(--shadow-lg);
}
.dialog__header { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 18px 22px; border-bottom: 1px solid var(--border); }
.dialog__title { font-size: 1.1rem; font-weight: 650; }
.dialog__close {
  width: 34px; height: 34px; display: inline-flex; align-items: center; justify-content: center;
  border-radius: var(--radius-sm); color: var(--text-soft); border: 1px solid var(--border);
}
.dialog__close:hover { background: var(--surface-3); color: var(--text); }
.dialog__body { padding: 18px 22px; overflow-y: auto; }
.dialog__body > * + * { margin-top: 14px; }
.dialog__body .banner { font-size: 0.9rem; }
.dialog__footer { display: flex; justify-content: flex-end; gap: 10px; padding: 14px 22px; background: var(--surface-2); border-top: 1px solid var(--border); }
.dialog__footer .btn { min-width: 120px; }
@media (max-width: 480px) {
  .dialog__footer { flex-direction: column-reverse; }
  .dialog__footer .btn { width: 100%; }
}
.dialog__email-suffix {
  display: flex; align-items: stretch; width: 100%; overflow: hidden;
  border: 1px solid var(--border-strong); border-radius: var(--radius-sm); background: var(--surface);
}
.dialog__email-suffix:focus-within { border-color: var(--primary); box-shadow: var(--ring); }
.dialog__email-suffix input { flex: 1; min-width: 0; border: none; background: transparent; padding: 10px 12px; }
.dialog__email-suffix .suffix { padding: 10px 12px; background: var(--surface-2); border-left: 1px solid var(--border); color: var(--text-muted); font-size: 0.9rem; }
.mg-summary {
  display: flex; align-items: center; gap: 16px; padding: 12px 16px;
  border-radius: var(--radius); background: var(--surface-2); border: 1px solid var(--border);
}
.mg-summary__time { font-size: 1.35rem; font-weight: 650; line-height: 1; text-align: center; font-variant-numeric: tabular-nums; }
.mg-summary__time small { display: block; font-size: 0.7rem; color: var(--text-soft); margin-top: 4px; font-weight: 600; }
.mg-summary__title { font-weight: 650; }
.mg-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.mg-chips:empty { display: none; }
.mg-chip {
  display: inline-flex; align-items: center; gap: 4px; padding: 3px 10px; border-radius: 999px;
  font-size: 0.82rem; border: 1px solid var(--border-strong); background: var(--surface); color: var(--text-muted);
}
.mg-chip.is-ok  { color: var(--success); border-color: var(--success-line); background: var(--success-tint); }
.mg-chip.is-bad { color: var(--danger);  border-color: var(--danger-line);  background: var(--danger-tint); }
.mg-chip--btn:hover { color: var(--text); border-color: var(--text-soft); }

/* ---------- Meldungen (Toasts) ---------- */
.mg-toasts {
  position: fixed; left: 50%; bottom: 20px; transform: translateX(-50%); z-index: 500;
  display: flex; flex-direction: column; gap: 8px; width: min(520px, calc(100% - 24px)); pointer-events: none;
}
.mg-toast {
  display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-radius: var(--radius);
  background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow);
  font-size: 0.93rem; color: var(--text); pointer-events: auto;
  opacity: 0; transform: translateY(8px); transition: opacity 0.2s, transform 0.2s;
}
.mg-toast.is-in { opacity: 1; transform: none; }
.mg-toast > i { font-size: 1.05rem; flex: none; }
.mg-toast__text { flex: 1; min-width: 0; }
.mg-toast--success { box-shadow: inset 4px 0 0 var(--success), var(--shadow); }
.mg-toast--success > i { color: var(--success); }
.mg-toast--error { box-shadow: inset 4px 0 0 var(--danger), var(--shadow); }
.mg-toast--error > i { color: var(--danger); }
.mg-toast--warning { box-shadow: inset 4px 0 0 var(--warning-strong), var(--shadow); }
.mg-toast--warning > i { color: var(--warning-strong); }
.mg-toast--info { box-shadow: inset 4px 0 0 var(--primary), var(--shadow); }
.mg-toast--info > i { color: var(--primary); }
.mg-toast__action { flex: none; font-weight: 650; color: var(--primary); padding: 4px 8px; border-radius: var(--radius-sm); }
.mg-toast__action:hover { background: var(--primary-tint); }

/* ---------- Profil-Formulare ---------- */
.mg-form { display: grid; gap: 20px; }
.mg-form .section-title { margin-bottom: -6px; }
.mg-seg { display: inline-flex; flex-wrap: wrap; gap: 6px; }
.mg-seg label {
  position: relative; padding: 8px 16px; border-radius: var(--radius-sm); cursor: pointer;
  background: var(--surface); border: 1px solid var(--border-strong); color: var(--text-muted); font-weight: 600; font-size: 0.93rem;
}
.mg-seg input { position: absolute; opacity: 0; pointer-events: none; }
.mg-seg label.is-checked { background: var(--primary-tint); border-color: var(--primary); color: var(--primary); }
.mg-seg label:focus-within { box-shadow: var(--ring); }
.mg-types { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 10px; }
.mg-type {
  position: relative; display: flex; align-items: center; gap: 12px; padding: 14px; cursor: pointer;
  border-radius: var(--radius); background: var(--surface); border: 1px solid var(--border-strong);
  transition: border-color 0.15s, background 0.15s;
}
.mg-type input { position: absolute; opacity: 0; pointer-events: none; }
.mg-type__icon { width: 38px; height: 38px; border-radius: 8px; display: grid; place-items: center; flex: none; background: var(--surface-3); color: var(--text-soft); }
.mg-type__text b { display: block; color: var(--text); }
.mg-type__text small { color: var(--text-soft); }
.mg-type__check { margin-left: auto; color: var(--border-strong); font-size: 1.15rem; }
.mg-type.is-checked { border-color: var(--primary); background: var(--primary-tint); }
.mg-type.is-checked .mg-type__icon { background: var(--surface); color: var(--primary); }
.mg-type.is-checked .mg-type__check { color: var(--primary); }
.mg-type:focus-within { box-shadow: var(--ring); }
.mg-type.is-disabled { opacity: 0.5; cursor: not-allowed; }
.mg-field-status { display: block; margin-top: 6px; font-size: 0.86rem; min-height: 1.2em; }
.mg-field-status.is-ok { color: var(--success); }
.mg-field-status.is-bad { color: var(--danger); }
.mg-paraphe { text-transform: uppercase; letter-spacing: 0.1em; font-weight: 650; }
.mg-form__footer { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; padding-top: 18px; border-top: 1px solid var(--border); }
.mg-kv { display: grid; grid-template-columns: max-content 1fr; gap: 8px 18px; font-size: 0.93rem; }
.mg-kv dt { color: var(--text-soft); }
.mg-kv dd { color: var(--text); overflow-wrap: anywhere; }
.mg-kv-note { margin-top: 14px; }

/* ---------- Anmeldung ---------- */
.login-wrap { min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 32px 16px; }
.login-card {
  position: relative; width: 100%; max-width: 460px; padding: 36px 34px 30px; overflow: hidden;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: var(--shadow);
}
.login-card::before {
  content: ""; position: absolute; top: 0; left: 0; right: 0; height: 4px;
  background: linear-gradient(90deg, var(--brand-blue) 0 33.3%, var(--brand-green) 33.3% 66.6%, var(--brand-red) 66.6% 100%);
}
.login-card__logo { width: 64px; height: 64px; margin-bottom: 18px; }
.login-card__school { font-size: 0.9rem; color: var(--text-soft); }
.login-card__title { font-size: 1.6rem; margin-top: 2px; }
.login-card__date { margin-top: 4px; color: var(--text-muted); }
.login-card__date b { color: var(--text); }
.login-card .btn--lg { margin-top: 24px; }
.login-card .banner { margin-top: 18px; text-align: left; }
.login-help { margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--border); display: grid; gap: 12px; }
.login-help__item { display: flex; gap: 12px; align-items: flex-start; font-size: 0.9rem; color: var(--text-muted); }
.login-help__item i { color: var(--primary); margin-top: 4px; width: 16px; text-align: center; flex: none; }
.login-help__item b { color: var(--text); display: block; }
@media (max-width: 480px) { .login-card { padding: 30px 20px 24px; } }

/* ---------- Elternbereich ---------- */
.bk-steps { counter-reset: step; }
.bk-step__title { display: flex; align-items: center; gap: 10px; font-size: 1rem; font-weight: 650; margin-bottom: 10px; }
.bk-step__num {
  width: 26px; height: 26px; border-radius: 50%; display: inline-grid; place-items: center; flex: none;
  background: var(--primary); color: #fff; font-size: 0.85rem; font-weight: 700;
}
.bk-step + .bk-step { margin-top: 22px; padding-top: 20px; border-top: 1px solid var(--border); }
.bk-teacher {
  display: grid; grid-template-columns: auto 1fr; gap: 4px 16px; margin-top: 12px; padding: 12px 14px;
  border-radius: var(--radius); background: var(--surface-2); border: 1px solid var(--border); font-size: 0.92rem;
}
.bk-teacher dt { color: var(--text-soft); }
.bk-teacher dd { color: var(--text); }
.bk-legend { display: flex; flex-wrap: wrap; gap: 14px; font-size: 0.82rem; color: var(--text-soft); margin-bottom: 10px; }
.bk-legend span { display: inline-flex; align-items: center; gap: 6px; }
.bk-legend i.sw { width: 12px; height: 12px; border-radius: 3px; border: 1px solid var(--border-strong); display: inline-block; }
.bk-legend i.sw--free { background: var(--surface); border-color: var(--primary-line); }
.bk-legend i.sw--mine { background: var(--success); border-color: var(--success); }
.bk-legend i.sw--clash { background: var(--warning-tint); border-color: var(--warning-strong); }
.bk-legend i.sw--taken { background: var(--surface-3); }
.slotgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 8px; }
@media (max-width: 560px) { .slotgrid { grid-template-columns: repeat(auto-fill, minmax(68px, 1fr)); gap: 6px; } }
.slotbtn {
  display: flex; flex-direction: column; align-items: center; gap: 1px; width: 100%; padding: 9px 4px; border-radius: var(--radius-sm);
  background: var(--surface); border: 1px solid var(--primary-line); color: var(--primary);
  transition: background 0.12s, border-color 0.12s;
}
.slotbtn b { font-size: 1.02rem; font-variant-numeric: tabular-nums; }
.slotbtn small { font-size: 0.74rem; color: var(--text-soft); }
.slotbtn:hover:not(:disabled) { background: var(--primary-tint); border-color: var(--primary); }
.slotbtn[data-state="taken"] { background: var(--surface-3); border-color: var(--border); color: #9aa3ae; }
.slotbtn[data-state="taken"] small { color: #9aa3ae; }
.slotbtn[data-state="mine"] { background: var(--success); border-color: var(--success); color: #fff; }
.slotbtn[data-state="mine"] small { color: rgba(255, 255, 255, 0.9); }
.slotbtn[data-state="clash"] { background: var(--warning-tint); border-color: var(--warning-strong); color: var(--warning); }
.slotbtn[data-state="clash"] small { color: var(--warning); }
.bk-appts { display: flex; flex-direction: column; gap: 8px; }
.bk-appt {
  display: grid; grid-template-columns: 76px minmax(0, 1fr) auto; gap: 14px; align-items: center;
  padding: 12px 16px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface);
  box-shadow: inset 4px 0 0 var(--success);
}
.bk-appt.is-cancelled { box-shadow: inset 4px 0 0 var(--danger); background: #fffafa; }
.bk-appt__time { font-size: 1.25rem; font-weight: 650; font-variant-numeric: tabular-nums; }
.bk-appt__time small { display: block; font-size: 0.72rem; color: var(--text-soft); font-weight: 600; }
.bk-appt__who { font-weight: 650; color: var(--text); }
.bk-appt__where { font-size: 0.9rem; color: var(--text-muted); margin-top: 2px; }
.bk-appt__where i { color: var(--text-soft); width: 16px; }
.bk-appt__child { font-size: 0.84rem; color: var(--text-soft); margin-top: 2px; }
.bk-appt__actions { display: flex; gap: 8px; }
.bk-appt.is-next { border-color: var(--success-line); }
@media (max-width: 560px) {
  .bk-appt { grid-template-columns: 58px minmax(0, 1fr); }
  .bk-appt__actions { grid-column: 1 / -1; justify-content: flex-end; }
}
.bk-prep {
  display: flex; gap: 14px; align-items: center; padding: 14px 16px; border-radius: var(--radius);
  background: var(--surface-2); border: 1px solid var(--border);
}
.bk-prep > i { font-size: 1.6rem; color: var(--brand-red); flex: none; }
.bk-prep__text { flex: 1; min-width: 0; font-size: 0.93rem; color: var(--text-muted); }
.bk-prep__text b { color: var(--text); display: block; }
@media (max-width: 560px) {
  .bk-prep { flex-wrap: wrap; align-items: flex-start; }
  .bk-prep__text { flex: 1 1 calc(100% - 50px); }
  .bk-prep .btn { margin-left: 40px; }
}
.bk-types { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 8px; }
.bk-types .mg-type { padding: 10px 12px; gap: 10px; }
@media (max-width: 560px) { .bk-types { grid-template-columns: 1fr; } }

/* ---------- Fußzeile ---------- */
.app-footer { text-align: center; padding: 36px 16px 40px; font-size: 0.85rem; color: var(--text-soft); }
.app-footer a { color: var(--text-muted); text-decoration: underline; text-underline-offset: 3px; }

/* ---------- Bewegung reduzieren ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}

/* ---------- Druck ---------- */
@media print {
  body { padding-top: 0; background: #fff; }
  .app-nav, .mg-toasts, .app-footer, .slot__actions, .mg-toolbar, .mg-menu, dialog { display: none !important; }
  .card, .hero, .slot { box-shadow: none; }
}

/* ---------- Anmeldung: Ausrichtung ---------- */
.login-card { text-align: center; }
.login-card__logo { margin: 0 auto 16px; }
.login-help, .login-card .banner { text-align: left; }
.login-card__switch { margin-top: 12px; }

/* ---------- Freie Slots: "Blockieren" zurückhaltend, beim Überfahren deutlich ---------- */
.slot--free .btn--warning { color: var(--text-muted); border-color: var(--border-strong); background: var(--surface); }
.slot--free:hover .btn--warning, .slot--free .btn--warning:focus-visible {
  color: var(--warning); border-color: var(--warning-line); background: var(--warning-tint);
}
@media (hover: none) { .slot--free .btn--warning { color: var(--warning); border-color: var(--warning-line); } }

/* ---------- Hilfsklassen ---------- */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

/* ---------- Anwesenheit (Profil der Lehrkraft) ---------- */
.mg-presence { font-size: 0.97rem; font-weight: 600; color: var(--text); }

/* ---------- Verwaltung ---------- */
.adm-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
@media (max-width: 760px) { .adm-stats { grid-template-columns: 1fr 1fr; } }
.adm-dates { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
@media (max-width: 960px) { .adm-dates { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .adm-dates { grid-template-columns: 1fr; } }
.adm-timeline:empty { display: none; }
.adm-tl { list-style: none; margin: 0; padding: 12px 14px; display: grid; gap: 8px;
  background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius); font-size: 0.92rem; }
.adm-tl__row { display: grid; grid-template-columns: 14px 150px minmax(0, 1fr); gap: 10px; align-items: baseline; color: var(--text-muted); }
.adm-tl__dot { width: 10px; height: 10px; border-radius: 50%; background: var(--border-strong); align-self: center; }
.adm-tl__row--closed .adm-tl__dot { background: var(--warning-strong); }
.adm-tl__row--open .adm-tl__dot { background: var(--success); }
.adm-tl__row--ended .adm-tl__dot { background: var(--text-soft); }
.adm-tl__row--day .adm-tl__dot { background: var(--primary); }
.adm-tl__when { font-weight: 650; color: var(--text); font-variant-numeric: tabular-nums; }
.adm-tl__row.is-now .adm-tl__what { color: var(--text); }
.adm-tl__row--day .adm-tl__what { font-weight: 650; color: var(--primary); }
@media (max-width: 560px) { .adm-tl__row { grid-template-columns: 14px minmax(0, 1fr); } .adm-tl__what { grid-column: 2; } }
.adm-grid-inputs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; max-width: 640px; }
@media (max-width: 560px) { .adm-grid-inputs { grid-template-columns: 1fr 1fr; } }
.adm-slots { display: flex; flex-wrap: wrap; gap: 6px; }
.adm-slots:empty { display: none; }
.adm-slot { padding: 3px 8px; border-radius: 6px; font-size: 0.82rem; font-variant-numeric: tabular-nums;
  background: var(--surface-2); border: 1px solid var(--border); color: var(--text-muted); }
button.adm-slot { font: inherit; font-size: 0.82rem; cursor: pointer; color: var(--text); background: var(--surface);
  border-color: var(--border-strong); transition: background 0.12s, border-color 0.12s; }
button.adm-slot:hover { border-color: var(--primary); }
button.adm-slot:focus-visible { box-shadow: var(--ring); outline: none; }
button.adm-slot.is-off { background: var(--surface-2); color: var(--text-soft); border-style: dashed; text-decoration: line-through; }
button.adm-slot.is-used { box-shadow: inset 0 -2px 0 var(--primary); }
.adm-intro { margin-bottom: 14px; max-width: 90ch; }
.adm-table-wrap { position: relative; overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius); }
.adm-table { width: 100%; border-collapse: collapse; font-size: 0.92rem; }
.adm-table th { text-align: left; font-size: 0.8rem; font-weight: 650; color: var(--text-soft); background: var(--surface-2);
  padding: 9px 12px; border-bottom: 1px solid var(--border); white-space: nowrap; }
.adm-table td { padding: 10px 12px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.adm-table tbody tr:last-child td { border-bottom: 0; }
.adm-table .num { text-align: right; font-variant-numeric: tabular-nums; }
.adm-table tr.is-absent td { background: #fffafa; }
.adm-table tr.is-absent .adm-name { color: var(--text-muted); }
.adm-name { font-weight: 650; color: var(--text); }
.adm-mail { font-size: 0.8rem; color: var(--text-soft); overflow-wrap: anywhere; }
.adm-types { white-space: nowrap; color: var(--text-muted); }
.adm-types > span + span { margin-left: 8px; }
.adm-row-actions { text-align: right; white-space: nowrap; }
.adm-empty { text-align: center; color: var(--text-soft); padding: 22px 12px !important; }
.adm-danger { box-shadow: inset 4px 0 0 var(--danger), var(--shadow-sm); }
.adm-clear-list { margin: 12px 0 14px; padding-left: 20px; font-size: 0.92rem; color: var(--text); }
.adm-switch-line { margin-bottom: 14px; }
.adm-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.adm-meta-mobile { display: none; }
@media (max-width: 640px) {
  .adm-table th:nth-child(n+2):nth-child(-n+5), .adm-table td:nth-child(n+2):nth-child(-n+5) { display: none; }
  .adm-table th, .adm-table td { padding: 9px 10px; }
  .adm-meta-mobile { display: block; margin-top: 3px; font-size: 0.82rem; color: var(--text-muted); }
}

/* ---------- Namenssuche im Einladungsdialog ---------- */
.mg-people__box { position: relative; display: flex; align-items: center; }
.mg-people__box > i { position: absolute; left: 12px; color: var(--text-soft); font-size: 0.85rem; pointer-events: none; }
.mg-people__box .input { padding-left: 34px; }
.mg-people__list { list-style: none; margin: 6px 0 0; padding: 4px; max-height: 260px; overflow-y: auto;
  border: 1px solid var(--border-strong); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow-sm); }
.mg-people__item { display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: 10px; align-items: center;
  padding: 8px 10px; border-radius: var(--radius-sm); cursor: pointer; }
.mg-people__item .pill { grid-row: 1 / span 2; grid-column: 2; }
.mg-people__item:hover, .mg-people__item.is-active { background: var(--primary-tint); }
.mg-people__name { font-weight: 650; color: var(--text); }
.mg-people__meta { grid-column: 1; font-size: 0.82rem; color: var(--text-soft); overflow-wrap: anywhere; }
.adm-head-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.adm-row-actions .btn + .btn { margin-left: 6px; }
.adm-checks { display: flex; flex-wrap: wrap; gap: 8px; }
.adm-subtitle { font-size: 0.95rem; font-weight: 650; color: var(--text); margin: 4px 0 -6px; }
.adm-admins { list-style: none; margin: 0 0 14px; padding: 0; display: grid; gap: 8px; }
.adm-admin { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 10px 12px;
  border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
.adm-admin > i { color: var(--primary); }
.adm-admin__mail { font-weight: 600; color: var(--text); overflow-wrap: anywhere; }
.adm-admin .btn { margin-left: auto; }
.adm-admin-add { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; }
.adm-admin-add .field { flex: 1 1 260px; max-width: 420px; }

/* ---------- Ersteinrichtung ---------- */
.login-card.setup-card { max-width: 720px; }
.setup-form { display: grid; gap: 14px; margin-top: 18px; text-align: left; }
.setup-form .section-title { margin: 10px 0 -2px; }
.setup-form .btn--lg { margin-top: 10px; }
.setup-text { margin: 16px 0; text-align: left; font-size: 0.93rem; color: var(--text-muted); }
.setup-text code, .setup-form code { overflow-wrap: anywhere; }

/* ---------- Verwaltung: E-Mail-Versand ---------- */
#adm-mail .banner { align-items: flex-start; }
#adm-mail .banner__icon { margin-top: 2px; }
.adm-ways { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
@media (max-width: 560px) { .adm-ways { grid-template-columns: 1fr; } }
.adm-way__hint { display: block; margin-top: 2px; font-size: 0.84rem; color: var(--text-soft); }
.adm-help { border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 10px 12px; background: var(--surface-2); font-size: 0.9rem; }
.adm-help summary { cursor: pointer; font-weight: 600; color: var(--text); }
.adm-help summary i { color: var(--primary); margin-right: 4px; }
.adm-help ol { margin: 10px 0 2px; padding-left: 22px; list-style: decimal; display: grid; gap: 6px; color: var(--text-muted); }
.adm-help li { display: list-item; padding-left: 2px; }
.adm-mail-result { overflow-wrap: anywhere; }
