/* ROTHEN DB — Einstellungen des Wand-Tablets (TabletEinstellungen.razor), Entwurf „ROTHEN DB Einstellungen“.
   Dialog in der Dashboard-Bühne (1920er-Einheiten): links Bereiche, rechts Inhalt. Farben als Variablen auf .ei-dialog,
   Dunkelmodus am Ende (:is(.tb-wisch, .tb-ueber).dunkel). */

.ei-dialog {
    --ei-karte: #FFFFFF; --ei-nav: #F7F8FA; --ei-flaeche: #F3F5F7; --ei-flaeche2: #E6E9ED; --ei-rand: #DCE1E6; --ei-linie: #E8EBEF;
    --ei-text: #15202B; --ei-muted: #566370; --ei-acc-soft: #F1E9F4; --ei-acc-text: #5E2B6E; --ei-voll: #5E2B6E;
    --ei-ok: #17694A; --ei-warn: #B26A00; --ei-warn-bg: #FFF4E0; --ei-warn-text: #7A4300;
    position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: 1540px; height: min(952px, calc(100% - 60px));
    border-radius: 28px; background: var(--ei-karte); color: var(--ei-text); overflow: hidden;
    display: grid; grid-template-columns: 380px minmax(0, 1fr); box-shadow: 0 30px 80px rgba(0, 0, 0, .35);
}
.ei-dialog button { font: inherit; cursor: pointer; }
.ei-dialog svg { flex: none; }

