@charset "UTF-8";

/* Map, floor and equipment all share one daylight surface. */
:root {
  --map-field: #e5e8e7;
  --map-chrome: #fcfcfb;
  --map-outline: #b9c4cc;
  --room-toolbar: 57px;
  --coordination-side: clamp(285px, 29.8vw, 486px);
}

.spatial-layout.is-campus {
  grid-template-columns: minmax(0, 1fr) clamp(300px, 26.3vw, 430px);
}
.is-campus .map-stage,
.overview-layout .map-stage {
  min-height: max(540px, calc(100dvh - var(--header)));
}
.side-inspector {
  padding: clamp(21px, 2.15vw, 37px) clamp(18px, 2vw, 32px);
}
.side-inspector h1 {
  margin-block: 8px;
  font-size: clamp(28px, 2.45vw, 40px);
}
.object-context {
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 13px;
}
.side-inspector .status-line {
  justify-content: flex-start;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 7px;
}
.side-inspector .facts {
  margin: 18px 0 24px;
  padding-top: 1px;
  border-top: 1px solid var(--line);
}
.side-inspector .facts > div:last-child {
  border-bottom: 0;
}
.floor-picker {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 7px;
  margin: 13px 0 22px;
}
.floor-picker button {
  min-height: 32px;
  padding: 3px 0;
  border: 1px solid var(--line-strong);
  border-radius: 4px;
  background: var(--paper);
  color: var(--muted);
  font-size: 13px;
  font-weight: 610;
}
.floor-picker button:hover {
  color: var(--blue);
  border-color: #a0b3ed;
}
.floor-picker button.selected,
.floor-picker button[aria-pressed="true"] {
  color: var(--blue);
  border-color: #708dec;
  background: var(--blue-light);
}
.room-list {
  margin-bottom: 20px;
  border-top: 1px solid var(--line);
}
.room-list > :is(a, button) {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 9px;
  width: 100%;
  min-height: 41px;
  padding: 8px 3px;
  border-bottom: 1px solid var(--line);
  color: var(--ink);
  text-align: left;
}
.room-list > :is(a, button):hover {
  background: #f6f8fc;
  text-decoration: none;
}
.room-list > :is(a, button):focus-visible {
  outline-offset: -2px;
}
.room-list > :is(a, button) span {
  text-align: right;
  color: var(--muted);
  font-size: 13px;
}
.room-list > button[aria-pressed="true"] {
  background: var(--blue-light);
  color: var(--blue);
}
.room-list > a span.room-notice,
.device-actions .room-notice {
  color: var(--amber);
}
.room-list .room-availability[data-availability="free"] {
  color: var(--green);
}
.room-list .room-availability[data-availability="busy"] {
  color: var(--blue);
}
.section-title button[data-action="toggle-free-rooms"] {
  min-height: 28px;
  padding: 3px 8px;
  font-size: 12px;
}
.section-title button[data-action="toggle-free-rooms"][aria-pressed="true"] {
  border-color: #708dec;
  background: var(--blue-light);
  color: var(--blue);
}
@media (width > 760px) {
  .is-campus .side-inspector .room-list {
    max-height: 222px;
    overflow-y: auto;
    scrollbar-gutter: stable;
  }
}
.object-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px 18px;
  padding-top: 15px;
  border-top: 1px solid var(--line);
}

