:root {
  --navy: #00263d;
  --navy-2: #0b3a58;
  --navy-text: #c4d4e0;
  --akzent: #00426a;
  --akzent-hover: #003253;
  --akzent-zart: #e3edf3;
  --grund: #f4f6f9;
  --flaeche: #ffffff;
  --rand: #e1e6ee;
  --rand-stark: #cbd3df;
  --text: #17202e;
  --text-2: #5b6779;
  --ok: #157f4a; --ok-zart: #e4f4ea;
  --warn: #a35d00; --warn-zart: #fdf1dc;
  --gefahr: #c0262d; --gefahr-zart: #fbe7e8;
  --radius: 10px;
  --schatten: 0 1px 2px rgba(0, 38, 61, .06), 0 2px 8px rgba(0, 38, 61, .04);
  --schrift: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color-scheme: light;
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { font-family: var(--schrift); font-size: 15px; line-height: 1.45; color: var(--text); background: var(--grund); -webkit-font-smoothing: antialiased; }
h1, h2, h3 { margin: 0; line-height: 1.25; }
p { margin: 0; }
a { color: var(--akzent); }
button, input, select, textarea { font: inherit; color: inherit; }
[hidden] { display: none !important; }

.icon { display: inline-flex; width: 20px; height: 20px; flex: none; }
.icon svg { width: 100%; height: 100%; }
.icon.klein { width: 14px; height: 14px; }
.gedimmt { color: var(--text-2); }
.klein { font-size: 13px; }
.nowrap { white-space: nowrap; }
.laden { padding: 48px; text-align: center; color: var(--text-2); }
.punkt { display: inline-block; width: 9px; height: 9px; border-radius: 50%; flex: none; margin-right: 6px; vertical-align: 1px; }

/* ---------- Knöpfe & Formulare ---------- */
.knopf { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 38px; padding: 0 14px; border-radius: 8px; border: 1px solid var(--rand-stark); background: var(--flaeche); font-weight: 600; font-size: 14px; cursor: pointer; white-space: nowrap; transition: background .12s, border-color .12s; }
.knopf .icon { width: 17px; height: 17px; }
.knopf:hover { background: #f0f3f7; }
.knopf:focus-visible, .icon-knopf:focus-visible, .chip:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, .nav a:focus-visible { outline: 2px solid var(--akzent); outline-offset: 2px; }
.knopf:disabled { opacity: .6; cursor: default; }
.knopf-primaer { background: var(--akzent); border-color: var(--akzent); color: #fff; }
.knopf-primaer:hover { background: var(--akzent-hover); }
.knopf-leise { background: transparent; }
.knopf-gefahr { background: var(--gefahr); border-color: var(--gefahr); color: #fff; }
.knopf-gefahr-leise { background: transparent; border-color: transparent; color: var(--gefahr); }
.knopf-gefahr-leise:hover { background: var(--gefahr-zart); }
.knopf-voll { width: 100%; }
.knopf-mini { min-height: 30px; padding: 0 10px; font-size: 13px; font-weight: 500; }
.icon-knopf { display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; border-radius: 8px; border: 0; background: transparent; cursor: pointer; color: inherit; flex: none; }
.icon-knopf:hover { background: rgba(127, 140, 160, .16); }

.feld { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.feld-label { font-size: 13px; font-weight: 600; color: var(--text-2); }
.feld-hinweis { font-size: 12.5px; color: var(--text-2); }
input:not([type=checkbox]):not([type=color]):not([type=radio]), select, textarea { width: 100%; min-height: 40px; padding: 8px 11px; border: 1px solid var(--rand-stark); border-radius: 8px; background: #fff; }
input:disabled { background: var(--grund); color: var(--text-2); }
textarea { resize: vertical; }
input[type=color] { width: 40px; height: 40px; padding: 3px; border: 1px solid var(--rand-stark); border-radius: 8px; background: #fff; cursor: pointer; flex: none; }
input[type=checkbox], input[type=radio] { width: 18px; height: 18px; accent-color: var(--akzent); margin: 0; flex: none; }
.schalter { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; font-size: 14px; user-select: none; }
.schalter-feld { align-self: end; min-height: 40px; }
.stapel { display: flex; flex-direction: column; gap: 14px; }
.stapel-eng { display: flex; flex-direction: column; gap: 8px; justify-content: flex-end; padding-bottom: 4px; }
.raster-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.raster-3 { display: grid; grid-template-columns: 1.3fr 1fr 1fr; gap: 12px; }
.reihe-rechts { display: flex; justify-content: flex-end; gap: 8px; flex-wrap: wrap; }
.trenner { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--text-2); border-top: 1px solid var(--rand); padding-top: 14px; margin-top: 4px; }
.vorlagen { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.vorlagen .feld-label { width: 100%; }
.passwort-reihe { display: flex; gap: 8px; align-items: flex-start; }
.passwort-reihe .feld { flex: 1; }
.passwort-reihe .knopf { margin-top: 23px; }

/* ---------- Anmeldung ---------- */
.login-seite { min-height: 100vh; min-height: 100dvh; display: grid; place-items: center; padding: 24px 16px; background: radial-gradient(circle at 20% 0%, #00426a 0, var(--navy) 55%); position: relative; overflow: hidden; }
.login-hintergrund { position: absolute; inset: 0; pointer-events: none; }
.login-karte { position: relative; z-index: 1; }
.login-karte { width: 100%; max-width: 400px; background: var(--flaeche); border-radius: 14px; padding: 28px; display: flex; flex-direction: column; gap: 16px; box-shadow: 0 20px 50px rgba(0, 0, 0, .3); }
.login-karte .marke { color: var(--navy); margin-bottom: 4px; }
.login-karte .marke span { color: var(--text-2); }
.login-karte h1 { font-size: 22px; }
.login-meldung { background: var(--gefahr-zart); color: var(--gefahr); padding: 10px 12px; border-radius: 8px; font-size: 14px; }
.login-fuss { font-size: 13px; color: var(--text-2); text-align: center; }

.marke { display: flex; align-items: center; gap: 10px; }
.marke-logo { width: 40px; height: 40px; object-fit: contain; flex: none; }
.login-karte .marke-logo { width: 56px; height: 56px; }
.marke strong { display: block; font-size: 17px; letter-spacing: .01em; }
.marke span { display: block; font-size: 12px; opacity: .75; }

/* ---------- Rahmen ---------- */
.rahmen { display: flex; min-height: 100vh; min-height: 100dvh; }
.seitenleiste { width: 248px; flex: none; background: var(--navy); color: var(--navy-text); display: flex; flex-direction: column; padding: 18px 12px max(18px, env(safe-area-inset-bottom)); position: sticky; top: 0; height: 100vh; height: 100dvh; overflow-y: auto; overscroll-behavior: contain; }
.seitenleiste .marke { color: #fff; padding: 2px 8px 18px; }
.nav { display: flex; flex-direction: column; gap: 2px; flex: 1; }
.nav a, .nav-geplant { display: flex; align-items: center; gap: 11px; padding: 9px 10px; border-radius: 8px; color: var(--navy-text); text-decoration: none; font-weight: 500; }
.nav a:hover { background: var(--navy-2); color: #fff; }
.nav a.aktiv { background: var(--akzent); color: #fff; }
.nav-gruppe { margin: 18px 10px 6px; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .07em; color: #86a0b3; }
.nav-geplant { color: #86a0b3; cursor: default; font-size: 14px; }
.profil { display: flex; align-items: center; gap: 8px; padding: 12px 6px 0; border-top: 1px solid var(--navy-2); margin-top: 12px; }
.avatar { width: 34px; height: 34px; border-radius: 50%; background: var(--navy-2); color: #fff; display: grid; place-items: center; font-weight: 700; font-size: 13px; flex: none; }
.profil-text { flex: 1; min-width: 0; }
.profil-text strong, .profil-text span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.profil-text strong { color: #fff; font-size: 14px; }
.profil-text span { font-size: 12px; }
.hauptbereich { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.kopf { display: flex; align-items: center; gap: 8px; padding: 18px 28px 6px; }
.kopf h1 { font-size: 22px; }
.menue-knopf { display: none; }
.inhalt { padding: 12px 28px 40px; }
.seite { display: flex; flex-direction: column; gap: 16px; max-width: 1400px; }
.seite.seite-voll { max-width: none; }
.schleier { display: none; }

/* ---------- Karten & Widgets ---------- */
.karte, .widget { background: var(--flaeche); border: 1px solid var(--rand); border-radius: var(--radius); box-shadow: var(--schatten); padding: 18px; display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.karte-flach { padding: 0; overflow-x: auto; }
.karte-kopf, .widget-kopf { display: flex; align-items: center; gap: 10px; }
.karte-kopf h3, .widget-kopf h3 { font-size: 16px; flex: 1; }
.widget-kopf .icon { color: var(--akzent); }
.widget-link { font-size: 14px; font-weight: 600; text-decoration: none; }
.begruessung h2 { font-size: 24px; }
.widget-raster { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 16px; }
.widget-breit { grid-column: 1 / -1; }
.geplant-raster { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 10px; }
.geplant { display: flex; gap: 10px; padding: 12px; border: 1px dashed var(--rand-stark); border-radius: 8px; color: var(--text-2); }
.geplant strong { display: block; color: var(--text); font-size: 14px; }
.geplant span:not(.icon) { font-size: 13px; }
.hinweisband { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border-radius: 8px; background: var(--ok-zart); color: var(--ok); font-weight: 600; font-size: 14px; text-decoration: none; }
.hinweisband-warn { background: var(--warn-zart); color: var(--warn); }
.dienst-liste { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.dienst-liste li { display: flex; gap: 14px; align-items: center; padding: 10px 0; border-top: 1px solid var(--rand); }
.dienst-liste li:first-child { border-top: 0; }
.dienst-datum { width: 52px; text-align: center; border-radius: 8px; background: var(--grund); padding: 5px 0; flex: none; }
.dienst-datum span { display: block; font-size: 12px; color: var(--text-2); }
.dienst-datum strong { font-size: 14px; }
.dienst-datum.heute { background: var(--akzent); color: #fff; }
.dienst-datum.heute span { color: #c8dbe8; }
.dienst-text { display: flex; flex-direction: column; min-width: 0; }
.dienst-text span { color: var(--text-2); font-size: 14px; }

.leer { display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 48px 16px; text-align: center; color: var(--text-2); background: var(--flaeche); border: 1px dashed var(--rand-stark); border-radius: var(--radius); }
.leer .icon { width: 34px; height: 34px; color: #9aa6b8; }
.fehlerbox { padding: 14px 16px; border-radius: 8px; background: var(--gefahr-zart); color: var(--gefahr); }

.status { display: inline-flex; align-items: center; padding: 3px 10px; border-radius: 999px; font-size: 12.5px; font-weight: 600; white-space: nowrap; }
.status-ok { background: var(--ok-zart); color: var(--ok); }
.status-entwurf, .status-warn { background: var(--warn-zart); color: var(--warn); }
.status-aus { background: #eceff3; color: var(--text-2); }

/* ---------- Werkzeugleiste ---------- */
.werkzeugleiste { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.werkzeugleiste input[type=search] { max-width: 280px; }
.leiste-rechts { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-left: auto; }
.wochenwahl { display: flex; align-items: center; gap: 4px; background: var(--flaeche); border: 1px solid var(--rand); border-radius: 10px; padding: 3px; }
.wochen-titel { display: flex; flex-direction: column; align-items: center; min-width: 130px; line-height: 1.2; }
.wochen-titel span { font-size: 12.5px; color: var(--text-2); }
.wochenwahl .knopf { min-height: 32px; border: 0; }

.tag { background: var(--flaeche); border: 1px solid var(--rand); border-radius: var(--radius); padding: 10px 12px; display: flex; flex-direction: column; gap: 6px; }
.tag.heute { border-color: var(--akzent); box-shadow: 0 0 0 1px var(--akzent); }
.tag-kopf { display: flex; justify-content: space-between; align-items: center; min-height: 32px; }

.tabelle { width: 100%; border-collapse: collapse; font-size: 14px; }
.tabelle th { text-align: left; font-size: 12.5px; color: var(--text-2); font-weight: 600; padding: 10px 14px; border-bottom: 1px solid var(--rand); background: #fafbfc; }
.tabelle td { padding: 11px 14px; border-bottom: 1px solid var(--rand); }
.tabelle tr:last-child td { border-bottom: 0; }
.karte .tabelle th { background: transparent; padding: 8px 4px; }
.karte .tabelle td { padding: 8px 4px; }
.tabelle .zahl { text-align: right; font-variant-numeric: tabular-nums; }
.tabelle-klickbar tbody tr { cursor: pointer; }
.tabelle-klickbar tbody tr:hover { background: #f7f9fc; }

.details { display: grid; grid-template-columns: 110px 1fr; gap: 8px 12px; margin: 0; }
.details dt { color: var(--text-2); font-size: 14px; }
.details dd { margin: 0; font-weight: 500; }

/* ---------- Reiter, Rollen ---------- */
.reiter { display: flex; gap: 4px; border-bottom: 1px solid var(--rand); overflow-x: auto; overflow-y: hidden; scrollbar-width: none; }
.reiter::-webkit-scrollbar { display: none; }
.reiter button { border: 0; background: transparent; padding: 10px 14px; font-weight: 600; color: var(--text-2); border-bottom: 2px solid transparent; margin-bottom: -1px; cursor: pointer; white-space: nowrap; }
.reiter button.aktiv { color: var(--akzent); border-bottom-color: var(--akzent); }
.rollen-raster { align-items: start; display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; }
.rechte-liste { margin: 0; padding-left: 18px; font-size: 14px; display: flex; flex-direction: column; gap: 4px; }
.rechte-gruppe { border: 1px solid var(--rand); border-radius: 8px; padding: 10px 14px 14px; margin: 0; display: flex; flex-direction: column; gap: 10px; }
.rechte-gruppe legend { font-weight: 700; padding: 0 6px; font-size: 14px; }

/* ---------- Dialog & Toast ---------- */
.dialog { border: 0; border-radius: 14px; padding: 0; width: min(520px, calc(100vw - 24px)); max-height: calc(100vh - 32px); max-height: calc(100dvh - 32px); box-shadow: 0 24px 60px rgba(0, 38, 61, .3); color: var(--text); }
.dialog-breit { width: min(760px, calc(100vw - 24px)); }
.dialog::backdrop { background: rgba(0, 38, 61, .45); }
.dialog-kopf { display: flex; align-items: center; justify-content: space-between; padding: 16px 16px 0 22px; }
.dialog-kopf h2 { font-size: 18px; }
.dialog-inhalt { padding: 16px 22px; display: flex; flex-direction: column; gap: 14px; }
.dialog-fehler { background: var(--gefahr-zart); color: var(--gefahr); padding: 10px 12px; border-radius: 8px; font-size: 14px; }
.dialog-aktionen { display: flex; justify-content: flex-end; gap: 8px; padding: 14px 22px 18px; border-top: 1px solid var(--rand); background: #fafbfc; border-radius: 0 0 14px 14px; }
.aktionen-links { margin-right: auto; }

#toasts { position: fixed; right: 16px; bottom: 16px; display: flex; flex-direction: column; gap: 8px; z-index: 1000; max-width: calc(100vw - 32px); }
.toast { background: var(--navy); color: #fff; padding: 11px 16px; border-radius: 9px; box-shadow: 0 8px 24px rgba(0, 0, 0, .2); font-size: 14px; max-width: 380px; transition: opacity .4s, transform .4s; }
.toast-ok { background: var(--ok); }
.toast-warn { background: var(--warn); }
.toast-fehler { background: var(--gefahr); }
.toast.weg { opacity: 0; transform: translateY(8px); }

/* ---------- Benachrichtigungen ---------- */
.kopf h1 { flex: 1; }
.glocke { position: relative; }
.glocke-zahl { position: absolute; top: 2px; right: 1px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--gefahr); color: #fff; font-size: 11px; font-weight: 700; display: grid; place-items: center; }
.nachrichten { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; max-height: 60vh; overflow-y: auto; }
.nachrichten li { padding: 10px 12px; border: 1px solid var(--rand); border-radius: 8px; cursor: pointer; }
.nachrichten li.neu { border-color: var(--akzent); background: var(--akzent-zart); }
.nachricht-kopf { display: flex; justify-content: space-between; gap: 10px; align-items: baseline; }
.nachricht-text { white-space: pre-line; font-size: 14px; margin-top: 4px; }

/* ---------- Gemeinsam genutzt (mehrere Module) ---------- */
.tk-feiertag { font-size: 11px; color: var(--ok); font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.art-urlaub { background: #dcf3e5; color: #11603a; }
.art-krank { background: #fbe1e2; color: #9b1c22; }
.art-fortbildung { background: #efe4fb; color: #6b2fb3; }
.art-sonstiges, .art-abwesend { background: #e9edf2; color: #45505f; }
.art-termin { background: var(--akzent-zart); color: #00426a; }
.art-geburtstag { background: #fdf0d5; color: #8a5300; }
.art-punkt { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; flex: none; }
.art-punkt.art-urlaub { background: #2f9e62; } .art-punkt.art-krank { background: #d9434a; } .art-punkt.art-fortbildung { background: #8b5cf6; }
.art-punkt.art-sonstiges, .art-punkt.art-abwesend { background: #8a94a3; } .art-punkt.art-termin { background: var(--akzent); }
.art-punkt.art-geburtstag { background: #f0a020; }
.art-punkt.art-beantragt { background: #fff; border: 1.5px dashed #8a94a3; }
.kennzahl { display: flex; align-items: baseline; gap: 8px; }
.kennzahl strong { font-size: 28px; }
.kennzahl span { color: var(--text-2); }
.mini-titel { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--text-2); }
.kompakt-liste { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; font-size: 14px; }
.mehrzeilig { white-space: pre-wrap; }
.mp-scroll { overflow: auto; max-height: calc(100vh - 230px); background: var(--flaeche); border: 1px solid var(--rand); border-radius: var(--radius); box-shadow: var(--schatten); }
.mp { border-collapse: separate; border-spacing: 0; font-size: 12px; }
.mp th, .mp td { border-right: 1px solid var(--rand); border-bottom: 1px solid var(--rand); }
.mp thead th { position: sticky; top: 0; z-index: 2; background: #fafbfc; }
.mp .mp-name { position: sticky; left: 0; z-index: 1; background: var(--flaeche); min-width: 140px; max-width: 160px; text-align: left; padding: 6px 10px; font-weight: 400; }
.mp thead .mp-name { z-index: 3; background: #fafbfc; font-weight: 600; }
.mp .mp-name strong { display: block; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mp .mp-name span { font-size: 11px; color: var(--text-2); }
.nur-druck { display: none; }
.status-fehler { background: var(--gefahr-zart); color: var(--gefahr); }
.text-fehler { color: var(--gefahr); font-weight: 600; }
.link-still { color: inherit; text-decoration: none; }
.link-still:hover { color: var(--akzent); }
.abschnitt { font-size: 15px; }
.fortschritt { height: 6px; background: #e9edf2; border-radius: 3px; overflow: hidden; min-width: 120px; margin-bottom: 4px; }
.fortschritt div { height: 100%; background: var(--ok); }
a.knopf { text-decoration: none; color: inherit; }
@media print {
  body { background: #fff; }
  .seitenleiste, .kein-druck, #toasts, .schleier { display: none !important; }
  .nur-druck { display: block; }
  .inhalt { padding: 0; }
}

/* ---------- Startseite anpassen ---------- */
.begruessung { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; flex-wrap: wrap; }
.anpassen-leiste { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; padding: 10px 14px; border-radius: var(--radius); background: var(--akzent-zart); border: 1px solid #c8dbe8; }
.widget-werkzeug { display: none; align-items: center; gap: 2px; margin: -8px -8px 0; padding: 4px; border-radius: 8px; background: var(--grund); }
.widget-werkzeug .icon-knopf { width: 32px; height: 32px; }
.widget-griff { cursor: grab; font-size: 18px; color: var(--text-2); padding: 0 8px; margin-right: auto; user-select: none; }
.widget-raster.bearbeiten .widget { outline: 2px dashed #c8dbe8; outline-offset: 2px; cursor: grab; }
.widget-raster.bearbeiten .widget-werkzeug { display: flex; }
.widget-raster.bearbeiten .widget-koerper, .widget-raster.bearbeiten .widget-link { pointer-events: none; opacity: .75; }
.widget.wird-gezogen { opacity: .4; }
.widget.ziel-vor { box-shadow: -4px 0 0 var(--akzent), 0 -4px 0 var(--akzent); }
.widget.ziel-nach { box-shadow: 4px 0 0 var(--akzent), 0 4px 0 var(--akzent); }
.widget-ablage { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; padding: 10px 14px; border: 1px dashed var(--rand-stark); border-radius: var(--radius); }

/* ---------- Benutzer löschen ---------- */
.text-ok { color: var(--ok); font-weight: 600; }
.loesch-schritt { border-color: #f1b5b8; }
.loesch-schritt:disabled { opacity: .5; }
.loesch-schritt legend { color: var(--gefahr); }

/* ---------- Module ein/aus ---------- */
.modul-liste { list-style: none; margin: 0; padding: 0; }
.modul-zeile { display: flex; align-items: center; gap: 14px; padding: 14px 16px; border-top: 1px solid var(--rand); }
.modul-zeile:first-child { border-top: 0; }
.modul-zeile.aus .modul-symbol, .modul-zeile.aus strong { opacity: .5; }
.modul-ordnen { display: flex; align-items: center; flex: none; }
.modul-ordnen .icon-knopf { width: 28px; height: 28px; font-size: 14px; }
.modul-ordnen .icon-knopf:disabled { opacity: .3; cursor: default; }
.modul-griff { color: var(--text-2); font-size: 16px; padding: 0 4px; cursor: grab; user-select: none; }
.modul-zeile.wird-gezogen { opacity: .4; }
.modul-zeile.ziel-oben { box-shadow: inset 0 3px 0 var(--akzent); }
.modul-zeile.ziel-unten { box-shadow: inset 0 -3px 0 var(--akzent); }
.modul-symbol { width: 40px; height: 40px; border-radius: 10px; background: var(--akzent-zart); color: var(--akzent); display: grid; place-items: center; flex: none; }
.modul-text { flex: 1; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.umschalter { position: relative; display: inline-flex; width: 46px; height: 26px; flex: none; cursor: pointer; }
.umschalter input { position: absolute; inset: 0; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.umschalter input:disabled { cursor: not-allowed; }
.umschalter-bahn { width: 100%; height: 100%; border-radius: 13px; background: #c3ccd7; transition: background .15s; position: relative; }
.umschalter-bahn::after { content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.25); transition: transform .15s; }
.umschalter input:checked + .umschalter-bahn { background: var(--ok); }
.umschalter input:checked + .umschalter-bahn::after { transform: translateX(20px); }
.umschalter input:focus-visible + .umschalter-bahn { outline: 2px solid var(--akzent); outline-offset: 2px; }
.umschalter input:disabled + .umschalter-bahn { opacity: .55; }

/* ---------- Schmale Bildschirme ---------- */
@media (max-width: 900px) {
  .seitenleiste { position: fixed; left: 0; top: 0; bottom: 0; height: auto; max-width: 85vw; z-index: 50; transform: translateX(-100%); transition: transform .2s; }
  body.menue-offen .seitenleiste { transform: none; }
  body.menue-offen .schleier { display: block; position: fixed; inset: 0; background: rgba(0, 38, 61, .45); z-index: 40; }
  .menue-knopf { display: inline-flex; }
  .kopf { padding: 12px 16px 4px; position: sticky; top: 0; background: var(--grund); z-index: 10; }
  .inhalt { padding: 8px 16px 32px; }
  .widget-raster { grid-template-columns: 1fr; }
  .pfeil-knopf .icon { transform: rotate(90deg); }
  .breite-knopf { display: none; }
  .nur-breit { display: none; }
}
@media (max-width: 560px) {
  .raster-2, .raster-3 { grid-template-columns: 1fr; }
  .leiste-rechts { margin-left: 0; width: 100%; }
  .werkzeugleiste input[type=search] { max-width: none; }
  .dialog-aktionen { flex-wrap: wrap; }
}

/* ---------- Als App installieren ---------- */
.app-knopf { display: inline-flex; align-items: center; justify-content: center; gap: 8px; font: inherit; font-size: 13px; cursor: pointer; border-radius: 8px; }
.app-knopf[hidden] { display: none; }
.app-knopf-login { background: none; border: 1px dashed var(--rand-stark); color: var(--akzent); padding: 9px 12px; }
.app-knopf-login:hover { background: var(--akzent-zart, #eef4f8); }
.app-knopf-seite { margin-top: auto; background: rgba(255, 255, 255, .06); border: 1px solid var(--navy-2); color: var(--navy-text); padding: 9px 10px; }
.app-knopf-seite:hover { background: rgba(255, 255, 255, .12); color: #fff; }
.app-schritte { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.app-schritt { display: flex; gap: 12px; align-items: flex-start; line-height: 1.5; }
.app-schritt-nr { flex: none; width: 26px; height: 26px; border-radius: 50%; background: var(--akzent); color: #fff; display: grid; place-items: center; font-weight: 700; font-size: 13px; }
.app-teilen { display: inline-flex; vertical-align: -3px; color: #007aff; }
