
:root{font-family:Manrope,system-ui,sans-serif;color:#173439;background:#eef3f4;font-size:16px;--ink:#173439;--teal:#177c79;--line:#d9e3e5}*{box-sizing:border-box}body{margin:0}button,input,select{font:inherit}button{cursor:pointer}button:focus-visible,input:focus-visible,select:focus-visible,a:focus-visible{outline:3px solid #ee982e;outline-offset:3px}header{background:#fff;min-height:94px;border-bottom:1px solid var(--line);padding:18px 4%;display:flex;align-items:center;justify-content:space-between;gap:24px}.brand{display:flex;align-items:center;gap:12px;text-decoration:none;color:var(--ink);font-weight:800;font-size:20px}.brandmark{background:#173439;color:#ffa65a;border-radius:12px;padding:9px 13px;font-size:27px}.brand small{display:block;font-size:12px;letter-spacing:.08em;color:#75888a;font-weight:600;margin-top:3px}nav{display:flex;gap:5px}.nav{border:0;background:none;padding:12px 18px;border-radius:9px;color:#62787d;font-size:14px;font-weight:700}.nav.active{background:#e8f3f1;color:#12635f}.modebadge{font-size:12px;font-weight:800;letter-spacing:.1em;background:#fff0d9;color:#9a650d;border:1px solid #ead3a6;border-radius:6px;padding:8px 11px}main{max-width:1450px;margin:auto;padding:38px 4% 22px}.pagetop{display:flex;justify-content:space-between;gap:15px;align-items:center}.eyebrow{font-size:12px;color:#177c79;font-weight:800;letter-spacing:.16em}h1{font-size:34px;line-height:1.2;letter-spacing:-.035em;margin:10px 0}p{color:#6c8185;line-height:1.6;margin:5px 0 12px}h2{font-size:18px;margin:0;letter-spacing:-.02em}h3{font-size:16px}.season{background:#dfe9e9;padding:5px;border-radius:10px;display:flex}.season button{background:none;border:0;padding:10px 18px;border-radius:7px;font-size:14px;color:#5a7074}.season button.selected{background:#fff;color:#173439;box-shadow:0 2px 6px #152e3210;font-weight:700}.notice{font-size:14px;color:#85621c;padding:11px 15px;background:#fbf4e5;border:1px solid #eddebf;border-radius:8px;margin:20px 0 22px}.metrics{display:grid;grid-template-columns:repeat(4,1fr);gap:16px;margin-bottom:24px}.metrics article,.panel,.tankcard,.rulecard{border:1px solid var(--line);background:white;border-radius:13px}.metrics article{padding:22px}.metrics span{font-size:14px;color:#70858a}.metrics strong{display:block;font-size:29px;font-weight:800;margin:8px 0;letter-spacing:-.04em}.metrics small{font-size:12px;color:#7d9195}.meter{height:5px;background:#e5eeee;border-radius:8px;margin-top:16px}.meter i{display:block;height:100%;background:#19817e;border-radius:8px}.panelhead{display:flex;justify-content:space-between;align-items:center;gap:15px;padding:22px 25px;border-bottom:1px solid #edf1f2}.panelhead p{font-size:13px;margin:6px 0 0}.legend{display:flex;align-items:center;gap:7px;font-size:12px;color:#6c8185}.hotdot,.colddot{width:9px;height:9px;border-radius:50%;background:#ed8b57;margin-left:9px}.colddot{background:#5e9fd2}.schematic-scroll{overflow-x:auto;padding:5px 10px}svg{width:100%;min-width:760px;display:block}svg text{font-family:Manrope,system-ui,sans-serif}svg .pipe{fill:none;stroke-width:7;stroke-linecap:round;stroke-linejoin:round}svg .flow{fill:none;stroke-width:2;stroke-dasharray:2 17;stroke-linecap:round;animation:flow 1.1s linear infinite}@keyframes flow{to{stroke-dashoffset:-38}}.schemefooter{display:flex;justify-content:space-between;gap:14px;font-size:12px;padding:15px 25px;background:#f9fbfb;border-radius:0 0 13px 13px;border-top:1px solid #e9eff0}.schemefooter span:first-child{color:#177c79;font-weight:700}.schemefooter span:last-child{color:#819295}.sectionhead{display:flex;justify-content:space-between;align-items:center;margin:27px 0 16px}.sectionhead span{color:#7a8d91;font-size:13px}.tankgrid{display:grid;grid-template-columns:repeat(4,1fr);gap:16px}.tankcard{padding:20px}.tanktop{display:flex;justify-content:space-between;align-items:center}.tanktop span{font-size:12px;color:#72868a}.tankbody{display:flex;gap:24px;margin-top:20px;align-items:center}.tankvisual{width:63px;height:180px;border-radius:22px;border:4px solid #e8eeee;overflow:hidden;display:flex;flex-direction:column;flex-shrink:0}.tankvisual i{height:20%;border-bottom:1px solid #ffffff60}.tankdetails{flex:1}.tankdetails strong{font-size:27px;letter-spacing:-.05em;display:block;margin-bottom:13px}.reading{display:flex;justify-content:space-between;gap:8px;font-size:13px;margin:6px 0;color:#74888c}.reading b{color:#284b51;font-weight:600}.tankbottom{font-size:12px;color:#839598;border-top:1px solid #edf1f2;padding-top:13px;margin-top:19px}.panelbody{padding:24px}.rulegrid{display:grid;grid-template-columns:1fr 1fr;gap:20px}.rulecard{padding:24px}.ruleheading{display:flex;justify-content:space-between;align-items:center;margin-bottom:14px}.ruleheading input,.switchrow input{width:21px;height:21px;accent-color:#177c79}.rulecard p{font-size:14px}.fields{display:grid;grid-template-columns:1fr 1fr;gap:12px}.field{display:flex;flex-direction:column;gap:7px;font-size:14px;color:#516e74;margin:12px 0}.field input,.field select{border:1px solid #cedcde;background:#f8fbfb;border-radius:7px;padding:9px;width:100%;color:#173439;min-height:42px}.field input[type=range]{padding:0;accent-color:#177c79}.condition{background:#f4f8f8;border-radius:9px;padding:14px;margin-top:15px}.condition h3{margin:0;color:#177c79;font-size:14px}.formfooter{display:flex;justify-content:space-between;align-items:center;gap:20px;margin-top:22px}.formfooter span{font-size:14px;color:#6a8185}.primary,.secondary{border:0;border-radius:8px;padding:12px 20px;font-weight:700;font-size:14px;background:#173f42;color:white}.secondary{background:#e9f1f1;color:#244c50}.systemgrid{display:grid;grid-template-columns:1fr 1.4fr;gap:22px}.switchrow{display:flex;justify-content:space-between;align-items:center;font-size:14px;padding:12px 0}.muted{font-size:14px;color:#768c90}.sensorblock{padding:12px 0;border-bottom:1px solid #e5eded}.sensorinputs{display:grid;grid-template-columns:repeat(5,1fr);gap:8px}.sensorinputs .field{font-size:12px}.sensorinputs input{min-width:0;padding:7px;font-size:14px}dl{display:grid;grid-template-columns:1fr 1fr;gap:18px;font-size:14px}dt{color:#778d91}dd{margin:0;text-align:right}.importlabel{display:block;margin-top:20px;font-size:14px}.importlabel input{display:block;max-width:100%;margin-top:10px;font-size:14px}.log{font-size:14px;line-height:1.8;color:#577277}.settingsintro{margin:25px 0}.settingsintro p{font-size:14px}footer{display:flex;justify-content:space-between;gap:16px;font-size:12px;color:#84969a;border-top:1px solid #dbe5e6;margin-top:35px;padding:20px 0 0}[hidden]{display:none!important}@media(max-width:1050px){header{flex-wrap:wrap}.modebadge{margin-left:auto}nav{order:3;width:100%;justify-content:center}.metrics{grid-template-columns:repeat(2,1fr)}.tankgrid{grid-template-columns:repeat(2,1fr)}.systemgrid{grid-template-columns:1fr}}@media(max-width:600px){main{padding:24px 16px}header{padding:15px 16px;gap:12px}.brand{font-size:17px}.brandmark{font-size:22px}nav{gap:0;justify-content:space-between}.nav{padding:12px 9px;font-size:13px}h1{font-size:27px}.pagetop{align-items:flex-start;flex-direction:column}.metrics{gap:10px}.metrics article{padding:16px}.metrics strong{font-size:24px}.panelhead{padding:18px;flex-wrap:wrap}.tankgrid,.rulegrid{grid-template-columns:1fr}.tankvisual{height:165px;width:70px}.tankdetails{max-width:220px}.tankbody{gap:30px}.schemefooter{flex-direction:column}.formfooter{align-items:stretch;flex-direction:column}.fields{grid-template-columns:1fr}.sensorinputs{grid-template-columns:repeat(3,1fr)}.season button{padding:8px 15px}.panelbody{padding:18px}footer{flex-direction:column}}

a{color:#177c79} .panelbody a{font-size:14px;font-weight:700}

.original-schema .schematic-scroll{background:linear-gradient(135deg,#182b3d,#132131);border-radius:0}
.original-schema svg{min-width:740px}
.original-schema .pipe{fill:none;stroke:#cc7445;stroke-width:9;stroke-linejoin:round;stroke-linecap:round}
.original-schema .return{fill:none;stroke:#4e83b3;stroke-width:5;stroke-linejoin:round}
.original-schema .flow{fill:none;stroke:#ffe3a4;stroke-width:3;stroke-dasharray:7 18;opacity:0;animation:none}
.original-schema .transferring .transfer-flow{opacity:1;animation:original-flow 1.2s linear infinite}
.original-schema .boiler-flow{opacity:0}
.original-schema .burning .boiler-flow{opacity:1;animation:original-flow 1.2s linear infinite}
.original-schema .transferring:not(.burning) .pump-only-flow{opacity:1;animation:original-flow 1.2s linear infinite}
.original-schema .flame{opacity:.15;fill:#7a889a}
.original-schema .burning .flame{opacity:1;fill:#ff9842;animation:original-flame .7s ease-in-out infinite alternate}
.original-schema .pump-body{fill:#263343;stroke:#6d7b8d}
.original-schema .rotor path{fill:#748191}
.original-schema .transferring .rotor path{fill:#9ff4d9}
.original-schema .transferring .pump-body{fill:#173f46;stroke:#72c8bd}
.original-schema #return-pump .pump-body{fill:#263343;stroke:#6d7b8d}
.original-schema svg text{font-family:system-ui,sans-serif;fill:#e9f2fa;font-size:17px}
.original-schema svg .meta{font-size:14px;fill:#a8b9cc}
@keyframes original-flow{to{stroke-dashoffset:-50}}
@keyframes original-flame{to{transform:translateY(-2px);fill:#ffd45a}}
@media(prefers-reduced-motion:reduce){.original-schema .flow,.original-schema .flame{animation:none!important}}

.original-schema #return-pump.active .pump-body{fill:#173f46;stroke:#72c8bd}.original-schema #return-pump path{fill:#748191}.original-schema #return-pump.active path{fill:#9ff4d9}


/* Version 1.1: gespeicherte Betriebsart + robuste Live-Verbindung */
.seasonstatus{background:#dfe9e9;padding:7px 12px;border-radius:10px;display:flex;align-items:center;gap:10px;min-width:165px;justify-content:space-between}
.seasonstatus span{font-size:12px;color:#60777b;font-weight:700}.seasonstatus strong{font-size:14px;color:#173439}
.notice[data-state="ok"]{color:#176044;background:#eaf7ef;border-color:#c8e7d3}.notice[data-state="warn"]{color:#8a5315;background:#fff4df;border-color:#efd6aa}
.profilehint{font-size:13px!important;margin-top:10px!important}.seasoncard{border-color:#bfd8d6;background:#f8fbfb}
@media(max-width:600px){.seasonstatus{width:100%;max-width:260px}}


/* Version 1.2: Systemüberwachung und manuell bestätigter Wartungsneustart */
.actionrow{display:flex;gap:10px;flex-wrap:wrap;margin-top:16px}.danger{border:0;border-radius:8px;padding:12px 20px;font-weight:700;font-size:14px;background:#8b2f2f;color:#fff}.unitline{font-size:12px;color:#768c90}.restartdialog{border:0;border-radius:14px;max-width:520px;width:calc(100% - 32px);padding:0;box-shadow:0 18px 60px #0004}.restartdialog::backdrop{background:#0b1d25aa}.dialogbody{padding:26px}.dialogbody h2{margin-top:0}.dialogactions{display:flex;justify-content:flex-end;gap:10px;flex-wrap:wrap;margin-top:22px}@media(max-width:600px){.dialogactions .secondary,.dialogactions .danger,.actionrow button{width:100%}}

[hidden]{display:none !important;}
#account{font-size:.8rem} #userlist button{margin:.2rem}


/* ofen-theme-v1: rein lokale Darstellung, unabhängig von der Regelung. */
#theme-toggle{white-space:nowrap;min-height:42px;flex-shrink:0}
:root[data-theme="dark"]{color-scheme:dark;background:#10171b;color:#e1e9eb;--ink:#e1e9eb;--teal:#75c9bd;--line:#344248}
:root[data-theme="dark"] body{background:#10171b;color:var(--ink)}
[data-theme="dark"] header{background:#192328;border-color:var(--line)}
[data-theme="dark"] .brand small,[data-theme="dark"] .nav{color:#b0c3c8}
[data-theme="dark"] .nav.active{background:#24433f;color:#b0eee3}
[data-theme="dark"] .modebadge{background:#3c2e1c;border-color:#79572e;color:#f3c783}
[data-theme="dark"] .eyebrow,[data-theme="dark"] a,[data-theme="dark"] .condition h3,[data-theme="dark"] .schemefooter span:first-child{color:#8cdbcf}
[data-theme="dark"] .metrics article,[data-theme="dark"] .panel,[data-theme="dark"] .tankcard,[data-theme="dark"] .rulecard{background:#1a252a;border-color:var(--line)}
[data-theme="dark"] .seasoncard{background:#1c302f;border-color:#42645e}
[data-theme="dark"] .panelhead,[data-theme="dark"] .tankbottom,[data-theme="dark"] footer{border-color:var(--line)}
[data-theme="dark"] p,[data-theme="dark"] .muted,[data-theme="dark"] .metrics span,[data-theme="dark"] .metrics small,[data-theme="dark"] .legend,[data-theme="dark"] .sectionhead span,[data-theme="dark"] .tanktop span,[data-theme="dark"] .tankbottom,[data-theme="dark"] .reading,[data-theme="dark"] .field,[data-theme="dark"] .formfooter span,[data-theme="dark"] .unitline,[data-theme="dark"] dt,[data-theme="dark"] .log,[data-theme="dark"] footer,[data-theme="dark"] .schemefooter span:last-child{color:#b0c3c8}
[data-theme="dark"] .reading b{color:#e6eff0}
[data-theme="dark"] .season,[data-theme="dark"] .seasonstatus,[data-theme="dark"] .condition,[data-theme="dark"] .schemefooter{background:#233137;border-color:var(--line)}
[data-theme="dark"] .seasonstatus span,[data-theme="dark"] .season button{color:#b0c3c8}
[data-theme="dark"] .seasonstatus strong,[data-theme="dark"] .season button.selected{color:#e6eff0}
[data-theme="dark"] .season button.selected{background:#35534f}
[data-theme="dark"] .field input,[data-theme="dark"] .field select{background:#121b20;color:#e6eff0;border-color:#475c64}
[data-theme="dark"] input::placeholder{color:#9db0b6}
[data-theme="dark"] input:disabled,[data-theme="dark"] select:disabled{opacity:.75;color:#b6c7cc}
[data-theme="dark"] .primary{background:#367d70;color:#fff}
[data-theme="dark"] .secondary,[data-theme="dark"] #userlist button{background:#30464d;color:#e0ebed;border-color:#53676e}
[data-theme="dark"] .danger{background:#963d41;color:#fff}
[data-theme="dark"] .notice{background:#392f20;border-color:#6c5534;color:#f2d49e}
[data-theme="dark"] .notice[data-state="warn"]{background:#392f20;border-color:#6c5534;color:#f2d49e}
[data-theme="dark"] .notice[data-state="ok"]{background:#18382e;border-color:#356451;color:#a5e2c5}
[data-theme="dark"] .meter{background:#39494f}
[data-theme="dark"] .meter i{background:#75c9bd}
[data-theme="dark"] .tankvisual{border-color:#46585f}
[data-theme="dark"] .restartdialog{background:#1a252a;color:#e1e9eb;border:1px solid var(--line)}
[data-theme="dark"] .restartdialog::backdrop{background:#000b}
/* Hydraulikschema behält seine vorhandene Farb- und Animationslogik. */

/* ofen-d82-offline-v1: sichtbare Modulfehler, unabhängig vom Theme */
.d82-faults{padding:12px 22px;background:#78332d;color:#fff1e9;
  font-size:14px;font-weight:700;line-height:1.5;border-bottom:1px solid #ad6559}
.d82-faults[hidden]{display:none}