.map-stage {
  background: var(--map-field);
}
.map-stage:has(.world-ready) .map-svg,
.floor-panel:has(.world-ready) .floor-svg {
  visibility: hidden;
}
.map-stage:has(.world-ready) .map-key {
  display: none;
}
.world-slot,
.world-content,
.world-canvas,
.world-labels {
  position: absolute;
  inset: 0;
}
.world-slot {
  z-index: 1;
  isolation: isolate;
  overflow: hidden;
}
.world-slot:not(.world-ready):not([data-world-pending]):not([data-world-error]) {
  display: none;
}
.world-slot:not(.world-ready),
.world-labels {
  pointer-events: none;
}
.world-content {
  visibility: hidden;
}
.world-ready .world-content {
  visibility: visible;
}
.world-canvas canvas {
  display: block;
  width: 100%;
  height: 100%;
  cursor: grab;
  touch-action: none;
}
.world-canvas canvas:active {
  cursor: grabbing;
}
.world-labels {
  overflow: hidden;
}
.world-label {
  position: absolute;
  top: 0;
  left: 0;
  display: flex;
  align-items: center;
  gap: 5px;
  margin: -10px 0 0 -5px;
  padding: 1px 2px 1px 0;
  color: var(--ink);
  font-size: 12px;
  line-height: 1.3;
  white-space: nowrap;
  pointer-events: auto;
}
.world-label i {
  width: 9px;
  height: 9px;
  flex: none;
  border: 1px solid #fff;
  border-radius: 50%;
  background: #69877a;
}
.world-label span {
  padding: 3px 6px;
  border: 1px solid var(--map-outline);
  border-radius: 4px;
  background: #fcfcfaf2;
  font-weight: 620;
  transition: background .14s, color .14s, border-color .14s;
}
.world-label:hover span,
.world-label:focus-visible span {
  color: var(--blue);
  border-color: #8fa4e8;
  background: #fff;
}
.world-label.chosen i {
  background: var(--blue);
}
.world-label.chosen span {
  border-color: #8498de;
  color: #173ba6;
  background: #f6f8ff;
}
.world-label.room {
  margin-left: -14px;
  font-size: 10px;
}
.world-label.room i {
  display: none;
}
.world-label.room span {
  padding: 2px 4px;
  border-color: #bec8ca;
}
.world-label.device i {
  background: #1e8a70;
}
.world-label.device span {
  border-color: #a8b8bf;
  color: #263743;
}
.world-label.device.chosen span {
  color: #fff;
  border-color: #fff;
  background: var(--blue);
}
[data-world-pending]::after,
[data-world-error]::after {
  position: absolute;
  z-index: 4;
  right: 16px;
  bottom: 42px;
  padding: 7px 10px;
  border: 1px solid var(--map-outline);
  border-radius: 4px;
  color: #3f4b54;
  background: var(--map-chrome);
  font-size: 12px;
  pointer-events: none;
}
[data-world-pending]::after {
  content: '正在加载三维地图';
}
[data-world-error]::after {
  content: '三维地图暂不可用';
}
.asset-stage[data-world-pending]::after {
  content: '正在加载设备';
}
.asset-stage[data-world-error]::after {
  content: '暂时无法显示设备';
}
.map-tools,
.map-controls,
.map-view-selector,
.map-key,
.attribution {
  z-index: 3;
  border-color: var(--map-outline);
  background: var(--map-chrome);
  color: var(--ink);
}
.map-tools,
.map-controls {
  box-shadow: 0 1px 3px #32414a15;
}
.map-tools {
  top: 19px;
  left: 21px;
  max-width: calc(100% - 85px);
}
.map-search input {
  width: clamp(122px, 17vw, 268px);
}
.map-search input::placeholder {
  color: var(--muted);
}
.map-tabs button {
  color: var(--ink);
  white-space: nowrap;
}
.map-tabs .selected {
  color: var(--blue);
  border-color: var(--blue);
}
.map-controls {
  top: 19px;
  right: 18px;
}
.map-view-selector {
  position: absolute;
  bottom: 16px;
  left: 21px;
  display: flex;
  gap: 2px;
  padding: 3px;
  border: 1px solid var(--map-outline);
  border-radius: 5px;
}
.map-view-selector button {
  min-height: 28px;
  padding: 3px 9px;
  border-radius: 3px;
  font-size: 12px;
  font-weight: 620;
  white-space: nowrap;
}
.map-view-selector button:hover {
  background: #f0f3f7;
}
.map-view-selector .current,
.map-view-selector .current:hover {
  color: #fff;
  background: var(--blue);
}
.map-stage:not(:has(.world-ready)) .map-key {
  bottom: 57px;
}
.attribution {
  max-width: 76%;
  padding: 3px 6px;
  border: 0;
  color: #404a51;
  background: #ffffffe0;
  text-align: right;
}
.attribution a {
  color: inherit;
}

