/* Einsatzplaner · Demo
   Formensprache angelehnt an hk-ui (Scouting-App): heller Grund, weiße Karten,
   große Radien, Pill-Marken, schwebende Tabbar auf dem Handy.
   Eigene Farben: Dunkelblau + gelbe Hauptaktion. */

:root {
  --gelb: #FFC800;
  --gelb-weich: #FFF4C2;
  --dunkel: #13235F;
  --text: #0A1433;
  --text-2: #5A6788;
  --text-3: #929CB5;
  --grund: #F4F6FA;
  --flaeche: #FFFFFF;
  --flaeche-2: #F0F3F8;
  --flaeche-3: #E5EAF3;
  --linie: rgba(10, 20, 51, .08);
  --linie-stark: rgba(10, 20, 51, .15);
  --gruen: #1F8A5B; --gruen-weich: #DDF3E8;
  --rot: #C8102E;   --rot-weich: #FBE3E7;
  --orange: #B25E00; --orange-weich: #FDEBD3;
  --blau: #1D5FA8;  --blau-weich: #E1ECF8;
  --lila: #6A45C2;  --lila-weich: #ECE5FA;
  --r: 20px; --r-k: 12px;
  --schatten: 0 1px 2px rgba(10,20,51,.04), 0 2px 6px rgba(10,20,51,.03);
  --schatten-hoch: 0 24px 60px -16px rgba(10,20,51,.3);
  --navi: 240px;
  --tabbar: 0px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  color: var(--text);
  color-scheme: light;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--grund); font-size: 14px; line-height: 1.45; -webkit-font-smoothing: antialiased; }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3, h4 { margin: 0; line-height: 1.2; }
a { color: var(--blau); }
.muted { color: var(--text-2); }
.klein { font-size: 12px; color: var(--text-2); }
.zahl { font-variant-numeric: tabular-nums; }

/* ---------- Rahmen ---------- */
.rahmen { display: grid; grid-template-columns: var(--navi) 1fr; min-height: 100vh; }
.navi { position: sticky; top: 0; height: 100vh; padding: 20px 14px; display: flex; flex-direction: column; gap: 4px; }
.marke { display: flex; align-items: center; gap: 10px; padding: 6px 10px 18px; font-weight: 700; font-size: 16px; }
.marke-logo { width: 34px; height: 34px; border-radius: 10px; background: var(--gelb); display: grid; place-items: center; color: var(--dunkel); }
.marke small { display: block; font-weight: 500; font-size: 11px; color: var(--text-2); }
.navi-punkt { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 12px; border: 0; background: none; color: var(--text-2); cursor: pointer; text-align: left; font-weight: 500; }
.navi-punkt:hover { background: rgba(10,20,51,.04); }
.navi-punkt.an { background: var(--flaeche); color: var(--text); box-shadow: var(--schatten); font-weight: 600; }
.navi-punkt svg { width: 20px; height: 20px; flex: none; }
.navi-punkt .zaehler { margin-left: auto; }
.navi-fuss { margin-top: auto; padding: 12px; border-radius: 16px; background: var(--flaeche); box-shadow: var(--schatten); display: flex; align-items: center; gap: 10px; }
.navi-fuss b { display: block; font-size: 13px; }
.navi-fuss small { color: var(--text-2); font-size: 11px; }
.navi-fuss button { margin-left: auto; }

.inhalt { padding: 28px 32px 48px; max-width: 1320px; width: 100%; min-width: 0; }
.kopf { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 20px; }
.kopf h1 { font-size: 26px; letter-spacing: -.02em; }
.kopf p { margin: 4px 0 0; color: var(--text-2); }
.kopf-aktionen { display: flex; gap: 8px; flex-wrap: wrap; }
.mobil-kopf { display: none; }