/* Navigation */
.ei-nav { background: var(--ei-nav); padding: 34px 22px 26px; display: flex; flex-direction: column; gap: 8px; border-right: 1px solid var(--ei-linie); min-height: 0; }
.ei-nav-kopf { padding: 0 12px 18px; display: flex; flex-direction: column; gap: 4px; }
.ei-nav-kopf b { font-size: 34px; font-weight: 800; letter-spacing: -.02em; }
.ei-nav-kopf span { font-size: 16px; color: var(--ei-muted); }
.ei-dialog .ei-nav-punkt { display: flex; align-items: center; gap: 16px; min-height: 92px; padding: 0 16px; border: 0; border-radius: 20px; background: transparent; color: var(--ei-text); text-align: left; }
.ei-dialog .ei-nav-punkt.an { background: var(--ei-karte); box-shadow: 0 1px 3px rgba(21, 32, 43, .08); }
.ei-nav-ico { width: 52px; height: 52px; flex: none; border-radius: 15px; background: var(--ei-flaeche2); color: var(--ei-muted); display: flex; align-items: center; justify-content: center; }
.ei-nav-punkt.an .ei-nav-ico { background: var(--ei-voll); color: #fff; }
.ei-nav-text { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.ei-nav-text b { font-size: 21px; font-weight: 800; }
.ei-nav-text span { font-size: 15px; color: var(--ei-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ei-status { margin-top: auto; padding: 18px 14px 0; border-top: 1px solid var(--ei-linie); display: flex; flex-direction: column; gap: 9px; font-size: 15px; color: var(--ei-muted); }
.ei-status > div { display: flex; align-items: center; gap: 10px; }
.ei-punkt { display: inline-block; width: 10px; height: 10px; flex: none; border-radius: 50%; background: var(--ei-muted); }
.ei-punkt.ok { background: var(--ei-ok); }
.ei-punkt.gedimmt { background: var(--ei-voll); opacity: .55; }
.ei-punkt.aus { background: transparent; border: 2px solid var(--ei-muted); box-sizing: border-box; }

/* Inhalt */
.ei-inhalt { position: relative; display: flex; flex-direction: column; min-width: 0; min-height: 0; }
.ei-kopf { display: flex; align-items: flex-start; gap: 20px; padding: 34px 40px 22px; }
.ei-kopf > div { flex: 1; min-width: 0; }
.ei-kopf h2 { margin: 0; font-size: 32px; font-weight: 800; letter-spacing: -.02em; }
.ei-kopf p { margin: 6px 0 0; font-size: 17px; color: var(--ei-muted); }
.ei-dialog .ei-x { width: 64px; height: 64px; flex: none; border: 0; border-radius: 18px; background: var(--ei-flaeche); color: var(--ei-text); display: flex; align-items: center; justify-content: center; }
.ei-scroll { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 0 40px 24px; display: flex; flex-direction: column; gap: 20px; }
.ei-fuss { display: flex; align-items: center; gap: 16px; padding: 20px 40px 26px; border-top: 1px solid var(--ei-linie); }
.ei-fuss > span { font-size: 16px; color: var(--ei-muted); margin-right: auto; }
.ei-fehler { margin: 0 40px 12px; }

/* Bausteine */
.ei-karte { border-radius: 22px; background: var(--ei-flaeche); padding: 22px 26px; display: flex; flex-direction: column; gap: 14px; }
.ei-karte.gedimmt { opacity: .5; }
.ei-lbl { font-size: 15px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--ei-muted); }
.ei-zwei { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.ei-zwei.eng { gap: 16px; }
.ei-drei { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.ei-zeile { display: flex; align-items: center; gap: 16px; }
.ei-zeile > .ei-lbl { margin-right: auto; }
.ei-wert { font-size: 30px; font-weight: 800; white-space: nowrap; font-variant-numeric: tabular-nums; }
.ei-wert small { font-size: 19px; font-weight: 600; }
.ei-dialog .ei-knopf { height: 72px; padding: 0 32px; border: 0; border-radius: 18px; background: var(--ei-flaeche); color: var(--ei-text); font-size: 19px; font-weight: 700; white-space: nowrap; }
.ei-dialog .ei-knopf.primaer { background: var(--ei-voll); color: #fff; font-weight: 800; padding: 0 40px; }
.ei-dialog .ei-knopf.rand { background: transparent; border: 1.5px solid currentColor; }
.ei-dialog .ei-knopf:disabled { opacity: .5; cursor: default; }
.ei-dialog .ei-meldung .ei-knopf { height: 64px; padding: 0 24px; font-size: 18px; }
.ei-dialog .ei-meldung .ei-knopf:not(.primaer):not(.rand) { background: var(--ei-karte); }

/* Ablauf-Band */
.ei-ablauf { flex-direction: row; align-items: center; gap: 14px; }
.ei-ablauf > .ei-lbl { margin-right: 8px; font-size: 14px; }
.ei-schritt { height: 56px; padding: 0 20px; border-radius: 16px; background: var(--ei-karte); display: inline-flex; align-items: center; gap: 10px; font-size: 18px; font-weight: 800; white-space: nowrap; }
.ei-schritt.leise { color: var(--ei-muted); }
.ei-pfeil { flex: 1; height: 2px; background: var(--ei-rand); position: relative; min-width: 40px; }
.ei-pfeil > span { position: absolute; left: 50%; top: -30px; transform: translateX(-50%); font-size: 15px; font-weight: 700; color: var(--ei-muted); white-space: nowrap; }

/* Segment */
.ei-segment { display: grid; grid-template-columns: repeat(var(--n, 4), minmax(0, 1fr)); gap: 6px; padding: 6px; border-radius: 18px; background: var(--ei-karte); border: 1.5px solid var(--ei-rand); }
.ei-dialog .ei-segment button { height: 68px; border: 0; border-radius: 13px; background: transparent; color: var(--ei-text); font-size: 22px; font-weight: 600; }
.ei-dialog .ei-segment button.an { background: var(--ei-voll); color: #fff; font-weight: 800; }

/* Regler */
.ei-regler { display: flex; align-items: center; gap: 14px; }
.ei-dialog input[type=range] { flex: 1; min-width: 0; width: 100%; height: 44px; accent-color: var(--ei-voll); touch-action: none; }
.ei-dialog .ei-rund { width: 64px; height: 64px; flex: none; border-radius: 50%; border: 1.5px solid var(--ei-rand); background: var(--ei-karte); color: var(--ei-text); font-size: 30px; font-weight: 600; line-height: 1; }

/* Wahl-Karten */
.ei-wahlen { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.ei-dialog .ei-wahl { min-height: 92px; padding: 14px 20px; border-radius: 18px; border: 1.5px solid var(--ei-rand); background: var(--ei-karte); color: var(--ei-text);
                      text-align: left; display: flex; align-items: center; gap: 16px; }
.ei-dialog .ei-wahl.an { border: 2.5px solid var(--ei-voll); background: var(--ei-acc-soft); }
.ei-wahl > span { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.ei-wahl b { font-size: 19px; font-weight: 800; }
.ei-wahl > span > span { font-size: 15px; color: var(--ei-muted); }
.ei-wahl > svg { color: var(--ei-muted); }
.ei-wahl.an > svg { color: var(--ei-acc-text); }

/* Nacht */
.ei-dialog .ei-zeit { height: 118px; border-radius: 20px; border: 1.5px solid var(--ei-rand); background: var(--ei-karte); color: var(--ei-text); display: flex; align-items: center; gap: 18px; padding: 0 26px; text-align: left; }
.ei-dialog .ei-zeit.an { border: 2.5px solid var(--ei-voll); }
.ei-dialog .ei-zeit.neu { border: 2.5px dashed var(--ei-voll); background: var(--ei-acc-soft); }
.ei-dialog .ei-zeit:disabled { cursor: default; opacity: .6; }
.ei-zeit > span { display: flex; flex-direction: column; gap: 2px; margin-right: auto; }
.ei-zeit > span > span { font-size: 16px; font-weight: 700; color: var(--ei-muted); }
.ei-zeit b { font-size: 50px; font-weight: 800; letter-spacing: -.02em; line-height: 1; font-variant-numeric: tabular-nums; }
.ei-zeit > svg { color: var(--ei-muted); }
.ei-band { position: relative; height: 22px; border-radius: 999px; background: var(--ei-karte); border: 1px solid var(--ei-rand); overflow: hidden; }
.ei-band > span { position: absolute; top: 0; bottom: 0; background: var(--ei-voll); opacity: .85; }
.ei-band.klein { height: 16px; overflow: visible; }
.ei-band.klein > span { opacity: 1; border-radius: 999px 0 0 999px; }
.ei-band.klein > span.zone { opacity: .3; border-radius: 0; }
.ei-band.klein > span.marke { top: -4px; bottom: -4px; width: 4px; border-radius: 2px; background: var(--ei-text); opacity: 1; }
.ei-skala { display: flex; justify-content: space-between; font-size: 14px; font-weight: 700; color: var(--ei-muted); margin-top: -6px; }
.ei-meldung { border-radius: 18px; padding: 16px 20px; display: flex; align-items: center; gap: 16px; }
.ei-meldung > span { flex: 1; display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.ei-meldung b { font-size: 19px; font-weight: 800; }
.ei-meldung > span > span { font-size: 16px; }
.ei-meldung.lila { background: var(--ei-acc-soft); color: var(--ei-acc-text); }
.ei-meldung.neu { background: var(--ei-karte); border: 2px dashed var(--ei-voll); }
.ei-meldung.neu > svg { color: var(--ei-acc-text); }
.ei-meldung.neu > span > span { color: var(--ei-muted); }
.ei-meldung.warn { background: var(--ei-warn-bg); color: var(--ei-warn-text); }
.ei-meldung.warn > svg { color: var(--ei-warn); }
.ei-hinweis { display: flex; align-items: center; gap: 10px; font-size: 16px; color: var(--ei-muted); }
.ei-hinweis > svg { width: 22px; height: 22px; }
.ei-hinweis.warn { color: var(--ei-warn-text); }

/* Darstellung */
.ei-dialog .ei-vorschau { padding: 16px; border-radius: 22px; border: 1.5px solid var(--ei-rand); background: var(--ei-karte); color: var(--ei-text); display: flex; flex-direction: column; gap: 14px; text-align: left; }
.ei-dialog .ei-vorschau.an { border: 2.5px solid var(--ei-voll); background: var(--ei-acc-soft); }
.ei-vorschau > b { font-size: 20px; font-weight: 800; padding: 0 6px 4px; display: flex; align-items: baseline; gap: 10px; }
.ei-vorschau > b > span { font-size: 15px; font-weight: 600; color: var(--ei-muted); }
.ei-bild { height: 150px; border-radius: 14px; padding: 14px; box-sizing: border-box; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.ei-bild i { border-radius: 9px; }
.ei-bild.hell { background: #F3F5F7; box-shadow: inset 0 0 0 1px #E3E7EB; }
.ei-bild.hell i { background: #FFFFFF; }
.ei-bild.dunkel { background: #0E1317; }
.ei-bild.dunkel i { background: #182027; }
.ei-bild.auto { background: linear-gradient(90deg, #F3F5F7 50%, #0E1317 50%); box-shadow: inset 0 0 0 1px #E3E7EB; }
.ei-bild.auto i:first-child { background: #FFFFFF; }
.ei-bild.auto i:last-child { background: #182027; }
.ei-chip { height: 40px; padding: 0 16px; border-radius: 999px; background: var(--ei-acc-soft); color: var(--ei-acc-text); display: inline-flex; align-items: center; gap: 8px; font-size: 16px; font-weight: 800; white-space: nowrap; }
.ei-chip i { width: 9px; height: 9px; border-radius: 50%; background: currentColor; }
.ei-legende { display: flex; gap: 26px; font-size: 16px; color: var(--ei-muted); }
.ei-legende b { color: var(--ei-text); }

/* Weitere */
.ei-liste { padding: 8px 10px; gap: 0; }
.ei-dialog .ei-reihe { min-height: 104px; padding: 0 18px; border: 0; border-bottom: 1px solid var(--ei-linie); background: transparent; color: var(--ei-text);
                       display: flex; align-items: center; gap: 18px; text-align: left; width: 100%; box-sizing: border-box; }
.ei-liste > .ei-reihe:last-child { border-bottom: 0; }
.ei-reihe-ico { width: 56px; height: 56px; flex: none; border-radius: 16px; background: var(--ei-karte); color: var(--ei-acc-text); display: flex; align-items: center; justify-content: center; }
.ei-reihe-text { flex: 1; display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.ei-reihe-text b { font-size: 21px; font-weight: 800; }
.ei-reihe-text span { font-size: 16px; color: var(--ei-muted); }
.ei-reihe-wert { font-size: 18px; font-weight: 700; white-space: nowrap; }
.ei-reihe-wert.ok { color: var(--ei-ok); }
.ei-reihe-wert.leise { color: var(--ei-muted); }
.ei-chev { display: inline-flex; color: var(--ei-muted); transition: transform .15s; }
.ei-chev.offen { transform: rotate(90deg); }
.ei-sensoren { display: flex; flex-wrap: wrap; gap: 10px; padding: 4px 18px 20px 92px; border-bottom: 1px solid var(--ei-linie); }
.ei-dialog .ei-sensoren button { height: 56px; padding: 0 20px; border-radius: 999px; border: 1.5px solid var(--ei-rand); background: var(--ei-karte); color: var(--ei-text); font-size: 18px; font-weight: 600; }
.ei-dialog .ei-sensoren button.an { border-color: var(--ei-voll); background: var(--ei-voll); color: #fff; font-weight: 800; }

/* Uhrzeit wählen */
.ei-pick-hg { position: absolute; inset: 0; background: rgba(21, 32, 43, .18); z-index: 2; }
.ei-pick { position: absolute; left: 40px; top: 120px; width: 900px; z-index: 3; border-radius: 26px; background: var(--ei-karte); border: 1px solid var(--ei-linie);
           box-shadow: 0 24px 60px rgba(0, 0, 0, .3); padding: 26px 28px; display: flex; flex-direction: column; gap: 16px; }
.ei-pick-kopf { display: flex; align-items: center; gap: 14px; }
.ei-pick-kopf > div { display: flex; flex-direction: column; margin-right: auto; }
.ei-pick-kopf > div > span { font-size: 16px; font-weight: 700; color: var(--ei-muted); }
.ei-pick-kopf b { font-size: 48px; font-weight: 800; letter-spacing: -.02em; line-height: 1.05; font-variant-numeric: tabular-nums; }
.ei-dialog .ei-pick-kopf .ei-knopf { height: 64px; }
.ei-pick-raster { display: grid; gap: 8px; }
.ei-pick-raster.stunden { grid-template-columns: repeat(8, minmax(0, 1fr)); }
.ei-pick-raster.minuten { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.ei-dialog .ei-pick-raster button { height: 58px; border-radius: 14px; border: 1.5px solid var(--ei-rand); background: var(--ei-karte); color: var(--ei-text); font-size: 20px; font-weight: 600; font-variant-numeric: tabular-nums; }
.ei-dialog .ei-pick-raster button.an { border-color: var(--ei-voll); background: var(--ei-voll); color: #fff; font-weight: 800; }

/* ═════════════ Dunkelmodus ═════════════ */
:is(.tb-wisch, .tb-ueber).dunkel .ei-dialog {
    --ei-karte: #182027; --ei-nav: #141B21; --ei-flaeche: #212A32; --ei-flaeche2: #29333C; --ei-rand: #3A4651; --ei-linie: #26313A;
    --ei-text: #E9EEF2; --ei-muted: #A3B0BC; --ei-acc-soft: #3A2647; --ei-acc-text: #EBD8F5; --ei-voll: #8E5BA6;
    --ei-ok: #6FD39A; --ei-warn: #F2B45A; --ei-warn-bg: #3A2A12; --ei-warn-text: #F5C98A;
}
:is(.tb-wisch, .tb-ueber).dunkel .ei-dialog input[type=range] { color-scheme: dark; }
:is(.tb-wisch, .tb-ueber).dunkel .ei-pick-hg { background: rgba(0, 0, 0, .3); }
:is(.tb-wisch, .tb-ueber).dunkel .ei-bild.hell, :is(.tb-wisch, .tb-ueber).dunkel .ei-bild.auto { box-shadow: none; }