/* Keep the camera and room controls in the same pane during a drill down. */
.room-page {
  max-width: none;
  padding: 0;
}
.room-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px 12px;
  min-height: var(--room-toolbar);
  padding: 9px clamp(15px, 2vw, 32px);
  border-bottom: 1px solid var(--line-strong);
}
.room-toolbar .breadcrumb {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}
.room-toolbar-actions,
.room-toolbar .heading-controls {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}
.room-page .room-layout {
  border: 0;
}
.room-page .map-room {
  position: relative;
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.floor-panel {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  background: var(--map-field);
}
.room-page .floor-panel {
  flex: 1 0 470px;
  min-height: min(59dvh, 540px);
}
.floor-panel .floor-svg {
  max-height: 100%;
}
.indoor-tools {
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 9px 13px;
  border-bottom: 1px solid var(--line);
  background: var(--paper);
}
.indoor-tools .button {
  min-height: 28px;
  padding: 3px 7px;
  font-size: 12px;
}
.indoor-tools > span {
  margin-left: auto;
  color: var(--muted);
  font-size: 11px;
}
.room-page .indoor-tools {
  position: absolute;
  right: 15px;
  bottom: 15px;
  flex-wrap: wrap;
  justify-content: flex-end;
  max-width: calc(100% - 30px);
  padding: 3px;
  border: 1px solid var(--map-outline);
  border-radius: 5px;
  background: var(--map-chrome);
}
.room-page .indoor-tools .button {
  border-color: transparent;
}
.room-page .indoor-tools .button.primary {
  border-color: var(--blue);
}
.room-page .indoor-tools > span {
  margin-right: 4px;
}
.room-inspector {
  min-width: 0;
  padding: clamp(20px, 2vw, 33px);
}
.room-inspector h1 {
  margin-bottom: 9px;
}
.room-schedule {
  margin-top: 24px;
  padding-top: 17px;
  border-top: 1px solid var(--line);
}
.room-schedule-status {
  margin-bottom: 10px;
}
@media (width > 760px) {
  .room-page .room-layout {
    height: max(460px, calc(100dvh - var(--header) - var(--room-toolbar)));
    grid-template-rows: minmax(0, 1fr);
  }
  .room-page .floor-panel {
    flex: 1 1 auto;
    min-height: 0;
  }
  .room-inspector {
    min-height: 0;
    overflow-y: auto;
    overscroll-behavior-y: contain;
  }
  .room-inspector:has(.room-list) {
    display: flex;
    flex-direction: column;
  }
  .room-inspector .room-list {
    min-height: 0;
    margin-bottom: 0;
    overflow-y: auto;
    scrollbar-gutter: stable;
  }
}
.room-inspector .device-selection {
  margin: 19px 0 17px;
  padding-block: 6px;
  border-block: 1px solid var(--line);
}
.device-row {
  min-height: 39px;
  border: 0;
  border-left: 2px solid transparent;
  background: transparent;
}
.device-row:hover,
.device-row.selected {
  border-left: 2px solid var(--blue);
  background: var(--blue-light);
}
.meter-highlight {
  background: #eaf4ef;
}
.device-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 7px 12px;
  margin-top: 15px;
}
.device-actions .button {
  min-height: 31px;
  padding: 5px 8px;
}
.asset-dialog {
  width: min(880px, calc(100vw - 30px));
  height: min(635px, calc(100dvh - 34px));
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--line-strong);
  border-radius: 7px;
  color: var(--ink);
  background: var(--surface);
}
.asset-dialog[open] {
  display: flex;
  flex-direction: column;
}
.asset-dialog::backdrop {
  background: #222b344f;
}
.asset-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 14px 17px;
  border-bottom: 1px solid var(--line);
}
.asset-header span,
.asset-dialog footer {
  color: var(--muted);
  font-size: 12px;
}
.asset-header h2 {
  margin-top: 2px;
  font-size: 21px;
}
.asset-stage {
  position: relative;
  min-height: 230px;
  flex: 1;
  overflow: hidden;
  background: var(--map-field);
}
.asset-dialog footer {
  padding: 8px 16px;
  border-top: 1px solid var(--line);
}

