/* Gemeinsames Design für Anruf-Simulator und Verwaltung.
   Nur Systemschriften, keine externen Quellen. Hell/dunkel über prefers-color-scheme,
   manuell über <html data-theme="light|dark">. */

:root {
  --bg: #faf7f3;
  --flaeche: #ffffff;
  --flaeche-2: #f4eee8;
  --flaeche-3: #ece4dc;
  --text: #2c2521;
  --leise: #7b6e64;
  --linie: #e8dfd6;
  --linie-stark: #d9cdc1;
  --akzent: #a85d47;
  --akzent-hover: #94503c;
  --akzent-text: #ffffff;
  --akzent-zart: #f6e7e0;
  --gut: #4f7f62;
  --gut-zart: #e5efe8;
  --warn: #a8752a;
  --warn-zart: #f7ecd9;
  --rot: #b2453a;
  --rot-zart: #f8e3e0;
  --geschlossen: #f1ebe5;
  --auf-farbe: #ffffff; /* Text auf Grün/Rot */
  --schatten: 0 1px 2px rgba(60, 40, 30, .05), 0 4px 16px rgba(60, 40, 30, .06);
  --schatten-gross: 0 12px 40px rgba(40, 25, 15, .18);
  /* Leistungsfarben: Hintergrund / Kante */
  --f0-bg: #e4efe7; --f0: #4f8a64;
  --f1-bg: #f7e4e4; --f1: #b35a63;
  --f2-bg: #ece6f5; --f2: #7a63a8;
  --f3-bg: #f6ecd8; --f3: #a87a2a;
  --f4-bg: #e0eef1; --f4: #3f8796;
  --f5-bg: #f5e3d8; --f5: #b06540;
  /* Farben der Mitarbeiterinnen: Hintergrund / Kante */
  --m0-bg: #f6e7e0; --m0: #a85d47; --m1-bg: #e4efe7; --m1: #4f8a64; --m2-bg: #ece6f5; --m2: #7a63a8; --m3-bg: #f6ecd8; --m3: #a87a2a;
  --m4-bg: #e0eef1; --m4: #3f8796; --m5-bg: #f7e4e9; --m5: #b04f72; --m6-bg: #e3e8f4; --m6: #4c66a8; --m7-bg: #ebeedc; --m7: #6d7a2e;
  --radius: 14px;
  --radius-klein: 9px;
  --schrift: "Segoe UI Variable Text", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  --schrift-titel: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  color-scheme: light;
  font-family: var(--schrift);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #171412; --flaeche: #211d1a; --flaeche-2: #2a2522; --flaeche-3: #342e2a; --text: #efe7df; --leise: #a99c91;
    --linie: #383130; --linie-stark: #4a413c; --akzent: #df9078; --akzent-hover: #e9a28c; --akzent-text: #2a1610; --akzent-zart: #3b2822;
    --gut: #8cc29f; --gut-zart: #22322a; --warn: #e0b46a; --warn-zart: #3a2f1d; --rot: #ec8a7f; --rot-zart: #3d2321; --geschlossen: #131110; --auf-farbe: #1a120e;
    --schatten: 0 1px 2px rgba(0, 0, 0, .3), 0 4px 16px rgba(0, 0, 0, .25); --schatten-gross: 0 12px 40px rgba(0, 0, 0, .5);
    --f0-bg: #22342a; --f0: #84c39c; --f1-bg: #3a2427; --f1: #e597a0; --f2-bg: #2d2740; --f2: #b9a4e6;
    --f3-bg: #3a2f1c; --f3: #e2b66a; --f4-bg: #1f3237; --f4: #7cc6d4; --f5-bg: #3a2a20; --f5: #e4a07c;
    --m0-bg: #3b2822; --m0: #df9078; --m1-bg: #22342a; --m1: #84c39c; --m2-bg: #2d2740; --m2: #b9a4e6; --m3-bg: #3a2f1c; --m3: #e2b66a;
    --m4-bg: #1f3237; --m4: #7cc6d4; --m5-bg: #3c2330; --m5: #e893b4; --m6-bg: #232b40; --m6: #9fb3ea; --m7-bg: #2e3320; --m7: #bccb72;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #171412; --flaeche: #211d1a; --flaeche-2: #2a2522; --flaeche-3: #342e2a; --text: #efe7df; --leise: #a99c91;
  --linie: #383130; --linie-stark: #4a413c; --akzent: #df9078; --akzent-hover: #e9a28c; --akzent-text: #2a1610; --akzent-zart: #3b2822;
  --gut: #8cc29f; --gut-zart: #22322a; --warn: #e0b46a; --warn-zart: #3a2f1d; --rot: #ec8a7f; --rot-zart: #3d2321; --geschlossen: #131110; --auf-farbe: #1a120e;
  --schatten: 0 1px 2px rgba(0, 0, 0, .3), 0 4px 16px rgba(0, 0, 0, .25); --schatten-gross: 0 12px 40px rgba(0, 0, 0, .5);
  --f0-bg: #22342a; --f0: #84c39c; --f1-bg: #3a2427; --f1: #e597a0; --f2-bg: #2d2740; --f2: #b9a4e6;
  --f3-bg: #3a2f1c; --f3: #e2b66a; --f4-bg: #1f3237; --f4: #7cc6d4; --f5-bg: #3a2a20; --f5: #e4a07c;
  --m0-bg: #3b2822; --m0: #df9078; --m1-bg: #22342a; --m1: #84c39c; --m2-bg: #2d2740; --m2: #b9a4e6; --m3-bg: #3a2f1c; --m3: #e2b66a;
  --m4-bg: #1f3237; --m4: #7cc6d4; --m5-bg: #3c2330; --m5: #e893b4; --m6-bg: #232b40; --m6: #9fb3ea; --m7-bg: #2e3320; --m7: #bccb72;
  color-scheme: dark;
}