@media (max-width: 991px) {
  :root { --tabbar: calc(76px + env(safe-area-inset-bottom)); }
  .rahmen { grid-template-columns: 1fr; }
  .navi { position: fixed; top: auto; bottom: calc(10px + env(safe-area-inset-bottom)); left: 10px; right: 10px; height: auto; z-index: 20;
    flex-direction: row; padding: 6px; gap: 2px; border-radius: 22px; overflow-x: auto;
    background: rgba(255,255,255,.82); backdrop-filter: blur(18px) saturate(1.6); -webkit-backdrop-filter: blur(18px) saturate(1.6);
    box-shadow: 0 10px 30px -10px rgba(10,20,51,.35), 0 0 0 1px var(--linie); scrollbar-width: none; }
  .navi::-webkit-scrollbar { display: none; }
  .navi .marke, .navi .navi-fuss { display: none; }
  .navi-punkt { flex: 1 0 auto; min-width: 64px; flex-direction: column; gap: 2px; padding: 7px 6px; font-size: 10.5px; position: relative; justify-content: center; align-items: center; }
  .navi-punkt.an { box-shadow: none; background: var(--gelb-weich); }
  .navi-punkt .zaehler { position: absolute; top: 2px; right: 8px; margin: 0; }
  .inhalt { padding: 12px 16px calc(var(--tabbar) + 24px); }
  .mobil-kopf { display: flex; align-items: center; gap: 10px; padding: calc(10px + env(safe-area-inset-top)) 16px 0; }
  .mobil-kopf .marke-logo { width: 30px; height: 30px; }
  .mobil-kopf b { font-size: 15px; }
  .mobil-kopf .rechts { margin-left: auto; display: flex; gap: 6px; }
  .kopf h1 { font-size: 22px; }
}

/* ---------- Bausteine ---------- */
.karte { background: var(--flaeche); border-radius: var(--r); box-shadow: var(--schatten); border: 1px solid var(--linie); padding: 18px; }
.karte + .karte { margin-top: 14px; }
.karte-kopf { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.karte-kopf h3 { font-size: 15px; }
.abschnitt { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin: 28px 0 12px; }
.abschnitt h2 { font-size: 17px; }
.abschnitt span { color: var(--text-2); font-size: 13px; }
.stapel { display: grid; gap: 12px; }
.raster-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 14px; }
.reihe { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }

.knopf { display: inline-flex; align-items: center; justify-content: center; gap: 6px; border: 1px solid var(--linie-stark); background: var(--flaeche); border-radius: var(--r-k); padding: 9px 14px; font-weight: 600; cursor: pointer; white-space: nowrap; min-height: 40px; }
.knopf:hover { background: var(--flaeche-2); }
.knopf.primaer { background: var(--gelb); border-color: transparent; color: var(--dunkel); }
.knopf.primaer:hover { filter: brightness(.96); }
.knopf.dunkel { background: var(--dunkel); color: #fff; border-color: transparent; }
.knopf.gefahr { color: var(--rot); }
.knopf.gruen { background: var(--gruen); color: #fff; border-color: transparent; }
.knopf.klein { padding: 5px 10px; min-height: 32px; font-size: 13px; }
.knopf.text { border: 0; background: none; padding: 6px 8px; color: var(--blau); }
.knopf.rund { width: 40px; padding: 0; }
.knopf:disabled { opacity: .5; cursor: not-allowed; }
.knopf svg { width: 18px; height: 18px; }
.voll { width: 100%; }

.marke-p { display: inline-flex; align-items: center; gap: 4px; border-radius: 999px; padding: 2px 9px; font-size: 11.5px; font-weight: 600; background: var(--flaeche-3); color: var(--text-2); white-space: nowrap; }
.marke-p.gelb { background: var(--gelb-weich); color: #7A5A00; }
.marke-p.gruen { background: var(--gruen-weich); color: var(--gruen); }
.marke-p.rot { background: var(--rot-weich); color: var(--rot); }
.marke-p.orange { background: var(--orange-weich); color: var(--orange); }
.marke-p.blau { background: var(--blau-weich); color: var(--blau); }
.marke-p.lila { background: var(--lila-weich); color: var(--lila); }
.zaehler { min-width: 19px; height: 19px; padding: 0 5px; border-radius: 999px; background: var(--rot); color: #fff; font-size: 11px; font-weight: 700; display: inline-grid; place-items: center; }

.segment { display: inline-flex; background: var(--flaeche-3); border-radius: 12px; padding: 3px; gap: 2px; flex-wrap: wrap; }
.segment button { border: 0; background: none; padding: 7px 12px; border-radius: 9px; font-weight: 600; color: var(--text-2); cursor: pointer; font-size: 13px; }
.segment button.an { background: var(--dunkel); color: #fff; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip { border: 1px solid var(--linie-stark); background: var(--flaeche); border-radius: 999px; padding: 6px 12px; font-size: 13px; font-weight: 500; cursor: pointer; }
.chip.an { background: var(--dunkel); color: #fff; border-color: transparent; }

.feld { display: grid; gap: 5px; }
.feld > span { font-size: 12px; font-weight: 600; color: var(--text-2); }
.feld input, .feld select, .feld textarea, .eingabe { width: 100%; border: 1px solid var(--linie-stark); border-radius: var(--r-k); padding: 10px 12px; background: var(--flaeche); min-height: 42px; }
.feld textarea { min-height: 80px; resize: vertical; }
.feld input:focus, .feld select:focus, .feld textarea:focus, .eingabe:focus { outline: 2px solid var(--gelb); outline-offset: 0; border-color: transparent; }
.felder { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; }
.feld.breit { grid-column: 1 / -1; }
.wochentage { display: flex; gap: 6px; flex-wrap: wrap; }
.wochentage label { position: relative; }
.wochentage input { position: absolute; opacity: 0; }
.wochentage span { display: grid; place-items: center; width: 42px; height: 38px; border-radius: 10px; border: 1px solid var(--linie-stark); font-weight: 600; cursor: pointer; }
.wochentage input:checked + span { background: var(--dunkel); color: #fff; border-color: transparent; }
.check { display: flex; gap: 8px; align-items: flex-start; cursor: pointer; }
.check input { margin-top: 3px; width: 17px; height: 17px; accent-color: var(--dunkel); }

.leer { text-align: center; padding: 28px 16px; color: var(--text-2); }
.leer b { display: block; color: var(--text); margin-bottom: 4px; }
.hinweis { background: var(--gelb-weich); border-radius: 14px; padding: 12px 14px; display: flex; gap: 10px; align-items: flex-start; }
.hinweis.blau { background: var(--blau-weich); }
.hinweis.rot { background: var(--rot-weich); }

.avatar { width: 34px; height: 34px; border-radius: 50%; background: var(--dunkel); color: #fff; display: grid; place-items: center; font-size: 12px; font-weight: 700; flex: none; }
.avatar.gelb { background: var(--gelb); color: var(--dunkel); }

/* KW-Blättern (wie HkBlaettern) */
.blaettern { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; }
.blaettern .titel { min-width: 180px; }
.blaettern .titel b { font-size: 18px; display: block; }
.blaettern .titel small { color: var(--text-2); }
.blaettern select { width: auto; min-height: 40px; }

/* KPI */
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin-bottom: 14px; }
.kpi { background: var(--flaeche); border-radius: 16px; border: 1px solid var(--linie); padding: 14px 16px; }
.kpi small { color: var(--text-2); font-weight: 600; font-size: 12px; }
.kpi b { display: block; font-size: 26px; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }

/* Tabellen */
.tabelle-huelle { overflow-x: auto; border-radius: var(--r); border: 1px solid var(--linie); background: var(--flaeche); box-shadow: var(--schatten); }
table.tab { width: 100%; border-collapse: collapse; }
table.tab th { text-align: left; font-size: 12px; color: var(--text-2); font-weight: 600; padding: 10px 14px; border-bottom: 1px solid var(--linie); white-space: nowrap; background: var(--flaeche-2); }
table.tab td { padding: 11px 14px; border-bottom: 1px solid var(--linie); vertical-align: top; }
table.tab tr:last-child td { border-bottom: 0; }
table.tab tr.klickbar { cursor: pointer; }
table.tab tr.klickbar:hover td { background: #F8FAFD; }
table.tab td.r, table.tab th.r { text-align: right; font-variant-numeric: tabular-nums; }
tr.inaktiv td { color: var(--text-3); }

/* Wochenplan-Raster */
.region-block { margin-bottom: 28px; }
.region-kopf { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; }
.region-kopf h2 { font-size: 18px; }
.abwesend { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 10px; }
table.plan { border-collapse: separate; border-spacing: 0; width: 100%; min-width: 1040px; }
table.plan th { font-size: 12px; font-weight: 600; color: var(--text-2); padding: 10px 8px; text-align: left; background: var(--flaeche-2); border-bottom: 1px solid var(--linie); }
table.plan th small { display: block; font-weight: 500; color: var(--text-3); }
table.plan th.heute { color: var(--dunkel); background: var(--gelb-weich); }
table.plan td, table.plan th.akt { border-bottom: 1px solid var(--linie); }
table.plan tr:last-child td, table.plan tr:last-child th.akt { border-bottom: 0; }
table.plan th.akt { width: 250px; background: var(--flaeche); text-align: left; vertical-align: top; padding: 12px; cursor: pointer; color: var(--text); font-size: 13px; position: sticky; left: 0; z-index: 1; border-right: 1px solid var(--linie); }
table.plan th.akt:hover { background: #F8FAFD; }
table.plan thead th:first-child { position: sticky; left: 0; z-index: 2; }
.akt-titel { font-weight: 700; font-size: 13.5px; margin-bottom: 2px; }
.akt-meta { color: var(--text-2); font-weight: 400; font-size: 12px; }
.akt-notiz { margin-top: 6px; font-weight: 400; font-size: 12px; color: #6B5300; background: var(--gelb-weich); border-radius: 8px; padding: 4px 7px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.akt-marken { display: flex; gap: 4px; flex-wrap: wrap; margin-top: 6px; }
td.tag { vertical-align: top; padding: 8px; min-width: 110px; height: 96px; cursor: pointer; position: relative; }
td.tag:hover { background: #F8FAFD; }
td.tag.leer-tag { background: repeating-linear-gradient(-45deg, transparent 0 6px, rgba(10,20,51,.035) 6px 12px); cursor: default; }
td.tag.heute { box-shadow: inset 0 0 0 9999px rgba(255,200,0,.07); }
.belegung { position: absolute; right: 8px; bottom: 6px; font-size: 11px; font-weight: 700; border-radius: 999px; padding: 1px 7px; }
.belegung.b-voll { background: var(--gruen-weich); color: var(--gruen); }
.belegung.b-teil { background: var(--orange-weich); color: var(--orange); }
.belegung.b-null { background: var(--rot-weich); color: var(--rot); }
.personen { display: flex; flex-direction: column; gap: 3px; padding-bottom: 18px; }
.person { font-size: 12px; font-weight: 600; background: var(--flaeche-2); border-radius: 7px; padding: 2px 7px; display: flex; gap: 4px; align-items: center; width: fit-content; max-width: 100%; }
.person.storno { background: var(--orange-weich); color: var(--orange); }
.person.krank { background: var(--rot-weich); color: var(--rot); text-decoration: line-through; }
.person.zahlen::after { content: "✓"; color: var(--gruen); font-weight: 800; }
tr.abgesagt th.akt .akt-titel { text-decoration: line-through; color: var(--text-3); }
tr.abgesagt td.tag { opacity: .45; }
.plus-tag { position: absolute; left: 8px; bottom: 6px; font-size: 16px; line-height: 1; color: var(--text-3); font-weight: 700; }

/* Partner: Karten */
.einsatz { display: grid; grid-template-columns: 58px 1fr; gap: 14px; align-items: start; }
.datum-block { background: var(--dunkel); color: #fff; border-radius: 14px; text-align: center; padding: 8px 4px; }
.datum-block small { display: block; font-size: 11px; opacity: .8; font-weight: 600; text-transform: uppercase; }
.datum-block b { font-size: 22px; line-height: 1.1; display: block; }
.datum-block.heute { background: var(--gelb); color: var(--dunkel); }
.einsatz h3 { font-size: 15.5px; margin-bottom: 2px; }
.info-zeilen { display: grid; gap: 3px; margin-top: 8px; font-size: 13px; color: var(--text-2); }
.info-zeilen div { display: flex; gap: 8px; }
.info-zeilen svg { width: 15px; height: 15px; flex: none; margin-top: 2px; color: var(--text-3); }
.tage-wahl { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 12px; }
.tag-knopf { border: 1px solid var(--linie-stark); border-radius: 12px; padding: 7px 10px; background: var(--flaeche); cursor: pointer; text-align: left; min-width: 86px; }
.tag-knopf b { display: block; font-size: 13px; }
.tag-knopf small { font-size: 11.5px; color: var(--gruen); font-weight: 600; }
.tag-knopf:hover { border-color: var(--dunkel); }
.tag-knopf.drin { background: var(--dunkel); color: #fff; border-color: transparent; cursor: default; }
.tag-knopf.drin small { color: var(--gelb); }
.tag-knopf.voll-tag { opacity: .45; cursor: default; }
.tag-knopf.voll-tag small { color: var(--text-3); }
.entfernung { font-weight: 700; font-size: 13px; color: var(--dunkel); background: var(--gelb-weich); border-radius: 999px; padding: 2px 9px; white-space: nowrap; }

/* Meine Woche (wie MeinKalender) */
.woche { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 10px; }
@media (max-width: 1100px) { .woche { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); } }
@media (max-width: 600px) { .woche { grid-template-columns: 1fr; } }
.wtag { background: var(--flaeche); border-radius: 16px; border: 1px solid var(--linie); padding: 12px; min-height: 110px; }
.wtag.heute { border-color: var(--gelb); box-shadow: 0 0 0 2px var(--gelb-weich); }
.wtag-kopf { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.wtag-kopf b { font-size: 13px; }
.wtag-kopf small { color: var(--text-2); font-size: 12px; }
.termin { display: block; width: 100%; text-align: left; border: 0; background: var(--flaeche-2); border-radius: 10px; padding: 7px 9px; cursor: pointer; margin-bottom: 6px; }
.termin.mein { background: var(--gelb-weich); }
.termin b { font-size: 12px; display: block; }
.termin span { font-size: 12px; color: var(--text-2); display: block; }

/* Zahlen-Stepper */
.stepper { display: grid; grid-template-columns: 44px 1fr 44px; border: 1px solid var(--linie-stark); border-radius: 12px; overflow: hidden; }
.stepper button { border: 0; background: var(--flaeche-2); font-size: 20px; font-weight: 700; cursor: pointer; }
.stepper input { border: 0 !important; text-align: center; font-size: 18px; font-weight: 700; min-height: 46px; border-radius: 0 !important; outline: none !important; }
.zahlen-raster { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 12px; }

/* Umkreis */
.umkreis-filter { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; align-items: end; }
input[type=range] { width: 100%; accent-color: var(--dunkel); }

/* Urlaubszeitleiste */
.zeitleiste { display: grid; gap: 2px; font-size: 12px; min-width: 760px; }
.zeitleiste .zl-reihe { display: grid; grid-template-columns: 170px repeat(var(--n), 1fr); gap: 2px; align-items: center; }
.zl-zelle { height: 30px; border-radius: 6px; background: var(--flaeche-2); display: grid; place-items: center; font-size: 11px; font-weight: 600; }
.zl-zelle.urlaub { background: var(--lila); color: #fff; }
.zl-zelle.frei { background: var(--blau); color: #fff; }
.zl-zelle.krank { background: var(--rot); color: #fff; }
.zl-kopf { color: var(--text-2); font-weight: 600; text-align: center; }

/* Nachrichten */
.nachricht { display: grid; grid-template-columns: 34px 1fr; gap: 12px; padding: 14px 0; border-bottom: 1px solid var(--linie); }
.nachricht:last-child { border-bottom: 0; }
.nachricht.neu h4::before { content: ""; display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--rot); margin-right: 6px; vertical-align: middle; }
.nachricht h4 { font-size: 14px; }
.nachricht p { margin: 3px 0 0; color: var(--text-2); white-space: pre-line; }
.personen-wahl { max-height: 220px; overflow: auto; border: 1px solid var(--linie-stark); border-radius: 12px; padding: 8px 12px; display: grid; gap: 6px; }

/* Anmeldung */
.anmeldung { min-height: 100vh; display: grid; place-items: center; padding: 24px 16px; }
.anmeldung-karte { width: min(860px, 100%); background: var(--flaeche); border-radius: 28px; padding: 32px; box-shadow: var(--schatten-hoch); }
.anmeldung-karte h3 { font-size: 14px; margin: 22px 0 10px; }
.anmeldung-karte h3 span { font-weight: 400; color: var(--text-2); }
.nutzer-raster { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 8px; }
.nutzer { display: flex; gap: 10px; align-items: center; text-align: left; border: 1px solid var(--linie-stark); background: var(--flaeche); border-radius: 14px; padding: 10px 12px; cursor: pointer; }
.nutzer:hover { border-color: var(--dunkel); }
.nutzer b { display: block; font-size: 13.5px; }
.nutzer small { color: var(--text-2); font-size: 12px; }
.nutzer:disabled { opacity: .45; cursor: not-allowed; }
@media (max-width: 600px) { .anmeldung-karte { padding: 22px 18px; border-radius: 22px; } }

/* Dialog */
dialog { border: 0; border-radius: 24px; padding: 0; width: min(640px, calc(100vw - 24px)); max-height: calc(100vh - 40px); box-shadow: var(--schatten-hoch); color: var(--text); }
dialog::backdrop { background: rgba(10,20,51,.38); backdrop-filter: blur(2px); }
.dlg-kopf { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; padding: 20px 22px 0; }
.dlg-kopf h2 { font-size: 19px; }
.dlg-kopf p { margin: 3px 0 0; color: var(--text-2); }
.dlg-inhalt { padding: 16px 22px; display: grid; gap: 14px; }
.dlg-fuss { display: flex; gap: 8px; justify-content: flex-end; padding: 14px 22px 20px; border-top: 1px solid var(--linie); flex-wrap: wrap; background: var(--flaeche); position: sticky; bottom: 0; }
.dlg-fuss .links { margin-right: auto; }
@media (max-width: 600px) {
  dialog { width: 100vw; max-width: 100vw; margin: auto 0 0; border-radius: 24px 24px 0 0; max-height: 92vh; }
  dialog[open] { animation: hoch .25s cubic-bezier(.22,1,.36,1); }
}
@keyframes hoch { from { transform: translateY(40px); opacity: 0; } }
.liste-zeile { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--linie); flex-wrap: wrap; }
.liste-zeile:last-child { border-bottom: 0; }
.liste-zeile .name { flex: 1; min-width: 120px; }
.liste-zeile .name b { display: block; }

/* Toasts */
#toasts { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(var(--tabbar) + 20px); z-index: 100; display: grid; gap: 8px; width: min(460px, calc(100vw - 32px)); }
.toast { background: #0B1638; color: #fff; border-radius: 14px; padding: 12px 16px; box-shadow: var(--schatten-hoch); display: flex; gap: 10px; align-items: flex-start; animation: hoch .25s cubic-bezier(.22,1,.36,1); }
.toast svg { width: 18px; height: 18px; flex: none; color: var(--gelb); margin-top: 1px; }
.toast small { display: block; opacity: .75; }
.hinweis svg { width: 20px; height: 20px; flex: none; margin-top: 1px; }

/* Chat */
.chat { display: grid; grid-template-columns: 320px 1fr; height: calc(100vh - 170px); min-height: 460px; background: var(--flaeche); border: 1px solid var(--linie); border-radius: var(--r); box-shadow: var(--schatten); overflow: hidden; }
.chat-liste { border-right: 1px solid var(--linie); overflow-y: auto; }
.chat-eintrag { display: flex; gap: 10px; align-items: center; width: 100%; border: 0; border-bottom: 1px solid var(--linie); background: none; padding: 12px 14px; cursor: pointer; text-align: left; }
.chat-eintrag:hover { background: #F8FAFD; }
.chat-eintrag.an { background: var(--gelb-weich); }
.chat-eintrag .avatar svg { width: 18px; height: 18px; }
.chat-text { flex: 1; min-width: 0; display: grid; gap: 2px; }
.chat-text b { font-size: 13.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chat-text small { color: var(--text-2); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chat-fenster { display: flex; flex-direction: column; min-width: 0; min-height: 0; }
.chat-kopf { display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-bottom: 1px solid var(--linie); }
.chat-kopf b { display: block; }
.chat-kopf small { color: var(--text-2); font-size: 12px; }
.chat-verlauf { flex: 1; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 6px; background: var(--grund); }
.chat-tag { align-self: center; font-size: 11.5px; font-weight: 600; color: var(--text-2); background: var(--flaeche-3); border-radius: 999px; padding: 2px 10px; margin: 8px 0 4px; }
.blase { max-width: min(75%, 520px); background: var(--flaeche); border: 1px solid var(--linie); border-radius: 16px 16px 16px 4px; padding: 8px 12px; white-space: pre-wrap; word-wrap: break-word; align-self: flex-start; }
.blase b { display: block; font-size: 12px; color: var(--blau); margin-bottom: 2px; }
.blase small { display: block; text-align: right; font-size: 10.5px; color: var(--text-3); margin-top: 2px; }
.blase.mein { align-self: flex-end; background: var(--gelb); border-color: transparent; border-radius: 16px 16px 4px 16px; color: var(--dunkel); }
.blase.mein small { color: rgba(19,35,95,.6); }
.chat-eingabe { display: flex; gap: 8px; padding: 12px; border-top: 1px solid var(--linie); align-items: flex-end; }
.chat-eingabe textarea { flex: 1; resize: none; border: 1px solid var(--linie-stark); border-radius: 14px; padding: 10px 12px; min-height: 42px; max-height: 140px; }
.chat-eingabe textarea:focus { outline: 2px solid var(--gelb); border-color: transparent; }
.chat-eingabe.hinweis { border-radius: 0; justify-content: center; }
.nur-mobil { display: none; }
@media (max-width: 760px) {
  .chat { grid-template-columns: 1fr; height: calc(100vh - var(--tabbar) - 150px); }
  .chat-fenster { display: none; }
  .chat.offen .chat-liste { display: none; }
  .chat.offen .chat-fenster { display: flex; }
  .nur-mobil { display: inline-flex; }
}