/* Operations keep the same white surfaces and use color to identify links. */
.overview-column {
  background: var(--surface);
}
.live-label {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
}
.live-label i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--green);
}
.main-reading strong {
  font-size: clamp(44px, 4.25vw, 71px);
  font-weight: 720;
  letter-spacing: -.075em;
}
.notification-layout .reading-panel,
.gateway-layout .controls-panel,
.gateway-layout .timeline-panel {
  background: var(--surface);
}
.notice-document h1 {
  max-width: 26em;
}
.notification-layout > .reading-panel:first-child { align-self: start; min-width: 0; }
.notification-layout .inbox { max-height: min(54dvh, 490px); overflow-y: auto; scrollbar-gutter: stable; }
.notification-layout .inbox:focus-within { scroll-padding-block: 8px; }
.notification-layout .notice-row { align-items: baseline; }
.notice-count { font-size: .77rem; white-space: nowrap; }
.notice-row strong { min-width: 0; overflow-wrap: anywhere; font-size: .9rem; }
.notice-row[hidden] { display: none; }
.notice-row time { white-space: nowrap; font-variant-numeric: tabular-nums; }
.notice-shortcuts { margin-top: 24px; }
.notice-intro { color: var(--muted); line-height: 1.7; }
.notice-period-picker { display: flex; flex-wrap: wrap; align-items: end; gap: 12px; }
.notice-period-picker .field { flex: 1 1 135px; }
@media (max-width: 760px) {
  .notification-layout > .reading-panel:first-child { align-self: stretch; }
  .notification-layout .inbox { max-height: 164px; }
  .notification-layout .notice-shortcuts { display: grid; grid-template-columns: 1fr 1fr; gap: 0 8px; margin-top: 12px; }
  .notification-layout .notice-shortcuts .section-title { grid-column: 1 / -1; margin: 0; }
  .notification-layout .notice-shortcuts .notice-row { padding-block: 7px; }
}
.stage-panel .local-timeline {
  padding-block: 4px;
  background: #fafbfc;
}
.collaboration-page {
  max-width: 1880px;
  padding: 0;
}
.collaboration-page .page-heading {
  justify-content: flex-start;
  flex-wrap: wrap;
  gap: 9px clamp(15px, 2vw, 33px);
  min-height: 66px;
  margin: 0;
  padding: 11px clamp(16px, 2vw, 30px);
  border-bottom: 1px solid var(--line-strong);
}
.collaboration-page .heading-controls {
  justify-content: flex-start;
}
.collab-layout,
.collab-lower {
  grid-template-columns: minmax(0, 1fr) var(--coordination-side);
  border: 0;
}
.collab-layout {
  border-bottom: 1px solid var(--line-strong);
}
.collab-lower {
  margin-top: 0;
}
.collab-layout > * + *,
.collab-lower > * + * {
  border-left-color: var(--line-strong);
}
.collab-layout .section-title h2 {
  font-size: clamp(20px, 2vw, 29px);
  letter-spacing: -.03em;
}
.collab-lower .section-title h2 {
  font-size: 19px;
}
.graph-panel {
  padding-block: 18px 9px;
  background: var(--surface);
}
.topology {
  overflow: visible;
}
.topo-lane {
  fill: #3a454c;
}
.lane-rule {
  stroke: #d2d9e2;
}
.topo-node rect {
  fill: #fcfcfd;
  stroke: #909ca9;
  stroke-width: .95;
}
.topo-node text {
  fill: #27323b;
}
.topo-node.focused rect,
.topo-node:hover rect,
.topo-node:focus-visible rect {
  fill: #f1f4fd;
  stroke: #4f6cc4;
  stroke-width: 1.4;
}
.topo-edge .edge-line {
  stroke: var(--blue);
  stroke-width: 1.35;
}
.topo-edge text {
  fill: var(--blue);
}
.topo-edge.up .edge-line {
  stroke: #4a7868;
}
.topo-edge.up text {
  fill: #386453;
}
.topo-edge.peer .edge-line {
  stroke: var(--violet);
  stroke-width: 1.9;
}
.topo-edge.peer text,
.text-violet {
  fill: var(--violet);
  color: var(--violet);
}
.topo-edge.end .edge-line {
  stroke: #647282;
}
.topo-edge.end text {
  fill: #4f5e70;
}
.topo-edge.focused .edge-line,
.topo-edge:hover .edge-line,
.topo-edge:focus-visible .edge-line {
  stroke-width: 2.25;
}
.topology #arrow-cloud path {
  fill: var(--blue);
}
.topology #arrow-up path {
  fill: #4a7868;
}
.topology #arrow-peer path {
  fill: var(--violet);
}
.topology #arrow-end path {
  fill: #647282;
}
.topology-key {
  margin-bottom: 4px;
  color: var(--muted);
}
.topology-key i {
  width: 21px;
  border-top: 2px solid var(--blue);
}
.topology-key i.up {
  border-color: #4a7868;
}
.topology-key i.peer {
  border-color: var(--violet);
}
.collab-lower tr.selected {
  background: var(--violet-light);
}
.collab-lower .record-detail {
  color: #4f376d;
  background: #f3eef9;
}
.collab-lower .field {
  grid-template-columns: minmax(72px, .9fr) minmax(100px, 1.1fr);
}