/* ---------- Grundlagen ---------- */
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); line-height: 1.5; font-size: 15px; }
h1, h2, h3 { line-height: 1.25; font-weight: 600; }
h1 { font-family: var(--schrift-titel); font-size: 1.75rem; font-weight: 500; letter-spacing: -.01em; margin: 0 0 4px; }
h2 { font-size: 1.05rem; margin: 0 0 12px; }
h3 { font-size: .95rem; margin: 22px 0 8px; }
p { margin: 0 0 10px; }
a { color: var(--akzent); text-underline-offset: 2px; }
a:hover { color: var(--akzent-hover); }
.leise { color: var(--leise); font-size: .88rem; }
.klein { font-size: .82rem; }
.versteckt { display: none !important; }
:focus-visible { outline: 2px solid var(--akzent); outline-offset: 2px; }

/* ---------- Bedienelemente ---------- */
button, .knopf {
  font: inherit; font-size: .92rem; font-weight: 500; display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-height: 38px; padding: 7px 14px; border-radius: var(--radius-klein); cursor: pointer; text-decoration: none;
  border: 1px solid var(--linie-stark); background: var(--flaeche); color: var(--text); transition: background .15s, border-color .15s;
}
button:hover, .knopf:hover { background: var(--flaeche-2); color: var(--text); }
button.haupt { background: var(--akzent); color: var(--akzent-text); border-color: var(--akzent); }
button.haupt:hover { background: var(--akzent-hover); border-color: var(--akzent-hover); }
button.rot { background: var(--rot); color: var(--auf-farbe); border-color: var(--rot); }
button.rot-umriss { color: var(--rot); border-color: color-mix(in srgb, var(--rot) 45%, var(--linie)); }
button.rot-umriss:hover { background: var(--rot-zart); }
button.still { border-color: transparent; background: transparent; }
button.still:hover { background: var(--flaeche-2); }
button.klein { min-height: 30px; padding: 4px 10px; font-size: .84rem; }
button.rund { width: 38px; padding: 0; }
button:disabled { opacity: .45; cursor: default; }
button svg, .knopf svg { width: 18px; height: 18px; flex: none; }

input, textarea, select {
  font: inherit; font-size: .95rem; color: var(--text); background: var(--flaeche); width: 100%;
  border: 1px solid var(--linie-stark); border-radius: var(--radius-klein); padding: 8px 10px; min-height: 40px;
}
input:focus, textarea:focus, select:focus { outline: none; border-color: var(--akzent); box-shadow: 0 0 0 3px var(--akzent-zart); }
input[type="checkbox"] { width: 18px; height: 18px; min-height: 0; accent-color: var(--akzent); margin: 0; flex: none; }
textarea { min-height: 110px; resize: vertical; }
label { display: block; font-size: .82rem; font-weight: 500; color: var(--leise); margin: 12px 0 5px; }
label.haken { display: flex; align-items: center; gap: 10px; color: var(--text); font-size: .92rem; font-weight: 400; cursor: pointer; }

