/* VERA – Themes (wie MIRA). Auswahl oben rechts, gespeichert im Browser (localStorage "vera.theme").
   data-theme = Farben, data-stil = konsole (Look der Home-Assistant-Karten) oder flach. */

/* ---------- Farben ---------- */
:root,[data-theme=konsole]{--bg:#0d0e10;--karte:#1d1f23;--text:#e2e4e8;--leise:#9a9fa8;--rand:rgba(255,255,255,.07);--akzent:#ff8c1a;--akzent2:#ffb347;
  --ok:#3ddc84;--warn:#ffb347;--bad:#ff5252;--code:rgba(0,0,0,.45);--seite:#121316;--schatten:none;--auf-akzent:#1a0b02;color-scheme:dark}
[data-theme=konsole-blau]{--akzent:#4dc3ff;--akzent2:#64b5f6;--auf-akzent:#04121a}
[data-theme=konsole-gruen]{--akzent:#3ddc84;--akzent2:#4dc3ff;--auf-akzent:#06140c}
[data-theme=dunkel]{--bg:#0f1318;--karte:#171c23;--text:#e6e9ee;--leise:#9aa5b5;--rand:#29303b;--akzent:#8f83ff;--akzent2:#4f9bff;
  --ok:#3cc28f;--warn:#e3a33a;--bad:#ff6b57;--code:#11161c;--schatten:none;--seite:#12171d;--auf-akzent:#fff;color-scheme:dark}
[data-theme=hell]{--bg:#f4f6f9;--karte:#fff;--text:#1d2430;--leise:#5d6676;--rand:#e3e7ee;--akzent:#5b4bdb;--akzent2:#0f6fd6;
  --ok:#12805c;--warn:#b26b00;--bad:#c4321c;--code:#f0f2f6;--schatten:0 1px 3px rgba(16,24,40,.08);--seite:#fbfbfd;--auf-akzent:#fff;color-scheme:light}
button.p{color:var(--auf-akzent)}

/* ---------- Konsole: Platten, eingelassene Felder, plastische Knöpfe, LEDs ---------- */
[data-stil=konsole] body{background:radial-gradient(ellipse 120% 70% at 50% -10%,#24262b 0%,#111215 55%,#0b0c0e 100%) fixed;
  font-family:"Segoe UI",system-ui,-apple-system,Roboto,sans-serif}
[data-stil=konsole] .karte,[data-stil=konsole] .dialog,[data-stil=konsole] #hinweis{border-radius:18px;background:linear-gradient(180deg,rgba(50,52,58,.78),rgba(24,25,29,.88));
  border:1px solid rgba(255,255,255,.07);box-shadow:0 0 0 1px #000,inset 0 1px 0 rgba(255,255,255,.14),inset 0 -1px 0 rgba(0,0,0,.6),0 16px 30px rgba(0,0,0,.5)}
[data-stil=konsole] .kachel{border-radius:16px;background:linear-gradient(180deg,rgba(46,48,54,.8),rgba(22,23,27,.9));border:1px solid rgba(255,255,255,.06);
  box-shadow:0 0 0 1px #000,inset 0 1px 0 rgba(255,255,255,.12),0 10px 22px rgba(0,0,0,.45)}
[data-stil=konsole] .kachel .w{font-family:ui-monospace,"Cascadia Mono",Consolas,monospace;color:var(--akzent);text-shadow:0 0 12px color-mix(in srgb,var(--akzent) 55%,transparent)}
[data-stil=konsole] .kachel .l,[data-stil=konsole] th,[data-stil=konsole] aside h4,[data-stil=konsole] .feld>span{text-transform:uppercase;letter-spacing:1.2px;font-size:11px;color:var(--leise)}
[data-stil=konsole] .karte h2,[data-stil=konsole] .dialog h3,[data-stil=konsole] .oben h1,[data-stil=konsole] .kachel .t{text-transform:uppercase;letter-spacing:1.6px;font-weight:700}
[data-stil=konsole] .karte h2{font-size:13.5px}
[data-stil=konsole] .karte h2 .rechts,[data-stil=konsole] .karte h2 .marke{text-transform:none;letter-spacing:0}

/* Knöpfe */
[data-stil=konsole] button{border:0;border-radius:9px;color:#c9ccd2;background:linear-gradient(180deg,#34363b,#222327);font-weight:600;
  box-shadow:0 3px 0 #0b0b0c,0 5px 8px rgba(0,0,0,.5),inset 0 1px 0 rgba(255,255,255,.1);transition:transform .06s,box-shadow .06s,color .15s}
[data-stil=konsole] button:hover{color:#f0f1f3;border:0}
[data-stil=konsole] button:active:not(:disabled){transform:translateY(2px);box-shadow:0 1px 0 #0b0b0c,0 3px 5px rgba(0,0,0,.5),inset 0 1px 0 rgba(255,255,255,.1)}
[data-stil=konsole] button.p{color:var(--auf-akzent);background:linear-gradient(180deg,color-mix(in srgb,var(--akzent) 82%,#fff),var(--akzent));
  box-shadow:0 3px 0 color-mix(in srgb,var(--akzent) 35%,#000),0 5px 12px color-mix(in srgb,var(--akzent) 25%,transparent),inset 0 1px 0 rgba(255,255,255,.35)}
[data-stil=konsole] button.gefahr{color:var(--bad)}
[data-stil=konsole] button.p.gefahr{color:#fff;background:linear-gradient(180deg,#ff6b6b,#d63b3b);box-shadow:0 3px 0 #5a1414,0 5px 12px rgba(255,82,82,.25),inset 0 1px 0 rgba(255,255,255,.3)}
[data-stil=konsole] .chip button,[data-stil=konsole] .tabs button:not(.an){box-shadow:none;background:none}

/* Eingabefelder: eingelassen */
[data-stil=konsole] input:not([type=checkbox]):not([type=radio]),[data-stil=konsole] select,[data-stil=konsole] textarea{border:0;border-radius:8px;
  background:rgba(0,0,0,.45);color:#e2e4e8;box-shadow:inset 0 2px 5px rgba(0,0,0,.6),0 1px 0 rgba(255,255,255,.05)}
[data-stil=konsole] input:focus,[data-stil=konsole] select:focus,[data-stil=konsole] textarea:focus{outline:1px solid color-mix(in srgb,var(--akzent) 60%,transparent);outline-offset:0}
[data-stil=konsole] select option{background:#1d1f23}
[data-stil=konsole] input[type=checkbox],[data-stil=konsole] input[type=radio]{accent-color:var(--akzent)}

/* LCD-Flächen */
[data-stil=konsole] pre,[data-stil=konsole] textarea{background:linear-gradient(180deg,#110e0a,#060504);box-shadow:inset 0 4px 10px #000,0 1px 0 rgba(255,255,255,.08);
  color:#d8dbe0;font-family:ui-monospace,"Cascadia Mono",Consolas,monospace}

/* LEDs */
[data-stil=konsole] .punkt{width:9px;height:9px;background:#555;box-shadow:0 0 0 2px #000}
[data-stil=konsole] .punkt.ok{background:var(--ok);box-shadow:0 0 0 2px #000,0 0 9px var(--ok)}
[data-stil=konsole] .punkt.warn{background:var(--warn);box-shadow:0 0 0 2px #000,0 0 9px var(--warn)}
[data-stil=konsole] .punkt.bad{background:var(--bad);box-shadow:0 0 0 2px #000,0 0 9px var(--bad)}

/* Marken, Chips */
[data-stil=konsole] .marke,[data-stil=konsole] .chip{background:rgba(0,0,0,.35);box-shadow:inset 0 1px 3px rgba(0,0,0,.5)}
[data-stil=konsole] .marke.ok{background:#1f2f25;color:#8fe3a8}
[data-stil=konsole] .marke.bad{background:#3a2424;color:#ffab91}
[data-stil=konsole] .marke.warn{background:#3a2f1f;color:#ffd08a}
[data-stil=konsole] .marke.akz{color:var(--akzent)}

/* Tabellen */
[data-stil=konsole] th,[data-stil=konsole] td{border-bottom:1px solid rgba(255,255,255,.045)}
[data-stil=konsole] tr.klick:hover td{background:rgba(255,255,255,.03)}
[data-stil=konsole] tr.an td{background:color-mix(in srgb,var(--akzent) 9%,transparent)}

/* Reiter als Segment-Schalter */
[data-stil=konsole] .tabs{border:0;gap:4px;padding:3px;border-radius:11px;background:rgba(0,0,0,.35);box-shadow:inset 0 2px 5px rgba(0,0,0,.6);display:inline-flex}
[data-stil=konsole] .tabs button{border-radius:8px;padding:7px 14px;font-size:11.5px;letter-spacing:1.3px;text-transform:uppercase;font-weight:700;color:#9a9ea6}
[data-stil=konsole] .tabs button.an{color:#f0f1f3;background:linear-gradient(180deg,#34363b,#222327);
  box-shadow:0 1px 0 #0b0b0c,0 3px 5px rgba(0,0,0,.5),inset 0 1px 0 rgba(255,255,255,.1),inset 0 -2px 0 var(--akzent)}

/* Navigation */
[data-stil=konsole] aside{background:linear-gradient(180deg,rgba(26,27,31,.96),rgba(12,13,15,.98));border-right:1px solid rgba(255,255,255,.05);box-shadow:1px 0 0 #000}
[data-stil=konsole] aside .logo{letter-spacing:0}
[data-stil=konsole] aside .logo small{text-transform:none;letter-spacing:.2px}
[data-stil=konsole] aside a.nav{color:#c9ccd2;border-radius:9px}
[data-stil=konsole] aside a.nav:hover{background:rgba(255,255,255,.04)}
[data-stil=konsole] aside a.nav.an{background:rgba(0,0,0,.4);color:#f0f1f3;box-shadow:inset 0 2px 5px rgba(0,0,0,.6),0 1px 0 rgba(255,255,255,.05)}
[data-stil=konsole] aside a.nav.an::before{content:"";width:7px;height:7px;border-radius:50%;background:var(--akzent);box-shadow:0 0 8px var(--akzent);flex:none}
[data-stil=konsole] aside a.nav.aus{color:#80848d}
[data-stil=konsole] .oben{background:rgba(16,17,20,.88);backdrop-filter:blur(8px);border-bottom:1px solid rgba(255,255,255,.05);box-shadow:0 1px 0 #000}

/* Auswahl-Kacheln, Schritte */
[data-stil=konsole] .wahl label,[data-stil=konsole] .schritte div{background:rgba(0,0,0,.28);border:1px solid rgba(255,255,255,.06);box-shadow:inset 0 1px 3px rgba(0,0,0,.4)}
[data-stil=konsole] .wahl label:has(input:checked){border-color:color-mix(in srgb,var(--akzent) 70%,transparent);background:color-mix(in srgb,var(--akzent) 7%,rgba(0,0,0,.28));
  box-shadow:0 0 14px color-mix(in srgb,var(--akzent) 18%,transparent)}
[data-stil=konsole] .schritte div.an{border-color:var(--akzent);box-shadow:inset 0 -2px 0 var(--akzent),0 0 12px color-mix(in srgb,var(--akzent) 18%,transparent)}
[data-stil=konsole] .schritte div b{text-transform:uppercase;letter-spacing:1.2px;font-size:12px}

[data-stil=konsole] .dialog-hg{background:rgba(0,0,0,.6);backdrop-filter:blur(2px)}
[data-stil=konsole] details summary{cursor:pointer;color:#c9ccd2;letter-spacing:.6px}
[data-stil=konsole] a{color:var(--akzent2)}
[data-stil=konsole] ::-webkit-scrollbar{width:10px;height:10px}
[data-stil=konsole] ::-webkit-scrollbar-thumb{background:#2b2d32;border-radius:8px;border:2px solid #111215}
[data-stil=konsole] ::-webkit-scrollbar-track{background:transparent}

/* Theme-Auswahl */
.theme-wahl{font-size:12.5px;padding:4px 8px}
.ecke{position:fixed;top:12px;right:14px;z-index:20}