@keyframes dispatch-flow {
  from { stroke-dashoffset: 46; }
  to { stroke-dashoffset: 0; }
}

@keyframes new-record {
  from { background-color: #e7ecfb; }
  to { background-color: transparent; }
}

[data-motion="peer"] .topo-edge[data-phase] .edge-line {
  stroke-dasharray: 7 5;
  animation: dispatch-flow .62s ease-out 1;
}
[data-motion="peer"] [data-phase="answer"] .edge-line { animation-delay: .15s; }
[data-motion="peer"] [data-phase="charge"] .edge-line { animation-delay: .30s; }
[data-motion="peer"] [data-phase="meter"] .edge-line { animation-delay: .45s; }
[data-motion="peer"] .collab-lower tbody tr:not(.selected),
[data-motion="local"] .timeline-panel tbody tr:not(.selected) {
  animation: new-record .65s ease-out 1;
}
[data-motion="peer"] .collab-lower tbody tr:nth-child(2) { animation-delay: 75ms; }
[data-motion="peer"] .collab-lower tbody tr:nth-child(3) { animation-delay: 150ms; }
[data-motion="peer"] .collab-lower tbody tr:nth-child(4) { animation-delay: 225ms; }
[data-motion="peer"] .collab-lower tbody tr:nth-child(5) { animation-delay: 300ms; }

@media (max-width: 1120px) {
  .side-inspector,
  .room-inspector { padding: 19px; }
  .map-tools { top: 12px; left: 13px; }
  .map-controls { top: 12px; right: 13px; }
}
@media (max-width: 760px) {
  .site-header nav a { font-size: 13px; }
  .context {
    gap: 5px;
    min-width: 0;
  }
  .context select {
    min-width: 0;
    max-width: 121px;
    font-size: 12px;
  }
  .clock {
    gap: 4px;
    padding-left: 5px;
    font-size: 11px;
  }
  .clock .dot { width: 5px; height: 5px; }
  .demo-indicator { font-size: 10px; }
  .map-stage,
  .is-campus .map-stage,
  .overview-layout .map-stage {
    min-height: clamp(370px, 61dvh, 550px);
  }
  .map-tools { top: 8px; left: 8px; }
  .map-controls { top: 8px; right: 8px; }
  .map-tools { max-width: calc(100% - 51px); }
  .map-search { min-width: 0; }
  .map-search input { width: 100%; min-width: 0; }
  .map-view-selector { bottom: 9px; left: 8px; }
  .map-view-selector button { padding-inline: 7px; }
  .attribution { max-width: calc(100% - 116px); }
  .room-page .floor-panel {
    flex-basis: min(64dvh, 510px);
    min-height: 350px;
  }
  .room-page .indoor-tools { right: 8px; bottom: 8px; }
  .room-page .indoor-tools > span { display: none; }
  .room-inspector { padding: 17px; }
  .collaboration-page .page-heading { align-items: flex-start; }
  .collab-layout > * + *,
  .collab-lower > * + * { border-left: 0; }
  .graph-panel { overflow-x: auto; }
  .graph-panel .topology { min-width: 555px; }
  .topology-key { min-width: 430px; }
  .collab-lower .table-scroll table { min-width: 440px; }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: .01ms !important;
    transition-duration: .01ms !important;
  }
}
