:root{color-scheme:dark;--bg:#071420;--card:#102338;--panel:#0a1c30;--stroke:#234767;--text:#eef7ff;--muted:#8faac5;--cyan:#27c7f6;--normal:#2ce1a4;--low:#ffd24a;--high:#ff6f66;--off:#8796af;font-family:Inter,'Segoe UI',Arial,sans-serif}*{box-sizing:border-box}body{margin:0;background:radial-gradient(ellipse at 50% -20%,#164566 0%,transparent 48%),var(--bg);color:var(--text)}button{font:inherit;cursor:pointer}button:focus-visible{outline:2px solid var(--cyan);outline-offset:2px}.dash-head{height:104px;display:flex;align-items:center;justify-content:space-between;padding:11px 24px;gap:20px;border-bottom:1px solid var(--stroke);background:linear-gradient(110deg,#0c2c48,#071827 70%)}.brand{display:flex;align-items:center;gap:22px;min-width:0}.brand img{width:120px;max-height:77px;object-fit:contain}.brand-copy{display:flex;flex-direction:column;gap:4px}.brand-copy span{color:var(--muted);font-size:11px;letter-spacing:2px}.brand-copy strong{font-size:clamp(20px,2.15vw,39px);line-height:1;letter-spacing:.1px;white-space:nowrap;font-weight:850}.brand-copy small{color:var(--muted);font-size:12px}.head-numbers{display:flex;align-items:center;gap:12px;margin-left:auto}.head-stat{display:flex;align-items:center;gap:8px;padding-left:13px;border-left:1px solid var(--stroke)}.head-stat b{font-size:32px;color:var(--normal);line-height:1}.head-stat.low b{color:var(--low)}.head-stat.high b{color:var(--high)}.head-stat.off b{color:var(--off)}.head-stat small{color:var(--muted);font-size:10px;max-width:58px}.head-actions{display:flex;align-items:center;gap:12px;color:var(--muted);font-size:12px;white-space:nowrap}.head-actions button{background:var(--card);border:1px solid var(--stroke);color:var(--text);border-radius:7px;padding:8px}.dash-main{padding:12px 16px;max-width:2200px;margin:auto}.topline{height:34px;display:flex;justify-content:space-between;align-items:center;gap:12px;font-size:11px}.topline>div{display:flex;align-items:center;gap:12px}.eyeline{color:var(--normal);letter-spacing:1.5px;font-size:9px}.topline b{font-size:13px}.connection-ok{color:var(--normal)}.connection-error{color:var(--high)}.main-layout{display:grid;grid-template-columns:minmax(0,1.32fr) minmax(420px,1fr);gap:10px;align-items:stretch}.panel{min-width:0;background:linear-gradient(150deg,#0d2941 0%,#081b2f 90%);border:1px solid #155079;border-radius:9px;box-shadow:inset 0 1px 0 #ffffff0b,0 5px 28px #0002}.panel-top{display:flex;justify-content:space-between;align-items:center;gap:12px;padding:12px 15px 10px}.panel-top>div:first-child{display:flex;flex-direction:column;gap:3px}.panel-top strong{font-size:16px}.panel-top small{font-size:10px;color:var(--muted)}.state-legend{display:flex;flex-wrap:wrap;gap:9px;font-size:9px;color:var(--muted)}.state-legend span{white-space:nowrap}.dot{display:inline-block;width:7px;height:7px;border-radius:50%;background:var(--off);margin-right:5px}.dot.normal{background:var(--normal)}.dot.low{background:var(--low)}.dot.high{background:var(--high)}.fleet-layout{display:grid;grid-template-columns:8fr 12fr 6fr;gap:7px;padding:2px 10px 4px}.fgroup{min-width:0;padding:5px;border:1px solid var(--stroke);border-radius:6px}.group-name{font-size:9px;color:var(--cyan);text-align:center;letter-spacing:.5px;display:flex;align-items:center;justify-content:center;gap:5px;height:20px;white-space:nowrap}.group-name span{color:var(--muted);font-size:8px}.fgrid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:5px}.g1 .fgrid{grid-template-columns:repeat(3,minmax(0,1fr))}.furnace-tile{border:1px solid #265373;background:#071b2d;border-radius:5px;color:var(--text);padding:5px;text-align:left;min-width:0;height:101px;display:flex;flex-direction:column;justify-content:space-between;transition:border-color .15s,background .15s;overflow:hidden}.furnace-tile:hover,.furnace-tile.selected{border-color:var(--cyan);background:#0c3150;box-shadow:inset 0 0 0 1px #22a5dc70,0 0 15px #20baff18}.furnace-tile.normal{border-bottom:2px solid var(--normal)}.furnace-tile.low{border-bottom:2px solid var(--low)}.furnace-tile.high{border-bottom:2px solid var(--high)}.furnace-tile.off{border-bottom:2px solid var(--off)}.tile-name{display:flex;align-items:center;justify-content:space-between;gap:4px}.tile-name b{font-size:10px;white-space:nowrap}.tile-name span{color:var(--normal);font-size:10px}.furnace-tile.low .tile-name span{color:var(--low)}.furnace-tile.high .tile-name span{color:var(--high)}.tile-machine{height:64px;display:flex;justify-content:center;align-items:center;overflow:hidden}.tile-machine picture{display:block;width:100%;height:100%}.tile-machine .furnace-art{display:block;width:100%;height:100%;object-fit:contain;transform:scale(1.16);transform-origin:center}.tile-foot{display:flex;justify-content:space-between;gap:5px;align-items:center}.tile-foot>span{font-weight:750;font-size:12px;white-space:nowrap}.tile-foot small{font-size:8px;color:var(--muted)}.tile-bars{display:flex;gap:2px}.tile-bars i{display:block;width:6px;height:10px;border-radius:1px;background:var(--normal)}.tile-bars i.low{background:var(--low)}.tile-bars i.high{background:var(--high)}.tile-bars i.off,.tile-bars i.offline{background:var(--off)}.footnote{padding:9px 12px;color:var(--muted);font-size:9px;display:flex;justify-content:space-between;gap:10px;border-top:1px solid var(--stroke)}.analysis-panel{display:flex;flex-direction:column}.t-badge{font-size:10px;border:1px solid currentColor;padding:5px 7px;border-radius:5px;color:var(--normal);white-space:nowrap}.t-badge.low{color:var(--low)}.t-badge.high{color:var(--high)}.t-badge.off,.t-badge.offline{color:var(--off)}.t-badge i{display:inline-block;width:6px;height:6px;border-radius:50%;background:currentColor;margin-right:6px}.analysis-kpis{display:grid;grid-template-columns:repeat(3,1fr);margin:1px 13px 8px;border:1px solid var(--stroke);border-radius:7px;overflow:hidden}.analysis-kpis>div{padding:12px;border-right:1px solid var(--stroke)}.analysis-kpis>div:last-child{border:0}.analysis-kpis small{display:block;color:var(--muted);font-size:11px}.analysis-kpis b{display:block;font-size:clamp(19px,2vw,32px);margin-top:4px;white-space:nowrap}.analysis-kpis em,.section-kpi em{font-style:normal;font-size:11px;color:var(--muted)}.analysis-kpis .low{color:var(--low)}.analysis-kpis .high{color:var(--high)}.five-zones{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:5px;padding:0 13px}.section-kpi{min-width:0;border:1px solid var(--stroke);border-bottom:3px solid var(--normal);background:#0b2338;color:var(--text);padding:8px 2px;border-radius:5px;text-align:center}.section-kpi.low{border-bottom-color:var(--low)}.section-kpi.high{border-bottom-color:var(--high)}.section-kpi.offline{border-bottom-color:var(--off)}.section-kpi.active{outline:1px solid var(--cyan);background:#123650}.section-kpi small{display:block;color:var(--muted);font-size:9px}.section-kpi b{display:block;margin:6px 0;font-size:clamp(13px,1.1vw,19px)}.section-kpi span{font-size:9px;color:var(--muted)}.chart-bar{padding:15px 14px 0;display:flex;justify-content:space-between;align-items:center;gap:8px}.chart-bar div{display:flex;flex-direction:column;gap:2px}.chart-bar strong{font-size:13px}.chart-bar small,.chart-bar>span{font-size:10px;color:var(--muted)}#chart{padding:0 9px;min-height:160px;display:flex;align-items:center;justify-content:center}.chart-svg{width:100%;height:190px}.chart-svg text{fill:var(--muted);font-size:12px}.gridline{stroke:#2a4960;stroke-width:1}.graph-empty{text-align:center;color:var(--muted);font-size:12px;padding:20px}.chart-hint{display:flex;justify-content:center;gap:20px;font-size:10px;color:var(--muted)}.chart-hint i{display:inline-block;width:13px;height:3px;margin-right:5px;vertical-align:middle}.sp-legend{border-bottom:2px dashed #d7e6f9}.quality-row{display:grid;grid-template-columns:repeat(3,1fr);gap:8px;margin:15px 13px 0;padding:12px 0;border-block:1px solid var(--stroke)}.quality-row div{min-width:0}.quality-row small{display:block;color:var(--muted);font-size:9px;margin-bottom:6px}.quality-row b{font-size:11px}.quality-row .low{color:var(--low)}.quality-row .normal{color:var(--normal)}.quality-foot{color:var(--muted);font-size:10px;padding:10px 13px;line-height:1.4}.bottom-layout{display:grid;grid-template-columns:minmax(0,1.55fr) minmax(340px,1fr);gap:10px;margin-top:10px}.tiny-label{font-size:10px;color:var(--cyan)}#heatmap{padding:0 12px 10px}.heat-head,.heat-r{display:grid;grid-template-columns:44px repeat(5,minmax(0,1fr)) 87px;gap:4px;align-items:center}.heat-head{color:var(--muted);font-size:9px;text-align:center;margin-bottom:7px}.heat-body{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:4px 14px}.heat-r{color:var(--text);background:none;border:0;padding:0;text-align:center;min-width:0}.heat-r:hover,.heat-r.active{background:#ffffff0d}.heat-r b{font-size:10px;text-align:left}.heat-r small{font-size:9px;color:var(--muted);white-space:nowrap}.heat-cell{height:19px;font-size:9px;line-height:19px;background:#205343;border-radius:3px;color:#dafded}.heat-cell.normal{background:#116b53}.heat-cell.low{background:#9b7716;color:#fff9db}.heat-cell.high{background:#96433e;color:white}.heat-cell.off,.heat-cell.offline{background:#48576b;color:#fff}.heat-bottom{display:flex;justify-content:space-between;gap:10px;padding:9px 0 0;color:var(--muted);font-size:9px}.telemetry-stats{display:grid;grid-template-columns:repeat(4,1fr);gap:6px;padding:0 12px 13px}.telemetry-stats div{text-align:center;background:#0b273f;padding:13px 3px;border:1px solid var(--stroke);border-radius:7px}.telemetry-stats span{display:block;font-size:24px;font-weight:800;color:var(--cyan)}.telemetry-stats small{font-size:9px;color:var(--muted)}.sources{padding:0 13px}.sources>div{padding:10px 0;border-bottom:1px solid var(--stroke);display:flex;justify-content:space-between;font-size:11px}.sources span{color:var(--muted)}.notice{background:#192b3d;margin:11px 12px 0;padding:12px;border-left:3px solid var(--low);border-radius:4px}.notice.blue{border-color:var(--cyan)}.notice b{font-size:11px}.notice p{color:var(--muted);font-size:10px;line-height:1.5;margin:5px 0 0}footer{padding:13px 6px;color:var(--muted);font-size:10px;display:flex;gap:10px;justify-content:space-between}html[data-theme=light]{color-scheme:light;--bg:#e7f1fa;--text:#132b45;--muted:#526f85;--stroke:#90b4cb;--card:#dbe9f5;--panel:#e4f0f7}.theme-light{background:white}html[data-theme=light] .panel{background:#f6fbff}html[data-theme=light] .dash-head{background:#d3eaf8}html[data-theme=light] .furnace-tile,html[data-theme=light] .section-kpi,html[data-theme=light] .telemetry-stats div{background:#e0eef8;color:var(--text)}html[data-theme=light] .furnace-tile:hover,html[data-theme=light] .furnace-tile.selected{background:#c9e6f8}html[data-theme=light] .notice{background:#e4eff6}@media(min-width:1550px){.furnace-tile{height:113px}.tile-machine{height:73px}.dash-head{height:110px}.chart-svg{height:220px}}@media(max-width:1350px){.main-layout{grid-template-columns:1fr}.bottom-layout{grid-template-columns:1fr}.furnace-tile{height:105px}.tile-machine{height:66px}.analysis-panel{min-height:auto}.heat-body{grid-template-columns:repeat(2,minmax(0,1fr))}}@media(max-width:900px){.dash-head{height:auto;flex-wrap:wrap}.brand-copy strong{white-space:normal}.head-numbers{margin-left:0}.fleet-layout{grid-template-columns:1fr}.g1 .fgrid,.fgrid{grid-template-columns:repeat(4,minmax(0,1fr))}.furnace-tile{height:105px}.bottom-layout{grid-template-columns:1fr}.heat-body{grid-template-columns:1fr}}@media(max-width:570px){.dash-head{padding:10px}.dash-main{padding:7px}.brand img{width:74px}.brand-copy strong{font-size:18px}.head-stat b{font-size:23px}.head-stat small{font-size:9px}.g1 .fgrid,.fgrid{grid-template-columns:repeat(2,minmax(0,1fr))}.fleet-layout{padding:4px}.panel-top{flex-direction:column;align-items:flex-start}.five-zones{gap:2px;padding:0 5px}.section-kpi b{font-size:12px}.section-kpi small,.section-kpi span{font-size:7px}.analysis-kpis{margin-inline:5px}.analysis-kpis b{font-size:17px}.heat-head,.heat-r{grid-template-columns:31px repeat(5,minmax(0,1fr)) 65px;gap:2px}.heat-r small{font-size:7px}.heat-cell{font-size:8px}.footnote,footer{flex-wrap:wrap}}

/* WOW v3 — history analytics and presentation polish */
:root{--low:#ffd24a;--cyan:#27c7f6;--normal:#2ce1a4;--high:#ff6f66}
.furnace-tile{box-shadow:inset 0 0 0 1px #ffffff04;transition:background .15s,border-color .15s,box-shadow .15s}
.furnace-tile:hover{box-shadow:inset 0 0 0 1px #2bcaff66,0 0 15px #27c7f621}
.furnace-tile.selected{box-shadow:inset 0 0 0 1px #33baff99,0 0 22px #27c7f633}
.furnace-tile .tile-machine .furnace-art{transform:scale(1.16);transform-origin:center}
.tile-bars{gap:3px}
.heat-cell.low{background:linear-gradient(160deg,#ad831c,#7b5b11);color:#fff6d8}
.chart-bar{align-items:flex-start;flex-wrap:wrap;padding-top:15px}
.periods{display:flex;gap:3px;padding:3px;border:1px solid var(--stroke);border-radius:7px;background:#04192b}
.period{border:0;border-radius:4px;padding:7px 9px;background:transparent;color:var(--muted);font-size:10px;font-weight:700;white-space:nowrap}
.period:hover,.period.active{background:#174865;color:#eaffff}
.period.active{box-shadow:inset 0 0 0 1px #44c7ff78}
#chart{min-height:155px}.chart-svg{height:185px}
.history-overview{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:5px;margin:5px 13px 0}
.history-overview>div{min-width:0;padding:10px 8px;border:1px solid var(--stroke);background:#09273d;border-radius:5px}
.history-overview small{display:block;color:var(--muted);font-size:9px;letter-spacing:.3px}
.history-overview strong{display:block;font-size:clamp(13px,1.13vw,21px);font-variant-numeric:tabular-nums;margin-top:6px;color:var(--text)}
.history-overview em{font-size:10px;color:var(--muted);font-style:normal}
.history-caption,.history-empty{margin:8px 14px;padding:7px 3px;color:var(--muted);font-size:10px;line-height:1.5}
.graph-empty{max-width:500px}
.panel{background:linear-gradient(155deg,#10314b 0%,#081b2f 80%)}
.panel-top strong{letter-spacing:.12px}
.quality-row{margin-top:9px;padding:10px 0}
@media(min-width:1550px){.furnace-tile{height:113px}.tile-machine{height:73px}.chart-svg{height:195px}}
@media(max-width:1200px){.period{padding:7px 6px}}
@media(max-width:650px){.periods{width:100%;justify-content:space-between}.period{flex:1}.history-overview{grid-template-columns:repeat(2,1fr)}}
html[data-theme=light] .periods{background:#d6eafa}
html[data-theme=light] .period.active{background:#badbf1;color:#124364}
html[data-theme=light] .history-overview>div{background:#e6f3fb}


/* v4 — fixed dashboard geometry: no inherited vertical period layout */
.main-layout{align-items:start;grid-template-columns:minmax(0,1.27fr) minmax(0,1fr)}
.bottom-layout{grid-template-columns:minmax(0,1.55fr) minmax(0,1fr);align-items:start}
.furnace-panel,.analysis-panel,.heat-panel,.notes-panel{min-width:0}
.furnace-panel{align-self:start}
.analysis-panel{align-self:start}
.chart-bar{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:10px;padding:9px 12px 6px}
.chart-bar>div:first-child{display:flex;flex-direction:column;gap:2px;min-width:0}
.chart-bar .periods{display:flex!important;flex-direction:row!important;align-items:center;justify-content:flex-end;flex-wrap:nowrap;gap:3px;width:max-content;max-width:100%;padding:3px;min-width:0}
.chart-bar .period{display:inline-flex;align-items:center;justify-content:center;flex:0 0 auto;padding:6px 9px;min-width:35px;font-size:10px;line-height:1.2;white-space:nowrap}
#chart{min-height:135px;padding:0 10px;overflow:hidden}
.chart-svg{display:block;width:100%;height:145px;max-height:145px}
.analysis-panel .panel-top{padding:9px 12px 6px}
.analysis-kpis{margin:0 12px 6px}
.analysis-kpis>div{padding:7px 10px}
.analysis-kpis b{font-size:clamp(18px,1.55vw,27px)}
.five-zones{padding:0 12px;gap:5px}
.section-kpi{padding:6px 3px}
.section-kpi b{margin:4px 0;font-size:clamp(12px,1vw,17px)}
.history-overview{margin:4px 12px 0;gap:5px}
.history-overview>div{padding:6px 8px}
.history-overview strong{margin-top:3px;font-size:clamp(13px,1vw,17px)}
.history-caption{margin:4px 12px 3px;padding:3px 0;font-size:9px;line-height:1.35}
.chart-hint{gap:14px;margin-top:3px}
.quality-row{margin:6px 12px 0;padding:7px 0;gap:6px}
.quality-row small{margin-bottom:3px}
.quality-foot{padding:7px 12px 9px;font-size:9px;line-height:1.3}
.furnace-panel .panel-top{padding:9px 12px 6px}
.fleet-layout{padding:2px 8px 3px;gap:6px}
.fgroup{padding:4px}
.fgrid{gap:4px}
.group-name{height:17px}
.furnace-tile{height:87px;padding:4px 5px}
.tile-machine{height:55px}
.furnace-tile .tile-machine .furnace-art{transform:scale(1.14)}
.furnace-tile .tile-foot>span{font-size:11px}
.footnote{padding:6px 10px;font-size:9px}
.bottom-layout{margin-top:8px}
.heat-panel .panel-top,.notes-panel .panel-top{padding:9px 12px 6px}
.heat-cell{height:18px;line-height:18px}
.heat-body{gap:3px 10px}
#heatmap{padding-bottom:7px}
.telemetry-stats{padding-bottom:7px}
.telemetry-stats div{padding:9px 3px}
.sources>div{padding:7px 0}
.notice{margin-top:7px;padding:8px}
footer{padding:9px 6px}
@media(min-width:1550px){.furnace-tile{height:95px}.tile-machine{height:62px}.chart-svg{height:157px;max-height:157px}}
@media(max-width:1450px){.main-layout{grid-template-columns:minmax(0,1.18fr) minmax(0,1fr)}.chart-bar{grid-template-columns:1fr;gap:5px}.chart-bar .periods{justify-content:flex-start}}
@media(max-width:1200px){.main-layout,.bottom-layout{grid-template-columns:1fr}.furnace-tile{height:103px}.tile-machine{height:66px}.chart-bar{grid-template-columns:minmax(0,1fr) auto}.chart-bar .periods{justify-content:flex-end}.chart-svg{height:190px;max-height:190px}}
@media(max-width:650px){.chart-bar{grid-template-columns:1fr}.chart-bar .periods{width:100%;justify-content:space-between}.chart-bar .period{flex:1;min-width:0;padding:8px 3px;font-size:9px}.furnace-tile{height:102px}.tile-machine{height:64px}}

/* v5: independent vertical column flow; heatmap never waits for right chart */
.main-layout{display:grid;grid-template-columns:minmax(0,1.27fr) minmax(0,1fr);gap:10px;align-items:start}
.dashboard-column{display:flex;flex-direction:column;min-width:0;gap:9px;align-self:start}
.dashboard-column>.panel{width:100%;min-width:0;min-height:0;align-self:stretch}
.dashboard-left>.heat-panel{margin-top:0}
.dashboard-right>.notes-panel,.dashboard-right>.telemetry-panel{margin-top:0}
.bottom-layout:empty{display:none}
@media(max-width:1450px){.main-layout{grid-template-columns:minmax(0,1.18fr) minmax(0,1fr)}}
@media(max-width:1200px){.main-layout{grid-template-columns:1fr}.dashboard-column{gap:9px}}
