:root{color-scheme:dark;--bg:#11151a;--panel:#191f26;--line:#2c333d;--muted:#939eac;--text:#edf1f5;--red:#ed3349;--green:#45d6a1;--yellow:#f6bf59;--blue:#8a9cfa}*{box-sizing:border-box}body{margin:0;background:var(--bg);color:var(--text);font:14px/1.55 -apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif}a{color:inherit;text-decoration:none}button,input,select,textarea{font:inherit}button,.button{border:1px solid transparent;padding:11px 17px;border-radius:8px;font-weight:600;cursor:pointer;display:inline-flex;align-items:center;justify-content:center;gap:8px}button:disabled{opacity:.5;cursor:wait}button:focus-visible,a:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible,summary:focus-visible{outline:2px solid var(--red);outline-offset:3px}.primary{background:var(--red);color:white}.primary:hover{background:#fb4960}.secondary,.icon-button{background:#202730;color:var(--text);border-color:#37414c}.text-button{border:0;background:none;color:var(--muted);padding:6px}.danger{background:#3d2029;color:#ff8595;border-color:#65313d}.sidebar{position:fixed;inset:0 auto 0 0;width:244px;background:#0c1015;border-right:1px solid var(--line);padding:30px 18px;z-index:5}.brand{display:flex;align-items:center;gap:12px;padding:0 10px;margin-bottom:46px;font-size:23px;font-weight:750;letter-spacing:-.6px}.brand img{width:40px;height:40px}.brand small{display:block;color:var(--muted);font-size:8px;letter-spacing:1.6px;font-weight:500}.nav-label{font-size:10px;color:#717e8f;letter-spacing:1.6px;margin:30px 16px 12px}.sidebar nav a{padding:12px 14px;margin-bottom:6px;border-radius:8px;display:flex;gap:13px;align-items:center;color:#a6b0be}.sidebar nav a.active{background:#2e1c25;color:#ff6275;box-shadow:inset 3px 0 var(--red)}.sidebar nav a:hover{background:#1c242e}.sidebar-bottom{position:absolute;bottom:25px;left:28px;color:#bdc5cf;font-size:11px}.sidebar-bottom small{display:block;margin:5px 0 0 16px;color:#697686}.brand-dot{display:inline-block;width:6px;height:6px;border-radius:50%;background:var(--red);margin-right:6px}main{margin-left:244px}.topbar{height:76px;background:#151a21;border-bottom:1px solid var(--line);display:flex;align-items:center;justify-content:space-between;padding:0 34px;font-size:12px}.separator{color:#525e6c;margin:0 15px}.header-right{display:flex;align-items:center;gap:18px}.avatar{width:28px;height:28px;background:#342532;color:#ff8898;display:grid;place-items:center;border-radius:50%}.content{padding:34px;max-width:2000px;margin:auto}.page-heading{display:flex;align-items:center;justify-content:space-between;gap:20px;margin-bottom:26px}.eyebrow{font-size:10px;font-weight:700;letter-spacing:2px;color:var(--muted);margin-bottom:8px}h1{font-size:32px;letter-spacing:-1.1px;line-height:1.2;margin:0 0 10px;font-weight:650}h2{font-size:15px;margin:0 0 8px;font-weight:650}p{color:var(--muted);margin:8px 0 18px}.accent{color:var(--red)}.actions{display:flex;gap:10px;align-items:center}.muted{color:var(--muted);font-size:12px}.metrics{display:grid;grid-template-columns:repeat(4,1fr);gap:16px;margin-bottom:24px}.metric{background:linear-gradient(120deg,#1c232c,#171d24);border:1px solid var(--line);border-radius:11px;padding:21px 24px}.metric>span{font-size:10px;letter-spacing:1px;color:#a5b0bd}.metric strong{display:block;font-size:34px;font-weight:600;margin:8px 0 4px;line-height:1.2}.metric small{color:#748292;font-size:11px}.dot{display:inline-block;width:7px;height:7px;border-radius:50%;margin-right:6px;background:#7d8b9d}.dot.up{background:var(--green)}.dot.down{background:var(--red)}.dot.warning{background:var(--yellow)}.dot.maintenance{background:var(--blue)}.panel{border:1px solid var(--line);border-radius:12px;background:var(--panel);margin-bottom:24px;overflow:hidden}.padded{padding:26px}.panel-heading{padding:18px 24px;display:flex;justify-content:space-between;align-items:center;gap:16px;border-bottom:1px solid var(--line)}.panel-heading h2{margin:0}.panel-heading>div:first-child{display:flex;gap:14px;align-items:center}.live-badge{font-size:10px;padding:5px 9px;background:#19382f;border:1px solid #275646;color:#72e2b7;border-radius:5px}.live-badge.offline{background:#382c1c;border-color:#655031;color:var(--yellow)}.site-map{height:480px;position:relative;background-color:#12191f;background-size:100% 100%;background-repeat:no-repeat;isolation:isolate}.map-grid{position:absolute;inset:0;background-image:radial-gradient(#35414b 1px,transparent 1px);background-size:24px 24px;opacity:.36;z-index:-1}.with-background .map-grid{display:none}.map-caption{position:absolute;bottom:16px;left:24px;font-size:12px;color:#9eabba;pointer-events:none}.map-caption span{display:block;font-size:8px;letter-spacing:2px;color:#607081}.empty-state{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;flex-direction:column}.empty-state[hidden]{display:none}.empty-state h2{font-size:20px}.empty-icon{font-size:40px;color:#607284;margin-bottom:12px}.empty-state .text-button{margin-top:12px}.map-footer{padding:14px 24px;display:flex;align-items:center;justify-content:space-between;gap:15px;border-top:1px solid var(--line)}.legend{display:flex;gap:15px;flex-wrap:wrap;font-size:10px;color:#9aa8b8}.device-node{position:absolute;transform:translate(-50%,-50%);min-width:120px;max-width:170px;padding:10px 12px;border:1px solid #435062;border-radius:9px;color:#e7edf5;background:#1c2632f5;display:flex;flex-direction:column;gap:2px;font-size:11px;box-shadow:0 8px 20px #0005}.device-node svg{width:25px;height:25px;color:#a9bdcd;margin:1px 0 4px}.device-node.up{border-color:#386756}.device-node.down{border-color:#bc4859;background:#30212bf5}.device-node.warning{border-color:#997637}.device-node.maintenance{border-color:#697fca}.node-name{max-width:145px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.node-status{font-size:9px;font-weight:400;color:#aab7c5}.editing .device-node{cursor:grab;touch-action:none;border-style:dashed}.editing .device-node:active{cursor:grabbing}.map-panel:fullscreen{display:flex;flex-direction:column;background:var(--bg);border:none;border-radius:0;margin:0}.map-panel:fullscreen .site-map{flex:1}.device-list{display:grid;grid-template-columns:repeat(3,1fr)}.device-row{padding:20px 24px;border-bottom:1px solid var(--line);display:flex;align-items:center;gap:12px}.device-row>svg{width:28px;height:28px;color:#8a9bab}.device-row-info{flex:1;min-width:0}.device-row-info strong{font-size:12px;display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.device-row-info small{font-size:10px;color:var(--muted)}.pill{font-size:10px;border:1px solid #3a4654;background:#202b37;color:#afbdcc;padding:4px 9px;border-radius:5px;white-space:nowrap}.pill.up{color:#75dfb5;background:#19382f;border-color:#285443}.pill.down{color:#ff8695;background:#3e222b;border-color:#66313e}.pill.warning{color:#f8cc77;background:#3b301e;border-color:#63502f}.pill.maintenance{color:#abb8ff}.form-grid{display:grid;grid-template-columns:1fr 1fr;gap:20px;margin:22px 0}.form-grid .wide{grid-column:1/-1}label{display:flex;flex-direction:column;gap:8px;font-size:12px;color:#bbc6d2}input,textarea,select{background:#10171e;border:1px solid #354150;border-radius:7px;color:#e8edf4;padding:11px 13px;width:100%;min-width:0}textarea{resize:vertical}input[type=checkbox]{width:16px;height:16px;accent-color:var(--red);margin:0;flex-shrink:0}.check{display:flex;flex-direction:row;align-items:center;gap:9px}.check input{display:inline-block}.toggle{margin:20px 0}label small,.helper{color:#8493a5;font-size:11px;line-height:1.8}.section-heading{display:flex;align-items:flex-start;gap:15px}.section-heading h2{font-size:17px}.section-heading p{margin:0}.step{display:grid;place-items:center;background:#2e202a;color:#ed7688;border:1px solid #50313d;border-radius:7px;min-width:34px;height:34px;font-size:11px}.save-bar{position:sticky;bottom:16px;background:#1c2631f5;border:1px solid #3b4959;padding:16px 22px;display:flex;justify-content:space-between;align-items:center;border-radius:10px;z-index:4}.save-bar>span{font-size:12px;color:var(--muted)}.checks-editor{display:grid;grid-template-columns:repeat(4,1fr);gap:12px;margin:22px 0}.checks-editor>div{padding:14px;border:1px solid var(--line);border-radius:8px;background:#141b23}.port-label{flex-direction:row;align-items:center;margin-top:12px;font-size:10px;color:var(--muted)}.port-label input{padding:7px}.device-editor>summary{list-style:none;display:flex;justify-content:space-between;align-items:center;padding:20px 26px;cursor:pointer}.device-editor summary small{display:block;color:var(--muted);font-size:11px}.device-editor[open]>summary{border-bottom:1px solid var(--line)}.delete-form{margin-top:18px}.check-results{padding:16px;margin-top:20px;background:#111820;border-radius:8px;font-size:12px;line-height:2}.notice{padding:14px 20px;border:1px solid #455567;background:#243142;border-radius:8px;margin-bottom:20px}.notice.error{background:#3c222c;border-color:#713343;color:#ff9aaa}.notice.success{background:#1c372e;border-color:#305d4c;color:#8ce4bd}.login-panel{max-width:480px;margin:7vh auto;padding:38px}.login-panel h1{font-size:29px}.login-logo{width:52px;margin-bottom:20px}.form-stack{display:flex;flex-direction:column;gap:20px;margin:30px 0}.two-columns{display:grid;grid-template-columns:1fr 1fr;gap:24px}.table-wrap{overflow:auto}table{border-collapse:collapse;width:100%;font-size:12px}th,td{text-align:left;padding:16px 22px;border-bottom:1px solid var(--line)}th{color:var(--muted);font-size:10px;letter-spacing:1px}pre{white-space:pre-wrap;overflow-wrap:anywhere;background:#0c131a;padding:18px;border:1px solid var(--line);border-radius:8px;color:#bccad9;font-size:12px}code{overflow-wrap:anywhere;font-size:12px;color:#b7c7d8}.quiet-empty{padding:35px;text-align:center;color:var(--muted)}.toast{position:fixed;bottom:30px;left:50%;transform:translateX(-50%);padding:15px 25px;background:#263548;border:1px solid #58718b;border-radius:9px;z-index:20}.viewer .sidebar{display:none}.viewer main{margin-left:0}.viewer .content{padding:26px 34px}.viewer .topbar{height:58px}.viewer .site-map{height:52vh;min-height:340px}@media(min-width:1600px){.site-map{height:560px}}@media(max-width:1100px){.sidebar{width:205px}.brand{font-size:20px}.brand img{width:32px}main{margin-left:205px}.content{padding:22px}.page-heading{align-items:flex-start;flex-direction:column}.metric{padding:16px}.metric small{font-size:10px}.device-list{grid-template-columns:1fr 1fr}.checks-editor{grid-template-columns:1fr 1fr}.map-footer{align-items:flex-start;flex-direction:column}}@media(max-width:720px){.sidebar{position:static;width:auto;padding:15px}.brand{margin:0}.sidebar nav{display:flex;overflow:auto;margin-top:14px}.sidebar nav a{white-space:nowrap}.sidebar .nav-label,.sidebar-bottom{display:none}main{margin:0}.topbar{padding:12px 20px;height:auto}.header-right{gap:10px}#clock{display:none}.metrics{grid-template-columns:1fr 1fr}.content,.viewer .content{padding:18px}.page-heading h1{font-size:28px}.actions{flex-wrap:wrap}.form-grid,.two-columns{grid-template-columns:1fr}.device-list{grid-template-columns:1fr}.panel-heading{align-items:flex-start;flex-direction:column}.save-bar{gap:15px}.site-map{height:520px}.device-node{min-width:90px;max-width:125px;font-size:9px}.node-name{max-width:100px}.legend{gap:10px}}

.extended-checks{grid-template-columns:repeat(2,minmax(0,1fr))}.extended-checks>div{display:flex;flex-direction:column;gap:12px}.extended-checks .port-label{margin:0}.extended-checks small{color:var(--muted);font-size:11px}.preset-actions{margin-top:18px;flex-wrap:wrap}@media(max-width:720px){.extended-checks{grid-template-columns:1fr}}
.extended-checks>div:not(:has(.check input:checked))>:not(.check){display:none}

/* Compact customer-monitor summary: logo, four counts, remote service. */
.compact-metrics{grid-template-columns:repeat(6,minmax(0,1fr));gap:10px;margin-bottom:16px}
.compact-metrics .metric{min-height:78px;padding:12px 16px;border-radius:9px;display:flex;flex-direction:column;justify-content:center}
.compact-metrics .metric>span{font-size:9px;letter-spacing:.7px}
.compact-metrics .metric strong{font-size:25px;line-height:1.1;margin:7px 0 0}
.compact-metrics .logo-metric{flex-direction:row;align-items:center;justify-content:flex-start;gap:10px}
.compact-metrics .logo-metric img{width:38px;height:38px;flex-shrink:0}
.compact-metrics .logo-metric strong{font-size:16px;margin:0;overflow-wrap:anywhere}
.compact-metrics .remote-metric strong{font-size:17px;margin-top:6px}
.compact-metrics .remote-metric small{font-size:9px;line-height:1.25;margin-top:4px}
.map-toolbar{display:flex;align-items:center;justify-content:flex-end;gap:8px;flex-wrap:wrap}
.map-toolbar button,.map-toolbar .button{font-size:11px;padding:7px 10px}
@media(max-width:1100px){.compact-metrics{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media(max-width:480px){.compact-metrics .metric{padding:10px;min-height:72px}.compact-metrics .metric>span{font-size:8px}.compact-metrics .logo-metric{gap:6px}.compact-metrics .logo-metric img{width:27px;height:27px}.compact-metrics .logo-metric strong{font-size:12px}.compact-metrics .remote-metric strong{font-size:14px}}

/* Device state is visible across the whole card, including on uploaded plans. */
:root{--yellow:#ff9b42}
.device-node.up{background:#14513e;border:2px solid #4be0a8;color:#f1fff8}
.device-node.warning{background:#753d13;border:2px solid #ff9b42;color:#fff8ed}
.device-node.down{background:#771f31;border:2px solid #ff6579;color:#fff1f3}
.device-node.up svg,.device-node.warning svg,.device-node.down svg{color:inherit}
.device-node.up .node-status,.device-node.warning .node-status,.device-node.down .node-status{color:inherit;font-weight:600}
.device-row.up{background:#15382d;border-left:4px solid #45d6a1}
.device-row.warning{background:#422a19;border-left:4px solid #ff9b42}
.device-row.down{background:#3f2029;border-left:4px solid #ff6579}
.device-row.up>svg{color:#75dfb5}.device-row.warning>svg{color:#ffb575}.device-row.down>svg{color:#ff91a0}
.pill.warning{color:#ffc08b;background:#573214;border-color:#b97133}
.device-row.warning .device-row-info small,.device-row.down .device-row-info small,.device-row.up .device-row-info small{color:#c6d0db}

/* Dense floor-plan markers for sites with many devices. */
.site-map .device-node{width:76px;min-width:76px;max-width:76px;height:40px;padding:4px 5px;gap:2px;border-width:1px;border-radius:5px;font-size:9px;line-height:1.2;box-shadow:0 2px 6px #0004}
.site-map .device-node svg{width:14px;height:14px;margin:0;flex-shrink:0}
.site-map .device-node .node-name{display:block;width:64px;max-width:64px;line-height:12px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.site-map .device-node:hover,.site-map .device-node:focus-visible{z-index:2}

.site-map.device-size-medium .device-node{width:104px;min-width:104px;max-width:104px;height:54px;padding:6px;gap:3px;border-radius:6px;font-size:10px}
.site-map.device-size-medium .device-node svg{width:20px;height:20px}
.site-map.device-size-medium .device-node .node-name{width:90px;max-width:90px;line-height:14px}
.site-map.device-size-large .device-node{width:136px;min-width:136px;max-width:136px;height:70px;padding:8px;gap:4px;border-radius:8px;font-size:11px}
.site-map.device-size-large .device-node svg{width:28px;height:28px}
.site-map.device-size-large .device-node .node-name{width:118px;max-width:118px;line-height:16px}

.site-map.device-size-xs .device-node{width:56px;min-width:56px;max-width:56px;height:30px;padding:3px;gap:1px;border-radius:4px;font-size:8px}
.site-map.device-size-xs .device-node svg{width:10px;height:10px}
.site-map.device-size-xs .device-node .node-name{width:48px;max-width:48px;line-height:10px}

/* Clock joins the summary row; the customer dashboard has no top header. */
.topbar{justify-content:flex-end}
.compact-metrics{grid-template-columns:repeat(7,minmax(0,1fr))}
.clock-metric #clock{display:block;font-variant-numeric:tabular-nums;font-size:23px;white-space:nowrap}
.clock-metric #clock-date{font-size:10px;margin-top:4px;white-space:nowrap}
.viewer .site-map{height:calc(52vh + 58px)}
@media(max-width:1100px){.compact-metrics{grid-template-columns:repeat(4,minmax(0,1fr))}}
@media(max-width:720px){.compact-metrics{grid-template-columns:repeat(3,minmax(0,1fr))}}

/* Administrative navigation and document editor */
.sidebar{overflow-y:auto}.sidebar-bottom{position:static;margin-top:28px;padding-bottom:18px}.settings-menu summary{cursor:pointer;padding:12px 16px;font-weight:600}.settings-menu>a{padding-top:7px;padding-bottom:7px;font-size:12px}.settings-menu .nav-label{margin-top:14px}.documentation{max-height:70vh;overflow:auto}#diagram-host:not([hidden]){position:fixed;inset:12px;z-index:100;background:var(--panel);display:flex;flex-direction:column;padding:10px;gap:8px}#diagram-frame{flex:1;width:100%;border:0;background:white}#document-form{display:flex;flex-direction:column;gap:16px}@media(max-width:720px){.sidebar nav{display:block}.settings-menu[open]{max-height:50vh;overflow:auto}}
@media(max-width:720px){.sidebar nav{display:flex;flex-wrap:wrap;gap:0;margin-top:8px}.sidebar nav>a{padding:8px 12px}.settings-menu{flex-basis:100%}.settings-menu[open]{max-height:230px;overflow-y:auto}.sidebar nav .settings-menu>a{display:inline-flex;width:48%;margin:0;padding:6px 12px}.settings-menu summary{padding:8px 12px}.sidebar .brand img{width:28px}.sidebar .brand{font-size:18px}}

/* Offline alerts pulse slowly while labels remain continuously readable. */
@keyframes offline-alert{0%,100%{background-color:#771f31;border-color:#ff6579;box-shadow:0 0 0 0 #ff405900}50%{background-color:#b3263e;border-color:#ffadba;box-shadow:0 0 0 4px #ff405944,0 0 16px #ff405977}}
.device-node.down,.device-row.down .pill.down{animation:offline-alert 1.6s ease-in-out infinite}
@media(prefers-reduced-motion:reduce){.device-node.down,.device-row.down .pill.down{animation:none}}

.background-preview{height:200px;background-color:#12191f;background-size:contain;background-position:center;background-repeat:no-repeat;border:1px solid var(--line);border-radius:8px;position:relative}.background-preview>span{position:absolute;bottom:8px;left:8px;background:#12191fe6;color:var(--text);border-radius:4px;padding:3px 8px;font-size:11px}#background-strength{accent-color:var(--red);cursor:pointer;padding:8px 0}

/* Reserve space for the kiosk's hourly pixel shift without clipping the layout. */
.viewer.kiosk-display .content{width:calc(100% - 8px);margin:4px;transform:translate(var(--kiosk-shift-x,0px),var(--kiosk-shift-y,0px))}

/* Connection lines sit behind devices and follow the downstream device status. */
.map-links{position:absolute;inset:0;width:100%;height:100%;overflow:visible;pointer-events:none;z-index:0}
.site-map .device-node{z-index:1}.map-caption{z-index:1}
.device-link{stroke:#939eac;stroke-width:3;vector-effect:non-scaling-stroke;stroke-linecap:round}
.device-link.up{stroke:#45d6a1}.device-link.warning{stroke:#f6a23b}.device-link.down{stroke:#ff4059;animation:offline-line 1.6s ease-in-out infinite}
.device-link.unknown{stroke:#939eac;stroke-dasharray:6 5}.device-link.maintenance{stroke:#8a9cfa;stroke-dasharray:6 5}
@keyframes offline-line{0%,100%{stroke-opacity:.5;stroke-width:3}50%{stroke-opacity:1;stroke-width:5}}
.connection-row{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:8px 0;border-bottom:1px solid var(--line)}
@media(prefers-reduced-motion:reduce){.device-link.down{animation:none}}

/* Company logo first; the four counters occupy narrow columns. */
.compact-metrics{grid-template-columns:minmax(130px,1.15fr) minmax(100px,1fr) repeat(4,minmax(80px,104px)) minmax(120px,1fr) minmax(110px,1fr)}
.compact-metrics .count-metric{padding:10px 8px}.compact-metrics .count-metric>span{font-size:8.5px;letter-spacing:.25px;white-space:nowrap}
.compact-metrics .company-logo-metric{background:#fff;align-items:center;padding:10px 14px}
.company-logo-metric img{display:block;width:100%;max-width:155px;height:52px;object-fit:contain}
@media(max-width:1100px){.compact-metrics{grid-template-columns:repeat(4,minmax(0,1fr))}}
@media(max-width:600px){.compact-metrics{grid-template-columns:repeat(2,minmax(0,1fr))}}

.branding-preview{height:100px;padding:16px;display:flex;align-items:center;justify-content:center;border-radius:10px;margin:12px 0 20px;background:#192129}.branding-preview.company-preview{background:#fff}.branding-preview img{max-width:100%;max-height:68px;object-fit:contain}
