.office-banner{display:flex;align-items:center;gap:36px;background:linear-gradient(115deg,#23113d,#361266 65%,#4d2378);border-radius:22px;padding:32px 36px;color:#fff;margin-bottom:22px;box-shadow:0 12px 28px #36126612}.office-banner>div:first-child{flex:1}.office-eyebrow{font:600 11px/1.6 Sen,Arial,sans-serif;letter-spacing:1.8px;color:#c66c4c}.office-banner .office-eyebrow{color:#ffc2a5}.office-banner h2{font-size:30px;margin:10px 0}.office-banner p{color:#e5dcee;margin:0}.office-stat{display:grid;gap:8px;text-align:center;min-width:92px}.office-stat strong{font:500 36px Sen,Arial,sans-serif}.office-stat span{font-size:12px;color:#e5dcee}.office-systems{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:16px}.office-system{display:flex;align-items:center;gap:12px;margin:0}.office-system>div:nth-child(2){flex:1;min-width:0}.office-system p{margin:5px 0;font-size:12px;color:#756783}.office-system .pill{white-space:nowrap;font-size:11px}.office-notice{display:flex;gap:20px;padding:18px 22px;background:#fff8f2;border:1px solid #f2dfcf;border-radius:14px;margin:20px 0;color:#76543d;font-size:13px;line-height:1.9}.office-notice strong{white-space:nowrap}.office-workspace{display:grid;grid-template-columns:minmax(0,1fr) 310px;gap:20px;align-items:start}.office-plan{padding:22px;min-width:0}.office-toolbar{display:flex;justify-content:space-between;gap:10px;align-items:flex-start}.office-toolbar h3{margin:0}.office-toolbar p{font-size:12px}.office-actions{display:flex;flex-wrap:wrap;gap:8px}.office-actions .btn{font-size:12px}.office-canvas{position:relative;min-height:320px;perspective:1200px;overflow:hidden;border-radius:12px;background:linear-gradient(#fcfaff,#f4f0f8);border:1px solid #ece5f1;padding:14px}.office-map{display:block;width:100%;min-height:310px;transition:transform .35s;transform-origin:center}.office-map.perspective{transform:rotateX(22deg) rotateZ(-5deg) scale(.93)}.office-room{cursor:pointer;outline:none}.office-room-depth{fill:#c6b5d8}.office-room-floor{fill:#f3eafa;stroke:#a895bd;stroke-width:.35;transition:fill .2s}.office-room:hover .office-room-floor{fill:#e4d4ef}.office-room.selected .office-room-floor{fill:#d8c1ec;stroke:#663391;stroke-width:.65}.office-room:focus-visible .office-room-floor{stroke:#cb704c;stroke-width:1}.office-room-label{height:100%;display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;color:#361266;font-size:2px;line-height:1.6;padding:1px;box-sizing:border-box;overflow:hidden;overflow-wrap:anywhere}.office-room-label span{font-size:1.5px;color:#7d638f}.office-empty{position:absolute;inset:18px;display:flex;flex-direction:column;justify-content:center;align-items:center;text-align:center;background:#faf7fde8;border-radius:12px;padding:20px}.office-empty>span{padding:16px;border-radius:18px;background:#ede5f5;color:#361266}.office-empty h3{font-size:22px;margin:16px 0 8px}.office-empty p{max-width:380px;font-size:14px;color:#7d6c8a;line-height:1.9}.office-room-list{display:flex;flex-wrap:wrap;gap:8px;margin-top:18px}.office-detail h2{font-size:23px;margin:10px 0 18px}.office-detail>p{font-size:12px;line-height:1.8}.office-device{padding:18px 0;border-top:1px solid #eee7f2}.office-device-title{display:flex;gap:10px;align-items:center}.office-device-title small{display:block;color:#7e708a;margin-top:5px}.office-device-title .icon{background:#f3edf9;border-radius:10px;padding:8px;box-sizing:content-box}.office-device-actions{display:flex;flex-wrap:wrap;gap:8px}.office-device-actions .btn{font-size:11px;white-space:normal}.office-device-actions .btn:disabled{opacity:.6;cursor:not-allowed}.office-no-devices{border:1px dashed #d6c9e2;padding:28px 15px;border-radius:12px;color:#837290;text-align:center;line-height:1.9;font-size:13px;margin-top:24px}.office-help{margin-top:20px}.office-help>div{display:grid;grid-template-columns:repeat(3,1fr);gap:28px}.office-help p{font-size:13px;line-height:1.9;color:#776683}.office-help strong{color:#361266}.office-workspace .panel{margin-bottom:0}@media(max-width:1150px){.office-systems{grid-template-columns:1fr}.office-workspace{grid-template-columns:1fr}.office-detail{display:block}.office-device{display:inline-block;vertical-align:top;width:calc(50% - 16px);margin:0 8px}.office-stat{min-width:70px}}@media(max-width:600px){.office-banner{padding:24px;gap:20px;flex-wrap:wrap}.office-banner>div:first-child{flex-basis:100%}.office-banner h2{font-size:26px}.office-stat{text-align:right}.office-toolbar{flex-direction:column}.office-plan{padding:14px}.office-canvas{padding:3px;min-height:300px}.office-map{min-height:300px}.office-notice{display:block}.office-notice strong{display:block;margin-bottom:8px}.office-help>div{grid-template-columns:1fr;gap:8px}.office-device{display:block;width:100%;margin:0}.office-room-list .btn{font-size:12px}.office-empty{inset:8px;padding:16px}.office-empty h3{font-size:19px}.office-empty p{font-size:12px}.office-systems .panel{padding:18px}}@media(prefers-reduced-motion:reduce){.office-map,.office-room-floor{transition:none}}
.office-banner h2{color:#fff}.office-system .icon,.office-device .icon,.office-empty .icon{display:inline-flex;width:24px;height:24px;flex:none}.office-system .icon svg,.office-device .icon svg,.office-empty .icon svg{width:24px;height:24px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}.office-system>div:first-child{display:flex;flex:none;align-items:center;justify-content:center;width:42px;height:42px;border-radius:12px;background:#f2ecf8;color:#6a4494}
.office-map-title{font:500 1.9px/1.7 Tahoma,Arial,sans-serif;text-align:center;color:#392b48;padding:.2px;white-space:normal}.office-map-title small{font-size:1.35px;color:#756784}.office-room.corridor .office-room-floor{fill:#ede5d7}.office-room-floor{fill:#f9f5f0;stroke:#73627f;stroke-width:.6}.office-room.selected .office-room-floor{fill:#f0e5f5}.office-marker{cursor:pointer;outline:none}.office-marker circle{fill:#fff;stroke:#8b7d98;stroke-width:.3}.office-marker text{font:bold 2.2px Arial,sans-serif;fill:#594365;pointer-events:none}.office-marker.online circle{fill:#e5f6ec;stroke:#1c8255}.office-marker.online text{fill:#1c8255}.office-marker.camera circle{fill:#ecedf9;stroke:#5a65aa}.office-marker:hover circle,.office-marker:focus-visible circle{stroke:#c66c4c;stroke-width:.7}.office-legend{display:flex;flex-wrap:wrap;gap:14px;margin-top:14px;font-size:11px;color:#74677d}.office-legend span{display:inline-flex;align-items:center;gap:6px}.office-legend b{width:10px;height:10px;border-radius:50%;background:#fff;border:1px solid #8b7d98}.office-legend b.online{background:#e5f6ec;border-color:#1c8255}.office-legend b.camera{background:#ecedf9;border-color:#5a65aa}.office-capacity{padding:10px 14px;background:#f4edf8;border-radius:9px;font-size:12px;color:#654581}.office-source{display:block;font:11px/1.8 Arial,sans-serif;color:#887b93}.office-discovery{margin-top:22px}.office-detail{max-height:850px;overflow:auto}.office-device .muted{font-size:11px;line-height:1.9}.office-furniture{opacity:.8}.office-room-list .btn{font-size:11px;padding:7px 10px}@media(max-width:1150px){.office-detail{max-height:none;overflow:visible}}@media(max-width:600px){.office-map-title{font-size:2.1px}.office-map-title small{display:none}.office-legend{font-size:10px;gap:8px}.office-marker circle{stroke-width:.4}.office-canvas{overflow:auto}.office-map{min-width:560px;min-height:400px}.office-canvas .office-empty{min-width:0}.office-discovery .table-wrap{overflow:auto}}


.office-plan .office-room-list{margin:0 0 18px}.office-detail{max-height:none;overflow:visible;margin-top:20px}.office-device-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(280px,1fr));gap:16px}.office-device-grid .office-device{display:block;width:auto;margin:0;border:1px solid #e8deef;border-radius:16px;padding:20px;background:#fff}.office-device-title{flex-wrap:wrap;gap:10px;margin-bottom:18px}.office-device-title strong{flex:1;min-width:100px}.office-control-buttons{display:flex;gap:8px;flex-wrap:wrap}.office-control-buttons .btn{flex:1;min-height:44px}.office-climate-grid{display:grid;grid-template-columns:1fr 1fr;gap:12px}.office-climate label,.office-position label{font-size:12px;color:#5d4c70;display:grid;gap:6px}.office-climate input,.office-climate select{width:100%;min-height:44px;border:1px solid #d9cde3;border-radius:9px;padding:8px;background:white;color:#361266}.office-position{margin-top:18px;display:flex;align-items:end;gap:12px}.office-position label{flex:1}.office-position input{width:100%;accent-color:#361266;min-height:28px}.office-position output{font:13px Arial;text-align:center}.office-ir-note{font-size:11px;color:#807087;line-height:1.7;margin:14px 0}.office-command-feedback{font-size:12px;line-height:1.8;color:#654581;min-height:1em}.office-edit-link{border:0;background:none;text-decoration:underline;color:#8c7898;font:inherit;font-size:11px;padding:6px 0;cursor:pointer}.office-marker.powered circle{fill:#ffdb7f;stroke:#b57618}.office-marker.powered text{fill:#77460b}.office-plan .office-canvas{max-height:650px}.office-map{max-height:620px}.office-detail h2{margin:0}.office-control-buttons .btn:disabled,.office-climate button:disabled{opacity:.45;cursor:not-allowed}#modal .office-device{width:auto;display:block;margin:0}#modal details{margin:18px 0}#modal summary{cursor:pointer;color:#361266;padding:12px;background:#f7f3fa;border-radius:10px}@media(max-width:600px){.office-device-grid{grid-template-columns:1fr}.office-device-grid .office-device{padding:16px}.office-climate-grid{gap:10px}}
.office-device-section{margin-top:24px}.office-section-heading{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:14px}.office-section-heading h3{margin:0;font-size:17px;color:#361266}.office-section-heading>span{font-size:11px;color:#7b6988}.office-camera-preview{min-height:170px;aspect-ratio:16/9;background:radial-gradient(ellipse at top right,#4b286e,#211331);color:#fff;display:flex;flex-direction:column;justify-content:center;align-items:center;gap:12px;border-radius:12px;margin-bottom:16px;padding:20px;text-align:center;box-sizing:border-box}.office-camera-preview>.icon{background:#ffffff12;color:#d6b6eb;padding:12px;border:1px solid #ffffff20}.office-camera-preview strong{font-size:15px}.office-camera-preview span:not(.icon){font-size:12px;color:#d7c9e3}.office-security-note{font-size:12px;line-height:1.9;color:#756282}.office-door-state{display:flex;gap:14px;align-items:center;background:#f6f2fa;border-radius:12px;padding:18px}.office-door-state p{font-size:12px;color:#7b6988;margin:7px 0 0}.office-door-state strong{font-size:14px;color:#49325e}.office-door-state .icon{flex-shrink:0;color:#78578f}.office-camera-view .office-camera-preview{min-height:230px}.office-device-section .btn:disabled{opacity:.5;cursor:not-allowed}@media(max-width:600px){.office-section-heading{align-items:flex-start;flex-direction:column;gap:6px}.office-camera-view .office-camera-preview{min-height:190px}}
.office-camera-preview>.icon{display:inline-flex;flex:none;width:28px;height:28px;box-sizing:content-box;border-radius:12px}.office-camera-preview>.icon svg{width:28px;height:28px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}
.office-live-video{display:block;width:100%;height:auto;aspect-ratio:auto;background:transparent;border-radius:12px}
.office-camera-preview.has-frame{position:relative;display:block;min-height:0;aspect-ratio:auto;padding:0;overflow:hidden;background:transparent}.office-camera-preview.has-frame img{display:block;width:100%;height:auto}.office-camera-preview .office-preview-caption{position:absolute;bottom:0;left:0;right:0;padding:9px 12px;background:#130b20d9;color:#fff!important;font-size:11px!important;line-height:1.7;text-align:right}
.office-scenes{margin:14px 0 4px;padding:16px;border:1px solid #e2d9ec;border-radius:16px;background:#faf8fd}
.office-scene-buttons{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px}
.office-scene{display:flex;align-items:center;justify-content:center;gap:9px;min-height:52px;white-space:normal;line-height:1.6;background:#fff;border-color:#d9cce6;color:#361266}
.office-scene.scene-on{background:#361266;color:#fff;border-color:#361266}
.office-scene span{font-size:22px}.office-scene:disabled{opacity:.5;cursor:not-allowed}
.office-scene-receipt{margin:10px 0 0;color:#665b70;font-size:13px;min-height:21px}
@media(max-width:780px){.office-scene-buttons{grid-template-columns:repeat(2,minmax(0,1fr))}.office-scenes{padding:12px}.office-scene{font-size:13px;padding:10px}}
/* Keep camera viewing in document flow: no modal backdrop or nested scroll trap. */
.office-section-cameras .office-camera-view{margin:0 0 20px;padding:18px;border:1px solid #ded2e8;border-radius:14px;background:#faf8fd;scroll-margin-top:20px;min-width:0}
.office-viewer-heading{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;margin-bottom:12px}.office-viewer-heading h3{margin:0 0 5px}.office-viewer-heading p{margin:0;font-size:12px}.office-viewer-heading .btn{flex-shrink:0}
.office-camera-view .office-live-video{max-height:60vh;max-height:60dvh;object-fit:contain}.office-camera-view [role=status]{margin:12px 0;font-size:13px}.office-camera-view .office-security-note{margin-bottom:0}
@media(max-width:600px){.office-section-cameras .office-camera-view{padding:12px}.office-viewer-heading{flex-wrap:wrap}.office-viewer-heading .btn{min-height:44px}}
/* Sensor readings remain in normal document flow beside the saved scenes. */
.office-quick-status{display:grid;grid-template-columns:minmax(300px,.9fr) minmax(320px,1.1fr);gap:14px;align-items:stretch;margin:16px 0}
.office-quick-status .office-scenes{margin:0;display:flex;flex-direction:column;justify-content:center}
.office-quick-status .office-scene-buttons{grid-template-columns:repeat(2,minmax(0,1fr))}
.office-sensor-summary{display:grid;gap:10px;min-width:0}
.office-sensor-card{--sensor-ink:#5f6470;--sensor-tint:#f5f5f7;--sensor-line:#dbdde3;display:flex;align-items:center;gap:13px;border:1px solid var(--sensor-line);border-inline-start:4px solid var(--sensor-ink);border-radius:14px;padding:14px 16px;background:var(--sensor-tint);color:var(--sensor-ink);min-width:0}
.office-sensor-card.sensor-red{--sensor-ink:#b42330;--sensor-tint:#fff2f3;--sensor-line:#f1c5ca}
.office-sensor-card.sensor-green{--sensor-ink:#167147;--sensor-tint:#effaf4;--sensor-line:#bfdfcc}
.office-sensor-card.sensor-amber{--sensor-ink:#996009;--sensor-tint:#fff8e9;--sensor-line:#ebd4a3}
.office-sensor-icon{display:grid;place-items:center;flex:0 0 48px;width:48px;height:54px}
.office-sensor-icon svg{display:block;width:44px;height:44px}
.office-sensor-name{display:block;font-size:12px;color:#5f5868;margin-bottom:4px}
.office-sensor-card strong{display:flex;align-items:center;gap:7px;font-size:17px;line-height:1.5}
.office-sensor-dot{width:7px;height:7px;border-radius:50%;background:currentColor;flex-shrink:0}
.office-sensor-card p{font-size:12px;line-height:1.7;margin:5px 0 0;color:#5f5868}
.office-marker.sensor-red circle{fill:#fff2f3;stroke:#b42330}.office-marker.sensor-red text{fill:#b42330}
.office-marker.sensor-green circle{fill:#effaf4;stroke:#167147}.office-marker.sensor-green text{fill:#167147}
.office-marker.sensor-amber circle{fill:#fff8e9;stroke:#996009}.office-marker.sensor-amber text{fill:#996009}
.office-marker.sensor-neutral circle{fill:#f5f5f7;stroke:#777}.office-marker.sensor-neutral text{fill:#666}
@media(max-width:1000px){.office-quick-status{grid-template-columns:1fr}.office-sensor-summary{grid-template-columns:repeat(2,minmax(0,1fr))}.office-quick-status .office-scene-buttons{grid-template-columns:repeat(4,minmax(0,1fr))}}
@media(max-width:650px){.office-sensor-summary{grid-template-columns:1fr}.office-quick-status .office-scene-buttons{grid-template-columns:repeat(2,minmax(0,1fr))}.office-sensor-card{padding:12px}.office-sensor-card strong{font-size:16px}}
