/* Cova CMS – heller Arbeitsbereich im Stil des Website-Cockpits (Design-System „Leitplanke“, hell) */
:root {
  --bg: #eef1f7;
  --flaeche: #ffffff;
  --flaeche-2: #f5f7fb;
  --flaeche-3: #e9edf4;
  --ink: #0a1020;
  --muted: #5a6478;
  --muted-2: #7a8497;
  --linie: #e4e8f0;
  --linie-2: #cfd6e2;
  --navy: #0b0f17;
  --navy-2: #141a26;
  --amber: #ffb020;
  --amber-dunkel: #e59a0c;
  --blau: #2563eb;
  --gruen: #0f8a4f;
  --gruen-bg: #e5f6ec;
  --rot: #c0262d;
  --rot-bg: #fdecec;
  --warn: #8a5a00;
  --warn-bg: #fdf3d8;
  --schatten: 0 1px 2px rgb(10 16 32 / 0.04), 0 12px 32px -12px rgb(10 16 32 / 0.14);
  --schatten-gross: 0 30px 80px -20px rgb(10 16 32 / 0.45);
  --r-karte: 0.625rem;
  --r-control: 0.375rem;
  --schrift: "Geist", system-ui, -apple-system, "Segoe UI", sans-serif;
  --display: "Oswald", "Arial Narrow", system-ui, sans-serif;
  --mono: "Geist Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  color-scheme: light;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; min-height: 100vh; background: var(--bg); color: var(--ink); font: 14.5px/1.5 var(--schrift); -webkit-font-smoothing: antialiased; }
h1, h2, h3, h4, p { margin: 0; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: var(--blau); }
:focus-visible { outline: 2px solid var(--blau); outline-offset: 2px; }
.skip { position: absolute; left: -999px; top: 8px; z-index: 100; background: var(--amber); color: var(--navy); padding: 8px 14px; border-radius: var(--r-control); font-weight: 600; }
.skip:focus { left: 8px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.mono { font-family: var(--mono); font-variant-numeric: tabular-nums; }

/* Kopfleiste */
.kopf { position: sticky; top: 0; z-index: 30; background: var(--navy); color: #f3f5f9; }
.kopf-in { max-width: 1480px; margin: 0 auto; display: flex; align-items: center; gap: 18px; padding: 10px 20px; min-height: 58px; }
.marke { display: inline-flex; align-items: center; gap: 10px; color: #f3f5f9; text-decoration: none; font-family: var(--display); font-size: 19px; letter-spacing: 0.04em; }
.marke b { color: var(--amber); font-weight: 600; }
.marke-n { width: 30px; height: 30px; border-radius: 6px; background: var(--amber); color: var(--navy); display: grid; place-items: center; font-size: 18px; }
.tabs { display: flex; gap: 4px; min-width: 0; overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.nav-kurz { display: none; }
@media (max-width: 520px) { .nav-kurz { display: inline; } .nav-lang { display: none; } }
.tabs a { display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; white-space: nowrap; flex: none; border-radius: var(--r-control); color: #9aa2b4; text-decoration: none; font-weight: 600; }
.tabs a:hover { color: #fff; background: rgb(255 255 255 / 0.06); }
.tabs a[aria-current="page"] { color: #fff; background: rgb(255 255 255 / 0.1); box-shadow: inset 0 -2px 0 var(--amber); }
.zahl { min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; background: var(--amber); color: var(--navy); font-size: 12px; font-weight: 700; display: inline-grid; place-items: center; }
.kopf-rechts { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.konto-name { color: #c7cdd9; font-size: 13px; font-weight: 500; white-space: nowrap; max-width: 160px; overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 640px) { .konto-name { display: none; } }
.sync { display: inline-flex; align-items: center; gap: 8px; max-width: 340px; border: 1px solid rgb(255 255 255 / 0.14); background: transparent; color: #c7cdd9; border-radius: 999px; padding: 6px 12px; font-size: 13px; white-space: nowrap; overflow: hidden; }
.sync span:last-child { overflow: hidden; text-overflow: ellipsis; }
.sync:hover { border-color: rgb(255 255 255 / 0.35); color: #fff; }
.sync .punkt { width: 8px; height: 8px; border-radius: 50%; background: #8b93a5; flex: none; }
.sync.ok .punkt { background: #35d07f; }
.sync.fehler .punkt { background: var(--amber); }
.sync.laeuft .punkt { animation: puls 1s infinite; }
@keyframes puls { 50% { opacity: 0.3; } }

main { max-width: 1480px; margin: 0 auto; padding: 22px 20px 60px; outline: none; }
.laden { display: flex; align-items: center; justify-content: center; gap: 10px; padding: 80px 0; color: var(--muted); }
.spinner { width: 18px; height: 18px; border-radius: 50%; border: 2px solid currentColor; border-right-color: transparent; animation: dreh 0.7s linear infinite; display: inline-block; }
@keyframes dreh { to { transform: rotate(360deg); } }

/* Bausteine */
.karte { background: var(--flaeche); border: 1px solid var(--linie); border-radius: var(--r-karte); box-shadow: var(--schatten); }
.knopf { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 40px; padding: 8px 16px; border-radius: var(--r-control); border: 1px solid transparent; background: var(--amber); color: var(--navy); font-weight: 600; white-space: nowrap; text-decoration: none; }
.knopf:hover { background: var(--amber-dunkel); }
.knopf:disabled { opacity: 0.55; cursor: default; }
.knopf.dunkel { background: var(--navy); color: #fff; }
.knopf.dunkel:hover { background: var(--navy-2); }
.knopf.leise { background: var(--flaeche); color: var(--ink); border-color: var(--linie-2); }
.knopf.leise:hover { border-color: var(--muted-2); }
.kopf .knopf.leise { background: transparent; color: #c7cdd9; border-color: rgb(255 255 255 / 0.18); }
.knopf.gefahr { background: transparent; color: var(--rot); border-color: color-mix(in srgb, var(--rot) 40%, transparent); }
.knopf.gefahr:hover { background: var(--rot-bg); }
.knopf.klein { min-height: 32px; padding: 5px 11px; font-size: 13.5px; }
.icon { width: 36px; height: 36px; display: inline-grid; place-items: center; border-radius: var(--r-control); border: 1px solid var(--linie-2); background: var(--flaeche); color: var(--muted); }
.icon:hover { color: var(--ink); border-color: var(--muted-2); }
.chip { display: inline-flex; align-items: center; gap: 7px; border: 1px solid var(--linie-2); background: var(--flaeche); border-radius: 999px; padding: 5px 11px; font-size: 13px; font-weight: 600; color: var(--muted); white-space: nowrap; }
.chip:hover { color: var(--ink); }
.chip[aria-pressed="true"] { border-color: color-mix(in srgb, var(--f, var(--navy)) 60%, transparent); background: color-mix(in srgb, var(--f, var(--navy)) 11%, var(--flaeche)); color: var(--ink); }
.chip .n { font-size: 11.5px; color: var(--muted-2); font-variant-numeric: tabular-nums; }
.punkt-f { width: 9px; height: 9px; border-radius: 50%; background: var(--f); flex: none; }
.chip[aria-pressed="false"] .punkt-f { opacity: 0.35; }
.tag { display: inline-flex; align-items: center; gap: 5px; font-size: 11.5px; font-weight: 700; padding: 2px 8px; border-radius: 999px; white-space: nowrap; background: color-mix(in srgb, var(--f, var(--muted)) 13%, transparent); color: color-mix(in srgb, var(--f, var(--muted)) 85%, #000); }
.av { width: 34px; height: 34px; border-radius: 8px; flex: none; display: grid; place-items: center; font-size: 12px; font-weight: 700; background: color-mix(in srgb, var(--f, var(--muted)) 14%, var(--flaeche)); color: var(--ink); }
.leer { padding: 28px 16px; text-align: center; color: var(--muted); border: 1px dashed var(--linie-2); border-radius: var(--r-karte); background: var(--flaeche); }
.hinweis { padding: 10px 14px; border-radius: var(--r-control); font-size: 13.5px; background: var(--warn-bg); color: var(--warn); border: 1px solid color-mix(in srgb, var(--warn) 25%, transparent); }
.hinweis.fehler { background: var(--rot-bg); color: var(--rot); border-color: color-mix(in srgb, var(--rot) 25%, transparent); }
.klein-text { font-size: 12.5px; color: var(--muted); }
.titel { font-family: var(--display); font-weight: 600; font-size: clamp(24px, 2.4vw, 30px); letter-spacing: 0.01em; line-height: 1.15; text-transform: uppercase; }
.seitenkopf { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.seitenkopf p { color: var(--muted); margin-top: 2px; }

/* Kalender */
.kal-layout { display: grid; gap: 16px; align-items: start; }
.kal-layout > * { min-width: 0; }
.leiste { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 12px; border-bottom: 1px solid var(--linie); }
.leiste .woche { font-family: var(--display); font-size: 18px; letter-spacing: 0.02em; margin: 0 6px; font-variant-numeric: tabular-nums; }
.leiste .rechts { margin-left: auto; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.leiste select { min-height: 36px; border: 1px solid var(--linie-2); border-radius: var(--r-control); background: var(--flaeche); padding: 6px 10px; }
.filter { display: flex; gap: 6px; flex-wrap: wrap; padding: 10px 12px; border-bottom: 1px solid var(--linie); }
.seg { display: inline-flex; background: var(--flaeche-3); padding: 3px; border-radius: 8px; }
.seg button { border: 0; background: transparent; padding: 5px 12px; border-radius: 6px; font-weight: 600; font-size: 13.5px; color: var(--muted); }
.seg button[aria-pressed="true"] { background: var(--flaeche); color: var(--ink); box-shadow: 0 1px 3px rgb(10 16 32 / 0.12); }
.kal-scroll { overflow: auto; max-height: calc(100vh - 250px); min-height: 460px; position: relative; }
.kal { display: grid; grid-template-columns: 54px repeat(var(--spalten), minmax(var(--min, 120px), 1fr)); min-width: calc(54px + var(--spalten) * var(--min, 120px)); position: relative; }
.kal-kopf { position: sticky; top: 0; z-index: 6; background: var(--flaeche); border-bottom: 1px solid var(--linie); border-left: 1px solid var(--linie); padding: 8px 10px; min-height: 50px; display: grid; align-content: center; }
.kal-kopf:first-child { border-left: 0; position: sticky; left: 0; z-index: 7; }
.kal-kopf b { font-size: 13.5px; }
.kal-kopf span { font-size: 11.5px; color: var(--muted); }
.kal-kopf.heute b { color: var(--blau); }
.kal-zeiten { position: sticky; left: 0; z-index: 5; background: var(--flaeche); height: var(--h); }
.kal-zeiten span { position: absolute; right: 8px; font: 500 11px var(--mono); color: var(--muted-2); transform: translateY(-7px); }
.kal-spalte { position: relative; height: var(--h); border-left: 1px solid var(--linie); background-image: repeating-linear-gradient(180deg, var(--linie) 0 1px, transparent 1px var(--stunde)); cursor: cell; }
.kal-spalte .zu { position: absolute; left: 0; right: 0; background: repeating-linear-gradient(135deg, transparent 0 6px, color-mix(in srgb, var(--linie) 80%, transparent) 6px 7px); pointer-events: none; }
.kal-spalte .vorbei { position: absolute; left: 0; right: 0; top: 0; background: color-mix(in srgb, var(--flaeche-2) 60%, transparent); pointer-events: none; }
.jetzt-linie { position: absolute; left: 0; right: 0; height: 2px; background: var(--rot); z-index: 4; pointer-events: none; }
.jetzt-linie::before { content: ""; position: absolute; left: -4px; top: -3px; width: 8px; height: 8px; border-radius: 50%; background: var(--rot); }
.ev { position: absolute; z-index: 2; border-radius: 6px; border: 1px solid color-mix(in srgb, var(--f) 45%, transparent); border-left: 4px solid var(--f); background: color-mix(in srgb, var(--f) 12%, var(--flaeche)); padding: 2px 6px; text-align: left; overflow: hidden; font-size: 12px; line-height: 1.3; display: grid; align-content: start; color: var(--ink); }
.ev:hover { box-shadow: 0 4px 14px -4px rgb(10 16 32 / 0.3); z-index: 3; }
.ev b { font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ev span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--muted); }
.ev.kurz { display: flex; gap: 6px; align-items: center; }
.ev.chat { border-style: solid; background: repeating-linear-gradient(135deg, color-mix(in srgb, var(--f) 14%, var(--flaeche)) 0 8px, color-mix(in srgb, var(--f) 9%, var(--flaeche)) 8px 16px); }
.ev.chat b::before { content: "✦ "; color: var(--f); }
.ev.blocker { background: repeating-linear-gradient(135deg, color-mix(in srgb, var(--f) 14%, var(--flaeche)) 0 6px, var(--flaeche) 6px 12px); }
.ev.neu::after { content: ""; position: absolute; top: 4px; right: 4px; width: 7px; height: 7px; border-radius: 50%; background: var(--rot); }
.legende { display: flex; flex-wrap: wrap; gap: 6px 16px; padding: 10px 12px; font-size: 12.5px; color: var(--muted); border-top: 1px solid var(--linie); }
.legende span { display: inline-flex; align-items: center; gap: 6px; }

/* Seitenspalte Kalender */
.seite { display: grid; gap: 16px; }
.seite .karte { padding: 14px; }
.seite h2 { font-family: var(--display); font-size: 16px; letter-spacing: 0.03em; text-transform: uppercase; margin-bottom: 10px; display: flex; justify-content: space-between; align-items: baseline; }
.seite h2 a, .seite h2 button { font-family: var(--schrift); font-size: 12.5px; text-transform: none; letter-spacing: 0; font-weight: 600; }
.liste { display: grid; gap: 6px; }
.eintrag { display: grid; grid-template-columns: auto 1fr; gap: 10px; align-items: center; text-align: left; width: 100%; border: 1px solid var(--linie); background: var(--flaeche); border-radius: 8px; padding: 8px 10px; }
.eintrag:hover { border-color: var(--linie-2); background: var(--flaeche-2); }
.eintrag b { display: block; font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.eintrag span { display: block; font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.eintrag > span:last-child { min-width: 0; }
.agenda-zeit { font: 500 12.5px var(--mono); padding: 3px 7px; border-radius: 5px; background: color-mix(in srgb, var(--f) 14%, var(--flaeche)); border-left: 3px solid var(--f); }

/* Kontakte */
.werkzeuge { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 12px; }
.werkzeuge > * { min-width: 0; }
.schein-leiste { padding: 10px 0; margin-bottom: 12px; border-top: 1px solid var(--linie); }
.suche { position: relative; flex: 0 1 300px; }
.suche input { width: 100%; min-height: 40px; padding: 8px 12px 8px 36px; border: 1px solid var(--linie-2); border-radius: var(--r-control); background: var(--flaeche); }
.suche svg { position: absolute; left: 11px; top: 11px; color: var(--muted-2); }
.chipreihe { display: flex; gap: 6px; flex-wrap: wrap; }
.tabelle { overflow: hidden; }
.zeile-kopf, .zeile { display: grid; grid-template-columns: minmax(200px, 1.6fr) 150px 70px 130px minmax(150px, 1fr) 110px; gap: 14px; align-items: center; padding: 10px 16px; }
.zeile-kopf { font-size: 11px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted-2); background: var(--flaeche-2); border-bottom: 1px solid var(--linie); }
.zeile { width: 100%; border: 0; border-bottom: 1px solid var(--linie); background: transparent; text-align: left; }
.zeile:last-child { border-bottom: 0; }
.zeile:hover { background: var(--flaeche-2); }
.zeile > * { min-width: 0; }
.name-zelle { display: flex; align-items: center; gap: 10px; }
.name-zelle > span:last-child { min-width: 0; }
.name-zelle b { display: flex; align-items: center; gap: 6px; font-size: 14px; }
.name-zelle b span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.name-zelle small { display: block; font-size: 12.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.neu-punkt { width: 8px; height: 8px; border-radius: 50%; background: var(--rot); flex: none; }
.zelle-klein { font-size: 13px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.quelle { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; color: var(--muted); }
@media (max-width: 1000px) {
  .zeile-kopf { display: none; }
  .zeile { grid-template-columns: minmax(0, 1fr) auto; gap: 6px 12px; }
  .zeile .z-klasse, .zeile .z-fl, .zeile .z-quelle { display: none; }
  .zeile .z-naechst { grid-column: 1 / -1; padding-left: 44px; }
}

/* Schublade (Kontakt-Detail) & Dialoge */
.schleier { position: fixed; inset: 0; z-index: 50; background: rgb(5 7 12 / 0.45); display: flex; justify-content: flex-end; }
.schublade { background: var(--flaeche); width: min(640px, 100%); height: 100%; overflow-y: auto; box-shadow: var(--schatten-gross); display: grid; align-content: start; grid-template-columns: minmax(0, 1fr); animation: rein 0.2s ease-out; }
@keyframes rein { from { transform: translateX(24px); opacity: 0.6; } }
.schublade-kopf { position: sticky; top: 0; z-index: 2; background: var(--flaeche); border-bottom: 1px solid var(--linie); padding: 16px 20px; display: flex; gap: 12px; align-items: flex-start; }
.schublade-kopf h2 { font-family: var(--display); font-size: 24px; letter-spacing: 0.01em; line-height: 1.2; outline: none; }
.schublade-kopf .tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.schublade-inhalt { padding: 18px 20px 28px; display: grid; gap: 20px; }
.abschnitt { display: grid; gap: 10px; grid-template-columns: minmax(0, 1fr); min-width: 0; }
.abschnitt > h3 { font-size: 11.5px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted-2); }
.kontaktreihe { display: flex; flex-wrap: wrap; gap: 8px; }
.kopie { display: inline-flex; align-items: center; gap: 8px; padding: 5px 5px 5px 12px; border-radius: 8px; background: var(--flaeche-2); border: 1px solid var(--linie); font-weight: 600; max-width: 100%; }
.kopie a { color: var(--ink); text-decoration: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.kopie a:hover { text-decoration: underline; }
.kopie button { border: 0; background: var(--flaeche); border-radius: 6px; padding: 4px 9px; font-size: 12.5px; font-weight: 600; color: var(--muted); box-shadow: 0 1px 2px rgb(10 16 32 / 0.1); }
.statuswahl { display: flex; flex-wrap: wrap; gap: 6px; }
.box { border: 1px solid var(--linie); background: var(--flaeche-2); border-radius: 8px; padding: 12px 14px; }
.box.chat { background: color-mix(in srgb, var(--blau) 5%, var(--flaeche)); border-color: color-mix(in srgb, var(--blau) 20%, var(--linie)); }
.terminbox { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; border: 1px solid var(--linie); border-left: 4px solid var(--f); border-radius: 8px; padding: 10px 12px; }
.terminbox > div { flex: 1; min-width: 180px; }
.terminbox b { display: block; }
.terminbox span { font-size: 13px; color: var(--muted); }
.terminbox.abgesagt { opacity: 0.6; border-style: dashed; }
.raster { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 8px; }
.raster div { background: var(--flaeche-2); border-radius: 8px; padding: 8px 10px; min-width: 0; }
.raster span { display: block; font-size: 11.5px; color: var(--muted); }
.raster b { display: block; font-size: 13.5px; overflow-wrap: anywhere; }
.nachrichten { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.nachrichten li { padding: 8px 12px; border-radius: 10px 10px 10px 3px; background: color-mix(in srgb, var(--blau) 9%, var(--flaeche)); font-size: 14px; overflow-wrap: anywhere; }
.verlauf { display: grid; gap: 6px; max-height: 360px; overflow-y: auto; margin-top: 10px; font-size: 13px; }
.verlauf div { padding: 6px 10px; border-radius: 8px; background: var(--flaeche-2); overflow-wrap: anywhere; }
.verlauf div.u { background: color-mix(in srgb, var(--blau) 10%, var(--flaeche)); }
.verlauf b { display: block; font-size: 11px; color: var(--muted-2); }
details summary { cursor: pointer; font-weight: 600; font-size: 13.5px; }
.stand { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 8px; }
.stand div { background: var(--flaeche-2); border-radius: 8px; padding: 10px 12px; display: grid; gap: 4px; }
.stand span { font-size: 11px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted-2); }
.stand b { font-family: var(--display); font-size: 22px; font-weight: 600; }
.stand b small { font-family: var(--schrift); font-size: 13px; color: var(--muted); font-weight: 500; }
.balken { height: 5px; border-radius: 3px; background: var(--flaeche-3); overflow: hidden; }
.balken i { display: block; height: 100%; background: var(--f, var(--blau)); border-radius: 3px; }
.terminliste { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; grid-template-columns: minmax(0, 1fr); }
.terminliste li { display: flex; gap: 10px; align-items: center; padding: 7px 10px; border-radius: 8px; background: color-mix(in srgb, var(--f) 8%, var(--flaeche)); border-left: 3px solid var(--f); font-size: 13.5px; }
.terminliste li b { font-family: var(--mono); font-weight: 500; font-size: 12.5px; white-space: nowrap; }
.terminliste li span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted); }
.terminliste li button { border: 0; background: none; color: var(--blau); font-weight: 600; font-size: 12.5px; padding: 2px 4px; }
textarea.notiz { width: 100%; min-height: 110px; padding: 10px 12px; border: 1px solid var(--linie-2); border-radius: var(--r-control); background: var(--flaeche); resize: vertical; }
.aktionen { display: flex; flex-wrap: wrap; gap: 8px; }

.dialog-schleier { position: fixed; inset: 0; z-index: 60; background: rgb(5 7 12 / 0.5); display: flex; align-items: flex-end; justify-content: center; }
@media (min-width: 640px) { .dialog-schleier { align-items: center; padding: 24px; } }
.dialog { background: var(--flaeche); width: 100%; max-width: 560px; max-height: 92vh; overflow-y: auto; border-radius: 14px 14px 0 0; padding: 20px; display: grid; gap: 16px; grid-template-columns: minmax(0, 1fr); box-shadow: var(--schatten-gross); }
@media (min-width: 640px) { .dialog { border-radius: 14px; padding: 24px; } }
.dialog.breit { max-width: 760px; }
.dialog-kopf { display: flex; align-items: flex-start; gap: 12px; }
.dialog-kopf h2 { flex: 1; font-family: var(--display); font-size: 22px; letter-spacing: 0.01em; outline: none; }
.felder { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.felder .ganz { grid-column: 1 / -1; }
.felder > * { min-width: 0; }
@media (max-width: 480px) { .felder { grid-template-columns: 1fr; } }
.feld { display: grid; gap: 5px; align-content: start; }
.feld label, .feld .label { font-size: 13px; font-weight: 600; }
.feld label small { font-weight: 400; color: var(--muted); }
.th-frei:not([hidden]) { display: grid; gap: 4px; margin-top: 6px; }
.feld input, .feld select, .feld textarea { width: 100%; min-height: 40px; padding: 8px 11px; border: 1px solid var(--linie-2); border-radius: var(--r-control); background: var(--flaeche); }
.feld input:focus, .feld select:focus, .feld textarea:focus, textarea.notiz:focus, .suche input:focus { outline: none; border-color: var(--blau); box-shadow: 0 0 0 3px color-mix(in srgb, var(--blau) 18%, transparent); }
.feld [aria-invalid="true"] { border-color: var(--rot); }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 13.5px; }
.check input { width: 18px; height: 18px; margin-top: 1px; accent-color: var(--navy); flex: none; }
.arten { display: flex; flex-wrap: wrap; gap: 6px; }
.fehlertext { color: var(--rot); background: var(--rot-bg); padding: 10px 12px; border-radius: var(--r-control); font-size: 13.5px; font-weight: 500; }

/* CSV-Import */
.ablage { border: 2px dashed var(--linie-2); border-radius: var(--r-karte); padding: 26px 16px; text-align: center; background: var(--flaeche-2); display: grid; gap: 8px; justify-items: center; }
.ablage.drueber { border-color: var(--blau); background: color-mix(in srgb, var(--blau) 6%, var(--flaeche)); }
.zuordnung { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 10px; }
.vorschau { overflow-x: auto; border: 1px solid var(--linie); border-radius: 8px; }
.vorschau table { border-collapse: collapse; width: 100%; font-size: 12.5px; }
.vorschau th, .vorschau td { padding: 6px 10px; border-bottom: 1px solid var(--linie); text-align: left; white-space: nowrap; }
.vorschau th { background: var(--flaeche-2); font-weight: 700; }

/* Anmeldung */
.anmelden { max-width: 380px; margin: 60px auto; padding: 28px; display: grid; gap: 16px; }

/* Meldungen */
.toast-ort { position: fixed; right: 16px; bottom: 16px; z-index: 80; display: grid; gap: 8px; max-width: min(380px, calc(100vw - 32px)); }
.toast { background: var(--navy); color: #f3f5f9; border-radius: 10px; padding: 12px 16px; box-shadow: var(--schatten-gross); font-size: 14px; border-left: 4px solid var(--amber); animation: hoch 0.2s ease-out; }
.toast button { background: none; border: 0; color: var(--amber); font-weight: 600; padding: 0; margin-top: 4px; }
.toast b { display: block; }
@keyframes hoch { from { transform: translateY(8px); opacity: 0; } }

@media (max-width: 700px) {
  .kopf-in { gap: 10px; padding: 8px 12px; flex-wrap: wrap; }
  .marke { font-size: 17px; }
  .kopf-rechts { order: 2; }
  .tabs { order: 3; width: 100%; }
  .tabs a { flex: 1 0 auto; justify-content: center; padding: 8px 10px; }
  .sync { max-width: 160px; }
  main { padding: 16px 12px 60px; }
  .kal-scroll { max-height: calc(100vh - 230px); }
  .filter { flex-wrap: nowrap; overflow-x: auto; }
  .filter .chip { flex: none; }
  .leiste .rechts { margin-left: 0; width: 100%; }
  .leiste .rechts select { flex: 1; min-width: 0; }
  .schublade-kopf, .schublade-inhalt { padding-left: 16px; padding-right: 16px; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }

/* ===== Kontakte als Board (Spalten = Stand) ===== */
.board { display: flex; gap: 12px; overflow-x: auto; padding: 4px 2px 16px; align-items: flex-start; overscroll-behavior-x: contain; }
.bspalte { flex: 0 0 272px; background: var(--flaeche-2); border: 1px solid var(--linie); border-top: 3px solid var(--f); border-radius: 10px; display: flex; flex-direction: column; max-height: calc(100vh - 250px); min-height: 160px; transition: background 0.15s, box-shadow 0.15s; }
.bspalte.drop { background: color-mix(in srgb, var(--f) 12%, var(--flaeche-2)); box-shadow: 0 0 0 2px var(--f) inset; }
.bs-kopf { display: flex; align-items: center; gap: 8px; padding: 10px 12px 8px; }
.bs-kopf h2 { font-size: 14px; margin: 0; }
.bs-kopf .n { margin-left: auto; font-size: 12px; font-weight: 700; color: var(--muted-2); }
.bs-kopf small { display: none; }
.bs-liste { padding: 4px 8px 10px; display: flex; flex-direction: column; gap: 8px; overflow-y: auto; flex: 1; overscroll-behavior-y: contain; }
.bs-leer { margin: 8px 4px; font-size: 12px; color: var(--muted-2); text-align: center; border: 1px dashed var(--linie); border-radius: 8px; padding: 14px 8px; }
.bk { background: var(--flaeche, #fff); border: 1px solid var(--linie); border-radius: 8px; padding: 8px 10px 8px; cursor: grab; box-shadow: 0 1px 2px rgb(0 0 0 / 0.05); }
.bk:hover { border-color: var(--f, #999); }
.bk.zieht { opacity: 0.45; }
.bk-kopf { display: flex; gap: 10px; align-items: center; width: 100%; border: 0; background: transparent; padding: 0; text-align: left; cursor: pointer; min-height: 40px; }
.bk-text { display: block; min-width: 0; }
.bk-text b, .bk-text small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bk-text small { font-size: 12px; color: var(--muted-2); }
.bk-termin { display: flex; gap: 5px; align-items: center; margin: 6px 0 0 !important; font-size: 12px; }
.leise-text { color: var(--muted-2); }
.bk-wahl select { margin-top: 6px; width: 100%; font-size: 12px; padding: 4px 6px; border: 1px solid var(--linie); border-radius: 6px; background: var(--flaeche-2); display: none; }
.bk:hover .bk-wahl select, .bk:focus-within .bk-wahl select { display: block; }
@media (hover: none) { .bk-wahl select { display: block; } .bk { cursor: default; } }
@media (max-width: 640px) { .bspalte { flex-basis: 84vw; max-height: none; } }

.fl-wahl select { padding: 9px 12px; border: 1px solid var(--linie); border-radius: 8px; background: var(--flaeche); font-size: 14px; }
.bk-fs { margin: 6px 0 0 !important; font-size: 12px; display: flex; gap: 5px; align-items: center; color: var(--f, #0f9d8a); }
.bk-fs b { font-size: 13px; }
.fs-vorher { display: flex; align-items: center; justify-content: space-between; gap: 12px; font-size: 13px; margin-bottom: 4px; }
.fs-vorher input { width: 84px; padding: 6px 8px; border: 1px solid var(--linie); border-radius: 6px; font-size: 14px; }


/* Fahrlehrername immer vollständig: darf umbrechen statt abgeschnitten zu werden */
.ev .ev-fl { white-space: normal; overflow: visible; text-overflow: clip; overflow-wrap: anywhere; line-height: 1.2; color: var(--ink); font-weight: 600; font-size: 11.5px; }
.legende .leg-titel { font-weight: 700; color: var(--ink); margin-right: 2px; }
.legende .punkt-f { width: 11px; height: 11px; border-radius: 3px; }

/* Kalender: Termine ziehen (linke Maustaste) und Zeit blocken (rechte Maustaste) */
.ev[data-zieh] { cursor: grab; }
body.kal-zieht, body.kal-zieht * { cursor: grabbing !important; user-select: none; }
body.kal-markiert, body.kal-markiert * { cursor: row-resize !important; user-select: none; }
.ev.zieht-quelle { opacity: 0.35; }
.ev.geist { pointer-events: none; z-index: 6; box-shadow: 0 10px 24px -8px rgb(10 16 32 / 0.45); outline: 2px solid var(--f); }
.kal-spalte .auswahl { position: absolute; left: 2px; right: 2px; z-index: 5; pointer-events: none; border: 2px dashed var(--amber-dunkel); border-radius: 6px; background: color-mix(in srgb, var(--amber) 22%, transparent); }
.kal-spalte .auswahl span { position: absolute; top: -1px; left: -1px; background: var(--amber); color: var(--navy); border-radius: 4px 0 4px 0; padding: 1px 6px; font-size: 11.5px; font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.kal-menu { position: fixed; z-index: 70; width: 250px; background: var(--flaeche); border: 1px solid var(--linie-2); border-radius: 10px; box-shadow: var(--schatten-gross); padding: 10px; display: grid; gap: 6px; font-size: 13.5px; animation: hoch 0.12s ease-out; }
.kal-menu .km-kopf { margin: 0 0 2px; display: grid; }
.kal-menu .km-kopf span { color: var(--muted); font-size: 12.5px; font-variant-numeric: tabular-nums; }
.kal-menu .km-titel { margin: 4px 0 0; font-size: 11.5px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted-2); }
.kal-menu .km-fl { display: flex; align-items: center; gap: 8px; }
.kal-menu .km-fl span { color: var(--muted); }
.kal-menu .km-fl select { flex: 1; min-width: 0; min-height: 32px; border: 1px solid var(--linie-2); border-radius: var(--r-control); background: var(--flaeche); padding: 4px 8px; }
.kal-menu .km-liste { display: grid; }
.kal-menu .km-liste button { display: flex; align-items: center; gap: 6px; text-align: left; background: none; border: 0; border-radius: 6px; padding: 6px 8px; font-weight: 600; }
.kal-menu .km-liste button:hover:not(:disabled), .kal-menu .km-liste button:focus-visible { background: var(--flaeche-3); }
.kal-menu .km-liste button:disabled { opacity: 0.45; cursor: default; }
.kal-menu .km-trenner { height: 1px; background: var(--linie); margin: 2px 0; }
.kal-menu .km-sarah { display: flex; gap: 8px; align-items: center; font-size: 12.5px; color: var(--muted); padding: 2px 8px 0; }

/* Kartei: zuständiger Fahrlehrer + Praxisdokumentation */
.fl-zustaendig { grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 12px; background: var(--flaeche-2); border: 1px solid var(--linie); border-radius: 10px; padding: 10px 12px; }
.fl-zustaendig label { font-size: 13px; font-weight: 700; }
.fl-zustaendig select { min-height: 40px; border: 1px solid var(--linie-2); border-radius: var(--r-control); background: var(--flaeche); padding: 6px 10px; font-weight: 600; min-width: 0; }
.px-kpis { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.px-kpis > div { min-width: 0; background: var(--flaeche-2); border: 1px solid var(--linie); border-radius: 10px; padding: 10px 12px; display: grid; gap: 3px; align-content: start; }
.px-kpis > div > span:first-child { font-size: 11px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted-2); }
.px-kpis b { font-family: var(--display); font-size: 26px; font-weight: 600; line-height: 1.1; font-variant-numeric: tabular-nums; }
.px-kpis b small { font-family: var(--schrift); font-size: 14px; font-weight: 500; color: var(--muted); }
.px-kpis > div > small { font-size: 12px; color: var(--muted); }
.px-raster b .punkt-f { display: inline-block; }
.link-knopf { border: 0; background: none; padding: 0; font: inherit; font-weight: inherit; color: var(--blau); text-decoration: underline; text-underline-offset: 2px; cursor: pointer; text-align: left; }
.link-knopf:hover { color: var(--navy); }
.px-zitat { border-left: 3px solid var(--amber); background: color-mix(in srgb, var(--amber) 8%, var(--flaeche)); border-radius: 0 8px 8px 0; padding: 8px 12px; }
.px-zitat span { display: block; font-size: 11.5px; font-weight: 700; color: var(--warn); }
.px-zitat p { margin: 2px 0 0; }
.px-summe { text-transform: none; letter-spacing: 0; font-weight: 600; color: var(--ink); margin-left: 6px; }
.px-kpi-text { font-family: var(--schrift) !important; font-size: 16px !important; font-weight: 700 !important; color: color-mix(in srgb, var(--f) 85%, #000); padding-top: 6px; }
.px-eckdaten { margin: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border: 1px solid var(--linie); border-radius: 10px; }
.px-eckdaten > div { padding: 8px 12px; min-width: 0; }
.px-eckdaten > div + div { border-left: 1px solid var(--linie); }
.px-eckdaten dt { font-size: 11.5px; color: var(--muted); }
.px-eckdaten dd { margin: 0; font-size: 13.5px; font-weight: 600; overflow-wrap: anywhere; }
.px-sonder { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.px-sonder > span:first-child { font-size: 12.5px; color: var(--muted); margin-right: 2px; }
/* Gefahrene, aber noch nicht dokumentierte Stunde aus dem Kalender – gleiche Spalten wie eine Protokoll-Zeile */
.px-timeline li.px-offen { display: grid; grid-template-columns: 56px minmax(90px, 1fr) 52px minmax(0, 2fr) auto; align-items: center; gap: 10px; padding: 9px 10px; font-size: 13px; background: color-mix(in srgb, var(--amber) 5%, var(--flaeche)); box-shadow: inset 3px 0 0 var(--amber); }
.px-offen .px-p-kurz { grid-column: 4; }
.px-offen .link-knopf { font-size: 12.5px; font-weight: 600; }
.px-offen em { font-style: normal; color: var(--warn); font-size: 12px; font-weight: 600; margin-left: 4px; }
.px-timeline { list-style: none; margin: 0; padding: 0; display: grid; border: 1px solid var(--linie); border-radius: 10px; overflow: hidden; }
.px-timeline > li + li { border-top: 1px solid var(--linie); }
/* Protokoll-Zeile: erst nur Datum · Fahrlehrer · Dauer · was gemacht wurde + Bewertungspunkt; Details erst beim Aufklappen. */
.px-protokoll { background: var(--flaeche); }
.px-protokoll:not([open]) .px-p-zeile:hover { background: var(--flaeche-2); }
.px-protokoll[open] { background: var(--flaeche-2); }
.px-p-zeile { list-style: none; cursor: pointer; padding: 9px 10px; display: grid; grid-template-columns: 56px minmax(90px, 1fr) 52px minmax(0, 2fr) 24px 14px; align-items: center; gap: 10px; font-weight: 500; font-size: 13px; }
.px-p-zeile::-webkit-details-marker { display: none; }
.px-p-zeile::after { content: "›"; justify-self: end; color: var(--muted-2); font-size: 17px; line-height: 1; transform: rotate(90deg); transition: transform 0.15s; }
.px-protokoll[open] .px-p-zeile::after { transform: rotate(-90deg); }
.px-p-datum { color: var(--muted); font-size: 12px; white-space: nowrap; }
.px-p-datum small { display: block; color: var(--muted-2); font-size: 10px; font-variant-numeric: tabular-nums; }
.px-p-fl { font-weight: 600; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.px-p-dauer { color: var(--muted); font-size: 12.5px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.px-p-kurz { color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.px-p-note { justify-self: center; display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: color-mix(in srgb, var(--f) 18%, transparent); color: var(--f); font-weight: 700; font-size: 12px; font-variant-numeric: tabular-nums; }
.px-p-note.ohne { background: transparent; color: var(--muted-2); font-weight: 500; }
.px-protokoll-inhalt { padding: 2px 12px 12px; border-top: 1px solid var(--linie); display: grid; gap: 6px; font-size: 13.5px; }
.px-meta { margin: 0; color: var(--muted); font-size: 12.5px; }
.px-zeile { margin: 0; display: grid; grid-template-columns: 110px minmax(0, 1fr); gap: 8px; }
.px-zeile > span:first-child { color: var(--muted); font-size: 12.5px; }
.px-haken { display: flex; flex-wrap: wrap; gap: 4px 10px; }
.px-haken i { font-style: normal; color: var(--gruen); font-weight: 600; }
.px-bereiche-chips { display: flex; flex-wrap: wrap; gap: 4px 8px; }
.px-bereiche-chips i { font-style: normal; font-weight: 600; color: var(--f); }
.px-protokoll-inhalt blockquote { margin: 0; padding: 6px 10px; border-left: 3px solid var(--linie-2); color: var(--ink); font-style: italic; }
.px-vorher summary { cursor: pointer; font-size: 13px; color: var(--muted); }
.px-vorher[open] summary { margin-bottom: 8px; }

/* Dokumentations-Formular (für schnelle Eingabe am Smartphone) */
.px-block { border: 0; border-top: 1px solid var(--linie); margin: 0; padding: 12px 0 0; display: grid; gap: 10px; min-width: 0; }
.px-block legend { font-size: 11.5px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted-2); padding: 0 0 6px; }
.px-block legend small { text-transform: none; letter-spacing: 0; font-weight: 500; margin-left: 6px; }
.pflicht { color: var(--rot); text-decoration: none; font-weight: 700; }
.px-felder { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); align-items: start; }
.px-chip { min-height: 38px; padding: 6px 13px; font-size: 13.5px; }
.px-chip[aria-pressed="true"] { --f: var(--navy); background: var(--navy); color: #fff; border-color: var(--navy); }
.px-chip[aria-pressed="true"]::before { content: "✓"; font-weight: 700; color: var(--amber); }
.px-dauer { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.px-dauer .px-chip { padding: 6px 10px; }
.px-dauer .px-chip::after { content: " Min."; font-weight: 500; }
.px-dauer output { font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; }
.px-gruppe { display: grid; gap: 6px; }
.px-gruppe > span { font-size: 13px; font-weight: 700; }
.px-skala { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; }
.px-skala button, .px-note button { border: 1px solid var(--linie-2); background: var(--flaeche); border-radius: 8px; font-weight: 600; }
.px-skala button { min-height: 58px; padding: 6px 4px; display: grid; gap: 1px; place-content: center; font-size: 12px; line-height: 1.2; color: var(--muted); }
.px-skala button b { font-family: var(--display); font-size: 18px; color: var(--ink); }
.px-skala button[aria-checked="true"], .px-note button[aria-checked="true"] { background: var(--navy); border-color: var(--navy); color: #fff; }
.px-skala button[aria-checked="true"] b { color: var(--amber); }
.px-bereiche summary { cursor: pointer; font-size: 13px; font-weight: 600; color: var(--muted); padding: 6px 0; }
.px-note { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 8px; padding: 4px 0; border-bottom: 1px solid var(--linie); font-size: 13.5px; }
.px-note > div { display: flex; gap: 4px; }
.px-note button { width: 38px; height: 38px; }
.px-text { position: relative; }
.px-text textarea { padding-right: 46px; resize: vertical; }
.px-mic { position: absolute; right: 6px; top: 6px; }
.px-mic.an { color: var(--rot); background: var(--rot-bg); }
.px-fuss { position: sticky; bottom: -20px; margin: 0 -20px -20px; padding: 12px 20px; background: var(--flaeche); border-top: 1px solid var(--linie); display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; }
@media (min-width: 640px) { .px-fuss { bottom: -24px; margin: 0 -24px -24px; padding: 12px 24px; } }
.px-status { margin: 0; font-size: 12.5px; color: var(--muted); }
.px-status[data-art="ok"] { color: var(--gruen); }
.px-status[data-art="fehler"] { color: var(--rot); font-weight: 600; }
@media (pointer: coarse) { .px-chip { min-height: 44px; } .px-note button { width: 44px; height: 44px; } }
@media (max-width: 520px) {
  .px-kpis { gap: 6px; }
  .px-kpis > div { padding: 8px; }
  .px-kpis > div > span:first-child { font-size: 9.5px; letter-spacing: 0.02em; overflow-wrap: anywhere; }
  .px-kpis b { font-size: 22px; }
  .px-felder { grid-template-columns: 1fr 1fr; }
  .px-skala { grid-template-columns: repeat(5, minmax(0, 1fr)); }
  .px-skala button { font-size: 10.5px; min-height: 62px; }
  .px-eckdaten { grid-template-columns: 1fr; }
  .px-eckdaten > div + div { border-left: 0; border-top: 1px solid var(--linie); }
  .px-eckdaten > div { display: flex; justify-content: space-between; gap: 10px; }
  .px-timeline li.px-offen { grid-template-columns: 40px minmax(0, 1fr) auto; grid-template-areas: "datum fl knopf" "datum kurz knopf"; row-gap: 2px; }
  .px-offen .px-p-datum { grid-area: datum; }
  .px-offen .px-p-fl { grid-area: fl; }
  .px-offen .px-p-kurz { grid-area: kurz; }
  .px-offen .knopf { grid-area: knopf; }
  .px-zeile { grid-template-columns: 1fr; gap: 0; }
  .fl-zustaendig { grid-template-columns: 1fr; gap: 6px; }
  .px-p-zeile { grid-template-columns: 40px minmax(0, 1fr) 22px; grid-template-areas: "datum fl note" "dauer kurz kurz"; row-gap: 3px; }
  .px-p-datum { grid-area: datum; }
  .px-p-fl { grid-area: fl; }
  .px-p-note { grid-area: note; }
  .px-p-dauer { grid-area: dauer; }
  .px-p-kurz { grid-area: kurz; font-size: 12.5px; color: var(--muted); }
  .px-p-zeile::after { display: none; }
}

/* Termin-Dialog: Kontakt suchen */
.ksuche { position: relative; }
.ksuche-liste { position: absolute; z-index: 5; left: 0; right: 0; top: calc(100% + 4px); margin: 0; padding: 4px; list-style: none; background: var(--flaeche); border: 1px solid var(--linie-2); border-radius: 10px; box-shadow: var(--schatten-gross); max-height: 300px; overflow-y: auto; }
.ksuche-liste li[data-k] { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 7px; cursor: pointer; min-height: 44px; }
.ksuche-liste li[aria-selected="true"], .ksuche-liste li[data-k]:hover { background: var(--flaeche-3); }
.ksuche-liste li b { display: block; font-size: 14px; }
.ksuche-liste li small { display: block; font-size: 12px; color: var(--muted); }
.ksuche-liste .av { width: 30px; height: 30px; font-size: 11px; flex: none; }
.ksuche-liste .leer { padding: 10px; font-size: 13px; color: var(--muted); }
/* Touch: Termin „angehoben“ nach kurzem Halten */
.ev[data-zieh] { -webkit-touch-callout: none; -webkit-user-select: none; user-select: none; }
.ev.angehoben { transform: scale(1.03); box-shadow: 0 10px 24px -8px rgb(10 16 32 / 0.45); z-index: 6; }

/* ================= Theorie ================= */
.ev.theorie { border-left-width: 6px; background-image: linear-gradient(90deg, color-mix(in srgb, var(--f) 10%, transparent), transparent 60%); }
.zurueck { display: inline-flex; align-items: center; gap: 4px; color: var(--muted); text-decoration: none; font-weight: 600; font-size: 13.5px; margin-bottom: 10px; min-height: 32px; }
.zurueck:hover { color: var(--ink); }
a.eintrag { color: inherit; text-decoration: none; }
.hinweis.ok { background: var(--gruen-bg); color: var(--gruen); border-color: color-mix(in srgb, var(--gruen) 25%, transparent); }

/* Kennzahlen */
.th-kz { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 10px; margin-bottom: 14px; }
.th-kz button { display: grid; gap: 2px; text-align: left; background: var(--flaeche); border: 1px solid var(--linie); border-radius: var(--r-karte); padding: 12px 14px; box-shadow: var(--schatten); border-top: 3px solid var(--f, var(--amber)); }
.th-kz button:nth-child(1) { --f: #0891b2; } .th-kz button:nth-child(2) { --f: #d97706; } .th-kz button:nth-child(3) { --f: var(--gruen); } .th-kz button:nth-child(4) { --f: var(--blau); } .th-kz button:nth-child(5) { --f: #be123c; }
.th-kz button:hover { border-color: var(--linie-2); }
.th-kz button[aria-expanded="true"] { background: color-mix(in srgb, var(--f) 8%, var(--flaeche)); box-shadow: 0 0 0 2px var(--f) inset; }
.th-kz b { font-family: var(--display); font-size: 28px; line-height: 1.1; font-weight: 600; font-variant-numeric: tabular-nums; }
.th-kz span { font-weight: 600; font-size: 13.5px; }
.th-kz small { font-size: 12px; color: var(--muted); }
.th-kz-liste { padding: 14px; margin-bottom: 16px; }
.th-kz-liste h2 { font-family: var(--display); font-size: 16px; letter-spacing: 0.03em; text-transform: uppercase; margin-bottom: 10px; display: flex; justify-content: space-between; align-items: baseline; }
.th-kz-liste h2 button { font-family: var(--schrift); font-size: 12.5px; text-transform: none; letter-spacing: 0; }
.th-kz-liste .liste { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }

/* Heute / Demnächst */
.th-raster { display: grid; gap: 16px; margin-bottom: 18px; align-items: start; }
@media (min-width: 1000px) { .th-raster { grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); } }
.th-spalte { display: grid; gap: 10px; min-width: 0; }
.th-h2 { font-family: var(--display); font-size: 16px; letter-spacing: 0.03em; text-transform: uppercase; display: flex; gap: 8px; align-items: baseline; }
.th-h2 .n { font-family: var(--schrift); font-size: 13px; color: var(--muted-2); }
.th-h2.warn { color: var(--warn); margin-top: 6px; }
.th-leer { padding: 18px; }
.th-heute { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 14px; align-items: center; background: var(--flaeche); border: 1px solid var(--linie); border-left: 5px solid var(--f); border-radius: var(--r-karte); padding: 14px 16px; box-shadow: var(--schatten); }
.th-h-zeit { display: grid; font-family: var(--mono); font-variant-numeric: tabular-nums; text-align: center; }
.th-h-zeit b { font-size: 20px; font-weight: 500; }
.th-h-zeit span { font-size: 12.5px; color: var(--muted); }
.th-h-text { display: grid; gap: 4px; min-width: 0; justify-items: start; }
.th-h-text > b { font-size: 16px; line-height: 1.3; }
.th-h-text > span { font-size: 13px; color: var(--muted); }
.th-heute .knopf { min-height: 48px; padding: 10px 18px; }
@media (max-width: 560px) { .th-heute { grid-template-columns: auto minmax(0, 1fr); } .th-heute .knopf { grid-column: 1 / -1; width: 100%; } }
.th-spalte .agenda-zeit { line-height: 1.35; text-align: center; min-width: 76px; }

/* Alle Stunden */
.th-alle { overflow: hidden; }
.th-alle-kopf { padding: 14px 14px 0; }
.th-filter { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; padding: 12px 14px; border-bottom: 1px solid var(--linie); }
.th-filter label { display: grid; gap: 4px; font-size: 12px; font-weight: 600; color: var(--muted); min-width: 0; }
.th-filter input, .th-filter select { min-height: 38px; border: 1px solid var(--linie-2); border-radius: var(--r-control); background: var(--flaeche); padding: 6px 8px; font-size: 13.5px; color: var(--ink); width: 100%; min-width: 0; }
.th-tabelle-rahmen { overflow-x: auto; }
.th-tabelle { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.th-tabelle th { text-align: left; font-size: 11.5px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted-2); padding: 10px 14px; border-bottom: 1px solid var(--linie); white-space: nowrap; }
.th-tabelle td { padding: 10px 14px; border-bottom: 1px solid var(--linie); white-space: nowrap; }
.th-tabelle td:nth-child(3) { white-space: normal; min-width: 220px; }
.th-tabelle tbody tr { cursor: pointer; }
.th-tabelle tbody tr:hover, .th-tabelle tbody tr:focus-visible { background: var(--flaeche-2); }
.th-tabelle tr.abgesagt td { color: var(--muted-2); }
.th-tabelle tr.abgesagt b { text-decoration: line-through; }
.th-tabelle .punkt-f { display: inline-block; vertical-align: middle; }
@media (max-width: 760px) {
  .th-tabelle thead { display: none; }
  .th-tabelle, .th-tabelle tbody, .th-tabelle tr, .th-tabelle td { display: block; width: 100%; }
  .th-tabelle tr { padding: 10px 14px; border-bottom: 1px solid var(--linie); display: grid; grid-template-columns: 1fr 1fr; gap: 2px 12px; }
  .th-tabelle td { border: 0; padding: 0; white-space: normal; min-width: 0 !important; }
  .th-tabelle td:nth-child(3), .th-tabelle td:nth-child(7) { grid-column: 1 / -1; }
  .th-tabelle td::before { content: attr(data-l) ": "; color: var(--muted-2); font-size: 12px; }
  .th-tabelle td:nth-child(3)::before, .th-tabelle td:nth-child(7)::before { content: none; }
}

/* Eine Theoriestunde */
.th-seite { display: grid; gap: 14px; max-width: 980px; margin: 0 auto; }
.th-seite > .zurueck { margin-bottom: -4px; justify-self: start; }
.th-kopf { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; align-items: flex-start; }
.th-kopf-text { display: grid; gap: 4px; min-width: 0; }
.th-ueber { font-size: 12px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: #0891b2; }
.th-meta { color: var(--muted); display: flex; flex-wrap: wrap; align-items: center; gap: 4px; }
.th-kopf .tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 2px; }
.th-notiz-anzeige { background: var(--flaeche); border: 1px solid var(--linie); border-radius: var(--r-control); padding: 8px 12px; font-size: 13.5px; white-space: pre-line; }
.th-ergebnis ul { margin: 6px 0 0; padding-left: 18px; columns: 2 220px; }
.th-leiste { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: space-between; padding: 14px; border-bottom: 1px solid var(--linie); }
.th-zahlen { display: flex; flex-wrap: wrap; gap: 6px; align-items: baseline; font-size: 14px; }
.th-zahlen > b { font-family: var(--display); font-size: 24px; font-weight: 600; }
.th-z { font-size: 12.5px; font-weight: 700; padding: 2px 8px; border-radius: 999px; background: color-mix(in srgb, var(--f) 13%, transparent); color: color-mix(in srgb, var(--f) 85%, #000); }
[data-a="anwesend"] { --f: #0f8a4f; } [data-a="abwesend"] { --f: #c0262d; } [data-a="entschuldigt"] { --f: #d97706; } [data-a="offen"] { --f: #7a8497; } [data-a="abgesagt"] { --f: #8b8d93; }
.th-massen { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.th-alle-an { min-height: 52px; padding: 12px 22px; font-size: 16px; }
.th-tn-liste { list-style: none; margin: 0; padding: 0; }
.th-tn { display: grid; grid-template-columns: minmax(0, 1fr) 120px auto auto; grid-template-areas: "name fort seg extra" "notiz notiz notiz notiz"; gap: 6px 12px; align-items: center; padding: 10px 14px; border-bottom: 1px solid var(--linie); border-left: 4px solid color-mix(in srgb, var(--f) 70%, transparent); }
.th-tn[data-a="offen"] { border-left-color: var(--linie-2); }
.th-name { grid-area: name; display: flex; gap: 10px; align-items: center; border: 0; background: none; padding: 0; text-align: left; min-width: 0; min-height: 44px; }
.th-name-text { display: grid; min-width: 0; }
.th-name-text b, .th-name-text small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.th-name-text small { font-size: 12px; color: var(--muted); }
.th-name-text em { color: var(--warn); font-style: normal; }
.th-fort { grid-area: fort; display: flex; gap: 6px; align-items: center; font-size: 12.5px; font-variant-numeric: tabular-nums; }
.th-fort .balken, .bk-z .balken, .blick .balken, .th-kpis .balken { flex: 1; min-width: 30px; }
.th-seg { grid-area: seg; display: inline-flex; background: var(--flaeche-3); padding: 3px; border-radius: 10px; gap: 3px; }
.th-seg button { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; min-width: 44px; padding: 6px 12px; border: 0; border-radius: 8px; background: transparent; color: var(--muted); font-weight: 600; font-size: 13.5px; }
.th-seg button i { font-style: normal; font-weight: 800; font-size: 15px; width: 18px; text-align: center; }
.th-seg button:hover:not(:disabled) { color: var(--ink); background: var(--flaeche); }
.th-seg button[aria-checked="true"] { background: var(--f); color: #fff; box-shadow: 0 1px 3px rgb(10 16 32 / 0.2); }
.th-seg button:disabled { cursor: default; }
.th-seg button:disabled:not([aria-checked="true"]) { opacity: 0.45; }
.th-extra { grid-area: extra; display: flex; gap: 4px; }
.th-extra .icon { width: 40px; height: 40px; }
.th-extra .icon[aria-pressed="true"] { color: var(--blau); border-color: var(--blau); }
.th-tn-notiz { grid-area: notiz; min-height: 40px; padding: 8px 11px; border: 1px solid var(--linie-2); border-radius: var(--r-control); background: var(--flaeche); width: 100%; }
.th-leer-tn { padding: 18px 14px; color: var(--muted); }
@media (max-width: 760px) {
  .th-tn { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "name extra" "fort fort" "seg seg" "notiz notiz"; }
  .th-seg { width: 100%; }
  .th-seg button { flex: 1; justify-content: center; padding: 6px 4px; }
}
@media (max-width: 420px) { .th-seg button span { font-size: 12px; } }
.th-hinzu-leiste { padding: 12px 14px; }
.th-hinzu { padding: 0 14px 14px; display: grid; gap: 10px; }
.th-hinzu .suche { flex: none; max-width: 520px; }
.th-hinzu .suche input { min-height: 44px; }
.th-hinzu-kopf { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.th-wahl { margin-top: 16px; border-top: 1px solid var(--linie); padding-top: 12px; display: grid; gap: 8px; }
.th-wahl-kopf { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; }
.th-wahl-kopf h3 { margin: 0; font-size: 15px; }
.th-wahl-kopf .link-knopf { margin-left: auto; }
.th-wahl-liste { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); max-height: 260px; overflow-y: auto; }
.th-wahl-liste .check { align-items: center; border: 1px solid var(--linie); border-radius: 8px; padding: 7px 10px; min-height: 48px; background: var(--flaeche); cursor: pointer; }
.th-wahl-liste .check:has(input:checked) { border-color: var(--navy); background: color-mix(in srgb, var(--navy) 5%, var(--flaeche)); }
.th-wahl-text { display: grid; min-width: 0; }
.th-wahl-text b, .th-wahl-text small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.th-wahl-text small { font-size: 12px; color: var(--muted); }
.th-wahl-mehr summary { cursor: pointer; font-size: 13px; font-weight: 600; padding: 4px 0; }
.th-wahl-mehr .th-wahl-liste { margin-top: 6px; }
.th-kand { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); max-height: 360px; overflow-y: auto; }
.th-kand button { width: 100%; display: flex; gap: 10px; align-items: center; text-align: left; border: 1px solid var(--linie); background: var(--flaeche); border-radius: 8px; padding: 8px 10px; min-height: 52px; }
.th-kand button:hover { border-color: var(--amber-dunkel); background: color-mix(in srgb, var(--amber) 8%, var(--flaeche)); }
.th-kand-text { display: grid; min-width: 0; flex: 1; }
.th-kand-text b, .th-kand-text small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.th-kand-text small { font-size: 12px; color: var(--muted); }
.th-plus { color: var(--amber-dunkel); }
.th-abschluss { position: sticky; bottom: 0; z-index: 10; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px 12px; align-items: center; background: var(--flaeche); border: 1px solid var(--linie); border-radius: var(--r-karte); padding: 12px 14px; box-shadow: 0 -8px 24px -12px rgb(10 16 32 / 0.25); }
.th-abschluss textarea { min-height: 48px; padding: 12px; border: 1px solid var(--linie-2); border-radius: var(--r-control); background: var(--flaeche); resize: vertical; width: 100%; }
.th-abschluss p { grid-column: 1 / -1; }
.th-fertig { min-height: 52px; padding: 12px 22px; font-size: 16px; }
@media (max-width: 560px) { .th-abschluss { grid-template-columns: 1fr; margin: 0 -8px; border-radius: 12px 12px 0 0; } .th-fertig { width: 100%; } }
.th-protokoll { padding: 12px 14px; }
.th-protokoll summary { font-weight: 600; cursor: pointer; }
.th-protokoll ol { list-style: none; margin: 10px 0; padding: 0; display: grid; gap: 6px; }
.th-protokoll li { display: grid; grid-template-columns: 120px minmax(0, 1fr) auto; gap: 10px; font-size: 13px; }
.th-protokoll time { font-family: var(--mono); font-size: 12px; color: var(--muted); }
.th-protokoll small { color: var(--muted); }
@media (max-width: 560px) { .th-protokoll li { grid-template-columns: 1fr; gap: 0; } }
.th-bilanz { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.th-bilanz div { background: var(--flaeche-2); border-radius: 10px; padding: 12px; display: grid; text-align: center; border-top: 3px solid var(--f, var(--navy)); }
.th-bilanz b { font-family: var(--display); font-size: 30px; font-weight: 600; }
.th-bilanz span { font-size: 12.5px; color: var(--muted); }

/* Board-Karte: Theorie + Praxis parallel */
.bk-fort { margin-top: 8px; display: grid; gap: 4px; font-size: 12px; }
.bk-z { display: flex; align-items: center; gap: 6px; }
.bk-z > span:first-child { width: 48px; flex: none; font-size: 10.5px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted-2); }
.bk-z b { font-variant-numeric: tabular-nums; }
.bk-z em { font-style: normal; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bk-pr { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 2px; }
.bk-pr .tag { font-size: 10.5px; }

/* Kartei: Reiter */
.schublade-kopf { flex-wrap: wrap; }
.schublade-kopf:has(.s-tabs) { padding-bottom: 0; }
.s-tabs { flex-basis: 100%; display: flex; gap: 2px; overflow-x: auto; margin: 4px -4px 0; scrollbar-width: none; }
.s-tabs button { border: 0; background: none; padding: 10px 12px; font-weight: 600; color: var(--muted); border-bottom: 2px solid transparent; white-space: nowrap; min-height: 44px; }
.s-tabs button:hover { color: var(--ink); }
.s-tabs button[aria-selected="true"] { color: var(--ink); border-bottom-color: var(--amber); }
.s-panel { display: grid; gap: 20px; min-width: 0; grid-template-columns: minmax(0, 1fr); }
.blick { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.blick button { display: grid; gap: 3px; align-content: start; text-align: left; background: var(--flaeche-2); border: 1px solid var(--linie); border-radius: 10px; padding: 10px 12px; min-width: 0; }
.blick button:hover { border-color: var(--linie-2); }
.blick span { font-size: 11px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted-2); }
.blick b { font-family: var(--display); font-size: 22px; font-weight: 600; line-height: 1.15; }
.blick b small { font-family: var(--schrift); font-size: 13px; font-weight: 500; color: var(--muted); }
.blick b.blick-text { font-family: var(--schrift); font-size: 14px; font-weight: 700; color: color-mix(in srgb, var(--f) 85%, #000); }
.blick small { font-size: 12px; color: var(--muted); }
.th-kpis { grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); }
.th-lp { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); }
.th-lp li { display: grid; grid-template-columns: 22px minmax(0, 1fr) auto; gap: 8px; align-items: center; padding: 5px 8px; border-radius: 7px; background: var(--flaeche-2); font-size: 13px; }
.th-lp li > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.th-lp li.an { background: color-mix(in srgb, var(--gruen) 7%, var(--flaeche)); }
.th-lp li > i { width: 22px; height: 22px; border-radius: 6px; display: grid; place-items: center; font-style: normal; font-size: 12px; font-weight: 700; border: 1px dashed var(--linie-2); color: var(--muted); }
.th-lp li.an > i { border: 0; background: var(--gruen); color: #fff; }
.th-lp li.an > span { color: var(--ink); }
.th-lp small { font-size: 12px; color: var(--muted); white-space: nowrap; }
.th-hist { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.th-hist li { border-radius: 8px; border-left: 3px solid var(--f); background: color-mix(in srgb, var(--f) 6%, var(--flaeche)); }
.th-hist button { width: 100%; display: grid; grid-template-columns: 18px 44px minmax(0, 1fr); gap: 10px; align-items: center; padding: 7px 10px; border: 0; background: none; text-align: left; border-radius: 8px; }
.th-hist button:hover { background: color-mix(in srgb, var(--f) 8%, transparent); }
.th-hist time { font: 500 12.5px var(--mono); color: var(--muted); }
.th-hist b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.th-hist i { font-style: normal; font-weight: 800; color: var(--f); text-align: center; font-size: 15px; }
.th-hist b { display: block; font-size: 13.5px; }
.th-hist small { display: block; font-size: 12px; color: var(--muted); }
@media (max-width: 480px) { .th-lp { grid-template-columns: 1fr; } }

/* Prüfungen */
.pr-schritte { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; counter-reset: pr; }
.pr-schritte li { counter-increment: pr; font-size: 11.5px; font-weight: 600; color: var(--muted-2); padding-top: 8px; border-top: 4px solid var(--flaeche-3); }
.pr-schritte li::before { content: counter(pr) ". "; }
.pr-schritte li.fertig { border-top-color: var(--gruen); color: var(--ink); }
.pr-schritte li.jetzt { border-top-color: var(--amber); color: var(--ink); }
.pr-schritte li.rot { border-top-color: var(--rot); }
.pr-status { display: grid; gap: 2px; padding: 10px 12px; border-radius: 8px; border-left: 4px solid var(--f); background: color-mix(in srgb, var(--f) 9%, var(--flaeche)); }
.pr-status span { font-size: 13px; color: var(--muted); }
.knopf.pr-gut { background: var(--gruen); color: #fff; }
.knopf.pr-gut:hover { background: color-mix(in srgb, var(--gruen) 85%, #000); }
.pr-verlauf li { font-size: 13px; }

/* Lehrplan-Dialog */
.lp-summe { font-size: 13px; background: var(--flaeche-2); border-radius: 8px; padding: 8px 10px; line-height: 1.6; }
.lp-kopf, .lp-zeile { display: grid; grid-template-columns: 58px minmax(0, 2.2fr) minmax(0, 1.1fr) minmax(0, 1.4fr) 44px 36px; gap: 6px; align-items: center; }
.lp-kopf { font-size: 11px; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase; color: var(--muted-2); }
.lp-liste { display: grid; gap: 6px; max-height: 52vh; overflow-y: auto; }
.lp-zeile input:not([type="checkbox"]), .lp-zeile select { min-height: 36px; padding: 6px 8px; border: 1px solid var(--linie-2); border-radius: var(--r-control); background: var(--flaeche); width: 100%; min-width: 0; font-size: 13.5px; }
.lp-zeile.aus input:not([type="checkbox"]), .lp-zeile.aus select { color: var(--muted-2); background: var(--flaeche-2); }
.lp-aktiv { display: grid; place-items: center; }
.lp-aktiv input { width: 18px; height: 18px; accent-color: var(--navy); }
.lp-zeile .icon { width: 32px; height: 32px; }
@media (max-width: 640px) {
  .lp-kopf { display: none; }
  .lp-zeile { grid-template-columns: 58px minmax(0, 1fr) 36px; padding: 8px; border: 1px solid var(--linie); border-radius: 8px; }
  .lp-zeile [data-lp="kategorie"], .lp-zeile [data-lp="klassen"] { grid-column: 1 / -1; }
  .lp-zeile [data-lp="titel"] { grid-column: 2 / 4; }
}

/* Board: versteckte Beschriftungen (.sr) bleiben in ihrer Karte statt die Seite seitlich zu verbreitern */
.bk { position: relative; }
/* Karten: kein content-visibility – geschätzte Höhen ändern sich beim Scrollen und lassen das Board springen */
/* Kopfleiste mit drei Bereichen: auf Tablets zweizeilig */
@media (max-width: 1180px) {
  .kopf-in { flex-wrap: wrap; gap: 10px; }
  .kopf-rechts { order: 2; }
  .tabs { order: 3; width: 100%; }
}

/* Theorie und Praxis parallel + Bewertungssystem */
.bs-kopf small { display: inline; margin-left: 2px; font-size: 10px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted-2); order: 3; }
.bs-kopf .n { order: 4; }
.bk-auch { margin: 6px 0 0 !important; font-size: 11.5px; font-weight: 600; color: #6d28d9; }
.ampel { font-style: normal; font-size: 11px; font-weight: 800; padding: 1px 6px; border-radius: 999px; white-space: nowrap; margin-left: auto; background: color-mix(in srgb, var(--f) 14%, transparent); color: color-mix(in srgb, var(--f) 85%, #000); font-variant-numeric: tabular-nums; }
.bw-raster { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
@media (max-width: 480px) { .bw-raster { grid-template-columns: 1fr; } }
.bw { display: grid; gap: 5px; align-content: start; text-align: left; background: color-mix(in srgb, var(--f) 6%, var(--flaeche)); border: 1px solid color-mix(in srgb, var(--f) 30%, var(--linie)); border-left: 4px solid var(--f); border-radius: 10px; padding: 10px 12px; min-width: 0; width: 100%; }
.bw:hover { border-color: var(--f); }
.bw-kopf { display: flex; justify-content: space-between; gap: 8px; align-items: baseline; }
.bw-kopf > span { font-size: 11px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted-2); }
.bw-kopf em { font-style: normal; font-size: 12px; font-weight: 700; color: color-mix(in srgb, var(--f) 85%, #000); white-space: nowrap; }
.bw > b { font-family: var(--display); font-size: 28px; font-weight: 600; line-height: 1.1; }
.bw > b small { font-family: var(--schrift); font-size: 14px; color: var(--muted); }
.bw > small { font-size: 12.5px; color: var(--ink); line-height: 1.4; }
.status-spur { font-size: 12px; font-weight: 700; color: var(--muted); margin-top: 2px; }
.status-spur small { font-weight: 500; color: var(--muted-2); }
.per-chat { display: inline-flex; align-items: center; gap: 3px; color: #2563eb; font-weight: 600; }

/* Aufbauseminar & DRK-Lehrgang */
.ku-liste { display: grid; gap: 8px; margin-bottom: 18px; }
.th-h2 + .ku-liste, .th-h2 + .leer { margin-top: 8px; }
.ku-karte { display: grid; grid-template-columns: 58px minmax(0, 1fr) 150px auto; gap: 14px; align-items: center; padding: 12px 16px; color: inherit; text-decoration: none; border-left: 4px solid var(--f); }
.ku-karte:hover { border-color: var(--linie-2); border-left-color: var(--f); box-shadow: 0 4px 14px rgb(10 16 32 / 0.08); }
.ku-karte.abgesagt { opacity: 0.6; }
.ku-tag { display: grid; justify-items: center; line-height: 1.15; }
.ku-tag b { font-family: var(--display); font-size: 19px; }
.ku-tag span { font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.05em; }
.ku-text { display: grid; gap: 2px; min-width: 0; }
.ku-text b { font-size: 15px; }
.ku-text span { font-size: 13px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ku-text span:empty { display: none; }
.ku-belegung { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 8px; align-items: center; font-variant-numeric: tabular-nums; }
.ku-belegung b { font-size: 13.5px; }
.ku-belegung small { grid-column: 1 / -1; font-size: 12px; color: var(--muted); }
@media (max-width: 640px) {
  .ku-karte { grid-template-columns: 48px minmax(0, 1fr); gap: 8px 12px; }
  .ku-belegung { grid-column: 2; }
  .ku-karte > .tag { grid-column: 2; justify-self: start; }
}
.ku-termine ol { margin: 0; padding: 12px 16px; list-style: none; display: flex; flex-wrap: wrap; gap: 6px 20px; font-size: 13.5px; }
.ku-termine b { color: var(--muted); font-weight: 600; }
.ku-tn-liste { list-style: none; margin: 0; padding: 0; }
.ku-tn { display: grid; grid-template-columns: minmax(0, 1fr) auto auto auto 40px; gap: 6px 14px; align-items: center; padding: 8px 14px; border-bottom: 1px solid var(--linie); }
.ku-tn .th-seg, .ku-tn .th-name { grid-area: auto; }
.ku-seg button[data-a="anwesend"] { --f: var(--gruen); }
.ku-seg button[data-a="abwesend"] { --f: var(--rot); }
.ku-check { align-items: center; white-space: nowrap; min-height: 44px; cursor: pointer; }
.ku-weg { width: 40px; height: 40px; }
@media (max-width: 860px) {
  .ku-tn { grid-template-columns: minmax(0, 1fr) auto; }
  .ku-tn .th-name { grid-column: 1; }
  .ku-tn .ku-weg { grid-column: 2; grid-row: 1; }
  .ku-tn .ku-seg { grid-column: 1 / -1; width: 100%; }
  .ku-tn .ku-seg button { flex: 1; justify-content: center; }
  .ku-tn .ku-check { grid-column: auto; }
}
.ku-extern { border: 1px dashed var(--linie-2); border-radius: 10px; padding: 8px 12px; max-width: 620px; }
.ku-extern summary { cursor: pointer; font-weight: 600; font-size: 13.5px; min-height: 32px; display: flex; align-items: center; }
.ku-extern[open] { display: grid; gap: 10px; padding-bottom: 12px; }
.ku-extern .knopf { justify-self: start; }
.ku-terminliste { display: grid; gap: 6px; }
.ku-termin { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.ku-termin input { min-height: 40px; padding: 6px 9px; border: 1px solid var(--linie-2); border-radius: var(--r-control); background: var(--flaeche); }
.ku-termin input[type="date"] { flex: 1 1 150px; }
.ku-termin input[type="time"] { width: 104px; }
.ku-nr { width: 22px; color: var(--muted); font-weight: 600; font-size: 13px; }
.ku-terminliste + .knopf { justify-self: start; margin-top: 4px; }

/* ---- Kartei eines Fahrschülers: Ausbildungsstand (Theorie/Praxis) und „Absolviert“ ---- */
.spur-raster { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
@media (max-width: 520px) { .spur-raster { grid-template-columns: 1fr; } }
.spur { display: grid; gap: 10px; align-content: start; text-align: left; width: 100%; min-width: 0; padding: 12px 14px; border-radius: 10px; background: var(--flaeche); border: 1px solid var(--linie); border-top: 4px solid var(--f); box-shadow: var(--schatten); }
.spur:hover { border-color: var(--linie-2); border-top-color: var(--f); }
.spur-kopf { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.spur-kopf > span { font-family: var(--display); font-size: 17px; font-weight: 600; letter-spacing: 0.03em; text-transform: uppercase; }
.spur-kopf em { font-style: normal; font-size: 12.5px; font-weight: 700; padding: 2px 9px; border-radius: 999px; background: color-mix(in srgb, var(--f) 13%, transparent); color: color-mix(in srgb, var(--f) 80%, #000); text-align: right; }
.spur-schritte { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 4px; }
.spur-schritte li { font-size: 10.5px; font-weight: 600; line-height: 1.25; color: var(--muted-2); padding-top: 6px; border-top: 4px solid var(--flaeche-3); }
.spur-schritte li.fertig { border-top-color: var(--gruen); color: var(--muted); }
.spur-schritte li.jetzt { border-top-color: var(--amber); color: var(--ink); }
.spur-schritte li.rot { border-top-color: var(--rot); color: var(--rot); }
.spur-zahl { display: grid; gap: 5px; }
.spur-zahl b { font-family: var(--display); font-size: 26px; font-weight: 600; line-height: 1.1; font-variant-numeric: tabular-nums; }
.spur-zahl b small { font-family: var(--schrift); font-size: 13px; font-weight: 500; color: var(--muted); }
.spur > small { font-size: 12.5px; color: var(--ink); border-top: 1px solid var(--linie); padding-top: 8px; }
.abs-liste { list-style: none; margin: 0; padding: 0; display: grid; border: 1px solid var(--linie); border-radius: 10px; overflow: hidden; }
.abs-liste li + li { border-top: 1px solid var(--linie); }
.abs-liste button { width: 100%; display: grid; grid-template-columns: 46px 64px minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 7px 10px; border: 0; background: var(--flaeche); text-align: left; font-size: 13.5px; color: var(--ink); min-height: 40px; }
.abs-liste button:not(:disabled):hover { background: var(--flaeche-2); }
.abs-liste button:disabled { cursor: default; }
.abs-liste time { font: 500 12.5px var(--mono); color: var(--muted); }
.abs-art { justify-self: start; font-size: 11px; font-weight: 700; padding: 1px 7px; border-radius: 999px; background: color-mix(in srgb, var(--f) 13%, transparent); color: color-mix(in srgb, var(--f) 80%, #000); }
.abs-titel { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.abs-titel small { font-weight: 500; color: var(--muted); font-size: 12px; }
.abs-titel small.warn { color: var(--warn); font-weight: 600; }
.abs-mehr summary { cursor: pointer; font-size: 13px; font-weight: 600; color: var(--muted); padding: 2px 0; }
.abs-mehr[open] summary { margin-bottom: 6px; }
.abs-mehr .abs-liste li:first-child { border-top: 0; }
@media (max-width: 420px) { .abs-liste button { grid-template-columns: 42px minmax(0, 1fr) auto; } .abs-art { display: none; } .abs-liste li { border-left: 3px solid var(--f); } }
.stand-aendern { border: 1px solid var(--linie); border-radius: 10px; padding: 10px 12px; }
.stand-aendern > summary { cursor: pointer; font-size: 13px; font-weight: 600; color: var(--muted); }
.stand-aendern[open] > summary { margin-bottom: 10px; }
.stand-aendern + .stand-aendern { margin-top: -8px; }

/* Admin-Zugang */
.admin-marke { background: var(--amber); color: var(--navy); font-weight: 800; font-size: 11.5px; letter-spacing: 0.08em; text-transform: uppercase; border-radius: 999px; padding: 3px 9px; white-space: nowrap; }
.admin-wechsel { color: #f3f5f9; border-color: rgb(255 255 255 / 0.25); background: transparent; white-space: nowrap; }
.admin-wechsel:hover { border-color: var(--amber); color: #fff; }
body.admin-ansicht .kopf { box-shadow: inset 0 -3px 0 var(--amber); }
.admin-auswahl { max-width: 640px; }
.admin-liste { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.admin-konto { width: 100%; display: flex; gap: 12px; align-items: center; text-align: left; border: 1px solid var(--linie); background: var(--flaeche); border-radius: 10px; padding: 10px 12px; min-height: 60px; color: inherit; }
.admin-konto:hover, .admin-konto:focus-visible { border-color: var(--amber-dunkel); background: color-mix(in srgb, var(--amber) 8%, var(--flaeche)); }
.admin-konto[aria-current="true"] { border-color: var(--navy); }
.admin-konto-text { display: grid; flex: 1; min-width: 0; }
.admin-konto-text b { font-size: 15px; }
.admin-konto-text small { font-size: 12.5px; color: var(--muted); }
.admin-konto-text em { color: var(--warn); font-style: normal; font-weight: 600; }
.admin-pfeil { color: var(--muted-2); }
@media (max-width: 640px) {
  .admin-wechsel { padding: 5px 8px; font-size: 12.5px; }
  .kopf-rechts { min-width: 0; flex-wrap: wrap; justify-content: flex-end; row-gap: 6px; }
  body.admin-ansicht .sync { max-width: 120px; }
}

/* Neu im Kalender: Auswahl am Termin-Knopf */
#neuTermin .pfeil { font-size: 11px; margin-left: -2px; opacity: 0.8; }
.neu-menu { position: fixed; z-index: 70; width: min(580px, calc(100vw - 16px)); background: var(--flaeche); border: 1px solid var(--linie-2); border-radius: 12px; box-shadow: var(--schatten-gross); padding: 12px; overflow-y: auto; overscroll-behavior: contain; animation: hoch 0.12s ease-out; }
.nm-spalten { display: grid; grid-template-columns: 1fr 1fr; gap: 4px 14px; }
.nm-spalte { display: grid; gap: 12px; align-content: start; }
.nm-gruppe { display: grid; gap: 2px; }
.nm-kopf { font-size: 11.5px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted-2); margin: 0 0 2px 8px; }
.nm-eintrag { display: flex; gap: 10px; align-items: center; width: 100%; text-align: left; border: 0; background: none; border-radius: 8px; padding: 7px 8px; min-height: 48px; color: inherit; }
.nm-eintrag:hover, .nm-link:hover { background: color-mix(in srgb, var(--f, var(--navy)) 9%, var(--flaeche)); }
.nm-eintrag:focus-visible, .nm-link:focus-visible { outline: none; background: color-mix(in srgb, var(--f, var(--navy)) 9%, var(--flaeche)); box-shadow: 0 0 0 2px var(--blau) inset; }
.nm-punkt { width: 12px; height: 12px; border-radius: 4px; background: var(--f); flex: none; }
.nm-text { display: grid; min-width: 0; }
.nm-text b { font-size: 14px; }
.nm-text small { font-size: 12px; color: var(--muted); }
.nm-link { display: flex; align-items: center; gap: 8px; padding: 7px 8px; border-radius: 8px; color: var(--ink); text-decoration: none; font-weight: 600; font-size: 13.5px; min-height: 40px; }
.nm-link svg { color: var(--muted); flex: none; }
.nm-hinweis { margin: 10px 4px 0; padding-top: 10px; border-top: 1px solid var(--linie); font-size: 12.5px; color: var(--muted); }
.neu-menu.blatt { left: 0; right: 0; bottom: 0; top: auto; width: auto; max-height: 85vh; border-radius: 16px 16px 0 0; padding-bottom: max(12px, env(safe-area-inset-bottom)); }
.neu-menu.blatt .nm-spalten { grid-template-columns: 1fr; }

/* Art-Auswahl oben in den Neu-Dialogen */
.arten-trenner { flex-basis: 100%; margin-top: 4px; font-size: 11px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted-2); }

/* Wiederholen (Serien) */
.wh { gap: 8px; }
.wh-eigen:not([hidden]) { display: grid; gap: 10px; padding: 10px 12px; border: 1px solid var(--linie); border-radius: 10px; background: var(--flaeche-2); }
.wh-zeile { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 13.5px; }
.feld .wh-zeile input { width: 76px; }
.feld .wh-zeile select, .feld #whMonat { width: auto; min-width: 150px; }
.wh-tage:not([hidden]) { display: flex; gap: 6px; flex-wrap: wrap; }
.wh-tag { width: 42px; height: 42px; border-radius: 50%; border: 1px solid var(--linie-2); background: var(--flaeche); font-weight: 700; font-size: 13px; color: var(--muted); }
.wh-tag[aria-pressed="true"] { background: var(--navy); border-color: var(--navy); color: #fff; }
.wh-ende:not([hidden]) { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 18px; font-size: 13.5px; }
.wh-ende-titel { font-weight: 600; }
.wh-radio { display: inline-flex; align-items: center; gap: 6px; }
.feld .wh-radio input[type="radio"] { width: 18px; height: 18px; min-height: 0; padding: 0; accent-color: var(--navy); }
.feld .wh-radio input[type="number"] { width: 76px; }
.feld .wh-radio input[type="date"] { width: auto; }
.wh-vorschau { font-size: 13.5px; background: color-mix(in srgb, var(--blau) 6%, var(--flaeche)); border: 1px solid color-mix(in srgb, var(--blau) 20%, transparent); border-radius: 10px; padding: 8px 12px; }
.wh-vorschau p { margin: 0; }
.wh-vorschau summary { cursor: pointer; font-size: 12.5px; color: var(--blau); font-weight: 600; margin-top: 4px; }
.wh-liste { margin: 6px 0 0; padding: 0; list-style: none; display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 3px 14px; max-height: 190px; overflow-y: auto; font-size: 12.5px; }
.wh-liste small { color: var(--muted); }
.wh-konflikt:not([hidden]) { display: grid; gap: 6px; margin-top: 12px; border: 1px solid color-mix(in srgb, var(--warn) 45%, transparent); background: color-mix(in srgb, var(--warn) 9%, var(--flaeche)); border-radius: 10px; padding: 10px 12px; font-size: 13.5px; }
.wh-konflikt p { margin: 0; }
.wh-konflikt ul { margin: 0; padding-left: 18px; }
.wh-umfang { border: 1px solid var(--linie); border-radius: 10px; padding: 8px 12px 10px; margin: 12px 0 0; display: grid; gap: 4px; }
.wh-umfang legend { font-size: 12.5px; font-weight: 700; color: var(--muted); padding: 0 4px; }
.wh-umfang .check input:disabled + span { color: var(--muted-2); }
.ev-serie { font-style: normal; opacity: 0.75; }
.th-ueber a { color: inherit; }

/* ================= Sarah (WhatsApp) ================= */
.wa-schalter { display: inline-flex; align-items: center; gap: 10px; font-weight: 600; font-size: 13.5px; cursor: pointer; user-select: none; }
.wa-schalter input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.wa-schalter > span { width: 40px; height: 24px; border-radius: 999px; background: var(--linie-2); position: relative; flex: none; transition: background 0.15s; }
.wa-schalter > span::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgb(10 16 32 / 0.25); transition: transform 0.15s; }
.wa-schalter input:checked + span { background: var(--gruen); }
.wa-schalter input:checked + span::after { transform: translateX(16px); }
.wa-schalter input:focus-visible + span { outline: 2px solid var(--blau); outline-offset: 2px; }
.wa-schalter input:disabled + span { opacity: 0.5; }

.wa-einrichtung { margin-bottom: 14px; }
.wa-einrichtung summary { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 12px 16px; cursor: pointer; list-style: none; }
.wa-einrichtung summary::-webkit-details-marker { display: none; }
.wa-einrichtung summary::after { content: ""; margin-left: auto; width: 8px; height: 8px; border-right: 2px solid var(--muted-2); border-bottom: 2px solid var(--muted-2); transform: rotate(45deg); transition: transform 0.15s; }
.wa-einrichtung[open] summary::after { transform: rotate(-135deg); }
.wa-punkt { width: 10px; height: 10px; border-radius: 50%; flex: none; background: var(--muted-2); }
.wa-punkt.gruen { background: #22b16a; box-shadow: 0 0 0 3px color-mix(in srgb, #22b16a 20%, transparent); }
.wa-punkt.gelb { background: var(--amber); }
.wa-punkt.rot { background: var(--rot); }
.wa-einrichtung-in { padding: 0 16px 16px; display: grid; gap: 12px; border-top: 1px solid var(--linie); padding-top: 14px; }
.wa-check { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px 22px; }
.wa-check li { display: flex; align-items: flex-start; gap: 8px; font-size: 13.5px; }
.wa-check li b { font-weight: 600; }
.wa-haken { width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; flex: none; background: var(--flaeche-3); color: var(--muted); font-size: 12px; font-weight: 700; }
.wa-check li.ok .wa-haken { background: var(--gruen-bg); color: var(--gruen); }
.wa-check li.offen .wa-haken { background: var(--warn-bg); color: var(--warn); }
.wa-check code, .wa-einrichtung code { font-family: var(--mono); font-size: 12px; background: var(--flaeche-2); border: 1px solid var(--linie); border-radius: 4px; padding: 0 4px; }
.wa-einrichtung-fuss { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px; }
.wa-einrichtung-fuss .feld { flex: 1 1 360px; min-width: 0; }
.wa-adresse { display: flex; gap: 8px; align-items: center; min-width: 0; }
.wa-adresse code { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; padding: 8px 10px !important; font-size: 12.5px !important; }

.wa-raster { display: grid; grid-template-columns: minmax(260px, 340px) minmax(0, 1fr); gap: 14px; align-items: stretch; height: calc(100vh - 250px); min-height: 460px; }
.wa-seite { overflow-y: auto; min-height: 0; }
.wa-leer { padding: 28px 18px; text-align: center; color: var(--muted); display: grid; gap: 6px; }
.wa-liste { list-style: none; margin: 0; padding: 6px; display: grid; gap: 2px; }
.wa-eintrag { display: flex; gap: 10px; align-items: flex-start; padding: 10px; border-radius: 8px; color: inherit; text-decoration: none; }
.wa-eintrag:hover { background: var(--flaeche-2); }
.wa-eintrag[aria-current="true"] { background: color-mix(in srgb, var(--amber) 14%, var(--flaeche)); box-shadow: inset 3px 0 0 var(--amber); }
.wa-eintrag-text { min-width: 0; flex: 1; display: grid; gap: 2px; }
.wa-eintrag-kopf { display: flex; justify-content: space-between; gap: 8px; align-items: baseline; }
.wa-eintrag-kopf b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wa-eintrag-kopf time { font-size: 12px; color: var(--muted-2); white-space: nowrap; }
.wa-vorschau { font-size: 13px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wa-vorschau.fehler { color: var(--rot); }
.wa-eintrag-fuss { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.wa-art { font-size: 11.5px; font-weight: 600; color: var(--gruen); }
.wa-art.unbekannt { color: var(--muted-2); }

.wa-verlauf { background: var(--flaeche); border: 1px solid var(--linie); border-radius: var(--r-karte); box-shadow: var(--schatten); display: flex; flex-direction: column; min-height: 0; overflow: hidden; }
.wa-verlauf-leer { display: grid; place-items: center; text-align: center; padding: 30px; }
.wa-verlauf-kopf { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-bottom: 1px solid var(--linie); }
.wa-verlauf-titel { min-width: 0; flex: 1; display: grid; }
.wa-verlauf-titel b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wa-zurueck { display: none !important; }
.wa-nachrichten { list-style: none; margin: 0; padding: 16px; flex: 1; overflow-y: auto; display: flex; flex-direction: column; gap: 8px; background: #efeae2; }
.wa-tag { align-self: center; font-size: 12px; color: var(--muted); }
.wa-tag span { background: rgb(255 255 255 / 0.85); padding: 3px 10px; border-radius: 6px; box-shadow: 0 1px 1px rgb(10 16 32 / 0.06); }
.wa-blase { max-width: min(78%, 560px); padding: 7px 10px 6px; border-radius: 9px; box-shadow: 0 1px 1px rgb(10 16 32 / 0.1); display: grid; gap: 2px; }
.wa-blase p { white-space: pre-wrap; overflow-wrap: anywhere; }
.wa-blase.ein { align-self: flex-start; background: #fff; border-top-left-radius: 2px; }
.wa-blase.aus { align-self: flex-end; background: #d9fdd3; border-top-right-radius: 2px; }
.wa-blase.aus.team { background: #dbe8ff; }
.wa-blase.fehler { box-shadow: 0 0 0 1px color-mix(in srgb, var(--rot) 45%, transparent); }
.wa-von { font-size: 11.5px; font-weight: 700; color: var(--warn); }
.wa-blase.team .wa-von { color: var(--blau); }
.wa-meta { display: flex; justify-content: flex-end; gap: 6px; font-size: 11px; color: var(--muted-2); }
.wa-status.gelesen { color: #1d9bf0; }
.wa-status.fehler { color: var(--rot); font-weight: 700; }
.wa-fehler { font-size: 12px; color: var(--rot); }
.wa-antwort { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px 10px; padding: 12px 14px; border-top: 1px solid var(--linie); background: var(--flaeche); }
.wa-antwort textarea { width: 100%; min-height: 44px; max-height: 160px; padding: 10px 12px; border: 1px solid var(--linie-2); border-radius: var(--r-control); background: var(--flaeche); resize: vertical; }
.wa-antwort textarea:focus { outline: none; border-color: var(--blau); box-shadow: 0 0 0 3px color-mix(in srgb, var(--blau) 18%, transparent); }
.wa-antwort textarea:disabled { background: var(--flaeche-2); }
.wa-antwort .knopf { align-self: stretch; }
.wa-fenster { grid-column: 1 / -1; }

.wa-verlauf-titel .klein-text { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Sarahs KI (Stufe 2/3): Status, Übergabe ans Team, Kalender-Hinweise, Knöpfe, „Sarah schreibt …“ */
.zahl.achtung { background: var(--rot); color: #fff; }
.wa-einrichtung summary::after { margin-left: 4px; }
.wa-ki-chip { margin-left: auto; font-size: 12px; font-weight: 600; padding: 2px 9px; border-radius: 999px; background: var(--flaeche-3); color: var(--muted); white-space: nowrap; }
.wa-ki-chip.an { background: var(--gruen-bg); color: var(--gruen); }
.wa-ki-chip.fehler { background: var(--rot-bg); color: var(--rot); }
.wa-eintrag.achtung:not([aria-current="true"]) { box-shadow: inset 3px 0 0 var(--rot); }
.wa-eintrag-marken { display: inline-flex; align-items: center; gap: 6px; }
.wa-marke { font-size: 11px; font-weight: 700; padding: 1px 7px; border-radius: 999px; background: var(--flaeche-3); color: var(--muted); white-space: nowrap; }
.wa-marke.achtung { background: var(--rot-bg); color: var(--rot); }
.wa-vorschau.tippt { color: var(--gruen); font-style: italic; }
.wa-modus { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 6px 12px; padding: 8px 14px; font-size: 13px; border-bottom: 1px solid var(--linie); }
.wa-modus > span { min-width: 0; flex: 1 1 240px; }
.wa-modus .knopf { flex: none; }
.wa-modus.sarah { background: color-mix(in srgb, var(--gruen) 7%, var(--flaeche)); }
.wa-modus.sarah b { color: var(--gruen); }
.wa-modus.mensch { background: color-mix(in srgb, var(--blau) 7%, var(--flaeche)); }
.wa-modus.mensch b { color: var(--blau); }
.wa-modus.achtung { background: var(--rot-bg); }
.wa-modus.achtung b { color: var(--rot); }
.wa-aktion { align-self: center; max-width: 92%; text-align: center; font-size: 12px; color: var(--warn); }
.wa-aktion > span { display: inline-block; padding: 4px 10px; border-radius: 8px; background: #fff7e0; border: 1px solid #f1e0ae; line-height: 1.45; }
.wa-aktion.verschieben, .wa-aktion.buchen, .wa-aktion.absagen { color: var(--gruen); }
.wa-aktion.verschieben > span, .wa-aktion.buchen > span, .wa-aktion.absagen > span { background: #eaf8ef; border-color: #bfe6cf; }
.wa-aktion.uebergabe { color: var(--rot); }
.wa-aktion.uebergabe > span { background: var(--rot-bg); border-color: color-mix(in srgb, var(--rot) 22%, transparent); }
.wa-aktion.modus { color: var(--muted); }
.wa-aktion.modus > span { background: rgb(255 255 255 / 0.85); border-color: transparent; }
.wa-aktion time { color: var(--muted-2); font-size: 11px; }
.wa-aktion svg { vertical-align: -2px; margin-right: 2px; }
.wa-aktion time { margin-left: 4px; }
.wa-knoepfe { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.wa-knoepfe span { font-size: 12.5px; font-weight: 600; color: #027eb5; background: rgb(255 255 255 / 0.9); border-radius: 7px; padding: 5px 10px; box-shadow: 0 1px 1px rgb(10 16 32 / 0.08); }
.wa-knopf-antwort { font-size: 11px; color: var(--muted-2); }
.wa-punkte { display: inline-flex; gap: 4px; padding: 5px 2px 3px; }
.wa-punkte i { width: 7px; height: 7px; border-radius: 50%; background: var(--muted-2); animation: waPunkt 1.2s infinite ease-in-out; }
.wa-punkte i:nth-child(2) { animation-delay: 0.15s; }
.wa-punkte i:nth-child(3) { animation-delay: 0.3s; }
@keyframes waPunkt { 0%, 80%, 100% { opacity: 0.35; transform: translateY(0); } 40% { opacity: 1; transform: translateY(-3px); } }
@media (prefers-reduced-motion: reduce) { .wa-punkte i { animation: none; } }
.wa-termin-hinweis { margin-bottom: 12px; background: var(--gruen-bg); color: var(--gruen); border-color: color-mix(in srgb, var(--gruen) 25%, transparent); }
.wa-termin-hinweis a { color: inherit; font-weight: 600; }
.ev.per-wa b::before { content: "✦ "; color: var(--f); }

/* Stufe 4: Erinnerungen, feste Adressen, Löschen */
.wa-schalter-gruppe { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; }
.wa-adressen { flex: 1 1 420px; min-width: 0; display: grid; gap: 10px; }
.wa-adressen .feld { min-width: 0; }
.wa-adresse a.knopf { text-decoration: none; }
.wa-aktion.bestaetigt { color: var(--gruen); }
.wa-aktion.bestaetigt > span { background: #eaf8ef; border-color: #bfe6cf; }
.wa-aktion.kann_nicht { color: var(--rot); }
.wa-aktion.kann_nicht > span { background: var(--rot-bg); border-color: color-mix(in srgb, var(--rot) 22%, transparent); }
.wa-loeschen { color: var(--rot) !important; }
.ev.er-ok b::after { content: " ✓"; color: var(--gruen); }
.ev.er-nein b::after { content: " ✕"; color: var(--rot); }

@media (max-width: 760px) {
  .wa-bereich.mit-gespraech > .seitenkopf, .wa-bereich.mit-gespraech > .wa-einrichtung, .wa-bereich.mit-gespraech > .hinweis { display: none; }
  .wa-raster { grid-template-columns: minmax(0, 1fr); height: auto; min-height: 0; }
  .wa-raster.mit-gespraech .wa-seite { display: none; }
  .wa-raster:not(.mit-gespraech) .wa-verlauf { display: none; }
  .wa-verlauf { height: calc(100dvh - 150px); min-height: 420px; }
  .wa-zurueck { display: inline-flex !important; }
  .wa-blase { max-width: 88%; }
  .wa-verlauf-kopf .knopf:not(.wa-zurueck) { padding: 5px 9px; }
}