.zeile { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.zeile > * { flex: 1 1 auto; }
.zeile > button, .zeile > .knopf { flex: 0 0 auto; }
.raster { display: grid; gap: 0 14px; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }

.karte { background: var(--flaeche); border: 1px solid var(--linie); border-radius: var(--radius); padding: 18px; box-shadow: var(--schatten); }
.karte + .karte, .karte + h2, .abschnitt-kopf + .karte { margin-top: 16px; }
.karte > h2:first-child { margin-top: 0; }

.pille { display: inline-flex; align-items: center; gap: 5px; font-size: .76rem; font-weight: 600; padding: 2px 9px; border-radius: 99px;
  background: var(--flaeche-2); color: var(--leise); white-space: nowrap; }
.pille.akzent { background: var(--akzent-zart); color: var(--akzent); }
.pille.gut { background: var(--gut-zart); color: var(--gut); }
.pille.warn { background: var(--warn-zart); color: var(--warn); }
.pille.rot { background: var(--rot-zart); color: var(--rot); }

.meldung { font-size: .88rem; }
.meldung.ok, .ok { color: var(--gut); }
.meldung.fehler, .fehler { color: var(--rot); white-space: pre-line; }
.hinweis { background: var(--warn-zart); color: var(--text); border-radius: var(--radius-klein); padding: 10px 12px; font-size: .9rem; }
.leer { color: var(--leise); text-align: center; padding: 28px 12px; font-size: .92rem; }

/* ---------- Tabellen und Listen ---------- */
.tabelle { overflow-x: auto; margin: 0 -4px; }
table { width: 100%; border-collapse: collapse; font-size: .9rem; }
th, td { text-align: left; padding: 10px 8px; border-bottom: 1px solid var(--linie); vertical-align: top; }
th { color: var(--leise); font-weight: 500; font-size: .78rem; text-transform: uppercase; letter-spacing: .04em; }
tbody tr:last-child td { border-bottom: none; }
tr.klickbar { cursor: pointer; }
tr.klickbar:hover td { background: var(--flaeche-2); }
td input, td select { min-width: 70px; min-height: 34px; padding: 5px 8px; }

.liste { list-style: none; margin: 0; padding: 0; }
.liste > li { display: flex; gap: 12px; align-items: flex-start; padding: 12px 0; border-bottom: 1px solid var(--linie); }
.liste > li:last-child { border-bottom: none; }
.liste .haupt-text { flex: 1 1 auto; min-width: 0; }
.liste .titel { font-weight: 600; }

/* ---------- Dialoge ---------- */
dialog { width: min(720px, calc(100vw - 24px)); max-height: calc(100dvh - 24px); border: 1px solid var(--linie); border-radius: 18px;
  background: var(--flaeche); color: var(--text); padding: 0; box-shadow: var(--schatten-gross); }
dialog.schmal { width: min(480px, calc(100vw - 24px)); }
dialog::backdrop { background: rgba(30, 20, 15, .45); backdrop-filter: blur(2px); }
.dialog-kopf { position: sticky; top: 0; z-index: 2; display: flex; align-items: center; gap: 10px; padding: 16px 20px; background: var(--flaeche);
  border-bottom: 1px solid var(--linie); }
.dialog-kopf h2 { margin: 0; flex: 1; font-family: var(--schrift-titel); font-weight: 500; font-size: 1.3rem; }
.dialog-inhalt { padding: 4px 20px 20px; }
.dialog-fuss { display: flex; gap: 10px; justify-content: flex-end; flex-wrap: wrap; padding: 14px 20px; border-top: 1px solid var(--linie); background: var(--flaeche-2);
  position: sticky; bottom: 0; }
@media (max-width: 600px) {
  dialog, dialog.schmal { width: 100vw; max-width: 100vw; height: 100dvh; max-height: 100dvh; margin: 0; border-radius: 0; border: none; }
  dialog[open] { display: flex; flex-direction: column; }
  .dialog-inhalt { flex: 1; overflow-y: auto; }
}

/* ---------- Seitenrahmen der Verwaltung ---------- */
.rahmen { display: grid; grid-template-columns: 248px 1fr; min-height: 100dvh; }
.seitenleiste { position: sticky; top: 0; height: 100dvh; display: flex; flex-direction: column; gap: 4px; padding: 22px 14px;
  background: var(--flaeche); border-right: 1px solid var(--linie); }
.marke { display: flex; align-items: center; gap: 11px; padding: 0 8px 20px; }
.marke-zeichen { width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; flex: none;
  background: linear-gradient(140deg, var(--akzent), color-mix(in srgb, var(--akzent) 55%, #e8b9a0)); color: var(--akzent-text); }
.marke-zeichen svg { width: 20px; height: 20px; }
.marke-name { font-family: var(--schrift-titel); font-size: 1.08rem; line-height: 1.2; }
.marke-unter { font-size: .76rem; color: var(--leise); }
.nav-punkt { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 10px; color: var(--text); text-decoration: none;
  font-weight: 500; font-size: .94rem; }
.nav-punkt:hover { background: var(--flaeche-2); color: var(--text); }
.nav-punkt[aria-current="page"] { background: var(--akzent-zart); color: var(--akzent); }
.nav-punkt svg { width: 20px; height: 20px; flex: none; }
.nav-punkt .zahl { margin-left: auto; min-width: 22px; text-align: center; font-size: .74rem; font-weight: 700; padding: 1px 7px; border-radius: 99px;
  background: var(--akzent); color: var(--akzent-text); }
.seitenleiste .unten { margin-top: auto; display: flex; flex-direction: column; gap: 4px; padding-top: 14px; border-top: 1px solid var(--linie); }

.inhalt { min-width: 0; padding: 28px 32px 64px; max-width: 1280px; width: 100%; }
.seite-kopf { display: flex; align-items: flex-end; gap: 12px; flex-wrap: wrap; margin-bottom: 20px; }
.seite-kopf > div:first-child { flex: 1 1 260px; }
.seite-kopf p { margin: 0; }

.kopfleiste, .unterleiste { display: none; }

@media (max-width: 900px) {
  .rahmen { grid-template-columns: minmax(0, 1fr); }
  .seitenleiste { display: none; }
  .kopfleiste { display: flex; align-items: center; gap: 10px; position: sticky; top: 0; z-index: 20; padding: 10px 16px;
    background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid var(--linie); }
  .kopfleiste .marke { padding: 0; flex: 1; min-width: 0; }
  .kopfleiste .marke > div:last-child { min-width: 0; }
  .kopfleiste .marke-name { font-size: 1rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .kopfleiste .marke-zeichen { width: 34px; height: 34px; }
  .kal-leiste .titel { order: 5; flex-basis: 100%; margin: 4px 2px 0; }
  .kal-leiste .rechts { margin-left: 0; flex: 1; justify-content: flex-end; }
  .inhalt { padding: 18px 16px 96px; }
  .unterleiste { display: flex; position: fixed; inset: auto 0 0 0; z-index: 20; background: var(--flaeche); border-top: 1px solid var(--linie);
    padding: 6px 4px calc(6px + env(safe-area-inset-bottom)); }
  .unterleiste a { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 6px 1px; font-size: .64rem; font-weight: 500;
    color: var(--leise); text-decoration: none; border-radius: 10px; position: relative; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .unterleiste a svg { width: 22px; height: 22px; }
  .unterleiste a[aria-current="page"] { color: var(--akzent); }
  .unterleiste .zahl { position: absolute; top: 2px; left: calc(50% + 6px); font-size: .62rem; font-weight: 700; padding: 0 5px; border-radius: 99px;
    background: var(--akzent); color: var(--akzent-text); }
  h1 { font-size: 1.45rem; }
}

/* ---------- Kalender ---------- */
.kal-leiste { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 14px; }
.kal-leiste .titel { font-weight: 600; font-size: 1.02rem; margin: 0 6px; min-width: 150px; }
.segmente { display: inline-flex; padding: 3px; background: var(--flaeche-2); border-radius: 11px; gap: 2px; }
.segmente button { min-height: 32px; border: none; background: transparent; padding: 4px 12px; border-radius: 8px; color: var(--leise); }
.segmente button[aria-pressed="true"] { background: var(--flaeche); color: var(--text); box-shadow: var(--schatten); }
.kal-leiste .rechts { margin-left: auto; display: flex; gap: 8px; flex-wrap: wrap; }

.kal { --px: 1.15px; background: var(--flaeche); border: 1px solid var(--linie); border-radius: var(--radius); box-shadow: var(--schatten); overflow: hidden; }
.kal-kopf, .kal-koerper { display: grid; grid-template-columns: 52px repeat(var(--tage), minmax(0, 1fr)); }
.kal-kopf { border-bottom: 1px solid var(--linie); background: var(--flaeche); position: sticky; top: 0; z-index: 3; }
.kal-kopf > div { padding: 10px 8px; text-align: center; font-size: .8rem; color: var(--leise); border-left: 1px solid var(--linie); }
.kal-kopf > div:first-child { border-left: none; }
.kal-kopf .tagzahl { display: block; font-size: 1.25rem; font-weight: 600; color: var(--text); line-height: 1.2; }
.kal-kopf .heute .tagzahl { color: var(--akzent); }
.kal-kopf .sperre { display: block; font-size: .7rem; color: var(--warn); font-weight: 600; }
.kal-koerper { position: relative; }
.kal-zeiten { position: relative; }
.kal-zeiten span { position: absolute; right: 8px; transform: translateY(-50%); font-size: .72rem; color: var(--leise); }
.kal-spalte { position: relative; border-left: 1px solid var(--linie); background: var(--geschlossen);
  background-image: repeating-linear-gradient(-45deg, transparent 0 7px, color-mix(in srgb, var(--linie) 45%, transparent) 7px 8px); cursor: default; }
.kal-offen { position: absolute; left: 0; right: 0; background: var(--flaeche); cursor: copy; }
.kal-linie { position: absolute; left: 0; right: 0; border-top: 1px solid var(--linie); pointer-events: none; }
.kal-linie.halb { border-top-style: dashed; opacity: .55; }
.kal-jetzt { position: absolute; left: 0; right: 0; border-top: 2px solid var(--akzent); z-index: 2; pointer-events: none; }
.kal-jetzt::before { content: ""; position: absolute; left: -4px; top: -5px; width: 8px; height: 8px; border-radius: 50%; background: var(--akzent); }
.kal-termin { position: absolute; z-index: 1; border-radius: 8px; padding: 4px 7px; overflow: hidden; cursor: pointer; text-align: left;
  font-size: .78rem; line-height: 1.3; border: none; border-left: 3px solid var(--fk, var(--leise)); background: var(--fb, var(--flaeche-2)); color: var(--text);
  box-shadow: 0 1px 2px rgba(0, 0, 0, .06); display: block; min-height: 0; font-weight: 400; }
.kal-termin:hover { filter: brightness(.97); background: var(--fb); }
.kal-termin b { display: block; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kal-termin .z { color: var(--leise); font-size: .72rem; }
.kal-termin.blocker { --fb: var(--flaeche-3); --fk: var(--leise);
  background-image: repeating-linear-gradient(-45deg, transparent 0 6px, color-mix(in srgb, var(--leise) 18%, transparent) 6px 7px); }
.kal-termin.eng b, .kal-termin.eng .z { display: inline; }
.kal-termin.eng .z::after { content: " · "; }
.f0 { --fb: var(--f0-bg); --fk: var(--f0); } .f1 { --fb: var(--f1-bg); --fk: var(--f1); } .f2 { --fb: var(--f2-bg); --fk: var(--f2); }
.f3 { --fb: var(--f3-bg); --fk: var(--f3); } .f4 { --fb: var(--f4-bg); --fk: var(--f4); } .f5 { --fb: var(--f5-bg); --fk: var(--f5); }
.punkt { display: inline-block; width: 10px; height: 10px; border-radius: 50%; background: var(--fk); flex: none; }
.legende { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-top: 12px; font-size: .8rem; color: var(--leise); }
.legende span { display: inline-flex; align-items: center; gap: 6px; }

.kal-liste .tag { margin-bottom: 18px; }
.kal-liste .tag-kopf { display: flex; align-items: baseline; gap: 10px; font-weight: 600; margin: 0 2px 8px; }
.kal-liste .tag-kopf .leise { font-weight: 400; }
.kal-liste .eintrag { display: flex; gap: 12px; align-items: stretch; width: 100%; padding: 0; border: 1px solid var(--linie); border-radius: 12px;
  background: var(--flaeche); margin-bottom: 8px; text-align: left; overflow: hidden; min-height: 58px; font-weight: 400; }
.kal-liste .eintrag:hover { background: var(--flaeche-2); }
.kal-liste .eintrag .streifen { width: 5px; background: var(--fk, var(--leise)); flex: none; }
.kal-liste .eintrag .zeit { padding: 9px 0; width: 56px; flex: none; font-weight: 600; font-variant-numeric: tabular-nums; }
.kal-liste .eintrag .zeit small { display: block; font-weight: 400; color: var(--leise); }
.kal-liste .eintrag .was { padding: 9px 12px 9px 0; flex: 1; min-width: 0; }
.kal-liste .eintrag .was b { display: block; }

.zeiten-wahl { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.zeiten-wahl button { min-height: 32px; padding: 3px 10px; font-variant-numeric: tabular-nums; }
.zeiten-wahl button[aria-pressed="true"] { background: var(--akzent); color: var(--akzent-text); border-color: var(--akzent); }
.treffer { border: 1px solid var(--linie); border-radius: var(--radius-klein); margin-top: 6px; max-height: 220px; overflow-y: auto; }
.treffer button { display: flex; width: 100%; justify-content: space-between; border: none; border-radius: 0; border-bottom: 1px solid var(--linie);
  background: var(--flaeche); font-weight: 400; min-height: 42px; }
.treffer button:last-child { border-bottom: none; }
.gewaehlt { display: flex; align-items: center; gap: 10px; padding: 10px 12px; background: var(--akzent-zart); border-radius: var(--radius-klein); }
.gewaehlt b { flex: 1; }
.details dt { font-size: .78rem; color: var(--leise); margin-top: 12px; }
.details dd { margin: 2px 0 0; }

.kal-filter { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin: -4px 0 14px; }
.kal-filter label { margin: 0; }
.kal-filter select { width: auto; min-width: 160px; min-height: 36px; padding: 5px 8px; }
.m0 { --fb: var(--m0-bg); --fk: var(--m0); } .m1 { --fb: var(--m1-bg); --fk: var(--m1); } .m2 { --fb: var(--m2-bg); --fk: var(--m2); }
.m3 { --fb: var(--m3-bg); --fk: var(--m3); } .m4 { --fb: var(--m4-bg); --fk: var(--m4); } .m5 { --fb: var(--m5-bg); --fk: var(--m5); }
.m6 { --fb: var(--m6-bg); --fk: var(--m6); } .m7 { --fb: var(--m7-bg); --fk: var(--m7); }
.kal-termin .ma-kuerzel { float: right; font-size: .66rem; font-weight: 700; padding: 0 5px; margin-left: 4px; border-radius: 6px;
  background: color-mix(in srgb, var(--flaeche) 70%, transparent); color: var(--leise); }
.kal-kopf .ma-kopf-spalte { display: flex; align-items: center; justify-content: center; gap: 8px; color: var(--text); font-weight: 600; }
.ma-spaltenname { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ---------- Team ---------- */
.ma-avatar { display: inline-grid; place-items: center; flex: none; width: 28px; height: 28px; border-radius: 50%; font-size: .7rem; font-weight: 700;
  letter-spacing: .02em; background: var(--fb); color: var(--fk); box-shadow: inset 0 0 0 1.5px var(--fk); }
.ma-avatar.gross { width: 42px; height: 42px; font-size: .86rem; }
.ma-raster { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(min(300px, 100%), 1fr)); }
.ma-raster > .karte { min-width: 0; }
.ma-kopf > div { min-width: 0; }
.ma-raster .karte + .karte { margin-top: 0; }
.ma-karte.inaktiv { opacity: .6; }
.ma-kopf { display: flex; align-items: center; gap: 12px; }
.ma-kopf .titel { font-weight: 600; }
.ma-pillen { display: flex; flex-wrap: wrap; gap: 6px; margin: 12px 0; }
.ma-pillen .pille { white-space: normal; }
.ma-plan { display: grid; gap: 2px; font-variant-numeric: tabular-nums; }
.ma-leistungen { display: grid; gap: 4px 16px; grid-template-columns: repeat(auto-fill, minmax(min(200px, 100%), 1fr)); }
.farbwahl { display: flex; gap: 8px; flex-wrap: wrap; }
.farbwahl label { margin: 0; cursor: pointer; }
.farbwahl input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.farbwahl span { display: block; width: 30px; height: 30px; border-radius: 50%; background: var(--fk); border: 3px solid var(--flaeche); box-shadow: 0 0 0 1px var(--linie-stark); }
.farbwahl input:checked + span { box-shadow: 0 0 0 2px var(--text); }
.farbwahl input:focus-visible + span { outline: 2px solid var(--akzent); outline-offset: 2px; }

/* ---------- Kennzahlen ---------- */
.kennzahlen { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin-bottom: 18px; }
.kennzahl { background: var(--flaeche); border: 1px solid var(--linie); border-radius: var(--radius); padding: 14px 16px; box-shadow: var(--schatten); }
.kennzahl .wert { font-size: 1.6rem; font-weight: 600; line-height: 1.2; font-variant-numeric: tabular-nums; }
.kennzahl .name { font-size: .8rem; color: var(--leise); }

/* ---------- Anruf-Simulator ---------- */
.simulator { max-width: 760px; margin: 0 auto; padding: 28px 16px 48px; }
.simulator .oben { display: flex; align-items: center; gap: 12px; margin-bottom: 22px; }
.simulator .oben .marke { padding: 0; flex: 1; }
.telefon { background: var(--flaeche); border: 1px solid var(--linie); border-radius: 24px; box-shadow: var(--schatten); overflow: hidden; }
.telefon-kopf { display: flex; align-items: center; gap: 14px; padding: 18px 20px; border-bottom: 1px solid var(--linie);
  background: linear-gradient(180deg, var(--akzent-zart), var(--flaeche)); }
.avatar { width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center; flex: none; font-family: var(--schrift-titel);
  font-size: 1.4rem; background: var(--akzent); color: var(--akzent-text); position: relative; }
.avatar.aktiv::after { content: ""; position: absolute; inset: -5px; border-radius: 50%; border: 2px solid var(--akzent); animation: puls 1.6s ease-out infinite; }
@keyframes puls { from { opacity: .8; transform: scale(.92); } to { opacity: 0; transform: scale(1.18); } }
@media (prefers-reduced-motion: reduce) { .avatar.aktiv::after { animation: none; } }
.telefon-kopf .wer { flex: 1; min-width: 0; }
.telefon-kopf .wer b { display: block; font-size: 1.05rem; }
.status { display: inline-flex; align-items: center; gap: 6px; font-size: .8rem; color: var(--leise); }
.status::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--linie-stark); }
.status.aktiv { color: var(--akzent); }
.status.aktiv::before { background: var(--akzent); }
.anruf-knopf { min-height: 46px; padding: 8px 20px; border-radius: 99px; font-weight: 600; }
.anruf-knopf.annehmen { background: var(--gut); border-color: var(--gut); color: var(--auf-farbe); }
.anruf-knopf.annehmen:hover { background: color-mix(in srgb, var(--gut) 88%, #000); }
.anruf-knopf.beenden { background: var(--rot); border-color: var(--rot); color: var(--auf-farbe); }
.telefon-einstellung { display: flex; gap: 12px; flex-wrap: wrap; align-items: flex-end; padding: 14px 20px; border-bottom: 1px solid var(--linie); background: var(--flaeche-2); }
.telefon-einstellung > div { flex: 1 1 220px; }
.telefon-einstellung label { margin-top: 0; }
#verlauf { display: flex; flex-direction: column; gap: 10px; min-height: 300px; max-height: 56dvh; overflow-y: auto; padding: 20px; }
.blase { max-width: 82%; padding: 10px 14px; border-radius: 18px; font-size: .95rem; }
.blase.ki { background: var(--flaeche-2); align-self: flex-start; border-bottom-left-radius: 6px; }
.blase.mensch { background: var(--akzent); color: var(--akzent-text); align-self: flex-end; border-bottom-right-radius: 6px; }
.blase.zwischen { opacity: .65; font-style: italic; }
.blase.fehlerblase { background: var(--rot-zart); color: var(--rot); }
.verlauf-leer { margin: auto; text-align: center; color: var(--leise); max-width: 340px; font-size: .92rem; }
.verlauf-leer svg { width: 40px; height: 40px; color: var(--linie-stark); margin-bottom: 8px; }
.telefon-fuss { padding: 14px 20px 18px; border-top: 1px solid var(--linie); }
.telefon-fuss form { display: flex; gap: 8px; }
.telefon-fuss input { border-radius: 99px; padding-left: 16px; }
.telefon-fuss button { border-radius: 99px; }
.telefon-fuss .haken { margin-top: 10px; }

/* ---------- Online-Buchung (buchen.html) ---------- */
.buchen { max-width: 760px; margin: 0 auto; padding: 22px 16px 64px; }
.buchen-kopf { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; }
.buchen-kopf .marke { padding: 0; flex: 1; min-width: 0; }
.buchen .schritt { margin-top: 16px; scroll-margin-top: 12px; }
.schritt h2 { display: flex; align-items: center; gap: 10px; }
.schritt-nr { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--akzent); color: var(--akzent-text); font-size: .82rem; flex: none; }
.leistung-gruppe h3 { margin-top: 6px; }
.leistung-gruppe + .leistung-gruppe h3 { margin-top: 18px; }
.leistung-liste { display: grid; gap: 8px; grid-template-columns: repeat(auto-fill, minmax(min(260px, 100%), 1fr)); }
button.leistung-wahl { display: flex; flex-direction: column; align-items: stretch; gap: 2px; text-align: left; padding: 12px 14px; min-height: 0; height: 100%; border-radius: 12px; white-space: normal; }
.leistung-wahl .kopf { display: flex; gap: 10px; justify-content: space-between; align-items: baseline; }
.leistung-wahl .preis { font-weight: 600; white-space: nowrap; }
button.leistung-wahl[aria-pressed="true"] { border-color: var(--akzent); background: var(--akzent-zart); box-shadow: 0 0 0 1px var(--akzent); }
.tage-leiste { display: flex; gap: 6px; align-items: center; margin-top: 14px; }
.tage-leiste > button { flex: none; }
.tage { flex: 1; min-width: 0; display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
button.tag-wahl { display: flex; flex-direction: column; align-items: center; gap: 0; padding: 6px 2px; min-height: 0; border-radius: 10px; line-height: 1.25; }
.tag-wahl .wt, .tag-wahl .mon { font-size: .72rem; color: var(--leise); }
.tag-wahl .zahl { font-size: 1.15rem; font-weight: 600; }
.tag-wahl .frei { font-size: .68rem; color: var(--gut); margin-top: 2px; white-space: nowrap; }
button.tag-wahl:disabled .frei { color: var(--leise); }
button.tag-wahl[aria-pressed="true"] { background: var(--akzent); border-color: var(--akzent); color: var(--akzent-text); }
button.tag-wahl[aria-pressed="true"] span { color: var(--akzent-text); }
.buchen .zeiten-wahl button { min-width: 66px; justify-content: center; }
.buchen .gewaehlt { margin-bottom: 4px; }
fieldset.frage { border: 1px solid var(--linie); border-radius: var(--radius-klein); padding: 10px 14px 12px; margin: 10px 0 0; }
fieldset.frage legend { font-size: .9rem; padding: 0 4px; }
fieldset.frage input:not([type="radio"]) { margin-top: 8px; }
.buchen label.haken { align-items: flex-start; }
.buchen label.haken input { margin-top: 2px; }
button.gross { min-height: 46px; padding: 8px 22px; font-weight: 600; }
.honig { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.fertig-zeichen { width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center; background: var(--gut-zart); color: var(--gut); margin-bottom: 12px; }
.fertig-zeichen svg { width: 28px; height: 28px; }
@media (max-width: 520px) {
  .tage { grid-template-columns: repeat(7, minmax(40px, 1fr)); overflow-x: auto; }
  .tage-leiste > button.rund { width: 32px; }
  .tag-wahl .frei { font-size: .6rem; }
}

/* ---------- Neue Online-Buchungen (Verwaltung) ---------- */
.neu-online { border-color: color-mix(in srgb, var(--akzent) 45%, var(--linie)); margin-bottom: 16px; }
.neu-online .liste > li { padding: 10px 0; align-items: center; }input[type="radio"] { width: 18px; height: 18px; min-height: 0; padding: 0; accent-color: var(--akzent); margin: 0; flex: none; box-shadow: none; }
fieldset.frage .antworten { display: flex; gap: 26px; margin-top: 4px; }
fieldset.frage .antworten label.haken { margin: 0; }