.spatial-building{display:flex;align-items:center;justify-content:space-between;gap:24px;padding:18px 22px}.spatial-building h2{margin-bottom:4px}.spatial-building>div>span{font-size:12px;color:#637187}.spatial-building dl{display:grid;grid-template-columns:auto auto auto auto;gap:5px 18px;font-size:13px;margin:0}.spatial-building dt{color:#637187}.spatial-building dd{margin:0}.spatial-building dt:last-of-type{grid-column:1/2}
.floor-list-scroll>button strong{display:block;font-weight:500}.floor-list-scroll>button small{display:block;font-size:12px;white-space:nowrap;margin-top:3px}
.space-checks input[type=checkbox]{width:16px;height:16px;min-width:16px;flex:0 0 16px}.space-checks .inline-check{display:flex;min-width:0;gap:8px}
.plan-workspace{display:grid;grid-template-columns:150px minmax(300px,1fr) 232px;gap:16px;align-items:start}.plan-floor-list,.plan-region-list{padding:16px}.plan-floor-list h2{font-size:14px;margin-bottom:12px}.floor-list-scroll>button{display:flex;align-items:center;gap:8px;width:100%;text-align:left;border:0;background:none;margin:3px 0;padding:10px 8px}.floor-list-scroll>button.selected{color:var(--blue);background:#e9f1fd}.floor-list-scroll>button span{overflow-wrap:anywhere}.plan-canvas-panel{padding:18px;min-width:0}.plan-canvas-panel .panel-header{margin-bottom:12px}.floor-plan{width:100%;display:block;aspect-ratio:1000/640;touch-action:manipulation}.plan-ground{fill:#f7f9fc}.plan-outline{fill:#fff;stroke:#61758a;stroke-width:5}.plan-wall{fill:none;stroke:#b9c6d3;stroke-width:4}.plan-core{fill:#edf1f6;stroke:#bdc9d5;stroke-width:2}.plan-stairs{fill:none;stroke:#a3b3c2;stroke-width:2}.plan-core-label{fill:#637187;font-size:17px;text-anchor:middle}.plan-region{fill:#dcebf966;stroke:#88a9cc;stroke-width:2}.plan-region.selected{fill:#b7d8fb80;stroke:var(--blue);stroke-width:4}.plan-region-label{fill:#416486;font-size:18px;text-anchor:middle;pointer-events:none}.plan-floor-label{fill:#637187;font-size:17px}.plan-device circle{fill:#216bcf;stroke:#fff;stroke-width:3}.plan-device.selected circle{fill:#0d796a;stroke:#fff;stroke-width:4}.plan-device text{fill:#29445e;font-size:18px;font-weight:600;paint-order:stroke;stroke:#fff;stroke-width:4}.plan-device{cursor:pointer}.plan-picked circle{fill:#216bcf;stroke:#fff;stroke-width:4}.plan-picked path{stroke:#216bcf;stroke-width:2}.plan-draft{stroke:#216bcf;stroke-width:4;fill:#bad7f74d;pointer-events:none}.plan-vertex{fill:#fff;stroke:#216bcf;stroke-width:3;cursor:pointer}.plan-vertex.active{fill:var(--blue)}.floor-plan[data-purpose=region],.floor-plan[data-purpose=location]{cursor:crosshair}.region-tools{display:flex;flex-direction:column;gap:14px;margin-top:12px}.region-tools>span{color:#52647a;font-size:13px}.region-record{padding:14px 0;border-bottom:1px solid #e7ebf0}.region-record:last-child{border:0}.region-record strong{font-size:13px;font-weight:500;display:block}.region-record small{display:block;margin:5px 0 8px}.region-record .actions{gap:2px}.region-record button{font-size:12px;padding:3px 5px}.plan-region-list .panel-header{margin-bottom:0;font-size:12px}.plan-region-list h2{font-size:14px}
.space-checks{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:0 12px;max-height:220px;overflow:auto;padding:8px 10px;background:#f7f9fc;border:1px solid #e3e9f1;border-radius:4px}.space-checks .inline-check{font-size:13px;margin:6px 0;line-height:1.6;align-items:start}.space-checks input{flex:none;margin-top:3px}.space-checks span{overflow-wrap:anywhere}.service-reference{display:flex;align-items:start;justify-content:space-between;gap:14px;padding:9px 0;font-size:13px}.service-reference strong{font-weight:500}.service-reference span{color:#637187}.location-status{font-size:13px;margin:6px 0 18px;color:var(--blue)}#device-location-plan{border:1px solid #e3e9f1;border-radius:4px;overflow:hidden}.area-selection .selection-caption{font-size:13px;margin-bottom:10px}.area-selection.in-sidebar{padding:8px}.in-sidebar .space-checks{display:flex;flex-direction:column;max-height:460px;background:transparent;padding:0 4px;border:0}.combination-tools{display:flex;gap:6px;flex-wrap:wrap;margin-top:12px}.combination-tools select{min-width:0;max-width:100%;font-size:12px}.combination-tools button{font-size:12px}.query-space-popover,.query-equipment{position:relative;margin:0}.query-space-popover>summary,.query-equipment>summary{border:1px solid #cdd6e1;border-radius:4px;padding:7px 10px;min-height:35px;font-size:13px;max-width:230px;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.query-space-popover>.area-selection,.query-equipment>.space-checks{position:absolute;z-index:20;top:44px;left:0;width:440px;max-width:80vw;background:#fff;border:1px solid #d4dfe9;padding:14px;box-shadow:0 6px 18px #162d4a1a}.query-equipment>.space-checks{grid-template-columns:1fr;max-height:260px}.dashboard .floor-plan{flex:1;min-height:0;height:100%;background:#10232f}.dashboard .plan-ground{fill:#10232f}.dashboard .plan-outline{fill:#19343f;stroke:#8ba6b1}.dashboard .plan-wall{stroke:#48636e}.dashboard .plan-core{fill:#284650;stroke:#7796a2}.dashboard .plan-stairs{stroke:#9eb4bd}.dashboard .plan-region{fill:#315c6959;stroke:#698f9d}.dashboard .plan-region.selected{fill:#347d7a75;stroke:#9be5d3}.dashboard .plan-region-label,.dashboard .plan-floor-label,.dashboard .plan-core-label{fill:#adc8d4}.dashboard .plan-device text{fill:#e5f3f5;stroke:#16313d}.dashboard .plan-device circle{fill:#9bd9c8;stroke:#28434c}.dashboard .plan-device.selected circle{fill:#e9c88f;stroke:#e9c88f}.dashboard .plan-caption{position:static;margin-top:14px;margin-bottom:8px}.dashboard .plan-caption h2{font-size:15px}.building-svg .model-position{cursor:pointer}.building-svg .model-position text{font:13px var(--font);paint-order:stroke;stroke:#17323e;stroke-width:4}
@media(max-width:1250px){.plan-workspace{grid-template-columns:130px minmax(0,1fr)}.plan-region-list{grid-column:1/-1;display:flex;align-items:start;gap:16px;flex-wrap:wrap}.plan-region-list .panel-header{width:100%}.region-record{min-width:180px;flex:1}.spatial-building{align-items:start}.space-checks{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:640px){.spatial-building{display:block}.spatial-building dl{margin-top:14px;grid-template-columns:auto 1fr}.spatial-building dt:last-of-type{grid-column:auto}.plan-workspace{display:block}.plan-floor-list{display:flex;overflow:auto;gap:6px;margin-bottom:14px;padding:8px}.plan-floor-list h2{display:none}.floor-list-scroll>button{width:auto;flex:none;white-space:nowrap;min-height:44px}.floor-list-scroll>button .ui-icon{display:none}.plan-region-list{display:block}.plan-canvas-panel{padding:12px}.plan-canvas-panel .panel-header{flex-wrap:wrap}.region-tools .actions button{min-height:40px}.space-checks{grid-template-columns:1fr 1fr}.query-space-popover,.query-equipment{width:100%}.query-space-popover>.area-selection,.query-equipment>.space-checks{position:static;width:100%;max-width:100%;box-shadow:none;margin-top:8px}.query-space-popover>summary,.query-equipment>summary{max-width:100%}.in-sidebar .space-checks{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));max-height:220px}.dashboard .floor-plan{min-height:260px}.service-reference{display:block}.service-reference span{display:block;margin-top:5px}}
.floor-count{float:right;font-size:12px;color:#8190a0;font-weight:400}.plan-subtitle,.plan-caption,.region-hint{font-size:12px;color:#7b8999;line-height:1.5}.plan-subtitle{margin:5px 0 0}.plan-caption{margin:12px 0 0}.plan-region-list .region-hint{margin:8px 0 14px}.region-list-items,.region-detail{width:100%}.region-card,.region-device{display:flex;align-items:center;justify-content:space-between;text-align:left;width:100%;border:0;border-top:1px solid #edf0f4;background:transparent;padding:15px 0;gap:8px;cursor:pointer}.region-card:hover,.region-device:hover{color:var(--blue)}.region-card strong,.region-device strong{display:block;font-size:13px}.region-card small,.region-device small{display:block;margin-top:6px;font-size:12px;color:#8290a0}.region-chevron{font-size:22px;color:#a8b7c7}.region-back{padding:0;border:0;background:none;color:var(--blue);font-size:12px;cursor:pointer}.region-detail-title{padding:20px 0 16px;border-bottom:1px solid #edf0f4}.region-detail-title>span{font-size:12px;color:#8492a2}.region-detail-title h2{margin:6px 0;font-size:16px}.region-detail-title small{color:#8290a0}.region-facts{margin:14px 0 20px}.region-facts div{display:flex;justify-content:space-between;gap:8px;margin:10px 0;font-size:12px}.region-facts dt{color:#8492a2}.region-facts dd{margin:0;text-align:right}.region-devices-heading{display:flex;justify-content:space-between;align-items:center}.region-devices-heading h3{margin:0;font-size:14px}.region-devices-heading span,.region-device-status{font-size:12px;color:#8290a0;white-space:nowrap}.floor-plan[data-purpose=spaces] [data-region]{cursor:pointer}.floor-plan[data-purpose=spaces] [data-region]:focus{outline:none}.floor-plan[data-purpose=spaces] [data-region]:focus .plan-region{stroke:var(--blue);stroke-width:4}
@media(max-width:1250px){.plan-region-list{display:block}.region-list-items{display:grid;grid-template-columns:repeat(auto-fit,minmax(180px,1fr));gap:0 20px}}

/* 建筑与空间：建筑资料和楼层工作区采用统一栅格。 */
.shell:has(.spatial-building) .nav-item,.shell:has(.spatial-building) .group-toggle{font-size:15px}
.shell:has(.spatial-building) .topbar{font-size:15px}
.spatial-building{display:grid;grid-template-columns:minmax(180px,1fr) minmax(0,4fr);align-items:center;gap:32px;padding:24px 28px}
.spatial-building h2{font-size:21px;line-height:1.35;margin:0 0 8px}
.spatial-building>div>span{font-size:15px;color:#617187}
.spatial-building .building-facts{display:grid;grid-template-columns:minmax(130px,.8fr) minmax(210px,1.1fr) minmax(280px,1.8fr);gap:24px;margin:0}
.building-facts>div{min-width:0;padding-left:24px;border-left:1px solid #e7ebf0}
.building-facts dt{font-size:14px;color:#64758b;margin-bottom:7px}
.building-facts dd{font-size:16px;line-height:1.5;font-weight:500;color:#253248;overflow-wrap:anywhere}
.building-facts dd span{font-size:14px;font-weight:400;color:#64758b}
.plan-workspace{grid-template-columns:minmax(170px,15fr) minmax(0,60fr) minmax(270px,24fr);gap:16px;align-items:stretch}
.plan-workspace>.panel{margin-bottom:16px}
.plan-floor-list,.plan-region-list{padding:22px}
.plan-floor-list h2,.plan-region-list h2{font-size:18px;margin-bottom:16px}
.floor-list-scroll>button{gap:12px;padding:13px 12px;min-height:68px;margin:4px 0}
.floor-list-scroll>button strong{font-size:16px;font-weight:600}
.floor-list-scroll>button small{font-size:14px;margin-top:3px}
.floor-count{font-size:14px}
.plan-canvas-panel{padding:22px}
.plan-canvas-panel h2{font-size:19px}
.plan-canvas-panel .panel-header{margin-bottom:18px}
.plan-subtitle,.plan-caption,.region-hint{font-size:14px;color:#65768a}
.plan-canvas-panel .actions button{font-size:15px}
.plan-region-list .panel-header{font-size:14px}
.plan-region-list .panel-header h2{margin-bottom:0}
.region-list-items{display:block}
.region-card,.region-device{padding:18px 0}
.region-card strong,.region-device strong{font-size:16px}
.region-card small,.region-device small{font-size:14px;color:#65768a}
.region-back,.region-detail-title>span,.region-detail-title small,.region-facts div,.region-devices-heading span,.region-device-status{font-size:14px}
.region-detail-title h2{font-size:19px}
.region-devices-heading h3{font-size:16px}
@media(max-width:1250px){
 .spatial-building{grid-template-columns:1fr;gap:18px}
 .spatial-building .building-facts{grid-template-columns:1fr 1fr 1.5fr}
 .building-facts>div:first-child{padding-left:0;border-left:0}
 .plan-workspace{grid-template-columns:minmax(145px,1fr) minmax(0,4fr);align-items:start}
 .plan-region-list{grid-column:1/-1;display:block}
 .region-list-items{display:grid;grid-template-columns:repeat(auto-fit,minmax(200px,1fr));gap:0 20px}
}
@media(max-width:640px){
 .spatial-building{display:block;padding:20px}
 .spatial-building .building-facts{grid-template-columns:1fr;gap:14px;margin-top:20px}
 .building-facts>div{padding:0;border:0;display:grid;grid-template-columns:80px minmax(0,1fr);gap:12px;align-items:start}
 .building-facts dt{margin:0}
 .plan-workspace{display:block}
 .plan-floor-list{padding:8px}
 .floor-list-scroll>button{min-height:56px;padding:8px 12px}
 .plan-canvas-panel,.plan-region-list{padding:18px}
 .region-list-items{display:block}
}

/* 楼层与分区树 */
.floor-list-scroll>button{justify-content:flex-start;text-align:left}
.floor-list-scroll>button>span{display:block;min-width:0;text-align:left}
.floor-list-scroll>button .ui-icon{flex:0 0 18px}
.region-tree{margin-top:14px}
.region-tree-group{border-top:1px solid #eaf0f6}
.region-tree-toggle,.region-tree-device{width:100%;border:0;background:transparent;justify-content:flex-start;text-align:left;gap:10px;min-height:48px;padding:10px 8px}
.region-tree-toggle{font-size:16px;font-weight:400}
.region-tree-toggle.selected{color:var(--blue);background:#f0f6ff}
.tree-arrow{font-size:22px;font-weight:400;line-height:1;width:14px;flex:none;color:#71849a}
.region-tree-children{padding:2px 0 8px 23px}
.region-tree-device{font-size:15px;justify-content:space-between;gap:10px;padding:10px;line-height:1.45}
.region-tree-device>span:first-child{overflow-wrap:anywhere}
.floor-direct-device>.status{flex:none}
.region-tree-empty{padding:10px;color:#687c92;font-size:14px}
@media(min-width:1251px) and (min-height:680px){
 .content:has(.plan-workspace){display:flex;flex-direction:column;height:calc(100dvh - 94px);min-height:0;padding-bottom:16px}
 .content:has(.plan-workspace)>.page-head,.content:has(.plan-workspace)>.spatial-building{flex:none}
 .plan-workspace{flex:1;min-height:0}
 .plan-workspace>.panel{min-height:0;height:100%;margin-bottom:0}
 .plan-floor-list,.plan-region-list{overflow:auto}
 .plan-workspace>.plan-region-list{padding-right:8px}
 .plan-canvas-panel{display:flex;flex-direction:column;overflow:hidden}
 .plan-canvas-panel .panel-header{flex:none}
 #space-plan{flex:1;min-height:0;display:flex;justify-content:center}
 #space-plan .floor-plan{width:100%;height:100%;aspect-ratio:auto}
}

/* 设备台账 */
.content:has(.devices-panel),.content:has(.access-panel),.content:has(.device-edit-page){height:calc(100dvh - 94px);min-height:0;overflow-y:auto;overscroll-behavior-y:contain}
.devices-panel{padding:24px}
.device-filter-head{display:flex;align-items:center;justify-content:space-between;gap:16px;margin-bottom:22px}
.device-filter-head h2{font-size:18px}
.device-filter-head>span{color:#687b91;font-size:14px}
.device-filters{display:flex;align-items:end;gap:12px;flex-wrap:wrap}
.device-filters label{display:flex;flex-direction:column;gap:8px;color:#53677e;font-size:14px}
.device-filters input,.device-filters select{height:40px;font-size:15px}
.device-filters input{width:210px}.device-filters select{min-width:150px}
.device-filters{margin-bottom:22px}
.device-category-control{display:flex;flex-direction:column;gap:8px;color:#53677e;font-size:14px}
.device-category-dropdown{position:relative;width:150px;margin:0}
.device-category-dropdown summary{display:flex;align-items:center;justify-content:space-between;gap:8px;height:40px;padding:7px 10px;border:1px solid #d6dee9;border-radius:5px;background:#fff;color:#26354a;font-size:15px;cursor:pointer;list-style:none}
.device-category-dropdown summary::-webkit-details-marker{display:none}
.device-category-dropdown summary::after{content:'⌄';font-size:18px;line-height:1;flex:none;color:#637187}
.device-category-selection{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.device-category-menu{position:absolute;z-index:20;top:calc(100% + 5px);left:0;width:100%;padding:6px;background:#fff;border:1px solid #d6dee9;border-radius:5px;box-shadow:0 8px 22px #17263c24}
.device-filters .device-category-menu label{display:flex;flex-direction:row;align-items:center;gap:9px;min-height:38px;padding:7px 8px;border-radius:4px;color:#26354a;font-size:14px;cursor:pointer}
.device-category-menu label:hover{background:#f2f7fd}
.device-filters .device-category-menu input{width:16px;height:16px;min-height:0;margin:0;flex:none;accent-color:var(--blue)}
.device-category-dropdown summary:focus-visible{outline:2px solid var(--blue);outline-offset:2px}
.device-filter-actions{display:flex;gap:8px}
.device-filter-actions button{min-height:40px;padding:7px 18px}
.device-category-filter{display:flex;align-items:center;gap:18px;flex-wrap:wrap;padding:20px 0;margin-bottom:4px}
.device-category-title{font-size:14px;color:#53677e}
.device-category-options{display:flex;align-items:center;gap:8px;flex-wrap:wrap}
.device-category-option{cursor:pointer;position:relative}
.device-category-option input{position:absolute;opacity:0;width:1px;height:1px}
.device-category-option span{display:inline-flex;align-items:center;min-height:34px;padding:5px 13px;border:1px solid #dce4ee;border-radius:5px;color:#53677e;background:#fff;font-size:14px}
.device-category-option input:checked+span{color:var(--blue);border-color:#8bb9f1;background:#edf5ff}
.device-category-option input:focus-visible+span{outline:2px solid var(--blue);outline-offset:2px}
.device-filter-note{font-size:13px;color:#77889a}
.devices-panel table{table-layout:auto}
.devices-panel td{vertical-align:middle}
.device-name{font-size:15px;font-weight:600;color:#263b53}
.device-tags,.device-statuses{display:flex;align-items:center;gap:6px;flex-wrap:wrap}
.device-category{display:inline-block;padding:3px 8px;border-radius:4px;background:#edf4fc;color:#3d638c;font-size:13px;white-space:nowrap}
.device-unset{color:#718399;font-size:14px}
.device-detail-heading{display:flex;align-items:center;gap:14px;flex-wrap:wrap;padding-bottom:18px;border-bottom:1px solid #e7edf4}
.device-detail-heading h3{font-size:20px}.device-detail-section{margin:24px 0 14px;font-size:16px}
.device-detail-actions{margin-top:20px}.device-category-checks{grid-template-columns:repeat(4,minmax(0,1fr))}
.device-info-drawer .drawer-head{flex:none}
.device-info-drawer .drawer-head h2{font-size:20px;line-height:1.3}
.device-info-drawer .drawer-body{padding:16px 24px;min-height:0}
.device-info-drawer .drawer-body>.error:empty{display:none}
.device-monitor-fixed{flex:none;padding:16px 24px 0}
.device-monitor-fixed .device-info-tabs{margin-bottom:0}
.device-monitor-view .drawer-body{flex:1;overflow-y:auto;overscroll-behavior:contain;scrollbar-gutter:stable;scrollbar-width:thin;scrollbar-color:#a9c1dd #f0f5fb;padding:16px 17px 16px 24px}
.device-monitor-view .drawer-body::-webkit-scrollbar{width:7px;height:7px}
.device-monitor-view .drawer-body::-webkit-scrollbar-track{background:#f0f5fb;border-radius:8px}
.device-monitor-view .drawer-body::-webkit-scrollbar-thumb{background:#a9c1dd;border-radius:8px}
.device-monitor-view .drawer-body::-webkit-scrollbar-thumb:hover{background:#769fcf}
.device-info-basic-view .drawer-body{display:flex;flex-direction:column;overflow:hidden}
.device-info-card{display:flex;align-items:center;gap:16px;flex:none;padding:14px 18px;border-radius:8px;background:linear-gradient(90deg,#e3efff 0%,#f7faff 100%)}
.device-info-icon{display:grid;place-items:center;flex:none;width:50px;height:50px;border-radius:8px;background:#d6e8ff;color:#1769cf}
.device-info-icon .ui-icon{width:26px;height:26px}
.device-info-identity{display:flex;flex-direction:column;gap:4px;min-width:0}
.device-info-identity strong{font-size:19px;line-height:1.35;color:#142e51;overflow-wrap:anywhere}
.device-info-identity>span{font-size:14px;color:#647995}
.device-info-tags{display:flex;align-items:center;flex-wrap:wrap;gap:8px;margin-left:auto}
.device-info-tags .device-category,.device-info-tags .device-unset,.device-info-tags .status{display:inline-flex;align-items:center;min-height:28px;padding:4px 10px;border-radius:4px;font-size:13px;line-height:20px;white-space:nowrap}
.device-info-tags .device-category,.device-info-tags .device-unset{background:#d7e8ff;color:#245b9a}
.device-monitor-section{margin-top:14px}
.device-monitor-view #device-monitor-content>.device-monitor-section:first-child{margin-top:0}
.device-monitor-heading{display:flex;align-items:baseline;justify-content:space-between;gap:12px;margin-bottom:12px}
.device-monitor-heading h3,.device-info-panel-head h3{margin:0;font-size:18px;line-height:1.35;color:#142e51}
.device-monitor-heading>span{color:#687c94;font-size:13px}
.device-monitor-cards{display:grid;grid-template-columns:repeat(auto-fit,minmax(160px,1fr));gap:12px}
.device-monitor-cards-meter{grid-template-columns:repeat(2,minmax(0,1fr))}
.device-monitor-card{display:flex;align-items:center;gap:13px;min-width:0;padding:12px 16px;border-radius:7px;background:linear-gradient(90deg,#e3efff 0%,#f7faff 100%)}
.device-monitor-card>.ui-icon{width:24px;height:24px;flex:none;color:#1769cf}
.device-monitor-card>div{display:flex;flex-direction:column;gap:5px;min-width:0}
.device-monitor-card span{color:#536b88;font-size:14px}
.device-monitor-card strong{color:#153465;font-size:23px;line-height:1.25;font-variant-numeric:tabular-nums}
.device-monitor-card strong small{margin-left:5px;color:#617590;font-size:13px;font-weight:400}
.device-monitor-toolbar{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap}
:is(.device-monitor-controls,.relation-views){display:flex;flex-wrap:wrap;gap:0}
:is(.device-monitor-controls,.relation-views) button{box-sizing:border-box;height:32px;min-height:32px;font-size:14px;line-height:22px;font-weight:400}
:is(.device-monitor-controls,.relation-views) button{padding:4px 12px;border-radius:0;background:#f5f8fc;color:#536982}
:is(.device-monitor-controls,.relation-views) button+button{margin-left:-1px}
:is(.device-monitor-controls,.relation-views) button:first-child{border-radius:4px 0 0 4px}
:is(.device-monitor-controls,.relation-views) button:last-child{border-radius:0 4px 4px 0}
:is(.device-monitor-controls,.relation-views) button:only-child{border-radius:4px}
.device-monitor-heading:has(.record-filters){flex-wrap:wrap;gap:8px}
.record-filters{display:flex;align-items:center;flex-wrap:wrap;gap:8px;margin-left:auto}
.drawer .record-status{position:relative;margin:0}
.record-filters input,.record-filters summary,.record-filters button{height:32px;min-height:32px;padding:4px 8px;font-size:14px;font-weight:400;line-height:22px;border:1px solid #d9d9d9;border-radius:4px;background:white}
.record-filters summary{cursor:pointer}
.record-status .device-category-menu{width:max-content;min-width:100%;max-height:180px;overflow:auto}
.record-status button{display:block;width:100%;border:0;text-align:left}
.record-status button:hover,.record-status button[aria-pressed=true]{background:#edf2ff;color:var(--blue)}
:is(.device-monitor-controls,.relation-views) button.active{position:relative;z-index:1;background:var(--blue);border-color:var(--blue);color:#fff}
.drawer .device-monitor-date-popover{position:relative;flex:none;margin:0;font-size:13px}
.drawer .device-monitor-date-popover[open]{z-index:10}
.device-monitor-heading>span,.device-monitor-date-popover summary{line-height:20px}
.device-monitor-date-popover summary{display:block;padding:0;cursor:pointer;list-style:none;white-space:nowrap;color:var(--blue)}
.device-monitor-date-popover summary::-webkit-details-marker{display:none}
.device-monitor-date-popover summary::before{content:'▾ ' }
.trend-calendar{position:absolute;right:0;top:calc(100% + 6px);width:min(280px,80vw);background:#fff;border:1px solid #d6e2f0;border-radius:6px;box-shadow:0 8px 24px #17365a24;padding:12px}
.calendar-month{display:flex;align-items:center;justify-content:space-between;color:#262626}
.trend-calendar button{min-height:32px;padding:0;border:0;background:transparent;color:#26354a;font-size:14px;font-weight:400}
.calendar-month button{width:32px;font-size:20px}
.calendar-days{display:grid;grid-template-columns:repeat(7,1fr);row-gap:2px;text-align:center;margin:8px 0}
.calendar-days small{padding:4px;color:#8c8c8c}
.trend-calendar button:hover,.calendar-days .between{background:#e8efff;color:var(--blue)}
.calendar-days button.endpoint{background:var(--blue);color:#fff}
.calendar-days button:disabled{color:#c3ccd6;background:transparent;cursor:not-allowed}
.calendar-selection{padding-top:8px;border-top:1px solid #edf0f4;color:#53677e;font-size:13px}
.calendar-range-header{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin-bottom:8px}
.calendar-range-header small{display:block;color:#687c94;margin-bottom:4px}
.calendar-range-header span{height:32px;display:flex;align-items:center;justify-content:space-between;gap:3px;padding:0 6px;border:1px solid #d9d9d9;border-radius:4px;color:#26354a;white-space:nowrap;font-size:13px}
.calendar-range-header .is-placeholder{color:#91a0b2}
.calendar-range-header .ui-icon,.record-range>summary>.ui-icon{width:15px;height:15px;flex:none;color:#687c94}
.record-range>summary>.device-category-selection{flex:1;text-align:left}
.trend-calendar .calendar-selection{display:flex;justify-content:flex-end}
.trend-calendar .calendar-selection button{white-space:nowrap;color:var(--blue)}
.record-range[open]{z-index:32}
.record-range .trend-calendar{z-index:1}
.record-filters .trend-calendar button{border:0;padding:0}
.clock-prompt{margin:8px 0;color:#53677e;font-size:13px}
.clock-options{display:grid;grid-template-columns:repeat(6,1fr);gap:3px;max-height:200px;overflow:auto}
.clock-options button{font-variant-numeric:tabular-nums;border-radius:4px}
.clock-footer,.record-range .calendar-selection{display:flex;align-items:center;justify-content:space-between;border-top:1px solid #edf0f4;margin-top:8px}
.record-filters [data-period-clear]{color:var(--blue);font-size:13px}
.device-monitor-dates{position:absolute;z-index:5;top:calc(100% + 8px);right:0;display:flex;flex-direction:column;align-items:stretch;gap:10px;min-width:245px;padding:14px;border:1px solid #dce6f2;border-radius:6px;background:#fff;box-shadow:0 8px 24px #17365a26}
.device-monitor-dates label{display:flex;align-items:center;justify-content:space-between;gap:10px;color:#536982;font-size:13px;white-space:nowrap}
.device-monitor-dates input{min-height:34px}
.device-monitor-dates [role=alert]{color:#ad3434;font-size:13px}
.device-monitor-chart{position:relative;display:block;min-height:222px;margin-top:12px}
.device-monitor-chart .chart-axis-unit{fill:#7a8ca3;pointer-events:none}
.device-monitor-chart .chart{height:222px}
.device-monitor-chart .device-monitor-empty{min-height:0;height:222px}
.device-monitor-chart .chart .grid{stroke:#dce6f2;stroke-dasharray:4 3}
.device-monitor-chart .chart .series{stroke:#176df0;stroke-width:2.5;fill:none}
.device-monitor-area{fill:url(#device-monitor-area-gradient)}
.device-monitor-dot{fill:#176df0;stroke:#fff;stroke-width:2}
.device-monitor-point{cursor:crosshair;outline:none}
.device-monitor-point:hover .device-monitor-dot,.device-monitor-point:focus .device-monitor-dot{r:6;stroke-width:3}
.device-monitor-point:focus-visible .device-monitor-dot{stroke:#003f9c}
.device-monitor-tooltip{position:absolute;z-index:4;display:flex;flex-direction:column;gap:3px;width:max-content;max-width:100%;padding:8px 10px;border:1px solid #d7e4f3;border-radius:5px;background:#fff;box-shadow:0 4px 16px #17365a24;color:#586e87;font-size:12px;line-height:1.4;white-space:normal;pointer-events:none}
.device-monitor-tooltip strong{white-space:nowrap;color:#17365e;font-size:14px}
.device-monitor-tooltip small{white-space:pre-line}
.device-monitor-tooltip[hidden]{display:none}
.device-monitor-empty{display:flex;flex-direction:column;justify-content:center;align-items:center;gap:4px;grid-column:1/-1;min-height:170px;padding:8px;color:#71839a;font-size:14px;text-align:center}
.device-monitor-empty img{display:block;width:140px;height:120px;object-fit:contain}
.device-monitor-table{overflow:hidden}
.device-monitor-table:has(> .device-monitor-empty){height:222px;border:0;border-radius:0}
.device-monitor-table > .device-monitor-empty{height:100%;min-height:0}
.device-monitor-table .table-wrap{overflow-x:auto}
.device-monitor-table table{min-width:580px}
.device-monitor-table th,.device-info-table th{background:#edf1f6;color:#465e7b;font-weight:600}
.device-monitor-table th,.device-monitor-table td{padding:9px 11px}
.device-monitor-value-bad{color:#b33232;font-weight:600}
.device-monitor-pagination{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-top:12px;color:#61758d;font-size:13px}
.device-monitor-pagination>div{display:flex;align-items:center;gap:10px}
.device-monitor-pagination button{min-height:30px;min-width:30px;padding:2px 8px;font-size:18px}
@media(max-width:640px){.device-monitor-cards{grid-template-columns:repeat(2,minmax(0,1fr))}.device-monitor-card{padding:12px}.device-monitor-card strong{font-size:19px}.device-monitor-chart{min-height:182px}.device-monitor-chart .device-monitor-empty{height:182px}.device-monitor-chart .chart{height:182px}.device-monitor-table:has(> .device-monitor-empty){height:182px}}
.device-info-tabs{flex:none;margin:8px 0 14px}
.device-info-basic{display:flex;flex:1;min-height:0;flex-direction:column;gap:21px}
.device-info-panel{border:1px solid #dce7f4;border-radius:7px;overflow:hidden;background:#fff}
.device-info-panel-head{display:flex;align-items:center;gap:8px;min-height:24px;margin-bottom:12px;padding:0;background:transparent}
.device-info-panel-head h3{display:flex;align-items:center}
.device-info-facts{flex:none;border:1px solid #edf0f4;border-radius:0}
.device-info-drawer .device-info-facts table tbody tr:last-child>:is(th,td){border-bottom:0}
.device-info-table{table-layout:fixed;white-space:normal;font-size:14px}
.device-info-table th,.device-info-table td{padding:6px 10px;border-bottom:1px solid #e8eef5;line-height:1.35;overflow-wrap:anywhere}
.device-info-table th{width:17%;font-size:14px;line-height:1.55}
.device-info-table td{width:33%;color:#203650}

.device-info-location{display:flex;flex:1;min-height:0;flex-direction:column;border:0;overflow:visible}
.device-info-map{display:flex;align-items:center;justify-content:center;flex:1;min-height:0;padding:0}
.device-info-map .floor-plan{width:100%;height:100%;min-height:0;aspect-ratio:auto}
.device-info-map .empty{width:100%;min-height:0;margin:0}
@media(max-height:650px){.device-info-basic-view .drawer-body{overflow-y:auto}.device-info-basic{flex:none}.device-info-location{min-height:180px}}
@media(max-width:640px){.device-info-drawer .drawer-body{padding:12px}.device-monitor-fixed{padding:12px 12px 0}.device-monitor-view .drawer-body{padding:16px 5px 12px 12px}.device-info-card{gap:10px;padding:10px}.device-info-icon{width:40px;height:40px}.device-info-icon .ui-icon{width:22px;height:22px}.device-info-identity strong{font-size:16px}.device-info-tags{justify-content:flex-end}.device-info-table th,.device-info-table td{padding:5px}.device-info-table td{font-size:12px}}
.device-edit-heading{display:flex;align-items:center;gap:16px;flex-wrap:wrap;margin-bottom:22px}
.device-edit-heading h1{font-size:22px}.device-edit-heading>span{font-size:14px;color:#718399}
.device-edit-back{border:0;background:transparent;color:var(--blue);padding:6px 0;min-height:38px;margin-right:4px}
.device-edit-grid{display:grid;grid-template-columns:minmax(0,1fr) minmax(320px,1fr);gap:18px;align-items:start}
.device-edit-section{padding:24px}.device-edit-section h2{font-size:18px;margin-bottom:20px}
.device-edit-section .space-checks{max-height:none}
.device-edit-section #device-location-plan{background:#f7f9fc}
.device-edit-section #device-location-plan .floor-plan{max-height:440px}
.device-edit-footer{display:flex;justify-content:flex-end;gap:10px;padding:0 0 12px}
.device-edit-footer button{min-width:84px;min-height:40px}
.access-panel{padding:24px}
.access-section-head{display:flex;justify-content:space-between;align-items:center;gap:16px;margin:0 0 22px}
.access-section-head h2{font-size:18px}.access-section-head>span{font-size:14px;color:#687b91}
.access-filters{margin-bottom:24px}
.access-filters input{width:190px}
.access-filters select{min-width:140px}
.access-panel td{vertical-align:middle}
.meter-map-tabs{display:flex;gap:20px;border-bottom:1px solid #e6ebf2;margin-bottom:16px}
.meter-map-tabs button{min-height:40px;padding:8px 2px;border:0;border-bottom:2px solid transparent;border-radius:0;background:transparent;color:#65778b;font-size:15px}
.device-info-tabs button{padding-inline:10px}
.meter-map-tabs button.active{color:var(--blue);border-bottom-color:var(--blue);font-weight:600}
.meter-map-heading{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap;margin-bottom:12px;font-size:15px}
.meter-map-floors{display:flex;gap:6px;flex-wrap:wrap}
.meter-map-floors button{min-height:32px;padding:4px 9px;font-size:13px}
.meter-map-floors button.selected{color:var(--blue);border-color:#8bb9f1;background:#edf5ff}
.meter-map-canvas{background:#f7f9fc;border:1px solid #e3e9f1;border-radius:5px;overflow:hidden}
.meter-map-canvas .floor-plan{max-height:360px}
.meter-map-canvas.entire-floor .plan-outline{fill:#e5f1ff;stroke:#216bcf;stroke-width:6}
.meter-map-canvas .plan-device{cursor:default}
.meter-map-missing{margin:10px 0 0;color:#65768a;font-size:14px}
@media(max-width:1000px){.device-edit-grid{grid-template-columns:1fr}}
@media(max-width:640px){.devices-panel{padding:18px}.device-filters{display:grid;grid-template-columns:1fr 1fr;gap:14px}.device-filters label:first-child,.device-filter-actions{grid-column:1/-1}.device-filters input,.device-filters select{width:100%;min-width:0}.device-category-filter{align-items:start;gap:10px}.device-category-title{width:100%}.device-category-checks{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:640px){.content:has(.devices-panel),.content:has(.access-panel),.content:has(.device-edit-page){height:calc(100dvh - 98px)}.device-category-dropdown{width:100%}.device-edit-heading{gap:10px}.device-edit-heading>span{width:100%}.device-edit-section,.access-panel{padding:18px}}

.monitor-panel .device-filters{margin-bottom:20px}.monitor-divider{color:#a2afbd;padding:0 5px}

.monitor-panel table{table-layout:fixed;width:100%;min-width:0}.monitor-panel td,.monitor-panel th{white-space:normal;overflow-wrap:anywhere}.monitor-panel th:first-child{width:19%}.monitor-panel th:nth-child(2){width:18%}.monitor-panel th:nth-child(3){width:14%}.monitor-panel th:last-child{width:6%}.monitor-param{display:inline-block;margin:2px 12px 2px 0}.monitor-panel .table-wrap{overflow-x:auto}

.monitor-panel td:last-child,.monitor-panel th:last-child{white-space:nowrap;overflow-wrap:normal}.monitor-panel td:last-child button{white-space:nowrap;padding-left:0;padding-right:0}

@media(min-width:1251px) and (min-height:680px){.content:has(.plan-workspace){height:calc(100dvh - var(--header-height) - 38px)}}
.content:has(.devices-panel),.content:has(.access-panel),.content:has(.device-edit-page){height:calc(100dvh - var(--header-height) - 38px)}
@media(max-width:640px){.content:has(.devices-panel),.content:has(.access-panel),.content:has(.device-edit-page){height:calc(100dvh - var(--header-height) - 36px)}}

/* 建筑与空间：建筑概览、楼层与平面图。 */
.spatial-page-head{margin-bottom:18px}
.spatial-page-head h1{display:flex;align-items:center;gap:12px;color:#102c53;font-size:26px;font-weight:700}
.spatial-page-head h1 .ui-icon{width:32px;height:32px;color:#1168d9;stroke-width:1.8}
.spatial-building{grid-template-columns:minmax(320px,1.25fr) minmax(0,3fr);gap:24px;padding:15px 20px;border:1px solid #d9e7f8;background:#fff;box-shadow:0 4px 16px #3d78bd0b}
.building-identity{display:flex;align-items:center;gap:20px;min-width:0}
.building-photo{width:170px;height:100px;flex:none;object-fit:cover;object-position:center;border-radius:6px}
.spatial-building .building-title{min-width:0}
.spatial-building .building-title h2{font-size:24px;line-height:1.3;color:#10294d;margin:0 0 10px;white-space:nowrap}
.spatial-building .building-title>span{display:inline-flex;align-items:center;gap:5px;padding:3px 9px;border-radius:5px;background:#e7f1ff;color:#1766c5;font-size:14px;white-space:nowrap}
.building-title>span .ui-icon{width:16px;height:16px}
.spatial-building .building-facts{grid-template-columns:minmax(125px,.8fr) minmax(190px,1.15fr) minmax(260px,1.55fr);gap:0}
.building-facts>div{padding:0 22px;min-height:70px;display:flex;flex-direction:column;justify-content:center;border-left:1px solid #d9e7f8}
.building-facts dt{display:flex;align-items:center;gap:9px;margin-bottom:5px;font-size:14px;color:#617491}
.building-facts dt .ui-icon{width:21px;height:21px;color:#176bdd;stroke-width:1.8}
.building-facts dd{margin:0;padding-left:30px;font-size:16px;font-weight:600;color:#122d52;line-height:1.45}
.building-facts dd span{color:inherit;font-size:13px}
.plan-workspace{grid-template-columns:minmax(185px,19fr) minmax(0,56fr) minmax(235px,25fr);gap:14px}
.plan-workspace>.panel{border:1px solid #dae7f6;border-radius:10px;box-shadow:0 4px 16px #3d78bd0b}
.plan-floor-list,.plan-region-list,.plan-canvas-panel{padding:18px}
.plan-floor-list h2,.plan-region-list h2,.plan-canvas-panel h2{font-size:18px;color:#102a4c;line-height:1.35}
.plan-canvas-panel h2,.plan-region-list h2{display:flex;align-items:center;gap:9px}
.plan-canvas-panel h2 .ui-icon,.plan-region-list h2 .ui-icon{width:22px;height:22px;color:#1168d9}
.plan-floor-list h2{margin-bottom:14px}
.floor-list-scroll>button{border:1px solid #e0eaf8;border-radius:7px;background:#fbfdff;min-height:59px;padding:8px 12px;margin:0 0 8px;gap:12px}
.floor-list-scroll>button:hover{background:#f1f7ff;border-color:#bcd6f7}
.floor-list-scroll>button.selected{background:#e7f1ff;border-color:#4d9bff;color:var(--blue)}
.floor-list-scroll>button>span{flex:1}
.floor-list-scroll>button strong{font-size:16px;line-height:1.25}
.floor-list-scroll>button small{font-size:13px;line-height:1.25;margin-top:2px}
.floor-list-scroll>button small{color:#536781}
.plan-floor-list .floor-count{color:#5a6e88}
.floor-list-scroll>button .floor-chevron{width:15px;height:15px;flex:0 0 15px;color:#6c82a0}
.floor-list-scroll>button.selected .floor-chevron{color:var(--blue)}
.region-tree{margin-top:15px}
.region-tree-group{border:0;margin-bottom:8px}
.region-tree-row{position:relative;display:flex;align-items:center;gap:9px;min-height:46px;padding:6px 10px;border:1px solid #e0eaf8;border-radius:7px;background:#fbfdff;font-size:16px;font-weight:400}
.region-tree-row:has(.region-tree-toggle){cursor:pointer}
.region-tree-row.selected{border-color:#9bc7fa;background:#eaf3ff}
.region-tree-row .region-tree-toggle{position:absolute;inset:0;z-index:0;width:100%;height:100%;min-height:0;margin:0;padding:0;border:0;border-radius:inherit;background:transparent;transform:none;box-shadow:none}
.region-tree-row .region-tree-toggle:is(:hover,:active){background:transparent;border:0;transform:none;box-shadow:none}
.region-tree-icon,.region-name-actions,.region-expand{position:relative;pointer-events:none}
.region-tree-icon{display:flex;flex:none;color:#7088a5}
.region-tree-icon .ui-icon{width:18px;height:18px}
.region-name-actions{display:inline-flex;align-items:center;gap:6px;flex:0 1 auto;min-width:0;margin-right:auto}
.region-name{min-width:0;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;font-size:15px}
.region-tree-row.selected .region-name,.region-tree-row.selected .region-tree-icon{color:var(--blue)}
.region-tree-row .region-expand{display:grid;place-items:center;flex:none;width:24px;height:32px;color:#7088a5}
.region-tree-row .region-rename{position:relative;z-index:1;display:grid;place-items:center;flex:none;width:26px;min-height:26px;height:26px;padding:0;border:0;border-radius:4px;color:#526980;background:transparent;opacity:0;pointer-events:none;transform:none;transition:opacity .12s ease,background-color .12s ease,color .12s ease}
.region-tree-row .region-rename .ui-icon{width:16px;height:16px}
.region-tree-row:hover,.region-tree-row:has(:focus-visible){background:#eaf3ff;border-color:#a3c8f5}
.region-tree-row.selected:hover,.region-tree-row.selected:has(:focus-visible){background:#dfedff;border-color:#83b4ee}
.region-tree-row:hover .region-rename,.region-tree-row:has(:focus-visible) .region-rename{opacity:1;pointer-events:auto}
.region-tree-row .region-rename:hover:not(:disabled),.region-tree-row .region-rename:active{background:#d8e9ff;color:var(--blue);transform:none}
.region-tree-row button:focus-visible{outline:2px solid var(--blue);outline-offset:-2px}
@media(hover:none){.region-tree-row .region-rename{opacity:1;pointer-events:auto}}
.region-tree-children{margin:4px 0 4px 19px;padding:0 0 0 8px;border-left:1px solid #d6e2ef}
.region-tree-children[hidden]{display:none}
.region-tree-children .region-tree-device{min-height:43px;padding:8px 6px}
.plan-canvas-panel .panel-header{margin-bottom:14px}
#space-plan{border:1px solid #e1edfb;border-radius:6px;overflow:hidden;background:#f5f9ff}
#space-plan .plan-ground{fill:url(#space-grid)}
#space-plan .plan-outline{stroke:#2963a2;stroke-width:6}
#space-plan .plan-wall{stroke:#a3bad3}
#space-plan .plan-region{fill:#d6e8ff;stroke:#3487eb;stroke-width:2.5}
#space-plan .plan-region.selected{fill:#bad9ff;stroke:var(--blue);stroke-width:4}
#space-plan .plan-region-label{fill:#17447b;font-weight:600}
.plan-legend{display:flex;align-items:center;flex-wrap:wrap;gap:12px 20px;margin-top:12px;padding:8px 12px;background:#f4f8fd;border-radius:5px;color:#526881;font-size:13px;line-height:1.3}
.plan-legend strong{color:#243c5c;font-weight:600}
.plan-legend span{display:inline-flex;align-items:center;gap:7px;white-space:nowrap}
.plan-legend i{display:inline-block;width:22px;height:14px;border-radius:2px}
.plan-legend .legend-device{width:11px;height:11px;border-radius:50%;background:#216bcf}
.plan-legend .legend-region{border:1px solid #3487eb;background:#d6e8ff}
.plan-legend .legend-other{border:1px solid #9db4d0;background:#fff}
@media(min-width:1251px) and (min-height:680px){.plan-legend{flex:none}}
@media(max-width:1500px){.spatial-building{grid-template-columns:minmax(265px,1fr) minmax(0,2.4fr);gap:14px}.building-photo{width:125px;height:83px}.building-identity{gap:14px}.spatial-building .building-title h2{font-size:21px}.spatial-building .building-facts{grid-template-columns:minmax(100px,.75fr) minmax(165px,1fr) minmax(190px,1.3fr)}.building-facts>div{padding:0 14px}.building-facts dd{padding-left:0;font-size:14px}.building-facts dt{font-size:13px}}
@media(max-width:1250px){.spatial-building{grid-template-columns:1fr;gap:16px}.spatial-building .building-facts{grid-template-columns:repeat(3,minmax(0,1fr))}.plan-workspace{grid-template-columns:minmax(175px,1fr) minmax(0,3fr)}.plan-region-list{grid-column:1/-1}.floor-list-scroll>button{margin-bottom:7px}}
@media(max-width:640px){.spatial-page-head h1{font-size:22px}.spatial-building{display:block}.building-photo{width:115px;height:76px}.spatial-building .building-facts{grid-template-columns:1fr;gap:10px}.building-facts>div{display:block;min-height:0;padding:0;border:0}.building-facts dt{margin-bottom:3px}.building-facts dd{padding-left:30px}.plan-workspace{display:block}.floor-list-scroll>button{min-width:140px}.floor-list-scroll>button .floor-chevron{display:none}.plan-canvas-panel{margin-top:14px}.plan-legend{gap:8px 12px}}

.plan-floor-list .panel-header,.plan-canvas-panel .panel-header,.plan-region-list .panel-header{display:flex;align-items:center;min-height:25px;margin:0 0 14px}
.plan-floor-list .panel-header h2,.plan-canvas-panel .panel-header h2,.plan-region-list .panel-header h2{display:flex;align-items:center;gap:9px;margin:0;font-size:18px;line-height:1.35}
.plan-floor-list .panel-header h2 .ui-icon,.plan-canvas-panel .panel-header h2 .ui-icon,.plan-region-list .panel-header h2 .ui-icon{width:22px;height:22px;color:#1168d9}
.plan-region-list{scrollbar-gutter:stable;scrollbar-width:thin;scrollbar-color:#a9c1dd #f0f5fb}
.plan-region-list .region-tree{margin-top:0}
.region-expand .tree-arrow{width:16px;height:16px;color:inherit;transition:transform .16s ease}
.region-tree-toggle[aria-expanded="true"]~.region-expand .tree-arrow{transform:rotate(90deg)}
@media(prefers-reduced-motion:reduce){.region-expand .tree-arrow{transition:none}}
@media(max-width:640px){.plan-floor-list .panel-header{display:none}}

.spatial-building .building-facts{grid-template-columns:minmax(135px,.75fr) minmax(220px,1.2fr) minmax(300px,1.8fr)}
.building-facts dt{font-size:16px;gap:10px}
.building-facts dt .ui-icon{width:25px;height:25px}
.building-facts dd{font-size:20px;line-height:1.4;padding-left:35px}
.building-facts dd span{font-size:inherit}
.building-facts>div:last-child dd{overflow-wrap:normal}
@media(max-width:1500px){.spatial-building .building-facts{grid-template-columns:minmax(110px,.7fr) minmax(235px,1.05fr) minmax(220px,1.6fr)}.building-facts dt{font-size:15px}.building-facts dd{padding-left:0;font-size:18px}}
@media(max-width:1250px){.spatial-building .building-facts{grid-template-columns:minmax(110px,.7fr) minmax(190px,1fr) minmax(220px,1.4fr)}}
@media(max-width:640px){.spatial-building .building-facts{grid-template-columns:1fr}.building-facts dd{padding-left:35px}}

/* 楼层标题固定，仅列表区域滚动。 */
.plan-floor-list{display:flex;flex-direction:column;overflow:hidden}
.plan-floor-list .panel-header{flex:none}
.floor-list-scroll{flex:1;min-height:0;max-height:520px;overflow-y:auto;overscroll-behavior:contain;scrollbar-gutter:stable;scrollbar-width:thin;scrollbar-color:#a9c1dd #f0f5fb;padding-right:5px}
.floor-list-scroll::-webkit-scrollbar{width:7px;height:7px}
.floor-list-scroll::-webkit-scrollbar-track{background:#f0f5fb;border-radius:8px}
.floor-list-scroll::-webkit-scrollbar-thumb{background:#a9c1dd;border-radius:8px}
.floor-list-scroll::-webkit-scrollbar-thumb:hover{background:#769fcf}
@media(min-width:1251px) and (min-height:680px){.plan-floor-list{overflow:hidden}.floor-list-scroll{max-height:none}}
@media(max-width:640px){.plan-floor-list{display:block}.floor-list-scroll{display:flex;gap:6px;max-height:none;overflow-x:auto;overflow-y:hidden;padding:0 0 5px;scrollbar-gutter:auto}.floor-list-scroll>button{flex:0 0 140px;margin:0}}
.dashboard .model-floor-list{flex:1;min-height:0;max-height:560px;overflow-y:auto;overscroll-behavior:contain;scrollbar-width:thin;scrollbar-color:#54798c #17313e}
@media(max-width:640px){.dashboard .model-floor-list{max-height:none;overflow-x:auto;overflow-y:hidden}}

/* 楼层行的选择和更多操作分别为独立按钮。 */
.floor-disabled-action{flex:none;gap:3px;min-height:30px;padding:4px 7px;font-size:13px;font-weight:400;white-space:nowrap}
.floor-disabled-action .ui-icon{width:14px;height:14px}
.floor-disabled-action:disabled{color:#9aa8b9;background:#f4f6f9;border-color:#e1e8f0;opacity:1;cursor:not-allowed}
.floor-row{display:flex;align-items:center;gap:2px;min-height:59px;margin:0 0 8px;padding:0 7px 0 0;border:1px solid #e0eaf8;border-radius:7px;background:#fbfdff}
.floor-row:hover{background:#f1f7ff;border-color:#bcd6f7}
.floor-row.selected{background:#e7f1ff;border-color:#4d9bff}
.floor-row .floor-select{display:flex;align-items:center;justify-content:flex-start;gap:12px;flex:1;min-width:0;min-height:57px;padding:8px 5px 8px 12px;border:0;border-radius:7px;background:transparent;text-align:left}
.floor-row .floor-select:hover{background:transparent;border-color:transparent}
.floor-row .floor-select>.ui-icon{width:18px;height:18px;flex:none}
.floor-row .floor-select>span{display:block;min-width:0}
.floor-row .floor-select strong{display:block;font-size:16px;line-height:1.25;font-weight:600}
.floor-row .floor-select small{display:block;margin-top:2px;font-size:13px;line-height:1.25;color:#536781;white-space:nowrap}
.floor-row.selected .floor-select{color:var(--blue)}
.floor-row .floor-more{flex:none;width:30px;min-width:30px;height:32px;min-height:32px;padding:0;border:0;background:transparent;color:#71849e;font-size:22px;line-height:1}
.floor-row .floor-more:hover,.floor-row .floor-more[aria-expanded="true"]{color:var(--blue);background:#dfedff}
.floor-action-menu{position:fixed;z-index:150;min-width:136px;padding:5px;background:#fff;border:1px solid #dbe4ef;border-radius:6px;box-shadow:0 8px 24px #1a345a26}
.floor-action-menu button{display:flex;justify-content:flex-start;width:100%;min-height:36px;padding:7px 12px;border:0;background:transparent;font-size:14px;text-align:left}
.floor-action-menu button:disabled{background:transparent;color:#a8b4c2;cursor:not-allowed}
.floor-rename-dialog{align-items:center;justify-content:center;padding:20px}
.floor-rename-dialog .drawer{width:420px;height:auto;max-height:min(90vh,600px);border-radius:8px;overflow:hidden}
.floor-rename-dialog .drawer-body{padding:20px 24px 8px}
.floor-rename-dialog .field>input,.floor-rename-dialog .field .device-category-control,.floor-rename-dialog .field .monitor-dropdown,.floor-rename-dialog .field .stats-dropdown{width:100%;min-width:0;border-radius:4px;font-size:14px}
.floor-rename-dialog .drawer-footer{padding:12px 24px 18px}
.floor-rename-dialog .drawer-footer button{height:32px;min-height:32px;min-width:64px;padding:4px 15px;border-radius:4px;font-size:14px;line-height:22px;font-weight:400}
.floor-rename-dialog .drawer-footer button:not(.primary):not(:disabled){background:#fff;border-color:#d9d9d9;color:#595959}
.floor-rename-dialog .drawer-footer button:not(.primary):hover:not(:disabled){border-color:var(--blue);color:var(--blue)}
.floor-rename-id{margin:0 0 16px;color:#61748b;font-size:14px}
@media(min-width:641px) and (max-width:1500px){.plan-floor-list .panel-header h2{white-space:nowrap;gap:5px;font-size:17px}.plan-floor-list .floor-disabled-action{padding:3px;gap:2px;font-size:12px}.floor-row .floor-select{gap:6px;padding-left:8px}.floor-row .floor-select>.ui-icon{width:16px;height:16px}.floor-row .floor-more{width:26px;min-width:26px}}
@media(max-width:640px){.floor-list-scroll>.floor-row{flex:0 0 155px;margin:0}.floor-row .floor-select>.ui-icon{display:none}}

.plan-region-list:has(.region-empty--floor){display:flex;flex-direction:column}
.plan-region-list .region-tree:has(.region-empty--floor){display:flex;align-items:center;justify-content:center;flex:1;min-height:220px}
.region-empty{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:10px;text-align:center;color:#6e8199;font-size:14px}
.region-empty img{display:block;width:min(180px,85%);height:auto;object-fit:contain}
.region-empty .floor-disabled-action{min-height:34px;padding:5px 12px}
.region-empty--compact{gap:6px;padding:8px 0 12px;font-size:13px}
.region-empty--compact img{width:min(110px,75%)}
.floor-direct-devices{margin-top:16px;padding-top:14px;border-top:1px solid #e8eff7}
.floor-direct-devices h3{margin:0 0 5px;color:var(--ink);font-size:16px;font-weight:600}
.floor-direct-device{justify-content:flex-start;gap:9px;min-height:43px;padding:8px}
.floor-direct-device>.ui-icon{width:17px;height:17px;color:#7188a4;flex:none}
.floor-direct-device>span:first-of-type{flex:1;min-width:0}

/* Keep the canvas background across the full available width. */
.floor-plan,#space-plan,.device-info-map,.meter-map-canvas,#device-location-plan{
 background-color:#f0f7ff;
 background-image:linear-gradient(#d6e8f866 1px,transparent 1px),linear-gradient(90deg,#d6e8f866 1px,transparent 1px);
 background-size:32px 32px;
}
.floor-plan .plan-region,#space-plan .plan-region{fill:#78b6fa;fill-opacity:.28}
.floor-plan .plan-region.selected,#space-plan .plan-region.selected{fill:#5da4f5;fill-opacity:.48}
.floor-plan{cursor:grab;user-select:none}
.floor-plan.is-panning{cursor:grabbing}
.floor-plan .plan-region-label{paint-order:stroke;stroke:#fff;stroke-width:3px;stroke-linejoin:round}
.floor-plan [data-region="3E"] .plan-region-label,.floor-plan [data-region="3D"] .plan-region-label{display:none}
#space-plan,.device-info-map,.meter-map-canvas,#device-location-plan{position:relative}
#space-plan:has(.floor-plan)::after,.device-info-map:has(.floor-plan)::after,.meter-map-canvas:has(.floor-plan)::after,#device-location-plan:has(.floor-plan)::after,.model-panel:has(.floor-plan)::after{
 content:'';position:absolute;z-index:2;top:10px;right:12px;width:38px;height:48px;pointer-events:none;
 border:1px solid #cedcea;border-radius:6px;background:#fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 38 48'%3E%3Ctext x='19' y='13' font-family='Arial,sans-serif' font-size='11' font-weight='700' text-anchor='middle' fill='%2329405e'%3EN%3C/text%3E%3Cg transform='rotate(38 19 30)'%3E%3Cpath d='M19 17L24.5 40L19 36Z' fill='%238fa8bf'/%3E%3Cpath d='M19 17L19 36L13.5 40Z' fill='%23244b72'/%3E%3C/g%3E%3C/svg%3E") center/contain no-repeat;
}

/* 设备管理沿用建筑与空间的面板、标题及滚动样式。 */
.devices-panel,.device-edit-page .device-edit-section{border:1px solid #dae7f6;border-radius:10px;box-shadow:0 4px 16px #3d78bd0b}
.device-filter-head h2{display:flex;align-items:center;gap:9px;color:#102a4c;line-height:1.35}
.device-filter-head h2 .ui-icon{width:22px;height:22px;color:#1168d9}
.devices-panel .table-wrap{max-height:calc(100dvh - 350px);min-height:180px;overflow:auto;overscroll-behavior:contain;scrollbar-width:thin;scrollbar-color:#a9c1dd #f0f5fb}
/* 桌面设备列表占据剩余高度，由表格区域负责滚动。 */
@media (min-width:641px) and (min-height:680px){
 .content:has(.devices-panel){display:flex;flex-direction:column;overflow:hidden}
 .content:has(.devices-panel)>.page-head{flex:none}
 .devices-panel{display:flex;flex:1;min-height:0;flex-direction:column;margin-bottom:0}
 .devices-panel>.device-filter-head,.devices-panel>.device-filters{flex:none}
 .devices-panel>.table-wrap{flex:1;min-height:0;max-height:none}
 .devices-panel>.device-list-empty{flex:1;min-height:0}
}
.devices-panel .table-wrap::-webkit-scrollbar,.device-info-drawer .drawer-body::-webkit-scrollbar{width:7px;height:7px}
.devices-panel .table-wrap::-webkit-scrollbar-track,.device-info-drawer .drawer-body::-webkit-scrollbar-track{background:#f0f5fb;border-radius:8px}
.devices-panel .table-wrap::-webkit-scrollbar-thumb,.device-info-drawer .drawer-body::-webkit-scrollbar-thumb{background:#a9c1dd;border-radius:8px}
.devices-panel .table-wrap::-webkit-scrollbar-thumb:hover,.device-info-drawer .drawer-body::-webkit-scrollbar-thumb:hover{background:#769fcf}
.devices-panel table{min-width:900px}
.devices-panel th{position:sticky;top:0;z-index:1;background:#edf1f6;color:#465e7b;font-size:14px;font-weight:600}
.devices-panel td{font-size:14px}
.devices-panel th:last-child,.devices-panel td:last-child{position:sticky;right:0;white-space:nowrap;background:#fff}
.devices-panel th:last-child{z-index:2;background:#edf1f6}
.devices-panel tr:hover td:last-child{background:#fafcff}
.device-list-empty{display:flex;min-height:240px;align-items:center;justify-content:center;flex-direction:column;gap:4px;color:#71839a;text-align:center}
.device-list-empty img{width:160px;max-width:70%;height:150px;object-fit:contain}
.device-edit-page .device-edit-heading h1{color:#102c53;font-size:26px;font-weight:700}
.device-edit-page .device-edit-section h2{color:#102a4c;line-height:1.35}
.device-info-drawer .drawer-body{scrollbar-width:thin;scrollbar-color:#a9c1dd #f0f5fb}
@media(max-width:640px){
 .devices-panel .table-wrap{max-height:none;min-height:0}
 .device-edit-page .device-edit-heading h1{font-size:22px}
 .device-info-basic-view .drawer-body{overflow-y:auto}
 .device-info-basic{flex:none}
 .device-info-location{min-height:180px}
 .device-info-card{flex-wrap:wrap}
 .device-info-tags{margin-left:0}
}

/* 仅设备详情使用 MDI 填充图标。 */
.device-info-drawer .ui-icon.mdi-icon{fill:currentColor;stroke:none}

/* 设备筛选：输入框、单选和多选共用尺寸与状态。 */
.devices-panel .device-filters{gap:14px;align-items:end}
.devices-panel .device-filters>label,.devices-panel .device-category-control{min-width:0;gap:7px;color:#53677e;font-size:14px}
.devices-panel .device-filters>label>input,.devices-panel .device-filters>label>select,.devices-panel .device-category-dropdown>summary{width:170px;min-width:0;height:40px;padding:8px 12px;border:1px solid #d6dee9;border-radius:5px;background-color:#fff;color:#26354a;font-size:14px;line-height:22px}
.devices-panel .device-filters>label>select,.devices-panel .device-category-dropdown>summary{appearance:none;padding-right:34px;background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2364778e' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");background-repeat:no-repeat;background-position:right 10px center}
.devices-panel .device-category-dropdown{width:170px}
.devices-panel .device-category-dropdown>summary{display:flex}
.devices-panel .device-category-dropdown>summary::after{content:none}
.devices-panel .device-category-menu{width:100%;min-width:170px}
.floor-rename-dialog .field>input:hover,.floor-rename-dialog .field .monitor-dropdown>summary:hover,.devices-panel .device-filters>label>input:hover,.devices-panel .device-filters>label>select:hover,.devices-panel .device-category-dropdown>summary:hover{border-color:#8db5e6}
.floor-rename-dialog .field>input:focus,.floor-rename-dialog .field .monitor-dropdown>summary:focus,.devices-panel .device-filters>label>input:focus,.devices-panel .device-filters>label>select:focus,.devices-panel .device-category-dropdown>summary:focus,.devices-panel .device-category-dropdown[open]>summary{outline:none;border-color:var(--blue);box-shadow:inset 0 0 0 1px rgb(17 106 243 / 33%)}
.devices-panel .device-filters>label>input::placeholder{color:#91a0b2}
.devices-panel th:first-child,.devices-panel td:first-child{width:64px;white-space:nowrap}
@media(max-width:640px){
 .devices-panel .device-filters>label:first-child{grid-column:auto}
 .devices-panel .device-filters>label>input,.devices-panel .device-filters>label>select,.devices-panel .device-category-dropdown,.devices-panel .device-category-dropdown>summary{width:100%}
 .devices-panel .device-category-menu{min-width:100%}
}

/* 设备筛选的分级位置和状态菜单。 */
.devices-panel .device-category-menu,:is(.devices-panel,.access-panel) .device-location-menu{z-index:30;border:1px solid #d6e2f0;border-radius:6px;background:#fff;box-shadow:0 8px 24px #17365a24}
:is(.devices-panel,.access-panel) .device-location-menu{position:absolute;top:calc(100% + 5px);left:var(--location-offset,0px);display:grid;max-width:calc(100vw - 16px);height:260px;overflow:hidden}
:is(.devices-panel,.access-panel) .device-location-floors,:is(.devices-panel,.access-panel) .device-location-regions{min-width:0;overflow:auto;scrollbar-width:thin;scrollbar-color:#a9c1dd #f0f5fb}
:is(.devices-panel,.access-panel) .device-location-floors{border-right:1px solid #e5edf6}
:is(.devices-panel,.access-panel) .device-location-floor{display:flex;align-items:stretch;min-height:40px}
:is(.devices-panel,.access-panel) .device-location-floor.active,:is(.devices-panel,.access-panel) .device-location-floor:hover,:is(.devices-panel,.access-panel) .device-location-option:hover,.devices-panel .device-category-menu label:hover{background:#eef6ff}
:is(.devices-panel,.access-panel) .device-location-floor>label,:is(.devices-panel,.access-panel) .device-location-option,.devices-panel .device-category-menu label{display:flex;flex:1;min-width:0;flex-direction:row;align-items:center;gap:9px;min-height:40px;margin:0;padding:8px 10px;color:#263b53;font-size:14px;cursor:pointer}
:is(.devices-panel,.access-panel) .device-location-floor>label span,:is(.devices-panel,.access-panel) .device-location-option span{overflow-wrap:anywhere}
:is(.devices-panel,.access-panel) .device-location-expand{flex:none;width:32px;min-height:40px;padding:0;border:0;border-radius:0;background:transparent;color:#6d83a0;font-size:20px;line-height:1}
:is(.devices-panel,.access-panel) .device-location-floor.active .device-location-expand{color:var(--blue)}
:is(.devices-panel,.access-panel) .device-location-empty{display:block;padding:12px 10px;color:#8494a8;font-size:13px}
.devices-panel .device-category-menu input[type=checkbox],:is(.devices-panel,.access-panel) .device-location-menu input[type=checkbox]{appearance:none;display:inline-grid;place-content:center;flex:none;width:16px;height:16px;min-height:0;margin:0;padding:0;border:1px solid #a9bad0;border-radius:3px;background:#fff;cursor:pointer}
.devices-panel .device-category-menu input[type=checkbox]:checked,:is(.devices-panel,.access-panel) .device-location-menu input[type=checkbox]:checked{border-color:var(--blue);background:var(--blue)}
.devices-panel .device-category-menu input[type=checkbox]:checked::after,:is(.devices-panel,.access-panel) .device-location-menu input[type=checkbox]:checked::after{content:'';width:7px;height:4px;border-left:2px solid #fff;border-bottom:2px solid #fff;transform:translateY(-1px) rotate(-45deg)}
.devices-panel .device-category-menu input[type=checkbox]:focus-visible,:is(.devices-panel,.access-panel) .device-location-menu input[type=checkbox]:focus-visible,:is(.devices-panel,.access-panel) .device-location-expand:focus-visible,.devices-panel .device-status-option:focus-visible{outline:2px solid var(--blue);outline-offset:2px}
.devices-panel .device-status-option{display:block;width:100%;min-height:38px;padding:7px 10px;border:0;border-radius:4px;background:#fff;text-align:left;color:#263b53;font-size:14px}
.devices-panel .device-status-option:hover,.devices-panel .device-status-option.selected{background:#eef6ff;color:var(--blue)}

/* 安装位置：楼层列保持固定宽度，分区列按需展开。 */
:is(.devices-panel,.access-panel) .device-location-menu{--location-column-width:min(180px,calc(50vw - 10px));grid-template-columns:var(--location-column-width);width:calc(var(--location-column-width) + 2px)}
:is(.devices-panel,.access-panel) .device-location-menu.has-regions{grid-template-columns:repeat(2,var(--location-column-width));width:calc(var(--location-column-width) + var(--location-column-width) + 2px)}
:is(.devices-panel,.access-panel) .device-location-regions{display:none}
:is(.devices-panel,.access-panel) .device-location-menu.has-regions .device-location-regions{display:block}

/* 为同一设备的多个分类预留并排展示空间。 */
.devices-panel th:nth-child(5),.devices-panel td:nth-child(5){min-width:190px}

/* 父项部分选中时使用横线，保持与选中态相同的主题色。 */
:is(.devices-panel,.access-panel) .device-location-menu input[type=checkbox]:indeterminate{border-color:var(--blue);background:var(--blue)}
:is(.devices-panel,.access-panel) .device-location-menu input[type=checkbox]:indeterminate::after{content:'';width:8px;height:2px;background:#fff}

/* 未设置筛选条件时，与输入框占位文字保持一致。 */
.devices-panel .device-category-selection.is-placeholder{color:#91a0b2}

/* 设备监测：与设备管理共用标题、筛选和列表的视觉规则。 */
.monitor-panel{border:1px solid #dae7f6;border-radius:10px;box-shadow:0 4px 16px #3d78bd0b}

.monitor-panel{padding:24px}
.monitor-panel .device-filter-head h2{color:#102a4c;line-height:1.35}
.monitor-panel .device-filter-head>span{display:flex;align-items:center;gap:12px;flex-wrap:wrap;justify-content:flex-end}
:is(.monitor-panel,.alarm-panel) .device-filters{gap:14px;align-items:end;margin-bottom:22px}
:is(.monitor-panel,.alarm-panel) .device-filters>label,:is(.monitor-panel,.alarm-panel) .device-category-control{min-width:0;gap:7px;color:#53677e;font-size:14px}
:is(.monitor-panel,.alarm-panel) .device-filters>label>input,:is(.monitor-panel,.alarm-panel) .monitor-dropdown>summary{width:170px;min-width:0;height:40px;padding:8px 12px;border:1px solid #d6dee9;border-radius:5px;background-color:#fff;color:#26354a;font-size:14px;line-height:22px}
:is(.monitor-panel,.alarm-panel) .monitor-dropdown{width:170px}
:is(.monitor-panel,.alarm-panel,.operation-dialog) .monitor-dropdown>summary{display:flex;appearance:none;padding-right:34px;background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2364778e' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");background-repeat:no-repeat;background-position:right 10px center}
:is(.monitor-panel,.alarm-panel,.operation-dialog) .monitor-dropdown>summary::after{content:none}
:is(.monitor-panel,.alarm-panel) .device-category-selection.is-placeholder,:is(.monitor-panel,.alarm-panel) .device-filters>label>input::placeholder{color:#91a0b2}
:is(.monitor-panel,.alarm-panel,.operation-dialog) .device-filters>label>input:hover,:is(.monitor-panel,.alarm-panel,.operation-dialog) .monitor-dropdown>summary:hover{border-color:#8db5e6}
:is(.monitor-panel,.alarm-panel,.operation-dialog) .device-filters>label>input:focus,:is(.monitor-panel,.alarm-panel,.operation-dialog) .monitor-dropdown>summary:focus,:is(.monitor-panel,.alarm-panel,.operation-dialog) .monitor-dropdown[open]>summary{outline:none;border-color:var(--blue);box-shadow:inset 0 0 0 1px rgb(17 106 243 / 33%)}
:is(.monitor-panel,.alarm-panel,.operation-dialog) .device-category-menu{z-index:30;width:100%;min-width:170px;max-height:260px;overflow:auto;border:1px solid #d6e2f0;border-radius:6px;background:#fff;box-shadow:0 8px 24px #17365a24;scrollbar-width:thin;scrollbar-color:#a9c1dd #f0f5fb}
:is(.monitor-panel,.alarm-panel,.operation-dialog) .monitor-option{display:block;width:100%;min-height:38px;padding:7px 10px;border:0;border-radius:4px;background:#fff;text-align:left;color:#263b53;font-size:14px}
:is(.monitor-panel,.alarm-panel,.operation-dialog) .monitor-option:hover,:is(.monitor-panel,.alarm-panel,.operation-dialog) .monitor-option.selected{background:#eef6ff;color:var(--blue)}
:is(.monitor-panel,.alarm-panel,.operation-dialog) .monitor-option:focus-visible{outline:2px solid var(--blue);outline-offset:-2px}
:is(.monitor-panel,.alarm-panel) .table-wrap{min-width:0;overflow:auto;overscroll-behavior:contain;scrollbar-width:thin;scrollbar-color:#a9c1dd #f0f5fb}
:is(.monitor-panel,.alarm-panel) .table-wrap::-webkit-scrollbar{width:7px;height:7px}
:is(.monitor-panel,.alarm-panel) .table-wrap::-webkit-scrollbar-track{background:#f0f5fb;border-radius:8px}
:is(.monitor-panel,.alarm-panel) .table-wrap::-webkit-scrollbar-thumb{background:#a9c1dd;border-radius:8px}
:is(.monitor-panel,.alarm-panel) .table-wrap::-webkit-scrollbar-thumb:hover{background:#769fcf}
.monitor-panel table{table-layout:fixed;min-width:1250px;width:100%}
.monitor-results{position:relative;min-width:0;min-height:0;height:clamp(220px,48dvh,480px);--monitor-head-height:46px}
.monitor-results>.table-wrap{height:100%;scrollbar-gutter:stable}
.monitor-results th{height:var(--monitor-head-height)}
.monitor-results>.device-list-empty{position:absolute;inset:var(--monitor-head-height) 0 0;min-height:0;pointer-events:none}
.monitor-results>.device-list-empty img{height:clamp(45px,55%,150px)}
.monitor-panel th:first-child,.monitor-panel th:nth-child(2),.monitor-panel th:nth-child(3),.monitor-panel th:last-child{width:auto}
.monitor-panel th{position:sticky;top:0;z-index:1;background:#edf1f6;color:#465e7b;font-size:14px;font-weight:600;white-space:nowrap}
.monitor-panel td{font-size:14px;vertical-align:middle}
.monitor-panel td:last-child,.monitor-panel th:last-child{position:sticky;right:0;background:#fff;white-space:nowrap}
.monitor-panel td:last-child::before,.monitor-panel th:last-child::before{content:"";position:absolute;top:0;bottom:-1px;right:100%;width:8px;background:linear-gradient(to left,rgb(23 54 90 / 12%),transparent);opacity:0;transition:opacity .2s ease;pointer-events:none}
.monitor-panel .table-wrap.can-scroll-right :is(td,th):last-child::before{opacity:1}
.monitor-panel th:last-child{z-index:2;background:#edf1f6}
.monitor-panel tr:hover td:last-child{background:#fafcff}
.monitor-panel th:first-child,.monitor-panel td:first-child{width:64px;white-space:nowrap}
.monitor-results th:nth-child(2){width:12%}
.monitor-results th:nth-child(3){width:9%}
.monitor-results th:nth-child(4){width:16%}
.monitor-results th:nth-child(5),.monitor-results th:nth-child(6),.monitor-results th:nth-child(7){width:6.5%}
.monitor-results th:nth-child(9){width:12%}
.monitor-results th:last-child{width:130px;min-width:130px}
.monitor-results th:nth-child(8){width:max(18rem,22%)}
.monitor-panel .monitor-params{display:inline-flex;flex-wrap:wrap;max-width:100%;gap:2px 12px;white-space:nowrap}
.monitor-panel .monitor-param{margin:0;text-align:left}
@media(min-width:1001px) and (min-height:760px){
 .content:has(:is(.monitor-panel,.alarm-panel)){display:flex;flex-direction:column;height:calc(100dvh - var(--header-height) - 38px);min-height:0;overflow:hidden}
 .content:has(:is(.monitor-panel,.alarm-panel))>.page-head,.content:has(:is(.monitor-panel,.alarm-panel))>.monitor-metrics{flex:none}
 :is(.monitor-panel,.alarm-panel){display:flex;flex:1;min-height:0;flex-direction:column;margin-bottom:0}
 :is(.monitor-panel,.alarm-panel)>.device-filter-head,:is(.monitor-panel,.alarm-panel)>.device-filters{flex:none}
 .monitor-panel>.monitor-results{flex:1;min-height:0;height:auto}
}
@media(max-width:640px){
 .monitor-panel{padding:18px}
 .monitor-panel .device-filters{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}
 .monitor-panel .device-filters>label:first-child{grid-column:auto}
 .monitor-panel .device-filters>label>input,.monitor-panel .monitor-dropdown,.monitor-panel .monitor-dropdown>summary{width:100%}
 .monitor-panel .device-category-menu{min-width:100%}
 .monitor-panel .device-filter-head{align-items:flex-start;flex-wrap:wrap}
 
}

/* 紧凑筛选行；名称保留给辅助技术。 */
@media(min-width:641px){.devices-panel .device-filters>label>#device-query{width:230px}}

/* 系统内部滚动条统一使用低对比度；页面标签栏继续隐藏滚动条。 */
:is(#app,#overlay) :not(.workspace-tab-list){scrollbar-width:thin;scrollbar-color:#cbd9e9 #f8fafc}
:is(#app,#overlay) :not(.workspace-tab-list)::-webkit-scrollbar{width:7px;height:7px}
:is(#app,#overlay) :not(.workspace-tab-list)::-webkit-scrollbar-track{background:#f8fafc;border-radius:8px}
:is(#app,#overlay) :not(.workspace-tab-list)::-webkit-scrollbar-thumb{background:#cbd9e9;border-radius:8px}
:is(#app,#overlay) :not(.workspace-tab-list)::-webkit-scrollbar-thumb:hover{background:#bfcfe1}

/* 设备详情中的接入信息与点位。 */
.device-access-section+.device-access-section{margin-top:24px}
.device-access-section .device-monitor-heading{margin-bottom:12px}
.device-access-table .table-wrap{overflow:auto}
.device-access-table table{min-width:720px}
.device-access-table th,.device-access-table td{white-space:nowrap}
.device-access-note{margin:10px 0 0;color:#71839a;font-size:13px;line-height:1.5}
.device-access-section>.device-monitor-empty{min-height:200px}
@media(max-width:640px){.device-access-section+.device-access-section{margin-top:20px}.device-access-section>.device-monitor-empty{min-height:170px}}
/* 设备关联视图 */
.relation-map-head>span{font-size:12px;color:#8294aa}
.relation-actions,.relation-filters,.relation-map-floors,.relation-map-legend{display:flex;align-items:center;gap:8px;flex-wrap:wrap}
.relation-filters{margin-bottom:16px}.relation-filters>label>input,.relation-filters>label>select{height:36px;min-width:160px;padding:0 10px;border:1px solid #d4deeb;border-radius:4px;color:#314b69;background:#fff}.relation-filters>label>input{min-width:240px}.relation-filters>label>input:focus,.relation-filters>label>select:focus{outline:none;border-color:var(--blue)}
.relation-graph{display:grid;gap:10px}.relation-graph-row{display:grid;grid-template-columns:minmax(180px,1fr) minmax(90px,.45fr) minmax(180px,1fr) auto;align-items:center;gap:14px;padding:14px 16px;border:1px solid #e1eaf4;border-radius:6px;background:#fbfdff}
.relation-node{display:flex;align-items:center;gap:12px;min-width:0}.relation-node>.ui-icon{width:36px;height:36px;padding:8px;box-sizing:border-box;color:#2675d7;background:#e9f2ff;border-radius:5px;flex:none}.relation-node span{display:flex;flex-direction:column;gap:5px;min-width:0}.relation-node strong{font-size:14px;overflow-wrap:anywhere}.relation-node small{font-size:12px;color:#8294aa}.relation-edge{height:1px;background:#a8bdd7;position:relative;text-align:center}.relation-edge:after{content:'';position:absolute;right:0;top:-3px;border-left:6px solid #a8bdd7;border-top:4px solid transparent;border-bottom:4px solid transparent}.relation-edge span{position:relative;top:-11px;display:inline-block;padding:3px 8px;background:#fbfdff;color:#6381a2;font-size:12px}.relation-row-actions{display:flex;align-items:center;gap:8px;white-space:nowrap}
.relation-map-head{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:12px}.relation-map-floors button{background:#fff;border:1px solid #d9e5f2;color:#536a85;border-radius:4px;padding:6px 10px;cursor:pointer}.relation-map-floors button.selected{border-color:#86b4ec;color:var(--blue);background:#eef6ff}.relation-map-canvas{height:min(62vh,650px);min-height:380px;background:#f1f7fd;border:1px solid #e0ebf7;border-radius:5px;overflow:hidden}.relation-map-canvas .floor-plan{width:100%;height:100%;display:block}.relation-map-canvas .plan-device{pointer-events:none}.relation-plan-line{stroke-width:4;stroke-linecap:round;pointer-events:none;opacity:.9}.relation-plan-meter{stroke:#287bd6}.relation-plan-sense{stroke:#16a497;stroke-dasharray:8 5}.relation-plan-control{stroke:#dd9941;stroke-dasharray:3 5}.relation-map-legend{padding:12px 2px;font-size:12px;color:#617792;gap:20px}.relation-map-legend span{display:flex;align-items:center;gap:6px}.relation-map-legend i{width:18px;border-top:3px solid #287bd6}.relation-map-legend i.sense{border-color:#16a497;border-top-style:dashed}.relation-map-legend i.control{border-color:#dd9941;border-top-style:dashed}.relation-map-missing{font-size:12px;color:#71849a}.relation-map-missing summary{cursor:pointer}.relation-map-missing li{margin:6px 0}.relation-detail-title{display:flex;align-items:center;justify-content:space-between;gap:10px;margin:0 0 20px}.relation-detail-title span{color:#71849a;font-size:12px}
@media(max-width:760px){.relation-map-head{align-items:flex-start;flex-direction:column}.relation-graph-row{grid-template-columns:1fr;gap:10px}.relation-edge{width:1px;height:24px;margin-left:17px}.relation-edge:after{right:-3px;top:auto;bottom:0;border:4px solid transparent;border-top:6px solid #a8bdd7;border-bottom:0}.relation-edge span{top:0;left:8px;white-space:nowrap}.relation-row-actions{justify-content:flex-end}.relation-map-canvas{min-height:300px}}

/* 多楼层平面图及跨层连线 */
.relation-map-canvas{height:min(68vh,760px);min-height:360px;overflow:auto;background:#f4f8fc;padding:14px}
.relation-map-grid{position:relative;display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:16px;min-width:0}
.relation-floor-card{min-width:0;border:1px solid #dce8f5;border-radius:5px;background:#fff;overflow:hidden}
.relation-floor-card h3{margin:0;padding:9px 12px;border-bottom:1px solid #e5edf6;font-size:13px;color:#395675}
.relation-floor-plan{aspect-ratio:1000/640;background:#eff6fd}
.relation-map-canvas .relation-floor-plan .floor-plan{width:100%;height:100%}
.relation-map-lines{position:absolute;inset:0;width:100%;height:100%;z-index:2;overflow:visible;pointer-events:none}
.relation-map-lines .relation-plan-line{stroke-width:2;vector-effect:non-scaling-stroke}
@media(max-width:900px){.relation-map-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:600px){.relation-map-grid{grid-template-columns:1fr}}

/* 楼层开关与连续平面图 */
.relation-map-layout{display:grid;grid-template-columns:160px minmax(0,1fr);height:min(68vh,760px);min-height:360px;border:1px solid #e0ebf7;border-radius:5px;overflow:hidden;background:#f4f8fc}
.relation-floor-controls{min-width:0;overflow:auto;background:#fff;border-right:1px solid #e0ebf7;padding:14px 10px}
.relation-floor-controls h3{margin:0 6px 10px;font-size:13px;color:#344f6f}
.relation-floor-switch{display:flex;align-items:center;justify-content:space-between;gap:8px;width:100%;min-height:34px;padding:5px 6px;border:0;border-radius:4px;background:transparent;color:#536b87;text-align:left;font-size:12px;cursor:pointer}
.relation-floor-switch:hover{background:#f2f7fd}.relation-floor-switch:focus-visible{outline:2px solid var(--blue);outline-offset:-2px}.relation-floor-switch span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.relation-floor-switch i{position:relative;flex:none;width:26px;height:15px;border-radius:9px;background:#cad4df}.relation-floor-switch i:after{content:'';position:absolute;top:2px;left:2px;width:11px;height:11px;background:#fff;border-radius:50%;transition:transform .15s}.relation-floor-switch[aria-checked=true] i{background:var(--blue)}.relation-floor-switch[aria-checked=true] i:after{transform:translateX(11px)}
.relation-map-layout .relation-map-canvas{height:100%;min-height:0;border:0;border-radius:0;padding:12px 18px;overflow:auto}
.relation-map-grid{display:block;max-width:100%;min-height:100%}
.relation-floor-row{min-width:0;padding:4px 0 16px}
.relation-floor-label{display:flex;align-items:center;gap:10px;min-height:26px;padding:0 12px;color:#3b5879;font-size:13px}
.relation-floor-plan{aspect-ratio:1000/640;background:transparent}
.relation-building-row{padding:4px 12px 14px}
.relation-building-target,.relation-floor-target{display:inline-block;padding:3px 9px;border:1px solid #b6d2f1;border-radius:4px;color:#3572b8;background:#fff;font-size:12px}
.relation-space-anchor{fill:#fff;stroke:#2778d4;stroke-width:4;pointer-events:none}
.relation-map-lines .relation-plan-line{fill:none;stroke-linejoin:round}
.relation-all-hidden{padding:35px;text-align:center;color:#8193a9;font-size:13px}
@media(max-width:600px){.relation-map-layout{grid-template-columns:105px minmax(0,1fr)}.relation-floor-controls{padding:10px 5px}.relation-map-layout .relation-map-canvas{padding:8px}.relation-floor-switch{gap:4px}}

/* 多楼层共用一张可缩放、平移的网格画布。 */
.relation-map-layout{display:block;position:relative}
.relation-map-layout .relation-map-canvas{position:relative;width:100%;height:100%;padding:0;overflow:hidden;touch-action:none;cursor:grab;background-color:#f0f7ff;background-image:linear-gradient(#d6e8f866 1px,transparent 1px),linear-gradient(90deg,#d6e8f866 1px,transparent 1px)}
.relation-map-layout .relation-map-canvas.is-panning{cursor:grabbing}
.relation-map-grid{position:absolute;top:0;left:0;width:900px;max-width:none;min-height:0;transform-origin:0 0;will-change:transform}
.relation-map-canvas .floor-plan{background:transparent;cursor:inherit}
.relation-map-canvas .relation-floor-controls{position:absolute;z-index:5;top:12px;left:12px;width:144px;max-height:calc(100% - 24px);padding:10px;border:1px solid #dae6f3;border-radius:5px;background:#fffffff2;box-shadow:0 3px 14px #32567818;overflow:auto;overscroll-behavior:contain;cursor:default;touch-action:pan-y}
.relation-map-tools{position:absolute;right:12px;bottom:12px;z-index:5;display:flex;align-items:center;gap:1px;padding:3px;background:#fffffff2;border:1px solid #dae6f3;border-radius:5px;box-shadow:0 3px 14px #32567818;cursor:default}
.relation-map-tools button{min-width:30px;min-height:30px;border:0;background:transparent;padding:2px;color:#4d6d91;font-size:17px}.relation-map-tools button:hover{background:#edf5ff}.relation-map-scale{min-width:42px;text-align:center;font-size:12px;color:#607c9a}
.relation-map-hint{position:absolute;right:12px;top:12px;z-index:4;padding:4px 8px;border-radius:4px;background:#ffffffc9;color:#6e86a1;font-size:12px;pointer-events:none}
@media(max-width:600px){.relation-map-canvas .relation-floor-controls{width:112px;top:8px;left:8px;padding:7px}.relation-map-hint{display:none}}

/* 设备关系逻辑画布 */
.relation-logic-canvas{position:relative;height:min(68vh,680px);min-height:380px;overflow:hidden;border:1px solid #dfe8f3;border-radius:5px;background-color:#fbfdff;background-image:radial-gradient(#dce7f3 1px,transparent 1px);background-size:18px 18px;cursor:grab;touch-action:none}
.relation-logic-canvas.is-panning{cursor:grabbing}
.relation-logic-world{position:absolute;top:0;left:0}
.relation-logic-lines{position:absolute;inset:0;width:100%;height:100%;overflow:visible;pointer-events:none}
.logic-edge-hit{cursor:pointer;fill:none;stroke:transparent;stroke-width:12;stroke-linecap:round;stroke-linejoin:round;pointer-events:stroke}
.logic-edge{cursor:pointer;pointer-events:stroke;fill:none;stroke-width:1.15;vector-effect:non-scaling-stroke;stroke-linecap:round;stroke-linejoin:round}.logic-meter{stroke:#287bd6}.logic-sense{stroke:#16a497}.logic-control{stroke:#9663df}.logic-edge.is-ended{stroke-dasharray:6 5;opacity:.55}
.relation-kind[data-kind="meter"]{--kind-color:#287bd6}
.relation-kind[data-kind="sense"]{--kind-color:#16a497}
.relation-kind[data-kind="control"]{--kind-color:#9663df}
.status.relation-kind{background:color-mix(in srgb,var(--kind-color) 12%,white);color:color-mix(in srgb,var(--kind-color) 72%,black)}
.logic-node{position:absolute;display:flex;align-items:center;gap:9px;width:var(--card-width);height:var(--card-height);padding:4px 10px;border:1px solid #afcff2;border-radius:7px;background:#f4f9ff;color:#17395c;box-shadow:0 2px 8px #3256780d;pointer-events:none}
.logic-node-space{border-color:#bfd9e8;background:#f7fbfd}.logic-node>.ui-icon{flex:none;width:25px;height:25px;color:#2475d6}.logic-node-space>.ui-icon{color:#668aa5}.logic-node span{display:flex;flex-direction:column;gap:3px;min-width:0}.logic-node strong{font-size:18px;line-height:1.2;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.logic-node small{font-size:15px;line-height:1.2;color:#7187a1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.logic-node-device{gap:5px;padding:4px 6px;min-height:0;text-align:left;pointer-events:auto;cursor:pointer}
.logic-node-device:hover:not(:disabled),.logic-node-device:focus-visible{border-color:#4282c8;background:#eaf4ff;color:#17395c;box-shadow:0 0 0 1px #4282c8}
.logic-node-device:focus-visible{outline:2px solid #1d58a2;outline-offset:2px}
.logic-node-device>.ui-icon{width:17px;height:17px;fill:currentColor;stroke:none}
.logic-node-device strong{font-size:14px;font-variant-numeric:tabular-nums}
.logic-node-device small{font-size:12px}
.logic-edge-label{position:absolute;z-index:1;translate:-50% -50%;min-height:22px;padding:1px 9px;border:0;border-radius:12px;background:#287bd6;color:#fff;font-size:14px;line-height:1.4;white-space:nowrap}.logic-label-sense{background:#16a497}.logic-label-control{background:#9663df}.logic-edge-label.is-ended{opacity:.65}.logic-edge-label:focus-visible{outline:2px solid #1d58a2;outline-offset:2px}
.logic-node.is-highlighted{border-color:#4282c8;background:#eaf4ff;box-shadow:0 0 0 1px #4282c8}
.logic-edge.is-highlighted{stroke-width:3.4;opacity:1;filter:drop-shadow(0 0 1px currentColor)}
.logic-meter.is-highlighted{stroke:#1558a4;color:#287bd660}
.logic-sense.is-highlighted{stroke:#08776c;color:#16a49760}
.logic-control.is-highlighted{stroke:#713bb0;color:#9663df60}
.relation-logic-world .logic-edge-label.is-highlighted{z-index:2;opacity:1;color:white;box-shadow:0 0 0 2px white,0 2px 5px #172d4c40}
.logic-edge-label.logic-label-meter.is-highlighted{background:#1558a4}
.logic-edge-label.logic-label-sense.is-highlighted{background:#08776c}
.logic-edge-label.logic-label-control.is-highlighted{background:#713bb0}
.relation-logic-legend{position:absolute;top:12px;right:12px;display:flex;align-items:center;gap:14px;padding:7px 10px;border:1px solid #e0e9f3;border-radius:5px;background:#fffffff2;color:#617792;font-size:12px;pointer-events:none}.relation-logic-legend span{display:flex;align-items:center;gap:5px}.relation-logic-legend i{width:16px;border-top:2px solid #287bd6}.relation-logic-legend i.sense{border-color:#16a497}.relation-logic-legend i.control{border-color:#9663df}
.relation-logic-legend b{font-weight:600;font-variant-numeric:tabular-nums}
.relation-logic-tools{position:absolute;right:12px;bottom:12px;display:flex;align-items:center;gap:2px;padding:3px;border:1px solid #d8e2ef;border-radius:8px;background:#fff;box-shadow:0 2px 8px #27446314;cursor:default}
.relation-logic-tools button{width:30px;height:30px;min-height:0;padding:0;display:grid;place-items:center;border:0;border-radius:5px;background:transparent;color:#526881}
.relation-logic-tools button:hover,.relation-logic-tools button:focus-visible{background:#edf3ff;color:var(--blue)}
.relation-logic-tools button:disabled{color:#bfbfbf;background:#f8f9fb;cursor:not-allowed}
.relation-logic-tools button:last-child{margin-left:4px;position:relative}
.relation-logic-tools button:last-child::before{content:'';position:absolute;left:-4px;height:16px;width:1px;background:#dce4ee}
.relation-logic-tools .ui-icon{width:16px;height:16px}
.relation-logic-scale{min-width:41px;text-align:center;font-size:13px;font-variant-numeric:tabular-nums;color:#344961}
.relation-logic-hint{position:absolute;bottom:18px;left:16px;color:#8a9bb0;font-size:12px;pointer-events:none}
.logic-device-frame{fill:#f1f6fc;fill-opacity:.68;stroke:#9db9d3;stroke-width:1;vector-effect:non-scaling-stroke;pointer-events:none}
.logic-structure-edge{fill:none;stroke:#9aafc4;stroke-width:1;vector-effect:non-scaling-stroke;stroke-linecap:round;stroke-linejoin:round}
.relation-logic-legend i.structure{border-color:#aabed3}
@media(max-width:600px){.relation-logic-canvas{min-height:340px}.relation-logic-legend{gap:7px;top:8px;right:8px}.relation-logic-hint{display:none}}

/* 设备关联：与设备管理统一标题、筛选和表格。 */
.access-panel{border:1px solid #dae7f6;border-radius:10px;box-shadow:0 4px 16px #3d78bd0b}
.access-panel .relation-actions{gap:10px}
.access-panel .relation-actions>.primary{min-height:40px;padding:7px 18px}
.access-panel .relation-filters{gap:14px;align-items:end;margin-bottom:22px}
.access-panel .relation-filters>label>input,.access-panel .relation-dropdown>summary{width:170px;min-width:0;height:40px;padding:8px 12px;border:1px solid #d6dee9;border-radius:5px;background-color:#fff;color:#26354a;font-size:14px;line-height:22px}
.access-panel .relation-filters>label>input{width:260px}
.access-panel .relation-dropdown{width:170px}
.access-panel .relation-dropdown>summary{display:flex;appearance:none;padding-right:34px;background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2364778e' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");background-repeat:no-repeat;background-position:right 10px center}
.access-panel .relation-dropdown>summary::after{content:none}
.access-panel .relation-dropdown .is-placeholder,.access-panel .relation-filters input::placeholder{color:#91a0b2}
.access-panel .relation-filters>label>input:hover,.access-panel .relation-dropdown>summary:hover{border-color:#8db5e6}
.access-panel .relation-filters>label>input:focus,.access-panel .relation-dropdown>summary:focus,.access-panel .relation-dropdown[open]>summary{outline:none;border-color:var(--blue);box-shadow:inset 0 0 0 1px rgb(17 106 243 / 33%)}
.access-panel .relation-dropdown .device-category-menu{z-index:30;width:100%;min-width:170px;border:1px solid #d6e2f0;border-radius:6px;background:#fff;box-shadow:0 8px 24px #17365a24}
.access-panel .relation-dropdown .device-status-option{display:block;width:100%;min-height:38px;padding:7px 10px;border:0;border-radius:4px;background:#fff;text-align:left;color:#263b53;font-size:14px}
.access-panel .relation-dropdown .device-status-option:hover,.access-panel .relation-dropdown .device-status-option.selected{background:#eef6ff;color:var(--blue)}
.access-panel .relation-dropdown .device-status-option:focus-visible{outline:2px solid var(--blue);outline-offset:-2px}
.access-panel>.table-wrap{overflow:auto;overscroll-behavior:contain}
.access-panel>.table-wrap table{min-width:820px}
.access-panel>.table-wrap th{background:#edf1f6;color:#465e7b;font-size:14px;font-weight:600}
.access-panel>.table-wrap td{font-size:14px}
@media(max-width:640px){.access-panel .relation-filters{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}.access-panel .relation-filters>.relation-views,.access-panel .relation-filters>label,.access-panel .relation-filters .device-filter-actions{grid-column:1/-1}.access-panel .relation-filters>label>input,.access-panel .relation-dropdown,.access-panel .relation-dropdown>summary{width:100%}.access-panel .relation-dropdown .device-category-menu{min-width:100%}}

/* 三种关联视图共用设备管理的卡片高度和页面底部间距。 */
.content:has(.access-panel){display:flex;flex-direction:column;min-height:0}
.content:has(.access-panel)>.page-head{flex:none}
.access-panel{display:flex;flex:1;min-height:0;flex-direction:column;margin-bottom:0}
.access-panel>.relation-filters,.access-panel>.relation-map-head,.access-panel>.relation-map-legend,.access-panel>.relation-map-missing{flex:none}
.access-panel>.table-wrap,.access-panel>.relation-logic-canvas,.access-panel>.relation-map-layout,.access-panel>.device-list-empty{flex:1;min-height:180px;height:auto}
.access-panel>.relation-map-layout .relation-map-canvas{height:100%}
.access-panel>.relation-map-missing[open]{max-height:120px;overflow:auto}
@media(min-width:641px) and (min-height:680px){
 .content:has(.access-panel){overflow:hidden}
 .access-panel>.table-wrap,.access-panel>.relation-logic-canvas,.access-panel>.relation-map-layout,.access-panel>.device-list-empty{min-height:0}
 .access-panel>.table-wrap th{position:sticky;top:0;z-index:1}
}

/* 建筑与设备四个页面的内容背景。 */
.workspace:has(>.content:is(.page-spaces,.page-devices,.page-access,.page-monitor)){
 background-color:#fff;
 background-image:linear-gradient(#ffffff4d,#ffffff4d),url('assets/building-device-content-background-v2.png');
 background-position:center,right center;
 background-size:100% 100%,cover;
 background-repeat:no-repeat;
 background-attachment:fixed;
}

/* 设备列表：名称使用常规字重，分类标签按类型区分。 */
.devices-panel tbody .device-name{font-weight:400}
.devices-panel .device-category[data-category="计量设备"]{background:#eaf2ff;color:#315e9c}
.devices-panel .device-category[data-category="用能设备"]{background:#e4f4f3;color:#216d6b}
.devices-panel .device-category[data-category="感知设备"]{background:#f1edfb;color:#6a5498}
.devices-panel .device-category[data-category="控制设备"]{background:#fdf1e4;color:#92621f}

.floor-rename-dialog .field>input,
.floor-rename-dialog .field .monitor-dropdown>summary,
:is(.devices-panel,.monitor-panel,.access-panel,.alarm-panel) .device-filters>label>input,
:is(.devices-panel,.monitor-panel,.access-panel,.alarm-panel) .device-category-dropdown>summary,
:is(.devices-panel,.monitor-panel,.access-panel,.alarm-panel) .device-filter-actions button,
.alarm-panel .operation-order-head-actions button.device-add,.operation-exception-head button.device-add,
.access-panel .relation-actions>.primary{
 height:32px;min-height:32px;padding-block:4px;line-height:22px;font-weight:400;
}
.list-page-footer{display:flex;align-items:center;justify-content:space-between;flex:none;flex-wrap:wrap;gap:8px;margin-top:16px;color:#595959;font-size:14px}
.list-page-footer>span{color:#8c8c8c}
.list-page-controls{display:flex;align-items:center;gap:8px;flex-wrap:wrap}
.list-page-controls button,.page-size-dropdown summary{height:32px;min-height:32px;padding:4px 8px;border:1px solid #d9d9d9;border-radius:4px;background:#fff;color:#262626;font-size:14px;font-weight:400}
.list-page-controls button{min-width:32px}
.list-page-controls button:hover:not(:disabled),.page-size-dropdown summary:hover,.page-size-dropdown[open] summary{border-color:var(--blue);color:var(--blue)}
.list-page-controls{margin-left:auto;justify-content:flex-end;max-width:100%}
.list-page-controls>span{width:12px;text-align:center;color:#8c8c8c}
.page-size-dropdown{position:relative;margin:0}
.page-size-dropdown summary{width:102px;display:flex;align-items:center;justify-content:space-between;padding-inline:10px;cursor:pointer;list-style:none}
.page-size-dropdown summary::-webkit-details-marker{display:none}
.page-size-dropdown summary::after{content:'';width:6px;height:6px;margin-right:2px;border:solid #737373;border-width:0 1.5px 1.5px 0;transform:translateY(-2px) rotate(45deg)}
.page-size-dropdown[open] summary::after{transform:translateY(2px) rotate(225deg)}
.page-size-dropdown fieldset{position:absolute;bottom:calc(100% + 4px);right:0;z-index:40;width:100%;min-width:0;margin:0;padding:4px;border:1px solid #d9d9d9;border-radius:4px;background:#fff;box-shadow:0 4px 14px #18345620;overflow:auto}
.page-size-dropdown.opens-down fieldset{bottom:auto;top:calc(100% + 4px)}
.page-size-dropdown label{position:relative;display:block;margin:0;cursor:pointer}
.page-size-dropdown input{position:absolute;opacity:0;width:1px;height:1px}
.page-size-dropdown label span{display:block;padding:7px 8px;border-radius:3px;font-size:14px;color:#262626}
.page-size-dropdown label:hover span,.page-size-dropdown input:checked+span{background:#edf2ff;color:var(--blue)}
.page-size-dropdown input:focus-visible+span,.page-size-dropdown summary:focus-visible{outline:1px solid var(--blue);outline-offset:-1px}
.list-page-controls button[aria-current=page],.list-page-controls button[aria-current=page]:hover{background:var(--blue);border-color:var(--blue);color:#fff}
.drawer .list-page-controls details{margin:0}
.list-page-controls button:disabled{background:#f8f9fb;color:#bfbfbf}
:is(.devices-panel,.monitor-panel,.access-panel,.alarm-panel) .device-category-selection{font-weight:400}
:is(.devices-panel,.monitor-panel,.access-panel,.alarm-panel,.device-info-drawer,.operation-dialog) :is(.table-wrap table,.device-info-facts table) th,:is(.devices-panel,.monitor-panel,.access-panel,.alarm-panel,.device-info-drawer,.operation-dialog) :is(.table-wrap table,.device-info-facts table) td{
 height:46px;padding:6px 12px;color:#262626;border-bottom:1px solid #edf0f4;
}
:is(.devices-panel,.monitor-panel,.access-panel,.alarm-panel,.device-info-drawer,.operation-dialog) :is(.table-wrap table,.device-info-facts table) th,:is(.devices-panel,.monitor-panel,.access-panel,.alarm-panel,.device-info-drawer,.operation-dialog) :is(.table-wrap table,.device-info-facts table) th:last-child{background:#f8f9fb}
:is(.devices-panel,.monitor-panel,.access-panel,.alarm-panel,.device-info-drawer,.operation-dialog) :is(.table-wrap table,.device-info-facts table) td{background:#fff}
:is(.devices-panel,.monitor-panel,.access-panel,.alarm-panel,.device-info-drawer,.operation-dialog) .table-wrap table tbody tr:hover td{background:#f5f8ff}
:is(.devices-panel,.monitor-panel,.access-panel,.alarm-panel,.device-info-drawer,.operation-dialog) :is(.table-wrap table,.device-info-facts table) .device-name{color:inherit;font-weight:400}
:is(.devices-panel,.monitor-panel,.access-panel,.alarm-panel,.device-info-drawer,.operation-dialog) :is(.table-wrap table,.device-info-facts table) .device-category,.floor-direct-device>.status,:is(.devices-panel,.monitor-panel,.access-panel,.alarm-panel,.device-info-drawer,.operation-dialog) :is(.table-wrap table,.device-info-facts table) .status{
 min-height:22px;padding:2px 8px;line-height:18px;border-radius:4px;
}
:is(.devices-panel,.monitor-panel,.access-panel,.alarm-panel,.device-info-drawer,.operation-dialog) :is(.table-wrap table,.device-info-facts table) td button.text{min-height:28px;color:var(--blue);font-weight:400}

/* SVG 筛选栏规格，窄屏沿用双列布局。 */
:is(.devices-panel,.monitor-panel,.access-panel,.alarm-panel) .device-filters{
 --filter-width:200px;
 gap:8px;
}
:is(.devices-panel,.monitor-panel,.access-panel,.alarm-panel) .device-filters>label>input,
:is(.devices-panel,.monitor-panel,.access-panel,.alarm-panel) .device-filters .device-category-dropdown,
:is(.devices-panel,.monitor-panel,.access-panel,.alarm-panel) .device-filters .device-category-dropdown>summary,
.devices-panel .device-filters>label>#device-query{
 width:var(--filter-width);min-width:0;border-radius:4px;
}
.floor-rename-dialog .field>input:not(:hover):not(:focus),
:is(.devices-panel,.monitor-panel,.access-panel,.alarm-panel) .device-filters>label>input:not(:hover):not(:focus),
:is(.devices-panel,.monitor-panel,.access-panel,.alarm-panel) .device-filters details:not([open])>summary:not(:hover):not(:focus){
 border-color:#d9d9d9;
}
:is(.devices-panel,.monitor-panel,.access-panel,.alarm-panel) .device-filters .device-filter-actions button,
.alarm-panel .operation-order-head-actions button.device-add,.operation-exception-head button.device-add{
 font-size:14px;width:60px;padding-inline:3px;border-radius:4px;white-space:nowrap;gap:4px;
 border-color:#d9d9d9;
}
:is(.devices-panel,.monitor-panel,.access-panel,.alarm-panel) .device-filters .device-filter-actions button.primary,
.alarm-panel .operation-order-head-actions button.device-add,.operation-exception-head button.device-add.primary{
 width:80px;min-width:80px;background:var(--blue);border-color:var(--blue);color:white;
}
.devices-panel .device-filter-actions,.access-panel .relation-filters .device-filter-actions{flex:1 0 auto}
.access-panel .relation-filters .device-filter-actions button.relation-add{width:auto;margin-inline-start:auto;padding-inline:14px}
.devices-panel .device-filters .device-filter-actions .device-add:disabled,.alarm-panel .operation-order-head-actions button:disabled{
 width:auto;margin-inline-start:auto;padding-inline:12px;color:#9aa8b9;background:#f4f6f9;border-color:#e1e8f0;opacity:1;cursor:not-allowed;
}
.devices-panel .table-wrap table td button.text:disabled{color:#9aa8b9;background:transparent;opacity:1;cursor:not-allowed}
@media(max-width:640px){
 :is(.devices-panel,.monitor-panel,.access-panel,.alarm-panel) .device-filters{--filter-width:100%}
}

.drawer .record-filters details{position:relative;margin:0}
.record-filters .record-status{width:200px}
.record-filters .record-status summary,.record-filters .record-range summary{display:flex;align-items:center;gap:8px;height:32px;padding:4px 10px;border:1px solid #d9d9d9;border-radius:4px;list-style:none}
.record-filters summary::-webkit-details-marker{display:none}
.record-filters details>summary::after{content:'';width:6px;height:6px;border:solid #64778e;border-width:0 1.5px 1.5px 0;transform:rotate(45deg);margin-right:3px}
.record-filters .is-placeholder{color:#91a0b2}
.record-filters details[open]>summary,.record-filters summary:focus-visible{outline:0;border-color:var(--blue);box-shadow:inset 0 0 0 1px rgb(17 106 243 / 33%)}
.record-status .device-category-menu{width:100%;padding:6px;border-radius:6px;box-shadow:0 8px 24px #17365a24}
.record-status .device-category-menu button{height:38px;padding:7px 10px}
.record-range summary{max-width:min(330px,80vw);color:#53677e}
.record-range summary span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
@media(max-width:640px){.record-range .trend-calendar{right:0;max-width:calc(100vw - 32px)}.record-filters .record-status{width:auto}}

.record-filters .record-range>summary{justify-content:space-between;width:200px;color:#26354a;font-size:14px;font-weight:400}
.record-filters details>summary::after{flex:none}
.record-range :is(.calendar-selection,.clock-footer){display:flex;align-items:flex-end;justify-content:flex-end;gap:8px;padding-top:8px}
.record-range .calendar-selection>span{flex:1;min-width:0;align-self:center}
.record-range [data-period-clear]{flex:none;margin-left:auto;white-space:nowrap}
.record-clock .calendar-range-header input{width:100%;min-width:0;font-size:13px;font-variant-numeric:tabular-nums}
.record-clock [data-clock-input]:focus{outline:none;border-color:var(--blue);box-shadow:inset 0 0 0 1px rgb(17 106 243 / 33%)}
.record-clock [data-clock-input][aria-invalid=true]{border-color:var(--danger)}
.record-clock [data-clock-input][aria-invalid=true]:focus{border-color:var(--danger);box-shadow:inset 0 0 0 1px var(--danger)}
.clock-list{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));column-gap:8px;max-height:160px;overflow-y:auto}
.clock-list button{font-variant-numeric:tabular-nums}
.record-filters :is(.clock-footer,.calendar-selection) button{padding-inline:10px}
.clock-footer [data-clock-value]{color:var(--blue);font-size:13px}
.clock-list button[aria-pressed=true]{color:var(--blue);background:#e8efff}
.clock-list button:disabled{color:#a8b1bd;background:transparent;cursor:not-allowed}
@media(max-width:640px){.record-filters .record-range>summary{width:144px}}

/* 主操作的交互状态与全局主题色保持一致。 */
:is(.devices-panel,.monitor-panel,.access-panel) .device-filters .device-filter-actions button.primary:hover:not(:disabled){background:color-mix(in srgb, var(--blue), white 12%);border-color:color-mix(in srgb, var(--blue), white 12%)}
:is(.devices-panel,.monitor-panel,.access-panel) .device-filters .device-filter-actions button.primary:active:not(:disabled),button.primary:active:not(:disabled){background:color-mix(in srgb, var(--blue), black 12%);border-color:color-mix(in srgb, var(--blue), black 12%)}
button.primary:disabled{color:#9aa8b9;background:#f4f6f9;border-color:#e1e8f0;cursor:not-allowed}

.access-panel .table-wrap td button.text:disabled{color:#9aa8b9;background:transparent;opacity:1;cursor:not-allowed}
.access-panel .device-filters .device-filter-actions button.relation-add:disabled{color:#9aa8b9;background:#f4f6f9;border-color:#e1e8f0;cursor:not-allowed}

/* 关联详情：正文从关联方向读到业务点位。 */
.relation-flow { --edge: #287bd6; }
.relation-flow[data-kind=sense] { --edge: #16a497; }
.relation-flow[data-kind=control] { --edge: #9663df; }
.relation-flow-canvas {
 display:grid; grid-template-columns:minmax(0,1fr) clamp(88px,8vw,132px) minmax(0,1fr);
 padding:16px; background:#f1f6fd; border:1px solid #dce8f6; border-radius:8px;
}
.relation-flow-arrow {position:relative; align-self:center; height:2px; background:var(--edge); color:var(--edge);}
.relation-flow-arrow::before {content:""; position:absolute; left:0; top:-4px; width:8px; height:8px; box-sizing:content-box; border:1px solid currentColor; border-radius:50%; background:white;}
.relation-flow-arrow::after {content:""; position:absolute; right:0; top:-4px; border:5px solid transparent; border-right:0; border-left:7px solid currentColor;}
.relation-flow-label,.relation-flow-arrow small {position:absolute; left:50%; white-space:nowrap;}
.relation-flow-label {top:50%; transform:translate(-50%,-50%); border:1px solid currentColor; border-radius:12px; padding:1px 12px; background:white; font-size:13px; font-weight:600; line-height:20px;}
.relation-flow-arrow small {top:17px; transform:translateX(-50%); color:#576d85; font-size:12px;}
.relation-flow-node {display:flex; flex-direction:column; min-width:0; padding:12px 14px; border:1px solid #cfdeee; border-radius:7px; background:white; overflow-wrap:anywhere;}
.relation-node-role {color:#526b83; font-size:13px; font-weight:600; margin-bottom:12px;}
.relation-node-identity {display:flex; align-items:center; gap:10px; min-width:0;}
.relation-entity-icon {display:grid; place-items:center; flex:none; width:38px; height:38px; border-radius:7px; color:#176bcc; background:#eaf3ff;}
.relation-entity-icon .ui-icon {width:23px; height:23px;}
.relation-node-identity strong {display:block; color:#17324e; font-size:16px; line-height:1.4; font-weight:600;}
.relation-node-identity small,.relation-node-location {color:#566d82; font-size:13px; line-height:1.5;}
.relation-node-identity small {display:block; margin-top:2px;}
.relation-node-location {display:flex; align-items:flex-start; gap:6px; border-top:1px solid #e2eaf4; padding-top:8px;}
.relation-flow-node>.relation-node-identity {flex:1; padding-bottom:10px;}
.relation-node-location .ui-icon {flex:none; width:15px; height:15px; margin-top:2px;}
.relation-target-list {display:grid; gap:12px; margin:0; padding:0; list-style:none;}
.relation-target-list .relation-node-location {margin-top:8px;}
.relation-point-table table { min-width: 0; }
.relation-point-table :is(th,td) { white-space: normal; overflow-wrap: anywhere; }
.relation-point-table td:nth-child(3) { font-variant-numeric: tabular-nums; }
.relation-read-drawer .relation-history { margin-top: 24px; }
.relation-points-empty { margin: 0; padding: 15px; border: 1px dashed #cddae7; border-radius: 5px; background: #fafcfe; color: #60748a; font-size: 14px; }
.relation-history { border-top: 1px solid var(--line); padding-top: 14px; }
.relation-history summary { cursor: pointer; color: #53687d; }
.relation-history article { margin-top: 14px; }
.relation-history h4 { margin: 0 0 8px; font-size: 14px; }
@media (max-width: 600px) {
 .relation-flow-canvas {grid-template-columns:minmax(0,1fr); grid-template-rows:auto 48px auto; padding:10px;}
 .relation-flow-arrow {align-self:stretch; justify-self:center; width:2px; height:auto;}
 .relation-flow-arrow::before {left:-4px; top:0;}
 .relation-flow-arrow::after {inset:auto auto 0 -4px; border:solid transparent; border-width:7px 5px 0; border-top-color:currentColor;}
 .relation-flow-arrow small {top:50%; left:34px; transform:translateY(-50%);}
 .relation-read-drawer .device-monitor-heading { flex-wrap: wrap; gap: 4px 8px; }
 .relation-point-table table { table-layout: fixed; }
 .relation-point-table :is(th,td) { white-space: normal; word-break: normal; }
 .relation-point-table th:first-child { width: 22%; }
 .relation-point-table .table-wrap:has(th:nth-child(4)) th:nth-child(3) { width: 24%; }
 .relation-point-table .table-wrap:has(th:nth-child(4)) th:last-child { width: 16%; }
 .relation-read-drawer .relation-point-table .table-wrap:has(th:nth-child(4)) :is(th,td):nth-child(3) { white-space: nowrap; }
}

/* 楼层图使用相同的照明面、空调点和计量表符号。 */
svg.survey-plan { aspect-ratio: 1672/941; }
#space-plan:has(.survey-plan) { background: #f8fafd; }
.survey-plan .lighting-zone .plan-region, #space-plan .lighting-zone .plan-region {
 fill: #7294ad; fill-opacity: .13; stroke: #627f94; stroke-width: 3; stroke-linejoin: round;
}
.survey-plan .lighting-zone:is(.is-selected,:hover,:focus-visible) .plan-region,
#space-plan .lighting-zone:is(.is-selected,:hover,:focus-visible) .plan-region {
 fill: #609be2; fill-opacity: .28; stroke: #246cb5; stroke-width: 4;
}
/* 地图缩放时分隔线保持可辨识，焦点沿实际区域轮廓绘制。 */
#space-plan .lighting-zone .plan-region {
 stroke: #496e89; stroke-width: 2px; vector-effect: non-scaling-stroke;
}
#space-plan .lighting-zone:is(.is-selected,:hover,:focus-visible) .plan-region {
 stroke: #1967b6; stroke-width: 3px;
}
#space-plan .lighting-zone:focus-visible .plan-area-caption rect {
 stroke: #1967b6; stroke-width: 2px; vector-effect: non-scaling-stroke;
}
.plan-area-caption { pointer-events: none; }
.plan-area-caption rect { fill: #fff; stroke: #687e90; stroke-width: 2; }
.survey-plan .lighting-zone .plan-region-label, #space-plan .lighting-zone .plan-region-label {
 fill: #364e62; stroke: none; font-size: 24px; font-weight: 650; text-anchor: middle; dominant-baseline: central;
}
/* 图标标示设备位置，外置标签显示设备台账编号。 */
.survey-plan .plan-device { --marker-ink: #1c66ad; }
.survey-plan .plan-device.plan-module-marker { --marker-ink: #11695f; }
.survey-plan .plan-device .plan-icon-disc { fill: var(--marker-ink); stroke: white; stroke-width: 3; }
.survey-plan .plan-device-glyph { fill: white; stroke: none; pointer-events: none; }
.survey-plan .plan-device-leader { stroke: var(--marker-ink); stroke-width: 2.5; pointer-events: none; }
.survey-plan .plan-module-marker[data-modules][role="button"] { pointer-events: bounding-box; }
.survey-plan .plan-device text.plan-device-label {
 fill: #163959; stroke: #fff; stroke-width: 7; stroke-linejoin: round; paint-order: stroke;
 font: 600 26px/1 Arial, "Microsoft YaHei", sans-serif; text-anchor: middle; dominant-baseline: central;
}
.survey-plan .plan-module-marker text.plan-device-label { fill: #13594f; }
.survey-plan .plan-device[role="button"]:focus { outline: none; }
.survey-plan .plan-device:is(.selected,:hover,:focus-visible) .plan-icon-disc {
 fill: color-mix(in srgb, var(--marker-ink) 80%, #123856);
 stroke: #71b4ff; stroke-width: 4;
}
.survey-plan .plan-device:focus-visible .plan-icon-disc { stroke: #1671cf; stroke-width: 2px; vector-effect: non-scaling-stroke; }
.floor-map-legend {
 position: absolute; top: 10px; left: 39%; z-index: 1; display: flex; gap: 12px; align-items: center;
 padding: 5px 8px; border: 1px solid #d4e0ec; border-radius: 5px; background: #ffffffed;
 color: #445c72; font-size: 12px; line-height: 1.35; pointer-events: none;
}
.floor-map-legend span { display: inline-flex; align-items: center; gap: 5px; white-space: nowrap; }
.floor-map-legend i { display: inline-block; width: 11px; height: 11px; }
.floor-map-legend .area-symbol { border: 1px solid #627f94; background: #e6ecf0; }
.floor-map-legend :is(.ac-symbol, .meter-symbol) {
 display: inline-grid;
 place-items: center;
 width: 16px;
 height: 16px;
 border-radius: 50%;
 color: white;
}
.floor-map-legend .ac-symbol { background: #1c66ad; }
.floor-map-legend .meter-symbol { background: #11695f; }
.floor-map-legend i .mdi-icon { width: 12px; height: 12px; }
@media (max-width: 640px) {
 .floor-map-legend { top: 4px; right: 60px; left: auto; gap: 6px; padding: 3px 5px; font-size: 10px; }
 .floor-map-legend span { gap: 3px; }
 .floor-map-legend i { width: 8px; height: 8px; }
 .floor-map-legend :is(.ac-symbol, .meter-symbol) { width: 14px; height: 14px; }
 .floor-map-legend i .mdi-icon { width: 10px; height: 10px; }
}

@media (max-width: 359px) {
 #space-plan { padding-top: 24px; }
 .floor-map-legend { top: 3px; left: 5px; right: auto; }
}

.access-panel > .table-wrap:has(.relation-source-device) {
  min-width: 0;
  max-width: 100%;
  overflow-x: auto;
}
.relation-source-device { white-space: nowrap; }
.relation-source-code { color: var(--muted); font-variant-numeric: tabular-nums; }

.access-panel .relation-list-target { display: block; max-width: 20em; white-space: normal; overflow-wrap: anywhere; }

/* 设备监测概览 */
.monitor-metrics {
  display: grid;
  grid-template-columns: 1fr 2fr 1.6fr 1.1fr;
  gap: 12px;
  margin: 0 0 16px;
  padding: 0;
  border: 0;
}
.monitor-stat {
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: stretch;
  gap: 0;
  min-width: 0;
  height: 128px;
  padding: 12px 16px;
  border: 1px solid #dce6f4;
  border-radius: 10px;
  color: #202e42;
  background: linear-gradient(120deg, #fff, #fbfdff);
  box-shadow: 0 3px 9px rgb(31 91 170 / 4%);
  text-align: left;
}
.monitor-stat-heading { display: flex; align-items: center; gap: 9px; font-size: 15px; font-weight: 600; line-height: 30px; white-space: nowrap; }
.monitor-stat-icon { display: grid; place-items: center; flex: none; width: 30px; height: 30px; border-radius: 8px; color: #1475ff; background: linear-gradient(135deg, #f5f9ff, #eaf2ff); }
.monitor-stat-icon .ui-icon { width: 22px; height: 22px; }
.monitor-stat-value { display: block; font-size: 28px; line-height: 32px; font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.monitor-stat-value small { margin-inline-start: 6px; color: #354154; font-size: 14px; font-weight: 400; }
.monitor-stat-total { color: #202e42; background: linear-gradient(125deg, #f4f9ff 0%, #eaf3ff 55%, #dfecff 100%); }
.monitor-stat-total .monitor-stat-icon { color: var(--blue); background: #dfedff; box-shadow: 0 3px 8px rgb(23 90 190 / 4%); }
.monitor-stat-total>.monitor-stat-value { color: var(--blue); }
.monitor-stat-total>.monitor-stat-value,.monitor-stat-abnormal>.monitor-stat-value { align-self: center; font-size: 38px; line-height: 44px; }
.monitor-stat-total .monitor-stat-value small { color: #202e42; font-size: 16px; }
.monitor-stat-abnormal { background: linear-gradient(125deg, #fff8f8, #fcecec); }
.monitor-stat-abnormal .monitor-stat-icon { color: #e33732; background: linear-gradient(135deg, #fff0f0, #ffdddd); }
.monitor-stat-abnormal>.monitor-stat-value { color: #cd2929; }
.monitor-stat-abnormal .monitor-stat-value small { font-size: 16px; }
.monitor-stat.monitor-stat-group { padding-bottom: 8px; }
.monitor-stat-items { display: flex; gap: 8px; min-width: 0; min-height: 0; padding: 4px; border-radius: 8px; background: linear-gradient(120deg, #f8faff, #f0f5fc); }
.monitor-stat-item { position: relative; flex: 1; min-width: 0; min-height: 0; display: flex; flex-direction: column; align-items: flex-start; gap: 0; padding: 3px 14px; border: 0; border-radius: 6px; color: #202e42; background: transparent; text-align: left; box-shadow: none; }
.monitor-stat-item+.monitor-stat-item::before { content: ''; position: absolute; left: -4px; top: 12px; bottom: 10px; width: 1px; background: #d9e3f2; transition: opacity .12s ease; }
.monitor-stat-label { display: flex; align-items: center; gap: 6px; font-size: 13px; line-height: 18px; font-weight: 400; white-space: nowrap; }
.monitor-stat-label i { width: 7px; height: 7px; flex: none; border-radius: 50%; background: #a0aec0; }
.monitor-stat-item[data-tone="online"] i { background: #08ae37; }
.monitor-stat-item[data-tone="pending"] i { background: #ffb000; }
.monitor-stat-item[data-tone="running"] i { background: #08b6b2; }
.monitor-metrics :is(.monitor-stat-item,.monitor-stat-abnormal) {
  cursor: pointer;
  transform: translateY(0);
  transition: transform .12s ease-out, background-color .12s ease-out, border-color .12s ease-out, box-shadow .12s ease-out;
}
.monitor-metrics .monitor-stat-item[aria-pressed="true"] { color: var(--blue); background: #e6efff; box-shadow: inset 0 0 0 1px #91b5ee; }
.monitor-metrics .monitor-stat-item[aria-pressed="true"] small { color: inherit; }
.monitor-metrics .monitor-stat-abnormal[aria-pressed="true"] { border-color: #e68b8b; box-shadow: inset 0 0 0 1px #e68b8b; }
@media (hover: hover) and (pointer: fine) {
  .monitor-metrics .monitor-stat-item:hover {
    color: #1555b6; background: #f9fbff; transform: translateY(-1px);
    box-shadow: 0 1px 4px rgb(30 89 165 / 5%), inset 0 0 0 1px #d8e5f7;
    transition-duration: .18s;
  }
  .monitor-metrics .monitor-stat-item[aria-pressed="true"]:hover { color: var(--blue); background: #dceaff; box-shadow: 0 1px 4px rgb(30 89 165 / 5%), inset 0 0 0 1px #7ca7e8; }
  .monitor-metrics .monitor-stat-item:hover::before,.monitor-metrics .monitor-stat-item:hover+.monitor-stat-item::before { opacity: 0; }
  .monitor-metrics .monitor-stat-abnormal:hover {
    color: #202e42; border-color: #b8c8dc; background: linear-gradient(125deg, #fff8f8, #fcecec);
    transform: translateY(-2px); box-shadow: 0 5px 14px rgb(31 55 85 / 10%); transition-duration: .18s;
  }
  .monitor-metrics .monitor-stat-abnormal[aria-pressed="true"]:hover { border-color: #df7777; box-shadow: 0 5px 14px rgb(31 55 85 / 10%), inset 0 0 0 1px #df7777; }
}
.monitor-metrics .monitor-stat-item:active { transform: translateY(0); background: #dceaff; box-shadow: inset 0 0 0 1px #7ca7e8; transition-duration: .09s; }
.monitor-metrics .monitor-stat-abnormal:active { transform: translateY(0); box-shadow: inset 0 0 0 1px #9aaec7; transition-duration: .09s; }
.monitor-metrics .monitor-stat-abnormal[aria-pressed="true"]:active { border-color: #df7777; box-shadow: inset 0 0 0 1px #df7777; }
.monitor-metrics button:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) {
  .monitor-metrics :is(.monitor-stat-item,.monitor-stat-abnormal),
  .monitor-metrics :is(.monitor-stat-item,.monitor-stat-abnormal):is(:hover,:active) { transform: none; transition: none; }
  .monitor-stat-item::before { transition: none; }
}
@media (min-width: 641px) {
  :is(.monitor-panel,.alarm-panel) .device-filters { --filter-width: clamp(140px, 10.6vw, 185px); }
  :is(.monitor-panel,.alarm-panel) .device-filters > label > input[type="search"] { width: clamp(170px, 14.5vw, 240px); }
}
@media (max-width: 1250px) {
  .monitor-stat { padding-inline: 10px; }
  .monitor-stat-item { padding-inline: 8px; }
  .monitor-stat-heading { gap: 6px; font-size: 14px; }
}
@media (max-width: 1000px) {
  .monitor-metrics { grid-template-columns: 1fr 2fr; gap: 10px; }
}
@media (max-width: 640px) {
  .monitor-metrics { grid-template-columns: minmax(0,1fr); gap: 8px; margin-bottom: 12px; }
  .monitor-stat { height: 128px; padding: 12px; }
  .monitor-stat-total,.monitor-stat-abnormal { flex-direction: row; align-items: center; height: 68px; }
  .monitor-stat-total>.monitor-stat-value,.monitor-stat-abnormal>.monitor-stat-value { font-size: 32px; }
  .monitor-panel .device-filters > label:has(#monitor-query-filter) { grid-column: 1 / -1; }
}
.device-info-tags .record-issue-jump{border:0;cursor:pointer;font-weight:inherit}
.device-info-tags .record-issue-jump:hover{background:#ffdfdf;color:#962c33}
.device-info-tags .record-issue-jump:focus-visible{outline:2px solid #ab3c45;outline-offset:2px}
.device-monitor-table .record-jump-arrival>td{animation:record-jump-fade 3s ease-out}
@keyframes record-jump-fade{0%,15%{background-color:#ffe1e1}}

/* Operations list controls that have no monitor counterpart. Dropdowns, menus and options share the monitor rules above. */



.alarm-panel .device-category-selection.is-placeholder{color:#91a0b2}.alarm-panel .device-filter-actions{flex:1 0 auto}.alarm-panel :is(.device-filters .device-filter-actions,.operation-order-head-actions) button.device-add{width:auto;min-width:0;padding-inline:12px}.alarm-panel .device-filter-actions .device-add:first-of-type{margin-inline-start:auto}.alarm-panel .device-filter-actions button:nth-child(3){margin-inline-start:auto}
.alarm-panel .record-filters details{position:relative;margin:0}.alarm-panel .record-range .trend-calendar{z-index:40}.alarm-panel .device-filters>.record-filters{margin-left:0}.alarm-panel .order-views{margin:0}
:is(.alarm-panel,.operation-dialog) th{font-weight:600}.alarm-panel table th:nth-child(2),.alarm-panel table th:nth-child(3){min-width:140px}.alarm-panel table th:last-child{min-width:120px}.alarm-panel .sub{line-height:1.4}
.monitor-metrics:is(.alarm-metrics,.order-metrics){grid-template-columns:1fr 2fr 1.1fr}
@media(max-width:900px){.monitor-metrics.order-metrics,.monitor-metrics.alarm-metrics{grid-template-columns:repeat(2,minmax(0,1fr))}}

.drawer .field-error{display:block;color:#c93434;font-size:13px}.drawer [aria-invalid=true]{border-color:#c93434}

.floor-rename-dialog .drawer-body #form-error:not(:empty){position:sticky;top:0;z-index:5;background:#fff}

.order-metrics .monitor-stat-abnormal>.sub{align-self:center}

/* 运维列表沿用设备监测的弹性面板与表格规格。 */
.alarm-panel>.table-wrap,.alarm-panel>.device-list-empty{flex:1;min-height:0;max-height:none}
:is(.alarm-panel,.operation-dialog) td{font-size:14px}
.page-alarms .alarm-panel,.page-orders .alarm-panel{padding-bottom:24px}
.alarm-panel .operation-range>summary::after{content:none}
.alarm-panel .operation-order-head{height:24.3px}
.alarm-panel .flow-back{height:32px;min-height:32px}
.alarm-panel .device-filter-actions button[data-action="ext-alarm-rules"]{margin-inline-start:auto}
.device-monitor-fixed .alarm-detail-actions button{height:32px;min-height:32px}
.device-monitor-fixed .alarm-detail-actions [data-action="ext-alarm-mute"]{margin-left:auto}
.operation-empty-exceptions{color:#91a0b2;margin:12px 0}
@media(min-width:1001px) and (min-height:760px){.shell:not(.is-dashboard) .workspace>.content:has(.alarm-panel){overflow:hidden}}
.alarm-panel .operation-order-head-actions button{height:32px;min-height:32px;padding:4px 12px}
