/* Seite Einstellungen (einstellungen.js, wie EinstellungenView.swift; Mockup 12.11.2026). Farben nur aus den Tokens.
   Computer: links die Abschnitte mit ihrem Stand, rechts der gewählte. Handy (unter 900 px): erst die Liste, dann der
   Abschnitt mit „Einstellungen“ zurück. */
.es-seite { background: var(--grund); }
.es-kopf { flex: none; padding: 26px 40px 0; }
.es-kopf h1 { font-size: 30px; font-weight: 400; letter-spacing: -1px; margin: 0 0 8px; line-height: 1.15; }
.es-lage { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--text2); flex-wrap: wrap; min-height: 20px; }
.es-lage b { font-weight: 580; color: var(--text); }
.es-trenner { width: 3px; height: 3px; border-radius: 50%; background: var(--text3); flex: none; }
.es-punkt { width: 7px; height: 7px; border-radius: 50%; background: var(--text3); flex: none; }
.es-punkt.gut { background: var(--gut); }
.es-punkt.problem { background: var(--signal); }
.es-loesen { font-size: 13px; font-weight: 580; color: var(--akzent-text); padding: 0; white-space: nowrap; }
.es-loesen:hover { text-decoration: underline; text-underline-offset: 3px; }

.es-koerper { flex: 1; min-height: 0; display: flex; gap: 36px; padding: 24px 40px 0; }
.es-nav { width: 230px; flex: none; display: flex; flex-direction: column; gap: 2px; }
.es-nav button { text-align: left; border-radius: var(--r-zeile); padding: 9px 12px; display: block; color: var(--text); }
.es-nav button b { display: block; font-weight: 560; font-size: 14.5px; }
.es-nav button span { display: block; font-size: 12.5px; color: var(--text3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-height: 18px; }
.es-nav button:hover { background: var(--flaeche); }
.es-nav button.an { background: var(--flaeche2); }
.es-nav button.an b { font-weight: 640; }
.es-inhalt { flex: 1; min-width: 0; overflow-y: auto; overscroll-behavior-y: contain; padding: 0 4px 60px 0; }
.es-blatt { max-width: 620px; animation: es-rein .22s ease-out; }
@keyframes es-rein { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.es-h2 { display: flex; align-items: baseline; gap: 14px; }
.es-h2 h2 { font-size: 24px; font-weight: 420; letter-spacing: -.7px; margin: 4px 0 6px; }
.es-lead { color: var(--text2); margin: 0 0 22px; max-width: 34em; text-wrap: pretty; font-size: 15px; line-height: 1.45; }
.es-zurueck { display: none; }

/* Karte mit Zeilen (EinstellungKarte, EinstellungZeile) */
.es-karte { background: var(--flaeche); border: 1px solid var(--linie); border-radius: var(--r-karte); margin: 0 0 16px; overflow: hidden; }
.es-reihe { display: flex; align-items: center; gap: 14px; padding: 14px 18px; border-top: 1px solid var(--linie); min-height: 58px; }
.es-reihe:first-child { border-top: 0; }
.es-t { flex: 1; min-width: 0; }
.es-t b { display: block; font-weight: 560; font-size: 15px; }
.es-t > span { display: block; font-size: 13px; color: var(--text3); line-height: 1.4; }
.es-reihe.aus .es-t { opacity: .45; }
.es-reihe.warnung .es-t > span { color: var(--signal); }
.es-titel { font-size: 12.5px; font-weight: 600; color: var(--text3); margin: 22px 0 8px 4px; }
.es-titel.innen { margin: 14px 0 0 18px; }
.es-klein { font-size: 13px; color: var(--text3); line-height: 1.45; }
p.es-klein { margin: 0 4px; }
.es-zeile { display: flex; gap: 12px; align-items: center; }
.es-unten { display: flex; gap: 12px; align-items: center; padding: 0 4px; }

/* Knöpfe der Seite (eigene, der globale .knopf ist für Blätter gebaut) */
.es-knopf { flex: none; border: 1px solid var(--linie); background: var(--grund); color: var(--text); border-radius: var(--r-zeile); padding: 8px 14px; font-weight: 580; font-size: 14px; white-space: nowrap; transition: transform .08s; }
.es-knopf:active { transform: scale(.98); }
.es-knopf:disabled { opacity: .5; }
.es-knopf.haupt { background: var(--akzent); color: var(--auf-akzent); border-color: transparent; }
.es-knopf.gefahr { background: var(--signal); color: var(--auf-akzent); border-color: transparent; }
.es-knopf.gross { padding: 12px 20px; font-size: 15px; border-radius: var(--r-knopf); }
.es-knopf.rot { color: var(--signal); }
.es-leise { padding: 0; color: var(--text3); font-weight: 500; font-size: inherit; text-decoration: underline; text-decoration-color: var(--linie); text-underline-offset: 3px; }
.es-leise:hover { color: var(--text); }
.es-blatt > .es-karte .es-leise { font-size: 13.5px; }
.es-ok { font-size: 13px; font-weight: 560; color: var(--gut); opacity: 0; transition: opacity .2s; white-space: nowrap; }
.es-ok.da { opacity: 1; }
.es-feld { flex: 1; min-width: 0; font-size: 16px; padding: 10px 13px; border-radius: var(--r-zeile); border: 1px solid var(--linie); background: var(--grund); color: var(--text); }
.es-feld:focus { outline: 2px solid var(--akzent-text); outline-offset: 0; }
.es-fehler { color: var(--signal); font-size: 13.5px; font-weight: 500; margin: 10px 0 0; min-height: 20px; }

/* Wahl in einer Kapsel (Segment), z. B. Freigabe-Fenster */
.es-wahl { display: inline-flex; background: var(--flaeche2); border-radius: var(--r-zeile); padding: 3px; gap: 2px; flex: none; }
.es-wahl button { border-radius: 8px; padding: 6px 12px; font-size: 13.5px; font-weight: 560; color: var(--text2); white-space: nowrap; }
.es-wahl button.an { background: var(--grund); color: var(--text); box-shadow: 0 1px 3px var(--schatten-karte); }

/* Deine Chefin */
.es-c-kopf { display: flex; align-items: center; gap: 18px; padding: 20px 18px; }
.es-c-name { font-size: 26px; font-weight: 440; letter-spacing: -.8px; line-height: 1.1; }
.es-c-kopf .es-klein { margin-top: 3px; }
.es-avatare { padding: 4px 18px 18px; }
.es-avatare .avatar-wahl { margin: 6px 0 0; }

/* Geräte */
.es-g-bild { width: 38px; height: 38px; border-radius: 11px; background: var(--flaeche2); display: grid; place-items: center; flex: none; }
.es-g-bild i { display: block; border: 1.8px solid var(--text2); border-radius: 3px; }
.es-g-bild .laptop { width: 20px; height: 13px; border-bottom-width: 4px; }
.es-g-bild .handy { width: 11px; height: 19px; }
.es-g-bild .anders { width: 15px; height: 15px; border-radius: 4px; }
.es-hier { font-size: 11.5px; font-weight: 620; color: var(--gut); border: 1px solid currentColor; border-radius: var(--r-pille); padding: 1px 8px; margin-left: 8px; vertical-align: 2px; white-space: nowrap; }
.es-qr-feld { display: flex; gap: 22px; align-items: center; padding: 20px 18px; border-top: 1px solid var(--linie); flex-wrap: wrap; }
.es-qr { width: 148px; flex: none; background: var(--k-weiss); color: var(--rolle-papier-schrift); border-radius: 12px; padding: 8px; line-height: 0; border: 1px solid var(--linie); }
.es-qr svg { width: 100%; height: auto; }
.es-qr-text { flex: 1; min-width: 200px; }
.es-qr-text ol { margin: 0 0 10px; padding-left: 20px; }
.es-qr-text li { margin: 3px 0; }
.es-qr-text .es-leise { margin-top: 10px; font-size: 13.5px; }
.es-code { font-family: ui-monospace, Menlo, monospace; font-size: 17px; font-weight: 600; letter-spacing: 2px; margin: 2px 0; }

/* Mitteilungen */
.es-zeitraum { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; color: var(--text3); }
.es-zeit { border: 1px solid var(--linie); background: var(--grund); color: var(--text); border-radius: 9px; padding: 6px 9px; font-size: 14.5px; font-variant-numeric: tabular-nums; }

/* PIN */
.es-pin-feld { padding: 18px; }
.es-pin-feld > p:first-child { margin: 0 0 10px; font-weight: 540; }
.es-pin { display: flex; gap: 8px; }
.es-pin input { width: 46px; height: 56px; text-align: center; font-size: 24px; border-radius: var(--r-knopf); border: 1px solid var(--linie); background: var(--grund); color: var(--text); letter-spacing: 0; }
.es-pin input:focus { outline: 2px solid var(--akzent-text); outline-offset: 0; }
.es-pin-frei { display: flex; gap: 10px; max-width: 320px; }

/* Darstellung: drei Vorschau-Kacheln in festen Farben (hell bzw. dunkel, unabhängig vom gewählten Aussehen) */
.es-themen { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.es-thema { border: 2px solid var(--linie); border-radius: var(--r-karte); padding: 10px 10px 12px; background: var(--flaeche); text-align: left; color: var(--text); }
.es-thema.an { border-color: var(--akzent-text); }
.es-bild { height: 84px; border-radius: 9px; overflow: hidden; display: flex; margin-bottom: 10px; border: 1px solid var(--linie); }
.es-bild > span { flex: 1; padding: 10px 9px; display: flex; flex-direction: column; gap: 6px; }
.es-bild i { height: 6px; border-radius: 3px; display: block; }
.es-b-hell { background: var(--rolle-tinte-schrift); }
.es-b-hell i { background: color-mix(in srgb, var(--rolle-papier-schrift) 16%, transparent); }
.es-b-hell i:first-child { background: var(--rolle-papier-schrift); width: 55%; }
.es-b-dunkel { background: var(--rolle-papier-schrift); }
.es-b-dunkel i { background: color-mix(in srgb, var(--rolle-tinte-schrift) 22%, transparent); }
.es-b-dunkel i:first-child { background: var(--rolle-tinte-schrift); width: 55%; }
.es-thema b { font-weight: 600; display: block; }
.es-thema small { font-size: 12.5px; color: var(--text3); }

/* Systemcheck */
.es-gp-kopf { display: flex; align-items: center; gap: 16px; padding: 18px; }
.es-gross { font-size: 20px; font-weight: 460; letter-spacing: -.5px; }
.es-check { width: 22px; height: 22px; border-radius: 50%; flex: none; display: grid; place-items: center; font-size: 12px; font-weight: 700; color: var(--grund); background: var(--gut); }
.es-check svg { width: 13px; height: 13px; stroke-width: 3; }
.es-check.problem { background: var(--signal); }
.es-check.wartet { background: var(--linie); }
.es-check.laeuft { background: none; border: 2.5px solid var(--linie); border-top-color: var(--akzent-text); animation: es-dreh .7s linear infinite; }
@keyframes es-dreh { to { transform: rotate(360deg); } }
.es-check-reihe { align-items: flex-start; }
.es-check-reihe .es-check { margin-top: 2px; }
.es-check-reihe .es-loesen { margin-top: 2px; }
.es-hinweis { display: block; font-size: 13px; color: var(--signal); margin-top: 3px; line-height: 1.4; }

/* Hilfe */
.es-h-form { padding: 16px 18px 18px; }
.es-h-form textarea.es-feld { width: 100%; min-height: 96px; resize: vertical; display: block; font-size: 15px; }

/* Fuß der Seitenleiste: Zahnrad zeigt, dass die Einstellungen offen sind */
.symbol-knopf.an { background: var(--flaeche2); color: var(--text); }

@media (prefers-reduced-motion: reduce) { .es-blatt, .es-check.laeuft { animation: none; } }

/* ---------- Handy: erst die Liste, dann der Abschnitt ---------- */
@media (max-width: 899px) {
  .es-seite { overflow-y: auto; overscroll-behavior-y: contain; -webkit-overflow-scrolling: touch; }
  .es-kopf { padding: 20px 18px 0; }
  .es-kopf h1 { font-size: 26px; }
  .es-host, .es-lage .es-trenner { display: none; }
  .es-geprueft { flex-basis: 100%; }
  .es-koerper { flex: none; min-height: auto; padding: 16px 14px 24px; gap: 0; }
  .es-nav { width: 100%; background: var(--flaeche); border: 1px solid var(--linie); border-radius: var(--r-karte); gap: 0; height: fit-content; overflow: hidden; }
  .es-nav button { border-radius: 0; padding: 12px 36px 12px 16px; border-top: 1px solid var(--linie); position: relative; }
  .es-nav button:first-child { border-top: 0; }
  .es-nav button::after { content: ""; position: absolute; right: 18px; top: 50%; width: 7px; height: 7px; border-top: 1.8px solid var(--text3); border-right: 1.8px solid var(--text3); transform: translateY(-50%) rotate(45deg); }
  .es-nav button.an { background: none; }
  .es-nav button.an b { font-weight: 560; }
  .es-inhalt { display: none; padding-right: 0; overflow: visible; }
  .es-seite.offen .es-nav, .es-seite.offen .es-kopf { display: none; }
  .es-seite.offen .es-inhalt { display: block; padding-top: 4px; padding-bottom: 24px; }
  .es-seite.offen .es-koerper { padding-top: 10px; }
  .es-zurueck { display: inline-flex; align-items: center; gap: 2px; color: var(--akzent-text); font-weight: 580; padding: 4px 0 10px; margin-left: -4px; }
  .es-zurueck svg { width: 18px; height: 18px; stroke-width: 2.2; }
  .es-themen { gap: 8px; }
  .es-bild { height: 60px; }
  .es-thema small { display: none; }
  .es-reihe { padding: 12px 14px; }
  .es-reihe.mit-wahl { flex-wrap: wrap; }
  .es-reihe.mit-wahl .es-wahl { width: 100%; }
  .es-reihe.mit-wahl .es-wahl button { flex: 1; }
  .es-pin input { width: 40px; height: 50px; }
  .es-c-kopf { padding: 16px 14px; gap: 14px; }
  .es-avatare { padding: 4px 14px 14px; }
  .es-gp-kopf { flex-wrap: wrap; padding: 16px 14px; }
  .es-qr-feld { padding: 16px 14px; }
}
