:root{color-scheme:light;--bg:#f4f7fb;--fg:#172b46;--mut:#66758b;--card:#fff;--line:#dfe6ef;--acc:#087f8c;--ok:#168165;--bad:#d94a4a;--warn:#ab6b12}
.health-link{min-height:30px;align-items:center;gap:4px;cursor:pointer;text-decoration:none!important;white-space:nowrap}.health-link:hover{box-shadow:0 0 0 2px currentColor}.health-link-mark{font-size:16px;line-height:1}.health-dialog-open{overflow:hidden}.health-dialog{padding:0;border:1px solid var(--line);border-radius:16px;color:var(--fg);background:var(--bg);width:min(760px,calc(100% - 32px));max-height:90dvh;box-shadow:0 20px 80px #132b4650;overflow:auto}.health-dialog::backdrop{background:#10233970}.health-dialog-bar{position:sticky;top:0;z-index:2;display:flex;align-items:center;gap:10px;padding:14px 20px;border-bottom:1px solid var(--line);background:white}.health-dialog-bar h2{flex:1;margin:0;font-size:17px}.health-dialog-bar button{min-width:42px;padding:7px 10px}.health-dialog-content{padding:20px}.health-detail-heading h2{margin:6px 0}.health-detail-heading .eyebrow{overflow-wrap:anywhere}.health-finding{background:white;margin:16px 0;padding:16px}.health-finding summary{display:flex;align-items:center;gap:12px;justify-content:space-between;cursor:pointer}.health-finding summary>span:first-child{font-weight:650}.health-finding summary:after{content:'+'}.health-finding[open] summary:after{content:'−'}.health-finding h3{font-size:14px;margin:18px 0 6px}.health-finding p{overflow-wrap:anywhere}.health-finding li{margin:10px 0}.health-evidence{margin:16px 0}.health-evidence>div{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1.3fr);gap:12px;padding:8px 0;border-bottom:1px solid var(--line);font-size:12px}.health-evidence dt{color:var(--mut)}.health-evidence dd{margin:0;overflow-wrap:anywhere}.health-detail-links{display:flex;flex-wrap:wrap;gap:8px;margin-top:16px}@media(max-width:600px){.health-dialog{width:calc(100% - 16px);max-height:94dvh;border-radius:12px}.health-dialog-bar{padding:12px;gap:6px}.health-dialog-content{padding:12px}.health-dialog-bar h2{font-size:15px}.health-evidence>div{grid-template-columns:1fr;gap:3px}.health-link{min-height:36px}.health-finding{padding:12px}.health-finding ol{padding-left:20px}}
.project-management>.card{margin:18px 0}.project-management select{width:100%;min-width:0}
*{box-sizing:border-box}body{margin:0;font:14px/1.55 Inter,Segoe UI,Arial,sans-serif;background:var(--bg);color:var(--fg)}
a{color:var(--acc);text-decoration:none}a:hover{text-decoration:underline}button,input,select,textarea{font:inherit}
button,.button{background:var(--acc);color:white;border:1px solid var(--acc);border-radius:8px;padding:10px 16px;cursor:pointer;display:inline-flex;align-items:center;justify-content:center;gap:6px;font-weight:600;text-decoration:none;min-height:42px}
.button.secondary,button.secondary{background:white;color:var(--fg);border-color:var(--line)}button:disabled{opacity:.5;cursor:not-allowed}
input,select,textarea{border:1px solid #cdd7e4;border-radius:7px;padding:9px 11px;color:var(--fg);background:white;max-width:100%}
input:focus,select:focus,textarea:focus,button:focus-visible,a:focus-visible{outline:3px solid #35b5bf55;outline-offset:2px}
input[type=checkbox]{accent-color:var(--acc);width:17px;height:17px}label{display:block;margin:10px 0;font-weight:500}
label>input:not([type=checkbox]),label>select,label>textarea{display:block;width:100%;margin-top:5px}textarea{min-height:120px}
aside{position:fixed;inset:0 auto 0 0;width:222px;background:#13263f;color:#ced9e7;padding:28px 18px;display:flex;flex-direction:column;z-index:20}
.brand{display:flex;align-items:center;gap:12px;color:white;font-size:22px;font-weight:750;letter-spacing:.5px;margin:0 12px 32px}.brand span{font-size:11px;color:#92abbf;letter-spacing:2px;display:block;font-weight:500}.brand svg{width:34px;height:34px}
aside nav a{display:flex;gap:12px;align-items:center;padding:12px 14px;margin:5px 0;border-radius:8px;color:#bccce0;font-weight:550}
aside nav a svg{width:19px;height:19px}aside nav a:hover,aside nav a.active{background:#24435b;color:#fff;text-decoration:none}
.sidebar-foot{margin-top:auto;font-size:12px;color:#8fa6be;padding:16px 12px}.sidebar-foot a{color:#c7d6e6}
header.topbar{margin-left:222px;height:72px;padding:0 34px;border-bottom:1px solid var(--line);background:#fff;display:flex;align-items:center;justify-content:space-between;gap:14px}
.eyebrow{text-transform:uppercase;letter-spacing:1.8px;font-size:10px;font-weight:700;color:var(--mut)}.topbar small{color:var(--mut)}.avatar{background:#e5f4f3;color:#087f8c;border-radius:50%;width:34px;height:34px;display:inline-grid;place-items:center;font-weight:700}
main{margin-left:222px;max-width:1800px;padding:30px 34px 60px;min-width:0}.page-heading{display:flex;justify-content:space-between;align-items:center;gap:16px;margin-bottom:24px}h1{font-size:28px;line-height:1.2;letter-spacing:-.6px;margin:0 0 6px}h2{font-size:18px;margin:0 0 16px}h3{font-size:15px;margin:0 0 7px}p{margin:8px 0 16px}.mut,.subtitle{color:var(--mut)}.subtitle{margin:0}
.stats{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:16px;margin-bottom:28px}.stat,.card,.panel{background:#fff;border:1px solid var(--line);border-radius:12px;padding:22px;min-width:0}
.stat strong{display:block;font-size:29px;line-height:1.4;font-weight:650}.stat small,.stat>span{color:var(--mut);font-size:12px}.stat i{font-style:normal;color:var(--ok);font-size:11px}
.projects-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:20px;margin:18px 0 30px}.project-card{background:white;border:1px solid var(--line);border-radius:12px;padding:24px;display:flex;flex-direction:column;gap:18px;min-width:0;transition:box-shadow .15s}.project-card:hover{box-shadow:0 8px 24px #13263f0b}.project-card h2{margin:0;font-size:18px}.project-card .description{min-height:42px;color:var(--mut);font-size:12px}.project-card .bottom{display:flex;justify-content:space-between;align-items:center;gap:8px;border-top:1px solid var(--line);padding-top:16px}
.project-icon{width:42px;height:42px;border-radius:11px;display:grid;place-items:center;background:#e8f5f4;color:#0a8b84;font-size:21px}
.toolbar,.tabs{display:flex;gap:10px;align-items:center;flex-wrap:wrap;margin:16px 0}.toolbar label{margin:0;min-width:120px}.toolbar label>input{max-width:250px}.toolbar .grow{flex:1}
.tabs{border-bottom:1px solid var(--line);gap:24px;margin:20px 0 24px}.tabs a{color:var(--mut);padding:12px 0;border-bottom:2px solid transparent;font-weight:600}.tabs a.active{color:var(--acc);border-color:var(--acc)}
.badge{display:inline-flex;align-items:center;gap:6px;border-radius:20px;font-size:11px;font-weight:600;padding:4px 10px;background:#edf2f8;color:#567}.badge.ok{background:#e7f6ef;color:#168165}.badge.bad{background:#fff0eb;color:#b5563c}.badge.warn{background:#fff5df;color:#916315}
.badge.ok:before,.badge.bad:before{content:"";width:6px;height:6px;border-radius:50%;background:currentColor}
.wrap{overflow:auto;border:1px solid var(--line);border-radius:10px;background:white;margin:16px 0}table{width:100%;border-collapse:collapse;font-size:13px;text-align:left}th{background:#f9fbfd;color:#76869b;font-size:10px;letter-spacing:.5px;text-transform:uppercase;font-weight:650;padding:13px 16px;white-space:nowrap}td{padding:15px 16px;border-top:1px solid #edf1f5;vertical-align:middle}td small{display:block;color:var(--mut)}tbody tr:hover{background:#fcfefe}td a{font-weight:600}.wide-text{white-space:normal;overflow-wrap:anywhere}
.notice{background:#fff9e9;border:1px solid #f1e4bd;border-radius:9px;padding:14px 18px;margin:16px 0}.notice.info{background:#ecf7fa;border-color:#d2e9ee}.empty{text-align:center;padding:50px 24px;background:white;border:1px dashed #cdd7e4;border-radius:12px;margin:22px 0}.empty h2{margin:12px 0 8px}.empty p{max-width:520px;margin:8px auto 22px;color:var(--mut)}
details{background:white;border:1px solid var(--line);border-radius:10px;padding:16px 20px;margin:16px 0}summary{cursor:pointer;font-weight:600}details[open]>summary{margin-bottom:18px}
.form-grid,.split{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:18px}.narrow{max-width:820px}
.chart-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:20px;margin:22px 0}.chart{background:white;border:1px solid var(--line);border-radius:11px;padding:20px;min-width:0}.chart h2{font-size:14px;margin-bottom:16px}canvas{display:block;width:100%;height:235px}.legend{font-size:11px;min-height:40px;color:var(--mut);overflow-wrap:anywhere}.grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:14px}.v{font-size:24px;font-weight:650}
pre{white-space:pre-wrap;overflow-wrap:anywhere;background:#f2f5fa;border-radius:8px;padding:16px;max-height:500px;overflow:auto;font-size:12px}
.timeline-row{display:flex;gap:10px;margin:8px 0;align-items:center}.timeline-row>span{width:120px;font-size:12px}.lane{height:24px;flex:1;position:relative;background:#edf2f7;overflow:hidden;border-radius:4px}.segment{position:absolute;height:100%;min-height:0;min-width:2px;padding:0;border:0;border-radius:0}
.parameter-picks{display:flex;flex-wrap:wrap;gap:8px;max-height:210px;overflow:auto;border:1px solid var(--line);padding:14px;border-radius:9px}.parameter-picks label{font-size:12px;background:#f4f7fa;border-radius:7px;padding:7px 10px;margin:0;display:flex;align-items:center;gap:8px}
.step-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:16px}.step-number{color:var(--acc);font-size:11px;font-weight:700;text-transform:uppercase;letter-spacing:1px}.card p:last-child{margin-bottom:0}
.login-screen{min-height:100vh;display:grid;grid-template-columns:1fr 1fr}.login-art{background:#13263f;color:#fff;padding:10vw 6vw;display:flex;flex-direction:column;justify-content:center}.login-art .brand{margin:0 0 60px}.login-art h1{font-size:44px;max-width:480px;line-height:1.18}.login-art p{color:#a7bfd4;max-width:420px;font-size:16px}.login-form{display:flex;align-items:center;justify-content:center;padding:30px}.login-form>div{width:360px;max-width:100%}.login-form form{margin:30px 0}.login-form button{width:100%;margin-top:14px}.login-form h1{font-size:29px}
.mobile-toggle{display:none}.parameter-search{min-width:260px}hr{border:0;border-top:1px solid var(--line);margin:26px 0}
@media(max-width:480px){.toolbar>.grow{flex-basis:100%}.toolbar>p.grow{width:100%;margin-bottom:4px}}
@media(max-width:1100px){.projects-grid{grid-template-columns:repeat(2,minmax(0,1fr))}main{padding:25px}.stats{gap:10px}.stat{padding:16px}}
@media(max-width:760px){aside{transform:translateX(-100%);transition:transform .15s}body.menu-open aside{transform:translateX(0)}header.topbar{margin:0;padding:0 16px;height:62px}.mobile-toggle{display:inline-flex;padding:7px 10px;background:#fff;color:var(--fg);border-color:var(--line)}main{margin:0;padding:22px 16px}.page-heading{align-items:flex-start}h1{font-size:25px}.stats,.grid{grid-template-columns:repeat(2,minmax(0,1fr))}.projects-grid,.chart-grid,.form-grid,.split,.step-grid{grid-template-columns:1fr}.topbar small{display:none}.panel{padding:17px}.toolbar{align-items:flex-end}.toolbar label{flex:1;min-width:120px}.toolbar button{flex-shrink:0}.tabs{gap:18px;overflow:auto;flex-wrap:nowrap}.tabs a{white-space:nowrap}.login-screen{display:block}.login-art{padding:26px}.login-art .brand{margin:0 0 18px}.login-art h1{font-size:26px}.login-art p{display:none}.login-form{padding:34px 24px}.parameter-search{min-width:0;width:100%}}

.error-screen{margin:0 auto;max-width:800px;padding:48px 20px}.error-screen>.brand{color:var(--fg);margin-left:0}.error-screen>.panel{width:100%}
#platform-frame{width:100%;height:650px;border:1px solid var(--line);border-radius:10px;background:white}.api-key-cards{display:grid;gap:15px;margin:20px 0;grid-template-columns:repeat(2,minmax(0,1fr))}@media(max-width:760px){.api-key-cards{grid-template-columns:1fr}}
.config-group{background:white;border:1px solid var(--line);border-radius:10px;padding:20px;margin:18px 0}.config-row{display:grid;grid-template-columns:1.2fr .7fr 1fr 1fr 1.2fr;align-items:center;gap:16px;padding:15px 0;border-top:1px solid var(--line);font-size:13px}.config-row small{display:block;font-size:10px;color:var(--mut);margin:4px 0}.config-row label{margin:0;font-size:10px}.config-row input{max-width:130px}.config-row .badge{font-size:10px}@media(max-width:760px){.config-group{padding:15px}.config-row{grid-template-columns:1fr 1fr;gap:10px}.config-row>div:first-child{grid-column:1/-1}.config-row>div:last-child{grid-column:1/-1}.config-row input{max-width:100%}}
.storage-row{display:grid;grid-template-columns:1fr 160px 1.5fr;gap:20px;align-items:center;padding:13px 0;border-bottom:1px solid var(--line)}.storage-row small,.storage-detail span{display:block;font-size:11px;color:var(--mut);margin-top:4px}.storage-row label{margin:0;font-size:11px}.storage-row input{max-width:130px}.life-row{display:grid;grid-template-columns:170px 1fr;gap:22px;padding:24px 0;border-bottom:1px solid var(--line)}.life-row time{font-size:12px;color:var(--mut)}.life-row p{white-space:pre-wrap;overflow-wrap:anywhere}.inline{display:flex;align-items:center;gap:6px;font-size:12px}@media(max-width:760px){.storage-row{grid-template-columns:1fr 120px;gap:10px}.storage-detail{grid-column:1/-1}.life-row{grid-template-columns:1fr;gap:9px}.life-row h2{font-size:16px}}
.history-controls{display:flex;justify-content:space-between;gap:15px;align-items:center;flex-wrap:wrap;margin:20px 0}.calendar-date,.calendar-date form{display:flex;gap:7px;align-items:center}.calendar-date input{max-width:160px}.calendar-date form{margin:0}.calendar-range label{font-size:12px;color:var(--mut)}.calendar-date .button.disabled{opacity:.4;pointer-events:none}.range-note{margin:-12px 0 14px;font-size:12px;text-align:right}.history-summary{display:flex;flex-wrap:wrap;gap:16px;background:white;border:1px solid var(--line);border-radius:10px;padding:17px;margin:18px 0}.history-summary strong{flex-basis:100%;font-size:13px}.history-summary span{display:flex;flex-direction:column;min-width:110px}.history-summary small{color:var(--mut);font-size:10px}.history-summary b{font-size:14px;margin-top:5px}.chart-key{display:flex;flex-wrap:wrap;gap:14px;font-size:11px;color:var(--mut)}.chart-key span:before{content:'';display:inline-block;width:10px;height:10px;margin-right:5px;border-radius:2px}.on-time:before{background:#3976d8}.offline-recorded:before{background:#bc790d}.invalid-band:before{background:#d6b9df}.missing-band:before{background:repeating-linear-gradient(45deg,#9aa8ba 0 1px,#ecf0f5 1px 4px)}.lane{background:repeating-linear-gradient(45deg,#9aa8ba40 0 1px,#ecf0f5 1px 6px)}@media(max-width:760px){.history-controls{gap:12px}.calendar-date{gap:5px;flex-wrap:wrap}.calendar-date input{max-width:130px}.calendar-date button,.calendar-date .button{padding:8px}.calendar-views a,.resolutions a{padding:7px 10px}.history-summary{gap:13px}.history-summary span{min-width:125px}.chart{padding:14px}.history-controls .segmented{width:100%;justify-content:space-between}}
label.platform-choice>input[type=radio]{flex:0 0 18px;width:18px;height:18px;padding:0;display:block}.platform-choice>span{flex:1;min-width:0}

/* Project creation and platform packages */
[hidden]{display:none!important}.wizard{max-width:960px}.wizard-steps{list-style:none;padding:0;display:flex;border-bottom:1px solid var(--line);gap:24px;margin:22px 0}.wizard-steps li{padding:12px 0;color:var(--mut);white-space:nowrap}.wizard-steps li.active{border-bottom:3px solid var(--acc);color:var(--acc);font-weight:700}fieldset{border:0;padding:0;margin:0;min-width:0}legend{font-size:22px;font-weight:650;margin:8px 0}.wizard textarea{min-height:65px}.wizard .form-grid{gap:0 20px}.wizard details{padding:10px 16px}.platform-choices{display:grid;gap:14px}.platform-choice{display:flex;align-items:flex-start;gap:14px;border:1px solid var(--line);background:white;border-radius:10px;padding:18px;cursor:pointer;margin:0}.platform-choice:has(input:checked){border-color:var(--acc);box-shadow:0 0 0 2px #087f8c20}.platform-choice input{width:auto;display:inline-block;margin-top:6px}.platform-choice p{margin:7px 0;font-size:13px;color:var(--mut)}.chips{display:flex;gap:7px;flex-wrap:wrap}.chips span{background:#edf4f7;border-radius:6px;font-size:11px;padding:3px 8px}.custom-row{display:grid;grid-template-columns:2fr 1fr 1fr;gap:12px}.retention-choices{display:grid;grid-template-columns:repeat(3,1fr);gap:16px}.sticky-actions{position:sticky;bottom:0;z-index:5;display:flex;align-items:center;gap:18px;padding:15px 0;background:var(--bg);border-top:1px solid var(--line);margin-top:24px}.sticky-actions .grow{flex:1}.wizard .sticky-actions{margin-bottom:-20px}@media(max-width:760px){.wizard-steps{gap:15px;font-size:11px}.wizard legend{font-size:19px}.wizard .form-grid{grid-template-columns:1fr 1fr;gap:0 12px}.wizard .form-grid label{font-size:12px}.wizard .form-grid label:first-child,.wizard .form-grid label:last-child{grid-column:1/-1}.wizard textarea{min-height:42px}.retention-choices{grid-template-columns:1fr}.custom-row{gap:7px;grid-template-columns:1.6fr 1fr .7fr}.sticky-actions{bottom:0;padding:10px 0;gap:12px}.platform-choice{padding:14px}}

/* Device status, health, and platform screen parts. */
.device-heading{display:flex;align-items:center;gap:10px;flex-wrap:wrap}.device-heading small{display:block;flex-basis:100%;color:var(--mut)}.resolved{padding:9px 14px;background:#edf8f3;border-color:#c9e5d8}.resolved summary{font-size:12px;font-weight:500}.resolved[open]>summary{margin-bottom:8px}.health-cards{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px}.health-check{padding:14px;border:1px solid var(--line);border-radius:8px}.health-check p{font-size:12px;margin:9px 0 0}.health-disclosure{padding:10px 16px}.kpi-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:15px;margin:20px 0}.kpi{background:white;border:1px solid var(--line);border-radius:10px;padding:18px;min-width:0}.kpi h2{font-size:13px;margin:0 0 10px;color:var(--mut)}.kpi strong{font-size:26px;line-height:1.2;font-weight:650;display:block;overflow-wrap:anywhere}.kpi p{font-size:11px;margin:10px 0 5px}.kpi small{font-size:10px;color:var(--mut)}.device-cards{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:16px;margin:15px 0}.device-card{border:1px solid var(--line);border-radius:10px;padding:16px;background:#fff;min-width:0}.device-card .toolbar{margin:0 0 10px}.device-card p{font-size:12px}.device-card small{color:var(--mut);font-size:11px}.desktop-health{display:block}.segmented{display:inline-flex;background:#fff;border:1px solid var(--line);border-radius:8px;padding:3px;gap:3px}.segmented a{padding:6px 13px;color:var(--mut);border-radius:5px;font-size:12px}.segmented a.active{background:#e6f3f4;color:var(--acc);font-weight:600}.subtabs{display:flex;gap:20px;flex-wrap:wrap;margin:-12px 0 22px}.subtabs a{font-size:12px;color:var(--mut)}.subtabs .active{color:var(--acc);font-weight:700}.sr-only{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0,0,0,0)}@media(max-width:1100px){.device-cards{grid-template-columns:repeat(2,minmax(0,1fr))}.health-cards{grid-template-columns:repeat(3,minmax(0,1fr))}}@media(max-width:760px){.device-cards{grid-template-columns:1fr}.desktop-health{display:none}.kpi-grid,.health-cards{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.kpi{padding:14px}.kpi strong{font-size:23px}.device-heading{font-size:12px}.segmented a{padding:5px 10px}.health-disclosure{margin:12px 0}.subtabs{gap:14px}}

.firmware-fleet,.firmware-releases{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px;margin:20px 0}.fleet-details{margin:12px 0}.fleet-details div{display:grid;grid-template-columns:130px 1fr;gap:10px;margin:10px 0;font-size:12px}.fleet-details dt{color:var(--mut)}.fleet-details dd{margin:0;overflow-wrap:anywhere}.hash{overflow-wrap:anywhere;font-size:12px}@media(max-width:760px){.firmware-fleet,.firmware-releases{grid-template-columns:1fr}.fleet-details div{grid-template-columns:105px 1fr}}

.chart-cursor{display:none;position:absolute;pointer-events:none;border-left:1px dashed #46586e;z-index:2}.state-legend{display:flex;gap:12px;flex-wrap:wrap;font-size:10px;color:var(--mut);margin:6px 0 15px}.state-legend span{border-left:8px solid;padding-left:4px}

@media(max-width:760px){.wrap{overflow:visible}.wrap table,.wrap tbody,.wrap tr,.wrap td{display:block;width:100%;box-sizing:border-box}.wrap thead{display:none}.wrap tr{margin:12px 0;padding:9px 12px;background:#fff;border:1px solid var(--line);border-radius:8px}.wrap td{border:0;padding:6px 0;white-space:normal;overflow-wrap:anywhere}.wrap td:before{content:attr(data-label);display:block;font-size:10px;font-weight:600;color:var(--mut);margin-bottom:3px}.wrap td:empty{display:none}}
@media(max-width:760px){.kpi strong{font-size:20px}.kpi-grid{margin:16px 0}.device-heading small{font-size:10px}.page-heading{margin-bottom:14px}}
.platform-preview{display:block;max-width:100%;height:auto;margin:0 0 12px;border-radius:10px}.history-project{max-width:360px;margin-bottom:12px}
.event-heatmap{display:grid;grid-template-columns:repeat(auto-fit,minmax(130px,1fr));gap:6px}.event-heatmap a{display:grid;padding:10px;border-radius:6px;background:rgba(233,123,19,var(--heat));color:#192d40}.event-heatmap strong{font-size:1.3rem}
@media(max-width:760px){.tabs{flex-wrap:nowrap;overflow-x:auto;overflow-y:hidden;gap:0 18px;scrollbar-width:none}.tabs::-webkit-scrollbar{display:none}.tabs a{padding:9px 0;flex:0 0 auto}.sticky-actions #storage-changes{font-size:12px;min-width:58px}}
.mini-readings{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;margin:12px 0}.mini-readings small,.mini-readings b{display:block}.mini-readings b{font-size:13px;overflow-wrap:anywhere}td small{display:block;color:var(--mut);margin-top:3px}
.badge.warning{background:#fff4d6;color:#845500}.badge.alarm{background:#ffeded;color:#b72c37}.badge.error{background:#f2eaff;color:#7442a2}.badge.info{background:#e8f1fc;color:#346292}
.message-summary{display:flex;align-items:center;flex-wrap:wrap;gap:16px;padding:16px 20px;margin:20px 0;border:1px solid var(--line);background:white;border-radius:10px}.message-summary small{display:block;color:var(--mut);font-size:11px}.message-chips{display:flex;flex-wrap:wrap;gap:8px;flex:1}.message-summary .badge{font-size:12px;min-height:36px}.message-views{flex-wrap:wrap}.message-filters{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px;align-items:end;padding:16px;background:#fff;border:1px solid var(--line);border-radius:10px}.message-filters label{margin:0;min-width:0}.message-filters>a{padding:10px 0}.message-counts{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px;margin:20px 0}.message-count{display:grid;padding:15px 18px;background:#fff;border:1px solid var(--line);border-top:3px solid var(--tone,#5683b1);border-radius:9px;color:var(--fg)}.message-count strong{font-size:26px;color:var(--tone)}.message-count small{font-size:11px;color:var(--mut)}.message-count.selected{outline:2px solid var(--tone);outline-offset:2px}.message-count.warning,.message-card.warning{--tone:#aa7215}.message-count.alarm,.message-card.alarm{--tone:#cd3b48}.message-count.error,.message-card.error{--tone:#8350ad}.message-count.info,.message-card.info{--tone:#5683b1}.message-card{padding:18px 20px;background:white;border:1px solid var(--line);border-left:4px solid var(--tone);border-radius:9px;margin:12px 0;overflow-wrap:anywhere}.message-meta{display:flex;align-items:center;flex-wrap:wrap;gap:10px;font-size:12px;color:var(--mut)}.message-meta time{margin-left:auto}.message-text{white-space:pre-wrap;font-size:15px;margin:12px 0;overflow-wrap:anywhere}
@media(max-width:760px){.message-filters{grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;padding:12px}.message-filters label:has(input){grid-column:1/-1}.message-counts{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.message-count{padding:12px}.message-summary{padding:14px;gap:10px}.message-summary>div:first-child,.message-chips{flex-basis:100%}.message-card{padding:14px}.message-meta time{flex-basis:100%;margin-left:0}.message-views{width:100%}.message-views a{flex:1 1 45%;text-align:center;min-height:36px}.message-summary .button{width:100%}}
.message-periods{flex-wrap:wrap;flex-shrink:0}.message-periods a{white-space:nowrap;min-height:36px;display:flex;align-items:center}.message-summary .message-chips{min-width:230px}@media(max-width:760px){.message-periods{width:100%;flex-shrink:1}.message-periods a{flex:1 1 auto;justify-content:center;padding:6px 8px}.message-summary .message-chips{min-width:0}}
.navigation-notice{position:fixed;bottom:16px;left:50%;transform:translateX(-50%);z-index:40;display:flex;align-items:center;gap:14px;width:max-content;max-width:calc(100% - 32px);padding:12px 16px;background:#fff;border:1px solid #d7a241;box-shadow:0 4px 18px #172b4625;border-radius:10px}.navigation-notice span{flex:1}.navigation-notice button{flex-shrink:0}[aria-busy=true]{cursor:progress}@media(max-width:760px){.navigation-notice{flex-wrap:wrap;width:calc(100% - 32px)}}
.chart-tools{background:#fff;border:1px solid var(--line);border-radius:10px;padding:16px 20px;margin:18px 0}.chart-tool-row,.chart-pan-row,.chart-zoom-buttons{display:flex;align-items:center;gap:10px}.chart-tool-row{flex-wrap:wrap}.chart-tool-row>strong{margin-right:auto}.chart-zoom-buttons button{min-width:44px;padding:7px 12px}.axis-lock{display:flex;align-items:center;gap:7px;margin:0 0 0 8px;white-space:nowrap}.chart-pan-row{margin:12px 0}.chart-pan-row button{padding:6px 12px;min-width:44px}.chart-pan-row input[type=range]{flex:1;min-width:0;padding:0;accent-color:var(--acc);height:36px}.chart-view-range{display:block;font-size:12px;overflow-wrap:anywhere}.chart-gesture-hint,.chart-range-note{color:var(--mut);font-size:11px;margin:7px 0}.chart-range-note{display:block}.chart-exact{padding:0;border:0;background:transparent;margin:10px 0 0}.chart-exact summary{font-size:12px}.chart-range-form{display:flex;gap:12px;align-items:end;flex-wrap:wrap}.chart-range-form label{min-width:0;margin:8px 0 0;flex:1}.chart-range-form button{margin-bottom:1px}.chart-range-form [role=alert]{flex-basis:100%;margin:0;color:var(--bad);font-size:12px}.chart canvas{touch-action:pan-y;cursor:crosshair}.chart canvas[data-zoomed=true][data-x-locked=false]{cursor:grab}.chart canvas[data-zoomed=true][data-x-locked=false]:active{cursor:grabbing}@media(max-width:760px){.chart-tools{padding:14px}.chart-tool-row>strong{flex-basis:100%}.chart-tool-row{gap:10px 6px}.chart-zoom-buttons{gap:5px}.axis-lock{font-size:12px;margin-left:auto}.chart-range-form{display:grid;grid-template-columns:1fr}.chart-range-form input{min-width:0}.chart-range-form [role=alert]{grid-column:1/-1}}
.conditions{display:flex;flex-wrap:wrap;gap:6px;margin:8px 0 4px}.conditions .badge{font-size:11px;padding:3px 9px;white-space:normal;line-height:1.35}

.info-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(320px,1fr));gap:16px;margin:16px 0 28px}.info-grid>section h2{margin-top:0;font-size:17px}.ack-form{display:flex;flex-wrap:wrap;align-items:flex-end;gap:8px;margin:10px 0}.ack-form label{flex:1;min-width:200px}@media(max-width:600px){.info-grid{grid-template-columns:1fr}}
.device-type-tabs{margin:12px 0 20px;flex-wrap:wrap;gap:6px}.device-type-tabs a{min-height:44px;padding:10px 12px;display:flex;align-items:center;white-space:nowrap}.device-type-control{display:flex;flex-wrap:wrap;align-items:center;gap:8px;margin-top:14px}.device-type-control .button{min-height:36px;padding:7px 10px;font-size:12px}.device-type-label{white-space:normal}@media(max-width:600px){.device-type-tabs a{flex:1 1 40%;justify-content:center}.device-type-control{justify-content:space-between}}
/* report 80: accounts */.project-choices{margin:12px 0}.project-choices legend{font-weight:600;font-size:14px;margin-bottom:6px;padding:0}.project-choices label.check{display:flex;align-items:center;gap:8px;font-weight:400;margin:6px 0}.project-choices input[type=checkbox]{width:18px;height:18px}.account-edit summary{cursor:pointer;color:var(--acc);font-weight:600}.account-edit[open]{min-width:260px}.account-edit form{border-top:1px solid var(--line);padding-top:10px;margin-top:10px}.danger-form button{background:#fff;color:#b42318;border-color:#f1b5ae}.danger-form button:hover{background:#fdecea}.inline-form{margin-top:12px}
.panel+.panel{margin-top:16px}.inline-form button{background:#fff;color:var(--fg);border-color:var(--line)}
.section-note{color:var(--mut);margin:6px 0 14px}.section-label{font-size:12px;text-transform:uppercase;letter-spacing:1.2px;color:var(--mut);margin:26px 0 10px}.ok-notice{background:#edf8f3;border-color:#cfe9dd}.message-related{margin-top:8px;font-size:13px}.message-related summary{font-weight:500;color:var(--acc);margin:0}.message-related ul{margin:6px 0 0;padding-left:18px}.firmware-waiting>summary{font-weight:600;margin:18px 0 8px}.config-unsupported{margin:18px 0}.config-unsupported>summary{font-weight:600;margin-bottom:10px}
.firmware-fleet>.panel+.panel,.firmware-releases>.panel+.panel{margin-top:0}
.since-strip{margin:4px 0 18px;color:var(--fg)}.since-strip a{font-weight:600}.topbar-search{flex:1;max-width:420px;margin:0 16px}.topbar-search input{width:100%;padding:9px 12px;border:1px solid var(--line);border-radius:8px;font:inherit;background:var(--bg)}.device-type-tabs{margin:12px 0 18px}.filter-label{align-self:center;padding:0 8px 0 6px;font-size:12px;color:var(--mut)}.device-type-link{text-decoration:none!important;cursor:pointer}.device-type-link:hover{box-shadow:0 0 0 2px currentColor}@media(min-width:900px){.config-group .config-row~.config-row .col-label{display:none}}@media(max-width:600px){.topbar-search{margin:0 8px;max-width:none}header.topbar .eyebrow{display:none}.filter-label{display:none}}
.checked-line{margin:8px 0 0;font-size:12px;color:var(--mut)}.checked-line .badge{margin-right:4px}.button.small{padding:5px 10px;font-size:12px}.check-reason{border:0;padding:0;margin:10px 0;display:flex;gap:18px}.check-reason legend{font-weight:600;margin-bottom:6px}.check-reason label{flex:0 0 auto;white-space:nowrap;font-size:14px}.check-reason input[type=radio]{flex:0 0 18px;width:18px;height:18px;margin:0}/* report 87 */
/* report 94: Overview offline tables, groups, power row */
.offline-now,.offline-recent{margin:16px 0}.offline-now td b,.offline-recent td b{display:block;font-weight:600}.offline-recent>summary{cursor:pointer;padding:10px 0}.overview-group{margin:22px 0 4px}.power-readings{margin-top:0;padding-top:8px;border-top:1px solid var(--line)}
/* report 99: device types on project cards; New devices; delete (owner) */
.type-counts{display:grid;gap:4px;margin:2px 0 10px}.type-row{display:grid;grid-template-columns:1fr auto 78px;gap:10px;align-items:baseline;padding:5px 10px;border:1px solid var(--line);border-radius:8px;color:var(--fg);text-decoration:none!important}.type-row:hover{border-color:var(--acc)}.type-row b{font-variant-numeric:tabular-nums}.type-row small{color:var(--mut);text-align:right}.type-row.waiting{background:#fff5df;border-color:#f0d9a8}.type-row.waiting small{color:#916315}
.danger-zone summary{color:var(--bad);font-weight:650;cursor:pointer}.danger-zone ul{padding-left:20px}.danger-zone li{margin:4px 0}
.decision{display:flex;gap:6px;flex-wrap:wrap}.decision form{margin:0}.danger-zone button{background:var(--bad);border-color:var(--bad)}
.mqtt2-strip{margin:0 0 10px;font-size:12px}.mqtt2-strip small{margin-right:6px}.mqtt2-line{margin:4px 0 2px}/* report 131 */
.offline-history{margin:16px 0;padding:10px 16px}.offline-history>summary{cursor:pointer}.offline-history[open]>summary{margin-bottom:8px}.offline-history td b,.offline-history td small{display:block}.offline-history td b{font-weight:600}/* report 142 */
/* live39: regions that refresh by themselves keep the layout of what they wrap */
[data-live-part]{display:contents}.live-stamp{font-size:12px;margin:-4px 0 12px}
main.page-only{padding-bottom:16px}main.page-only #platform-frame{height:calc(100vh - 170px);min-height:650px}/* GH01 report 29: Custom page only accounts - the Custom page fills the window */
/* report 43: Permissions page */.project-choices input[type=radio]{width:18px;height:18px;padding:0;margin:0}

/* THM-1 dark theme (Claude for Esa, 2026-11-22). Generated by tools/patch_thm1_server.py from the light rules above: light surfaces -> dark, dark text -> light, strong colours brighter; every colour declaration in its own order under :where() so each rule keeps its strength. Sidebar and login art are already dark. */
:root:where([data-theme=dark]){color-scheme:dark;--bg:#0f1622;--fg:#dfe7f1;--mut:#97a6ba;--card:#172131;--line:#2a3648;--acc:#35b8c4;--ok:#3cc796;--bad:#ef6b6b;--warn:#e0a54a}
/* THM-1b: contrast fixes (report 59); same strength as the light rules they follow */
:where(html[data-theme=dark]) .message-count.error,:where(html[data-theme=dark]) .message-card.error{--tone:#b48ae0}
.topbar-end{display:flex;align-items:center;gap:12px}.theme-toggle{min-height:34px;padding:5px 11px;gap:6px;font-weight:600;font-size:13px}.theme-icon{font-size:15px;line-height:1}@media(max-width:600px){.theme-text{display:none}}
:where(html[data-theme=dark]) .health-link:hover{box-shadow:0 0 0 2px currentColor}
:where(html[data-theme=dark]) .health-dialog{border:1px solid var(--line);color:var(--fg);background:var(--bg);box-shadow:0 20px 80px #132b4650}
:where(html[data-theme=dark]) .health-dialog::backdrop{background:#10233970}
:where(html[data-theme=dark]) .health-dialog-bar{border-bottom:1px solid var(--line);background:var(--card)}
:where(html[data-theme=dark]) .health-finding{background:var(--card)}
:where(html[data-theme=dark]) .health-evidence>div{border-bottom:1px solid var(--line)}
:where(html[data-theme=dark]) .health-evidence dt{color:var(--mut)}
:where(html[data-theme=dark]) body{background:var(--bg);color:var(--fg)}
:where(html[data-theme=dark]) a{color:var(--acc)}
:where(html[data-theme=dark]) button,:where(html[data-theme=dark]) .button{background:var(--acc);color:#06222a;border:1px solid var(--acc)}
:where(html[data-theme=dark]) .button.secondary,:where(html[data-theme=dark]) button.secondary{background:var(--card);color:var(--fg);border-color:var(--line)}
:where(html[data-theme=dark]) input,:where(html[data-theme=dark]) select,:where(html[data-theme=dark]) textarea{border:1px solid #28374a;color:var(--fg);background:var(--card)}
:where(html[data-theme=dark]) input:focus,:where(html[data-theme=dark]) select:focus,:where(html[data-theme=dark]) textarea:focus,:where(html[data-theme=dark]) button:focus-visible,:where(html[data-theme=dark]) a:focus-visible{outline:3px solid #35b5bf55}
:where(html[data-theme=dark]) input[type=checkbox]{accent-color:var(--acc)}
:where(html[data-theme=dark]) header.topbar{border-bottom:1px solid var(--line);background:var(--card)}
:where(html[data-theme=dark]) .eyebrow{color:var(--mut)}
:where(html[data-theme=dark]) .topbar small{color:var(--mut)}
:where(html[data-theme=dark]) .avatar{background:#193b39;color:#5edae8}
:where(html[data-theme=dark]) .mut,:where(html[data-theme=dark]) .subtitle{color:var(--mut)}
:where(html[data-theme=dark]) .stat,:where(html[data-theme=dark]) .card,:where(html[data-theme=dark]) .panel{background:var(--card);border:1px solid var(--line)}
:where(html[data-theme=dark]) .stat small,:where(html[data-theme=dark]) .stat>span{color:var(--mut)}
:where(html[data-theme=dark]) .stat i{color:var(--ok)}
:where(html[data-theme=dark]) .project-card{background:var(--card);border:1px solid var(--line)}
:where(html[data-theme=dark]) .project-card:hover{box-shadow:0 8px 24px #13263f0b}
:where(html[data-theme=dark]) .project-card .description{color:var(--mut)}
:where(html[data-theme=dark]) .project-card .bottom{border-top:1px solid var(--line)}
:where(html[data-theme=dark]) .project-icon{background:#183836;color:#5ee8e1}
:where(html[data-theme=dark]) .tabs{border-bottom:1px solid var(--line)}
:where(html[data-theme=dark]) .tabs a{color:var(--mut);border-bottom:2px solid transparent}
:where(html[data-theme=dark]) .tabs a.active{color:var(--acc);border-color:var(--acc)}
:where(html[data-theme=dark]) .badge{background:#152436;color:#acb8c4}
:where(html[data-theme=dark]) .badge.ok{background:#163b2a;color:#62e4c2}
:where(html[data-theme=dark]) .badge.bad{background:#341c14;color:#d18975}
:where(html[data-theme=dark]) .badge.warn{background:#3a2f16;color:#e8b55f}
:where(html[data-theme=dark]) .badge.ok:before,:where(html[data-theme=dark]) .badge.bad:before{background:currentColor}
:where(html[data-theme=dark]) .wrap{border:1px solid var(--line);background:var(--card)}
:where(html[data-theme=dark]) th{background:#111f2d;color:#97a6ba}
:where(html[data-theme=dark]) td{border-top:1px solid #1c2732}
:where(html[data-theme=dark]) td small{color:var(--mut)}
:where(html[data-theme=dark]) tbody tr:hover{background:#102b2b}
:where(html[data-theme=dark]) .notice{background:#352c14;border:1px solid #544720}
:where(html[data-theme=dark]) .notice.info{background:#142f36;border-color:#1c424a}
:where(html[data-theme=dark]) .empty{background:var(--card);border:1px dashed #28374a}
:where(html[data-theme=dark]) .empty p{color:var(--mut)}
:where(html[data-theme=dark]) details{background:var(--card);border:1px solid var(--line)}
:where(html[data-theme=dark]) .chart{background:var(--card);border:1px solid var(--line)}
:where(html[data-theme=dark]) .legend{color:var(--mut)}
:where(html[data-theme=dark]) pre{background:#131f32}
:where(html[data-theme=dark]) .lane{background:#172634}
:where(html[data-theme=dark]) .segment{border:0}
:where(html[data-theme=dark]) .parameter-picks{border:1px solid var(--line)}
:where(html[data-theme=dark]) .parameter-picks label{background:#15222f}
:where(html[data-theme=dark]) .step-number{color:var(--acc)}
:where(html[data-theme=dark]) hr{border:0;border-top:1px solid var(--line)}
:where(html[data-theme=dark]) .error-screen>.brand{color:var(--fg)}
:where(html[data-theme=dark]) #platform-frame{border:1px solid var(--line);background:var(--card)}
:where(html[data-theme=dark]) .config-group{background:var(--card);border:1px solid var(--line)}
:where(html[data-theme=dark]) .config-row{border-top:1px solid var(--line)}
:where(html[data-theme=dark]) .config-row small{color:var(--mut)}
:where(html[data-theme=dark]) .storage-row{border-bottom:1px solid var(--line)}
:where(html[data-theme=dark]) .storage-row small,:where(html[data-theme=dark]) .storage-detail span{color:var(--mut)}
:where(html[data-theme=dark]) .life-row{border-bottom:1px solid var(--line)}
:where(html[data-theme=dark]) .life-row time{color:var(--mut)}
:where(html[data-theme=dark]) .calendar-range label{color:var(--mut)}
:where(html[data-theme=dark]) .history-summary{background:var(--card);border:1px solid var(--line)}
:where(html[data-theme=dark]) .history-summary small{color:var(--mut)}
:where(html[data-theme=dark]) .chart-key{color:var(--mut)}
:where(html[data-theme=dark]) .on-time:before{background:#4069aa}
:where(html[data-theme=dark]) .offline-recorded:before{background:#bc790d}
:where(html[data-theme=dark]) .invalid-band:before{background:#4f2a5b}
:where(html[data-theme=dark]) .missing-band:before{background:repeating-linear-gradient(45deg,#4b5a6d 0 1px,#1b2633 1px 4px)}
:where(html[data-theme=dark]) .lane{background:repeating-linear-gradient(45deg,#4b5a6d40 0 1px,#1b2633 1px 6px)}
:where(html[data-theme=dark]) .wizard-steps{border-bottom:1px solid var(--line)}
:where(html[data-theme=dark]) .wizard-steps li{color:var(--mut)}
:where(html[data-theme=dark]) .wizard-steps li.active{border-bottom:3px solid var(--acc);color:var(--acc)}
:where(html[data-theme=dark]) fieldset{border:0}
:where(html[data-theme=dark]) .platform-choice{border:1px solid var(--line);background:var(--card)}
:where(html[data-theme=dark]) .platform-choice:has(input:checked){border-color:var(--acc);box-shadow:0 0 0 2px #087f8c20}
:where(html[data-theme=dark]) .platform-choice p{color:var(--mut)}
:where(html[data-theme=dark]) .chips span{background:#172c34}
:where(html[data-theme=dark]) .sticky-actions{background:var(--bg);border-top:1px solid var(--line)}
:where(html[data-theme=dark]) .device-heading small{color:var(--mut)}
:where(html[data-theme=dark]) .resolved{background:#153627;border-color:#264e3c}
:where(html[data-theme=dark]) .health-check{border:1px solid var(--line)}
:where(html[data-theme=dark]) .kpi{background:var(--card);border:1px solid var(--line)}
:where(html[data-theme=dark]) .kpi h2{color:var(--mut)}
:where(html[data-theme=dark]) .kpi small{color:var(--mut)}
:where(html[data-theme=dark]) .device-card{border:1px solid var(--line);background:var(--card)}
:where(html[data-theme=dark]) .device-card small{color:var(--mut)}
:where(html[data-theme=dark]) .segmented{background:var(--card);border:1px solid var(--line)}
:where(html[data-theme=dark]) .segmented a{color:var(--mut)}
:where(html[data-theme=dark]) .segmented a.active{background:#19373a;color:var(--acc)}
:where(html[data-theme=dark]) .subtabs a{color:var(--mut)}
:where(html[data-theme=dark]) .subtabs .active{color:var(--acc)}
:where(html[data-theme=dark]) .fleet-details dt{color:var(--mut)}
:where(html[data-theme=dark]) .chart-cursor{border-left:1px dashed #46586e}
:where(html[data-theme=dark]) .state-legend{color:var(--mut)}
:where(html[data-theme=dark]) .state-legend span{border-left:8px solid}
:where(html[data-theme=dark]) .event-heatmap a{background:rgba(233,123,19,var(--heat));color:#7ba4cb}
:where(html[data-theme=dark]) td small{color:var(--mut)}
:where(html[data-theme=dark]) .badge.warning{background:#3f3418;color:#e8b75e}
:where(html[data-theme=dark]) .badge.alarm{background:#321313;color:#db6b74}
:where(html[data-theme=dark]) .badge.error{background:#201434;color:#a57dca}
:where(html[data-theme=dark]) .badge.info{background:#152437;color:#78a2cf}
:where(html[data-theme=dark]) .message-summary{border:1px solid var(--line);background:var(--card)}
:where(html[data-theme=dark]) .message-summary small{color:var(--mut)}
:where(html[data-theme=dark]) .message-filters{background:var(--card);border:1px solid var(--line)}
:where(html[data-theme=dark]) .message-count{background:var(--card);border:1px solid var(--line);border-top:3px solid var(--tone,#4c78a5);color:var(--fg)}
:where(html[data-theme=dark]) .message-count strong{color:var(--tone)}
:where(html[data-theme=dark]) .message-count small{color:var(--mut)}
:where(html[data-theme=dark]) .message-count.selected{outline:2px solid var(--tone)}
:where(html[data-theme=dark]) .message-card{background:var(--card);border:1px solid var(--line);border-left:4px solid var(--tone)}
:where(html[data-theme=dark]) .message-meta{color:var(--mut)}
:where(html[data-theme=dark]) .navigation-notice{background:var(--card);border:1px solid #a6813f;box-shadow:0 4px 18px #172b4625}
:where(html[data-theme=dark]) .chart-tools{background:var(--card);border:1px solid var(--line)}
:where(html[data-theme=dark]) .chart-pan-row input[type=range]{accent-color:var(--acc)}
:where(html[data-theme=dark]) .chart-gesture-hint,:where(html[data-theme=dark]) .chart-range-note{color:var(--mut)}
:where(html[data-theme=dark]) .chart-exact{border:0;background:transparent}
:where(html[data-theme=dark]) .chart-range-form [role=alert]{color:var(--bad)}
:where(html[data-theme=dark]) .account-edit summary{color:var(--acc)}
:where(html[data-theme=dark]) .account-edit form{border-top:1px solid var(--line)}
:where(html[data-theme=dark]) .danger-form button{background:var(--card);color:#e8685e;border-color:#5c2923}
:where(html[data-theme=dark]) .danger-form button:hover{background:#351814}
:where(html[data-theme=dark]) .inline-form button{background:var(--card);color:var(--fg);border-color:var(--line)}
:where(html[data-theme=dark]) .section-note{color:var(--mut)}
:where(html[data-theme=dark]) .section-label{color:var(--mut)}
:where(html[data-theme=dark]) .ok-notice{background:#153627;border-color:#224a38}
:where(html[data-theme=dark]) .message-related summary{color:var(--acc)}
:where(html[data-theme=dark]) .since-strip{color:var(--fg)}
:where(html[data-theme=dark]) .topbar-search input{border:1px solid var(--line);background:var(--bg)}
:where(html[data-theme=dark]) .filter-label{color:var(--mut)}
:where(html[data-theme=dark]) .device-type-link:hover{box-shadow:0 0 0 2px currentColor}
:where(html[data-theme=dark]) .checked-line{color:var(--mut)}
:where(html[data-theme=dark]) .check-reason{border:0}
:where(html[data-theme=dark]) .power-readings{border-top:1px solid var(--line)}
:where(html[data-theme=dark]) .type-row{border:1px solid var(--line);color:var(--fg)}
:where(html[data-theme=dark]) .type-row:hover{border-color:var(--acc)}
:where(html[data-theme=dark]) .type-row small{color:var(--mut)}
:where(html[data-theme=dark]) .type-row.waiting{background:#3a2f16;border-color:#604d24}
:where(html[data-theme=dark]) .type-row.waiting small{color:#e8b55f}
:where(html[data-theme=dark]) .danger-zone summary{color:var(--bad)}
:where(html[data-theme=dark]) .danger-zone button{background:var(--bad);border-color:var(--bad)}
@media(max-width:760px){:where(html[data-theme=dark]) .mobile-toggle{background:var(--card);color:var(--fg);border-color:var(--line)}:where(html[data-theme=dark]) .wrap tr{background:var(--card);border:1px solid var(--line)}:where(html[data-theme=dark]) .wrap td{border:0}:where(html[data-theme=dark]) .wrap td:before{color:var(--mut)}}
/* B0 (Esa 2026-11-24): convenience changes on the old interface - same look, no new colours */
.crumbs{display:flex;gap:7px;align-items:center;flex-wrap:wrap;font-size:13px;color:var(--mut);margin:0 0 10px}
.crumbs a{color:var(--acc)}
.crumbs select{width:auto;max-width:230px;min-height:0;font-size:13px;padding:4px 8px;margin:0}
.tabs .tab-sep{width:1px;align-self:stretch;background:var(--line);margin:8px 0;flex:0 0 1px}
.tabs .tab-group{font-size:10px;text-transform:uppercase;letter-spacing:1.2px;color:var(--mut);flex:0 0 auto}
details.conn-details{margin:4px 0 18px}details.conn-details>summary{cursor:pointer;color:var(--mut);font-size:13px}
details.conn-details[open]>summary{margin-bottom:6px}details.conn-details .mqtt2-strip{margin:0}
.project-card details.conn-details{margin:0}
main:not(.page-only) #platform-frame{height:calc(100vh - 330px);min-height:650px}
.unit-view{margin-left:10px}.unit-view a{cursor:pointer}
.unit-list{background:var(--card);border:1px solid var(--line);border-radius:12px;margin:10px 0 18px;overflow:hidden}
.unit-row{display:grid;grid-template-columns:minmax(0,2fr) 96px minmax(0,3.2fr) minmax(0,2.6fr) 14px;gap:12px;align-items:center;padding:9px 14px;border-top:1px solid var(--line);cursor:pointer;font-size:13px}
.unit-row:first-child{border-top:0}.unit-row:focus-visible{outline:2px solid var(--acc);outline-offset:-2px}
.unit-row b{font-weight:600;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.unit-row .why{overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.unit-row .why small{color:var(--mut);margin-left:6px}
.unit-row .vals{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.unit-row .vals small{color:var(--mut)}.unit-row .chev{color:var(--mut)}
.unit-open{padding:10px;border-top:1px dashed var(--line);background:var(--bg)}.unit-open .device-card{margin:0;max-width:560px}
.device-cards.as-list{display:none}
@media(max-width:760px){
.device-type-tabs{display:flex;flex-wrap:nowrap;overflow-x:auto;scrollbar-width:none;width:100%}.device-type-tabs::-webkit-scrollbar{display:none}
.device-type-tabs a{flex:1 1 auto;padding:6px 7px;font-size:12.5px;justify-content:center}
#live-stats .stats{grid-template-columns:repeat(4,minmax(0,1fr));gap:6px;margin-bottom:12px}
#live-stats .stat{padding:8px}#live-stats .stat strong{font-size:20px;line-height:1.3}#live-stats .stat span{font-size:11px}#live-stats .stat small{display:none}
.unit-row{grid-template-columns:minmax(0,1fr) auto 12px;gap:3px 8px;padding:10px 12px}
.unit-row .why{grid-column:1/-1;grid-row:2}.unit-row .vals{grid-column:1/-1;grid-row:3}
}
/* B0b (Esa 2026-11-24): fixes of the 3 reviewer notes. The page mark is "units-as-list", NOT "unit-list" (that is the list box's own class) */
html.units-as-list #live-cards .device-cards{display:none}
details.conn-details>summary .conn-warn{color:var(--warn);font-weight:600}
.tabs.more-r,.device-type-tabs.more-r{-webkit-mask-image:linear-gradient(to right,#000 calc(100% - 40px),transparent);mask-image:linear-gradient(to right,#000 calc(100% - 40px),transparent)}
.tabs.more-l,.device-type-tabs.more-l{-webkit-mask-image:linear-gradient(to right,transparent,#000 40px);mask-image:linear-gradient(to right,transparent,#000 40px)}
.tabs.more-l.more-r,.device-type-tabs.more-l.more-r{-webkit-mask-image:linear-gradient(to right,transparent,#000 40px,#000 calc(100% - 40px),transparent);mask-image:linear-gradient(to right,transparent,#000 40px,#000 calc(100% - 40px),transparent)}
/* B1 action log (Log page). Old table rules stay; a phone gets a short row instead of the tall card. */
.log-kinds,.log-periods{flex-wrap:wrap}
.log-table td{vertical-align:top;overflow-wrap:anywhere}.log-table .badge,.log-table .log-time span{white-space:nowrap}.log-table .log-time span{display:inline-block}
.log-table .who small,.log-table .where small{display:block;color:var(--mut)}
.log-table tr.log-open td{background:rgba(8,127,140,.05)}
.log-more{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:6px 22px;margin:2px 0 4px}
.log-more div{overflow-wrap:anywhere}.log-more div small{display:block;color:var(--mut);font-size:12px}
.log-foot{display:flex;justify-content:space-between;gap:12px;flex-wrap:wrap;align-items:center;margin:14px 0}
.how{display:inline-block;font-size:12px;border:1px solid var(--line);border-radius:999px;padding:1px 8px;color:var(--mut);white-space:nowrap}
@media(max-width:760px){.log-more{grid-template-columns:1fr 1fr}
.segmented.log-periods,.segmented.log-kinds{display:flex;flex-wrap:nowrap;overflow-x:auto;scrollbar-width:none;max-width:100%}
.segmented.log-periods::-webkit-scrollbar,.segmented.log-kinds::-webkit-scrollbar{display:none}
.segmented.log-periods a,.segmented.log-kinds a{flex:0 0 auto}
.wrap .log-table tr{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:1px 10px;margin:8px 0;padding:10px 14px}
.wrap .log-table td{padding:0;border:0;width:auto;font-size:13px;overflow-wrap:anywhere}
.wrap .log-table td::before{display:none;content:none}
.log-table td:nth-child(1){grid-area:1/1;color:var(--mut);font-size:12px}
.log-table td:nth-child(7){grid-area:1/2;justify-self:end}
.log-table td:nth-child(5){grid-area:2/1/3/3;font-weight:600;font-size:14px}
.log-table td:nth-child(6){grid-area:3/1/4/3}
.log-table td:nth-child(2){grid-area:4/1/5/3;color:var(--mut)}
.log-table td:nth-child(4){grid-area:5/1/6/3;color:var(--mut)}
.log-table td:nth-child(3){display:none}
.log-table td:nth-child(6):empty,.log-table td:has(.where.none){display:none}
.log-table .who small,.log-table .where small{display:inline}
.log-table .who small::before,.log-table .where small::before{content:' · '}
.wrap .log-table td[colspan]{grid-area:auto/1/auto/3}
.wrap .log-table tr.log-open{background:rgba(8,127,140,.05)}.wrap .log-table tr.log-open td{background:none}}

/* S1 standard interface (Esa 2026-11-24 12:35 approved): unit list v2, Offline now cards, Back online events, Settings -> Unit list. Classes start with ul- (no clash with older names) */
.ul-note{color:var(--mut);font-size:12.5px;margin:4px 0 12px}.ul-note a{font-weight:600;margin-left:8px}
.ul-list{background:var(--card,#fff);border:1px solid var(--line);border-radius:12px;overflow:hidden;margin:0 0 8px}
a.ul-row{display:grid;grid-template-columns:minmax(200px,1.3fr) minmax(0,1.6fr) minmax(0,1.5fr) 14px;gap:16px;align-items:center;padding:12px 16px;border-top:1px solid var(--line);color:var(--fg);text-decoration:none}
a.ul-row:first-child{border-top:0}a.ul-row:hover{background:rgba(127,127,127,.07)}a.ul-row.off{border-left:4px solid var(--bad);padding-left:12px}
.ul-who{min-width:0}.ul-nm{font-weight:650;font-size:14.5px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.ul-sub{display:flex;gap:7px;align-items:center;margin-top:4px;font-size:12px;min-width:0}
.ul-pill{font-size:11px;font-weight:700;padding:1px 8px;border-radius:999px;flex:0 0 auto}.ul-pill.bad{background:rgba(217,74,74,.16);color:var(--bad)}.ul-pill.warn{background:rgba(171,107,18,.18);color:var(--warn)}.ul-pill.ok{background:rgba(22,129,101,.16);color:var(--ok)}
.ul-why{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;min-width:0;color:var(--mut)}.ul-why.bad{color:var(--bad)}.ul-why.warn{color:var(--fg)}.ul-more{color:var(--mut);white-space:nowrap;flex:0 0 auto}
.ul-vals{display:grid;gap:10px;align-items:end}.ul-val{min-width:0}
.ul-val small{display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;font-size:11px;color:var(--mut);line-height:1.25}.ul-val small i{font-style:normal;margin-left:4px;opacity:.8}
.ul-val b{display:block;font-size:24px;line-height:1.15;font-weight:650;font-variant-numeric:tabular-nums;white-space:nowrap}.ul-val.long b{font-size:19px}.ul-val.vlong b{font-size:15px}.ul-val.badv b{color:var(--bad)}
.ul-lights{display:flex;flex-wrap:wrap;gap:5px 12px;font-size:12px}
.ul-lt{display:inline-flex;align-items:center;gap:5px;white-space:nowrap}.ul-lt:before{content:'';width:9px;height:9px;border-radius:50%;background:currentColor;flex:0 0 9px}
.ul-lt.lg{color:var(--ok)}.ul-lt.ly{color:var(--warn)}.ul-lt.lr{color:var(--bad);font-weight:600}.ul-lt.ln{color:var(--fg)}.ul-lt.ln:before{background:var(--mut)}
.ul-lt.lx{color:var(--mut)}.ul-lt.lx:before{background:transparent;border:1.5px solid currentColor;width:6px;height:6px;flex-basis:6px}
.ul-go{color:var(--mut);font-size:18px}
.ul-sec{margin:22px 0 26px}.ul-offs{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}
.ul-off{background:var(--card,#fff);border:1px solid var(--line);border-left:4px solid var(--bad);border-radius:12px;padding:14px 16px;display:flex;flex-direction:column;gap:10px;min-width:0}
.ul-top{display:flex;justify-content:space-between;gap:10px;align-items:flex-start}.ul-off .ul-nm a{color:var(--fg)}.ul-off .ul-nm small{display:block;font-weight:400;color:var(--mut);font-size:11.5px}
.ul-dur{text-align:right;white-space:nowrap}.ul-dur b{display:block;font-size:22px;color:var(--bad);line-height:1.1}.ul-dur small{color:var(--mut);font-size:11.5px}
.ul-cause{display:flex;gap:10px;align-items:flex-start;padding:10px 12px;border-radius:9px;background:rgba(127,127,127,.07)}
.ul-ic{width:28px;height:28px;border-radius:8px;display:grid;place-items:center;font-size:15px;flex:0 0 28px}.ul-ic.pw{background:rgba(217,74,74,.18)}.ul-ic.nw{background:rgba(171,107,18,.22)}.ul-ic.uk{background:rgba(127,127,127,.18)}
.ul-cause b{font-size:13.5px}.ul-cause small{display:block;color:var(--mut);font-size:12px;margin-top:2px}
.ul-last{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:6px}.ul-last small{display:block;font-size:11px;color:var(--mut)}.ul-last b{font-size:16px;font-variant-numeric:tabular-nums}
.ul-foot{display:flex;justify-content:space-between;gap:8px;align-items:center;font-size:12px;color:var(--mut);border-top:1px solid var(--line);padding-top:8px}.ul-foot a{font-weight:600;white-space:nowrap}
.ul-back .ul-ochips{display:flex;gap:6px;flex-wrap:wrap;margin:0 0 10px}.ul-chip{font-size:12px;padding:2px 9px;border-radius:999px;border:1px solid var(--line)}.ul-chip b{font-weight:700}
.ul-evs{border:1px solid var(--line);border-radius:12px;overflow:hidden}
details.ul-ev{margin:0;padding:0;border:0;border-top:1px solid var(--line);border-radius:0;background:transparent}details.ul-ev:first-child{border-top:0}details.ul-ev[open]>summary{margin:0}
details.ul-ev>summary{display:grid;grid-template-columns:150px 80px minmax(0,1fr) 150px;gap:4px 14px;align-items:center;padding:11px 16px;list-style:none;font-weight:400}
details.ul-ev>summary::-webkit-details-marker{display:none}details.ul-ev.big>summary{background:rgba(8,127,140,.06)}
.ul-when{font-size:13px}.ul-when small,.ul-wh small{display:block;color:var(--mut);font-size:11.5px}
.ul-cnt{font-size:20px;font-weight:700;font-variant-numeric:tabular-nums}.ul-cnt small{font-size:11.5px;color:var(--mut);font-weight:400;margin-left:3px}
.ul-wh{min-width:0}.ul-wh b{font-size:13.5px}.ul-wh small{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.ul-tag{font-size:11.5px;padding:2px 8px;border-radius:6px;justify-self:start}.ul-tag.srv{background:#e2f3f5;color:#065f69}.ul-tag.site{background:#fdf1dc;color:#8a5308}.ul-tag.pw{background:#fde8e8;color:#b52f2f}
:where(html[data-theme=dark]) .ul-tag.srv{background:rgba(8,127,140,.2);color:#6fd0d9}:where(html[data-theme=dark]) .ul-tag.site{background:rgba(171,107,18,.22);color:#f0b35a}:where(html[data-theme=dark]) .ul-tag.pw{background:rgba(217,74,74,.18);color:#f08a8a}
.ul-units{grid-column:3/5;font-size:12px;color:var(--mut)}
.ul-evunits{margin:0;padding:6px 16px 12px 40px;font-size:12.5px}.ul-evunits li{margin:4px 0}.ul-evunits small{display:block;color:var(--mut)}
details.ul-older{margin:0;border:0;border-top:1px solid var(--line);border-radius:0;padding:10px 16px}
.ul-cols{display:grid;grid-template-columns:1fr 1fr;gap:18px}
.ul-pick legend{font-size:14px;font-weight:650;margin:0 0 8px}.ul-pick ol{list-style:none;margin:0;padding:0;border:1px solid var(--line);border-radius:10px;overflow:hidden}
.ul-pick li{display:flex;justify-content:space-between;align-items:center;gap:10px;padding:6px 12px;border-top:1px solid var(--line)}.ul-pick li:first-child{border-top:0}.ul-pick li.ul-unpick{opacity:.75}
.ul-pick label{display:flex;gap:9px;align-items:center;margin:0;font-weight:600;font-size:13.5px;cursor:pointer}.ul-pick label input[type=checkbox]{width:auto;margin:0}.ul-pick label small{color:var(--mut);font-weight:400;margin-left:6px}
.ul-pick label.ul-ord{font-size:11px;font-weight:400;color:var(--mut);gap:5px}.ul-pick .ul-ord input{width:58px;padding:4px 6px}
form.ul-default{margin-top:-6px}form.ul-default button{background:#fff;color:var(--fg);border-color:var(--line)}.ul-prev{margin:20px 0}
@media(max-width:1100px){a.ul-row{grid-template-columns:minmax(0,1fr) minmax(0,1.4fr)}.ul-row .ul-lights{grid-column:1/-1}.ul-go{display:none}.ul-offs{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:760px){a.ul-row{grid-template-columns:1fr;gap:10px}.ul-row .ul-vals{grid-template-columns:repeat(2,minmax(0,1fr))!important}.ul-offs,.ul-cols{grid-template-columns:1fr}
details.ul-ev>summary{grid-template-columns:1fr auto;gap:4px 10px}.ul-wh,.ul-units{grid-column:1/-1}.ul-tag{grid-column:1/-1}.ul-evunits{padding-left:28px}}
