/* this gets exported as style.css and can be used for the default theming */
/* these are the necessary styles for React/Svelte Flow, they get used by base.css and style.css */
.react-flow {
  direction: ltr;

  --xy-edge-stroke-default: #b1b1b7;
  --xy-edge-stroke-width-default: 1;
  --xy-edge-stroke-selected-default: #555;

  --xy-connectionline-stroke-default: #b1b1b7;
  --xy-connectionline-stroke-width-default: 1;

  --xy-attribution-background-color-default: rgba(255, 255, 255, 0.5);

  --xy-minimap-background-color-default: #fff;
  --xy-minimap-mask-background-color-default: rgba(240, 240, 240, 0.6);
  --xy-minimap-mask-stroke-color-default: transparent;
  --xy-minimap-mask-stroke-width-default: 1;
  --xy-minimap-node-background-color-default: #e2e2e2;
  --xy-minimap-node-stroke-color-default: transparent;
  --xy-minimap-node-stroke-width-default: 2;

  --xy-background-color-default: transparent;
  --xy-background-pattern-dots-color-default: #91919a;
  --xy-background-pattern-lines-color-default: #eee;
  --xy-background-pattern-cross-color-default: #e2e2e2;
  background-color: var(--xy-background-color, var(--xy-background-color-default));
  --xy-node-color-default: inherit;
  --xy-node-border-default: 1px solid #1a192b;
  --xy-node-background-color-default: #fff;
  --xy-node-group-background-color-default: rgba(240, 240, 240, 0.25);
  --xy-node-boxshadow-hover-default: 0 1px 4px 1px rgba(0, 0, 0, 0.08);
  --xy-node-boxshadow-selected-default: 0 0 0 0.5px #1a192b;
  --xy-node-border-radius-default: 3px;

  --xy-handle-background-color-default: #1a192b;
  --xy-handle-border-color-default: #fff;

  --xy-selection-background-color-default: rgba(0, 89, 220, 0.08);
  --xy-selection-border-default: 1px dotted rgba(0, 89, 220, 0.8);

  --xy-controls-button-background-color-default: #fefefe;
  --xy-controls-button-background-color-hover-default: #f4f4f4;
  --xy-controls-button-color-default: inherit;
  --xy-controls-button-color-hover-default: inherit;
  --xy-controls-button-border-color-default: #eee;
  --xy-controls-box-shadow-default: 0 0 2px 1px rgba(0, 0, 0, 0.08);

  --xy-edge-label-background-color-default: #ffffff;
  --xy-edge-label-color-default: inherit;
  --xy-resize-background-color-default: #3367d9;
}
.react-flow.dark {
  --xy-edge-stroke-default: #3e3e3e;
  --xy-edge-stroke-width-default: 1;
  --xy-edge-stroke-selected-default: #727272;

  --xy-connectionline-stroke-default: #b1b1b7;
  --xy-connectionline-stroke-width-default: 1;

  --xy-attribution-background-color-default: rgba(150, 150, 150, 0.25);

  --xy-minimap-background-color-default: #141414;
  --xy-minimap-mask-background-color-default: rgba(60, 60, 60, 0.6);
  --xy-minimap-mask-stroke-color-default: transparent;
  --xy-minimap-mask-stroke-width-default: 1;
  --xy-minimap-node-background-color-default: #2b2b2b;
  --xy-minimap-node-stroke-color-default: transparent;
  --xy-minimap-node-stroke-width-default: 2;

  --xy-background-color-default: #141414;
  --xy-background-pattern-dots-color-default: #555;
  --xy-background-pattern-lines-color-default: #333;
  --xy-background-pattern-cross-color-default: #333;
  --xy-node-color-default: #f8f8f8;
  --xy-node-border-default: 1px solid #3c3c3c;
  --xy-node-background-color-default: #1e1e1e;
  --xy-node-group-background-color-default: rgba(240, 240, 240, 0.25);
  --xy-node-boxshadow-hover-default: 0 1px 4px 1px rgba(255, 255, 255, 0.08);
  --xy-node-boxshadow-selected-default: 0 0 0 0.5px #999;

  --xy-handle-background-color-default: #bebebe;
  --xy-handle-border-color-default: #1e1e1e;

  --xy-selection-background-color-default: rgba(200, 200, 220, 0.08);
  --xy-selection-border-default: 1px dotted rgba(200, 200, 220, 0.8);

  --xy-controls-button-background-color-default: #2b2b2b;
  --xy-controls-button-background-color-hover-default: #3e3e3e;
  --xy-controls-button-color-default: #f8f8f8;
  --xy-controls-button-color-hover-default: #fff;
  --xy-controls-button-border-color-default: #5b5b5b;
  --xy-controls-box-shadow-default: 0 0 2px 1px rgba(0, 0, 0, 0.08);

  --xy-edge-label-background-color-default: #141414;
  --xy-edge-label-color-default: #f8f8f8;
}
.react-flow__background {
  background-color: var(--xy-background-color-props, var(--xy-background-color, var(--xy-background-color-default)));
  pointer-events: none;
  z-index: -1;
}
.react-flow__container {
  position: absolute;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
}
.react-flow__pane {
  z-index: 1;
  touch-action: none;
}
.react-flow__pane.draggable {
    cursor: grab;
  }
.react-flow__pane.dragging {
    cursor: grabbing;
  }
.react-flow__pane.selection {
    cursor: pointer;
  }
.react-flow__viewport {
  transform-origin: 0 0;
  z-index: 2;
  pointer-events: none;
}
.react-flow__renderer {
  z-index: 4;
}
.react-flow__selection {
  z-index: 6;
}
.react-flow__nodesselection-rect:focus,
.react-flow__nodesselection-rect:focus-visible {
  outline: none;
}
.react-flow__edge-path {
  stroke: var(--xy-edge-stroke, var(--xy-edge-stroke-default));
  stroke-width: var(--xy-edge-stroke-width, var(--xy-edge-stroke-width-default));
  fill: none;
}
.react-flow__connection-path {
  stroke: var(--xy-connectionline-stroke, var(--xy-connectionline-stroke-default));
  stroke-width: var(--xy-connectionline-stroke-width, var(--xy-connectionline-stroke-width-default));
  fill: none;
}
.react-flow .react-flow__edges {
  position: absolute;
}
.react-flow .react-flow__edges svg {
    overflow: visible;
    position: absolute;
    pointer-events: none;
  }
.react-flow__edge {
  pointer-events: visibleStroke;
}
.react-flow__edge.selectable {
    cursor: pointer;
  }
.react-flow__edge.animated path {
    stroke-dasharray: 5;
    animation: dashdraw 0.5s linear infinite;
  }
.react-flow__edge.animated path.react-flow__edge-interaction {
    stroke-dasharray: none;
    animation: none;
  }
.react-flow__edge.inactive {
    pointer-events: none;
  }
.react-flow__edge.selected,
  .react-flow__edge:focus,
  .react-flow__edge:focus-visible {
    outline: none;
  }
.react-flow__edge.selected .react-flow__edge-path,
  .react-flow__edge.selectable:focus .react-flow__edge-path,
  .react-flow__edge.selectable:focus-visible .react-flow__edge-path {
    stroke: var(--xy-edge-stroke-selected, var(--xy-edge-stroke-selected-default));
  }
.react-flow__edge-textwrapper {
    pointer-events: all;
  }
.react-flow__edge .react-flow__edge-text {
    pointer-events: none;
    -webkit-user-select: none;
       -moz-user-select: none;
            user-select: none;
  }
/* Arrowhead marker styles - use CSS custom properties as default */
.react-flow__arrowhead polyline {
  stroke: var(--xy-edge-stroke, var(--xy-edge-stroke-default));
}
.react-flow__arrowhead polyline.arrowclosed {
  fill: var(--xy-edge-stroke, var(--xy-edge-stroke-default));
}
.react-flow__connection {
  pointer-events: none;
}
.react-flow__connection .animated {
    stroke-dasharray: 5;
    animation: dashdraw 0.5s linear infinite;
  }
svg.react-flow__connectionline {
  z-index: 1001;
  overflow: visible;
  position: absolute;
}
.react-flow__nodes {
  pointer-events: none;
  transform-origin: 0 0;
}
.react-flow__node {
  position: absolute;
  -webkit-user-select: none;
     -moz-user-select: none;
          user-select: none;
  pointer-events: all;
  transform-origin: 0 0;
  box-sizing: border-box;
  cursor: default;
}
.react-flow__node.selectable {
    cursor: pointer;
  }
.react-flow__node.draggable {
    cursor: grab;
    pointer-events: all;
  }
.react-flow__node.draggable.dragging {
      cursor: grabbing;
    }
.react-flow__nodesselection {
  z-index: 3;
  transform-origin: left top;
  pointer-events: none;
}
.react-flow__nodesselection-rect {
    position: absolute;
    pointer-events: all;
    cursor: grab;
  }
.react-flow__handle {
  position: absolute;
  pointer-events: none;
  min-width: 5px;
  min-height: 5px;
  width: 6px;
  height: 6px;
  background-color: var(--xy-handle-background-color, var(--xy-handle-background-color-default));
  border: 1px solid var(--xy-handle-border-color, var(--xy-handle-border-color-default));
  border-radius: 100%;
}
.react-flow__handle.connectingfrom {
    pointer-events: all;
  }
.react-flow__handle.connectionindicator {
    pointer-events: all;
    cursor: crosshair;
  }
.react-flow__handle-bottom {
    top: auto;
    left: 50%;
    bottom: 0;
    transform: translate(-50%, 50%);
  }
.react-flow__handle-top {
    top: 0;
    left: 50%;
    transform: translate(-50%, -50%);
  }
.react-flow__handle-left {
    top: 50%;
    left: 0;
    transform: translate(-50%, -50%);
  }
.react-flow__handle-right {
    top: 50%;
    right: 0;
    transform: translate(50%, -50%);
  }
.react-flow__edgeupdater {
  cursor: move;
  pointer-events: all;
}
.react-flow__pane.selection .react-flow__panel {
  pointer-events: none;
}
.react-flow__panel {
  position: absolute;
  z-index: 5;
  margin: 15px;
}
.react-flow__panel.top {
    top: 0;
  }
.react-flow__panel.bottom {
    bottom: 0;
  }
.react-flow__panel.top.center, .react-flow__panel.bottom.center {
      left: 50%;
      transform: translateX(-15px) translateX(-50%);
    }
.react-flow__panel.left {
    left: 0;
  }
.react-flow__panel.right {
    right: 0;
  }
.react-flow__panel.left.center, .react-flow__panel.right.center {
      top: 50%;
      transform: translateY(-15px) translateY(-50%);
    }
.react-flow__attribution {
  font-size: 10px;
  background: var(--xy-attribution-background-color, var(--xy-attribution-background-color-default));
  padding: 2px 3px;
  margin: 0;
}
.react-flow__attribution a {
    text-decoration: none;
    color: #999;
  }
@keyframes dashdraw {
  from {
    stroke-dashoffset: 10;
  }
}
.react-flow__edgelabel-renderer {
  position: absolute;
  width: 100%;
  height: 100%;
  pointer-events: none;
  -webkit-user-select: none;
     -moz-user-select: none;
          user-select: none;
  left: 0;
  top: 0;
}
.react-flow__viewport-portal {
  position: absolute;
  width: 100%;
  height: 100%;
  left: 0;
  top: 0;
  -webkit-user-select: none;
     -moz-user-select: none;
          user-select: none;
}
.react-flow__minimap {
  background: var(
    --xy-minimap-background-color-props,
    var(--xy-minimap-background-color, var(--xy-minimap-background-color-default))
  );
}
.react-flow__minimap-svg {
    display: block;
  }
.react-flow__minimap-mask {
    fill: var(
      --xy-minimap-mask-background-color-props,
      var(--xy-minimap-mask-background-color, var(--xy-minimap-mask-background-color-default))
    );
    stroke: var(
      --xy-minimap-mask-stroke-color-props,
      var(--xy-minimap-mask-stroke-color, var(--xy-minimap-mask-stroke-color-default))
    );
    stroke-width: var(
      --xy-minimap-mask-stroke-width-props,
      var(--xy-minimap-mask-stroke-width, var(--xy-minimap-mask-stroke-width-default))
    );
  }
.react-flow__minimap-node {
    fill: var(
      --xy-minimap-node-background-color-props,
      var(--xy-minimap-node-background-color, var(--xy-minimap-node-background-color-default))
    );
    stroke: var(
      --xy-minimap-node-stroke-color-props,
      var(--xy-minimap-node-stroke-color, var(--xy-minimap-node-stroke-color-default))
    );
    stroke-width: var(
      --xy-minimap-node-stroke-width-props,
      var(--xy-minimap-node-stroke-width, var(--xy-minimap-node-stroke-width-default))
    );
  }
.react-flow__background-pattern.dots {
    fill: var(
      --xy-background-pattern-color-props,
      var(--xy-background-pattern-color, var(--xy-background-pattern-dots-color-default))
    );
  }
.react-flow__background-pattern.lines {
    stroke: var(
      --xy-background-pattern-color-props,
      var(--xy-background-pattern-color, var(--xy-background-pattern-lines-color-default))
    );
  }
.react-flow__background-pattern.cross {
    stroke: var(
      --xy-background-pattern-color-props,
      var(--xy-background-pattern-color, var(--xy-background-pattern-cross-color-default))
    );
  }
.react-flow__controls {
  display: flex;
  flex-direction: column;
  box-shadow: var(--xy-controls-box-shadow, var(--xy-controls-box-shadow-default));
}
.react-flow__controls.horizontal {
    flex-direction: row;
  }
.react-flow__controls-button {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 26px;
    width: 26px;
    padding: 4px;
    border: none;
    background: var(--xy-controls-button-background-color, var(--xy-controls-button-background-color-default));
    border-bottom: 1px solid
      var(
        --xy-controls-button-border-color-props,
        var(--xy-controls-button-border-color, var(--xy-controls-button-border-color-default))
      );
    color: var(
      --xy-controls-button-color-props,
      var(--xy-controls-button-color, var(--xy-controls-button-color-default))
    );
    cursor: pointer;
    -webkit-user-select: none;
       -moz-user-select: none;
            user-select: none;
  }
.react-flow__controls-button svg {
      width: 100%;
      max-width: 12px;
      max-height: 12px;
      fill: currentColor;
    }
.react-flow__edge.updating .react-flow__edge-path {
      stroke: #777;
    }
.react-flow__edge-text {
    font-size: 10px;
  }
.react-flow__node.selectable:focus,
  .react-flow__node.selectable:focus-visible {
    outline: none;
  }
.react-flow__node-input,
.react-flow__node-default,
.react-flow__node-output,
.react-flow__node-group {
  padding: 10px;
  border-radius: var(--xy-node-border-radius, var(--xy-node-border-radius-default));
  width: 150px;
  font-size: 12px;
  color: var(--xy-node-color, var(--xy-node-color-default));
  text-align: center;
  border: var(--xy-node-border, var(--xy-node-border-default));
  background-color: var(--xy-node-background-color, var(--xy-node-background-color-default));
}
.react-flow__node-input.selectable:hover, .react-flow__node-default.selectable:hover, .react-flow__node-output.selectable:hover, .react-flow__node-group.selectable:hover {
      box-shadow: var(--xy-node-boxshadow-hover, var(--xy-node-boxshadow-hover-default));
    }
.react-flow__node-input.selectable.selected,
    .react-flow__node-input.selectable:focus,
    .react-flow__node-input.selectable:focus-visible,
    .react-flow__node-default.selectable.selected,
    .react-flow__node-default.selectable:focus,
    .react-flow__node-default.selectable:focus-visible,
    .react-flow__node-output.selectable.selected,
    .react-flow__node-output.selectable:focus,
    .react-flow__node-output.selectable:focus-visible,
    .react-flow__node-group.selectable.selected,
    .react-flow__node-group.selectable:focus,
    .react-flow__node-group.selectable:focus-visible {
      box-shadow: var(--xy-node-boxshadow-selected, var(--xy-node-boxshadow-selected-default));
    }
.react-flow__node-group {
  background-color: var(--xy-node-group-background-color, var(--xy-node-group-background-color-default));
}
.react-flow__nodesselection-rect,
.react-flow__selection {
  background: var(--xy-selection-background-color, var(--xy-selection-background-color-default));
  border: var(--xy-selection-border, var(--xy-selection-border-default));
}
.react-flow__nodesselection-rect:focus,
  .react-flow__nodesselection-rect:focus-visible,
  .react-flow__selection:focus,
  .react-flow__selection:focus-visible {
    outline: none;
  }
.react-flow__controls-button:hover {
      background: var(
        --xy-controls-button-background-color-hover-props,
        var(--xy-controls-button-background-color-hover, var(--xy-controls-button-background-color-hover-default))
      );
      color: var(
        --xy-controls-button-color-hover-props,
        var(--xy-controls-button-color-hover, var(--xy-controls-button-color-hover-default))
      );
    }
.react-flow__controls-button:disabled {
      pointer-events: none;
    }
.react-flow__controls-button:disabled svg {
        fill-opacity: 0.4;
      }
.react-flow__controls-button:last-child {
    border-bottom: none;
  }
.react-flow__controls.horizontal .react-flow__controls-button {
    border-bottom: none;
    border-right: 1px solid
      var(
        --xy-controls-button-border-color-props,
        var(--xy-controls-button-border-color, var(--xy-controls-button-border-color-default))
      );
  }
.react-flow__controls.horizontal .react-flow__controls-button:last-child {
    border-right: none;
  }
.react-flow__resize-control {
  position: absolute;
}
.react-flow__resize-control.left,
.react-flow__resize-control.right {
  cursor: ew-resize;
}
.react-flow__resize-control.top,
.react-flow__resize-control.bottom {
  cursor: ns-resize;
}
.react-flow__resize-control.top.left,
.react-flow__resize-control.bottom.right {
  cursor: nwse-resize;
}
.react-flow__resize-control.bottom.left,
.react-flow__resize-control.top.right {
  cursor: nesw-resize;
}
/* handle styles */
.react-flow__resize-control.handle {
  width: 5px;
  height: 5px;
  border: 1px solid #fff;
  border-radius: 1px;
  background-color: var(--xy-resize-background-color, var(--xy-resize-background-color-default));
  translate: -50% -50%;
}
.react-flow__resize-control.handle.left {
  left: 0;
  top: 50%;
}
.react-flow__resize-control.handle.right {
  left: 100%;
  top: 50%;
}
.react-flow__resize-control.handle.top {
  left: 50%;
  top: 0;
}
.react-flow__resize-control.handle.bottom {
  left: 50%;
  top: 100%;
}
.react-flow__resize-control.handle.top.left {
  left: 0;
}
.react-flow__resize-control.handle.bottom.left {
  left: 0;
}
.react-flow__resize-control.handle.top.right {
  left: 100%;
}
.react-flow__resize-control.handle.bottom.right {
  left: 100%;
}
/* line styles */
.react-flow__resize-control.line {
  border-color: var(--xy-resize-background-color, var(--xy-resize-background-color-default));
  border-width: 0;
  border-style: solid;
}
.react-flow__resize-control.line.left,
.react-flow__resize-control.line.right {
  width: 1px;
  transform: translate(-50%, 0);
  top: 0;
  height: 100%;
}
.react-flow__resize-control.line.left {
  left: 0;
  border-left-width: 1px;
}
.react-flow__resize-control.line.right {
  left: 100%;
  border-right-width: 1px;
}
.react-flow__resize-control.line.top,
.react-flow__resize-control.line.bottom {
  height: 1px;
  transform: translate(0, -50%);
  left: 0;
  width: 100%;
}
.react-flow__resize-control.line.top {
  top: 0;
  border-top-width: 1px;
}
.react-flow__resize-control.line.bottom {
  border-bottom-width: 1px;
  top: 100%;
}
.react-flow__edge-textbg {
  fill: var(--xy-edge-label-background-color, var(--xy-edge-label-background-color-default));
}
.react-flow__edge-text {
  fill: var(--xy-edge-label-color, var(--xy-edge-label-color-default));
}

/* One navy theme for every page (shell, NOC, IoT, Activity and the topology canvas) */
:root {
  --bg: #151d38;
  --panel: #1b2340;
  --panel-2: #232e58;
  --node: #26305a;
  --node-border: #4a5684;
  --line: #2c3963;
  --text: #eef1fa;
  --muted: #9aa4cb;
  --ok: #4cc38a;
  --warn: #f2c94c;
  --bad: #ff6d5a;
  --hot: #ff9b26;
  --pending: #a78bfa;
  --accent: #7aa7ff;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html, body, #root { margin: 0; height: 100%; background: var(--bg); color: var(--text);
  font: 13px/1.35 -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Open Sans', sans-serif; }
button { font: inherit; color: inherit; cursor: pointer; }
.app { display: flex; flex-direction: column; height: 100%; }
.bar { display: flex; align-items: center; gap: 16px; padding: 8px 14px; background: var(--panel);
  border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.title { display: flex; gap: 10px; align-items: center; }
.t1 { font-weight: 600; font-size: 14px; }
.t2 { color: var(--muted); font-size: 11.5px; }
.site-pill { font-size: 11px; letter-spacing: .06em; color: var(--text); background: var(--panel-2); border: 1px solid #34406b;
  border-radius: 10px; padding: 1px 9px; white-space: nowrap; cursor: default; }
.search { display: flex; align-items: center; gap: 6px; background: var(--panel-2); border: 1px solid #34406b;
  border-radius: 6px; padding: 4px 8px; flex: 1; max-width: 720px; }
.search input { background: transparent; border: 0; outline: 0; color: var(--text); flex: 1; font: inherit; }
.search { position: relative; }
.sr-menu { position: absolute; top: calc(100% + 6px); left: 0; right: 0; z-index: 60; max-height: min(70vh, 560px); overflow-y: auto; padding: 6px; background: var(--panel); border: 1px solid #34406b; border-radius: 8px; box-shadow: 0 10px 28px rgba(0, 0, 0, .45); }
.sr-head { padding: 8px 8px 3px; font-size: 11px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); }
.sr-menu button { display: flex; align-items: center; gap: 8px; width: 100%; padding: 6px 8px; background: none; border: 0; border-radius: 6px; color: inherit; font: inherit; font-size: 13px; text-align: left; cursor: pointer; }
.sr-menu button.on { background: var(--panel-2); }
.sr-menu button b { min-width: 0; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sr-menu button span:not(.dot) { margin-left: auto; color: var(--muted); font-size: 12px; white-space: nowrap; }
.sr-more, .sr-none { padding: 4px 8px; font-size: 12px; color: var(--muted); }
.mcount { color: var(--muted); font-size: 11px; }
.actions { display: flex; gap: 6px; margin-left: auto; align-items: center; }
.actions button, .file { display: inline-flex; align-items: center; gap: 5px; background: var(--panel-2);
  border: 1px solid #34406b; border-radius: 6px; padding: 5px 9px; }
.actions button:hover, .file:hover { border-color: #6b78ad; }
.actions button.on { border-color: var(--warn); color: var(--warn); }
.file { cursor: pointer; }
.file input { display: none; }
.body { flex: 1; display: flex; min-height: 0; position: relative; }
.canvas { flex: 1; position: relative; min-width: 0; }
.react-flow { --xy-background-color: var(--bg); }
.react-flow__controls button { background: var(--panel-2); border-color: #34406b; fill: var(--text); }
.react-flow__minimap { background: var(--panel); border: 1px solid var(--line); }

/* ── Switch node: header + one output handle per port, like n8n's multi-output nodes ── */
.sw { background: var(--node); border: 1.5px solid var(--node-border); border-radius: 9px;
  box-shadow: 0 2px 8px rgba(0,0,0,.35); overflow: visible; }
.sw-head { display: flex; align-items: center; gap: 9px; padding: 9px 10px; height: 58px; }
.icon { width: 36px; height: 36px; border-radius: 8px; display: grid; place-items: center; flex: none;
  background: #1f2950; color: #dfe1e6; }
.sw-title { min-width: 0; flex: 1; }
.name { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sub { color: var(--muted); font-size: 11px; display: flex; align-items: center; gap: 5px; white-space: nowrap; overflow: hidden; }
.dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; flex: none; background: #777; }
.dot.online { background: var(--ok); } .dot.offline { background: var(--bad); }
.dot.pending { background: var(--pending); } .dot.unknown { background: #7d88b3; }
.expand { display: inline-flex; align-items: center; gap: 2px; background: #1f2950; border: 1px solid #45518a;
  border-radius: 5px; padding: 2px 5px; font-size: 11px; color: var(--muted); }
.expand:hover { color: var(--text); border-color: #7d88b3; }
.port { position: relative; display: flex; align-items: center; gap: 7px; height: 22px; padding: 0 16px 0 12px;
  border-top: 1px solid #34406b; font-size: 11.5px; cursor: pointer; }
.port:hover { background: #2e3a68; }
.port.active { background: rgba(255,155,38,.18); }
.pdot { width: 7px; height: 7px; border-radius: 50%; background: #5d678f; flex: none; }
.port.ok .pdot, .pdot.ok { background: var(--ok); }
.port.warn .pdot, .pdot.warn { background: var(--warn); }
.port.bad .pdot, .pdot.bad { background: var(--bad); }
.port.ssid .pdot { background: #80deea; border-radius: 2px; }
.port.ssid .react-flow__handle { background: #80deea; }
.port.bad .plabel { color: #ffb3a8; } .port.warn .plabel { color: #f7e1a0; }
.plabel { flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pmeta { color: var(--muted); font-size: 10.5px; white-space: nowrap; max-width: 90px; overflow: hidden; text-overflow: ellipsis; }
.summary { border-top: 1px solid #34406b; padding: 6px 12px; color: var(--muted); font-size: 11px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; height: 28px; }

/* Handles: small grey squares on the left, dots on the right (n8n style) */
.react-flow__handle.h-in { width: 8px; height: 14px; border-radius: 2px; background: #7d88b3; border: 0; left: -5px; }
.react-flow__handle.h-port, .react-flow__handle.h-out { width: 10px; height: 10px; background: #c9d1ef;
  border: 2px solid var(--node); right: -6px; }
.port.bad .react-flow__handle { background: var(--bad); }
.port.warn .react-flow__handle { background: var(--warn); }

/* ── Leaf node: rounded icon square with label below ── */
.leaf { display: flex; flex-direction: column; align-items: center; text-align: center; position: relative; }
.leaf-box { width: 64px; height: 64px; border-radius: 12px; background: var(--node); border: 1.5px solid var(--node-border);
  display: grid; place-items: center; position: relative; box-shadow: 0 2px 8px rgba(0,0,0,.35); color: #e6e7eb; }
.dot.corner { position: absolute; top: 5px; right: 5px; }
.captured { position: absolute; bottom: 3px; right: 5px; font-size: 10px; color: var(--ok); }
.leaf-name { margin-top: 6px; font-weight: 600; font-size: 12px; max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.leaf-ip { color: #c9cbd1; font-size: 10.5px; font-family: ui-monospace, SFMono-Regular, monospace; white-space: nowrap; }
.leaf-sub { color: var(--muted); font-size: 10.5px; max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* A leaf with devices below (ISP, gateway): "+" / "−" sits on its outgoing link's dot. */
.leaf .port-plus.leaf-plus { top: 32px; right: 37px; } /* the same spot as .leaf .h-out */
.leaf .react-flow__handle.h-in { left: 37px; }
.leaf .react-flow__handle.h-out { right: 37px; }
.leaf.unplaced { background: #3a3622; border: 1px dashed #8f7f3c; border-radius: 9px; padding: 8px; height: 146px; }
.leaf.unplaced .leaf-box { width: 46px; height: 46px; }
.reason { color: #e9d9a0; font-size: 10.5px; margin-top: 4px; line-height: 1.25; }

/* Status / state rings */
.sw.st-offline, .leaf.st-offline .leaf-box { border-color: var(--bad); }
.sw.st-pending, .leaf.st-pending .leaf-box { border-color: var(--pending); border-style: dashed; }
.sw.st-affected, .leaf.st-affected .leaf-box { border-color: var(--bad); border-style: dashed; opacity: .85; }
.sw.impacted, .leaf.impacted .leaf-box { border-color: var(--hot); box-shadow: 0 0 0 3px rgba(255,155,38,.35); }
.sw.selected, .leaf.selected .leaf-box { border-color: #fff; box-shadow: 0 0 0 3px rgba(255,255,255,.25); }
.sw.match, .leaf.match .leaf-box { outline: 2px solid var(--accent); outline-offset: 3px; }

/* Role tints for icons */
.role-gateway { color: #ff8a80; } .role-core { color: #ffcc80; } .role-idf { color: #ffe082; }
.role-nid { color: #a5d6a7; } .role-wap { color: #80deea; } .role-intercom { color: #b39ddb; }
.role-thermostat { color: #ffab91; } .role-unit { color: #90caf9; } .role-camera { color: #f48fb1; }
.role-nvr { color: #e6ee9c; } .role-access { color: #ce93d8; } .role-lock { color: #f8bbd0; } .role-bms { color: #bcaaa4; } .role-sensor { color: #80cbc4; } .role-client { color: #cfd8dc; } .role-wireless { color: #81d4fa; }

/* Edges */
.react-flow__edge-path { stroke: #7d88b3; stroke-width: 1.6; }
.react-flow__edge.e-bad .react-flow__edge-path { stroke: #5d678f; stroke-dasharray: 6 4; }
.react-flow__edge.e-weak .react-flow__edge-path { stroke-dasharray: 2 4; }
.react-flow__edge.e-hot .react-flow__edge-path { stroke: var(--hot); stroke-width: 2; opacity: .75; }
.react-flow__edge.e-path .react-flow__edge-path { stroke: var(--hot); stroke-width: 3; stroke-dasharray: 8 6; }
/* A connection line flows from the subscriber's end toward the network: right to left. */
.react-flow__edge.e-path.animated .react-flow__edge-path { animation-direction: reverse; }
.vlan-label { position: absolute; pointer-events: all; cursor: help; z-index: 20; white-space: nowrap;
  background: #3a2a14; color: #ffd8a8; border: 1px solid var(--hot); border-radius: 6px;
  padding: 2px 7px; font-size: 11px; font-weight: 600; box-shadow: 0 2px 6px rgba(0,0,0,.4); }

/* Unplaced group (floating beside the tree) */
.react-flow__node-group.ug-wrap { background: rgba(242,201,76,.06); border: 1.5px dashed #8f7f3c; border-radius: 12px; padding: 0; }
.unplaced-group { padding: 12px 16px; }
.ug-head { display: flex; align-items: center; gap: 6px; font-weight: 700; color: var(--warn); }
.ug-sub { color: var(--muted); font-size: 11.5px; margin-top: 2px; }

/* Side panels */
.issues, .details { width: 320px; background: var(--panel); border-right: 1px solid var(--line); display: flex; flex-direction: column; min-height: 0; }
/* The Issues panel lies over the page from the left edge instead of pushing it aside. */
.issues-pop { position: absolute; top: 0; bottom: 0; left: 0; z-index: 30; display: flex; box-shadow: 8px 0 24px rgba(0, 0, 0, .35); }
.issues-pop > .issues { height: 100%; }
.details { border-right: 0; border-left: 1px solid var(--line); overflow-y: auto; width: 340px; }
.chips { display: flex; flex-wrap: wrap; gap: 5px; padding: 10px; border-bottom: 1px solid var(--line); }
.chip { background: var(--panel-2); border: 1px solid #34406b; border-radius: 12px; padding: 2px 9px; font-size: 11.5px; }
.chip.on { border-color: var(--text); }
.chip.k-port-down { color: #ffb3a8; } .chip.k-port-empty { color: #f7e1a0; } .chip.k-offline { color: #ffb3a8; } .chip.k-unplaced { color: #f2c94c; }
.chip.k-sightline { color: #ffd27a; }
.ilist { overflow-y: auto; flex: 1; padding: 6px; }
.ilist.small { max-height: 340px; flex: none; }
.issue { display: block; width: 100%; text-align: left; background: transparent; border: 1px solid transparent; border-left: 3px solid #45518a;
  border-radius: 5px; padding: 6px 8px; margin-bottom: 3px; }
.issue:hover { background: var(--panel-2); }
.issue.on { background: var(--panel-2); border-color: #45518a; }
.issue.k-port-down, .issue.k-offline { border-left-color: var(--bad); }
.issue.k-port-empty { border-left-color: var(--warn); }
.issue.k-unplaced { border-left-color: #8f7f3c; }
.issue.k-sightline { border-left-color: #f08c3c; }
/* A camera's "Ceiling plan" section (details.tsx): the lights in its view, worst first. */
.sight-hit { display: flex; gap: 6px; align-items: flex-start; padding: 2px 0; font-size: 12px; }
.sight-hit svg { flex: none; margin-top: 2px; }
.sight-hit b { font-weight: 600; }
.sight-hit.sev-under { color: #ffb3a8; }
.sight-hit.sev-view { color: #f7e1a0; }
.sight-hit.sev-none { color: var(--muted); }
.it { font-weight: 600; font-size: 12px; display: flex; align-items: center; gap: 6px; }
.id { color: var(--muted); font-size: 11px; }
.warnings { padding: 8px 10px; color: var(--warn); font-size: 11px; border-top: 1px solid var(--line); }
.dpin { position: sticky; top: 0; z-index: 3; background: var(--panel); flex-shrink: 0; }
.dhead { display: flex; gap: 10px; align-items: center; padding: 12px; border-bottom: 1px solid var(--line); }
.dt { flex: 1; min-width: 0; }
.x { background: transparent; border: 0; color: var(--muted); }
.path { padding: 8px 12px; font-size: 11.5px; color: var(--muted); display: flex; flex-wrap: wrap; align-items: center; gap: 2px; border-bottom: 1px solid var(--line); }
.path a { color: var(--accent); cursor: pointer; }
.path span { display: inline-flex; align-items: center; gap: 2px; }
.sec { padding: 10px 12px; border-bottom: 1px solid var(--line); }
.sh { font-weight: 700; font-size: 12px; margin-bottom: 6px; display: flex; gap: 6px; align-items: center; }
.kv { display: flex; justify-content: space-between; gap: 10px; padding: 2px 0; font-size: 12px; }
.kv span { color: var(--muted); } .kv b { font-weight: 500; text-align: right; word-break: break-all; }
.kv .dc-flag { color: #ffb3a8; display: inline-flex; align-items: center; gap: 4px; }
.dc-action { margin-top: 8px; }
.dc-action .dc-flag { color: #ffb3a8; }
.dc-run { background: #2d4d9a; border: 1px solid var(--accent); color: #fff; border-radius: 6px; padding: 5px 10px; font-size: 12px; }
.dc-run:disabled { opacity: .6; cursor: progress; }
.dc-run { display: inline-flex; align-items: center; gap: 6px; }
.dc-picture { display: flex; flex-direction: column; gap: 6px; margin-bottom: 8px; }
.dc-picture .dc-run { align-self: flex-start; }
.dc-quiet { background: transparent; border: 1px solid var(--line); color: var(--text); border-radius: 6px; padding: 5px 10px; font-size: 12px; }
.dc-quiet:disabled { opacity: .6; cursor: progress; }
.dc-firmware { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.dc-firmware select { font-size: 12px; padding: 4px 6px; }
/* A door phone's lists (doorPhoneLists.tsx). */
.dpl-part { margin-top: 6px; }
.dpl-part summary { cursor: pointer; font-size: 12px; }
.dpl-table { width: 100%; border-collapse: collapse; font-size: 11px; margin-top: 4px; }
.dpl-table th { text-align: left; font-weight: 600; color: var(--muted, #8a93b0); padding: 2px 4px; border-bottom: 1px solid var(--line); }
.dpl-table td { padding: 2px 4px; border-bottom: 1px solid var(--line); vertical-align: top; overflow-wrap: anywhere; }
.dpl-secret { display: inline-flex; align-items: center; gap: 4px; }
.dpl-secret code { font-size: 11px; }
.dpl-show, .dpl-refresh { background: transparent; border: 0; color: var(--text); opacity: .7; cursor: pointer; padding: 0 2px; }
.dpl-show:hover, .dpl-refresh:hover { opacity: 1; }
.dpl-refresh { float: right; }
.dpl-unmask { display: flex; align-items: center; gap: 6px; margin: 4px 0 2px; font-size: 12px; cursor: pointer; }
.dpl-unmask input { accent-color: var(--accent, #3b82f6); }
.dpl-refresh .spin { animation: wf-spin .9s linear infinite; }
/* Copy buttons: hidden until the row (or the header) is hovered; the tick stays briefly after a copy. */
.kv b { position: relative; }
.kv .copy { position: absolute; right: 100%; top: 50%; transform: translateY(-50%); margin-right: 4px; }
.copy { display: inline-flex; padding: 2px; border: 0; border-radius: 4px; background: var(--panel, #1f2848); color: var(--muted); cursor: pointer; opacity: 0; transition: opacity .1s; }
.copy:hover { color: #fff; background: #34406b; }
.copy.done { color: var(--ok); opacity: 1; }
.kv:hover .copy, .dhead:hover .copy, .copy:focus-visible { opacity: 1; }
.dhead .name { display: flex; align-items: center; gap: 4px; }
.dhead .name-text { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.dhead .copy { flex: none; }
.impact .big { font-size: 15px; font-weight: 700; color: var(--hot); margin: 2px 0 6px; }
.rolechips { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 6px; }
.rc { background: var(--panel-2); border: 1px solid transparent; border-radius: 10px; padding: 1px 8px; font-size: 11px; cursor: pointer; }
.rc:hover { border-color: #45518a; }
.rc.on { border-color: currentColor; background: #2e3a68; }
.rc.all { color: var(--text); font-weight: 600; }
.muted { color: var(--muted); font-size: 12px; }
.small-note { font-size: 10.5px; margin-top: 6px; }
.prow { display: flex; align-items: center; gap: 7px; width: 100%; background: transparent; border: 0; padding: 4px 4px; border-radius: 4px; text-align: left; font-size: 12px; }
.prow:hover, .prow.on { background: var(--panel-2); }
.pl { width: 110px; flex: none; } .pc { color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* The side panel's ports as the NOC draws them: the port's square, its VLAN tag, an uplink a link. */
.prow .bv-port.sq { --port: 16px; flex: none; }
.prow .pl { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.prow .rv-vl, .prow .pl + span:empty { flex: none; width: 40px; }
.pc-link { color: var(--accent); text-decoration: underline dotted; text-underline-offset: 2px; cursor: pointer; }

/* Legend */
.canvas-tools { position: absolute; top: 10px; right: 10px; z-index: 5; display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
.legend { background: var(--panel); border: 1px solid var(--line); border-radius: 8px; }
.legend > button { display: inline-flex; align-items: center; gap: 5px; background: transparent; border: 0; padding: 6px 10px; }
.lbody { padding: 4px 12px 10px; width: 270px; }
.lrow { display: flex; align-items: center; gap: 7px; font-size: 12px; padding: 2px 0; }
.lrow b { margin-left: auto; color: var(--muted); font-weight: 500; }
.licon { width: 18px; display: inline-grid; place-items: center; }
.pdot.l { width: 9px; height: 9px; }
.eline { width: 26px; height: 0; border-top: 2px solid #7d88b3; display: inline-block; }
.eline.hot { border-color: var(--hot); opacity: .75; }
.eline.path { border-top: 3px dashed var(--hot); } .eline.bad { border-top-style: dashed; border-color: #5d678f; }
.eline.weak { border-top-style: dotted; }
.lnote { color: var(--muted); font-size: 11px; margin-top: 6px; }
.legend hr { border: 0; border-top: 1px solid var(--line); margin: 6px 0; }
.lcheck { color: var(--ok); font-size: 12px; }
.lbox { width: 13px; height: 13px; border-radius: 3px; display: inline-block; background: var(--node); border: 1.5px solid var(--node-border); }
.lbox.selected { border-color: #fff; box-shadow: 0 0 0 2px rgba(255,255,255,.25); }
.lbox.match { outline: 2px solid var(--accent); outline-offset: 1px; }
.lbox.affected { border-color: var(--bad); border-style: dashed; }

/* Connection-line banner */
.pathbar { position: absolute; top: 10px; left: 50%; transform: translateX(-50%); z-index: 6; display: flex; align-items: center; gap: 12px;
  background: #3a2a14; color: #ffd8a8; border: 1px solid var(--hot); border-radius: 8px; padding: 6px 8px 6px 12px; font-size: 12px;
  max-width: calc(100% - 220px); }
.pathbar span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pathbar button { background: var(--panel-2); border: 1px solid #45518a; border-radius: 6px; padding: 3px 9px; white-space: nowrap; }

/* Right-click menu */
.ctx { position: fixed; z-index: 50; min-width: 210px; background: var(--panel); border: 1px solid #34406b; border-radius: 8px;
  box-shadow: 0 8px 24px rgba(0,0,0,.5); padding: 4px; }
.ctx-head { padding: 6px 10px 4px; color: var(--muted); font-size: 11px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 260px; }
.ctx button { display: grid; grid-template-columns: 14px 1fr; column-gap: 9px; align-items: center; width: 100%; text-align: left; background: transparent; border: 0;
  border-radius: 5px; padding: 6px 10px; font-size: 12.5px; }
.ctx button > svg { opacity: .85; }
.ctx button.copied > svg { color: var(--ok); opacity: 1; }
.ctx button:hover:not(:disabled) { background: var(--panel-2); }
.ctx button:first-of-type { font-weight: 600; color: #ffd8a8; }
.ctx button:disabled { color: #5d678f; cursor: default; }
.ctx hr { border: 0; border-top: 1px solid var(--line); margin: 4px 2px; }
/* PoE Power Cycle (poeCycle.tsx): held, it fills left to right over its hold, then says how it went. */
.ctx .ctx-hold { position: relative; overflow: hidden; touch-action: none; user-select: none; }
.ctx-hold-fill { position: absolute; inset: 0 auto 0 0; width: 0; background: rgba(255, 155, 38, .22); pointer-events: none; }
.ctx-hold.holding .ctx-hold-fill { animation: ctx-hold-fill linear forwards; }
.ctx-hold.cycling .ctx-hold-fill { width: 100%; }
.ctx-hold-text, .ctx-hold small, .ctx-hold-icon { position: relative; }
.ctx-hold small { display: block; grid-column: 2; color: var(--muted); font-size: 11px; }
.ctx-hold.cycling .ctx-hold-icon { animation: wf-spin .9s linear infinite; }
.ctx-hold.done .ctx-hold-text { color: var(--ok); }
@keyframes ctx-hold-fill { to { width: 100%; } }
.ctx-note { padding: 2px 10px 6px; max-width: 250px; font-size: 11.5px; line-height: 1.35; color: var(--muted); }
.ctx-note.failed { color: var(--bad); }
.ctx-note.done { color: var(--ok); }

/* Link speed under the line (connection-line view) */
.speed-label { position: absolute; pointer-events: all; cursor: help; z-index: 20; white-space: nowrap;
  background: #2a2140; color: #ddd0ff; border: 1px solid var(--pending); border-radius: 6px;
  padding: 2px 7px; font-size: 11px; font-weight: 600; box-shadow: 0 2px 6px rgba(0,0,0,.4); }
.speed-swatch { width: 26px; height: 10px; border-radius: 3px; background: #2a2140; border: 1px solid var(--pending); display: inline-block; }

/* Firewall's own port toward the core (LLDP) */
.gw-port { position: absolute; top: 6px; left: calc(50% + 38px); background: #1f2950; border: 1px solid #4a5684; color: #f1f1f3;
  border-radius: 5px; padding: 1px 6px; font-size: 10.5px; font-weight: 700; font-family: ui-monospace, SFMono-Regular, monospace; }

/* SSID row: client count as an icon + number, bands without "GHz" */
.ssid-meta { display: inline-flex; align-items: center; gap: 3px; }
.ssid-meta span { margin-left: 5px; padding: 0 4px; border: 1px solid #45518a; border-radius: 4px; font-size: 10px; }

/* Wi-Fi signal strength where the link meets the client (mirrors the firewall's port tag) */
.rssi-tag { position: absolute; top: 6px; right: calc(50% + 38px); background: #1f2950; border: 1px solid; border-radius: 5px;
  padding: 1px 6px; font-size: 10.5px; font-weight: 700; white-space: nowrap; font-family: ui-monospace, SFMono-Regular, monospace; }
.rssi-tag.good { color: var(--ok); border-color: var(--ok); }
.rssi-tag.fair { color: var(--warn); border-color: var(--warn); }
.rssi-tag.weak { color: var(--bad); border-color: var(--bad); }

/* Devices filter menu */
.dd { position: relative; }
.dd > button.on { border-color: var(--accent); color: #cfe0ff; }
.dd-menu { position: absolute; top: calc(100% + 6px); left: 0; z-index: 40; min-width: 230px; background: var(--panel); border: 1px solid #34406b;
  border-radius: 8px; box-shadow: 0 8px 24px rgba(0,0,0,.5); padding: 4px; }
.dd-row { display: flex; align-items: center; gap: 8px; padding: 5px 8px; border-radius: 5px; cursor: pointer; font-size: 12.5px; }
.dd-row:hover { background: var(--panel-2); }
.dd-row b { margin-left: auto; color: var(--muted); font-weight: 500; }
.dd-row input { accent-color: var(--accent); margin: 0; }
.dd-menu hr { border: 0; border-top: 1px solid var(--line); margin: 3px 2px; }
.pathbar.filterbar { background: #1d2a3f; color: #cfe0ff; border-color: var(--accent); }

/* "Ash names" toggle under the Legend */
.tool-toggle { display: inline-flex; align-items: center; gap: 7px; background: var(--panel); border: 1px solid var(--line); border-radius: 8px;
  padding: 6px 10px; cursor: pointer; font-size: 12.5px; user-select: none; }
.tool-toggle input { display: none; }
.tool-toggle b { color: var(--muted); font-weight: 500; font-size: 11px; }
.tool-toggle .switch { width: 26px; height: 15px; border-radius: 8px; background: #34406b; position: relative; transition: background .15s; }
.tool-toggle .switch::after { content: ''; position: absolute; top: 2px; left: 2px; width: 11px; height: 11px; border-radius: 50%; background: #d9dbe0; transition: left .15s; }
.tool-toggle input:checked + .switch { background: #2bb3a3; }
.tool-toggle input:checked + .switch::after { left: 13px; }

/* Settings > Quick hide: a switch a row */
.qh-row { display: flex; align-items: center; gap: 10px; padding: 7px 0; cursor: pointer; font-size: 13px; user-select: none; }
.qh-row input { display: none; }
.qh-row .switch { flex: none; width: 26px; height: 15px; border-radius: 8px; background: #34406b; position: relative; transition: background .15s; }
.qh-row .switch::after { content: ''; position: absolute; top: 2px; left: 2px; width: 11px; height: 11px; border-radius: 50%; background: #d9dbe0; transition: left .15s; }
.qh-row input:checked + .switch { background: #2bb3a3; }
.qh-row input:checked + .switch::after { left: 13px; }
.qh-row input:focus-visible + .switch { outline: 2px solid var(--accent); outline-offset: 2px; }
.qh-name { min-width: 150px; color: var(--text); }

/* Scanned-in-Ash name on a device */
.ash-tag { position: absolute; top: -11px; left: 50%; transform: translateX(-50%); z-index: 2; white-space: nowrap; background: #133b37; color: #8ff0e3;
  border: 1px solid #2bb3a3; border-radius: 9px; padding: 1px 8px; font-size: 10.5px; font-weight: 700; font-family: ui-monospace, SFMono-Regular, monospace; }
.ash-tag.differs { background: #3f3313; color: #ffe08a; border-color: var(--warn); }
.sw .ash-tag { left: auto; right: 10px; transform: none; }
.ash-swatch { width: 14px; height: 9px; border-radius: 5px; background: #133b37; border: 1px solid #2bb3a3; display: inline-block; }

/* Devices from earlier syncs (Show offline): faded, dashed grey */
.sw.st-stale, .leaf.st-stale .leaf-box { border-style: dashed; border-color: #6b74a0; opacity: .55; }
.leaf.st-stale .leaf-name, .leaf.st-stale .leaf-ip, .leaf.st-stale .leaf-sub { opacity: .6; }
.lbox.stale { border-style: dashed; border-color: #6b74a0; opacity: .6; }

/* ── Time Machine ── */
.actions button.tm-toggle.on { border-color: #b39ddb; color: #d9ccff; }
.tm { position: absolute; left: 0; right: 0; bottom: 0; z-index: 8; background: rgba(21,29,56,.97); border-top: 1px solid #34406b;
  padding: 8px 14px 10px; display: flex; flex-direction: column; gap: 8px; box-shadow: 0 -6px 18px rgba(0,0,0,.35); }
.tm.past { border-top-color: var(--warn); }
.tm-row { display: flex; align-items: center; gap: 8px; font-size: 12.5px; flex-wrap: wrap; }
.tm-row input[type=date] { background: var(--panel-2); color: var(--text); border: 1px solid #34406b; border-radius: 6px; padding: 3px 6px; font: inherit; color-scheme: dark; }
.tm-row button { display: inline-flex; align-items: center; gap: 4px; background: var(--panel-2); border: 1px solid #34406b; border-radius: 6px; padding: 3px 7px; }
.tm-row button:hover { border-color: #6b78ad; }
.tm-time { min-width: 70px; text-align: center; font-weight: 700; font-variant-numeric: tabular-nums; }
.tm.past .tm-time { color: var(--warn); }
.tm-live.on { border-color: var(--ok); color: var(--ok); }
.tm-note { color: var(--muted); font-size: 11.5px; margin-left: 6px; }
.tm-bar { position: relative; height: 40px; background: #18203d; border: 1px solid var(--line); border-radius: 6px; cursor: ew-resize; touch-action: none; overflow: hidden; }
.tm-hour { position: absolute; top: 0; bottom: 0; width: 1px; background: #222b4d; pointer-events: none; }
.tm-hour.major { background: #34406b; }
.tm-hour i { position: absolute; top: 2px; left: 4px; font-style: normal; font-size: 10px; color: var(--muted); white-space: nowrap; }
.tm-cover { position: absolute; bottom: 0; height: 5px; background: rgba(76,195,138,.45); pointer-events: none; }
.tm-change { position: absolute; bottom: 5px; width: 3px; margin-left: -1px; background: var(--hot); border-radius: 1px; opacity: .85; }
.tm-now { position: absolute; top: 0; bottom: 0; width: 1px; background: var(--ok); pointer-events: none; }
.tm-cursor { position: absolute; top: 0; bottom: 0; width: 2px; margin-left: -1px; background: var(--warn); pointer-events: none; }
.tm-cursor.live { background: var(--ok); }
.tm-cursor i { position: absolute; bottom: 7px; left: 5px; font-style: normal; font-size: 10.5px; font-weight: 700; color: var(--warn);
  background: #18203d; padding: 0 3px; border-radius: 3px; white-space: nowrap; }
.tm-cursor.live i { color: var(--ok); }
/* Keep React Flow's controls and minimap above the bar. */
.canvas.tm-on .react-flow__panel.bottom { margin-bottom: 150px; }
/* Viewing the past: a thin amber frame around the map. */
.canvas.tm-past::after { content: ''; position: absolute; inset: 0; border: 2px solid var(--warn); pointer-events: none; z-index: 7; }
.tool-toggle.disabled { opacity: .45; cursor: default; }

/* Time Machine v2: transport, zoom chips, snapshot dots, hover, changes row */
.tm-transport { display: inline-flex; gap: 2px; }
.tm-transport button { padding: 3px 6px; }
.tm-play { min-width: 30px; justify-content: center; }
.tm-spans { display: inline-flex; gap: 2px; margin-left: 4px; }
.tm-spans button { padding: 2px 7px; font-size: 11.5px; }
.tm-spans button.on { border-color: var(--accent); color: #cfe0ff; }
.tm-snap { position: absolute; bottom: 7px; width: 5px; height: 5px; margin-left: -2.5px; border-radius: 50%; background: #8f9ac4; pointer-events: none; }
.tm-snap.on { background: var(--warn); width: 7px; height: 7px; margin-left: -3.5px; bottom: 6px; }
.tm-hover { position: absolute; top: 0; bottom: 0; width: 1px; background: rgba(255,255,255,.35); pointer-events: none; }
.tm-hover i { position: absolute; top: 14px; left: 5px; font-style: normal; font-size: 10.5px; color: #d9dbe0; background: #18203d; padding: 0 3px; border-radius: 3px; white-space: nowrap; }
.tm-changes { display: flex; gap: 6px; align-items: center; overflow-x: auto; white-space: nowrap; padding-bottom: 2px; min-height: 24px; }
.tm-changes-title { color: var(--muted); font-size: 11.5px; margin-right: 4px; }
.tm-chg { background: var(--panel-2); border: 1px solid #34406b; border-left-width: 3px; border-radius: 5px; padding: 2px 8px; font-size: 11.5px; flex: none; }
.tm-chg b { font-weight: 600; margin-right: 3px; }
.tm-chg.ok { border-left-color: var(--ok); } .tm-chg.bad { border-left-color: var(--bad); } .tm-chg.warn { border-left-color: var(--warn); }
.tm-chg:hover { border-color: #6b78ad; }
/* WAP / switch on-off group: "+N" more devices did the same. */
.tm-flip em { font-style: normal; font-weight: 700; font-size: 10.5px; margin-left: 6px; padding: 1px 6px; border-radius: 8px; background: rgba(240,82,90,.18); color: #ff8a8f; }
.tm-flip.ok em { background: rgba(95,211,138,.16); color: #7fe0a3; }
.tm-change.down { background: var(--bad); opacity: 1; width: 4px; }
.tm-change.up { background: var(--ok); opacity: 1; width: 4px; }
/* Changed in the viewed snapshot */
.sw.changed, .leaf.changed .leaf-box { box-shadow: 0 0 0 3px rgba(179,157,219,.55), 0 0 14px rgba(179,157,219,.45); border-color: #b39ddb; }
.port.changed { background: rgba(179,157,219,.18); }
.port.changed .plabel { color: #e3d9ff; }

/* ── View switch ── */
.viewswitch { display: inline-flex; border: 1px solid #34406b; border-radius: 7px; overflow: hidden; margin-right: 6px; }
.actions .viewswitch button { border: 0; border-radius: 0; background: var(--panel-2); padding: 5px 11px; }
.actions .viewswitch button + button { border-left: 1px solid #34406b; }
.actions .viewswitch button.on { background: #2b4a7a; color: #fff; }

/* ── Building view (NOC style) ── */
.bv { position: absolute; inset: 0; display: grid; grid-template-columns: minmax(300px, 380px) minmax(0, 1fr);
  grid-template-rows: minmax(0, 1fr); gap: 14px; padding: 14px; background: #1b2340; overflow: hidden; }
/* Panels fill the screen height; their contents scroll inside, so the floor table's label line stays put. */
.bv-floors { min-height: 0; overflow-x: clip; }
.canvas.tm-on .bv { bottom: 132px; }
.bv-panel { background: #212b4d; border: 1px solid #2c3963; border-radius: 10px; padding: 14px; display: flex; flex-direction: column; min-height: 0; }
.bv-panel h2 { margin: 0 0 12px; font-size: 16px; font-weight: 600; text-align: center; color: #eef1fa; }
.bv-panel h2 span { font-weight: 400; color: #b8c0dc; }
.bv-rows { display: flex; flex-direction: column; gap: 7px; overflow-y: auto; flex: 1; min-height: 0; padding-top: 6px; }
/* Floors start at the bottom (lowest floor by the labels) and grow upward. */
.bv-rows > :first-child { margin-top: auto; }
/* The floor table fills the panel; its column labels sit at the bottom of the screen. */
.bv-floors .bv-head { margin-top: 10px; padding-top: 10px; border-top: 1px solid #2c3963; }
.bv-row { display: grid; grid-template-columns: 70px 1fr 1fr 1fr 1fr; gap: 4px; align-items: center; background: transparent; border: 2px solid transparent;
  border-radius: 6px; padding: 2px; text-align: center; }
.bv-row.on { border-color: #4f8cff; }
.bv-row:not(.bv-head):hover { background: rgba(255,255,255,.04); }
.bv-floorno { background: #2a3560; border-radius: 4px; padding: 5px 0; font-size: 12px; color: #c9d1ef; }
.bv-head { margin-top: 8px; font-size: 12px; color: #c9d1ef; }
.bv-head .bv-floorno { background: transparent; }
.bv-cell { position: relative; border-radius: 4px; padding: 5px 0; font-size: 12.5px; font-weight: 600; color: #10241a; }
/* Count of down devices, as a notification circle on the cell's corner. */
.bv-badge { position: absolute; top: -6px; right: -4px; min-width: 17px; height: 17px; padding: 0 4px; border-radius: 9px;
  background: #f0525a; color: #fff; font: 700 10px/13px system-ui, sans-serif; font-style: normal; text-align: center;
  border: 2px solid #212b4d; box-sizing: border-box; pointer-events: none; }
.bv-cell.active { background: #5fd38a; }
.bv-cell.attention { background: #f2b23c; color: #2b1d00; }
.bv-cell.inactive { background: #f0525a; color: #fff; }
.bv-cell.na { background: #2a3560; color: #7d88b3; font-weight: 400; }
.bv-floor { overflow-y: auto; gap: 10px; }
/* Boxes never squeeze (that clipped the switch faceplate); the panel scrolls instead. */
.bv-floor > * { flex-shrink: 0; }
.bv-floor-head { position: relative; container-type: inline-size; }
.bv-floor-head h2 { margin-bottom: 0; }
/* The status legend shares the floor title line. */
.bv-floor-head .bv-legend { position: absolute; right: 0; top: 2px; }
/* Keep the title clear of the legend; in a narrow panel the legend drops below the title. */
.bv-floor-head h2 { padding: 0 230px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@container (max-width: 640px) {
  .bv-floor-head h2 { padding: 0; }
  .bv-floor-head .bv-legend { position: static; justify-content: center; margin-bottom: 6px; }
}
.bv-legend { display: flex; gap: 12px; justify-content: flex-end; font-size: 11.5px; color: #c9d1ef; }
.bv-legend.small { font-size: 11px; margin-left: auto; gap: 10px; }
.bv-legend i { display: inline-block; width: 9px; height: 9px; border-radius: 2px; margin-right: 4px; vertical-align: -1px; }
.bv-legend i.active, .bv-legend i.gig { background: #5fd38a; }
.bv-legend i.attention, .bv-legend i.slow { background: #f2b23c; }
.bv-legend i.inactive { background: #f0525a; }
.bv-legend i.down { background: #34406b; }
.bv-card { background: #18203d; border-radius: 8px; padding: 9px 14px; }
.bv-card h3 { margin: 0 0 6px; font-size: 13px; font-weight: 600; color: #e3e8f8; }
.bv-tiles { display: flex; flex-wrap: wrap; gap: 7px; }
.bv-tile { width: 24px; height: 24px; border-radius: 4px; border: 0; display: grid; place-items: center; color: #10241a; padding: 0; }
.bv-tile.active { background: #5fd38a; } .bv-tile.attention { background: #f2b23c; color: #2b1d00; } .bv-tile.inactive { background: #f0525a; color: #fff; }
.bv-tile.on { outline: none; box-shadow: 0 0 0 3px #3b82f6; }
.bv-hex { width: 28px; height: 32px; border: 0; padding: 3px; background: transparent;
  clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%); }
.bv-hex > i { display: block; width: 100%; height: 100%; clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%); }
.bv-hex.active > i { background: #5fd38a; } .bv-hex.attention > i { background: #f2b23c; } .bv-hex.inactive > i { background: #f0525a; }
.bv-hex:hover > i { filter: brightness(1.1); }
/* Selected AP: a blue frame that follows the hexagon */
.bv-hex.on { outline: none; background: #3b82f6; }
.bv-sw-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 6px; }
.bv-sw-head h3 { margin: 0; }
.bv-sw-tabs { display: flex; flex-wrap: wrap; gap: 3px; }
.bv-sw-tabs button { min-width: 24px; height: 20px; border: 0; border-radius: 3px; font-size: 11px; font-weight: 600; padding: 0 5px; color: #10241a; }
.bv-sw-tabs button.active { background: #5fd38a; } .bv-sw-tabs button.attention { background: #f2b23c; } .bv-sw-tabs button.inactive { background: #f0525a; color: #fff; }
.bv-sw-tabs button.on { box-shadow: 0 0 0 3px #3b82f6; }
/* One line of chips (the rest fold into "+N"); many switches get the whole line under the title. */
.bv-sw-tabs.one-line { flex-wrap: nowrap; overflow: hidden; }
.bv-sw-tabs.full { flex: 1 1 100%; min-width: 0; }
.bv-sw-tabs button { flex: none; }
.bv-sw-tabs button.more { background: #2b3766; color: #dfe5f7; }
.bv-sw-tabs button.more:hover { background: #34427a; }
/* Between the IDF switches (48P, 24P) and the NID switches (1, 2, 3…). SEP_PX in buildingView. */
.bv-sw-tabs .sep { flex: none; align-self: center; width: 1px; height: 16px; margin: 0 4px; background: #5d678f; }
.bv-face { position: relative; border-radius: 8px; padding: 8px 14px 13px;
  background: linear-gradient(180deg, #1f2850 0%, #161e3b 100%);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.05), inset 0 -2px 6px rgba(0,0,0,.35), 0 2px 8px rgba(0,0,0,.25); }
.bv-face-top { display: flex; align-items: baseline; gap: 10px; margin-bottom: 6px; }
.bv-face-name { font-size: 12px; font-weight: 600; color: #dfe4f6; }
.bv-face-model { font-size: 10.5px; color: #8f9ac4; }
.bv-face-leds { margin-left: auto; font-size: 9.5px; letter-spacing: .06em; color: #8f9ac4; display: inline-flex; align-items: center; gap: 4px; }
.bv-face-leds i { width: 6px; height: 6px; border-radius: 50%; background: #5d678f; }
.bv-face-leds i.on { background: #5fd38a; box-shadow: 0 0 6px rgba(95,211,138,.7); }
/* One port size for every switch, from the panel width: 24 copper + 2 SFP columns always fit. */
.bv-face { container-type: inline-size; }
/* Port width from the panel width (24 copper + 2 SFP columns always fit), 16–34px. */
.bv-face-ports { --port: clamp(16px, calc((100cqw - 26 * 4px - 24px) / 26), 34px);
  /* Ports grow taller (up to 1.35× their width) to fill the switch box's height. */
  --port-h: clamp(var(--port), calc((100cqh - 81px - var(--nums, 0px) - var(--legend, 0px)) / 2), calc(var(--port) * 1.35));
  display: grid; column-gap: 4px; row-gap: 0; justify-content: start; padding: 3px; margin: auto 0;
  grid-template-rows: auto var(--port-h) calc(var(--port-h) + 4px) auto;
  /* Always two rows tall (small one-row NIDs and "no switch" included). */
  min-height: calc(2 * var(--port-h) + 4px + 6px); }
.bv-port.r2 { margin-top: 4px; }
/* Port numbers (odd above, even below), only when the switch box has room for them. */
.bv-pnum { display: none; text-align: center; font-size: 9px; line-height: 12px; color: #6b74a0; font-variant-numeric: tabular-nums; }
.bv-face.empty { background: transparent; box-shadow: none; border: 1px dashed #2c3963; }
.bv-face-sfp-label { align-self: end; justify-self: center; height: 0; overflow: visible; margin-bottom: -4px; line-height: 1;
  font-size: 9px; letter-spacing: .1em; color: #6b74a0; pointer-events: none; white-space: nowrap; }
/* Matte ports: soft color, inner shade, no gloss */
.bv-port { width: var(--port); height: var(--port-h, var(--port)); border: 0; border-radius: 4px; display: grid; place-items: center;
  padding: 0; color: #fff; box-shadow: inset 0 -2px 0 rgba(0,0,0,.22), inset 0 1px 0 rgba(255,255,255,.12); }
.bv-port.gig, .bv-port.up { background: #5fd38a; }
.bv-port.slow, .bv-port.attention { background: #f2b23c; color: #2b1d00; }
.bv-port.disabled { background: #b8bfd6; color: #2c375f; }
.bv-port.inactive { background: #f0525a; color: #fff; }
.bv-port.down { background: #2c375f; color: #7d88b3; box-shadow: inset 0 2px 3px rgba(0,0,0,.35); }
.bv-port.unused { background: #1d2547; color: #4d5781; cursor: default; box-shadow: inset 0 2px 3px rgba(0,0,0,.35); }
.bv-port.sfp { border-radius: 3px; outline: 1px solid #4a5684; outline-offset: 1px; }
.bv-port.on { outline: none; box-shadow: 0 0 0 3px #3b82f6; }

/* ── IoT view ── */
.iot { position: absolute; inset: 0; display: grid; grid-template-columns: minmax(220px, 300px) minmax(0, 1fr); gap: 14px; padding: 14px;
  background: #1b2340; overflow: hidden; }
.canvas.tm-on .iot { bottom: 132px; }
.iot-cats { background: #212b4d; border: 1px solid #2c3963; border-radius: 10px; padding: 14px; display: flex; flex-direction: column; gap: 10px; overflow-y: auto; }
.iot-cat { display: flex; align-items: center; gap: 10px; background: #2a3560; border: 2px solid transparent; border-left: 4px solid #5fd38a;
  border-radius: 6px; padding: 10px 12px; text-align: left; }
.iot-cat.bad { border-left-color: #f0525a; }
.iot-cat.on { border-color: #4f8cff; border-left-color: inherit; }
.iot-cat.on.bad { border-left-color: #f0525a; }
.iot-cat.on:not(.bad) { border-left-color: #5fd38a; }
.iot-cat:hover { background: #303d6c; }
.iot-cat-icon { width: 30px; height: 30px; border-radius: 6px; background: #3a4775; display: grid; place-items: center; flex: none; }
.iot-cat-name { flex: 1; font-size: 13.5px; color: #eef1fa; }
.iot-cat-count { font-weight: 600; color: #5fd38a; font-variant-numeric: tabular-nums; }
.iot-cat.bad .iot-cat-count { color: #f0525a; }
.iot-table { background: #212b4d; border: 1px solid #2c3963; border-radius: 10px; display: flex; flex-direction: column; min-height: 0; }
.iot-head { position: relative; display: flex; align-items: center; padding: 16px 20px 8px; gap: 12px; }
.iot-head h2 { margin: 0 auto 0 0; font-size: 17px; font-weight: 600; color: #eef1fa; display: flex; align-items: center; gap: 8px; }
/* A list's data status, shown when its icon is hovered or focused (iotView.tsx). */
.iot-source-tip { position: relative; display: inline-flex; color: #8f9ac4; cursor: help; border-radius: 4px; }
.iot-source-tip:hover, .iot-source-tip:focus-visible { color: #d9def2; outline: none; }
.iot-source-tip:focus-visible { box-shadow: 0 0 0 2px var(--accent); }
.iot-source-tip [role="tooltip"] { display: none; position: absolute; top: calc(100% + 8px); left: -8px; z-index: 5; width: max-content; max-width: 440px; padding: 7px 10px; background: #10162e; border: 1px solid #34406b; border-radius: 6px; box-shadow: 0 8px 24px rgba(0, 0, 0, .35); font-size: 12px; font-weight: 400; line-height: 1.45; color: #d9def2; white-space: normal; pointer-events: none; }
.iot-source-tip:hover [role="tooltip"], .iot-source-tip:focus-visible [role="tooltip"] { display: block; }
/* Where the cloud rows (PDK, ButterflyMX) came from: live, or a dashboard read and when. */
.iot-source { padding: 0 20px 8px; font-size: 11.5px; color: #8f9ac4; }
.iot-link { background: none; border: 0; padding: 0; font: inherit; color: #9fb4ff; cursor: pointer; text-decoration: underline; }
.iot-link:disabled { color: #8f9ac4; cursor: default; text-decoration: none; }
.bms-points { max-height: 420px; overflow: auto; margin-top: 6px; }
.bms-points .kv span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bms-off { color: #ff8a7a; }
/* The BMS's heat pumps on the Map (HVAC layer) and in the side panel: a fan that spins while it runs. */
.mv-dev.mv-hp .mv-pin { color: #0f8a9d; }
.mv-dev.mv-hp.approx .mv-pin { border-style: dashed; }
.mv-dev.mv-solar .mv-pin { color: #e0a526; }
/* A plant component's stats, on it (plantPanel.tsx), in the portal's yellow on black. */
.mv-plant .plant-tag { position: absolute; left: 0; top: 0; transform: translate(-50%, calc(-100% - var(--tag-up, 0px))); display: flex; align-items: center; gap: 5px; padding: 2px 7px; border-radius: 4px; background: rgba(8, 10, 14, .86); border: 1px solid rgba(255, 255, 255, .16); color: #f6e24a; font-size: 11px; line-height: 1.3; white-space: nowrap; cursor: pointer; }
.mv-plant .plant-tag b { color: #fff; font-weight: 600; }
.mv-plant .plant-tag i { width: 7px; height: 7px; border-radius: 50%; background: #7d8590; flex: none; }
.mv-plant.on .plant-tag { border-color: #7aa7ff; }
.mv-plant.on .plant-tag i, .plant-state.on { background: #33c46a; }
.mv-plant.alarm .plant-tag { border-color: #e5484d; }
.mv-plant.alarm .plant-tag i, .plant-state.alarm { background: #e5484d; }
.mv-plant.reading .plant-tag i { background: #f6e24a; }
.plant-state { display: inline-block; margin-bottom: 8px; padding: 2px 9px; border-radius: 4px; background: #7d8590; color: #fff; font-size: 12px; font-weight: 600; }
.plant-state.reading { background: #4a5261; }
.role-plant { color: #0f8a9d; }
/* A meter panel's tag (electricityPanel.tsx): the meters' make over them, and WIP in its panel and on the Electricity tab. */
.mv-meters .plant-tag { color: #fff; letter-spacing: .04em; }
.role-meters { color: #e0a526; }
.elec-wip { display: inline-block; padding: 2px 9px; border-radius: 4px; background: #4a5261; color: #fff; font-size: 12px; font-weight: 600; letter-spacing: .04em; }
.elec-tile span { display: inline-flex; align-items: center; gap: 5px; }
/* Relocate, for a heat pump (heatPumpTools.ts): the pins let presses through to its cabinet. */
.hp3d-relocating .mv3d-pin .mv-dev { pointer-events: none; }
canvas.hp3d-moving { cursor: grabbing; }
.hp3d-hint { position: absolute; left: 50%; bottom: 68px; transform: translateX(-50%); z-index: 6; padding: 7px 13px; border-radius: 8px;
  background: rgba(15, 21, 42, .94); color: #eef1fa; border: 1px solid rgba(76, 195, 138, .55); font-size: 12px; white-space: nowrap;
  box-shadow: 0 4px 14px rgba(5, 10, 25, .45); pointer-events: none; }
.hp-spin { animation: hp-spin 1.1s linear infinite; transform-origin: 50% 50%; }
@keyframes hp-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .hp-spin { animation-duration: 6s; } }
.bms-now { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 4px 0 12px; }
.bms-now .bms-temp { display: flex; flex-direction: column; font-size: 30px; font-weight: 700; line-height: 1.1; }
.bms-now .bms-temp small { font-size: 11px; font-weight: 400; color: var(--muted); }
.bms-now .bms-fan { display: flex; flex-direction: column; align-items: center; gap: 4px; font-size: 12px; color: var(--muted); }
.bms-now .bms-fan.on { color: #2fbf71; }
.bms-now.down .bms-temp, .bms-now.down .bms-fan { color: #ff8a7a; }
.bms-filter { width: 100%; margin-top: 8px; padding: 4px 8px; font: inherit; font-size: 12px; background: transparent; color: inherit; border: 1px solid var(--line, #2c355a); border-radius: 6px; }
.iot-search { display: inline-flex; align-items: center; gap: 6px; background: #18203d; border: 1px solid #34406b; border-radius: 6px; padding: 4px 8px; color: #9aa4cb; }
.iot-search input { background: transparent; border: 0; outline: 0; color: #eef1fa; font: inherit; font-size: 12.5px; width: 190px; }
.iot-scroll { overflow: auto; flex: 1; }
.iot table { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.iot th { position: sticky; top: 0; background: #212b4d; text-align: left; font-weight: 500; color: #9aa4cb; padding: 10px 10px; z-index: 1; white-space: nowrap; }
/* Smart locks carry a Battery column: tighter cells keep every row button in view. */
.iot table.locks th, .iot table.locks td { padding-left: 7px; padding-right: 7px; }
.iot th.sortable { cursor: pointer; user-select: none; }
.iot th.sortable:hover, .iot th.sorted { color: #eef1fa; }
.iot th.sortable svg { vertical-align: -2px; margin-left: 3px; }
.iot td { padding: 8px 10px; color: #e3e8f8; border-top: 1px solid #2a3560; white-space: nowrap; }
.iot td:first-child { max-width: 190px; overflow: hidden; text-overflow: ellipsis; }
/* Location and Last seen may wrap so the actions column always fits. */
.iot td:nth-child(2), .iot td:nth-child(7) { white-space: normal; min-width: 70px; }
.iot td:first-child > div { overflow: hidden; text-overflow: ellipsis; }
.iot tbody tr { cursor: pointer; }
.iot tbody tr:nth-child(odd) td { background: rgba(255,255,255,.025); }
.iot tbody tr:hover td { background: #2a3560; }
.iot tbody tr.on td { background: #2b4a7a; }
/* A cloud device: not a network device of its own (a PDK door is its board's). */
.iot tbody tr.iot-cloud:not([title]) { cursor: default; }
.iot-name { font-weight: 500; }
.iot-alt { font-size: 11px; color: #8f9ac4; font-family: ui-monospace, SFMono-Regular, monospace; }
.iot-third { font-size: 11.5px; font-weight: 600; color: #c9d1ef; }
.iot-third.none { font-weight: 400; font-style: italic; color: #8f9ac4; }
.iot-view { display: inline-grid; place-items: center; width: 30px; height: 28px; border: 1px solid #34406b; background: #18203d; color: #9aa4cb; border-radius: 6px; cursor: pointer; }
.iot-view:hover, .iot-view.on { color: #eef1fa; border-color: var(--accent); }
.iot-view:disabled { cursor: progress; }
.iot-view.busy svg { animation: cam-spin 1s linear infinite; }
/* One camera in full view (CameraFull, a double-clicked tile or row): its picture over the whole centre section. */
.iot-full { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.iot-full-title { flex: 1; min-width: 0; display: flex; align-items: baseline; gap: 10px; overflow: hidden; }
.iot-full-title h2 { margin: 0; flex: 0 1 auto; min-width: 3em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.iot-full-title span { flex: 1 1 0; min-width: 0; font-size: 12px; color: #8f9ac4; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.iot-full-title span .iot-dot { display: inline-block; margin-right: 6px; vertical-align: 1px; }
.iot-full-place { flex: none; }
.iot-full-pic { position: relative; flex: 1; min-height: 0; padding: 2px 8px 10px; }
.iot-full-place { font-size: 12px; color: #8f9ac4; white-space: nowrap; font-variant-numeric: tabular-nums; }
/* A cloud pin on the plan: dashed where its spot was inferred. */
.mv-dev.mv-cloud .mv-pin { color: #7b3fb0; }
.mv-dev.mv-cloud.role-intercom .mv-pin { color: #5e35b1; }
.mv-dev.mv-cloud.approx .mv-pin { border-style: dashed; }
/* Press and hold a door to open it (doorHold.tsx): a ring fills round its icon over 5 s, a tooltip over it. */
.door-hold-ring { position: absolute; left: -9px; top: -9px; width: calc(100% + 18px); height: calc(100% + 18px); transform: rotate(-90deg); pointer-events: none; overflow: visible; }
.door-hold-ring circle { fill: none; stroke-width: 3.5; stroke: transparent; }
.door-hold-ring .fill { stroke: var(--ok); stroke-dasharray: 100; stroke-dashoffset: 100; stroke-linecap: round; }
.door-hold-ring.holding .track { stroke: rgba(76, 195, 138, .25); }
.door-hold-ring.holding .fill { animation: door-hold-fill linear forwards; }
.door-hold-ring.opening .fill, .door-hold-ring.confirming .fill, .door-hold-ring.opened .fill { stroke-dashoffset: 0; }
.door-hold-ring.opening .fill, .door-hold-ring.confirming .fill { animation: door-hold-pulse .8s ease-in-out infinite alternate; }
.door-hold-ring.unconfirmed .fill { stroke: #f2a23c; stroke-dashoffset: 0; }
.door-hold-ring.failed .fill { stroke: var(--bad); stroke-dashoffset: 0; }
@keyframes door-hold-fill { to { stroke-dashoffset: 0; } }
@keyframes door-hold-pulse { to { opacity: .35; } }
.mv-dev.holdable { touch-action: none; user-select: none; -webkit-user-select: none; }
.door-hold-tip { position: absolute; left: 0; bottom: 30px; transform: translateX(-50%); display: none; white-space: nowrap; background: #0f152a; color: #eef1fa;
  font-size: 11px; font-weight: 600; padding: 4px 8px; border-radius: 5px; box-shadow: 0 2px 8px rgba(10, 18, 40, .4); pointer-events: none; z-index: 4; }
.mv-dev.holdable:hover .door-hold-tip, .mv-dev.holdable:not(.hold-idle) .door-hold-tip { display: block; }
.cd-cmds button.door-hold { touch-action: none; user-select: none; -webkit-user-select: none; }
.door-hold-icon { position: relative; display: inline-grid; place-items: center; width: 16px; height: 16px; }
.door-hold-icon .door-hold-ring { left: -6px; top: -6px; width: calc(100% + 12px); height: calc(100% + 12px); }
.door-hold-icon .door-hold-ring circle { stroke-width: 4; }
/* An access-controlled door drawn as itself (its symbol from the drawings): red while closed and
   locked, green while open or unlocked, grey when unknown; lit up under the pointer or when open. */
.mv-doors { position: absolute; left: 0; top: 0; pointer-events: none; overflow: visible; }
.mv-door-g { pointer-events: all; cursor: pointer; --tone: #94a3b8; }
.mv-door-g.closed { --tone: #ef4444; }
.mv-door-g.open, .mv-door-g.unlocked { --tone: #22c55e; }
/* Open while locked: held or forced open. */
.mv-door-g.held { --tone: #f59e0b; }
/* A leaf turns about its hinge as the door position switch reports (the transform's origin and
   angle come from the drawing); its swing arc shows only while it stands open. */
.mv-door-leaf { transition: transform 0.6s cubic-bezier(0.3, 0.7, 0.3, 1); }
.mv-door-g .mv-door-arc { stroke-dasharray: 4 4; opacity: 0.55; transition: opacity 0.4s ease; }
.mv-door-g.shut .mv-door-arc { opacity: 0; }
/* Paints over the drawing's open leaf and arc (in image px, so it scales with the drawing) while
   the door is shut. */
.mv-door-g .mv-door-mask polyline { stroke: #fff; stroke-width: 6; vector-effect: none; filter: none; animation: none; stroke-linecap: round; }
/* The reader by the latch: green while the lock is released, red while locked. */
.mv-reader { stroke: #fff; stroke-width: 1.5; vector-effect: non-scaling-stroke; fill: #94a3b8; transition: fill 0.2s ease; }
.mv-reader.locked { fill: #ef4444; filter: drop-shadow(0 0 4px #ef4444); }
.mv-reader.unlocked { fill: #22c55e; filter: drop-shadow(0 0 6px #22c55e) drop-shadow(0 0 10px #22c55e); }
.mv-door-g polyline { fill: none; stroke: var(--tone); stroke-width: 2.5; vector-effect: non-scaling-stroke; stroke-linecap: round; stroke-linejoin: round; filter: drop-shadow(0 0 3px var(--tone)); transition: stroke-width 0.15s ease, filter 0.15s ease; }
.mv-door-hit { fill: var(--tone); fill-opacity: 0.08; stroke: var(--tone); stroke-opacity: 0.35; stroke-width: 1; vector-effect: non-scaling-stroke; transition: fill-opacity 0.15s ease; }
.mv-door-g:hover .mv-door-hit, .mv-door-g.on .mv-door-hit { fill-opacity: 0.28; stroke-opacity: 0.9; stroke-width: 2; }
.mv-door-g:hover polyline, .mv-door-g.on polyline { stroke-width: 4; filter: drop-shadow(0 0 8px var(--tone)) drop-shadow(0 0 14px var(--tone)); }
.mv-door-g.open polyline { animation: mv-door-pulse 1s ease-in-out infinite alternate; }
@keyframes mv-door-pulse { from { filter: drop-shadow(0 0 4px var(--tone)); } to { filter: drop-shadow(0 0 12px var(--tone)) drop-shadow(0 0 20px var(--tone)); } }
.mv-door-g text { display: none; font: 600 calc(12px * var(--inv, 1)) system-ui, sans-serif; fill: #10182f; paint-order: stroke; stroke: #fff; stroke-width: calc(3px * var(--inv, 1)); text-anchor: middle; }
.mv-door-g:hover text, .mv-door-g.on text { display: block; }
/* A cloud door, elevator, intercom or lock in the side panel (cloudDetails.tsx). */
.cd-state { display: inline-block; font-size: 12px; font-weight: 700; padding: 3px 10px; border-radius: 4px; background: #475569; color: #fff; margin-bottom: 4px; }
.cd-state.closed { background: #ef4444; box-shadow: 0 0 10px rgba(239, 68, 68, 0.5); }
.cd-state.open, .cd-state.unlocked { background: #22c55e; color: #052e14; box-shadow: 0 0 10px rgba(34, 197, 94, 0.6); }
.cd-state.held { background: #f59e0b; color: #2b1d00; box-shadow: 0 0 10px rgba(245, 158, 11, 0.6); }
.cd-cmds { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 6px; }
.cd-cmds button, .cd-cmds a { display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px; border-radius: 6px; border: 1px solid var(--line); background: var(--panel-2); color: var(--text); font: inherit; font-size: 12px; text-decoration: none; cursor: pointer; }
.cd-cmds button:hover:not(:disabled), .cd-cmds a:hover { border-color: var(--accent); }
.cd-cmds button:disabled { opacity: 0.5; cursor: not-allowed; }
.cd-link { color: var(--accent); cursor: pointer; }
/* A Twin pin beside a device's name: shows it on the Twin. */
.twin-link { display: inline-flex; align-items: center; vertical-align: -2px; margin-left: 6px; padding: 2px 3px; border: 0; border-radius: 4px; background: transparent; color: #c9d1ef; cursor: pointer; }
.twin-link:hover { background: #34406b; color: #fff; }
.cd-rule { display: grid; grid-template-columns: auto 1fr; gap: 2px 8px; align-items: center; padding: 4px 0; font-size: 12px; }
.cd-rule .iot-pill { grid-row: span 2; align-self: start; min-width: 52px; }
.cd-rule b { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cd-search { display: flex; margin: 2px 0 6px; }
.cd-search input { width: 100%; }
.cd-event { padding: 5px 0; border-top: 1px solid var(--line); font-size: 12px; }
.cd-event > div:first-child { display: flex; justify-content: space-between; gap: 8px; align-items: center; }
.cd-event .mono { font-size: 11.5px; color: var(--muted); }
.cd-who { font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cd-more { width: 100%; margin-top: 6px; padding: 5px; border-radius: 6px; border: 1px solid var(--line); background: var(--panel-2); color: var(--text); font: inherit; font-size: 12px; }
/* The door panel's access log with video (CJ 2026-11-07): a filter for the accesses a camera
   recorded, a mark beside their time, and the clip playing in its row. */
.cd-log-tools { display: flex; gap: 6px; align-items: center; margin: 2px 0 6px; }
.cd-log-tools .cd-search { flex: 1; margin: 0; }
.cd-chip { display: inline-flex; align-items: center; gap: 5px; flex: none; height: 28px; padding: 0 9px; border: 1px solid var(--line); border-radius: 14px;
  background: var(--panel-2); color: var(--text); font: inherit; font-size: 11.5px; cursor: pointer; white-space: nowrap; }
.cd-chip b { font-weight: 600; color: var(--muted); }
.cd-chip.on { border-color: #6f7dff; background: linear-gradient(135deg, rgba(79,139,255,.22), rgba(138,92,255,.22)); }
.cd-chip.on b { color: inherit; }
.cd-has-video { margin-left: 6px; vertical-align: -1px; color: #8a9bff; }
.cd-clips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.cd-clip { display: inline-flex; align-items: center; gap: 6px; height: 26px; padding: 0 10px 0 8px; border: 0; border-radius: 6px;
  background: linear-gradient(135deg, #4f8bff, #8a5cff); color: #fff; font: inherit; font-size: 11.5px; font-weight: 600; cursor: pointer;
  box-shadow: 0 1px 6px rgba(79,139,255,.3); }
.cd-clip span { font-weight: 500; opacity: .85; padding-left: 6px; border-left: 1px solid rgba(255,255,255,.35); }
.cd-clip:hover { filter: brightness(1.1); }
.cd-clip:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.clip-inline { margin-top: 6px; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; background: #000; }
.clip-inline-head { display: flex; align-items: center; gap: 6px; padding: 4px 6px 4px 8px; background: #111a33; font-size: 11.5px; }
.clip-inline-head span { flex: 1; color: var(--muted); font-size: 10.5px; }
.clip-inline-head button { display: grid; place-items: center; width: 22px; height: 22px; border: 0; border-radius: 4px; background: none; color: inherit; cursor: pointer; }
.clip-inline-head button:hover { background: rgba(255,255,255,.08); }
.clip-inline video { display: block; width: 100%; aspect-ratio: 16 / 9; background: #000; }
.cloud-details .sh .small { margin-left: auto; font-weight: 400; }
.iot-full-step { position: absolute; top: 50%; z-index: 1; transform: translateY(-50%); display: grid; place-items: center; width: 42px; height: 68px;
  border: 0; border-radius: 9px; background: rgba(15, 21, 48, .62); color: #eef1fa; cursor: pointer; opacity: .6; transition: opacity .12s, background .12s; }
.iot-full-step.prev { left: 18px; }
.iot-full-step.next { right: 18px; }
.iot-full-pic:hover .iot-full-step, .iot-full-step:focus-visible { opacity: 1; }
.iot-full-step:hover { background: #2d4d9a; }
.cam-stage { position: relative; }
.iot-full-pic .cam-stage { height: 100%; }
/* Live video (liveVideo.tsx) over the picture from Ash, shown once its first frame is drawn. */
.live-box { position: absolute; inset: 0; border-radius: 7px; overflow: hidden; background: #0f1530; opacity: 0; pointer-events: none; transition: opacity .2s; }
.live-box.playing { opacity: 1; }
.live-video { display: block; width: 100%; height: 100%; object-fit: contain; }
.cctv-stills { position: fixed; left: 0; bottom: 0; width: 4px; height: 4px; overflow: hidden; opacity: .01; pointer-events: none; }
.live-badge, .live-note { position: absolute; left: 12px; top: 12px; z-index: 2; display: inline-flex; align-items: center; gap: 6px; padding: 3px 8px;
  border-radius: 5px; background: rgba(0, 0, 0, .62); color: #fff; font-size: 11.5px; font-weight: 600; }
.live-badge { font-weight: 700; letter-spacing: .05em; }
.live-badge i { width: 8px; height: 8px; border-radius: 50%; background: #f0525a; animation: live-pulse 1.6s ease-in-out infinite; }
@keyframes live-pulse { 50% { opacity: .3; } }
.live-note { max-width: calc(100% - 140px); }
.live-note.bad { color: #ffb4b4; }
.live-note button { margin-left: 4px; border: 0; border-radius: 4px; padding: 1px 8px; background: #2d4d9a; color: #fff; font: inherit; cursor: pointer; }
.iot-view.live.on { color: #ff9b9b; border-color: #f0525a; }
.iot-view.hd { width: auto; padding: 0 8px; font-size: 11px; font-weight: 700; letter-spacing: .03em; }
.iot-view:disabled:not(.busy) { opacity: .45; cursor: default; }
/* Refresh all's progress or outcome: under the header's right end, so nothing in the row moves. */
.iot-refresh-note { position: absolute; top: calc(100% - 2px); right: 20px; z-index: 3; max-width: calc(100% - 40px); padding: 2px 8px;
  border-radius: 5px; background: rgba(15, 21, 48, .85); font-size: 11.5px; color: #8f9ac4; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.iot-refresh-note.bad { color: #ff8f8f; }
/* Full screen (a camera's full view, or its map panel's picture): the picture and video fill it. */
.iot-full-pic:fullscreen, .cam-photo-stage:fullscreen { display: flex; padding: 0; background: #05070f; }
:fullscreen > .cam-stage { flex: 1; height: 100%; }
:fullscreen .cam-pic { height: 100%; aspect-ratio: auto; border-radius: 0; }
:fullscreen .live-box { border-radius: 0; }
:fullscreen .cam-pic em { right: 14px; bottom: 14px; font-size: 13px; padding: 3px 8px; }
:fullscreen .live-badge, :fullscreen .live-note { left: 16px; top: 16px; font-size: 13px; }
.cam-photo-stage { position: relative; }
/* Taking a new picture, or why it failed: shown over the live video too. */
.cam-stage .cam-pic-over { z-index: 3; }
.cam-photo header button.live.on { color: #ff9b9b; }
.cam-photo header button.hd { width: auto; padding: 0 7px; font-size: 10.5px; font-weight: 700; letter-spacing: .03em; }
.cam-photo header button.hd.on { color: #fff; background: #2d4d9a; }
.cam-photo header button:disabled:not(.busy) { opacity: .45; cursor: default; }
.iot-full-pic .cam-pic { height: 100%; aspect-ratio: auto; }
.iot-full-pic .cam-pic em { right: 10px; bottom: 10px; font-size: 12px; padding: 3px 8px; }
.iot-full-pic .cam-pic-note { font-size: 13px; }
.iot-gallery { padding: 2px 8px 10px; display: flex; flex-direction: column; gap: 10px; }
.iot-gallery h3 { margin: 0 0 4px 2px; font-size: 13px; font-weight: 600; color: #eef1fa; display: flex; align-items: baseline; gap: 8px; }
.iot-gallery h3 span { font-size: 11.5px; font-weight: 400; color: #8f9ac4; }
.iot-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 4px; }
@media (max-width: 900px) { .iot-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .iot-grid { grid-template-columns: 1fr; } }
.iot-tile { display: flex; flex-direction: column; gap: 3px; padding: 2px 2px 3px; text-align: left; color: inherit; font: inherit; background: #18203d; border: 1px solid #2c3963; border-radius: 6px; cursor: pointer; min-width: 0; }
.iot-tile:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.iot-tile .cam-pic { border-radius: 4px; }
.iot-tile .cam-pic em { right: 4px; bottom: 4px; padding: 1px 5px; font-size: 10px; white-space: nowrap; }
.iot-tile .cam-pic-note { padding: 6px; font-size: 11px; }
.cam-gallery-pic { position: relative; }
.cam-sync { position: absolute; top: 5px; right: 5px; display: grid; place-items: center; width: 26px; height: 26px; border: 0; border-radius: 50%; background: rgba(15, 21, 48, .78); color: #eef1fa; cursor: pointer; opacity: 0; transition: opacity .12s; }
.iot-tile:hover .cam-sync, .cam-sync:focus-visible, .cam-sync.busy { opacity: 1; }
.cam-sync:hover { background: #2d4d9a; }
.cam-sync.busy svg { animation: cam-spin 1s linear infinite; }
.iot-tile:hover { border-color: #46548a; }
.iot-tile.on { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.iot-tile-cap { display: flex; align-items: baseline; gap: 6px; padding: 0 3px; font-size: 12px; min-width: 0; }
.iot-tile-cap b { color: #eef1fa; white-space: nowrap; }
.iot-tile-cap span { font-size: 11px; color: #8f9ac4; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.iot-tile-cap .mono { margin-left: auto; flex: none; font-family: ui-monospace, SFMono-Regular, monospace; }
/* The gallery as a live wall (cameraWall.tsx): tiles a row from its header, each tile's live video over its picture, a LIVE dot
   or why it is not live, compact captions at 6 and 8 a row, and the wall full screen. No rounded clip on the wall's videos
   (cheaper for the browser to composite many of them). */
.iot-wall .iot-grid { grid-template-columns: repeat(var(--wall-cols, 3), minmax(0, 1fr)); }
@media (max-width: 560px) { .iot-wall .iot-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.iot-wall.compact { gap: 6px; }
.iot-wall.compact .iot-grid { gap: 3px; }
.iot-wall.compact .iot-tile { gap: 2px; padding: 1px 1px 2px; }
.iot-wall.compact .iot-tile-cap { gap: 4px; padding: 0 2px; font-size: 10.5px; }
.iot-wall.compact .iot-tile-cap b { overflow: hidden; text-overflow: ellipsis; }
.iot-wall.compact .cam-pic em { right: 3px; bottom: 3px; padding: 0 4px; font-size: 9px; }
.iot-wall.compact .cam-pic-note { padding: 3px; font-size: 9.5px; }
.wall-pic { position: relative; }
.wall-pic .cam-sync { z-index: 3; }
.iot-wall .live-box { border-radius: 0; }
.wall-live { position: absolute; left: 4px; top: 4px; z-index: 2; display: inline-flex; align-items: center; gap: 4px; padding: 1px 5px; border: 0;
  border-radius: 4px; background: rgba(0, 0, 0, .62); color: #fff; font: inherit; font-size: 9.5px; font-weight: 700; letter-spacing: .05em; pointer-events: none; }
.wall-live i { width: 6px; height: 6px; border-radius: 50%; background: #f0525a; animation: live-pulse 1.6s ease-in-out infinite; }
.wall-live.bad { color: #ffb4b4; cursor: pointer; pointer-events: auto; }
.wall-live.bad:hover { background: #5a2430; }
.wall-live.limit { color: #f2b23c; font-weight: 600; letter-spacing: 0; }
.wall-status { min-width: 0; font-size: 11.5px; color: #8f9ac4; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-variant-numeric: tabular-nums; }
.wall-cols { display: inline-flex; flex: none; border: 1px solid #34406b; border-radius: 6px; overflow: hidden; }
.wall-cols button { height: 26px; min-width: 24px; padding: 0 6px; border: 0; background: #18203d; color: #9aa4cb; font: inherit; font-size: 11.5px;
  font-weight: 600; cursor: pointer; }
.wall-cols button + button { border-left: 1px solid #34406b; }
.wall-cols button:hover, .wall-cols button.on { color: #eef1fa; background: #2d4d9a; }
.wall-bars { position: sticky; top: 0; z-index: 4; height: 0; overflow: visible; }
.wall-bars > div { display: flex; flex-direction: column; gap: 4px; padding: 4px 8px 0; }
.wall-bar { display: flex; align-items: center; gap: 8px; padding: 5px 10px; border-radius: 6px; background: rgba(45, 77, 154, .94); color: #eef1fa;
  font-size: 12px; box-shadow: 0 2px 10px rgba(5, 7, 15, .5); }
.wall-bar.note { animation: wall-note 5s ease-in-out both; }
@keyframes wall-note { 0% { opacity: 0; } 6% { opacity: 1; } 88% { opacity: 1; } 100% { opacity: 0; } }
.wall-bar button { border: 0; border-radius: 4px; padding: 2px 10px; background: #eef1fa; color: #18203d; font: inherit; font-weight: 600; cursor: pointer; }
.iot-wall-area:fullscreen { overflow: auto; padding: 6px 0; background: #05070f; }
/* The mosaic (cameraWall.tsx CameraMosaic): one 4K video fitted 16:9 into the area (full screen too), its 6 x 6 cameras' names
   over their tiles, a click selecting one and a double-click opening it. */
.mosaic-area { container-type: size; min-height: 0; display: grid; place-items: center; overflow: hidden; background: #05070f; }
.mosaic-stage { position: relative; width: min(100cqw, 100cqh * 16 / 9); aspect-ratio: 16 / 9; background: #0b1024; }
.mosaic-stage .live-box { border-radius: 0; }
.mosaic-grid { position: absolute; inset: 0; z-index: 1; display: grid; grid-template-columns: repeat(var(--mosaic-cols, 6), minmax(0, 1fr));
  grid-template-rows: repeat(var(--mosaic-cols, 6), minmax(0, 1fr)); }
.mosaic-cell { position: relative; min-width: 0; min-height: 0; border: 1px solid rgba(255, 255, 255, .06); cursor: pointer; outline: none; }
.mosaic-cell.empty { cursor: default; }
.mosaic-cell:hover, .mosaic-cell:focus-visible { border-color: rgba(238, 241, 250, .45); }
.mosaic-cell.on { border-color: var(--accent); }
.mosaic-name { position: absolute; left: 3px; bottom: 3px; max-width: calc(100% - 6px); display: inline-flex; align-items: center; gap: 4px;
  padding: 0 4px; border-radius: 3px; background: rgba(5, 7, 15, .55); color: #eef1fa; font-size: clamp(9px, .85cqw, 12px); line-height: 1.5;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; pointer-events: none; }
.mosaic-name .iot-dot { flex: none; }
.mosaic-stage .live-badge.mosaic-badge { left: auto; right: 6px; top: 6px; padding: 1px 6px; font-size: 10.5px; }
.mosaic-stage .live-note { left: 50%; top: 50%; max-width: 70%; transform: translate(-50%, -50%); }
.iot-wall-area:fullscreen .iot-tile { background: #0d1226; border-color: #1b2445; }
/* Not the single camera's full screen look (:fullscreen .cam-pic …): the tiles keep theirs. */
.iot-wall-area:fullscreen .cam-pic { height: auto; aspect-ratio: 16 / 9; border-radius: 4px; }
.iot-wall-area:fullscreen .cam-pic em { right: 4px; bottom: 4px; padding: 1px 5px; font-size: 10px; }
.iot-wall-area:fullscreen .iot-wall.compact .cam-pic em { right: 3px; bottom: 3px; padding: 0 4px; font-size: 9px; }
.iot-dot { flex: none; align-self: center; width: 7px; height: 7px; border-radius: 50%; }
.iot-dot.active { background: #5fd38a; }
.iot-dot.inactive { background: #f0525a; }
.iot-dot.attention { background: #f2b23c; }
.iot td.mono { font-family: ui-monospace, SFMono-Regular, monospace; font-size: 12px; }
.iot td.muted-cell { color: #9aa4cb; }
.iot-pill { display: inline-block; min-width: 36px; text-align: center; border-radius: 3px; padding: 1px 8px; font-size: 11.5px; font-weight: 600; }
.iot-pill.active { background: #5fd38a; color: #10241a; }
.iot-pill.inactive { background: #f0525a; color: #fff; }
.iot-pill.attention { background: #f2b23c; color: #2b1d00; }
/* What Atlas can change on an Access Control page (accessView.tsx ChangesStrip): each kind, ready or why not on hover. */
.access-changes { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; padding: 8px 20px 4px; }
.iot-pill.idle { background: var(--panel-2); color: var(--muted); border: 1px solid var(--line, #34406b); font-weight: 500; }
/* A lock's battery, drawn like a phone's (BatteryGauge): the fill and the percent share a colour. */
.iot-battery { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }
.iot-battery.good { color: #5fd38a; }
.iot-battery.low { color: #f2b23c; }
.iot-battery.critical { color: #f0525a; }
.iot-battery.unknown { color: #8f9ac4; }
.iot-wifi { margin-left: 6px; vertical-align: -2px; color: #80deea; }
.iot-actions { text-align: right; }
.iot td.iot-actions { padding-left: 4px; padding-right: 8px; }
.iot-actions button { background: transparent; border: 0; color: #c9d1ef; padding: 3px 4px; border-radius: 4px; }
.iot-actions button:hover:not(:disabled) { background: #34406b; color: #fff; }
.iot-actions button:disabled { color: #4d5781; cursor: default; }
/* Brivo's pages in Access Control (brivoTabs.tsx): boards, groups, users, schedules, admins, history. */
.brivo-tabs { display: flex; gap: 2px; padding: 0 16px 6px; border-bottom: 1px solid #2c3963; flex-wrap: wrap; }
.brivo-tabs button { background: transparent; border: 0; border-bottom: 2px solid transparent; color: #8f9ac4; padding: 6px 10px; font-size: 12.5px; }
.brivo-tabs button:hover { color: #d9def2; }
.brivo-tabs button.on { color: #fff; border-bottom-color: #3b82f6; }
.brivo-page { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.brivo-bar { display: flex; align-items: center; gap: 10px; padding: 8px 20px; }
.brivo-bar .iot-source { flex: 1; padding: 0; }
.brivo-empty { padding: 24px 20px; color: #9aa4cb; font-size: 12.5px; }
.brivo-note { padding: 8px 20px; color: #8f9ac4; font-size: 11.5px; }
.iot .brivo-table td { white-space: normal; max-width: none; vertical-align: top; }
.iot .brivo-table tbody tr { cursor: default; }
.iot .brivo-table tbody tr.pick { cursor: pointer; }
/* The Access Control tab (accessView.tsx): the IoT table's look, with no category list beside it. */
.iot.access-tab { grid-template-columns: minmax(0, 1fr); }
.access-tab .brivo-tabs { padding-top: 10px; }
.access-head { display: flex; align-items: center; flex-wrap: wrap; gap: 0 12px; padding-right: 16px; border-bottom: 1px solid #2c3963; }
.access-head .brivo-tabs { flex: 1 1 auto; border-bottom: 0; }
.access-head .brivo-bar { flex: 0 1 auto; min-width: 0; margin-left: auto; padding: 4px 0; }
.access-head .iot-source { flex: 0 1 auto; text-align: right; }
.iot .brivo-table tr.brivo-group td { background: #26315a; border-top-color: #34406b; }
.iot .brivo-table tr.brivo-sub td:first-child { padding-left: 26px; }
.brivo-doors { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.brivo-doors li .iot-alt { margin-left: 6px; }

/* ── App shell: breadcrumb + tabs ── */
.shell { display: flex; flex-direction: column; height: 100%; }
.shell-main { flex: 1; min-height: 0; position: relative; }
/* The header (CJ 2026-11-12: clear, organized, Apple style): one 52px bar. Left: Atlas's mark (home)
   and where you are. Right: the org worked in, Settings and Younity, the account's menu. */
.shell-head { background: #161d3a; border-bottom: 1px solid rgba(255, 255, 255, .08); padding: 0 20px; }
.shell-bar { display: flex; align-items: center; gap: 8px 16px; min-height: 52px; flex-wrap: wrap; }
.crumbs { flex: 1; min-width: 0; display: flex; align-items: center; flex-wrap: wrap; gap: 4px 6px; font-size: 13.5px; color: #a3acd0; }
.crumbs > button.brand { display: inline-flex; align-items: center; gap: 9px; background: transparent; border: 0; border-radius: 9px; padding: 4px 8px 4px 4px; margin-left: -4px; color: #fff; }
.crumbs > button.brand:hover { background: rgba(255, 255, 255, .07); }
.crumbs > button.brand b { font-size: 15px; font-weight: 650; letter-spacing: -.01em; }
.brand-mark { display: block; border-radius: 7px; box-shadow: 0 1px 2px rgba(0, 0, 0, .35), inset 0 0 0 .5px rgba(255, 255, 255, .25); }
.crumb-rule { width: 1px; height: 18px; margin: 0 8px 0 4px; background: rgba(255, 255, 255, .14); }
.crumbs > a { cursor: pointer; color: #a3acd0; padding: 4px 7px; margin: 0 -3px; border-radius: 7px; transition: background .12s, color .12s; }
.crumbs > a:hover { color: #fff; background: rgba(255, 255, 255, .07); }
.crumbs > .here { color: #f5f7fd; font-weight: 600; padding: 4px 0; }
.crumbs > svg { color: #5d678f; flex: none; }
.crumbs button:focus-visible, .crumbs a:focus-visible, .shell-user a:focus-visible, .shell-user button:focus-visible, .tabs button:focus-visible { outline: 2px solid #5b8cff; outline-offset: 1px; }
.tabs { display: flex; gap: 2px; margin: 0 -10px; overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tabs button { position: relative; flex: none; background: transparent; border: 0; color: #98a2c9; padding: 8px 12px 11px; font-size: 13px; font-weight: 500; white-space: nowrap; transition: color .12s; }
.tabs button::after { content: ''; position: absolute; left: 12px; right: 12px; bottom: 0; height: 2px; border-radius: 2px 2px 0 0; background: transparent; transition: background .12s; }
.tabs button:hover { color: #e6eaf8; }
.tabs button.on { color: #fff; }
.tabs button.on::after { background: #5b8cff; }
.shell-msg { padding: 40px; color: #9aa4cb; text-align: center; }

/* ── Buildings page ── */
.bp { position: absolute; inset: 0; overflow: auto; background: #1b2340; padding: 22px 28px 40px; }
.bp-inner { max-width: 1240px; margin: 0 auto; }
.bp h1 { margin: 0 0 12px; font-size: 18px; font-weight: 500; color: #eef1fa; }
.bp h1 span { color: #8f9ac4; font-size: 14px; margin-left: 6px; }
/* The Projects page (CJ 2026-11-12: clear, organized, Apple style). `.pj` is its own; the plain
   `.bp` above is also Settings', the Younity console's and the account page's. */
.bp.pj { background: radial-gradient(1100px 440px at 50% -140px, rgba(91, 140, 255, .17), transparent 70%), #131a33; padding: 34px 32px 56px; }
.pj .bp-inner { max-width: 1280px; }
.pj-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 18px 32px; flex-wrap: wrap; }
.pj-title { min-width: 0; }
.pj-eyebrow { font-size: 11.5px; font-weight: 600; letter-spacing: .07em; text-transform: uppercase; color: #7f8ab5; margin-bottom: 7px; }
.pj h1 { margin: 0; font-size: 32px; line-height: 1.1; font-weight: 700; letter-spacing: -.022em; color: #f5f7fd; }
.pj h1 span { font-size: inherit; font-weight: 400; color: #5f6a94; margin-left: 4px; font-variant-numeric: tabular-nums; }
.pj-sum { display: flex; flex-wrap: wrap; gap: 6px 18px; margin: 11px 0 0; font-size: 13px; color: #a3acd0; font-variant-numeric: tabular-nums; }
.pj-sum span { display: inline-flex; align-items: center; gap: 7px; }
.pj-sum span::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: #6f7aa6; }
.pj-sum .ok::before { background: #34c759; }
.pj-sum .warn::before { background: #ff9f0a; }
.pj-sum .bad::before { background: #ff453a; }
.bp-tools { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.bp-search { display: inline-flex; align-items: center; gap: 8px; height: 36px; width: 280px; padding: 0 8px 0 11px; border: 1px solid rgba(255, 255, 255, .08); border-radius: 10px; background: rgba(255, 255, 255, .06); color: #8f9ac4; transition: border-color .12s, box-shadow .12s, background .12s; }
.bp-search:focus-within { border-color: #5b8cff; background: rgba(255, 255, 255, .09); box-shadow: 0 0 0 3px rgba(91, 140, 255, .25); }
.bp-search input { background: transparent; border: 0; outline: 0; color: #fff; font: inherit; font-size: 13.5px; flex: 1; min-width: 0; }
.bp-search input::placeholder { color: #7f8ab5; }
.bp-search button { display: grid; place-items: center; width: 18px; height: 18px; padding: 0; border: 0; border-radius: 50%; background: rgba(255, 255, 255, .16); color: #131a33; }
.bp-search button:hover { background: rgba(255, 255, 255, .3); }
.bp-group-btn { display: inline-flex; align-items: center; gap: 7px; height: 36px; padding: 0 14px; border: 1px solid rgba(255, 255, 255, .08); border-radius: 10px; background: rgba(255, 255, 255, .06); color: #dfe4f5; font-size: 13.5px; font-weight: 500; cursor: pointer; transition: border-color .12s, background .12s; }
.bp-group-btn:hover { background: rgba(255, 255, 255, .1); color: #fff; }
.bp-group-btn.on { background: rgba(91, 140, 255, .2); border-color: rgba(91, 140, 255, .6); color: #fff; }
.bp-group-btn:focus-visible { outline: 0; border-color: #5b8cff; box-shadow: 0 0 0 3px rgba(91, 140, 255, .25); }
.bp-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 26px 24px; margin-top: 32px; }
/* A card: the photo, then the name, when it was synced, its health and devices. */
.bp-card { position: relative; background: #1b2445; border: 1px solid rgba(255, 255, 255, .07); border-radius: 18px; padding: 0; text-align: left; overflow: hidden; display: flex; flex-direction: column;
  box-shadow: 0 1px 2px rgba(0, 0, 0, .25), 0 14px 32px -22px rgba(0, 0, 0, .75); transition: transform .2s cubic-bezier(.2, .7, .2, 1), box-shadow .2s, border-color .2s; }
.bp-card:hover { transform: translateY(-3px); border-color: rgba(255, 255, 255, .2); box-shadow: 0 2px 4px rgba(0, 0, 0, .3), 0 24px 44px -20px rgba(0, 0, 0, .85); }
.bp-card:active { transform: translateY(-1px); }
.bp-card:focus-visible { outline: 0; border-color: #5b8cff; box-shadow: 0 0 0 4px rgba(91, 140, 255, .35); }
.bp-cover { position: relative; aspect-ratio: 4 / 3; display: flex; align-items: center; justify-content: center; color: rgba(255, 255, 255, .9); }
/* Its code (or how many projects, or buildings) on glass, at the cover's lower left. */
.bp-cover span { position: absolute; z-index: 1; left: 12px; bottom: 12px; max-width: calc(100% - 24px); display: inline-flex; align-items: center; gap: 5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  font-size: 10.5px; font-weight: 600; letter-spacing: .07em; color: #fff; background: rgba(18, 24, 48, .5); border: 1px solid rgba(255, 255, 255, .2); padding: 4px 9px; border-radius: 999px;
  -webkit-backdrop-filter: blur(14px) saturate(160%); backdrop-filter: blur(14px) saturate(160%); }
.bp-cover.photo { background-size: cover; background-position: center; }
.bp-cover.photo::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(12, 17, 36, 0) 58%, rgba(12, 17, 36, .45)); pointer-events: none; }
.bp-body { padding: 14px 16px 15px; }
.bp-name { font-size: 15.5px; font-weight: 600; letter-spacing: -.01em; color: #f5f7fd; margin-bottom: 4px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bp-sub { font-size: 12px; color: #8f9ac4; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; min-height: 21px; }
.bp-tm { display: inline-flex; align-items: center; gap: 4px; color: #c4b5fd; background: rgba(167, 139, 250, .15); border-radius: 999px; padding: 2px 8px; font-size: 10.5px; font-weight: 500; }
.bp-tm.sites { color: #9dbbff; background: rgba(91, 140, 255, .15); }
.bp-foot { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 8px; margin-top: 13px; padding-top: 12px; border-top: 1px solid rgba(255, 255, 255, .07); white-space: nowrap; }
/* Health: a dot and its word on a tint of its color. */
.bp-pill { display: inline-flex; align-items: center; gap: 6px; font-size: 11.5px; font-weight: 600; border-radius: 999px; padding: 3px 10px 3px 8px; }
.bp-pill::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.bp-pill.excellent { color: #4cd97b; background: rgba(52, 199, 89, .14); }
.bp-pill.attention { color: #ffb340; background: rgba(255, 159, 10, .15); }
.bp-pill.critical { color: #ff6961; background: rgba(255, 69, 58, .16); }
.bp-count { margin-left: auto; display: inline-flex; align-items: baseline; gap: 4px; font-size: 13.5px; font-weight: 600; color: #eef1fa; font-variant-numeric: tabular-nums; white-space: nowrap; }
.bp-count i { font-style: normal; font-weight: 400; font-size: 12px; color: #8f9ac4; }
.bp-count em { font-style: normal; font-weight: 500; font-size: 12px; color: #ff6961; margin-left: 6px; }
/* Project groups (projectsPage.tsx): a group's card is a small stack, two cards showing above it. */
.bp-card.bp-group { box-shadow: 0 -8px 0 -4px #2a3564, 0 -15px 0 -8px #222c54, 0 1px 2px rgba(0, 0, 0, .25), 0 14px 32px -22px rgba(0, 0, 0, .75); }
.bp-card.bp-group:hover { box-shadow: 0 -8px 0 -4px #323e72, 0 -15px 0 -8px #283361, 0 2px 4px rgba(0, 0, 0, .3), 0 24px 44px -20px rgba(0, 0, 0, .85); }
.bp-card.bp-group:focus-visible { box-shadow: 0 0 0 4px rgba(91, 140, 255, .35); }
.bp-collage { display: grid; grid-auto-rows: 1fr; gap: 2px; padding: 0; justify-content: stretch; align-content: stretch; background: #131a33; }
.bp-collage.n1 { grid-template-columns: 1fr; }
.bp-collage.n2 { grid-template-columns: 1fr 1fr; }
.bp-collage.n3 { grid-template-columns: 1fr 1fr 1fr; }
.bp-collage.n4 { grid-template-columns: 1fr 1fr; grid-template-rows: 1fr 1fr; }
.bp-collage i { display: block; min-height: 0; background-size: cover; background-position: center; }
.bp-members { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bp-groups { margin: 22px 0 4px; padding: 16px 18px; border: 1px solid rgba(255, 255, 255, .08); border-radius: 14px; background: #1b2445; color: #e3e8f8; font-size: 12.5px; }
.bp-groups header { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; }
.bp-groups header b { font-size: 14px; font-weight: 600; }
.bp-groups header span { color: #b7c2e7; }
.bp-groups .bp-x { margin-left: auto; align-self: center; background: none; border: 0; color: #b7c2e7; cursor: pointer; padding: 2px; }
.bp-groups .bp-x:hover { color: #fff; }
.bp-note { color: #b7c2e7; margin: 6px 0; }
.bp-group-edit { padding: 10px 0; border-top: 1px solid rgba(255, 255, 255, .08); }
.bp-group-name { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.bp-group-name input { width: 260px; max-width: 100%; background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .12); border-radius: 8px; color: #fff; font: inherit; padding: 6px 10px; outline: 0; }
.bp-group-name input:focus { border-color: #5b8cff; box-shadow: 0 0 0 3px rgba(91, 140, 255, .25); }
.bp-group-name span { color: #8f9ac4; font-size: 11.5px; }
.bp-group-name button { margin-left: auto; background: none; border: 0; color: #b7c2e7; cursor: pointer; padding: 4px; }
.bp-group-name button:hover { color: #ff6961; }
.bp-group-picks { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 4px 14px; }
.bp-group-picks label { display: flex; align-items: center; gap: 7px; min-width: 0; padding: 2px 0; cursor: pointer; }
.bp-group-picks label.other { color: #6f7aa6; cursor: default; }
.bp-group-picks input { accent-color: #5b8cff; }
.bp-error { color: #ff9b8f; margin: 8px 0 0; }
.bp-groups footer { display: flex; align-items: center; gap: 8px; margin-top: 10px; padding-top: 12px; border-top: 1px solid rgba(255, 255, 255, .08); }
.bp-groups footer span { flex: 1; }
.bp-groups footer button { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 13px; color: #e3e8f8; background: rgba(255, 255, 255, .07); border: 1px solid rgba(255, 255, 255, .1); border-radius: 9px; cursor: pointer; font: inherit; font-weight: 500; }
.bp-groups footer button:hover:not(:disabled) { background: rgba(255, 255, 255, .12); }
.bp-groups footer button.primary { background: #4a7cf6; border-color: #5b8cff; color: #fff; }
.bp-groups footer button.primary:hover:not(:disabled) { background: #5b8cff; }
.bp-groups footer button:disabled { opacity: .6; cursor: default; }
/* 3D model health on Projects: a quiet row under the cards (above a campus, which fills the page). */
.pj .portfolio-model-health { margin: 40px 0 0; padding: 14px 18px; border: 1px solid rgba(255, 255, 255, .07); border-radius: 14px; background: rgba(255, 255, 255, .03); }
.pj.has-campus .portfolio-model-health { margin: 18px 0 0; }
.pj .portfolio-model-health > summary { font-size: 13.5px; }
.pj .portfolio-model-health > summary span { color: #8f9ac4; }
@media (max-width: 700px) {
  .bp.pj { padding: 22px 16px 40px; }
  .pj h1 { font-size: 27px; }
  .pj .bp-tools, .pj .bp-search { width: 100%; }
  .pj .bp-search { flex: 1; }
}
@media (prefers-reduced-motion: reduce) { .bp-card, .bp-card:hover, .bp-card:active { transition: none; transform: none; } }

/* ── Activity ── */
.act { position: absolute; inset: 0; overflow: auto; background: #151d38; padding: 18px; display: flex; flex-direction: column; gap: 18px; }
.canvas.tm-on .act { bottom: 132px; }
.act-tiles { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 14px; }
@media (max-width: 1250px) { .act-tiles { grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); } }
.act-tile { background: #1f2950; border-radius: 4px; padding: 14px 16px; display: flex; align-items: center; gap: 12px; min-height: 104px; min-width: 0; }
.act-tile svg.act-ring { width: 64px; height: 64px; flex: none; }
.act-ring .track { fill: none; stroke: #2c3963; stroke-width: 5; }
.act-ring .arc { fill: none; stroke: #3b82f6; stroke-width: 5; stroke-linecap: round; }
.act-ring-icon { width: 40px; height: 40px; display: grid; place-items: center; color: #fff; }
.act-value { font-size: 23px; color: #fff; font-weight: 300; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.act-value span { color: #8f9ac4; }
.act-label { font-size: 12.5px; color: #9aa4cb; }
.act-updown { display: inline-flex; gap: 2px; }
.act-updown i { width: 0; height: 0; border-left: 16px solid transparent; border-right: 16px solid transparent; }
.act-updown i { border-left-width: 12px; border-right-width: 12px; }
.act-updown i.up { border-bottom: 24px solid #2fbf71; }
.act-updown i.down { border-top: 24px solid #2fbf71; }
.act-tile > div:last-child { min-width: 0; }
.act-body { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 18px; flex: 1; min-height: 360px; }
.act-edge { background: #1f2950; border-radius: 4px; padding: 16px 20px; }
.act-edge h3, .act-feed h3 { margin: 0 0 14px; font-size: 14px; font-weight: 500; color: #e3e8f8; }
.act-feed { background: #1f2950; border-radius: 4px; overflow-y: auto; }
.act-feed-head { position: sticky; top: 0; z-index: 1; margin: 0; padding: 14px 18px; background: #1f2950; border-bottom: 1px solid #27325c;
  font-size: 14px; font-weight: 500; color: #e3e8f8; }
.act-item { display: grid; grid-template-columns: 34px 120px 1fr; align-items: center; width: 100%; background: transparent; border: 0; text-align: left;
  padding: 14px 18px; font-size: 13px; color: #e3e8f8; border-bottom: 1px solid #27325c; }
.act-item:nth-child(even) { background: #232e58; }
.act-item:hover { background: #2b3766; }
.act-icon.ok { color: #2fbf71; } .act-icon.warn { color: #f2a23c; } .act-icon.bad { color: #f0525a; } .act-icon.info { color: #3b82f6; }
.act-time { color: #9aa4cb; font-size: 12.5px; }
.act-note { padding: 12px 18px; color: #9aa4cb; font-size: 12px; border-bottom: 1px solid #27325c; }
/* Events | Configuration Gaps tabs in the feed's header. */
.act-tabs { display: flex; gap: 18px; padding-bottom: 0; }
.act-tabs button { background: transparent; border: 0; border-bottom: 2px solid transparent; padding: 0 0 11px; color: #9aa4cb; font: inherit;
  font-size: 14px; font-weight: 500; cursor: pointer; display: inline-flex; align-items: center; gap: 7px; }
.act-tabs button:hover { color: #e3e8f8; }
.act-tabs button.on { color: #e3e8f8; border-bottom-color: #7aa7ff; }
.act-count { font-style: normal; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: #f0525a; color: #fff;
  font-size: 11px; font-weight: 700; line-height: 18px; text-align: center; }
.act-gap-head { display: flex; align-items: center; gap: 8px; width: 100%; padding: 12px 18px; background: transparent; border: 0;
  border-bottom: 1px solid #27325c; text-align: left; font-size: 13px; color: #9aa4cb; }
.act-gap-head:hover { background: #26305a; }
.act-gap-head > svg { flex-shrink: 0; transition: transform .15s; }
.act-gap-head > svg.open { transform: rotate(90deg); }
.act-gap-head .act-icon { display: inline-flex; }
.act-gap-head b { color: #e3e8f8; font-weight: 600; }
.act-item.act-gap { grid-template-columns: 34px 1fr; }
.act-gap-body { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.act-gap-body b { font-weight: 600; }
.act-gap-body span { color: #9aa4cb; font-size: 12.5px; }
.act-gap-body .act-gap-fix { color: #a7c4ff; }
/* A port with PoE and no link: PoE Power Cycle on its row (poeCycle.tsx PoeCycleButton), a ring
   filling round it while held, the outcome under it. */
.act-gap-row { position: relative; }
.act-gap-row .act-gap { padding-right: 62px; }
.act-gap-row > .poe-hold-wrap { position: absolute; right: 18px; top: 50%; transform: translateY(-50%); }
.poe-hold-wrap { position: relative; display: inline-flex; }
.poe-hold { position: relative; display: inline-grid; place-items: center; width: 28px; height: 28px; padding: 0; border-radius: 50%;
  border: 1px solid #45518a; background: var(--panel-2); color: #ffb86b; touch-action: none; user-select: none; }
.poe-hold:hover:not(:disabled) { background: #2b3766; }
.poe-hold-ring { position: absolute; inset: -4px; width: calc(100% + 8px); height: calc(100% + 8px); transform: rotate(-90deg); pointer-events: none; overflow: visible; }
.poe-hold-ring circle { fill: none; stroke: var(--hot); stroke-width: 2.5; stroke-dasharray: 100; stroke-dashoffset: 100; stroke-linecap: round; }
.poe-hold.holding .poe-hold-ring circle { animation: door-hold-fill linear forwards; }
.poe-hold.cycling .poe-hold-ring circle { stroke-dashoffset: 0; }
.poe-hold.cycling > svg:not(.poe-hold-ring) { animation: wf-spin .9s linear infinite; }
.poe-hold.done { color: var(--ok); border-color: var(--ok); }
.poe-hold.failed { color: var(--bad); border-color: var(--bad); }
.poe-hold-msg { position: absolute; right: 0; top: calc(100% + 8px); z-index: 30; width: 240px; padding: 6px 8px; border-radius: 6px; background: var(--panel);
  border: 1px solid #34406b; box-shadow: 0 6px 18px rgba(0,0,0,.45); font-size: 11.5px; line-height: 1.35; color: var(--muted); white-space: normal; }
.poe-hold-msg.done { color: var(--ok); }
.poe-hold-msg.failed { color: var(--bad); }
/* The feed shows the newest events a page at a time. */
.act-item.act-more { color: #9aa4cb; font-size: 12.5px; cursor: pointer; }
.act-item.act-more:hover { color: #e3e8f8; }

/* Building (controller site) selector in the breadcrumb */
.site-select { display: inline-flex; align-items: center; gap: 6px; background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .1); border-radius: 8px; padding: 2px 4px 2px 9px; color: #a3acd0; }
.site-select:hover, .site-select:focus-within { border-color: rgba(255, 255, 255, .22); }
.site-select select { background: transparent; color: #f5f7fd; border: 0; outline: 0; font: inherit; font-size: 13px; font-weight: 500; padding: 2px 2px; cursor: pointer; }
.site-select select option { background: #1b2340; }

/* Side panel with nothing selected */
.details.empty { align-items: center; justify-content: center; text-align: center; gap: 8px; padding: 24px; color: var(--muted); }
.details.empty b { color: var(--text); font-size: 14px; font-weight: 600; }
.details.empty span { font-size: 12px; max-width: 230px; line-height: 1.5; }
.details.empty svg { color: #4a5684; }

/* Scrollbars: thin, rounded, navy; they stay out of the way until needed */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track, ::-webkit-scrollbar-corner { background: transparent; }
::-webkit-scrollbar-thumb { background-color: #2c3963; border-radius: 10px; border: 3px solid transparent; background-clip: padding-box; }
::-webkit-scrollbar-thumb:hover { background-color: #45518a; }
::-webkit-scrollbar-thumb:active { background-color: #5b6aa8; }
@supports not selector(::-webkit-scrollbar) {
  * { scrollbar-width: thin; scrollbar-color: #2c3963 transparent; }
}

/* Faceplate legend (colors, then icons) */
.bv-face-legend { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-top: 8px; padding-top: 7px; border-top: 1px solid #2c3963; font-size: 11.5px; color: #9aa4cb; }
.bv-face-legend span { display: inline-flex; align-items: center; gap: 6px; }
.bv-face-legend .sq { width: 11px; height: 11px; border-radius: 2px; display: inline-block; }
.bv-face-legend .sq.slow { background: #f2b23c; } .bv-face-legend .sq.gig { background: #5fd38a; }
.bv-face-legend .sq.disabled { background: #b8bfd6; } .bv-face-legend .sq.down { background: #2c375f; }
.bv-face-legend .sq.inactive { background: #f0525a; }

/* Wi-Fi clients: round tiles, so they read differently from wired devices */
.bv-tile.client { border-radius: 50%; }
.bv-empty { font-size: 12px; color: #8f9ac4; padding: 5px; }

/* Paged tile grids (center panel) */
.bv-paged { position: relative; }
/* The 5px gutter (cancelled by the negative margin) leaves room for the 3px selection ring. */
.bv-pages { overflow: hidden; margin: -5px; box-sizing: content-box; }
.bv-strip { display: flex; transition: transform .26s cubic-bezier(.25,.8,.25,1); height: 100%; will-change: transform; }
.bv-page { flex: 0 0 100%; display: grid; align-content: start; padding: 5px; box-sizing: border-box; }
.bv-dots { display: flex; justify-content: center; gap: 8px; margin-top: 6px; height: 8px; }
.bv-dots button { width: 8px; height: 8px; border-radius: 50%; border: 0; padding: 0; background: #34406b; }
.bv-dots button.on { background: #fff; }
.bv-dots button:hover:not(.on) { background: #5b6aa8; }
/* SWs pinned to the bottom of the center panel */
/* The switch box takes the panel's spare height. It is a size container, so the faceplate's
   ports and port numbers can size from its height. Never smaller than a 16px-port faceplate. */
.bv-floor .bv-sw-card { overflow-x: clip; overflow-y: visible; display: flex; flex-direction: column; flex: 1 1 0;
  min-height: 134px; container: swcard / size; }
/* The faceplate fills the switch box; --legend is the inline legend's share of the height. */
.bv-sw-body { flex: 1 1 auto; display: flex; flex-direction: column; --legend: 38px; }
.bv-sw-body > .bv-face, .bv-sw-slide { flex: 1 1 auto; display: flex; flex-direction: column; }
.bv-sw-slide > .bv-face { flex: 1 1 auto; display: flex; flex-direction: column; }
@container swcard (min-height: 165px) {
  .bv-sw-body { --nums: 24px; }
  .bv-pnum { display: block; }
}
/* Tile boxes keep exactly their two reserved rows; spare height goes to the switch box. */

/* Connections of the selection: lighter blue ring; everything unrelated fades back */
.bv-tile.rel, .bv-port.rel, .bv-sw-tabs button.rel { box-shadow: 0 0 0 2px #8fb3ff; }
/* The shown switch's tab keeps its strong ring even when it is also related. */
.bv-sw-tabs button.on.rel { box-shadow: 0 0 0 3px #3b82f6; }
/* The port the selected device plugs into: the selection ring, still (CJ 2026-11-02: no pulse). */
.bv-port.link { position: relative; z-index: 1; box-shadow: 0 0 0 3px #3b82f6; }
.bv-hex.rel { background: #8fb3ff; }
.bv-tile.dim, .bv-hex.dim { opacity: .28; transition: opacity .15s; }
.bv-tile.dim:hover, .bv-hex.dim:hover { opacity: .7; }

/* The selection, strong (CJ 2026-11-02): a white edge, a bright blue ring and a blue glow, so the
   floor, switch, port and WAP / device / client picked stand out on green, amber, red and navy
   alike, drawn over their neighbours. Related ones keep the lighter ring above. */
.bv { --sel: #2f80ff; --sel-glow: rgba(47, 128, 255, .7); --sel-ring: 0 0 0 2px #fff, 0 0 0 5px var(--sel), 0 0 14px 4px var(--sel-glow); }
.bv-row.on { border-color: var(--sel); background: rgba(47, 128, 255, .18); box-shadow: 0 0 0 1px var(--sel), 0 0 16px 2px var(--sel-glow); }
.bv-tile.on, .bv-port.on, .bv-sw-tabs button.on, .bv-sw-tabs button.on.rel { position: relative; z-index: 2; box-shadow: var(--sel-ring); }
/* The chip strip clips what does not fit; its selected chip's ring and glow still show round it. */
.bv-sw-tabs.one-line { overflow: clip; overflow-clip-margin: 10px; }
/* A hexagon cannot carry a ring: a thicker blue frame, and the WAP drawn larger. */
.bv-hex.on { position: relative; z-index: 2; padding: 4px; background: var(--sel); transform: scale(1.2); }
.bv-port.link { z-index: 2; box-shadow: var(--sel-ring); }

/* Building heading inside the floor table (projects with several buildings) */
.bv-group { position: sticky; top: 0; z-index: 1; background: #212b4d; padding: 8px 4px 4px; font-size: 11.5px; font-weight: 600;
  letter-spacing: .04em; color: #8fb3ff; border-bottom: 1px solid #2c3963; }

/* Switch card: the next/previous switch slides in from the side it was swiped to. */
.bv-sw-slide.next { animation: bv-sw-in-next .24s cubic-bezier(.25,.8,.25,1); }
.bv-sw-slide.prev { animation: bv-sw-in-prev .24s cubic-bezier(.25,.8,.25,1); }
@keyframes bv-sw-in-next { from { transform: translateX(48px); opacity: .2; } to { transform: none; opacity: 1; } }
@keyframes bv-sw-in-prev { from { transform: translateX(-48px); opacity: .2; } to { transform: none; opacity: 1; } }

/* Hover tag over WAPs, devices and clients (building view). */
.bv-tip { position: fixed; z-index: 50; pointer-events: none; max-width: 260px; background: #fff; color: #3d4560;
  border-radius: 6px; padding: 6px 9px 7px; box-shadow: 0 6px 18px rgba(5,10,30,.4); }
.bv-tip::after { content: ''; position: absolute; left: var(--arrow, 50%); bottom: -4px; width: 8px; height: 8px; background: #fff;
  transform: translateX(-50%) rotate(45deg); border-radius: 0 0 2px 0; }
.bv-tip.below::after { bottom: auto; top: -4px; border-radius: 2px 0 0 0; }
.bv-tip-head { display: flex; align-items: center; gap: 6px; margin-bottom: 2px; }
.bv-tip-head svg { color: #9da3b8; flex: none; }
.bv-tip-head b { font-size: 12px; font-weight: 700; color: #3d4560; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bv-tip-head i { margin-left: 6px; width: 7px; height: 7px; border-radius: 50%; flex: none; background: #77d36a; }
.bv-tip-head i.attention { background: #f2a23c; } .bv-tip-head i.inactive { background: #f0525a; }
.bv-tip-head i.pending { background: #f2a23c; } .bv-tip-head i.missing { background: #9aa4cb; }
.bv-tip-row { font-size: 11px; color: #6a7290; }
.bv-tip-row span { color: #3d4560; font-weight: 500; }

/* Port legend button: only on short windows, where the inline legend is hidden. */
.bv-legend-btn { display: none; position: relative; margin-left: auto; align-items: center; gap: 5px; font-size: 11.5px; color: #9aa4cb;
  cursor: default; border-radius: 5px; padding: 2px 6px; outline: none; }
.bv-legend-btn:hover, .bv-legend-btn:focus-visible { color: #e3e8f8; background: #24305a; }
.bv-legend-pop { display: none; position: absolute; right: 0; bottom: calc(100% + 8px); z-index: 40; width: 330px; flex-wrap: wrap; gap: 6px 14px;
  background: #fff; color: #3d4560; border-radius: 6px; padding: 9px 11px; box-shadow: 0 6px 18px rgba(5,10,30,.4); font-size: 11.5px; }
.bv-legend-pop span { display: inline-flex; align-items: center; gap: 6px; }
.bv-legend-pop .sq { width: 11px; height: 11px; border-radius: 2px; display: inline-block; }
.bv-legend-pop .sq.slow { background: #f2b23c; } .bv-legend-pop .sq.gig { background: #5fd38a; }
.bv-legend-pop .sq.disabled { background: #b8bfd6; } .bv-legend-pop .sq.down { background: #2c375f; }
.bv-legend-pop .sq.inactive { background: #f0525a; }
.bv-legend-btn:hover .bv-legend-pop, .bv-legend-btn:focus-within .bv-legend-pop { display: flex; }
@media (max-height: 860px) {
  .bv-sw-card > .bv-face-legend { display: none; }
  .bv-legend-btn { display: inline-flex; }
  /* Legend stays on the title line, top right, however many switch chips wrap below it. */
  .bv-sw-head { position: relative; }
  /* Chips sharing the title line keep clear of it; a full line of chips sits below it. */
  .bv-sw-head .bv-sw-tabs:not(.full) { margin-right: 78px; }
  .bv-sw-head .bv-legend-btn { position: absolute; top: 0; right: 0; }
  .bv-sw-head .bv-legend-pop { top: calc(100% + 8px); bottom: auto; }
  .bv-sw-body { --legend: 0px; }
  /* Laptop-height windows: tighter spacing so two rows per box and the whole switch still fit. */
  .bv-floor { gap: 8px; }
  .bv-floor .bv-card { padding: 7px 14px; }
  .bv-floor .bv-card h3 { margin-bottom: 4px; }
  .bv-floor .bv-dots { margin-top: 4px; }
}

/* Connection line: "+" on an SSID row (in place of its dot) shows that SSID's clients. */
/* Centred exactly where the row's dot is (React Flow puts handles at right -6px, shifted 50%). */
.port-plus { position: absolute; right: -6px; top: 50%; transform: translate(50%, -50%); z-index: 2; width: 16px; height: 16px;
  border-radius: 50%; border: 2px solid var(--node); background: #80deea; color: #0e2a30; display: grid; place-items: center;
  padding: 0; cursor: pointer; }
.port-plus:hover { background: #b2f0f7; transform: translate(50%, -50%) scale(1.12); }
.port-plus.open { background: #3b82f6; color: #fff; }

/* Several buildings: one per page in the floor table, name on top, dots at the bottom. */
.bv-bldg-name { margin: -4px 0 6px; text-align: center; font-size: 13px; font-weight: 600; color: #8fb3ff; letter-spacing: .02em; }
.bv-bldg-dots { margin-top: 10px; }
.bv-rows.next { animation: bv-sw-in-next .24s cubic-bezier(.25,.8,.25,1); }
.bv-rows.prev { animation: bv-sw-in-prev .24s cubic-bezier(.25,.8,.25,1); }

/* ── Map: floor plans with devices on them ── */
.mv { position: absolute; inset: 0; display: grid; grid-template-columns: 136px minmax(0, 1fr); gap: 14px; padding: 14px; background: #1b2340; }
.canvas.tm-on .mv { bottom: 132px; }
.mv-empty { position: absolute; inset: 0; display: grid; place-items: center; color: var(--muted); font-size: 13px; padding: 24px; text-align: center; }
.mv-pick { align-content: center; gap: 12px; }
.mv-pick p { margin: 0; }
.mv-pick > div { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; max-width: 720px; }
.mv-pick button { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; padding: 8px 12px; background: #212b4d; border: 1px solid #2c3963; border-radius: 8px; color: #eef1fa; cursor: pointer; text-align: left; }
.mv-pick button:hover { border-color: #5b7cfa; }
.mv-pick button span { color: var(--muted); font-size: 11.5px; }
.mv-floors { background: #212b4d; border: 1px solid #2c3963; border-radius: 10px; padding: 10px 8px; display: flex; flex-direction: column; min-height: 0; }
.mv-floors-head { font-size: 12px; font-weight: 600; color: #c9d1ef; text-align: center; margin-bottom: 8px; }
/* Rows shrink to fit (30 px down to 16) so a whole tower shows without scrolling; the down badges
   stay inside the list (no sideways scroll). */
.mv-floor-list { display: flex; flex-direction: column; gap: 3px; overflow-x: hidden; overflow-y: auto; flex: 1; min-height: 0; padding: 6px 5px 0 0; }
/* Lowest floor at the bottom, like the building. */
.mv-floor-list > :first-child { margin-top: auto; }
.mv-floor-list button { position: relative; flex: 0 1 30px; min-height: 16px; display: flex; align-items: center; justify-content: space-between; gap: 6px; padding: 0 9px;
  border-radius: 6px; border: 2px solid transparent; background: #2a3560; color: #e3e8f8; font-size: 12px; line-height: 1; }
.mv-floor-list button span { font-size: 11px; color: #9aa4cb; }
.mv-floor-list button:hover { background: #34406b; }
.mv-floor-list button.on { border-color: #3b82f6; background: #2f3c6e; }
/* The whole building, set a little apart below the lowest floor. */
.mv-floor-list .mv-floor-building { margin-top: 4px; }
/* A named space, on one line however narrow the list. */
.mv-floor-list .mv-floor-suite { margin-top: 4px; }
.mv-floor-list .mv-floor-suite b { font-size: 10.5px; white-space: nowrap; }
.mv-badge { top: -5px; right: -4px; }
.mv-canvas { position: relative; overflow: hidden; border-radius: 10px; border: 1px solid #2c3963;
  background: repeating-linear-gradient(135deg, #1e2748 0 10px, #202a4c 10px 20px); }
.mv-stage { position: absolute; inset: 0; cursor: grab; touch-action: none; }
.mv-stage:active { cursor: grabbing; }
.mv-layer { position: absolute; left: 0; top: 0; transform-origin: 0 0; will-change: transform; }
.mv-layer img { display: block; user-select: none; box-shadow: 0 10px 40px rgba(0, 0, 0, .45); background: #fff; }
/* Centred, as wide as its buttons up to the canvas less 12px a side: past that it wraps (centred rows), so Building and Reset never fall off. */
.mv-tools { position: absolute; top: 12px; left: 12px; right: 12px; width: fit-content; margin: 0 auto; z-index: 5; display: flex; flex-wrap: wrap;
  justify-content: center; gap: 2px; padding: 3px;
  background: rgba(27, 35, 64, .92); border: 1px solid #34406b; border-radius: 9px; box-shadow: 0 6px 18px rgba(0,0,0,.3); }
.mv-tools button { border: 0; background: transparent; color: #8f9ac4; font-size: 12px; padding: 5px 10px; border-radius: 6px; display: inline-flex; align-items: center; gap: 6px; }
.mv-tools button span { font-size: 10.5px; color: inherit; opacity: .8; }
.mv-tools button.on { background: #3b82f6; color: #fff; }
.mv-tools button:hover:not(.on) { background: #2a3560; color: #e3e8f8; }
.mv-tools .mv-fit { color: #c9d1ef; margin-left: 4px; }

/* Device pins: the same size at any zoom (scaled back by --inv). */
.mv-dev { position: absolute; width: 0; height: 0; padding: 0; border: 0; background: none; transform: scale(var(--inv, 1)); z-index: 1; }
.mv-dev:hover, .mv-dev.on { z-index: 3; }
.mv-pin { position: absolute; left: -15px; top: -15px; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center;
  background: #fff; border: 3px solid #4cc38a; box-shadow: 0 2px 6px rgba(10, 18, 40, .45); }
.mv-dev.attention .mv-pin { border-color: #f2a23c; }
.mv-dev.inactive .mv-pin { border-color: #f0525a; background: #fff1f1; }
.mv-dev:hover .mv-pin { transform: scale(1.12); }
.mv-dev.on .mv-pin { box-shadow: 0 0 0 4px #3b82f6, 0 2px 8px rgba(10,18,40,.5); }
/* WAPs: a dotted coverage ring, like the planning tools. */
.mv-dev.role-wap .mv-pin::before { content: ''; position: absolute; inset: -8px; border-radius: 50%; border: 2px dotted rgba(59, 130, 246, .75); }
.mv-dev.role-wap .mv-pin { color: #2f6fe0; }
.mv-pill { position: absolute; left: 10px; top: -22px; min-width: 18px; height: 16px; padding: 0 5px; border-radius: 8px; background: #2f6fe0; color: #fff;
  font-size: 10px; font-weight: 700; line-height: 16px; text-align: center; box-shadow: 0 1px 3px rgba(0,0,0,.3); }
/* A door phone in a call now (doorPhoneData.ts): a green phone above its pin, 2D and 3D. */
.mv-call { position: absolute; left: 0; top: -30px; transform: translateX(-50%); width: 20px; height: 20px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center; background: #16a34a; color: #fff; pointer-events: none;
  box-shadow: 0 1px 4px rgba(0,0,0,.35); animation: mv-call-ring 1.4s ease-out infinite; }
@keyframes mv-call-ring { 0% { box-shadow: 0 0 0 0 rgba(22,163,74,.65); } 100% { box-shadow: 0 0 0 9px rgba(22,163,74,0); } }
.mv-label { position: absolute; left: 0; top: 20px; transform: translateX(-50%); display: none; flex-direction: column; align-items: center;
  white-space: nowrap; background: #fff; color: #3d4560; border-radius: 5px; padding: 3px 7px; box-shadow: 0 2px 8px rgba(10,18,40,.35); pointer-events: none; }
.mv-label b { font-size: 11px; }
.mv-label span { font-size: 9.5px; color: #6a7290; }
.mv-canvas.zoomed .mv-label, .mv-dev.on .mv-label { display: flex; }

/* Expected devices the controller does not have: amber = scanned in Ash, grey = not scanned. */
.mv-dev.pending .mv-pin { border: 3px dashed #f2a23c; background: #fff7e8; color: #c77a10; }
.mv-dev.missing .mv-pin { border: 3px dashed #9aa4cb; background: rgba(255,255,255,.75); color: #8f9ac4; opacity: .9; }
.mv-dev.pending.role-wap .mv-pin::before, .mv-dev.missing.role-wap .mv-pin::before { border-color: rgba(154,164,203,.6); }
.mv-dev.pending .mv-label span { color: #c77a10; }
/* A shop-drawing set's planned devices (planned.json): violet and dashed until installed; an
   existing device the set moves is dotted. */
.mv-dev.planned .mv-pin { border: 3px dashed #7c5cff; background: #f3efff; color: #5b3fd6; }
.mv-dev.planned.relocate .mv-pin { border-style: dotted; }
.mv-dev.planned .mv-label span { color: #6d4fe0; }
.mv3d .mv-dev.planned .mv-label span { color: #c4b5fd; }
.bv-tip-head i.planned { background: #7c5cff; }
.mv-tools button em { font-style: normal; font-size: 10px; font-weight: 700; color: #f2a23c; margin-left: -3px; }
.mv-tools button.on em { color: #ffe1a8; }

/* ── Map: 2D | 3D switch, coverage and the 3D floor model ── */
.mv-tools .mv-seg { display: flex; gap: 2px; padding-right: 3px; margin-right: 3px; border-right: 1px solid #34406b; }
.mv-tools .mv-seg button { font-weight: 700; letter-spacing: .02em; padding: 5px 9px; }
.mv-tools .mv-sep { width: 1px; align-self: stretch; margin: 4px 3px; background: #34406b; }
.mv-tools button:disabled { opacity: .4; cursor: default; }
.mv-tools button:disabled:hover { background: transparent; color: #8f9ac4; }
/* The coverage button carries the bands' colours, weakest to strongest. */
.mv-tools .mv-band { display: flex; gap: 2px; padding: 0 2px; margin-left: -1px; border-left: 1px solid #34406b; }
.mv-tools .mv-band button { font-size: 11px; padding: 5px 8px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.mv-cov-swatch { width: 16px; height: 8px; border-radius: 4px; flex: none;
  background: linear-gradient(90deg, #e14646, #f08c3c 30%, #f2c84c 50%, #8ccd5a 72%, #2eaa60); box-shadow: inset 0 0 0 1px rgba(255,255,255,.18); }

/* 2D: the estimate over the plan, under the pins, scaled up smoothly (bilinear). */
.mv-cov { position: absolute; left: 0; top: 0; overflow: hidden; pointer-events: none; opacity: .6; animation: mv-fade .35s ease; }
.mv-cov > div { background-size: 100% 100%; background-repeat: no-repeat; }
/* 2D: a camera's view from the ceiling-plan check, the lights in it ringed; under the pins. */
.mv-sight { position: absolute; left: 0; top: 0; overflow: visible; pointer-events: none; animation: mv-fade .35s ease; }
.mv-sight path { fill: rgba(225, 70, 70, .16); stroke: rgba(225, 70, 70, .85); stroke-width: 2; vector-effect: non-scaling-stroke; }
.mv-sight .sev-view path { fill: rgba(240, 140, 60, .14); stroke: rgba(240, 140, 60, .85); }
.mv-sight .sev-none path { fill: rgba(143, 154, 196, .12); stroke: rgba(143, 154, 196, .7); }
.mv-sight circle { fill: rgba(255, 210, 74, .25); stroke: #ffd24a; stroke-width: 2.5; vector-effect: non-scaling-stroke; pointer-events: auto; }
@keyframes mv-fade { from { opacity: 0; } }

.mv-legend { position: absolute; right: 12px; bottom: 52px; z-index: 5; min-width: 168px; padding: 9px 11px 8px; border-radius: 9px;
  background: rgba(27, 35, 64, .94); border: 1px solid #34406b; box-shadow: 0 6px 18px rgba(0,0,0,.3); color: #c9d1ef; font-size: 11px;
  animation: mv-fade .25s ease; }
.mv-legend h4 { margin: 0 0 6px; font-size: 11.5px; font-weight: 700; color: #e3e8f8; }
.mv-legend div { display: flex; align-items: center; gap: 7px; line-height: 19px; }
.mv-legend i { width: 18px; height: 9px; border-radius: 3px; flex: none; box-shadow: inset 0 0 0 1px rgba(255,255,255,.12); }
.mv-legend div span { margin-left: auto; padding-left: 10px; color: #8f9ac4; font-variant-numeric: tabular-nums; }
.mv-legend p { max-width: 190px; margin: 6px 0 0; padding-top: 6px; border-top: 1px solid #2c3963; font-size: 10px; color: #8f9ac4; }
/* A legend that folds to an icon in its corner (the ceiling's, mapView.tsx CeilingLegend). */
.mv-legend-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.mv-legend-head button { display: grid; place-items: center; width: 18px; height: 18px; margin: -2px -4px -2px 0; padding: 0; border: 0; border-radius: 5px;
  background: transparent; color: #8f9ac4; cursor: pointer; }
.mv-legend-head button:hover { background: rgba(255,255,255,.08); color: #e3e8f8; }
.mv-legend-min { position: absolute; right: 12px; bottom: 52px; z-index: 5; display: grid; place-items: center; width: 30px; height: 30px; padding: 0; border-radius: 9px;
  background: rgba(27, 35, 64, .94); border: 1px solid #34406b; box-shadow: 0 6px 18px rgba(0,0,0,.3); color: #c9d1ef; cursor: pointer;
  animation: mv-fade .25s ease; }
.mv-legend-min:hover { border-color: #4a5a94; color: #fff; }

/* 3D: the model fills the canvas; its own stacking context keeps the pins under the tools. */
.mv3d { position: absolute; inset: 0; z-index: 0; --inv: 1; }
.mv3d-host { position: absolute; inset: 0; }
.mv3d-host canvas { position: absolute; left: 0; top: 0; display: block; outline: none; cursor: grab; touch-action: none; }
.mv3d-host canvas:active { cursor: grabbing; }
/* Its own stacking level: the pins' depth order (CSS2DRenderer's z-index on each) stays under the
   view's controls (the Sheet row, Top), whatever the numbers. */
.mv3d-css { position: absolute; left: 0; top: 0; z-index: 1; pointer-events: none; }
.mv3d-pin { left: 0; top: 0; width: 0; height: 0; animation: mv3d-pin-in .45s cubic-bezier(.25,.8,.25,1) both; }
.mv3d-pin .mv-dev { left: 0; top: 0; pointer-events: auto; transform: scale(var(--pin-s, 1)); transition: transform .2s ease; }
/* Speed tests in 3D: the same tag as 2D, its runs on hover or when near the camera. */
.mv3d-pin .mv-speed { left: 0; top: 0; pointer-events: auto; transform: scale(var(--pin-s, 1)); transition: transform .2s ease; }
.mv3d-pin .mv-speed:hover, .mv3d-pin .mv-speed.on { transform: none; }
.mv3d .mv-speed:hover .mv-label { display: flex; }
/* Hovered or selected pins come back to full size. */
.mv3d-pin .mv-dev:hover, .mv3d-pin .mv-dev.on { transform: none; }
@keyframes mv3d-pin-in { from { opacity: 0; } }
/* Names: on pins near the camera, and on the hovered or selected one; dark chips over the model. */
.mv3d-pin.near .mv-label, .mv3d .mv-dev:hover .mv-label { display: flex; }
/* No backdrop blur: labels move every orbit frame, and each blur is its own pass over the canvas. */
.mv3d .mv-label { top: 21px; background: rgba(15, 21, 42, .94); color: #eef1fa; border: 1px solid rgba(255,255,255,.08);
  box-shadow: 0 4px 14px rgba(5, 10, 25, .45); }
/* An EV charger's name over its pin, which stands over the charger. */
.mv-dev.role-wireless .mv-label { transform: translate(-50%, calc(-100% - 42px)); }
.mv3d .mv-label b { font-weight: 600; }
.mv3d .mv-label span { color: #a3add3; }
.mv3d .mv-dev.pending .mv-label span { color: #f5c272; }
.mv3d .mv-pin { box-shadow: 0 3px 10px rgba(10, 18, 40, .5); }
.mv3d .mv-dev.on .mv-pin { box-shadow: 0 0 0 4px #3b82f6, 0 4px 14px rgba(10,18,40,.55); }
/* The selected device's pulse on the floor: sized per frame to lie flat, animated by CSS alone. */
.mv3d-pulse { pointer-events: none; }
.mv3d-pulse::before, .mv3d-pulse::after { content: ''; position: absolute; inset: 0; border-radius: 50%; border: 2.5px solid rgba(59, 130, 246, .95);
  box-shadow: 0 0 12px rgba(59, 130, 246, .45); animation: mv3d-pulse 2s cubic-bezier(.2,.7,.3,1) infinite; }
.mv3d-pulse::after { animation-delay: 1s; }
@keyframes mv3d-pulse { from { transform: scale(.25); opacity: 1; } to { transform: scale(1); opacity: 0; } }
.mv3d-status { position: absolute; left: 50%; bottom: 46px; transform: translateX(-50%); z-index: 2; pointer-events: none; padding: 5px 12px;
  border-radius: 999px; background: rgba(27, 35, 64, .9); border: 1px solid #34406b; color: #c9d1ef; font-size: 11.5px; }
.mv3d-hint { position: absolute; left: 50%; top: 56px; transform: translateX(-50%); z-index: 2; pointer-events: none; white-space: nowrap;
  max-width: calc(100% - 24px); overflow: hidden; text-overflow: ellipsis;
  padding: 5px 12px; border-radius: 999px; background: rgba(15, 21, 42, .78); color: #c9d1ef; font-size: 11px;
  animation: mv3d-hint 7s ease forwards; }
/* Pair Devices (cameraPairing.tsx): what can pair wears a +, what is paired a check. */
.mv-dev.pairable .mv-pin { border-color: #3b82f6; background: #3b82f6; color: #fff; }
.mv-dev.pairable.paired .mv-pin { border-color: #2e9e6b; background: #2e9e6b; color: #fff; }
/* Nothing stands in the way of a +: names are clicked through, and its own shows when pointed at. */
.mv-canvas.pairing .mv-label { pointer-events: none; }
.mv-canvas.pairing .mv-dev.pairable:not(:hover) .mv-label { display: none; }
/* The 3D overlay sets each pin's z-index by its depth. */
.mv-canvas.pairing .mv3d-pin:has(.pairable) { z-index: 9000 !important; }
.mv-canvas.pairing .mv3d-pin:has(.pairable:hover) { z-index: 9001 !important; }
.mv-pairing { position: absolute; left: 50%; top: 56px; transform: translateX(-50%); z-index: 6; display: flex; align-items: center; gap: 10px; width: max-content; max-width: calc(100% - 24px);
  padding: 7px 8px 7px 14px; border-radius: 999px; background: #10182f; border: 1px solid #3b82f6; box-shadow: 0 4px 14px rgba(0, 0, 0, .4); color: #c9d1ef; font-size: 12.5px; }
.mv-pairing > svg { flex: none; color: #6ea3ff; }
.mv-pairing b { color: var(--text); font-weight: 600; }
.mv-pairing button { flex: none; padding: 3px 12px; border: 0; border-radius: 999px; background: #3b82f6; color: #fff; font: inherit; font-weight: 600; cursor: pointer; }
/* Map › Building: the whole building in 3D; the hovered floor's name follows the pointer. */
.bld3d .mv3d-host canvas.pick { cursor: pointer; }
.bld3d .mv3d-host canvas.pick:active { cursor: grabbing; }
.bld3d-tip { position: absolute; left: 0; top: 0; z-index: 3; pointer-events: none; white-space: nowrap;
  padding: 7px 13px; border-radius: 8px; background: rgba(15, 21, 42, .94); color: #eef1fa; font-size: 15px; font-weight: 600;
  border: 1px solid rgba(255,255,255,.08); box-shadow: 0 4px 14px rgba(10, 18, 40, .5); font-variant-numeric: tabular-nums; }
.bld3d-sel { animation: mv-fade .2s ease; white-space: nowrap; }
.bld3d-sel b { color: #fff; font-weight: 700; }
/* The building's spin toggle, bottom right. */
.bld3d-spin { position: absolute; right: 12px; bottom: 10px; z-index: 5; display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 11px; border-radius: 8px; border: 1px solid #34406b; background: rgba(27, 35, 64, .92); color: #c9d1ef;
  font-size: 12px; box-shadow: 0 6px 18px rgba(0,0,0,.3); cursor: pointer; }
.bld3d-spin:hover { background: #34406b; color: #fff; }
@keyframes mv3d-hint { 0% { opacity: 0; } 8%, 78% { opacity: 1; } 100% { opacity: 0; visibility: hidden; } }
/* Credit for the library's models on show (models3d creditLine), bottom right of the view. */
.mv3d-credit { position: absolute; right: 10px; bottom: 8px; z-index: 2; pointer-events: none; white-space: nowrap;
  max-width: calc(100% - 24px); overflow: hidden; text-overflow: ellipsis; font-size: 10px; color: rgba(201, 209, 239, .72); }
@media (prefers-reduced-motion: reduce) {
  .mv3d-pulse::after { display: none; }
  .mv3d-pulse::before { animation: none; transform: scale(.6); }
}

/* ── Wi-Fi block of an AP's side panel (wifiPanel.tsx) ── */
.wf { display: flex; flex-direction: column; gap: 8px; }
.wf-head { display: flex; align-items: center; gap: 8px; }
.wf-head .sh { margin: 0; flex: 1; }
.wf-src { font-size: 11px; color: var(--muted); display: inline-flex; align-items: center; gap: 5px; }
.wf-src.live { color: #a7e8c4; }
.wf-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 0 rgba(76, 195, 138, .6); animation: wf-pulse 2s infinite; }
@keyframes wf-pulse { 70% { box-shadow: 0 0 0 6px rgba(76, 195, 138, 0); } 100% { box-shadow: 0 0 0 0 rgba(76, 195, 138, 0); } }
.wf-refresh { background: transparent; border: 1px solid #34406b; border-radius: 6px; color: var(--muted); width: 22px; height: 22px;
  display: grid; place-items: center; padding: 0; cursor: pointer; }
.wf-refresh:hover { color: var(--text); border-color: #7d88b3; }
.wf-refresh.spin svg { animation: wf-spin .9s linear infinite; }
@keyframes wf-spin { to { transform: rotate(360deg); } }
.wf-note { font-size: 11px; color: var(--muted); }
.wf-uptime { display: flex; justify-content: space-between; gap: 8px; font-size: 12.5px; color: var(--muted); }
.wf-uptime b { color: var(--text); font-weight: 500; }

.wf-findings { display: flex; flex-direction: column; gap: 3px; }
.wf-f { display: flex; align-items: center; gap: 7px; font-size: 12px; padding: 5px 8px; border-radius: 6px; line-height: 1.3; }
.wf-f svg { flex: none; }
.wf-f.bad { background: rgba(255, 109, 90, .12); color: #ffb3a8; }
.wf-f.warn { background: rgba(242, 201, 76, .1); color: #f7e1a0; }
.wf-f.info { background: var(--panel-2); color: var(--muted); }
.wf-f.ok { background: rgba(76, 195, 138, .1); color: #a7e8c4; }
.wf-more { align-self: flex-start; background: transparent; border: 0; padding: 0 2px; color: var(--accent); font-size: 11px; cursor: pointer; }

.wf-radios { display: flex; flex-direction: column; gap: 6px; }
.wf-radio { background: var(--panel-2); border: 1px solid #2f3a66; border-radius: 8px; padding: 8px 9px 7px; display: flex; flex-direction: column; gap: 6px; }
.wf-radio.off { opacity: .6; }
.wf-r1 { display: flex; align-items: baseline; gap: 8px; font-size: 11.5px; color: var(--muted); white-space: nowrap; }
.wf-r1 b { color: var(--text); font-size: 12.5px; font-weight: 700; margin-right: 2px; }
.wf-ch { color: var(--text); font-weight: 600; }
.wf-ch i { margin-left: 4px; }
.wf-pw { display: inline-flex; align-items: baseline; gap: 4px; }
.wf-ch i, .wf-pw i { font-style: normal; font-weight: 500; font-size: 9.5px; color: var(--muted); border: 1px solid #45518a; border-radius: 4px;
  padding: 0 3px; vertical-align: 1px; }
.wf-pw i.lvl-high { color: #f7e1a0; border-color: rgba(242, 201, 76, .45); }
.wf-pw i.lvl-low { color: #9fc0ff; border-color: rgba(122, 167, 255, .45); }
.wf-n { margin-left: auto; color: var(--text); font-weight: 600; display: inline-flex; align-items: center; gap: 3px; }
.wf-n::before { content: ''; width: 7px; height: 10px; border: 1.5px solid currentColor; border-radius: 2px; opacity: .7; }
.wf-air { display: flex; height: 7px; border-radius: 4px; background: #222c52; overflow: hidden; }
.wf-air i { display: block; height: 100%; }
.wf-air .tx, .wf-legend .tx { background: #7aa7ff; }
.wf-air .rx, .wf-legend .rx { background: #4fd1c5; }
.wf-air .in, .wf-legend .in { background: var(--warn); }
.wf-r3 { display: flex; flex-wrap: wrap; gap: 4px 10px; font-size: 11px; color: var(--muted); }
.wf-r3 .wf-cl { color: var(--text); font-weight: 600; }
.wf-r3 .warn { color: var(--warn); font-weight: 600; } .wf-r3 .bad { color: var(--bad); font-weight: 600; }
.wf-legend { display: flex; align-items: center; gap: 5px; font-size: 10.5px; color: var(--muted); margin-top: -2px; }
.wf-legend i { width: 8px; height: 8px; border-radius: 2px; display: inline-block; margin-left: 6px; }
.wf-legend i:first-child { margin-left: 0; }

.wf-sub { font-size: 11px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; margin-top: 4px;
  display: flex; align-items: baseline; gap: 6px; }
.wf-sub b { color: var(--text); font-size: 12px; letter-spacing: 0; }
/* An SSID in four lines: name; bands · security; devices · Unmask Password; VLAN (opens its screen). */
.wf-ssid { flex-direction: column; align-items: flex-start; gap: 1px; padding: 6px 6px; cursor: pointer; }
.wf-ssid b { font-weight: 600; max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wf-ssid .wf-line { color: var(--muted); font-size: 11px; max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wf-ssid .vl-open { font-size: 11px; }
.wf-key { display: flex; align-items: center; gap: 6px; margin: -2px 0 4px 6px; padding: 5px 8px; border-radius: 6px; background: #1a2347;
  border: 1px solid #2f3a66; }
.wf-key code { flex: 1; min-width: 0; font: 600 12px ui-monospace, SFMono-Regular, Menlo, monospace; color: #e3e8f8; user-select: all;
  overflow-wrap: anywhere; }
.wf-key button { background: transparent; border: 1px solid #34406b; border-radius: 5px; color: var(--muted); width: 22px; height: 22px;
  display: grid; place-items: center; padding: 0; cursor: pointer; }
.wf-key button:hover { color: var(--text); border-color: #7d88b3; }

.wf-spread { display: flex; gap: 2px; height: 8px; border-radius: 4px; overflow: hidden; }
.wf-spread i { display: block; min-width: 6px; }
.wf-spread-key { display: flex; flex-wrap: wrap; gap: 3px 10px; font-size: 10.5px; color: var(--muted); }
.wf-spread-key span { display: inline-flex; align-items: center; gap: 4px; }
.wf-spread-key i { width: 7px; height: 7px; border-radius: 50%; display: inline-block; }
.wf-filter { display: flex; flex-wrap: wrap; gap: 4px; }
.wf-filter .rc.weak { color: #f7c08a; }
.wf-clients { display: flex; flex-direction: column; }
.wf-client { display: flex; align-items: center; gap: 9px; width: 100%; background: transparent; border: 0; border-top: 1px solid #2a3460;
  padding: 6px 4px; text-align: left; cursor: pointer; color: var(--text); }
.wf-client:first-child { border-top: 0; }
.wf-client:hover { background: var(--panel-2); }
.wf-sig { flex: none; width: 34px; text-align: center; border-radius: 5px; padding: 2px 0; font: 600 11px ui-monospace, SFMono-Regular, Menlo, monospace;
  color: #0f1530; }
.wf-sig.none { background: #34406b; color: var(--muted); }
.wf-cm { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.wf-cm b { font-size: 12px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wf-cm span { font-size: 10.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wf-rate { flex: none; font-size: 10.5px; color: var(--muted); font-variant-numeric: tabular-nums; }

/* While a WAP is selected: each WAP's channels (2.4 · 5 GHz) beside its pin; amber = overlaps it. */
.mv-ch { position: absolute; left: 17px; top: -6px; display: flex; gap: 1px; padding: 1px; border-radius: 6px; background: rgba(15, 21, 42, .88);
  box-shadow: 0 1px 4px rgba(0,0,0,.35); pointer-events: none; white-space: nowrap; }
.mv-ch i { font: 700 9.5px/14px ui-monospace, SFMono-Regular, Menlo, monospace; font-style: normal; color: #dfe5f7; padding: 0 4px; border-radius: 5px; }
.mv-ch i + i { border-left: 1px solid rgba(255,255,255,.12); border-radius: 0 5px 5px 0; }
.mv-ch.self { background: #2f6fe0; }
.mv-ch.self i { color: #fff; }
.mv-ch i.clash { background: #f2a23c; color: #2a1a00; }

/* ── Tracker: picker, timeline, panels (trackerView.tsx, trackerTimeline.tsx) ── */
.trk { position: absolute; inset: 0; display: flex; flex-direction: column; background: #1b2340; outline: none; }
.trk-body { flex: 1; min-height: 0; display: grid; grid-template-columns: 300px minmax(0, 1fr); }
.trk.side-closed .trk-body { grid-template-columns: minmax(0, 1fr); }
.trk.side-closed .trk-side { display: none; }
.trk-msg { position: absolute; inset: 0; display: grid; place-items: center; color: var(--muted); font-size: 13px; padding: 24px; text-align: center; }
.trk-pick { align-content: center; gap: 12px; }
.trk-pick p { margin: 0; }
.trk-pick > div { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; max-width: 720px; }
.trk-pick a { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; padding: 8px 12px; background: #212b4d; border: 1px solid #2c3963;
  border-radius: 8px; color: var(--text); text-decoration: none; text-align: left; }
.trk-pick a:hover { border-color: #5b7cfa; }
.trk-pick a span { color: var(--muted); font-size: 11.5px; }

/* Left column: window, picker, client card, stops, notes. */
.trk-side { min-height: 0; overflow-y: auto; background: var(--panel); border-right: 1px solid var(--line); padding: 10px; display: flex; flex-direction: column; gap: 10px; }
.trk-window { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; }
.trk-k { color: #c9d1ef; font-size: 11.5px; font-weight: 600; }
.trk-ends { width: 100%; color: var(--muted); font-size: 11px; }
.trk-seg { display: inline-flex; gap: 2px; padding: 2px; background: var(--panel-2); border: 1px solid #34406b; border-radius: 7px; }
.trk-seg button { border: 0; background: transparent; color: #8f9ac4; font-size: 11.5px; padding: 2px 7px; border-radius: 5px; }
.trk-seg button.on { background: #3b82f6; color: #fff; }
.trk-seg button:hover:not(.on):not(:disabled) { background: #2a3560; color: #e3e8f8; }
.trk-seg button:disabled { opacity: .45; cursor: default; }
.trk-muted { margin: 4px 0; color: var(--muted); font-size: 11px; line-height: 1.4; }

.trk-picker { display: flex; flex-direction: column; gap: 2px; }
.trk-search { display: flex; align-items: center; gap: 6px; background: var(--panel-2); border: 1px solid #34406b; border-radius: 6px; padding: 4px 8px; margin-bottom: 4px; color: var(--muted); }
.trk-search input { flex: 1; min-width: 0; background: transparent; border: 0; outline: 0; color: var(--text); font: inherit; }
.trk-search button { display: inline-flex; background: none; border: 0; padding: 0; color: var(--muted); }
.trk-search button:hover { color: var(--text); }
.trk-group { display: flex; align-items: center; gap: 5px; width: 100%; margin-top: 6px; padding: 2px 0; background: none; border: 0; text-align: left;
  color: #c9d1ef; font-size: 11.5px; font-weight: 600; }
.trk-group span { margin-left: auto; color: var(--muted); font-weight: 400; }
.trk-group.toggle:hover { color: var(--text); }
.trk-row { display: flex; flex-direction: column; gap: 1px; width: 100%; padding: 5px 7px; background: transparent; border: 1px solid transparent; border-radius: 6px;
  color: var(--text); text-align: left; }
.trk-row:hover { background: var(--panel-2); }
.trk-row.on { border-color: #3b82f6; background: #2f3c6e; }
.trk-row-top { display: flex; align-items: baseline; gap: 6px; min-width: 0; }
.trk-row-top b { font-size: 12px; font-weight: 600; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.trk-row-sub { font-size: 10.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.trk-row-sub.busy { color: #ffc58a; }
.trk-cls { flex: none; margin-left: auto; padding: 0 6px; border-radius: 8px; background: #2a3560; color: #c9d1ef; font-size: 10px; font-style: normal; line-height: 16px; }
.trk-cls.stationary { background: rgba(45, 212, 191, .15); color: #5eead4; }
.trk-cls.personal { background: rgba(167, 139, 250, .16); color: #c4b5fd; }
.trk-more { align-self: flex-start; margin: 2px 7px; padding: 0; background: none; border: 0; color: var(--accent); font-size: 11px; }
.trk-more:hover { text-decoration: underline; }

.trk-card { display: flex; flex-direction: column; gap: 6px; padding: 10px; background: #212b4d; border: 1px solid #2c3963; border-radius: 10px; }
.trk-card p { margin: 0; }
.trk-card-head { display: flex; align-items: flex-start; gap: 8px; }
.trk-card-head b { flex: 1; min-width: 0; font-size: 13.5px; font-weight: 600; overflow-wrap: anywhere; }
.trk-card-head button, .trk-try button { display: inline-flex; align-items: center; gap: 4px; background: var(--panel-2); border: 1px solid #34406b; border-radius: 6px;
  padding: 3px 8px; font-size: 11.5px; }
.trk-card-head button:hover, .trk-try button:hover { border-color: #6b78ad; }
.trk-card-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; color: var(--muted); font-size: 11px; }
.trk-card-meta .trk-cls { margin-left: 0; }
.trk-mono { font: 10.5px ui-monospace, SFMono-Regular, Menlo, monospace; }
.trk-card-blurb { color: #c9d1ef; font-size: 11.5px; line-height: 1.4; }
.trk-card-counts { font-size: 11.5px; line-height: 1.4; }
.trk-card-counts span { display: block; margin-top: 2px; color: var(--muted); font-size: 10.5px; }
.trk-card-live { color: var(--ok); font-size: 11px; }
.trk-card-note { color: var(--warn); font-size: 11px; }
.trk-card-missing { color: var(--warn); font-size: 11.5px; line-height: 1.4; }
.trk-card-missing a { color: var(--accent); }
.trk-try { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 6px; }

.trk-sec { display: flex; flex-direction: column; gap: 3px; }
.trk-sec h4 { display: flex; align-items: baseline; gap: 6px; margin: 2px 0; color: #c9d1ef; font-size: 12px; font-weight: 600; }
.trk-sec h4 span { color: var(--muted); font-size: 10.5px; font-weight: 400; }
.trk-srow { display: flex; flex-direction: column; gap: 2px; padding: 4px 5px; border: 1px solid transparent; border-radius: 6px; }
.trk-srow:hover { background: #222c52; }
.trk-srow.here { background: rgba(59, 130, 246, .13); }
.trk-srow.on { border-color: #3b82f6; }
.trk-srow-main { display: flex; align-items: flex-start; gap: 8px; width: 100%; padding: 0; background: none; border: 0; color: var(--text); text-align: left; }
.trk-srow-n { flex: none; display: grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; color: #0f1530; font: 700 10.5px/1 -apple-system, BlinkMacSystemFont, sans-serif;
  font-style: normal; }
.trk-srow-text { display: flex; flex-direction: column; min-width: 0; }
.trk-srow-text b { font-size: 12px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.trk-srow-text span { color: var(--muted); font-size: 10.5px; }
.trk-badges { display: flex; flex-wrap: wrap; gap: 3px; padding-left: 28px; }
.trk-badges:empty { display: none; }
.trk-badges em, .trk-badge-link { padding: 0 6px; border-radius: 7px; background: #2a3560; color: #c9d1ef; font-size: 10px; font-style: normal; line-height: 15px; }
.trk-badges em.warn { background: rgba(242, 201, 76, .14); color: #f7e1a0; }
.trk-badges em.muted { color: var(--muted); }
.trk-badge-link { color: var(--accent); text-decoration: none; }
.trk-badge-link:hover { text-decoration: underline; }

.trk-finding { padding: 5px 8px; background: #1f2850; border: 1px solid #2c3963; border-left: 3px solid var(--accent); border-radius: 6px; }
.trk-finding.warn { border-left-color: var(--warn); }
.trk-finding.bad { border-left-color: var(--bad); }
.trk-finding.on { background: #283468; }
.trk-finding-head { display: flex; align-items: baseline; gap: 6px; }
.trk-finding-head b { flex: 1; font-size: 11.5px; font-weight: 600; }
.trk-finding-head button { padding: 0; background: none; border: 0; color: var(--accent); font-size: 11px; }
.trk-finding-head button:hover { text-decoration: underline; }
.trk-finding p { margin: 2px 0 0; color: #c9d1ef; font-size: 11px; line-height: 1.4; }

/* Stage: the stack (trackerStack.tsx) with the view toolbar over it. */
.trk-main { position: relative; display: flex; flex-direction: column; min-width: 0; min-height: 0; overflow: hidden; background: #18203d; }
/* The toolbar is a bar of its own, so it never covers what the stack draws along its top. */
.trk-tools { flex: none; display: flex; align-items: center; gap: 2px; padding: 4px 8px; overflow-x: auto; white-space: nowrap; background: var(--panel);
  border-bottom: 1px solid var(--line); }
.trk-stage-wrap { position: relative; flex: 1; min-height: 0; overflow: hidden; }
.trk-tools button { display: inline-flex; align-items: center; gap: 5px; padding: 5px 9px; background: transparent; border: 0; border-radius: 6px; color: #8f9ac4; font-size: 12px; }
.trk-tools button.on { background: #3b82f6; color: #fff; }
.trk-tools button:hover:not(.on):not(:disabled) { background: #2a3560; color: #e3e8f8; }
.trk-tools button:disabled { opacity: .45; cursor: default; }
.trk-sep { flex: none; width: 1px; height: 18px; margin: 0 3px; background: #34406b; }
.trk-offer { position: absolute; left: 50%; bottom: 16px; z-index: 5; transform: translateX(-50%); max-width: calc(100% - 24px); }
.trk-offer > div { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 12px 18px; text-align: center; background: rgba(27, 35, 64, .95);
  border: 1px solid #34406b; border-radius: 12px; box-shadow: 0 8px 24px rgba(0, 0, 0, .35); }
.trk-offer b { font-size: 14px; }
.trk-offer span { color: var(--muted); font-size: 12px; max-width: 380px; }
.trk-offer button { display: flex; flex-direction: column; align-items: center; gap: 2px; margin-top: 2px; padding: 7px 12px; background: #212b4d; border: 1px solid #2c3963;
  border-radius: 8px; }
.trk-offer button:hover { border-color: #5b7cfa; }
.trk-offer button em { color: var(--muted); font-size: 11px; font-style: normal; }
.trk-offer .trk-try { justify-content: center; margin-top: 0; }
.trk-badge-note { position: absolute; left: 12px; top: 46px; z-index: 5; padding: 3px 8px; border-radius: 6px; background: rgba(27, 35, 64, .92); color: #f7e1a0; font-size: 11px; }

/* Bottom timeline: transport row, then the Floor / WAP / Data lanes. */
.trk-tl { flex: none; display: flex; flex-direction: column; gap: 4px; padding: 6px 12px 5px; background: rgba(21, 29, 56, .97); border-top: 1px solid #34406b; }
.trk-tl-row { display: flex; align-items: center; gap: 8px; min-width: 0; font-size: 12px; }
.trk-tl-row > button, .trk-transport button { display: inline-flex; align-items: center; gap: 4px; background: var(--panel-2); border: 1px solid #34406b; border-radius: 6px; padding: 3px 7px; }
.trk-tl-row > button:hover:not(:disabled), .trk-transport button:hover:not(:disabled) { border-color: #6b78ad; }
.trk-tl-row button:disabled { opacity: .45; cursor: default; }
.trk-tl-row .trk-seg { flex: none; }
.trk-transport { flex: none; display: inline-flex; gap: 2px; }
.trk-play { min-width: 30px; justify-content: center; }
.trk-live { flex: none; }
.trk-live.on { border-color: var(--ok); color: var(--ok); }
.trk-clock { flex: none; color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
.trk-clock b { color: var(--text); font-weight: 700; }
.trk-tl-caption { flex: 1; min-width: 0; overflow: hidden; color: #c9d1ef; font-size: 11.5px; white-space: nowrap; text-overflow: ellipsis; }
.trk-sig { display: inline-block; width: 8px; height: 8px; margin-right: 5px; border-radius: 50%; vertical-align: 0; }
.trk-lanes { display: grid; grid-template-columns: 50px minmax(0, 1fr); gap: 6px; }
.trk-lane-names, .trk-lane-area { display: grid; grid-template-rows: 14px 44px 14px 12px; row-gap: 3px; }
.trk-lane-names { padding: 1px 0; color: var(--muted); font-size: 10.5px; line-height: 12px; }
.trk-lane-names > span { position: relative; }
.trk-ln-rows { position: absolute; inset: 0 0 0 auto; width: 26px; }
.trk-ln-rows i { position: absolute; right: 0; transform: translateY(-50%); color: #c9d1ef; font-size: 9.5px; font-style: normal; line-height: 1; white-space: nowrap; }
.trk-ln-wap, .trk-ln-data { display: flex; align-items: center; }
.trk-ln-floor { padding-top: 1px; }
.trk-lane-area { position: relative; overflow: hidden; background: #18203d; border: 1px solid var(--line); border-radius: 6px; cursor: ew-resize; touch-action: none; user-select: none; }
.trk-ticks, .trk-lane { position: relative; pointer-events: none; }
.trk-tick-mark { position: absolute; top: 0; bottom: 0; }
.trk-tick-mark i { position: absolute; top: 1px; left: 3px; color: var(--muted); font-size: 10px; font-style: normal; white-space: nowrap; }
.trk-grid { position: absolute; top: 0; bottom: 0; width: 1px; background: #222b4d; pointer-events: none; }
.trk-lane-floor { border-bottom: 1px solid #222b4d; }
.trk-chg { position: absolute; top: 0; bottom: 0; }
.trk-chg.likely { background: rgba(255, 155, 38, .28); }
.trk-chg.possible { background: rgba(255, 155, 38, .11); }
.trk-fl-seg { position: absolute; height: 3px; min-width: 2px; margin-top: -1.5px; border-radius: 2px; }
.trk-fl-seg.held { height: 0; margin-top: -1px; background: transparent !important; border-top: 2px dashed; border-radius: 0; }
.trk-fl-rise { position: absolute; width: 0; margin-left: -1px; border-left: 2px solid var(--hot); }
.trk-wap-bar { position: absolute; top: 2px; bottom: 2px; min-width: 2px; border-radius: 3px; opacity: .92; }
.trk-wap-held { position: absolute; top: 2px; bottom: 2px; border: 1.5px solid; border-radius: 3px; background: transparent; }
.trk-wap-dot { position: absolute; top: 50%; width: 8px; height: 8px; margin: -4px 0 0 -4px; border-radius: 50%; box-shadow: 0 0 0 1.5px #18203d; }
.trk-blk { position: absolute; top: 0; bottom: 0; }
.trk-blk.nodata { background: rgba(242, 201, 76, .55); }
.trk-blk.offline { background: #3d4874; }
.trk-blk.offwifi { background: repeating-linear-gradient(135deg, #8f9ac4 0 2px, transparent 2px 5px); opacity: .75; }
.trk-poll { position: absolute; top: 2px; bottom: 2px; width: 1px; background: rgba(76, 195, 138, .32); }
.trk-poll.heard { background: var(--ok); }
.trk-hover { position: absolute; top: 0; bottom: 0; z-index: 2; width: 1px; background: rgba(255, 255, 255, .35); pointer-events: none; }
.trk-hover i { position: absolute; top: 14px; left: 5px; padding: 0 4px; border-radius: 3px; background: #18203d; color: #d9dbe0; font-size: 10.5px; font-style: normal; white-space: nowrap; }
.trk-hover.flip i { left: auto; right: 5px; }
.trk-head { position: absolute; top: 0; bottom: 0; z-index: 3; width: 2px; margin-left: -1px; background: #3b82f6; box-shadow: 0 0 6px rgba(59, 130, 246, .6); pointer-events: none; }
.trk-head::before { content: ''; position: absolute; top: -1px; left: -4px; width: 10px; height: 10px; border-radius: 50%; background: #3b82f6; border: 2px solid #fff; box-sizing: border-box; }
.trk-head.live, .trk-head.live::before { background: var(--ok); }
.trk-legend { display: flex; align-items: center; gap: 12px; min-width: 0; padding-left: 56px; overflow: hidden; color: var(--muted); font-size: 10.5px; white-space: nowrap; }
.trk-legend span { flex: none; display: inline-flex; align-items: center; gap: 4px; }
.trk-legend i { display: inline-block; width: 10px; height: 8px; border-radius: 2px; }
.trk-legend .k-heard { width: 2px; border-radius: 0; background: var(--ok); }
.trk-legend .k-held { border: 1.5px solid #8f9ac4; }
.trk-legend .k-nodata { background: rgba(242, 201, 76, .55); }
.trk-legend .k-offline { background: #3d4874; }
.trk-legend .k-offwifi { background: repeating-linear-gradient(135deg, #8f9ac4 0 2px, transparent 2px 5px); }
.trk-legend .k-likely { background: rgba(255, 155, 38, .45); }
.trk-legend em { min-width: 0; margin-left: auto; overflow: hidden; font-style: normal; text-overflow: ellipsis; }
@media (max-width: 1100px) {
  .trk-body { grid-template-columns: 250px minmax(0, 1fr); }
  .trk-legend em { display: none; }
}

/* ── Tracker: the stacked building (trackerStack.tsx) ── */
/* Floor rail | stage, caption under the stage. Fills the box its parent gives it. */
.trk-bld { position: relative; display: grid; grid-template-columns: 64px minmax(0, 1fr); grid-template-rows: minmax(0, 1fr) auto;
  gap: 8px 10px; height: 100%; min-height: 0; min-width: 0; padding: 10px 10px 6px; }

/* Floor rail: top floor first, lowest at the bottom like the building. */
.trk-rail { grid-column: 1; grid-row: 1; position: relative; display: flex; flex-direction: column; gap: 4px; min-height: 0; overflow-y: auto; padding: 8px 5px;
  background: #212b4d; border: 1px solid var(--line); border-radius: 10px; scrollbar-width: thin; }
.trk-rail > :first-child { margin-top: auto; }
.trk-chip { position: relative; flex-shrink: 0; display: flex; flex-direction: column; align-items: stretch; gap: 1px; padding: 4px 6px 5px;
  border-radius: 6px; border: 2px solid transparent; background: #2a3560; color: #aab3d6; font-size: 11.5px; text-align: left; overflow: hidden; }
.trk-chip:hover { background: #34406b; }
.trk-chip.vis { color: #eef1fa; }
.trk-chip.on { border-color: #3b82f6; background: #2f3c6e; color: #fff; }
.trk-chip.here:not(.unknown) { box-shadow: inset 3px 0 0 #3b82f6; }
.trk-chip-row { display: flex; align-items: center; justify-content: space-between; gap: 3px; min-width: 0; }
.trk-chip b { font-weight: 600; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.trk-chip em { font-style: normal; font-size: 9.5px; color: #a7e8c4; }
/* The floor's alignment with its neighbours is a guess ("alignment approx." in its title and on the opened plate). */
.trk-chip-approx { flex: none; margin-left: auto; font-style: normal; font-size: 11px; line-height: 1; color: var(--warn); }
.trk-chip-stops { font-size: 9.5px; font-weight: 700; letter-spacing: .02em; color: #c4b5fd; white-space: nowrap; }
.trk-chip-dwell { position: absolute; left: 0; bottom: 0; height: 2px; background: #7c3aed; border-radius: 0 2px 0 0; }
.trk-chip-dot { flex: none; width: 8px; height: 8px; border-radius: 50%; background: #3b82f6; box-shadow: 0 0 0 2px rgba(255, 255, 255, .9); }
.trk-chip-dot.ghost { background: #8a93b3; box-shadow: 0 0 0 1.5px rgba(255, 255, 255, .4); }
.trk-chip.unknown { margin-top: 6px; background: transparent; border: 2px dashed #3a4675; }
.trk-chip.unknown.open { border-color: #5b6aa0; }
.trk-chip.unknown b { font-weight: 500; font-size: 10.5px; line-height: 1.15; white-space: normal; }

/* The stage: CSS 3D, perspective set inline (trackerStack.tsx PERSPECTIVE, shared with its projection). */
.trk-stage { grid-column: 2; grid-row: 1; position: relative; overflow: hidden; min-width: 0; min-height: 0; border-radius: 10px;
  background: radial-gradient(ellipse at 50% 38%, #27346b 0%, #1c2449 58%, #161d3b 100%); box-shadow: inset 0 0 0 1px var(--line);
  cursor: grab; touch-action: none; user-select: none; -webkit-user-select: none; }
.trk-stage.dragging { cursor: grabbing; }
.trk-stack { position: absolute; left: 0; top: 0; width: 0; height: 0; transform-origin: 0 0; transform-style: preserve-3d; }
/* A floor: a wireframe outline until its drawing is decoded (focused, visited or hovered floors only). */
.trk-plate { position: absolute; left: 0; top: 0; transform-origin: 0 0; border-radius: 3px; background: rgba(52, 66, 120, .6);
  box-shadow: inset 0 0 0 1px rgba(190, 200, 240, .9); transition: opacity .35s ease; }
.trk-plate canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: none; border-radius: inherit; }
.trk-plate.img { background: #f4f6fb; box-shadow: 0 6px 18px rgba(0, 0, 0, .35); }
.trk-plate.img canvas { display: block; }
.trk-plate.dim { opacity: .3; }
.trk-plate.faded { opacity: .08; }
.trk-plate.hover { box-shadow: 0 0 0 2px rgba(122, 167, 255, .8); }
.trk-plate.focus { box-shadow: 0 0 0 2px #3b82f6, 0 22px 50px rgba(0, 0, 0, .5); }
/* The dot's WAP has no drawn spot: the whole floor is lit instead (and, ghost, the floors its cell reaches). */
.trk-tint { position: absolute; inset: 0; border-radius: inherit; pointer-events: none; }
.trk-tint.here { background: rgba(59, 130, 246, .24); box-shadow: inset 0 0 0 2px rgba(59, 130, 246, .85); }
.trk-tint.ghost { background: rgba(59, 130, 246, .1); box-shadow: inset 0 0 0 1px rgba(59, 130, 246, .4); }
/* The serving WAP's nominal cell, in the floor's plane: "served by this WAP", never a distance. */
.trk-halo { position: absolute; box-sizing: border-box; border-radius: 50%; pointer-events: none; border: 1.5px solid rgba(59, 130, 246, .75);
  background: radial-gradient(circle, rgba(59, 130, 246, .34) 0%, rgba(59, 130, 246, .16) 62%, rgba(59, 130, 246, .05) 100%); }
.trk-halo.tight { border-width: 2px; background: radial-gradient(circle, rgba(59, 130, 246, .5) 0%, rgba(59, 130, 246, .22) 100%); }
.trk-halo.held { background: none; border-style: dashed; }
.trk-halo.ghost { background: rgba(59, 130, 246, .08); border: 1.5px dashed rgba(59, 130, 246, .45); }
/* Building preset: the same cells as rings in the floor's plane of the 3D building. */
.trk-rings3 path { fill: rgba(59, 130, 246, .16); stroke: rgba(59, 130, 246, .8); stroke-width: 1.5; }
.trk-rings3 path.tight { fill: rgba(59, 130, 246, .32); stroke-width: 2; }
.trk-rings3 path.held { fill: none; stroke-dasharray: 5 4; }
.trk-rings3 path.ghost { fill: rgba(59, 130, 246, .06); stroke: rgba(59, 130, 246, .45); stroke-dasharray: 5 4; }
.trk-ctl.b3 { bottom: 50px; }

/* Screen-space layers over the stack, placed by projection. */
.trk-paths, .trk-drop { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; overflow: visible; }
.trk-marks { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.trk-m { position: absolute; left: 0; top: 0; }
/* Floor name with its badges under it, right-aligned against the plate's nearest corner. */
.trk-plabel { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; white-space: nowrap; translate: calc(-100% - 10px) -50%; pointer-events: none; }
.trk-plabel b { font-size: 11px; font-weight: 600; color: #c9d1ef; text-shadow: 0 1px 2px rgba(0, 0, 0, .7); }
.trk-plabel.focus b { font-size: 12px; color: #fff; }
/* Beside the right edge instead, where the stage's left edge would cut the label (and its badges) off. */
.trk-plabel.right { translate: 10px -50%; align-items: flex-start; }
.trk-badge { font-size: 10px; line-height: 14px; padding: 0 6px; border-radius: 999px; border: 1px solid; white-space: nowrap; }
.trk-badge.spot { color: #9cc1ff; border-color: rgba(59, 130, 246, .55); background: rgba(59, 130, 246, .14); }
.trk-badge.approx { color: var(--warn); border-color: rgba(242, 201, 76, .5); background: rgba(242, 201, 76, .1); }
/* WAP glyphs: orange-rimmed on the path, dashed where the spot is not drawn. */
.trk-wap, .trk-stop { width: 0; height: 0; padding: 0; border: 0; background: none; pointer-events: auto; cursor: pointer; }
.trk-wap i { position: absolute; left: -5px; top: -5px; width: 10px; height: 10px; border-radius: 50%; background: #e8eeff;
  border: 2px solid #3b6fd8; box-shadow: 0 1px 3px rgba(10, 18, 40, .5); }
.trk-wap.dim { opacity: .35; }
.trk-wap.path i { left: -6px; top: -6px; width: 12px; height: 12px; border-color: #f97316; }
.trk-wap.approx i { border-style: dashed; }
.trk-wap.hi i { box-shadow: 0 0 0 3px var(--warn), 0 1px 3px rgba(10, 18, 40, .5); }
.trk-wap:hover { z-index: 2; }
.trk-wap:hover i { transform: scale(1.25); }
/* Numbered stops, sized by dwell (--r). */
.trk-stop i { position: absolute; left: calc(-1 * var(--r, 10px)); top: calc(-1 * var(--r, 10px)); width: calc(2 * var(--r, 10px)); height: calc(2 * var(--r, 10px));
  box-sizing: border-box; border-radius: 50%; display: grid; place-items: center; background: #7c3aed; color: #fff; font-style: normal;
  font-size: 11px; font-weight: 700; line-height: 1; border: 2px solid #fff; box-shadow: 0 2px 6px rgba(10, 18, 40, .55); }
.trk-stop.single i { border-style: dashed; }
.trk-stop.ahead { opacity: .35; }
.trk-stop.cur i { box-shadow: 0 0 0 3px #3b82f6, 0 2px 6px rgba(10, 18, 40, .55); }
.trk-stop.hi i { box-shadow: 0 0 0 3px var(--warn), 0 2px 6px rgba(10, 18, 40, .55); }
.trk-stop:hover { z-index: 2; }
/* Lying flat, the floors other than the solid one: faint, and clicks reach the solid floor's markers. */
.trk-wap.off, .trk-stop.off { opacity: .2; pointer-events: none; }
.trk-stop:hover i { transform: scale(1.12); }
/* The path: solid orange walks (dashed where it rises between floors), dotted teal associations. */
.trk-edge line { fill: none; stroke: #f97316; stroke-width: 2.5; stroke-linecap: round; }
.trk-edge line.riser { stroke-dasharray: 6 5; stroke-linecap: butt; }
.trk-edge.last line { stroke-width: 3.5; filter: drop-shadow(0 0 3px rgba(249, 115, 22, .75)); }
.trk-edge.assoc line { stroke: #14b8a6; stroke-dasharray: .1 6; stroke-linecap: round; }
.trk-edge.ahead { opacity: .28; }
.trk-edge.off { opacity: .15; }
.trk-times rect { fill: #c2410c; stroke: #fff; stroke-width: 1.2; }
.trk-edge.assoc .trk-times rect { fill: #0f766e; }
.trk-times text { fill: #fff; font-size: 10.5px; font-weight: 700; text-anchor: middle; }
/* The dot: floats over its spot on a drop line. Hollow while held, a grey ghost offline, amber over a collector gap. */
.trk-drop line { stroke: rgba(59, 130, 246, .9); stroke-width: 1.5; }
.trk-drop circle { fill: #3b82f6; }
.trk-drop .offline { stroke: #8a93b3; fill: #8a93b3; }
.trk-drop .nodata { stroke: var(--warn); fill: var(--warn); }
.trk-dotm { z-index: 3; pointer-events: none; }
.trk-dot { position: absolute; left: 0; top: 0; }
.trk-dot-core { position: absolute; left: -6px; top: -6px; width: 12px; height: 12px; border-radius: 50%; background: #3b82f6;
  box-shadow: 0 0 0 2px #fff, 0 2px 8px rgba(10, 18, 40, .6); animation: trk-beat .5s ease-out; }
@keyframes trk-beat { from { transform: scale(1.6); } to { transform: scale(1); } }
.trk-dotm.held .trk-dot-core { background: #1b2340; box-shadow: inset 0 0 0 2.5px #3b82f6, 0 0 0 2px rgba(255, 255, 255, .85); animation: none; }
.trk-dotm.offline .trk-dot-core { background: #8a93b3; opacity: .75; box-shadow: 0 0 0 2px rgba(255, 255, 255, .45); animation: none; }
.trk-dotm.nodata .trk-dot-core { background: var(--warn); box-shadow: 0 0 0 2px #fff, 0 2px 8px rgba(10, 18, 40, .6); animation: none; }
/* Its pulse, as the Map's selected device (.mv3d-pulse): restarted at each poll that heard the client. */
.trk-pulse { position: absolute; left: -24px; top: -24px; width: 48px; height: 48px; pointer-events: none; }
.trk-pulse::before, .trk-pulse::after { content: ''; position: absolute; inset: 0; border-radius: 50%; border: 2.5px solid rgba(59, 130, 246, .95);
  box-shadow: 0 0 12px rgba(59, 130, 246, .45); animation: trk-pulse 2s cubic-bezier(.2,.7,.3,1) infinite; }
.trk-pulse::after { animation-delay: 1s; }
@keyframes trk-pulse { from { transform: scale(.25); opacity: 1; } to { transform: scale(1); opacity: 0; } }
.trk-dot-tag { position: absolute; left: 12px; top: -9px; white-space: nowrap; font-size: 11px; font-weight: 600; line-height: 16px; padding: 0 6px;
  border-radius: 999px; background: rgba(15, 21, 42, .86); color: #dbe5ff; border: 1px solid rgba(59, 130, 246, .6); }
.trk-dotm.offline .trk-dot-tag { color: var(--muted); border-color: #4a5684; }
.trk-dotm.nodata .trk-dot-tag { color: var(--warn); border-color: rgba(242, 201, 76, .5); }
/* WAPs the drawings do not put on a floor: nothing is ever dropped. */
.trk-tray { position: absolute; left: 10px; bottom: 10px; z-index: 4; display: flex; flex-direction: column; gap: 3px; max-width: min(300px, 45%);
  max-height: 40%; overflow: auto; padding: 6px; background: rgba(27, 35, 64, .92); border: 1px dashed #4a5684; border-radius: 9px; }
.trk-tray h5 { margin: 0 2px 2px; font-size: 10.5px; font-weight: 600; color: var(--muted); }
.trk-tray button { display: flex; align-items: center; gap: 6px; padding: 3px 6px; border: 0; border-radius: 6px; background: transparent;
  color: #e3e8f8; font-size: 11.5px; text-align: left; min-width: 0; }
.trk-tray button:hover { background: #2a3560; }
.trk-tray button.ahead { opacity: .45; }
.trk-tray button.here { background: rgba(59, 130, 246, .16); }
.trk-tray span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.trk-tray em { margin-left: auto; font-style: normal; font-size: 10px; color: var(--muted); white-space: nowrap; }
.trk-tray-n { flex: none; width: 18px; height: 18px; border-radius: 50%; display: grid; place-items: center; background: #7c3aed; color: #fff;
  font-style: normal; font-size: 10px; font-weight: 700; }
.trk-tray-n.none { background: transparent; border: 1.5px dashed #4a5684; }
.trk-ctl { position: absolute; right: 10px; bottom: 10px; z-index: 4; display: flex; flex-direction: column; gap: 2px; padding: 3px;
  background: rgba(27, 35, 64, .92); border: 1px solid #34406b; border-radius: 9px; box-shadow: 0 6px 18px rgba(0, 0, 0, .3); }
.trk-ctl button { display: grid; place-items: center; width: 26px; height: 26px; border: 0; border-radius: 6px; background: transparent; color: #c9d1ef; }
.trk-ctl button:hover { background: #2a3560; color: #fff; }
.trk-hint { position: absolute; left: 50%; top: 10px; transform: translateX(-50%); z-index: 3; pointer-events: none; white-space: nowrap;
  max-width: calc(100% - 24px); overflow: hidden; text-overflow: ellipsis; padding: 5px 12px; border-radius: 999px;
  background: rgba(15, 21, 42, .78); color: #c9d1ef; font-size: 11px; animation: trk-hint 7s ease forwards; }
@keyframes trk-hint { 0% { opacity: 0; } 8%, 78% { opacity: 1; } 100% { opacity: 0; visibility: hidden; } }
.trk-empty { position: absolute; inset: 0; display: grid; place-items: center; color: var(--muted); font-size: 13px; }
/* What the dot means right now, with its limits. */
.trk-caption { grid-column: 2; grid-row: 2; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; min-height: 22px; padding: 0 4px;
  font-size: 12.5px; color: var(--text); }
.trk-caption > b { font-weight: 600; }
.trk-caption.held > b, .trk-caption.offline > b { color: #c9d1ef; }
.trk-caption.nodata > b { color: var(--warn); }
.trk-caption.offwifi > b { color: var(--muted); }
.trk-note { color: var(--muted); font-size: 11.5px; }
@media (prefers-reduced-motion: reduce) {
  .trk-pulse::after { display: none; }
  .trk-pulse::before { animation: none; transform: scale(.6); }
  .trk-dot-core { animation: none; }
  .trk-plate { transition: none; }
}

/* Apartment mode (3D): room tags (map3d.tsx, apartment3d.ts) */
.mv3d-room { color: #fff; font-weight: 600; font-size: 12px; letter-spacing: 0.04em; text-align: center; white-space: nowrap;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.75), 0 0 1px rgba(0, 0, 0, 0.8); pointer-events: none; }
.mv3d-room small { display: block; font-size: 10px; font-weight: 500; }
/* A conduit run's label (conduit3d): its sheet and what is assumed on hover; dashed where no sheet draws it. */
.mv3d-conduit { max-width: 190px; padding: 2px 7px; border-radius: 6px; background: rgba(15, 31, 64, 0.82);
  border: 1px solid #8a94a6; color: #dbe8ff; font-size: 10.5px; font-weight: 600; line-height: 1.3; text-align: center;
  pointer-events: auto; cursor: pointer; }
.mv3d-conduit.assumed { border-style: dashed; color: #b9c9e6; }
.mv3d-conduit.on { background: rgba(15, 31, 64, 0.96); border-width: 2px; color: #fff; }
/* The selected conduit or route (conduit3d selectionInfo): what it is and where it goes. */
.mv3d-conduit-card { position: absolute; left: 12px; top: 64px; z-index: 6; max-width: 300px; padding: 9px 30px 9px 12px;
  border-radius: 9px; border: 1px solid #8a94a6; border-left-width: 4px; background: rgba(27, 35, 64, .95);
  box-shadow: 0 6px 18px rgba(0,0,0,.3); color: #c9d1ef; font-size: 11px; line-height: 1.45; animation: mv-fade .2s ease; }
.mv3d-conduit-card b { display: block; margin-bottom: 3px; color: #f1f4fd; font-size: 12px; }
.mv3d-conduit-card span { display: block; }
.mv3d-conduit-card button { position: absolute; top: 5px; right: 6px; border: 0; background: none; color: #8f9ac4; cursor: pointer; }

/* ── Firewall (firewallPanel.tsx): ISP / firewall panel, client and unit blocks, Activity edge ── */
.ok-text { color: var(--ok); } .warn-text { color: var(--warn); } .bad-text { color: var(--bad); }
.sec.fw { display: flex; flex-direction: column; gap: 8px; }
.fw-fold { border-top: 1px solid var(--line); padding-top: 6px; }
.fw-fold > summary { cursor: pointer; font-weight: 700; font-size: 12px; padding: 2px 0 6px; list-style: none; display: flex; align-items: center; gap: 6px; }
.fw-fold > summary::before { content: '▸'; color: var(--muted); font-size: 10px; transition: transform .15s; }
.fw-fold[open] > summary::before { transform: rotate(90deg); }
.fw-fold > summary::-webkit-details-marker { display: none; }
.fw-line { background: var(--panel-2); border: 1px solid #2f3a66; border-radius: 8px; padding: 8px 9px; margin-bottom: 6px; display: flex; flex-direction: column; gap: 4px; cursor: pointer; font-size: 11.5px; }
.fw-line.on { border-color: var(--accent); }
.fw-line.down { border-color: rgba(255, 109, 90, .55); }
.fw-line-head { display: flex; align-items: center; gap: 7px; font-size: 12.5px; }
.fw-line-head b { color: var(--text); }
.fw-line-state { margin-left: auto; font-size: 11px; color: var(--muted); }
.fw-line.down .fw-line-state { color: #ffb3a8; }
.fw-line-rate { color: var(--muted); } .fw-line-rate b { color: var(--text); font-weight: 600; }
.fw-check { display: grid; grid-template-columns: 12px auto 1fr auto; gap: 6px; align-items: center; color: var(--muted); }
.fw-check svg { color: var(--ok); } .fw-line.down .fw-check svg { color: var(--bad); }
.fw-check span:last-child { color: var(--text); }
.fw-line-meta { color: var(--muted); font-size: 10.5px; line-height: 1.4; }
.fw-spark { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 10.5px; }
.fw-spark svg { width: 90px; height: 18px; flex: none; }
.fw-chart { background: var(--panel-2); border: 1px solid #2f3a66; border-radius: 8px; padding: 8px 9px; display: flex; flex-direction: column; gap: 6px; }
.fw-chart-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: 12px; }
.fw-legend { display: inline-flex; align-items: center; gap: 5px; color: var(--muted); font-size: 11px; }
.fw-legend i, .fw-tip i { display: inline-block; width: 12px; height: 2px; border-radius: 1px; margin-right: 2px; vertical-align: middle; }
.fw-seg { margin-left: auto; display: inline-flex; border: 1px solid #34406b; border-radius: 6px; overflow: hidden; }
.fw-seg button { background: transparent; border: 0; color: var(--muted); font-size: 11px; padding: 3px 8px; cursor: pointer; }
.fw-seg button.on { background: #34406b; color: var(--text); }
.fw-plot { position: relative; }
.fw-plot svg { display: block; width: 100%; height: 120px; cursor: crosshair; }
.fw-ymax { position: absolute; left: 4px; top: 0; font-size: 10px; color: var(--muted); pointer-events: none; }
.fw-axis { stroke: #34406b; stroke-width: 1; vector-effect: non-scaling-stroke; }
.fw-cross { stroke: #c9d1ef; stroke-width: 1; vector-effect: non-scaling-stroke; }
.fw-tip { position: absolute; top: 14px; background: #10162e; border: 1px solid #34406b; border-radius: 6px; padding: 5px 8px; font-size: 11px; color: var(--muted); pointer-events: none; white-space: nowrap; }
.fw-tip b { color: var(--text); font-weight: 700; margin-right: 3px; }
.fw-axis-x { display: flex; justify-content: space-between; font-size: 10px; color: var(--muted); }
.fw-table { width: 100%; border-collapse: collapse; font-size: 11px; }
.fw-table th { text-align: left; color: var(--muted); font-weight: 500; padding: 3px 4px; border-bottom: 1px solid var(--line); }
.fw-table td { padding: 4px; border-bottom: 1px solid rgba(44, 57, 99, .5); vertical-align: top; word-break: break-word; }
.fw-table tr.off td { opacity: .55; }
.fw-table .muted, .fw-rule-line .muted { font-size: 10.5px; }
.fw-tags { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 6px; }
.fw-tags span { font-size: 10.5px; padding: 2px 7px; border-radius: 10px; background: var(--panel-2); border: 1px solid #34406b; color: var(--text); }
.fw-tags span.ok { border-color: rgba(76, 195, 138, .5); }
.fw-tags span.off { color: var(--muted); text-decoration: line-through; }
.fw-units { font-size: 11.5px; margin-top: 8px; color: var(--muted); } .fw-units b { color: var(--text); }
.fw-subhead { font-weight: 700; font-size: 11.5px; margin: 8px 0 4px; }
.fw-rule-line { font-size: 11.5px; padding: 3px 0; }
.fw-rule-line.off { opacity: .6; }
.fw-edge-lines { grid-column: 2; display: flex; flex-direction: column; gap: 3px; margin-top: 2px; }
.fw-edge-line { display: flex; align-items: center; gap: 6px; font-size: 11.5px; flex-wrap: wrap; }
.fw-edge-line b { font-size: 12px; }
.fw-edge-num { margin-left: auto; color: #c9d1ef; }
.fw-edge-line.down .fw-edge-num { color: #ffb3a8; }
.fw-edge-fw { grid-column: 2; display: flex; flex-direction: column; gap: 2px; margin-top: 3px; padding-top: 5px; border-top: 1px solid #3a4677; }
/* Internet edge (internetEdge.tsx): a chain of cards (internet, firewall, backbone) joined by links
   that say what they carry, and the core switches as tiles. */
.act-edge { overflow: auto; display: flex; flex-direction: column; }
.ie { --ie-w: min(460px, 100%); display: flex; flex-direction: column; flex: 1; min-height: 0; gap: 18px; }
.ie-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.ie-head h3 { margin: 0; font-size: 14px; font-weight: 500; color: #e3e8f8; }
.ie-chip { display: inline-flex; align-items: center; gap: 7px; padding: 3px 10px 3px 8px; border-radius: 999px; font-size: 11.5px; font-weight: 600;
  color: #c9d1ef; background: rgba(125, 136, 179, .14); border: 1px solid rgba(125, 136, 179, .28); }
.ie-chip i { width: 7px; height: 7px; border-radius: 50%; background: #7d88b3; }
.ie-chip.ok { color: #a7e8c4; background: rgba(76, 195, 138, .12); border-color: rgba(76, 195, 138, .32); } .ie-chip.ok i { background: var(--ok); box-shadow: 0 0 0 3px rgba(76, 195, 138, .18); }
.ie-chip.warn { color: #f8dd8c; background: rgba(242, 201, 76, .12); border-color: rgba(242, 201, 76, .32); } .ie-chip.warn i { background: var(--warn); }
.ie-chip.bad { color: #ffb3a8; background: rgba(255, 109, 90, .12); border-color: rgba(255, 109, 90, .34); } .ie-chip.bad i { background: var(--bad); }
.ie-chain { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; }

.ie-node { --tint: var(--accent); width: var(--ie-w); box-sizing: border-box; display: grid; grid-template-columns: 38px minmax(0, 1fr); column-gap: 12px;
  padding: 12px 14px; border-radius: 10px; border: 1px solid #36426f; background: linear-gradient(180deg, #2a3561, #252f58); color: #c9d1ef;
  font-size: 12px; cursor: pointer; box-shadow: 0 1px 0 rgba(255, 255, 255, .03) inset, 0 6px 18px rgba(8, 12, 30, .25);
  transition: border-color .15s, transform .15s, box-shadow .15s; }
.ie-node:hover { border-color: color-mix(in srgb, var(--tint) 55%, #36426f); transform: translateY(-1px);
  box-shadow: 0 1px 0 rgba(255, 255, 255, .04) inset, 0 10px 24px rgba(8, 12, 30, .35); }
.ie-node:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.ie-node.fw { --tint: var(--hot); } .ie-node.backbone { --tint: var(--pending); }
.ie-node.dashed { border-style: dashed; border-color: #4a5684; background: rgba(42, 53, 97, .55); box-shadow: none; }
.ie-icon { width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center; color: var(--tint);
  background: color-mix(in srgb, var(--tint) 16%, transparent); border: 1px solid color-mix(in srgb, var(--tint) 28%, transparent); }
.ie-node.dashed .ie-icon { color: #9aa4cb; background: rgba(125, 136, 179, .12); border-color: rgba(125, 136, 179, .22); }
.ie-main { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.ie-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.ie-cap { font-size: 10.5px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: #8f9ac4; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ie-title { color: #fff; font-size: 14.5px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ie-pill { flex-shrink: 0; font-size: 10.5px; font-weight: 600; padding: 1px 8px; border-radius: 999px; color: #c9d1ef; background: rgba(125, 136, 179, .16); }
.ie-pill.ok { color: #a7e8c4; background: rgba(76, 195, 138, .14); } .ie-pill.warn { color: #f8dd8c; background: rgba(242, 201, 76, .14); }
.ie-pill.bad { color: #ffb3a8; background: rgba(255, 109, 90, .15); }
.ie-hint { display: flex; gap: 6px; align-items: flex-start; margin-top: 4px; color: #8f9ac4; font-size: 11.5px; line-height: 1.4; }
.ie-hint svg { flex-shrink: 0; margin-top: 2px; }
.ie-kvs { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.ie-kv { display: inline-flex; align-items: baseline; gap: 5px; padding: 3px 8px; border-radius: 6px; background: rgba(13, 19, 44, .35); border: 1px solid #333f6b; font-size: 11px; }
.ie-kv span { color: #8f9ac4; }
.ie-kv b { color: #e3e8f8; font-weight: 600; }
.ie-kv b.mono { font-family: ui-monospace, SFMono-Regular, monospace; font-weight: 500; font-size: 10.5px; }
.ie-node .fw-edge-lines { margin-top: 6px; }

.ie-link { position: relative; width: var(--ie-w); min-height: 40px; display: flex; justify-content: center; }
.ie-wire { width: 2px; background: var(--ok); position: relative; border-radius: 1px; }
.ie-link.warn .ie-wire { background: var(--warn); } .ie-link.bad .ie-wire { background: var(--bad); }
.ie-link.unknown .ie-wire { background: repeating-linear-gradient(#5d678f 0 5px, transparent 5px 10px); }
/* A healthy link carries a dot down it. */
.ie-link.ok .ie-wire::after { content: ''; position: absolute; left: 50%; top: 0; width: 6px; height: 6px; margin-left: -3px; border-radius: 50%;
  background: #c8f5dc; box-shadow: 0 0 8px var(--ok); animation: ie-flow 2.4s ease-in-out infinite; }
@keyframes ie-flow { 0% { top: 0; opacity: 0; } 15% { opacity: 1; } 85% { opacity: 1; } 100% { top: calc(100% - 6px); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .ie-link.ok .ie-wire::after { animation: none; display: none; } .ie-node { transition: none; } }
/* Two ISP boxes side by side whose links join into one down to the firewall. */
.ie-isps { width: min(660px, 100%); display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.ie-isps .ie-node { width: auto; }
.ie-sub { margin-top: 4px; color: #8f9ac4; font-size: 11.5px; }
.ie-fork { position: relative; width: min(660px, 100%); height: 52px; }
.ie-fork > span { position: absolute; border: 0 solid var(--ok); }
.ie-fork-l { left: calc(25% - 3.5px); right: calc(50% - 1px); top: 0; height: 50%; border-left-width: 2px !important; border-bottom-width: 2px !important;
  border-bottom-left-radius: 12px; }
.ie-fork-r { left: calc(50% - 1px); right: calc(25% - 3.5px); top: 0; height: 50%; border-right-width: 2px !important; border-bottom-width: 2px !important;
  border-bottom-right-radius: 12px; }
.ie-fork-trunk { left: calc(50% - 1px); top: calc(50% - 2px); bottom: 0; border-left-width: 2px !important; }
.ie-fork > .warn { border-color: var(--warn); } .ie-fork > .bad { border-color: var(--bad); }
.ie-fork > .unknown { border-color: #5d678f; border-style: dashed; }
/* The two halves meet under the trunk, so they draw as one bar. */
.ie-fork-l.unknown, .ie-fork-r.unknown { border-bottom-style: dashed; }
.ie-fork .ie-link-label { top: 75%; }
/* A link's speed, left of it. */
.ie-link-pill { position: absolute; right: calc(50% + 12px); top: 50%; transform: translateY(-50%); padding: 2px 9px; border-radius: 999px;
  font-size: 11px; font-weight: 600; color: #e3e8f8; background: #2a3561; border: 1px solid #3f4b7a; white-space: nowrap; font-variant-numeric: tabular-nums; }
.ie-link-label { position: absolute; left: calc(50% + 14px); top: 50%; transform: translateY(-50%); display: flex; flex-direction: column; gap: 2px;
  max-width: calc(50% - 18px); font-size: 11px; color: #c9d1ef; }
.ie-link-label > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ie-link-label b { color: #fff; font-weight: 600; }
.ie-link:has(.ie-link-label > :nth-child(2)) { min-height: 54px; }

.ie-switches { width: min(560px, 100%); display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 8px; }
.ie-switches.one { width: var(--ie-w); grid-template-columns: 1fr; }
.ie-switch { display: grid; grid-template-columns: 32px minmax(0, 1fr) auto; column-gap: 10px; align-items: center; text-align: left; width: 100%;
  padding: 9px 12px; border-radius: 10px; border: 1px solid #36426f; background: #27325c; color: #c9d1ef; font: inherit; cursor: pointer;
  transition: border-color .15s, background .15s; }
.ie-switch:hover { background: #2c3866; border-color: rgba(76, 195, 138, .5); }
.ie-switch.down { border-color: rgba(255, 109, 90, .55); }
.ie-sw-icon { position: relative; width: 32px; height: 32px; border-radius: 8px; display: grid; place-items: center; color: var(--ok);
  background: rgba(76, 195, 138, .13); border: 1px solid rgba(76, 195, 138, .25); }
.ie-switch.down .ie-sw-icon { color: var(--bad); background: rgba(255, 109, 90, .12); border-color: rgba(255, 109, 90, .28); }
.ie-sw-icon .dot { position: absolute; right: -2px; top: -2px; width: 8px; height: 8px; box-shadow: 0 0 0 2px #27325c; }
.ie-sw-main { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.ie-sw-main b { color: #fff; font-size: 12.5px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ie-sw-main span { color: #8f9ac4; font-size: 11px; }
.ie-sw-n { display: flex; flex-direction: column; align-items: flex-end; line-height: 1.15; }
.ie-sw-n b { color: #fff; font-size: 15px; font-weight: 600; font-variant-numeric: tabular-nums; }
.ie-sw-n span { color: #8f9ac4; font-size: 10px; }
.ie-empty { width: var(--ie-w); box-sizing: border-box; display: flex; align-items: center; gap: 8px; padding: 12px 14px; border-radius: 10px;
  border: 1px dashed rgba(255, 109, 90, .5); color: #ffb3a8; font-size: 12px; }

/* A load or a view that failed (shell.tsx, viewBoundary.tsx): what failed, and a button to try again */
.view-error { padding: 40px 24px; color: #9aa4cb; text-align: center; align-items: center; }
.view-error p { margin: 0 0 12px; }
.shell-msg button, .view-error button { background: var(--panel-2); border: 1px solid #34406b; border-radius: 6px; padding: 4px 10px; }
.shell-msg button:hover, .view-error button:hover { border-color: #6b78ad; }
.shell-msg button { margin-left: 4px; }

/* Probe tab (probeView.tsx) */
.pv { padding: 14px 18px 40px; overflow: auto; height: 100%; display: flex; flex-direction: column; gap: 14px; }
.pv-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.pv-head > div { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1; }
.pv-head b { font-size: 15px; }
/* The probe picker (a site probe and its testers) and Retire (CJ 2026-11-10) */
.pv-pick { align-self: flex-start; font: 600 15px/1.3 inherit; color: var(--text); background: var(--panel, transparent); border: 1px solid var(--line, rgba(255,255,255,.15)); border-radius: 6px; padding: 2px 6px; max-width: 100%; }
.pv-retire-btn { margin-left: auto; }
.pv-retire { flex-basis: 100%; border: 1px solid var(--bad, #d9534f); border-radius: 8px; padding: 10px 12px; display: flex; flex-direction: column; gap: 8px; font-size: 13px; }
.pv-retire ul { margin: 0; padding-left: 18px; color: var(--muted); display: grid; gap: 4px; }
.pv-retire label { display: flex; flex-direction: column; gap: 4px; }
.pv-retire input { max-width: 320px; font-family: ui-monospace, SFMono-Regular, monospace; }
.pv-retire.done { border-color: var(--line, rgba(255,255,255,.15)); }
.pv-retire .warn { color: var(--warn); }
.pv-danger:not(:disabled) { color: var(--bad, #d9534f); border-color: var(--bad, #d9534f); }
.pv-status { font-size: 11.5px; padding: 3px 8px; border-radius: 10px; border: 1px solid var(--line); color: var(--muted); }
.pv-status.ok { color: var(--ok); border-color: #2f6b52; } .pv-status.warn { color: var(--warn); border-color: #6b5a2a; } .pv-status.bad { color: var(--bad); border-color: #7a3a33; }
.pv-period { margin-left: 0; }
.pv-sec { background: var(--panel); border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; display: flex; flex-direction: column; gap: 10px; }
.pv-sec h3 { margin: 0; font-size: 13px; display: flex; align-items: center; gap: 6px; }
.pv-sec h4 { margin: 4px 0 0; font-size: 12px; display: flex; align-items: center; gap: 6px; color: var(--muted); font-weight: 600; }
.pv-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 8px; }
.pv-tile { background: var(--panel-2); border: 1px solid #2f3a66; border-radius: 8px; padding: 8px 10px; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.pv-tile span { font-size: 11px; color: var(--muted); }
.pv-tile b { font-size: 18px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pv-tile em { font-style: normal; font-size: 11px; color: var(--muted); }
.pv-tile.ok { border-left: 3px solid var(--ok); } .pv-tile.warn { border-left: 3px solid var(--warn); } .pv-tile.bad { border-left: 3px solid var(--bad); }
.pv-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 10px; }
.pv-now { margin-left: auto; color: var(--text); font-weight: 600; font-size: 12px; }
.pv-strip { display: grid; grid-template-columns: repeat(30, 1fr); gap: 2px; height: 26px; }
.pv-strip i { border-radius: 2px; background: #34406b; }
.pv-strip i.ok { background: var(--ok); } .pv-strip i.warn { background: var(--warn); } .pv-strip i.bad { background: var(--bad); }
.pv-table { width: 100%; border-collapse: collapse; font-size: 12px; }
.pv-table th { text-align: left; color: var(--muted); font-weight: 500; font-size: 11px; padding: 4px 8px; border-bottom: 1px solid var(--line); }
.pv-table td { padding: 5px 8px; border-bottom: 1px solid #222b4f; vertical-align: top; }
.pv-table td.ok { color: var(--ok); } .pv-table td.bad { color: var(--bad); }
.pv-table .mono, .pv-head .mono { font-family: ui-monospace, SFMono-Regular, monospace; font-size: 11px; }
.pv-speed { display: flex; flex-direction: column; gap: 6px; }
.pv-speed-now { display: flex; align-items: flex-end; gap: 22px; flex-wrap: wrap; }
.pv-speed-now div { display: flex; flex-direction: column; }
.pv-speed-now span { font-size: 11px; color: var(--muted); }
.pv-speed-now b { font-size: 22px; font-weight: 600; }
.pv-run { margin-left: auto; display: inline-flex; align-items: center; gap: 6px; background: #2d4d9a; border: 1px solid var(--accent); color: #fff; border-radius: 6px; padding: 6px 12px; font-size: 12px; }
.pv-run:disabled { opacity: .6; cursor: progress; }
.pv-err { color: var(--bad); font-size: 11.5px; }
.pv-findings { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; font-size: 12px; }
.pv-findings li { padding: 4px 8px; border-left: 3px solid var(--line); background: var(--panel-2); border-radius: 4px; }
.pv-findings li b { text-transform: uppercase; font-size: 10px; margin-right: 6px; color: var(--muted); }
.pv-findings li.bad { border-left-color: var(--bad); } .pv-findings li.warn { border-left-color: var(--warn); } .pv-findings li.ok { border-left-color: var(--ok); }
.pv-empty { padding: 30px; color: var(--muted); display: flex; gap: 10px; align-items: flex-start; max-width: 640px; }
.pv-enroll { border: 1px solid var(--warn); border-radius: 8px; padding: 10px 12px; display: flex; flex-direction: column; gap: 8px; background: #26305a; }
.pv-enroll-head { font-size: 12.5px; }
.pv-match { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; font-size: 12px; color: var(--muted); }
.pv-match b { font-family: ui-monospace, SFMono-Regular, monospace; font-size: 20px; color: var(--text); letter-spacing: 2px; }
.pv-match .mono { font-family: ui-monospace, SFMono-Regular, monospace; font-size: 10.5px; word-break: break-all; }
.pv-facts { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 11.5px; color: var(--muted); }
.pv-facts b { color: var(--text); font-weight: 500; }
.pv-checks { display: flex; flex-direction: column; gap: 3px; font-size: 12px; }
.pv-check { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); }
.pv-check.ok { color: var(--ok); } .pv-check.bad { color: var(--bad); }
.pv-actions { display: flex; gap: 8px; }
.pv-actions .pv-run { margin-left: 0; }
/* The Probe tab's pages, and Baseline Automations (baselineView.tsx). */
.pv-tabs { padding: 0; margin-top: -6px; }
.bl-bar { align-items: center; flex-wrap: wrap; }
.bl-bar .fw-seg { margin-left: 0; }
.bl-copy { margin-left: auto; display: inline-flex; align-items: center; gap: 6px; background: transparent; border: 1px solid #34406b; color: var(--text); border-radius: 6px; padding: 5px 10px; font-size: 12px; cursor: pointer; }
.bl-copy:disabled { opacity: .5; cursor: default; }
.bl-scroll { max-height: 440px; overflow: auto; border: 1px solid var(--line); border-radius: 6px; }
.bl-scroll .pv-table th { position: sticky; top: 0; background: var(--panel); z-index: 1; }
.bl-scroll .muted { color: var(--muted); font-size: 11px; }
.bl-wait { border-left: 3px solid var(--warn); padding-left: 8px; }
.bl-kept { display: inline-block; margin-right: 12px; white-space: nowrap; }
.bl-hold:disabled { cursor: not-allowed; }
/* Port Hardening's switches (portHardeningView.tsx): each its front panel, a click in or out. */
.bl-sw-list { display: flex; flex-direction: column; gap: 6px; }
.bl-fold > summary { cursor: pointer; font-size: 12px; font-weight: 600; padding: 4px 0; }
.bl-fold > summary .muted { color: var(--muted); font-weight: 400; }
.bl-fold .bl-fold { margin-left: 14px; }
.bl-sws { display: grid; gap: 8px; padding: 4px 0 8px; }
.bl-sws.small { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
.bl-sw { display: flex; flex-direction: column; gap: 6px; padding: 8px; border: 1px solid var(--line); border-radius: 8px; background: var(--panel-2); cursor: pointer; }
.bl-sw.in { border-color: #f2c94c; }
.bl-sw.out { opacity: .55; }
.bl-sw.none { cursor: default; }
.bl-sw:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.bl-sw-head { display: flex; align-items: center; gap: 8px; font-size: 12px; }
.bl-sw-sum { color: var(--muted); font-size: 11px; }
.bl-sw-kept { font-size: 11px; color: var(--muted); }
.bl-sw .bv-face-ports { --port-h: var(--port); }
.bl-sw .bv-pnum { display: block; }
.bl-sw .bv-port { cursor: inherit; }
.bv-port.ph-harden { outline: 2px dashed #f2c94c; outline-offset: 1px; }
.bv-port.ph-left { outline: 1px dashed #8f9ac4; outline-offset: 1px; }
.bv-port.ph-keep:hover { background: #f0525a; color: #fff; box-shadow: 0 0 0 2px #f0525a, 0 0 8px rgba(240,82,90,.6); }
.ph-tip { max-width: 300px; }
.ph-tip .bv-tip-head b { white-space: normal; }
.ph-tip-why { font-size: 12px; font-weight: 600; color: #c22f37; margin: 3px 0 2px; }
.bl-pick { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; cursor: pointer; }
.bl-hold { position: relative; overflow: hidden; touch-action: none; user-select: none; }
.bl-hold.holding { background-image: linear-gradient(to right, rgba(255, 255, 255, .22) 50%, transparent 50%); background-size: 200% 100%; background-position: 100% 0; animation: bl-hold-fill 3s linear forwards; }
@keyframes bl-hold-fill { to { background-position: 0 0; } }
.bl-lock-at { margin-left: auto; flex: none; display: inline-flex; }
.bl-lock { display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 24px; padding: 0; border: 1px solid var(--warn); border-radius: 6px; background: transparent; color: var(--warn); cursor: pointer; }
.bl-lock.holding { background-image: linear-gradient(to right, rgba(242, 201, 76, .45) 50%, transparent 50%); }
.bl-lock:disabled { opacity: .5; cursor: not-allowed; }
.bl-lock.shut { border-color: var(--ok); color: var(--ok); }
.bl-lock.shut:disabled { opacity: 1; cursor: default; }
.bl-sw-msg { font-size: 11px; }
.pv-reject { display: inline-flex; align-items: center; gap: 6px; background: transparent; border: 1px solid var(--line); color: var(--text); border-radius: 6px; padding: 6px 12px; font-size: 12px; }
.pv-cred-form { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 6px; align-items: center; }
.pv-cred-form input, .pv-cred-form select { background: var(--panel-2); border: 1px solid #34406b; color: var(--text); border-radius: 6px; padding: 6px 8px; font-size: 12px; }
.pv-cred-acts { display: flex; gap: 6px; justify-content: flex-end; }
.pv-cred-acts.start { justify-content: flex-start; }
.pv-cred-acts .pv-run { margin-left: 0; }
.pv-cred-secret { display: inline-flex; align-items: center; gap: 6px; }
.pv-cred-secret button { background: none; border: 0; padding: 2px; color: var(--muted); display: inline-grid; place-items: center; }
.pv-cred-secret button:hover { color: var(--text); }
.pv-cred-secret button:disabled { opacity: .5; cursor: progress; }
.pv-cred-secret.shown .mono { color: var(--warn); user-select: all; }
.pv-cred-unset { display: inline-flex; align-items: center; gap: 5px; background: none; border: 1px dashed var(--warn); color: var(--warn); border-radius: 6px; padding: 2px 8px; font-size: 12px; cursor: pointer; }
.pv-cred-unset:disabled { opacity: .5; cursor: default; }
.pv-sec .ok { color: var(--ok); } .pv-sec .warn { color: var(--warn); }

/* ── Map: phone speed tests (Ash app, straight to the site probe), kept the same size at any zoom ── */
.mv-speed { position: absolute; width: 0; height: 0; padding: 0; border: 0; background: none; transform: scale(var(--inv, 1));
  z-index: 2; cursor: pointer; --tone: #2eaa60; }
.mv-speed-tag em { font-style: normal; font-size: 9px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase;
  margin-right: 5px; padding: 0 4px; border-radius: 4px; background: rgba(255,255,255,.25); }
.mv-speed:hover, .mv-speed.on { z-index: 4; }
.mv-speed-dot { position: absolute; left: -5px; top: -5px; width: 10px; height: 10px; border-radius: 50%; background: var(--tone);
  border: 2px solid #fff; box-shadow: 0 1px 4px rgba(10, 18, 40, .5); }
.mv-speed-tag { position: absolute; left: 0; bottom: 9px; transform: translateX(-50%); white-space: nowrap; padding: 2px 6px; border-radius: 6px;
  background: var(--tone); color: #fff; font-size: 11px; font-weight: 700; font-variant-numeric: tabular-nums; box-shadow: 0 2px 6px rgba(10, 18, 40, .4); }
.mv-speed.on .mv-speed-tag { box-shadow: 0 0 0 3px #3b82f6, 0 2px 8px rgba(10, 18, 40, .5); }
.mv-speed .mv-label { top: 10px; }
.mv-canvas.zoomed .mv-speed .mv-label, .mv-speed.on .mv-label { display: flex; }

/* 360 photos on the Twin (twinFootage.tsx): a dot on the floor, and a look at the photo on hover. */
.mv-360 { position: absolute; width: 0; height: 0; padding: 0; border: 0; background: none; transform: scale(var(--inv, 1)); z-index: 3; cursor: pointer; }
.mv-360:hover { z-index: 5; }
.mv-360-dot { position: absolute; left: -8px; top: -8px; width: 16px; height: 16px; border-radius: 50%; background: #2f7bf6; border: 2px solid #fff; box-shadow: 0 1px 4px rgba(10, 18, 40, .55); transition: transform .12s ease; }
.mv-360:hover .mv-360-dot { transform: scale(1.3); }
.mv-360-card { display: none; position: absolute; left: 0; bottom: 14px; transform: translateX(-50%); width: 340px; padding: 5px; border-radius: 8px; background: #1b2340; color: #fff; text-align: left; font-size: 12px; box-shadow: 0 6px 18px rgba(0, 0, 0, .4); pointer-events: none; }
.mv-360:hover .mv-360-card { display: block; }
.mv-360-card img { display: block; width: 100%; height: 170px; margin-bottom: 4px; border-radius: 5px; object-fit: cover; background: #0b0f1e; }
.mv-360-card b, .mv-360-card small { display: block; padding: 0 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mv-360-card small { padding-bottom: 2px; color: rgba(255, 255, 255, .7); font-size: 11px; }
.mv-360-walks { position: absolute; left: 0; top: 0; pointer-events: none; }
.mv-360-walks polyline { fill: none; stroke: #2f7bf6; stroke-opacity: .8; stroke-width: 9; stroke-linejoin: round; stroke-linecap: round; }
.mv3d-pin .mv-360 { left: 0; top: 0; pointer-events: auto; transform: scale(var(--pin-s, 1)); transition: transform .2s ease; }
.mv3d-pin .mv-360:hover { transform: none; }
.mv3d-css { transition: opacity .2s ease; }
.mv3d-css.away { opacity: 0; }
.mv-floor-360 { margin-left: 2px; padding: 0 4px; border-radius: 6px; background: #2f7bf6; color: #fff; font-size: 10px; font-style: normal; font-weight: 700; }

/* ── Side panel: the floor's speed tests (speedTests.tsx), graded best to worst ── */
.details.st { padding: 0 0 12px; }
.st-head { display: flex; align-items: flex-start; gap: 9px; padding: 14px 14px 10px; border-bottom: 1px solid var(--line); }
.st-head > svg { color: var(--accent); margin-top: 2px; flex: none; }
.st-head div { display: flex; flex-direction: column; gap: 2px; flex: 1; }
.st-head b { font-size: 14px; }
.st-head span { color: var(--muted); font-size: 11.5px; }
.st-x { border: 0; background: var(--panel-2); color: var(--muted); border-radius: 6px; width: 24px; height: 24px; display: grid; place-items: center; }
.st-ends { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; padding: 12px 14px 4px; }
.st-ends button { display: flex; flex-direction: column; align-items: flex-start; gap: 1px; padding: 9px 10px; border-radius: 9px; text-align: left;
  border: 1px solid; background: none; }
.st-ends button.best { border-color: rgba(46,170,96,.5); background: rgba(46,170,96,.1); }
.st-ends button.worst { border-color: rgba(225,70,70,.5); background: rgba(225,70,70,.1); }
.st-ends em { font-style: normal; font-size: 10px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; }
.st-ends .best em { color: #6ee29b; } .st-ends .worst em { color: #ff8f8f; }
.st-ends b { font-size: 20px; font-variant-numeric: tabular-nums; }
.st-ends span { font-size: 11px; color: var(--muted); }
.st-ends small { font-size: 11px; color: var(--text); margin-top: 3px; }
.st-list { list-style: none; margin: 0; padding: 8px 8px 0; }
.st-list li { border-radius: 8px; }
.st-list li.on { background: var(--panel-2); }
.st-list li > button { display: grid; grid-template-columns: 12px 1fr auto; grid-template-areas: 'dot place date' 'dot nums nums' 'dot who who';
  column-gap: 8px; row-gap: 2px; width: 100%; padding: 8px 7px; border: 0; border-radius: 8px; background: none; text-align: left; }
.st-list li > button:hover { background: #26305a; }
.st-list i { grid-area: dot; width: 10px; height: 10px; border-radius: 50%; margin-top: 3px; }
.st-place { grid-area: place; font-weight: 600; }
.st-place mark { margin-left: 6px; padding: 0 5px; border-radius: 4px; font-size: 9.5px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; vertical-align: 1px; }
.st-place mark.best { background: rgba(46,170,96,.22); color: #6ee29b; }
.st-place mark.worst { background: rgba(225,70,70,.22); color: #ff8f8f; }
.st-date { grid-area: date; color: var(--muted); font-size: 11.5px; }
.st-nums { grid-area: nums; color: var(--muted); font-size: 12px; font-variant-numeric: tabular-nums; }
.st-nums b { color: var(--text); font-weight: 600; }
.st-who { grid-area: who; color: var(--muted); font-size: 11.5px; }
.st-runs { padding: 2px 10px 10px 27px; }
.st-runs table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; font-size: 12px; }
.st-runs th { text-align: left; color: var(--muted); font-weight: 500; font-size: 11px; padding: 3px 0; border-bottom: 1px solid var(--line); }
.st-runs td { padding: 4px 0; border-bottom: 1px solid rgba(44,57,99,.5); }
.st-runs p { margin: 6px 0 0; color: var(--muted); font-size: 11.5px; }
.st-foot { margin: 10px 14px 0; padding-top: 10px; border-top: 1px solid var(--line); color: var(--muted); font-size: 11px; line-height: 1.45; }

/* ── Camera pictures from Ash (cameraPeek.tsx) ── */
.iot table th.iot-cam, .iot table td.iot-cam { width: 34px; padding-right: 0; }
.cam-hover { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 6px; color: #9aa4cb; cursor: zoom-in; }
.cam-hover:hover { background: #2f3b69; color: #eef1fa; }
.iot-door { display: inline-grid; place-items: center; width: 26px; height: 26px; color: #9aa4cb; }
.cam-peek { position: fixed; z-index: 1000; width: 520px; padding: 10px; border-radius: 10px; background: #18203d; border: 1px solid #34406b;
  box-shadow: 0 14px 40px rgba(0,0,0,.5); pointer-events: none; display: flex; flex-direction: column; gap: 8px; color: #eef1fa; }
.cam-peek b { font-size: 13px; }
.cam-pic { position: relative; width: 100%; aspect-ratio: 16 / 9; border-radius: 7px; overflow: hidden; background: #0f1530;
  display: grid; place-items: center; }
.cam-pic img { width: 100%; height: 100%; object-fit: contain; display: block; }
.cam-pic em { position: absolute; right: 6px; bottom: 6px; font-style: normal; font-size: 10.5px; font-weight: 600; padding: 2px 6px;
  border-radius: 5px; background: rgba(0,0,0,.6); color: #fff; font-variant-numeric: tabular-nums; }
.cam-pic-note { font-size: 12px; color: #9aa4cb; padding: 12px; text-align: center; }
.cam-pic-note.bad { color: #ff8f8f; }
/* Offline thumbnails stay quiet beside the camera pictures. */
.cam-placeholder { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; gap: 6px; padding: 8px;
  background: var(--panel); color: var(--muted); font-size: 11px; line-height: 1.3; text-align: center; }
.cam-placeholder-icon { flex: none; width: 16px; height: 16px; opacity: .65; }
.cam-pic-over { position: absolute; left: 6px; bottom: 6px; max-width: calc(100% - 120px); font-size: 10.5px; font-weight: 600; padding: 2px 6px;
  border-radius: 5px; background: rgba(0,0,0,.6); color: #fff; }
.cam-pic-over.bad { color: #ffb4b4; }
.cam-photo { position: absolute; right: 12px; top: 64px; z-index: 6; width: min(560px, calc(100% - 24px)); padding: 10px; border-radius: 10px;
  background: rgba(24, 32, 61, .97); border: 1px solid #34406b; box-shadow: 0 14px 40px rgba(0,0,0,.5); display: flex; flex-direction: column;
  gap: 8px; color: #eef1fa; animation: mv-fade .2s ease; }
.cam-photo header { display: flex; align-items: center; gap: 8px; cursor: grab; user-select: none; touch-action: none; }
.cam-photo header.dragging { cursor: grabbing; }
.cam-photo header button { cursor: pointer; }
.cam-photo header > svg { color: #9aa4cb; flex: none; }
.cam-photo header div { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.cam-photo header b { font-size: 13.5px; }
.cam-photo header span { font-size: 11.5px; color: #9aa4cb; }
.cam-photo header button { border: 0; background: #2a3560; color: #c9d1ef; border-radius: 6px; width: 26px; height: 26px; display: grid; place-items: center; }
.cam-photo header button:hover { background: #34406b; color: #fff; }
.cam-photo header button:disabled { opacity: .7; cursor: progress; }
.cam-photo header button.busy svg { animation: cam-spin 1s linear infinite; }
@keyframes cam-spin { to { transform: rotate(360deg); } }


/* The rack view (rackView.tsx): a closet's rack front over the map, in inches (an SVG). */
.rv { position: relative; height: 100%; min-height: 0; min-width: 0; display: grid; grid-template-rows: auto minmax(0, 1fr); }
/* Arranging adds its line of help between the head and the rack. */
.rv.rv-arr { grid-template-rows: auto auto minmax(0, 1fr); }
.rv-head { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-bottom: 1px solid var(--line); }
.rv-head > svg { color: var(--accent); flex: none; }
.rv-head div { display: flex; flex-direction: column; gap: 2px; flex: 1; min-width: 0; }
.rv-head b { font-size: 15px; }
.rv-head span { color: var(--muted); font-size: 12px; }
.rv-btn { display: inline-flex; align-items: center; gap: 6px; background: var(--panel-2); border: 1px solid #34406b;
  color: var(--text); border-radius: 7px; padding: 5px 10px; font-size: 12px; cursor: pointer; }
.rv-x { border: 0; background: var(--panel-2); color: var(--muted); border-radius: 7px; width: 30px; height: 30px;
  display: grid; place-items: center; cursor: pointer; }
.rv-x:hover, .rv-btn:hover { color: var(--text); border-color: #4a5a94; }
.rv-body { display: grid; grid-template-columns: minmax(0, 1fr) 330px; min-height: 0; }
.rv-rack { overflow: auto; padding: 18px 22px 24px; display: flex; justify-content: center; align-items: flex-start; background: var(--bg); }
.rv-svg { display: block; width: 100%; max-width: 880px; height: auto; user-select: none; }
.rv-svg text { font-family: Inter, system-ui, -apple-system, sans-serif; }
/* The cabinet: its shell lit on the posts (rackView.tsx Defs), the dark inside, the metal rails. */
.rv-cab { fill: url(#rv-shell); stroke: #3a4466; stroke-width: .035; }
.rv-well { fill: url(#rv-well); stroke: #000; stroke-opacity: .8; stroke-width: .04; }
.rv-slot { fill: #06080d; stroke: #2c3550; stroke-width: .012; }
.rv-rail { fill: url(#rv-rail); }
.rv-cabname { font-size: .21px; fill: #7f8bb3; letter-spacing: .07px; font-weight: 600; }
.rv-u { font-size: .27px; fill: #7783ad; font-weight: 500; font-variant-numeric: tabular-nums; }
.rv-tick { stroke: #3a4466; stroke-width: .02; }
/* An empty U is just open: its outline shows only as somewhere to drop a unit while arranging. */
.rv-empty { fill: none; stroke: none; stroke-width: .03; stroke-dasharray: .12 .1; }
.rv-arr .rv-empty { stroke: #36426e; }
/* Folded U: the cabinet cut through to the page, between two torn edges. */
.rv-cut { fill: var(--bg); }
.rv-break { fill: none; stroke: #4a5683; stroke-width: .035; stroke-linejoin: round; }
.rv-fold { stroke: #34406b; stroke-width: .025; stroke-dasharray: .1 .1; }
.rv-gap { font-size: .27px; fill: #8792bb; font-weight: 500; letter-spacing: .01px; }
.rv-seam { stroke: #000; stroke-opacity: .35; stroke-width: .02; }
.rv-edge { stroke: #fff; stroke-opacity: .16; stroke-width: .018; }
.rv-name { font-size: .22px; font-weight: 700; fill: #1a2033; }
.rv-model { font-size: .17px; fill: #9aa3b8; }
.rv-num { font-size: .12px; fill: #7d8598; }
/* A jack's number on the grey patch panel. */
.rv-num.pp { fill: #e4e8ef; }
.rv-model.on-light { fill: #5b6170; }
.rv-ptitle { font-size: .15px; fill: #9aa3b8; letter-spacing: .02px; }
.rv-tag { font-size: .12px; fill: #fff; font-weight: 700; }
.rv-stick { font-size: .17px; fill: #1a2033; font-weight: 600; }
.rv-led { font-size: .14px; fill: #8d96ad; }
.rv-item.link { cursor: pointer; }
.rv-arr .rv-unit { cursor: grab; }
.rv-dragging, .rv-dragging .rv-unit { cursor: grabbing; }
.rv-arr .rv-port, .rv-arr .rv-item { pointer-events: none; }
.rv-unit.lifted { opacity: .85; filter: drop-shadow(0 .15px .25px rgba(0,0,0,.7)); }
.rv-ghost { fill: rgba(122,167,255,.12); stroke: var(--accent); stroke-width: .06; stroke-dasharray: .25 .15; }
.rv-ghost.bad { fill: rgba(255,109,90,.12); stroke: var(--bad); }
.rv-arrbar { padding: 7px 14px; font-size: 12px; color: #c9d1ef; background: #1c2650; border-bottom: 1px solid var(--line); }
.rv-arrbar b { color: #ffb3a8; font-weight: 600; }
.rv-check { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); }
.rv-btn.primary { background: var(--accent); border-color: var(--accent); color: #0e1324; font-weight: 600; }
.rv-btn:disabled { opacity: .5; cursor: default; }
.rv-item.link:hover rect:first-child { stroke: #fff; stroke-opacity: 1; }
.rv-unit { cursor: pointer; }
.rv-outline { fill: none; stroke: transparent; stroke-width: .05; }
.rv-unit:hover .rv-outline { stroke: #4a5a94; }
.rv-outline.on, .rv-unit:hover .rv-outline.on { stroke: var(--accent); }
.rv-hit { fill: transparent; stroke: transparent; stroke-width: .04; }
.rv-port.link { cursor: pointer; }
.rv-port:hover .rv-hit, .rv-hit.hot { stroke: #ffffff; }
.rv-dac { pointer-events: none; }
.rv-dac-out { fill: none; stroke: #050608; stroke-width: .13; stroke-linecap: round; }
.rv-dac-in { fill: none; stroke: #2e333c; stroke-width: .05; stroke-linecap: round; }
.rv-dac-shade { fill: none; stroke: #000; stroke-opacity: .32; stroke-width: .13; stroke-linecap: round; }
.rv-dac-hi { fill: none; stroke: #fff; stroke-opacity: .28; stroke-width: .018; stroke-linecap: round; }
.rv-dac-end { fill: url(#rv-bezel); stroke: #5a616d; stroke-width: .02; }
.rv-dac.fibre .rv-dac-out { stroke: #0c5d66; stroke-width: .11; }
.rv-dac.fibre .rv-dac-in { stroke: #3fd0dc; stroke-width: .06; }
.rv-dac.fibre .rv-dac-hi { stroke-opacity: .5; }
.rv-dac.hot .rv-dac-shade, .rv-dac.hot .rv-dac-hi { display: none; }
/* The hovered cable, and a hovered port's cord: the NOC's strong selection blue (CJ 2026-11-02). */
.rv-dac.hot .rv-dac-out { stroke: #fff; stroke-width: .16; }
.rv-dac.hot .rv-dac-in { stroke: #2f80ff; stroke-width: .09; }
.rv-dac.hot { filter: drop-shadow(0 0 .12px rgba(47, 128, 255, .95)); }
.rv-cable { fill: none; stroke: #2f80ff; stroke-width: .08; stroke-linecap: round; filter: drop-shadow(0 0 .12px rgba(47, 128, 255, .95)); pointer-events: none; }
.rv-side { border-left: 1px solid var(--line); overflow-y: auto; padding: 14px; }
.rv-side h4 { margin: 0 0 8px; font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.rv-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.rv-list li { display: flex; align-items: center; gap: 8px; padding: 7px 8px; border-radius: 7px; background: var(--panel); border: 1px solid #27315a; cursor: pointer; }
.rv-list li:hover { border-color: #4a5a94; }
.rv-list li.panel { background: transparent; border-color: transparent; opacity: .7; }
.rv-list li div { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.rv-list b { font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rv-list small { color: var(--muted); font-size: 11px; }
.rv-uu { width: 30px; color: #6c78a6; font-size: 11px; font-variant-numeric: tabular-nums; }
.rv-count { color: var(--muted); font-size: 11px; font-variant-numeric: tabular-nums; }
.rv-dot { width: 8px; height: 8px; border-radius: 50%; flex: none; background: #3a4258; }
.rv-dot.online { background: var(--ok); } .rv-dot.offline { background: var(--bad); }
.rv-note { margin: 12px 0 0; color: #8f9ac4; font-size: 11.5px; line-height: 1.5; }
.rv-legend { margin-top: 12px; }
.rv-back { background: none; border: 0; color: var(--accent); font-size: 12px; padding: 0; margin-bottom: 10px; cursor: pointer; }
.rv-title { display: flex; align-items: center; gap: 9px; margin-bottom: 10px; }
.rv-title div { display: flex; flex-direction: column; gap: 2px; }
.rv-title b { font-size: 14px; } .rv-title small { color: var(--muted); font-size: 11.5px; }
.rv-facts { display: grid; grid-template-columns: 58px 1fr; gap: 4px 8px; margin: 0 0 10px; font-size: 12px; }
.rv-facts dt { color: var(--muted); } .rv-facts dd { margin: 0; word-break: break-word; }
.rv-bar { display: flex; height: 6px; border-radius: 3px; overflow: hidden; margin-bottom: 10px; background: #1b2240; }
/* A switch's CPU, memory and PoE: the label and value on one line, the usage bar under it, the
   facts' whole width. */
.rv-meter { grid-column: 1 / -1; margin: 2px 0 4px; }
.rv-meter-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 5px; font-size: 12.5px; color: #c9d1ef; }
.rv-meter-head b { font-weight: 500; color: var(--muted); font-variant-numeric: tabular-nums; }
.rv-meter-bar { height: 7px; border-radius: 4px; background: #2c3963; overflow: hidden; }
.rv-meter-bar i { display: block; height: 100%; border-radius: 4px; background: var(--ok); }
.rv-meter-bar.warn i { background: var(--warn); } .rv-meter-bar.bad i { background: var(--bad); }
/* One grid for the whole list (each row a subgrid): Port, VLAN and Power as wide as their widest,
   the name the rest. */
.rv-ports { list-style: none; margin: 0; padding: 0; font-size: 11.5px; display: grid; grid-template-columns: max-content max-content minmax(0, 1fr) max-content; column-gap: 10px; }
.rv-ports li { display: grid; grid-template-columns: subgrid; grid-column: 1 / -1; align-items: center; padding: 4px 6px; border-radius: 5px; }
/* A port's VLAN, in the colour of the system on it (rackLayout JACK_COLORS); a trunk's outlined. */
.rv-vl { justify-self: center; min-width: 26px; padding: 1px 5px; border-radius: 4px; border: 1px solid #3a4778; background: #1d2547;
  color: #eef1fa; font: 600 10.5px/1.35 ui-monospace, SFMono-Regular, Menlo, monospace; text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 52px; }
.rv-vl.k-wap, .rv-vl.k-data { color: #14181f; border-color: transparent; }
.rv-vl.k-camera, .rv-vl.k-intercom, .rv-vl.k-av, .rv-vl.k-access { border-color: transparent; }
.rv-vl.k-nid { border-color: #4a5170; }
.rv-ports li.hot, .rv-ports li:not(.rv-ports-head):hover { background: var(--panel-2); }
/* The lists' heading: Port | VLAN | Speed | Name, the Name switching host and scan names. */
.rv-ports li.rv-ports-head { color: var(--muted); font-size: 10.5px; text-transform: uppercase; letter-spacing: .04em; padding-bottom: 2px; }
.rv-ports li.rv-ports-head button { color: var(--accent); font-size: 10.5px; text-transform: uppercase; letter-spacing: .04em; display: inline-flex; align-items: center; gap: 4px; }
.rv-ports button.unscanned { color: var(--muted); font-style: italic; }
.rv-oneline { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rv-muted { color: var(--muted); }
.rv-upspeed { color: var(--ok); font-weight: 600; }
/* A port's far end (an uplink, a neighbour): opens its unit, or its rack. */
.rv-far { display: inline; background: none; border: 0; padding: 0; color: var(--accent); font: inherit; cursor: pointer; text-decoration: underline dotted; text-underline-offset: 2px; }
.rv-pn { display: flex; align-items: center; gap: 6px; min-width: 0; color: #c9d1ef; white-space: nowrap; }
.rv-pn b { font-weight: 500; max-width: 120px; overflow: hidden; text-overflow: ellipsis; }
.rv-pn .bv-port.sq { --port: 17px; flex: none; cursor: help; }
.rv-pn .rv-st { flex: none; margin: 0 4px; }
.rv-pw { justify-self: end; color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
.rv-pn em { font-style: normal; color: #8f9ac4; }
.rv-sp { color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
.rv-st { width: 8px; height: 8px; border-radius: 2px; background: #2c3350; }
.rv-st.up { background: var(--ok); } .rv-st.uplink { background: var(--accent); } .rv-st.down { background: #7a4650; }
.rv-ports button { background: none; border: 0; padding: 0; color: var(--accent); font-size: 11.5px; text-align: left; cursor: pointer; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rv-peer { color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rv-tip { position: fixed; z-index: 60; pointer-events: none; display: flex; flex-direction: column; gap: 2px; padding: 7px 9px;
  background: rgba(20, 27, 52, .97); border: 1px solid #3a4778; border-radius: 7px; font-size: 11.5px; color: #c9d1ef;
  box-shadow: 0 6px 18px rgba(0,0,0,.35); max-width: 280px; }
.rv-tip b { color: #eef1fa; font-size: 12px; }
@media (max-width: 1100px) { .rv-body { grid-template-columns: 1fr; grid-template-rows: minmax(0, 1fr) 240px; } .rv-side { border-left: 0; border-top: 1px solid var(--line); } }

/* The Racks tab (racksView.tsx): the building's racks floor by floor, the one picked beside. */
.rk { display: grid; grid-template-columns: 270px minmax(0, 1fr); height: 100%; min-height: 0; }
.rk-list { border-right: 1px solid var(--line); overflow-y: auto; padding: 12px 10px 16px; background: var(--panel); }
.rk-list header { display: flex; flex-direction: column; gap: 2px; padding: 2px 6px 10px; }
.rk-list header b { font-size: 14px; } .rk-list header span { color: var(--muted); font-size: 11.5px; }
.rk-list header .rk-lost { margin-top: 6px; color: #f2b23c; }
.rk-list section { margin-top: 6px; }
.rk-list h4 { margin: 8px 6px 4px; font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.rk-item { width: 100%; display: flex; align-items: center; gap: 9px; padding: 7px 8px; border-radius: 8px; border: 1px solid transparent;
  background: none; color: var(--text); text-align: left; cursor: pointer; }
.rk-item > svg { color: #6c78a6; flex: none; }
.rk-item:hover { background: var(--panel-2); }
.rk-item.on { background: var(--panel-2); border-color: var(--accent); }
.rk-item.on > svg { color: var(--accent); }
.rk-item div { display: flex; flex-direction: column; gap: 1px; flex: 1; min-width: 0; }
.rk-item b { font-size: 12.5px; display: flex; align-items: center; gap: 6px; }
.rk-item em { font-style: normal; font-size: 9.5px; font-weight: 700; color: #0e1324; background: var(--accent); border-radius: 4px; padding: 0 4px; }
.rk-item small { color: var(--muted); font-size: 11px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 900px) { .rk { grid-template-columns: 1fr; grid-template-rows: 180px minmax(0, 1fr); } .rk-list { border-right: 0; border-bottom: 1px solid var(--line); } }

/* ── The Topology tab's Riser view (riserView.tsx): floors by riser, a riser drawing ── */
.rz { position: absolute; inset: 0; display: flex; flex-direction: column; min-height: 0; }
.rz-tools { position: absolute; bottom: 52px; right: 16px; z-index: 5; display: flex; align-items: center; gap: 4px;
  background: rgba(27, 35, 64, .92); border: 1px solid #34406b; border-radius: 8px; padding: 3px 5px; font-size: 11.5px; color: var(--muted); }
.rz-tools button { display: grid; place-items: center; width: 24px; height: 22px; border: 1px solid transparent; border-radius: 5px; background: none; color: var(--text); }
.rz-tools button:hover { border-color: #4a5684; }
.rz-tools button.on { color: var(--accent); }
.rz-tools span { min-width: 34px; text-align: center; font-variant-numeric: tabular-nums; }
.rz-scroll { flex: 1; min-height: 0; overflow: auto; padding: 12px; }
.rz-sheet { position: relative; }
.rz-lines { position: absolute; left: 0; top: 0; pointer-events: none; overflow: visible; }
.rz-row { position: absolute; left: 0; border-top: 1px solid #26305a; }
.rz-row.odd { background: rgba(122, 167, 255, .035); }
.rz-row span { position: absolute; left: 8px; top: 50%; transform: translateY(-50%); color: var(--muted); font-size: 12px; font-weight: 600; }
.rz-head { position: absolute; top: 0; display: flex; align-items: center; padding-left: 10px;
  color: var(--accent); font-size: 14px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; border-left: 1px dashed #2c3963; }
.rz-head.mdf { color: #c9b3ff; }
.rz-closet { position: absolute; display: flex; flex-direction: column; align-items: flex-start; gap: 1px; padding: 0; border: 0; background: none; }
.rz-closet small { font: 600 8.5px/1 ui-monospace, SFMono-Regular, Menlo, monospace; color: #aab4da; white-space: nowrap; }
.rz-sw { position: relative; display: inline-flex; align-items: center; gap: 2px; width: 30px; height: 14px; padding: 0 4px; border-radius: 3px;
  background: linear-gradient(#5d7bd6, #3f58a8); border: 1px solid #8ea6f0; box-shadow: 0 1px 0 rgba(0,0,0,.4); }
.rz-sw i { width: 3px; height: 4px; background: #d9e3ff; border-radius: 1px; }
.rz-sw em { position: absolute; right: -16px; top: -2px; font: 700 9px/1 -apple-system, sans-serif; font-style: normal; color: #c9d1ef; }
.rz-sw.small { width: 22px; height: 10px; vertical-align: middle; }
.rz-closet.bad .rz-sw { background: linear-gradient(#c45c63, #8e3a40); border-color: #ff8d86; }
.rz-closet.on .rz-sw, .rz-closet:hover .rz-sw { outline: 2px solid var(--warn); outline-offset: 1px; }
.rz-lines .f path { stroke: #a066f0; stroke-width: 2.4; fill: none; }
.rz-lines .f .h path { stroke: #4f8ff0; stroke-width: 1.6; }
.rz-sub { position: absolute; height: 22px; display: flex; align-items: center; padding-left: 4px; color: var(--muted); font-size: 11px;
  font-weight: 600; letter-spacing: .01em; white-space: nowrap; overflow: hidden; }
.rz-chip { position: absolute; display: flex; align-items: center; gap: 5px; padding: 0 6px; border: 1px solid transparent; border-radius: 6px;
  background: rgba(35, 46, 88, .6); }
.rz-chip:hover { border-color: #4a5684; background: var(--panel-2); }
.rz-chip.on { border-color: var(--warn); }
.rz-chip span { display: grid; place-items: center; }
.rz-chip b { font-size: 13px; color: var(--text); font-variant-numeric: tabular-nums; }
.rz-chip em, .rz-off { font-style: normal; font-weight: 700; font-size: 10px; color: #fff; background: var(--bad); border-radius: 7px; padding: 0 4px; line-height: 14px; }
.rz-core { position: absolute; display: flex; align-items: center; gap: 8px; width: 130px; height: 40px; padding: 0 9px;
  border: 1px solid #6b5bb0; border-radius: 8px; background: #2a2650; color: #d9ccff; text-align: left; }
.rz-core.fw { border-color: #4f6db8; background: #1f2d55; color: #c4d4ff; }
.rz-core.bad { border-color: var(--bad); }
.rz-core.on, .rz-core:hover { outline: 2px solid var(--warn); outline-offset: 1px; }
.rz-core span { display: flex; flex-direction: column; min-width: 0; line-height: 1.15; }
.rz-core b { font-size: 12px; }
.rz-core small { font-size: 10px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rz-more { position: absolute; border: 0; background: none; padding: 0; color: var(--accent); font-size: 11px; }
.rz-net { position: absolute; display: flex; align-items: center; gap: 6px; height: 34px; padding: 0 14px; border-radius: 17px;
  background: #2f6fd6; color: #fff; font-weight: 600; font-size: 12.5px; }
.rz-isp { font-size: 10.5px; fill: #9ad8b4; text-anchor: middle; }
.rz-isp.down { fill: #ff8d86; }
.rz-pop { position: absolute; z-index: 10; width: 280px; max-height: 320px; display: flex; flex-direction: column; gap: 6px; padding: 9px 10px;
  background: rgba(20, 27, 52, .98); border: 1px solid #3a4778; border-radius: 9px; box-shadow: 0 10px 28px rgba(0,0,0,.45); }
.rz-pop b { font-size: 12px; color: var(--text); }
.rz-pop ul { list-style: none; margin: 0; padding: 0; overflow: auto; }
.rz-pop li button { display: flex; align-items: center; gap: 7px; width: 100%; padding: 4px 5px; border: 0; border-radius: 5px; background: none; text-align: left; font-size: 12px; color: #c9d1ef; }
.rz-pop li button:hover, .rz-pop li button.on { background: var(--panel-2); color: var(--text); }
.rz-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--muted); flex: none; }
.rz-dot.online { background: var(--ok); } .rz-dot.offline { background: var(--bad); } .rz-dot.pending { background: var(--pending); }
.rz-legend { display: flex; flex-wrap: wrap; gap: 6px 16px; padding: 8px 14px; border-top: 1px solid var(--line); background: var(--panel); font-size: 11.5px; color: var(--muted); }
.rz-legend span { display: inline-flex; align-items: center; gap: 6px; }
.rz-legend i { display: inline-grid; place-items: center; font-style: normal; }

/* ── 3D views: how far to trust the model, and the camera's and drawing's controls ── */
/* Map › Building: Top beside Spin, bottom right. */
.bld3d-corner { position: absolute; right: 12px; bottom: 10px; z-index: 5; display: flex; gap: 6px; }
.bld3d-corner .bld3d-spin { position: static; }
/* The hovered floor lined up by a guess: the Tracker's "alignment approx." badge. */
.bld3d-tip-approx { margin-left: 8px; padding: 0 7px; border: 1px solid rgba(242, 201, 76, .5); border-radius: 999px;
  background: rgba(242, 201, 76, .1); color: var(--warn); font-size: 11px; line-height: 17px; font-weight: 600; vertical-align: 2px; }
/* The model's notes, bottom left (building3d modelStatus): a button saying what is guessed or missing, opening the list above it. */
.bld3d-notes { position: absolute; left: 12px; bottom: 10px; z-index: 5; display: flex; flex-direction: column; align-items: flex-start; gap: 6px;
  max-width: min(420px, calc(100% - 200px)); }
.bld3d-notes-btn { display: inline-flex; align-items: center; gap: 6px; max-width: 100%; padding: 6px 11px; border-radius: 8px; border: 1px solid rgba(242, 201, 76, .5);
  background: rgba(27, 35, 64, .92); color: #f7e1a0; font-size: 12px; box-shadow: 0 6px 18px rgba(0,0,0,.3); cursor: pointer;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bld3d-notes-btn i { flex: none; font-style: normal; font-size: 14px; line-height: 1; color: var(--warn); }
.bld3d-notes-btn svg { flex: none; }
.bld3d-notes-btn:hover, .bld3d-notes-btn[aria-expanded="true"] { background: #34406b; color: #fff; }
.bld3d-notes.tone-info .bld3d-notes-btn { border-color: #34406b; color: #c9d1ef; }
.bld3d-notes.tone-info .bld3d-notes-btn i { color: #9cc1ff; }
.bld3d-notes.tone-error .bld3d-notes-btn { border-color: rgba(255, 109, 90, .7); color: #ffb3a8; }
.bld3d-notes.tone-error .bld3d-notes-btn svg { color: var(--bad); }
.bld3d-notes-list { max-height: 300px; overflow-y: auto; padding: 9px 12px 10px; border-radius: 9px; border: 1px solid #3a4778;
  background: rgba(20, 27, 52, .97); box-shadow: 0 10px 28px rgba(0,0,0,.45); color: #c9d1ef; font-size: 12px; line-height: 1.4;
  animation: mv-fade .15s ease; }
.bld3d-notes-list > b { display: block; margin-bottom: 6px; font-size: 12px; color: var(--text); }
.bld3d-notes-list ul { margin: 0; padding: 0; list-style: none; }
.bld3d-notes-list > ul > li { position: relative; padding: 4px 0 4px 14px; }
.bld3d-notes-list > ul > li + li { border-top: 1px solid #2c3963; }
.bld3d-notes-list > ul > li::before { content: ''; position: absolute; left: 0; top: 10px; width: 7px; height: 7px; border-radius: 50%; background: var(--warn); }
.bld3d-notes-list > ul > li.tone-error::before { background: var(--bad); }
.bld3d-notes-list > ul > li.tone-info::before { background: #9cc1ff; }
.bld3d-notes-list li ul { margin-top: 3px; color: var(--muted); font-size: 11.5px; }
.bld3d-notes-list li ul li { padding: 1px 0; }
.bld3d-notes-floors { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 5px; }
.bld3d-notes-floors button { padding: 2px 8px; border-radius: 6px; border: 1px solid rgba(255, 109, 90, .6); background: rgba(255, 109, 90, .12);
  color: #ffd0c8; font-size: 11.5px; cursor: pointer; }
.bld3d-notes-floors button:hover { background: rgba(255, 109, 90, .28); color: #fff; }
/* Map › 3D floor: the drawing switch and Top, bottom left (clear of the coverage legend, bottom right). */
.mv3d-corner { position: absolute; left: 12px; right: 12px; bottom: 10px; z-index: 5; display: flex; flex-wrap: wrap-reverse; align-items: center; gap: 6px; pointer-events: none; }
.mv3d-corner > * { pointer-events: auto; }
/* The Building view keeps its note in the corner, so the bar sits over it. */
.mv3d-corner-up { bottom: 46px; }
.mv3d-seg, .mv3d-ctl { display: inline-flex; align-items: center; border-radius: 8px; border: 1px solid #34406b; background: rgba(27, 35, 64, .92);
  color: #c9d1ef; font-size: 12px; box-shadow: 0 6px 18px rgba(0,0,0,.3); }
.mv3d-seg { gap: 2px; padding: 2px; }
.mv3d-seg > span { padding: 0 6px 0 7px; color: #8f9ac4; font-size: 11px; }
.mv3d-seg button { padding: 4px 9px; border: 0; border-radius: 6px; background: transparent; color: #8f9ac4; font-size: 12px; cursor: pointer; white-space: nowrap; }
.mv3d-seg button:hover:not(.on) { background: #2a3560; color: #e3e8f8; }
.mv3d-seg button.on { background: #3b82f6; color: #fff; }
.mv3d-seg button:disabled { opacity: .4; cursor: default; }
/* On/off layers over the drawing: the line sets them apart from the one-at-a-time drawings. */
.mv3d-sep { flex: none; width: 1px; align-self: stretch; margin: 3px 4px; background: #4a5684; }
.mv3d-seg > .mv3d-sep:first-child { display: none; }
.mv3d-seg .mv3d-over { display: inline-flex; align-items: center; gap: 5px; }
.mv3d-seg > .mv3d-band { display: inline-flex; gap: 2px; padding: 0 0 0 2px; }
.mv3d-seg .mv3d-band button { padding: 4px 7px; font-size: 11px; font-variant-numeric: tabular-nums; }
.mv3d-ctl { gap: 6px; padding: 6px 11px; cursor: pointer; }
.mv3d-ctl:hover { background: #34406b; color: #fff; }
/* The floor view's hint under the Map's toolbar (Floor3D measures where that ends: it wraps on a narrow window). */
.mv3d .mv3d-hint { top: var(--mv3d-hint-top, 56px); }
/* ── Sign-in, org settings, the Younity console (TENANCY.md) ── */
.auth-text { color: var(--text); font-size: 13px; line-height: 1.5; margin: 0 0 12px; }
.auth-text.muted { color: var(--muted); }
.auth-form { display: flex; flex-direction: column; gap: 12px; }
.auth-form label { display: flex; flex-direction: column; gap: 5px; font-size: 12px; color: var(--muted); }
.auth-form input, .tn-invite input, .tn-invite select, .tn-inline input, .tn-table select, .shell-user select {
  background: var(--panel-2); border: 1px solid #34406b; border-radius: 6px; color: var(--text); font: inherit; font-size: 13px; padding: 7px 9px; outline: 0; }
.auth-form input:focus, .tn-invite input:focus, .tn-inline input:focus { border-color: var(--accent); }
.auth-form input[readonly] { color: var(--muted); }
.auth-hint { font-size: 11px; color: var(--muted); }
.auth-error { color: #ffd2cc; background: #3b1f1f; border: 1px solid var(--bad); border-radius: 6px; padding: 7px 10px; font-size: 12.5px; margin: 8px 0; }
.auth-error.small { padding: 1px 6px; font-size: 11px; display: inline-block; margin: 2px 0 0; }
.auth-ok { color: #cff3df; background: #173426; border: 1px solid var(--ok); border-radius: 6px; padding: 7px 10px; font-size: 12.5px; }
.auth-go, .tn-primary { display: inline-flex; align-items: center; justify-content: center; gap: 6px; background: #2d4d9a; border: 1px solid var(--accent); color: #fff; border-radius: 6px; padding: 8px 14px; font-size: 13px; }
.auth-go:disabled, .tn-primary:disabled { opacity: .6; cursor: progress; }
/* ── The sign-in page (signIn.tsx): Atlas Desktop's sign-in, value for value (apps/desktop/src/renderer/components/signIn.css,
   and the tokens it draws on from Desktop's styles.css, dark; named here under .signin alone, where --accent is Desktop's blue
   and not this page's). Motion is slow and small: the backdrop drifts over ~20 s, the icon breathes over 6 s, the pieces rise
   in turn, steps slide, digits land with a spring, a wrong code shakes once. ── */
.signin {
  --accent: #0a84ff; --red: #ff453a;
  --label: rgba(255, 255, 255, 0.92); --label-2: rgba(235, 235, 245, 0.62); --label-3: rgba(235, 235, 245, 0.34);
  --fill: rgba(255, 255, 255, 0.07); --fill-2: rgba(255, 255, 255, 0.14); --separator: rgba(255, 255, 255, 0.1);
  --window-solid: #1c1c1f; --glass: rgba(38, 38, 43, 0.5); --glass-rim: rgba(255, 255, 255, 0.13);
  --glass-shadow: 0 12px 40px rgba(0, 0, 0, 0.34), 0 1px 3px rgba(0, 0, 0, 0.26);
  --r-panel: 20px;
  --spring-smooth: cubic-bezier(0.2, 0.9, 0.3, 1); --spring-bouncy: cubic-bezier(0.2, 1.2, 0.3, 1);
  position: fixed; inset: 0; z-index: 1000; display: grid; place-items: center; overflow: auto;
  background: var(--window-solid); color: var(--label); color-scheme: dark;
  font: 13px/1.38 -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'Segoe UI Variable Text', 'Segoe UI', system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
  animation: signin-in 420ms var(--spring-smooth) both;
}
/* Desktop's springs (its motion.ts: smooth 0.46 s at 0.86 damping, bouncy 0.4 s at 0.7), where a browser has linear(). */
@supports (animation-timing-function: linear(0, 1)) {
  .signin {
    --spring-smooth: linear(0, 0.0154, 0.0553, 0.112, 0.1792, 0.2521, 0.3269, 0.4011, 0.4725, 0.5399, 0.6023, 0.6594, 0.7109, 0.7567, 0.7972, 0.8326, 0.8633, 0.8895, 0.9119, 0.9307, 0.9464, 0.9594, 0.9701, 0.9787, 0.9856, 0.991, 0.9953, 0.9985, 1.0008, 1.0025, 1.0037, 1.0044, 1.0049, 1.005, 1.005, 1.0048, 1.0045, 1.0042, 1.0039, 1.0035, 1.0031, 1.0027, 1.0024, 1.0021, 1.0018, 1.0015, 1.0013, 1.0011, 1.0009);
    --spring-bouncy: linear(0, 0.0211, 0.0759, 0.1535, 0.2447, 0.3425, 0.4411, 0.5364, 0.6254, 0.7062, 0.7777, 0.8395, 0.8916, 0.9344, 0.9687, 0.9953, 1.0151, 1.0292, 1.0384, 1.0437, 1.0458, 1.0456, 1.0436, 1.0403, 1.0363, 1.0319, 1.0274, 1.0229, 1.0187, 1.0148, 1.0114, 1.0084, 1.0058, 1.0037, 1.002, 1.0006, 0.9996, 0.9989, 0.9984, 0.9981, 0.9979, 0.9979, 0.998, 0.9981, 0.9983, 0.9985, 0.9987, 0.9989, 0.9991);
  }
}
.signin.leaving { animation: signin-out 380ms ease-in both; }
@keyframes signin-in { from { opacity: 0; } }
@keyframes signin-out { to { opacity: 0; transform: scale(1.015); } }
/* Desktop's buttons and paragraphs start bare; the ring is its focus ring. */
:where(.signin) button { border: 0; background: none; padding: 0; }
:where(.signin) button:disabled { cursor: default; }
.signin button:focus-visible { outline: 3px solid color-mix(in srgb, var(--accent) 70%, transparent); outline-offset: 2px; }
.signin-backdrop { position: fixed; inset: 0; overflow: hidden; pointer-events: none; }
.signin-backdrop .blob { position: absolute; width: 60vmax; height: 60vmax; border-radius: 50%; filter: blur(90px); opacity: 0.32; }
.signin-backdrop .a { left: -18vmax; top: -22vmax; background: radial-gradient(circle, var(--accent), transparent 65%); animation: signin-drift-a 22s ease-in-out infinite alternate; }
.signin-backdrop .b { right: -20vmax; bottom: -26vmax; background: radial-gradient(circle, #5e5ce6, transparent 65%); animation: signin-drift-b 26s ease-in-out infinite alternate; }
.signin-backdrop .c { left: 30%; top: 35%; width: 40vmax; height: 40vmax; opacity: 0.16; background: radial-gradient(circle, #64d2ff, transparent 65%); animation: signin-drift-c 30s ease-in-out infinite alternate; }
@keyframes signin-drift-a { to { transform: translate(8vmax, 6vmax) scale(1.08); } }
@keyframes signin-drift-b { to { transform: translate(-7vmax, -5vmax) scale(1.1); } }
@keyframes signin-drift-c { to { transform: translate(-10vmax, 4vmax); } }
.signin-column { position: relative; width: min(420px, calc(100vw - 48px)); padding: 56px 0 40px; display: flex; flex-direction: column; align-items: center; gap: 28px; }
/* The pieces arrive one after another. */
.signin .rise { animation: signin-rise 700ms var(--spring-smooth) both; }
@keyframes signin-rise { from { opacity: 0; transform: translateY(14px); } }
.signin-head { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 10px; }
.signin-icon { position: relative; width: 96px; height: 96px; margin-bottom: 10px; }
.signin-mark { position: relative; display: block; width: 100%; height: 100%; animation: signin-breathe 6s ease-in-out infinite; }
.signin-glow { position: absolute; inset: -18px; border-radius: 40px; background: radial-gradient(circle, var(--accent), transparent 68%); filter: blur(18px); opacity: 0.35; animation: signin-glow 6s ease-in-out infinite; }
@keyframes signin-breathe { 50% { transform: scale(1.025); } }
@keyframes signin-glow { 50% { opacity: 0.6; transform: scale(1.1); } }
.signin-title { margin: 0; font-size: 28px; font-weight: 700; letter-spacing: -0.01em; color: var(--label); animation: signin-fade 300ms ease both; }
.signin-sub { margin: 0; max-width: 360px; font-size: 14px; line-height: 1.45; color: var(--label-2); overflow-wrap: anywhere; animation: signin-fade 300ms ease both; }
@keyframes signin-fade { from { opacity: 0; } }
.signin-card { width: 100%; padding: 20px; border-radius: var(--r-panel); background: var(--glass); -webkit-backdrop-filter: blur(30px) saturate(1.6); backdrop-filter: blur(30px) saturate(1.6);
  box-shadow: inset 0 0 0 0.5px var(--glass-rim), var(--glass-shadow); overflow: hidden; }
.signin-step { animation: signin-step-in 450ms var(--spring-smooth) both; }
.signin-step.back { animation-name: signin-step-back; }
@keyframes signin-step-in { from { opacity: 0; transform: translateX(28px); } }
@keyframes signin-step-back { from { opacity: 0; transform: translateX(-28px); } }
.signin-form { display: flex; flex-direction: column; gap: 12px; margin: 0; }
.signin-field { display: flex; align-items: center; gap: 10px; height: 46px; padding: 0 14px; border-radius: 12px; background: var(--fill); box-shadow: inset 0 0 0 1.5px transparent;
  transition: box-shadow 200ms ease, background 200ms ease; }
.signin-field:focus-within { background: var(--fill-2); box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--accent) 75%, transparent); }
.signin-field input { flex: 1; min-width: 0; height: 100%; padding: 0; border: 0; outline: 0; background: none; color: var(--label); font: inherit; font-size: 15px; }
.signin-field input::placeholder { color: var(--label-3); }
.signin-field input[readonly] { color: var(--label-2); }
/* The field's own edge lights; no ring is drawn again inside it. */
.signin .signin-field input:focus, .signin .signin-field input:focus-visible { outline: none; box-shadow: none; }
/* A saved address filled in by the browser keeps the field's look. */
.signin-field input:-webkit-autofill { -webkit-text-fill-color: var(--label); caret-color: var(--label); transition: background-color 100000s ease-out !important; }
.signin-glyph { width: 18px; height: 18px; flex: none; fill: none; stroke: var(--label-2); stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; transition: stroke 200ms ease; }
.signin-field:focus-within .signin-glyph { stroke: var(--accent); }
.signin-primary { display: flex; align-items: center; justify-content: center; gap: 8px; height: 44px; border-radius: 22px; background: var(--accent); color: #fff; font-size: 15px; font-weight: 600;
  transition: opacity 200ms ease, transform 150ms ease, filter 150ms ease; }
.signin-primary:hover:not(:disabled) { filter: brightness(1.08); }
.signin-primary:active:not(:disabled) { transform: scale(0.98); }
.signin-primary:disabled { opacity: 0.4; }
/* Continue with no address yet: dimmed. */
.signin-primary.dim { opacity: 0.4; }
.signin-notice, .signin-error, .signin-note { margin: 0; font-size: 13px; line-height: 1.4; }
.signin-notice { color: var(--label-2); padding: 10px 12px; border-radius: 10px; background: var(--fill); }
.signin-error { color: #ff9f0a; font-weight: 600; }
.signin-note { color: var(--label-2); font-size: 12px; }
/* The code: one box a digit over a hidden field. */
.signin-boxes { position: relative; display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; cursor: text; }
.signin-hidden { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; padding: 0; opacity: 0; border: 0; outline: 0; font-size: 16px; caret-color: transparent; }
.signin-box { display: grid; place-items: center; height: 56px; border-radius: 12px; background: var(--fill); box-shadow: inset 0 0 0 1px var(--separator); font-size: 24px; font-weight: 600; font-variant-numeric: tabular-nums;
  transition: box-shadow 150ms ease, background 150ms ease; }
.signin-box.current { box-shadow: inset 0 0 0 2px var(--accent); }
.signin-boxes.wrong .signin-box { box-shadow: inset 0 0 0 2px var(--red); color: var(--red); }
.signin-box .digit { animation: signin-pop 320ms var(--spring-bouncy) both; }
@keyframes signin-pop { from { opacity: 0; transform: scale(0.4); } }
.signin-box .caret { width: 2px; height: 24px; border-radius: 1px; background: var(--accent); animation: signin-blink 1.1s ease-in-out infinite; }
@keyframes signin-blink { 50% { opacity: 0.15; } }
.signin .shake { animation: signin-shake 400ms linear; }
@keyframes signin-shake { 12.5%, 62.5% { transform: translateX(-7px); } 37.5%, 87.5% { transform: translateX(7px); } }
.signin-hint { display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 20px; margin: 2px 0 0; color: var(--label-2); font-size: 13px; font-weight: 500; text-align: center; }
.signin-hint.bad { color: var(--red); }
.signin-links { display: flex; justify-content: space-between; gap: 12px; font-size: 13px; font-weight: 600; }
.signin-links button { color: var(--accent); }
.signin-links button:disabled { color: var(--label-3); font-variant-numeric: tabular-nums; }
.signin-spinner { width: 16px; height: 16px; flex: none; border-radius: 50%; border: 2px solid rgba(255, 255, 255, 0.35); border-top-color: #fff; animation: signin-spin 800ms linear infinite; }
.signin-spinner.small { width: 12px; height: 12px; border-color: var(--fill-2); border-top-color: var(--label-2); }
.signin-spinner.large { width: 28px; height: 28px; border-width: 3px; border-color: var(--fill-2); border-top-color: var(--label); }
@keyframes signin-spin { to { transform: rotate(360deg); } }
.signin-done { display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 12px 0 6px; color: var(--label-2); font-size: 13px; }
.signin-done p { margin: 0; overflow-wrap: anywhere; text-align: center; }
.signin-check { width: 72px; height: 72px; fill: none; stroke: #30d158; stroke-width: 4; stroke-linecap: round; stroke-linejoin: round; }
.signin-check circle { stroke-dasharray: 208; stroke-dashoffset: 208; transform: rotate(-90deg); transform-origin: center; animation: signin-draw 550ms ease-out forwards; }
.signin-check path { stroke-dasharray: 40; stroke-dashoffset: 40; animation: signin-draw 350ms 380ms ease-out forwards; }
@keyframes signin-draw { to { stroke-dashoffset: 0; } }
/* A phone's browser zooms into a field whose text is under 16px. */
@media (pointer: coarse) { .signin-field input { font-size: 16px; } }
@media (prefers-reduced-motion: reduce) {
  .signin *, .signin { animation-duration: 1ms !important; animation-iteration-count: 1 !important; transition-duration: 1ms !important; }
  .signin-check circle, .signin-check path { stroke-dashoffset: 0; }
}
.desktop-link-actions { display: flex; gap: 10px; align-items: center; margin-top: 12px; }
/* Devices, second factors and residents (devicePages.tsx; CLIENT-SYNC.md). */
.desktop-link-actions input { background: var(--panel-2); border: 1px solid #34406b; border-radius: 6px; color: var(--text); font: 13px ui-monospace, monospace; letter-spacing: .08em; padding: 7px 9px; outline: 0; width: 150px; text-transform: uppercase; }
.tn-quiet { background: var(--panel-2); border: 1px solid #34406b; border-radius: 6px; color: var(--text); padding: 7px 12px; font-size: 12.5px; }
.tn-quiet:hover:not(:disabled) { border-color: #6b78ad; }
.tn-quiet:disabled { opacity: .55; }
.dv-account { max-width: 760px; }
.dv-account .tn-card + .tn-card { margin-top: 12px; }
.dv-here { margin-left: 8px; color: #cff3df; border-color: var(--ok); }
.dv-code { font: 600 26px ui-monospace, monospace; letter-spacing: .14em; text-align: center; color: #fff; background: var(--panel-2); border: 1px solid #34406b; border-radius: 8px; padding: 14px 8px; user-select: all; }
.dv-secret { font: 13px ui-monospace, monospace !important; letter-spacing: .06em; }
.dv-recovery { margin-top: 12px; }
.dv-recovery pre { margin: 8px 0; font: 13px ui-monospace, monospace; columns: 2; color: #fff; }
.phone-link-unit { display: grid; gap: 6px; margin-top: 12px; }
.phone-link-unit > span { font-weight: 600; }
.phone-link-unit small { opacity: 0.75; }

.shell-user { flex: none; margin-left: auto; display: flex; align-items: center; gap: 10px; font-size: 13px; }
/* The org worked in: a master admin's selector, anyone else's name of theirs. */
.org-pill, .shell-org { display: inline-flex; align-items: center; gap: 7px; height: 32px; padding: 0 10px; border: 1px solid rgba(255, 255, 255, .1); border-radius: 9px; background: rgba(255, 255, 255, .06); color: #a3acd0; }
.org-pill { position: relative; padding-right: 8px; cursor: pointer; transition: border-color .12s, background .12s; }
.org-pill:hover, .org-pill:focus-within { border-color: rgba(255, 255, 255, .24); background: rgba(255, 255, 255, .09); }
.org-pill:focus-within { border-color: #5b8cff; box-shadow: 0 0 0 3px rgba(91, 140, 255, .25); }
.org-pill select { -webkit-appearance: none; appearance: none; max-width: 220px; background: transparent; border: 0; outline: 0; color: #f5f7fd; font: inherit; font-weight: 500; padding: 0; cursor: pointer; text-overflow: ellipsis; }
.org-pill select option { background: #1b2340; }
.org-pill svg, .shell-org svg { flex: none; }
.shell-org { color: #dfe4f5; font-weight: 500; }
.shell-org svg { color: #a3acd0; }
.shell-nav { display: flex; align-items: center; gap: 2px; }
.shell-nav a { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 10px; border-radius: 9px; color: #c3cae6; font-weight: 500; text-decoration: none; cursor: pointer; transition: background .12s, color .12s; }
.shell-nav a:hover { color: #fff; background: rgba(255, 255, 255, .07); }
.shell-nav a.on { color: #fff; background: rgba(91, 140, 255, .22); }
/* The account: the person's initials, and a menu on glass under them. */
.acct { position: relative; }
.acct-btn { display: inline-flex; align-items: center; gap: 3px; padding: 2px 6px 2px 2px; border: 0; border-radius: 999px; background: transparent; color: #a3acd0; transition: background .12s; }
.acct-btn:hover, .acct-btn.on { background: rgba(255, 255, 255, .09); color: #fff; }
.acct-face { flex: none; display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: linear-gradient(180deg, #8fa0d8, #5a69a6); color: #fff; font-size: 11.5px; font-weight: 650; letter-spacing: .02em; box-shadow: inset 0 0 0 .5px rgba(255, 255, 255, .3); }
.acct-face.big { width: 38px; height: 38px; font-size: 14px; }
.acct-menu { position: absolute; z-index: 300; right: 0; top: calc(100% + 9px); min-width: 250px; padding: 6px; border: 1px solid rgba(255, 255, 255, .14); border-radius: 14px; background: rgba(30, 38, 74, .82);
  -webkit-backdrop-filter: blur(26px) saturate(170%); backdrop-filter: blur(26px) saturate(170%); box-shadow: 0 20px 50px rgba(0, 0, 0, .5), 0 2px 6px rgba(0, 0, 0, .3); transform-origin: top right; animation: acct-in .14s cubic-bezier(.2, .7, .2, 1); }
@keyframes acct-in { from { opacity: 0; transform: scale(.96) translateY(-4px); } }
/* Requests to Younity from Atlas Desktop, on the header's bell (requestsBell.tsx): its count of open
   ones as a red circle on its corner, the list in a menu like the account's. */
.reqs { position: relative; }
.reqs-btn { position: relative; display: grid; place-items: center; width: 32px; height: 32px; border: 0; border-radius: 9px; background: transparent; color: #a3acd0; cursor: pointer; transition: background .12s, color .12s; }
.reqs-btn:hover, .reqs-btn.on { background: rgba(255, 255, 255, .09); color: #fff; }
.reqs-btn.ring svg { animation: reqs-ring .8s ease-in-out 2; transform-origin: 50% 10%; }
@keyframes reqs-ring { 0%, 100% { transform: rotate(0); } 20% { transform: rotate(14deg); } 40% { transform: rotate(-12deg); } 60% { transform: rotate(8deg); } 80% { transform: rotate(-5deg); } }
.reqs-n { position: absolute; top: 2px; right: 1px; min-width: 16px; height: 16px; padding: 0 4px; border-radius: 8px; background: #ff453a; color: #fff; font-size: 10.5px; font-weight: 700; line-height: 16px; text-align: center; font-variant-numeric: tabular-nums; box-shadow: 0 0 0 2px #161d3a; }
.reqs-menu { position: absolute; z-index: 300; right: 0; top: calc(100% + 9px); width: min(380px, calc(100vw - 32px)); max-height: min(560px, calc(100vh - 90px)); overflow-y: auto; padding: 6px; border: 1px solid rgba(255, 255, 255, .14); border-radius: 14px; background: rgba(30, 38, 74, .82);
  -webkit-backdrop-filter: blur(26px) saturate(170%); backdrop-filter: blur(26px) saturate(170%); box-shadow: 0 20px 50px rgba(0, 0, 0, .5), 0 2px 6px rgba(0, 0, 0, .3); transform-origin: top right; animation: acct-in .14s cubic-bezier(.2, .7, .2, 1); }
.reqs-title { display: flex; flex-direction: column; gap: 2px; padding: 8px 10px 10px; margin-bottom: 4px; border-bottom: 1px solid rgba(255, 255, 255, .1); }
.reqs-title b { font-size: 13.5px; font-weight: 600; color: #f5f7fd; }
.reqs-title span, .reqs-none { font-size: 12px; color: #a3acd0; }
.reqs-none { margin: 0; padding: 10px; }
.reqs-error { margin: 4px 10px; font-size: 12px; color: #ff8a80; }
.reqs-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.req { display: flex; flex-direction: column; gap: 4px; padding: 9px 10px; border-radius: 9px; }
.req:hover { background: rgba(255, 255, 255, .05); }
.req.done { opacity: .62; }
.req-head { display: flex; align-items: baseline; gap: 8px; }
.req-head b { flex: 1; min-width: 0; font-size: 13px; font-weight: 600; color: #f5f7fd; }
.req-head span { flex: none; font-size: 11.5px; color: #a3acd0; }
.req-q { font-size: 12.5px; color: #e6eaf8; overflow-wrap: anywhere; }
.req-foot { display: flex; align-items: center; gap: 8px; font-size: 11.5px; color: #a3acd0; }
.req-foot span { flex: 1; min-width: 0; }
.req-foot button, .reqs-more { display: inline-flex; align-items: center; gap: 5px; height: 24px; padding: 0 9px; border: 0; border-radius: 7px; background: rgba(255, 255, 255, .09); color: #e6eaf8; font: inherit; font-size: 12px; cursor: pointer; }
.req-foot button:hover, .reqs-more:hover { background: rgba(255, 255, 255, .16); color: #fff; }
.reqs-more { margin: 6px 10px 4px; }
.acct-who { display: flex; align-items: center; gap: 11px; padding: 9px 10px 12px; margin-bottom: 6px; border-bottom: 1px solid rgba(255, 255, 255, .1); }
.acct-who div { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.acct-who b { font-size: 13.5px; font-weight: 600; color: #f5f7fd; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.acct-who span:not(.acct-face) { font-size: 12px; color: #a3acd0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.acct-menu > a, .acct-menu > button { display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px 10px; border: 0; border-radius: 8px; background: transparent; color: #e6eaf8; font: inherit; font-size: 13px; text-align: left; text-decoration: none; cursor: pointer; }
.acct-menu > a:hover, .acct-menu > button:hover { background: rgba(255, 255, 255, .1); color: #fff; }
.acct-menu svg { color: #a3acd0; }
@media (prefers-reduced-motion: reduce) { .acct-menu { animation: none; } }
@media (max-width: 760px) { .shell-nav a { padding: 0 8px; font-size: 0; gap: 0; } .org-pill select { max-width: 130px; } }

.tn-narrow { max-width: 560px; }
.tn-h2 { margin: 26px 0 10px; font-size: 14px; font-weight: 500; color: var(--text); }
.tn-h2 span { color: var(--muted); font-size: 12.5px; margin-left: 6px; }
.tn-card { background: #212b4d; border: 1px solid var(--line); border-radius: 8px; padding: 14px; }
.tn-kv { display: flex; gap: 12px; font-size: 13px; padding: 3px 0; }
.tn-kv span { color: var(--muted); width: 70px; }
.tn-table { padding: 0; overflow-x: auto; }
.tn-table table, .tn-grid { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.tn-table th, .tn-grid th { text-align: left; font-weight: 500; color: var(--muted); padding: 9px 12px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.tn-table td, .tn-grid td { padding: 9px 12px; border-bottom: 1px solid #27325a; vertical-align: top; color: var(--text); }
.tn-table tr:last-child td { border-bottom: 0; }
.tn-table tr.on td { background: var(--panel-2); }
.tn-table a { color: var(--accent); text-decoration: none; }
.tn-grants-row > td { background: #1b2340; padding: 6px 12px 12px; }
.tn-grid th:not(:first-child), .tn-grid td:not(:first-child) { text-align: center; }
.tn-grid input[type='checkbox'] { width: 15px; height: 15px; accent-color: #3b82f6; }
.tn-muted { color: var(--muted); font-size: 12px; }
.tn-wrap { max-width: 420px; }
.tn-actions { white-space: nowrap; text-align: right; }
.tn-actions button { display: inline-flex; align-items: center; gap: 5px; background: var(--panel-2); border: 1px solid #34406b; border-radius: 6px; padding: 4px 9px; margin-left: 6px; font-size: 12px; color: var(--text); }
.tn-actions button:hover { border-color: #6b78ad; }
.tn-you, .tn-off { margin-left: 8px; font-size: 10.5px; border-radius: 9px; padding: 1px 7px; border: 1px solid #34406b; color: #8fb3ff; }
.tn-off { color: #ffb4aa; border-color: #6b3a3a; }
.tn-note { color: var(--muted); font-size: 12px; margin: 4px 0 10px; }
.tn-link { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; background: #173426; border: 1px solid var(--ok); border-radius: 8px; padding: 10px 12px; margin: 10px 0; color: #cff3df; }
.tn-link input { flex: 1; min-width: 240px; background: #0f2219; border: 1px solid #2c5a42; border-radius: 6px; color: #fff; font: 12px ui-monospace, monospace; padding: 6px 8px; }
.tn-link button { background: transparent; border: 1px solid #2c5a42; border-radius: 6px; color: #cff3df; padding: 4px 7px; display: grid; place-items: center; }
.tn-link .tn-note { flex-basis: 100%; margin: 0; color: #9fd9bb; }
.tn-invite { display: flex; flex-direction: column; gap: 12px; margin: 10px 0 0; }
.tn-invite-top { display: flex; flex-wrap: wrap; gap: 12px; }
.tn-invite-top label { display: flex; flex-direction: column; gap: 5px; font-size: 12px; color: var(--muted); flex: 1; min-width: 220px; }
.tn-invite-go { display: flex; gap: 8px; }
.tn-invite-go button[type='button'] { background: var(--panel-2); border: 1px solid #34406b; border-radius: 6px; padding: 8px 14px; color: var(--text); }
.tn-inline { display: flex; gap: 8px; margin-bottom: 10px; flex-wrap: wrap; }
.tn-inline input { flex: 1; min-width: 220px; max-width: 420px; }
.tn-bld { border: 1px solid #27325a; border-radius: 8px; padding: 8px 10px; margin: 6px 0; background: #1b2340; }
.tn-bld.on { border-color: #34406b; background: #1e2748; }
.tn-bld-head { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 18px; }
.tn-check { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--text); cursor: pointer; }
.tn-check input { width: 14px; height: 14px; accent-color: #3b82f6; margin: 0; }
.tn-check input:disabled + * , .tn-check:has(input:disabled) { opacity: .55; cursor: default; }
.tn-scope { display: flex; gap: 12px; padding: 8px 0 2px 22px; border-top: 1px dashed #27325a; margin-top: 8px; }
.tn-scope-name { width: 110px; flex: none; font-size: 12px; color: var(--muted); padding-top: 3px; }
.tn-scope-lines { flex: 1; display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.tn-line { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; }
.tn-target { min-width: 160px; font-size: 12.5px; color: #dbe2fa; }
.tn-later { font-style: normal; font-size: 9.5px; color: #b39ddb; border: 1px solid #4a3f78; border-radius: 8px; padding: 0 5px; margin-left: 2px; }
.tn-x { background: transparent; border: 0; color: var(--muted); padding: 2px; display: grid; place-items: center; }
.tn-x:hover { color: var(--bad); }
.tn-line.add select { background: var(--panel-2); border: 1px solid #34406b; border-radius: 6px; color: var(--text); font: inherit; font-size: 12px; padding: 4px 6px; max-width: 320px; }
.tn-line.add button { display: inline-flex; align-items: center; gap: 4px; background: var(--panel-2); border: 1px solid #34406b; border-radius: 6px; padding: 4px 9px; font-size: 12px; color: var(--text); }
.tn-line.add button:disabled { opacity: .5; }
.tn-chip { background: var(--panel-2); border: 1px solid #34406b; border-radius: 12px; padding: 2px 10px; font-size: 12px; color: var(--text); margin: 0 6px 4px 0; }
.tn-chip span { color: var(--muted); margin-left: 4px; }
.tn-wholes { display: flex; flex-direction: column; gap: 6px; padding: 4px 2px 6px; }
.tn-wholes .tn-check { flex-wrap: wrap; }
.tn-wholes .tn-check b { font-weight: 600; }
.tn-devices { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 6px 14px; max-height: 280px; overflow: auto; padding: 4px 2px; }
/* Edit name in the side panel (details.tsx CustomerDetails). */
.dhead .name.rename { gap: 4px; }
.dhead .name.rename input { flex: 1; min-width: 0; background: var(--panel-2); border: 1px solid var(--accent); border-radius: 5px; color: var(--text); font: inherit; font-size: 13px; padding: 3px 6px; outline: 0; }
.dhead .name.rename button { flex: none; background: transparent; border: 1px solid #34406b; border-radius: 5px; color: var(--text); padding: 3px 4px; display: grid; place-items: center; }
.cloud-details .small { font-size: 11.5px; }
.cd-photo { display: block; color: inherit; text-decoration: none; margin-bottom: 6px; }
.cd-photo img { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 6px; background: var(--panel-2); }
.cd-photo span { display: block; font-size: 11.5px; color: var(--muted); margin-top: 4px; }
.cd-event.with-photo { display: grid; grid-template-columns: 1fr 52px; column-gap: 8px; }
.cd-event.with-photo > div { grid-column: 1; }
.cd-thumb { grid-column: 2; grid-row: 1 / span 3; align-self: start; }
.cd-thumb img { display: block; width: 52px; height: 39px; object-fit: cover; border-radius: 4px; background: var(--panel-2); }
.cd-confirm { display: grid; gap: 6px; margin: 6px 0; padding: 8px; border: 1px solid #f59e0b; border-radius: 6px; background: rgba(245, 158, 11, 0.08); font-size: 12px; }
.cd-confirm label { display: grid; gap: 6px; }
.cd-confirm input { background: var(--panel-2); border: 1px solid var(--line); border-radius: 5px; color: var(--text); font: inherit; padding: 4px 6px; }
/* A door state that is not live (a snapshot) or too old to trust: faded and dashed. */
.mv-door-g.stale polyline:not(.mv-door-mask polyline) { stroke-dasharray: 5 4; filter: none; animation: none; opacity: 0.7; }
.mv-door-g.stale .mv-reader { opacity: 0.55; filter: none; }
.cd-state.stale { opacity: 0.6; box-shadow: none; background-image: repeating-linear-gradient(45deg, rgba(255, 255, 255, 0.12) 0 6px, transparent 6px 12px); }

/* Model provenance uses the Map's existing disclosure and data-table vocabulary. */
.model-health-panel { position: relative; font-size: 12px; color: #e3e8f8; }
.model-health-panel > summary, .portfolio-model-health > summary { cursor: pointer; display: flex; align-items: center; gap: 7px; }
.model-health-panel > summary { min-height: 28px; padding: 4px 9px; border-radius: 6px; }
.model-health-panel > summary:hover { background: #2a3560; }
.model-health-panel > summary:focus-visible, .portfolio-model-health > summary:focus-visible { outline: 2px solid #72a8ff; outline-offset: 3px; }
.model-health-content { position: fixed; top: 190px; right: max(18px, 3vw); z-index: 100; width: min(460px, calc(100vw - 32px)); max-height: calc(100dvh - 215px); overflow: auto; padding: 18px; border: 1px solid #485782; border-radius: 10px; background: #1b2340; color: #e3e8f8; }
.model-health-actions { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 16px; }
.model-health-actions button, .portfolio-model-tools button { display: inline-flex; align-items: center; gap: 6px; padding: 7px 10px; color: #e3e8f8; background: #2a3560; border: 1px solid #485782; border-radius: 6px; cursor: pointer; }
.model-health-actions button:disabled, .portfolio-model-tools button:disabled { opacity: .6; cursor: wait; }
.model-details-heading { display: flex; align-items: center; gap: 8px; font-size: 14px; }
.model-reasons { padding-left: 19px; margin: 14px 0 20px; }
.model-reasons li { margin: 0 0 12px; line-height: 1.45; }
.model-reasons span, .model-details dd span { display: block; margin-top: 3px; color: #c9d1ef; }
.model-details dl { display: grid; grid-template-columns: minmax(100px, 1fr) minmax(0, 2fr); gap: 9px 14px; margin: 14px 0; line-height: 1.4; }
.model-details dt { color: #b7c2e7; }
.model-details dd { margin: 0; overflow-wrap: anywhere; font-variant-numeric: tabular-nums; }
.model-check-details { border-top: 1px solid #34406b; padding-top: 12px; margin-top: 14px; }
.model-check-details > summary { cursor: pointer; padding: 4px 0; }
.model-check-details ul { padding-left: 19px; line-height: 1.5; }
.portfolio-model-health { margin: 20px 0 28px; padding: 16px 0; border-top: 1px solid #34406b; border-bottom: 1px solid #34406b; color: #e3e8f8; }
.portfolio-model-health > summary { font-size: 15px; font-weight: 600; flex-wrap: wrap; }
.portfolio-model-health > summary span { font-size: 12px; color: #b7c2e7; font-weight: 400; }
.portfolio-model-tools { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin: 18px 0; font-size: 13px; }
.portfolio-model-tools label { display: flex; align-items: center; gap: 8px; }
.portfolio-model-tools input { accent-color: #3b82f6; }
.model-health-table { overflow: auto; }
.model-health-table table { border-collapse: collapse; width: 100%; font-size: 12px; line-height: 1.45; text-align: left; }
.model-health-table th { color: #b7c2e7; font-weight: 600; }
.model-health-table th, .model-health-table td { padding: 12px 10px; border-bottom: 1px solid #34406b; vertical-align: top; }
.model-health-table td:last-child { min-width: 220px; max-width: 65ch; }
.model-health-table a { color: #82b1ff; text-decoration: underline; text-underline-offset: 3px; }
.model-health-table small { display: block; margin-top: 4px; color: #b7c2e7; white-space: nowrap; }
.model-status { display: inline-flex; align-items: center; gap: 6px; min-width: 120px; }
.model-status.validation, .model-status.changed, .model-status.invalid, .model-status.missing { color: #ffbfba; }
.model-status.current { color: #94e2bd; }
@media (max-width: 680px) {
  .model-health-content { top: 120px; right: 12px; max-height: calc(100dvh - 140px); width: calc(100vw - 24px); }
  .model-health-table th, .model-health-table td { padding: 9px 7px; }
}

/* ── The Site Footage tab (siteFootage.tsx): locations of interest pinned on the plans ── */
.sf.mv { grid-template-columns: 136px minmax(0, 1fr) 300px; }
.sf-side { display: flex; flex-direction: column; min-width: 0; min-height: 0; background: #212b4d; border: 1px solid #2c3963; border-radius: 10px; padding: 10px 8px; gap: 8px; }
.mv-tools .sf-seg { padding-right: 0; margin-right: 0; border-right: 0; }
.sf-side header { display: flex; flex-direction: column; gap: 3px; padding: 2px 6px; }
.sf-title { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 0 8px; }
.sf-progress { height: 4px; margin: 3px 0 2px; border-radius: 2px; overflow: hidden; background: #34406b; }
.sf-progress i { display: block; height: 100%; border-radius: 2px; background: #22c55e; transition: width .2s ease; }
.sf-side header b { font-size: 14px; }
.sf-side header span { color: var(--muted); font-size: 11.5px; }
.sf-save.failed { flex-basis: 100%; color: #ff9b8f; }
.sf-save button, .sf-retry { border: 0; background: none; color: var(--accent); padding: 0; font: inherit; text-decoration: underline; cursor: pointer; }
.sf-side h4 { margin: 4px 6px 0; font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.sf-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; padding: 0 4px; }
.sf-actions button, .sf-card footer button { display: inline-flex; align-items: center; justify-content: center; gap: 5px; padding: 6px 10px; border-radius: 7px; border: 1px solid #4a5684; background: none; color: var(--text); font-size: 12px; cursor: pointer; }
.sf-actions button { min-width: 0; white-space: nowrap; }
.sf-actions .sf-go { grid-column: 1 / -1; }
.sf-actions .sf-go span { min-width: 18px; padding: 0 5px; border-radius: 9px; background: rgba(255, 255, 255, .18); font-size: 10.5px; line-height: 16px; }
.sf-side [hidden] { display: none; }
.sf-actions button:hover:not(:disabled), .sf-card footer button:hover:not(:disabled) { border-color: var(--accent); }
.sf-actions button.on { border-color: var(--accent); color: var(--accent); }
.sf-side .sf-go, .sf-card .sf-go { background: #2d4d9a; border-color: var(--accent); color: #fff; }
.sf-actions button:disabled, .sf-card footer button:disabled { opacity: .45; cursor: default; }
.sf-note { margin: 0; padding: 0 6px; color: var(--muted); font-size: 11.5px; line-height: 1.4; }
.sf-suggest { flex: 1; min-height: 80px; overflow-y: auto; display: flex; flex-direction: column; gap: 2px; padding: 0 2px; }
.sf-sg { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 5px 4px; border-radius: 7px; }
.sf-sg.all { border-bottom: 1px solid #34406b; border-radius: 0; margin-bottom: 2px; padding-bottom: 8px; }
.sf-sg span { display: flex; flex-direction: column; min-width: 0; }
.sf-sg b { font-size: 12.5px; font-weight: 600; }
.sf-sg small { color: var(--muted); font-size: 11px; }
.sf-sg > button { flex: 1; min-width: 0; display: flex; align-items: center; gap: 5px; padding: 0; border: 0; background: none; color: var(--text); text-align: left; cursor: pointer; }
.sf-sg > button:disabled { cursor: default; opacity: .6; }
.sf-sg > button svg { flex: none; color: var(--muted); transition: transform .15s ease; }
.sf-sg > button svg.open { transform: rotate(90deg); }
.sf-sg-row { display: flex; align-items: center; gap: 7px; padding: 3px 4px 3px 22px; }
.sf-sg-row input { flex: none; margin: 0; accent-color: #3b82f6; }
.sf-sg-row button { flex: 1; min-width: 0; display: flex; align-items: baseline; justify-content: space-between; gap: 8px; padding: 0; border: 0; background: none; color: var(--text); font-size: 12px; text-align: left; cursor: pointer; }
.sf-sg-row button:hover b { color: var(--accent); }
.sf-sg-row b { font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sf-sg-row small { flex: none; color: var(--muted); font-size: 11px; }
.sf-switch { position: relative; flex: none; display: inline-block; width: 32px; height: 18px; cursor: pointer; }
.sf-switch input { position: absolute; inset: 0; margin: 0; opacity: 0; cursor: inherit; }
.sf-switch i { position: absolute; inset: 0; border-radius: 9px; background: #4a5684; transition: background .15s ease; pointer-events: none; }
.sf-switch i::after { content: ''; position: absolute; left: 2px; top: 2px; width: 14px; height: 14px; border-radius: 50%; background: #fff; transition: transform .15s ease; }
.sf-switch input:checked + i { background: #3b82f6; }
.sf-switch input:checked + i::after { transform: translateX(14px); }
.sf-switch.mixed i { background: #2f5aa8; }
.sf-switch.mixed i::after { transform: translateX(7px); }
.sf-switch input:disabled + i { opacity: .45; }
.sf-switch input:focus-visible + i { outline: 2px solid var(--accent); outline-offset: 1px; }
.sf-ghost { position: absolute; display: grid; place-items: center; width: 24px; height: 24px; margin: -12px 0 0 -12px; padding: 0; border-radius: 50%; border: 2px dashed #2f7bf6; background: rgba(255, 255, 255, .85); color: #2f7bf6; cursor: pointer; transform: scale(var(--inv, 1)); }
.sf-ghost:hover { background: #dbe8ff; }
.sf-list { flex: 1; min-height: 80px; overflow-y: auto; display: flex; flex-direction: column; gap: 2px; scrollbar-width: thin; scrollbar-color: #4a5684 transparent; }
.sf-list section { display: flex; flex-direction: column; gap: 2px; }
.sf-list h5 { position: sticky; top: 0; z-index: 1; margin: 0; padding: 7px 6px 3px; background: #212b4d; color: var(--muted); font-size: 11px; font-weight: 600; }
.sf-list section:first-of-type h5 { padding-top: 0; }
.sf-list h5.on { color: #fff; }
.sf-row { display: flex; align-items: center; gap: 2px; min-height: 44px; border: 1px solid transparent; border-radius: 8px; padding-right: 3px; }
.sf-row { scroll-margin-top: 26px; }
.sf-row:hover { background: var(--panel-2); }
.sf-row.on { background: var(--panel-2); border-color: var(--accent); }
.sf-row > button:not(.sf-pick) { flex: none; display: grid; place-items: center; width: 22px; height: 22px; border: 0; border-radius: 5px; background: none; color: var(--muted); cursor: pointer; }
.sf-row > button:not(.sf-pick):hover:not(:disabled) { color: var(--text); background: #34406b; }
.sf-row > button:disabled { opacity: .3; cursor: default; }
.sf-pick { flex: 1; min-width: 0; display: flex; align-items: center; gap: 8px; padding: 5px 6px; border: 0; background: none; color: var(--text); text-align: left; cursor: pointer; }
.sf-pick i { flex: none; display: grid; place-items: center; min-width: 22px; height: 22px; padding: 0 3px; border-radius: 11px; font-style: normal; font-size: 11px; font-weight: 700; color: #fff; background: #5b6478; }
.sf-pick span { display: flex; flex-direction: column; min-width: 0; }
.sf-pick b { font-size: 12.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sf-pick small { color: var(--muted); font-size: 11px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sf-edit { display: flex; flex-direction: column; gap: 7px; padding: 8px 6px 2px; border-top: 1px solid var(--line); }
.sf-edit label { display: flex; flex-direction: column; gap: 3px; color: var(--muted); font-size: 11px; }
.sf-face { display: flex; align-items: center; justify-content: space-between; color: var(--muted); font-size: 11px; }
.sf-compass { display: grid; grid-template-columns: repeat(3, 28px); grid-auto-rows: 28px; gap: 3px; }
.sf-compass button { display: grid; place-items: center; padding: 0; border-radius: 6px; border: 1px solid #34406b; background: #2a3560; color: #c9d1ef; cursor: pointer; }
.sf-compass button:hover { background: #34406b; }
.sf-compass button.on { background: #3b82f6; border-color: #3b82f6; color: #fff; }
.mv3d-pin .sf-pin3d { position: absolute; left: -13px; top: -13px; width: 26px; height: 26px; padding: 0; border-radius: 50%; border: 2px solid #fff; background: #5b6478; color: #fff; font-size: 11px; font-weight: 700; pointer-events: auto; cursor: pointer; box-shadow: 0 1px 4px rgba(0, 0, 0, .45); }
.mv3d-pin .sf-pin3d { cursor: grab; touch-action: none; }
.mv3d-pin .sf-pin3d:active { cursor: grabbing; }
.mv3d-pin .sf-pin3d.on { background: #2f7bf6; }
.mv3d-pin .sf-pin3d.sample { display: grid; place-items: center; background: #16a34a; cursor: pointer; }
.mv3d-pin .sf-pin3d.done { background: #16a34a; }
.sf-pin.done .sf-dot { background: #16a34a; }
.sf-pick i.done { background: #16a34a; }
/* A floor's row fills green as its locations are captured. */
.sf .mv-floor-list button.sf-shot { background-image: linear-gradient(90deg, rgba(34, 197, 94, .38) var(--done, 0%), transparent var(--done, 0%)); }
.sf .mv-floor-list button.sf-shot span { color: #86efac; font-weight: 600; }
.sf .mv-floor-list button.sf-shot.all { background: #166534; color: #fff; }
.sf .mv-floor-list button.sf-shot.all span { color: #dcfce7; }
.sf-filter { display: flex; gap: 2px; padding: 3px; margin: 0 4px; border-radius: 8px; background: #1b2340; border: 1px solid #34406b; }
.sf-filter button { flex: 1 1 auto; padding: 4px 5px; border: 0; border-radius: 6px; background: none; color: #8f9ac4; font-size: 11.5px; white-space: nowrap; cursor: pointer; }
.sf-filter button span { opacity: .8; font-size: 10.5px; }
.sf-filter button:hover:not(.on) { background: #2a3560; color: #e3e8f8; }
.sf-filter button.on { background: #3b82f6; color: #fff; }
.sf-open { align-self: flex-start; display: inline-flex; align-items: center; gap: 6px; padding: 5px 9px; border-radius: 7px; border: 1px solid #16a34a; background: rgba(22, 163, 74, .18); color: #bbf7d0; font-size: 12px; cursor: pointer; }
.sf-sample { position: absolute; display: grid; place-items: center; width: 28px; height: 28px; margin: -14px 0 0 -14px; padding: 0; border-radius: 50%; border: 2px solid #fff; background: #16a34a; color: #fff; cursor: pointer; transform: scale(var(--inv, 1)); box-shadow: 0 1px 4px rgba(0, 0, 0, .45); z-index: 1; }
.sf-sample:hover { background: #15803d; }
/* A photo's look on hover (usePhotoPeek), as the Twin's 360 dots give: placed by its pin, kept in the plan's area. */
.sf-peek { position: fixed; left: 0; top: 0; z-index: 1000; visibility: hidden; width: 340px; padding: 5px; border-radius: 8px; background: #1b2340; color: #fff; font-size: 12px; line-height: 1.35; box-shadow: 0 6px 18px rgba(0, 0, 0, .4); pointer-events: none; }
.sf-peek img { display: block; width: 100%; height: 170px; margin-bottom: 4px; border-radius: 5px; object-fit: cover; background: #0b0f1e; }
.sf-peek b, .sf-peek small { display: block; padding: 0 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sf-peek b { font-weight: 600; }
.sf-peek small { padding-bottom: 2px; color: rgba(255, 255, 255, .7); font-size: 11px; }
.sf-samples { flex: 1; min-height: 80px; overflow-y: auto; display: flex; flex-direction: column; gap: 1px; }
.sf-samples > button { display: flex; align-items: center; gap: 8px; padding: 4px 6px; border: 0; border-radius: 6px; background: none; color: var(--text); font-size: 12px; text-align: left; cursor: pointer; }
.sf-samples > button:hover { background: var(--panel-2); }
.sf-samples > button svg { flex: none; color: #4ade80; }
.sf-samples > button span { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.sf-samples b { font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sf-samples small { color: var(--muted); font-size: 11px; }
.sf-sg-row.manual { padding-left: 22px; }
.sf-sg-row .sf-sg-remove { flex: none; display: grid; place-items: center; width: 20px; height: 20px; border-radius: 5px; color: var(--muted); }
.sf-sg-row .sf-sg-remove:hover { color: #ff9b8f; background: #34406b; }
.sf-view { position: fixed; inset: 0; z-index: 60; background: #0b0f1e; }
.sf-view > header { position: absolute; top: 14px; left: 50%; transform: translateX(-50%); max-width: calc(100% - 140px); padding: 8px 16px; border-radius: 10px; background: rgba(27, 35, 64, .9); color: #fff; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; pointer-events: none; }
/* A device's full details, slid in over the photo: the same panel as everywhere else. */
.sf-slide { position: absolute; top: 0; right: 0; bottom: 0; width: 360px; max-width: 92vw; z-index: 3; display: flex; background: var(--panel); box-shadow: -10px 0 30px rgba(0, 0, 0, .45); animation: sf-slide-in .22s cubic-bezier(.25, .8, .25, 1); }
.sf-slide .details { flex: 1; width: auto; }
@keyframes sf-slide-in { from { transform: translateX(100%); } to { transform: none; } }
.sf-view-close { position: absolute; top: 14px; right: 14px; display: grid; place-items: center; width: 34px; height: 34px; border: 0; border-radius: 8px; background: rgba(27, 35, 64, .9); color: #fff; cursor: pointer; }
.sf-view-close:hover { background: #34406b; }
.sf-view-meta { position: absolute; right: 14px; bottom: 14px; display: flex; flex-direction: column; align-items: flex-end; gap: 1px; margin: 0; padding: 4px 8px; border-radius: 6px; background: rgba(11, 15, 30, .38); color: rgba(255, 255, 255, .78); font-size: 11.5px; pointer-events: none; }
.sf-view-meta small { color: rgba(255, 255, 255, .6); font-size: 10.5px; }
/* Flown into from the Twin: it fades in over the room, and out as the view rises. */
.sf-view.fades { transition: opacity .35s ease; }
.sf-view.waiting { opacity: 0; }
.sf-view-stage { position: absolute; inset: 0; cursor: grab; touch-action: none; }
.sf-view-stage:active { cursor: grabbing; }
.sf-view-stage canvas { display: block; }
.sf-walk { position: absolute; left: 0; top: 0; display: grid; place-items: center; width: 62px; height: 62px; padding: 0; border-radius: 50%; border: 3px solid rgba(255, 255, 255, .92); background: rgba(22, 163, 74, .72); color: #fff; cursor: pointer; box-shadow: 0 4px 16px rgba(0, 0, 0, .5); }
.sf-walk:hover { background: #16a34a; }
.sf-route { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.sf-route polyline { fill: none; stroke: #16a34a; stroke-width: 3; stroke-dasharray: 8 6; vector-effect: non-scaling-stroke; }
.sf-time { position: relative; display: inline-flex; align-items: center; gap: 6px; padding: 5px 7px; border-radius: 10px; border: 1px solid #34406b; background: rgba(27, 35, 64, .94); color: #c9d1ef; box-shadow: 0 6px 18px rgba(0, 0, 0, .35); }
.sf-time > svg { flex: none; margin: 0 2px 0 3px; color: var(--muted); }
.sf-time > button { display: inline-flex; align-items: center; gap: 3px; padding: 5px 9px; border: 0; border-radius: 7px; background: #2a3560; color: #e3e8f8; font-size: 12px; cursor: pointer; }
.sf-time > button:hover:not(:disabled) { background: #3b4a80; }
.sf-time > button:disabled { opacity: .35; cursor: default; }
/* Beside the bar, so the bar keeps its size and Older and Newer never move. */
.sf-time .sf-time-latest { position: absolute; left: calc(100% + 8px); top: 50%; transform: translateY(-50%); white-space: nowrap; background: #2d4d9a; color: #fff; }
.sf-time-at { display: flex; flex-direction: column; align-items: center; gap: 3px; min-width: 130px; padding-right: 4px; }
.sf-time-date { display: inline-flex; align-items: center; gap: 6px; }
.sf-time-date b { color: #fff; font-size: 12.5px; }
.sf-time-date em { font-style: normal; font-size: 10px; font-weight: 700; color: #052e16; background: #4ade80; border-radius: 4px; padding: 0 5px; }
.sf-time-dots[hidden] { display: none; }
.sf-time-dots { display: inline-flex; gap: 4px; flex-direction: row-reverse; }
.sf-time-dots button { width: 7px; height: 7px; padding: 0; border: 0; border-radius: 50%; background: #4a5684; cursor: pointer; }
.sf-time-dots button.on { background: #fff; }
/* The time bar has the bottom of the canvas to itself: the hint and zoom sit above it. */
.sf-timed .sf-hint, .sf-timed .sf-zoom { bottom: 66px; }
.sf-time-bar { position: absolute; left: 50%; bottom: 10px; transform: translateX(-50%); z-index: 5; white-space: nowrap; }
.sf-ring { position: absolute; left: 0; top: 0; width: 44px; height: 44px; padding: 0; border-radius: 50%; border: 3px solid #4ade80; background: rgba(74, 222, 128, .14); box-shadow: 0 0 0 2px rgba(0, 0, 0, .35), 0 0 14px rgba(74, 222, 128, .6); cursor: pointer; }
.sf-ring.inactive, .sf-ring.missing { border-color: #f87171; background: rgba(248, 113, 113, .14); box-shadow: 0 0 0 2px rgba(0, 0, 0, .35), 0 0 14px rgba(248, 113, 113, .6); }
.sf-ring.attention, .sf-ring.pending { border-color: #fbbf24; background: rgba(251, 191, 36, .14); box-shadow: 0 0 0 2px rgba(0, 0, 0, .35), 0 0 14px rgba(251, 191, 36, .6); }
.sf-ring.on { border-color: #fff; background: rgba(255, 255, 255, .18); }
.sf-ring span { position: absolute; left: 50%; top: calc(100% + 5px); transform: translateX(-50%); padding: 2px 7px; border-radius: 5px; background: rgba(15, 20, 40, .88); color: #fff; font-size: 11.5px; font-weight: 600; white-space: nowrap; pointer-events: none; }
.sf-align-note { position: absolute; left: 50%; top: 72px; transform: translateX(-50%); margin: 0; padding: 7px 12px; border-radius: 8px; background: #2d4d9a; color: #fff; font-size: 13px; pointer-events: none; }
.sf-dev-card { position: absolute; right: 14px; top: 72px; width: 280px; padding: 12px; border-radius: 10px; border: 1px solid #34406b; background: rgba(27, 35, 64, .96); color: var(--text); font-size: 12.5px; }
.sf-dev-card header { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; }
.sf-dev-card header div { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.sf-dev-card header b { font-size: 13.5px; }
.sf-dev-card header small { color: var(--muted); font-size: 11.5px; }
.sf-dev-card header button { flex: none; display: grid; place-items: center; width: 24px; height: 24px; border: 0; border-radius: 6px; background: #34406b; color: #fff; cursor: pointer; }
.sf-dev-card dl { display: grid; grid-template-columns: auto 1fr; gap: 4px 12px; margin: 10px 0; }
.sf-dev-card dt { color: var(--muted); }
.sf-dev-card dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
.sf-dev-card dd.active { color: #4ade80; }
.sf-dev-card dd.inactive, .sf-dev-card dd.missing { color: #f87171; }
.sf-dev-card dd.attention, .sf-dev-card dd.pending { color: #fbbf24; }
.sf-dev-card footer { display: flex; gap: 6px; }
.sf-dev-card footer button { flex: 1; padding: 6px 8px; border-radius: 7px; border: 1px solid #4a5684; background: none; color: var(--text); font-size: 12px; cursor: pointer; }
.sf-dev-card footer .sf-go { background: #2d4d9a; border-color: var(--accent); color: #fff; }
.sf-view-time { position: absolute; left: 50%; bottom: 18px; transform: translateX(-50%); white-space: nowrap; transition: opacity .15s ease; }
.sf-view-time.changing { opacity: .75; }
.sf-view-note { position: absolute; inset: 0; display: grid; place-items: center; margin: 0; color: var(--muted); font-size: 13px; pointer-events: none; }
.sf-edit input, .sf-edit textarea { width: 100%; box-sizing: border-box; padding: 5px 7px; border-radius: 6px; border: 1px solid #34406b; background: #212b4d; color: var(--text); font: inherit; font-size: 12.5px; resize: vertical; }
.sf-edit input:focus, .sf-edit textarea:focus { outline: none; border-color: var(--accent); }
.sf-del { align-self: flex-start; display: inline-flex; align-items: center; gap: 5px; padding: 3px 0; border: 0; background: none; color: #ff9b8f; font-size: 12px; cursor: pointer; }
.sf-canvas { position: absolute; inset: 0; overflow: hidden; cursor: crosshair; touch-action: none; }
.sf-layer { position: absolute; left: 0; top: 0; transform-origin: 0 0; }
.sf-layer img { display: block; width: 100%; height: 100%; user-select: none; pointer-events: none; background: #fff; box-shadow: 0 10px 40px rgba(0, 0, 0, .45); }
.sf-pin { position: absolute; width: 0; height: 0; transform: scale(var(--inv, 1)); }
.sf-pin.on { z-index: 2; }
.sf-dot { position: absolute; left: -14px; top: -14px; width: 28px; height: 28px; padding: 0; border-radius: 50%; border: 2px solid #fff; background: #5b6478; color: #fff; font-size: 11px; font-weight: 700; cursor: grab; box-shadow: 0 1px 4px rgba(0, 0, 0, .45); touch-action: none; }
.sf-dot:active { cursor: grabbing; }
.sf-pin.on .sf-dot { background: #2f7bf6; }
.sf-arrow { position: absolute; left: -1.5px; bottom: 0; width: 3px; height: 34px; background: #5b6478; transform-origin: 50% 100%; }
.sf-arrow::after { content: ''; position: absolute; left: -4.5px; top: -8px; border: 6px solid transparent; border-top: 0; border-bottom: 9px solid #5b6478; }
.sf-pin.on .sf-arrow { background: #2f7bf6; height: 46px; }
.sf-pin.on .sf-arrow::after { border-bottom-color: #2f7bf6; }
.sf-handle { position: absolute; left: -9.5px; top: -16px; width: 22px; height: 22px; border-radius: 50%; border: 2px solid #2f7bf6; background: rgba(255, 255, 255, .9); cursor: grab; z-index: 1; touch-action: none; }
.sf-label { position: absolute; left: 16px; top: 15px; padding: 2px 7px; border-radius: 5px; background: #1b2340; color: #fff; font-size: 12px; font-weight: 600; white-space: nowrap; pointer-events: none; }
.sf-hint { position: absolute; left: 12px; bottom: 10px; margin: 0; display: flex; align-items: center; gap: 5px; padding: 4px 9px; border-radius: 7px; background: rgba(27, 35, 64, .9); color: #d4daf0; font-size: 11.5px; pointer-events: none; }
.sf-zoom { position: absolute; right: 12px; bottom: 10px; display: flex; gap: 3px; padding: 3px; border-radius: 8px; background: rgba(27, 35, 64, .92); cursor: default; }
.sf-zoom button { display: grid; place-items: center; width: 26px; height: 24px; border: 0; border-radius: 5px; background: none; color: var(--text); cursor: pointer; }
.sf-zoom button:hover { background: #34406b; }
.sf-modal { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; padding: 16px; background: rgba(9, 13, 28, .6); }
.sf-card { width: min(480px, 100%); max-height: 80vh; overflow-y: auto; padding: 16px 18px; border-radius: 12px; border: 1px solid #34406b; background: var(--panel); color: var(--text); font-size: 13px; }
.sf-card h3 { margin: 0 0 6px; font-size: 15px; }
.sf-card p { margin: 0 0 8px; line-height: 1.45; }
.sf-card ul { margin: 0 0 10px; padding-left: 18px; line-height: 1.5; color: #d4daf0; }
.sf-problems { margin-bottom: 10px; padding: 8px 10px; border-radius: 8px; border: 1px solid #a8554c; background: rgba(168, 85, 76, .16); }
.sf-problems p { margin: 3px 0 0; }
.sf-error { color: #ff9b8f; }
.sf-card footer { display: flex; justify-content: flex-end; gap: 8px; margin-top: 4px; }
@media (max-width: 1100px) { .sf.mv { grid-template-columns: 96px minmax(0, 1fr); grid-template-rows: minmax(0, 1fr) 300px; } .sf-side { grid-column: 1 / -1; } }

/* The side panel's apartment list (apartmentPanel.tsx): the Map's 3D floor, nothing selected. */
.apt-list { display: flex; flex-direction: column; gap: 2px; padding: 6px 10px 14px; overflow-y: auto; }
.apt-list button { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 7px 10px; border: 1px solid transparent; border-radius: 7px; background: none; color: var(--text); font-size: 12.5px; text-align: left; cursor: pointer; }
.apt-list button:hover { background: var(--panel-2); }
.apt-list button.on { background: var(--panel-2); border-color: var(--accent); }
.apt-list b { flex: 1; min-width: 0; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.apt-list .apt-sub { flex: none; width: 66px; text-align: right; }
.apt-list .apt-dev { flex: none; width: 56px; text-align: right; white-space: nowrap; }
.apt-pill { padding: 1px 7px; border-radius: 999px; background: rgba(53, 224, 138, .16); color: #35e08a; font-size: 10.5px; font-style: normal; font-weight: 600; }
.apt-list span { color: var(--muted); font-size: 11.5px; }

/* ── BMS tab (bmsView.tsx): areas of interest over their trends, a tile per unit heat pump ── */
.bms-page { --bms-cold: #2563eb; --bms-ok: #0c8058; --bms-warm: #e0a526; --bms-off: #7c2d3a;
  position: absolute; inset: 0; overflow: auto; padding: 12px 16px 24px; display: flex; flex-direction: column; gap: 14px; }
.canvas.tm-on .bms-page { bottom: 132px; }
.bms-page .iot-source { padding: 0; }
.bms-sh { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 12px; margin-bottom: 8px; color: var(--muted); font-size: 11.5px; }
.bms-sh b { color: var(--text); font-size: 14px; font-weight: 600; }
.bms-group { margin-top: 10px; }
.bms-group h3 { display: flex; align-items: baseline; gap: 8px; margin: 0 0 5px; font-size: 11.5px; font-weight: 600; color: var(--muted); }
.bms-group h3 span { font-weight: 400; color: #ff8a7a; }
.bms-legend { display: inline-flex; align-items: center; gap: 5px; margin-left: auto; }
.bms-legend i { width: 10px; height: 10px; border-radius: 3px; margin-left: 8px; background: var(--c); }
.bms-legend .cold, .bms-area.cold, .bms-tile.cold { --c: var(--bms-cold); }
.bms-legend .ok, .bms-area.ok, .bms-tile.ok { --c: var(--bms-ok); }
.bms-legend .warm, .bms-area.warm, .bms-tile.warm { --c: var(--bms-warm); }
.bms-legend .off, .bms-area.off, .bms-tile.off { --c: var(--bms-off); }
.bms-area.plain { --c: var(--panel-2); }

.bms-areas { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 6px; }
.bms-areas.building { grid-template-columns: repeat(auto-fill, minmax(165px, 1fr)); }
.bms-areas.building .bms-area { gap: 4px; }
.bms-areas.building .bms-area-now { font-size: 18px; }
.bms-areas.building .bms-area-now small { font-size: 10px; margin-left: 2px; }
.bms-area { position: relative; display: flex; align-items: flex-start; gap: 6px; height: 76px; padding: 8px 10px; overflow: hidden;
  font: inherit; text-align: left; color: #fff; border: 0; border-radius: 6px; background: var(--c); cursor: default; }
button.bms-area { cursor: pointer; }
.bms-area.plain { color: var(--text); }
.bms-area.warm, .bms-tile.warm { color: #1b2340; }
.bms-area.off, .bms-tile.off { color: #ffd5d0; }
.bms-area-label { position: relative; display: flex; flex-direction: column; min-width: 0; flex: 1; }
.bms-area-label b { font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bms-area-label small { display: flex; align-items: center; gap: 4px; font-size: 10.5px; opacity: .8; white-space: nowrap; overflow: hidden; }
.bms-area-label small span { overflow: hidden; text-overflow: ellipsis; }
.bms-area-now { position: relative; flex: none; font-size: 20px; font-weight: 700; line-height: 1.05; white-space: nowrap; }
.bms-area-now small { margin-left: 3px; font-size: 11px; font-weight: 500; opacity: .85; }
.bms-trend { position: absolute; left: 0; right: 0; bottom: 0; width: 100%; height: 42px; }
.bms-trend .area { fill: currentColor; opacity: .2; }
.bms-trend .line { fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; opacity: .9; vector-effect: non-scaling-stroke; }
.bms-area.plain .bms-trend { color: var(--accent); }
/* A tile's graph draws itself left to right when it first shows; a refresh keeps the element, so it does not draw again. */
.bms-area .bms-trend { animation: bms-draw 1.2s ease-in-out; }
@keyframes bms-draw { from { clip-path: inset(0 100% 0 0); } to { clip-path: inset(0); } }
@media (prefers-reduced-motion: reduce) { .bms-area .bms-trend { animation: none; } }
.bms-cursor { position: absolute; top: 0; bottom: 0; width: 1px; background: currentColor; opacity: .5; pointer-events: none; }

.bms-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 4px; }
.bms-tile { scroll-margin: 12px; position: relative; display: flex; flex-direction: column; justify-content: space-between; height: 56px; padding: 6px 8px; overflow: hidden;
  font: inherit; text-align: left; color: #fff; border: 0; border-radius: 5px; background: var(--c); cursor: pointer; }
.bms-tile-fan { position: absolute; top: -3px; right: -14px; opacity: .12; }
.bms-tile-fan.hp-spin { opacity: .3; will-change: transform; }
.bms-tile-unit { position: relative; font-size: 11px; font-weight: 600; white-space: nowrap; }
.bms-tile-unit small { margin-left: 4px; font-size: 10px; font-weight: 500; opacity: .8; }
.bms-tile-temp { position: relative; font-size: 16px; font-weight: 700; line-height: 1.1; white-space: nowrap; text-shadow: 0 0 5px var(--c); }
.bms-tile.off .bms-tile-temp { font-size: 13px; font-weight: 600; }
.bms-tile.off .bms-tile-fan { opacity: .08; }
.bms-legend button { display: inline-flex; align-items: center; gap: 5px; padding: 2px 7px; font: inherit; color: var(--muted); background: none; border: 1px solid transparent; border-radius: 10px; cursor: pointer; }
.bms-legend button:hover { color: var(--text); }
.bms-legend button.on { color: var(--text); border-color: #6b78ad; background: var(--panel-2); }
.bms-legend i { margin-left: 0; }
.bms-legend .none { --c: var(--panel-2); box-shadow: inset 0 0 0 1px #6b78ad; }
.bms-empty { padding: 18px 0; color: var(--muted); }

/* The Solar tab (solarView.tsx), and the array's pin and panel (solarPanel.tsx). */
.role-solar { color: #e0a526; }
.solar-cells { position: absolute; left: 0; top: 0; pointer-events: none; overflow: visible; }
.solar-cells path { fill: #7aa7ff; fill-opacity: .4; }
.details .solar-plot { height: 110px; }
.solar-rows { display: flex; flex-direction: column; margin: 0 -6px; }
.solar-rows button { display: flex; justify-content: space-between; gap: 10px; padding: 4px 6px; border: 0; border-radius: 4px; background: none; color: var(--muted); font: inherit; font-size: 12px; text-align: left; cursor: pointer; }
.solar-rows button b { color: var(--text); font-weight: 600; }
.solar-rows button:hover { background: var(--panel-2); }
.solar-rows button.on { background: var(--panel-2); color: var(--text); }
.solar-standin { padding: 8px 12px; border-left: 3px solid var(--bms-warm); border-radius: 4px; background: var(--panel-2); font-size: 12.5px; color: var(--text); }
.solar-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 6px; }
.solar-tile { display: flex; flex-direction: column; gap: 2px; padding: 10px 12px; border-radius: 6px; background: var(--panel-2); font-size: 11.5px; color: var(--muted); }
.solar-tile b { font-size: 22px; font-weight: 600; color: var(--text); }
.solar-tile small { font-size: 11px; }
.solar-chart { font-size: 11.5px; color: var(--muted); }
.solar-plot { position: relative; height: 170px; margin-top: 2px; border-radius: 5px; overflow: hidden; background: var(--panel-2); color: var(--accent); }
.solar-y { position: absolute; inset: 0; font-size: 10.5px; color: var(--muted); text-shadow: 0 0 3px var(--panel-2), 0 0 3px var(--panel-2); pointer-events: none; }
.solar-y span { position: absolute; left: 6px; }
.solar-y span:nth-child(1) { top: 3px; }
.solar-y span:nth-child(2) { bottom: 50%; }
.solar-y span:nth-child(3) { bottom: 3px; }
.solar-plot svg, .solar-inverter svg { display: block; width: 100%; height: 100%; }
.solar-plot svg path, .solar-inverter svg path { vector-effect: non-scaling-stroke; }
.solar-plot .area, .solar-inverter .area { fill: currentColor; opacity: .25; stroke: none; }
.solar-plot .line, .solar-inverter .line { fill: none; stroke: currentColor; stroke-width: 1.5; }
.solar-grid { position: absolute; left: 0; right: 0; border-top: 1px solid rgba(255, 255, 255, .08); }
.solar-day { position: absolute; top: 0; bottom: 0; border-left: 1px solid rgba(255, 255, 255, .08); }
.solar-x { position: relative; height: 16px; margin-top: 3px; font-size: 10.5px; }
.solar-x span { position: absolute; white-space: nowrap; padding-left: 3px; }
.solar-inverters { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 6px; }
.solar-inverter { padding: 8px 10px; border-radius: 6px; background: var(--panel-2); color: var(--accent); }
.solar-inverter svg { height: 60px; margin: 6px 0; }
/* The Solar tab's graphs draw themselves as the BMS tab's do; the grid and scale stay where they are. */
.solar-page .solar-plot svg, .solar-page .solar-inverter svg, .solar-page .solar-bars { animation: bms-draw 1.2s ease-in-out; }
@media (prefers-reduced-motion: reduce) { .solar-page .solar-plot svg, .solar-page .solar-inverter svg, .solar-page .solar-bars { animation: none; } }
.solar-inverter .bms-chart-stats { margin: 0; font-size: 11.5px; color: var(--muted); }
.solar-inverter-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; font-size: 11px; color: var(--muted); }
.solar-inverter-head b { font-size: 13px; font-weight: 600; color: var(--text); }
.solar-period { align-items: center; gap: 6px 16px; }
.solar-period > b { min-width: 54px; }
.solar-pick { display: inline-flex; gap: 2px; padding: 2px; border-radius: 7px; background: var(--panel-2); }
.solar-pick button { padding: 3px 11px; border: 0; border-radius: 5px; background: none; color: var(--muted); font: inherit; font-size: 12px; cursor: pointer; }
.solar-pick button:hover { color: var(--text); }
.solar-pick button.on { background: var(--accent); color: #101a38; font-weight: 600; }
.solar-step { display: inline-flex; align-items: center; gap: 4px; }
.solar-step b { min-width: 150px; font-size: 13px; text-align: center; }
.solar-step button { display: inline-flex; align-items: center; justify-content: center; width: 24px; height: 24px; padding: 0; border: 0; border-radius: 5px; background: var(--panel-2); color: var(--text); cursor: pointer; }
.solar-step button:hover:enabled { background: #2e3b6e; }
.solar-step button:disabled { opacity: .35; cursor: default; }
.solar-total { margin-left: auto; color: var(--text); font-size: 12.5px; }
.solar-bars { position: relative; display: flex; align-items: stretch; gap: 2px; height: 110px; margin-top: 2px; }
.solar-tip { position: absolute; z-index: 5; padding: 5px 9px; border: 1px solid #34406b; border-radius: 6px; background: #10182f; box-shadow: 0 4px 14px rgba(0, 0, 0, .4); color: var(--muted); font-size: 11.5px; white-space: nowrap; pointer-events: none; }
.solar-tip b { display: block; color: var(--text); font-size: 13.5px; font-weight: 600; }
.solar-bars button { position: relative; flex: 1; min-width: 0; padding: 0; border: 0; background: none; cursor: pointer; }
.solar-bars button:disabled { cursor: default; }
.solar-bars i { position: absolute; left: 0; right: 0; bottom: 0; border-radius: 4px 4px 0 0; background: var(--accent); opacity: .75; }
.solar-bars button.on i { opacity: 1; }
.solar-alerts { display: flex; flex-direction: column; gap: 4px; margin: 0; padding: 0; list-style: none; }
.solar-alerts li { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 14px; padding: 7px 10px; border-left: 3px solid #ff8a7a; border-radius: 4px; background: var(--panel-2); font-size: 11.5px; color: var(--muted); }
.solar-alerts b { font-size: 12.5px; font-weight: 600; color: var(--text); }
.bms-past { padding: 6px 10px; border-radius: 6px; font-size: 12px; color: var(--text); background: var(--panel-2); }
.bms-tile.none .bms-tile-temp { font-size: 12.5px; font-weight: 500; }
.bms-tile.none { --c: var(--panel-2); color: var(--muted); }
.bms-chart { margin: 2px 0 8px; font-size: 11.5px; color: var(--muted); }
.bms-chart-head { display: flex; justify-content: space-between; min-height: 17px; }
.bms-chart-head b { color: var(--text); font-size: 12.5px; }
.bms-chart-plot { position: relative; height: 92px; margin-top: 2px; border-radius: 5px; overflow: hidden; background: var(--panel-2); color: var(--accent); }
.bms-chart-plot .bms-trend { height: 100%; }
.bms-chart-axis { display: flex; justify-content: space-between; margin-top: 3px; font-size: 10.5px; }
.bms-chart-stats { display: flex; gap: 14px; margin: 6px 0 2px; }
.bms-chart-stats b { color: var(--text); font-weight: 600; }
.bms-units { display: flex; flex-wrap: wrap; gap: 4px 12px; }
.bms-open { display: block; margin-top: 8px; }
.bms-tile:hover, button.bms-area:hover { filter: brightness(1.12); }
.bms-tile.on, .bms-area.on, .bms-tile:focus-visible, button.bms-area:focus-visible { outline: 2px solid #fff; outline-offset: 1px; }

/* The Units tab (unitsView.tsx). Size is an order, so it is one blue from light to deep: the bigger
   the apartment the stronger the colour, and the tiles at the top are the legend. */
.uv { --s-studio: #d6e4ff; --s-1br: #7fa9f5; --s-2br: #3f74e0; --s-3br: #1f3f94; --s-4br: #142a66;
  padding: 16px 20px 40px; overflow-y: auto; height: 100%; color: var(--text); display: flex; flex-direction: column; gap: 18px; }
.uv h3 { margin: 0 0 8px; font-size: 14px; font-weight: 600; }
.uv-head { display: flex; flex-wrap: wrap; gap: 10px 20px; align-items: stretch; }
.uv-total { background: var(--node); border: 1px solid var(--line); border-radius: 10px; padding: 8px 16px; min-width: 76px; text-align: center; color: inherit; font: inherit; cursor: pointer; }
.uv-total:hover { border-color: var(--accent); }
.uv-total[aria-pressed="true"] { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.uv-total b { display: block; font-size: 22px; font-weight: 600; }
.uv-total span { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); }
.uv-total i { width: 10px; height: 10px; border-radius: 3px; border: 1px solid rgba(255, 255, 255, .35); }
.uv-about { flex: 1; min-width: 240px; display: flex; flex-direction: column; justify-content: center; gap: 2px; padding-left: 8px; font-size: 13px; }
.uv-ref { font-size: 12px; color: var(--muted); }
.uv-proof { display: inline-flex; align-items: center; height: 30px; border: 1px solid var(--accent); border-radius: 999px; background: var(--node); font-size: 12px; font-weight: 600; }
.uv-proof a { display: inline-flex; align-items: center; height: 100%; color: var(--text); text-decoration: none; padding: 0 12px 0 4px; }
.uv-proof a:first-child { padding: 0 4px 0 12px; }
.uv-proof a:only-child { padding: 0 12px; }
.uv-proof a:hover { color: var(--accent); }
.uv-proof button { height: 100%; padding: 0 12px; background: none; border: 0; border-radius: 999px; color: var(--text); font: inherit; cursor: pointer; }
.uv-proof button:hover:enabled { color: var(--accent); }
.uv-proof button:disabled { cursor: default; opacity: 1; }
.uv-proof.on { background: var(--accent); }
.uv-proof.on button, .uv-proof.on button:hover:enabled { color: #fff; }
.uv-total small { display: block; font-size: 11px; color: var(--muted); }

/* The Units tab's Report (unitReport.tsx). */
.ur-group { display: flex; flex-direction: column; gap: 12px; }
.ur-group > h3 { margin: 0; font-size: 15px; }
.ur-gap { background: var(--node); border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; }
.ur-gap h4 { display: flex; align-items: baseline; gap: 8px; margin: 0; font-size: 13.5px; font-weight: 600; }
.ur-gap h4 em { font-style: normal; color: var(--muted); }
.ur-gap h4 span { margin-left: auto; font-weight: 500; color: var(--muted); white-space: nowrap; }
.ur-gap p { margin: 4px 0 10px; font-size: 12.5px; line-height: 1.45; color: var(--muted); }
.ur-rows { table-layout: fixed; }
.ur-rows th:nth-child(1) { width: 12%; }
.ur-rows th:nth-child(2) { width: 26%; }
.ur-rows th:nth-child(3) { width: 14%; }
.ur-rows th:nth-child(4) { width: 14%; }
.ur-rows th:nth-child(5) { width: 10%; text-align: right; }
.ur-rows td:nth-child(5) { text-align: right; }
.ur-rows th:nth-child(6), .ur-rows td:nth-child(6) { padding-left: 24px; }
.ur-rows tr.on td { background: var(--panel-2); }
.ur-link { padding: 0; background: none; border: 0; color: var(--accent); font: inherit; font-weight: 600; cursor: pointer; }
.ur-link:hover { text-decoration: underline; }
.ur-due { color: var(--bad); }
.ur-units { display: flex; flex-wrap: wrap; gap: 4px; }
.ur-units button, .ur-units span { padding: 2px 7px; background: var(--panel-2); border: 1px solid transparent; border-radius: 6px; color: var(--text); font: inherit; font-size: 12px; }
.ur-units button { cursor: pointer; }
.ur-units button:hover, .ur-units button[aria-pressed="true"] { border-color: var(--accent); }
.uv-file { display: block; }
.up-note { margin: 6px 0 0; font-size: 12px; line-height: 1.45; color: var(--muted); }
.up-dev { display: flex; align-items: center; gap: 6px; width: 100%; padding: 4px 2px; background: none; border: 0; color: inherit; font: inherit; font-size: 12px; text-align: left; cursor: pointer; border-radius: 4px; }
.up-dev:hover { background: var(--node); }
.up-dev b { font-weight: 500; }
.up-client b { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-align: left; }
.up-dev .up-rate { flex: none; color: var(--muted); white-space: nowrap; }
.up-dev .up-rssi { flex: none; width: 50px; margin-left: 0; text-align: right; white-space: nowrap; }
.up-dev .up-rssi.good { color: var(--ok); }
.up-dev .up-rssi.fair { color: var(--warn); }
.up-dev .up-rssi.weak { color: var(--bad); }
.up-dev span:last-child { margin-left: auto; color: var(--muted); }
.uv-open { background: rgba(242, 201, 76, .08); border: 1px solid rgba(242, 201, 76, .3); border-left: 3px solid var(--warn); border-radius: 8px; padding: 12px 14px; }
.uv-open ul, .uv-decisions { margin: 0; padding-left: 18px; font-size: 13px; line-height: 1.5; }
.uv-open li { position: relative; padding-right: 84px; }
.uv-open li + li { margin-top: 6px; }
.uv-open-dismiss { position: absolute; top: -2px; right: 0; padding: 2px 10px; border: 1px solid var(--node-border); border-radius: 6px; background: none; color: var(--text); font-size: 12px; }
.uv-open-dismiss:hover { background: var(--node); }
.uv-open-back { align-self: flex-start; padding: 0; border: 0; background: none; color: var(--muted); font-size: 12px; }
.uv-open-back:hover { color: var(--text); text-decoration: underline; }
.uv-floors { display: flex; flex-direction: column; gap: 18px; min-width: 0; }
.uv-stack { overflow-x: auto; }
.uv-grid { display: grid; gap: 4px; width: max-content; }
.uv-line { font-size: 11px; color: var(--muted); text-align: center; }
.uv-floor-name { position: sticky; left: 0; z-index: 1; background: var(--bg); font-size: 13px; font-weight: 600; padding-top: 6px; }
.uv-floor-name span { display: block; font-size: 11px; font-weight: 400; color: var(--muted); }
.uv-unit { padding: 3px 2px; border-radius: 6px; text-align: center; background: transparent; border: 1px dashed var(--node-border); color: var(--text); font: inherit; cursor: pointer; }
.uv-unit:hover:not(:disabled) { filter: brightness(1.12); }
.uv-unit b { display: block; font-size: 12px; font-weight: 600; }
.uv-unit span { display: block; font-size: 10px; }
.uv-unit.s-studio { background: var(--s-studio); border: 1px solid var(--s-studio); color: #10203f; }
.uv-unit.s-1br { background: var(--s-1br); border: 1px solid var(--s-1br); color: #0b1730; }
.uv-unit.s-2br { background: var(--s-2br); border: 1px solid var(--s-2br); color: #fff; }
.uv-unit.s-3br { background: var(--s-3br); border: 1px solid #4a6cc4; color: #fff; }
.uv-unit.s-4br, .uv-unit.s-5br { background: var(--s-4br); border: 1px solid #4a6cc4; color: #fff; }
.uv-unit.off { background: transparent; border: 1px solid var(--line); cursor: default; }
.uv-unit.off > * { visibility: hidden; }
.uv-unit { position: relative; }
.uv-unit.vacant { opacity: .5; }
.uv-unit.on { z-index: 1; opacity: 1; outline: 2px solid #c084fc; outline-offset: 1px; box-shadow: 0 0 0 3px rgba(168, 85, 247, .55), 0 0 18px 8px rgba(168, 85, 247, .85); }
.uv-sub { position: absolute; top: 3px; left: 3px; width: 7px; height: 7px; border-radius: 50%; background: #35e08a; box-shadow: 0 0 0 1px rgba(6, 40, 24, .6), 0 0 6px 2px rgba(53, 224, 138, .9); }
.uv-sub.down::after { content: ''; position: absolute; inset: -4px; border: 2px solid #ff3b30; border-radius: 50%; box-shadow: 0 0 4px rgba(255, 59, 48, .85); }
.uv-group { display: flex; flex-wrap: wrap; gap: 6px; }
.uv-total.still { cursor: default; }
.uv-total.still:hover { border-color: var(--line); }
.uv-total:disabled { opacity: .55; cursor: default; }
.uv-total:disabled:hover { border-color: var(--line); }
.kv.up-words b { word-break: normal; overflow-wrap: anywhere; text-align: right; }
.kv.up-words a { color: var(--accent); }
.sub-card .leaf-box.role-subscriber { color: #35e08a; border-color: rgba(53, 224, 138, .6); }
.react-flow__edge.e-sub .react-flow__edge-path { stroke: var(--muted); stroke-width: 1; stroke-dasharray: 2 5; opacity: .4; }
.up-tabs { display: flex; padding: 0 12px; border-bottom: 1px solid var(--line); }
.up-tabs button { flex: 1; margin-bottom: -1px; padding: 10px 4px; background: none; border: 0; border-bottom: 2px solid transparent; color: var(--muted); font: inherit; font-size: 12px; cursor: pointer; }
.up-tabs button:hover { color: var(--text); }
.up-tabs button[aria-selected="true"] { color: var(--text); font-weight: 600; border-bottom-color: var(--accent); }
.sh.up-cat { margin: 18px 0 8px; padding-top: 14px; border-top: 1px solid var(--line); }
.up-link { display: inline-flex; margin-left: 6px; color: var(--accent); vertical-align: -1px; }
.up-link:hover { filter: brightness(1.25); }
.up-more.up-show { margin: 0; font-weight: 500; }
.up-more { display: block; margin: 6px 0 0; padding: 0; background: none; border: 0; color: var(--accent); font: inherit; font-size: 12px; cursor: pointer; }
.uv-sources { width: 100%; border-collapse: collapse; font-size: 13px; }
.uv-sources th { text-align: left; font-weight: 600; color: var(--muted); padding: 4px 8px; border-bottom: 1px solid var(--line); }
.uv-sources td { padding: 6px 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
.uv-sources tr.sets td { background: rgba(122, 167, 255, .08); }
.uv-sources em { margin-left: 8px; font-size: 11px; font-style: normal; color: var(--accent); }
.uv-n { text-align: right; font-variant-numeric: tabular-nums; }

/* Locks tab (locksView.tsx). Blue while connected, light red while offline; the battery's colour says what is left. */
.bms-page { --lock-up: #2563eb; --lock-down: #f3b3ad; --bat-good: #4ade80; --bat-low: #fcc33c; --bat-crit: #ff2d2d; }
.bms-legend .up { --c: var(--lock-up); } .bms-legend .down { --c: var(--lock-down); }
.bms-legend .good { --c: var(--bat-good); } .bms-legend .low { --c: var(--bat-low); } .bms-legend .crit { --c: var(--bat-crit); }
.bms-legend .weak { --c: transparent; box-shadow: inset 0 0 0 2px var(--bat-low); }

.lock-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 4px; }
.lock-tile { position: relative; display: flex; align-items: center; justify-content: center; height: 62px; min-width: 0; padding: 14px 4px 0; overflow: hidden; scroll-margin: 12px; font: inherit; font-variant-numeric: tabular-nums; border: 0; border-radius: 5px; cursor: pointer; transition: filter .12s, transform .08s; }
.lock-tile.is-up { --c: #2563eb; --good: var(--bat-good); --low: var(--bat-low); --crit: #ff2d2d; --shell: rgba(6, 16, 60, .5); --edge: rgba(255, 255, 255, .7);
  color: #fff; background: linear-gradient(155deg, #4286fb 0%, #2563eb 46%, #1846c4 100%); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .24), inset 0 -14px 18px -14px rgba(7, 20, 84, .55), 0 1px 3px rgba(3, 8, 32, .6); }
.lock-tile.is-down { --c: #f3b3ad; --good: #14803c; --low: #a84c07; --crit: #e00000; --shell: rgba(255, 255, 255, .42); --edge: rgba(88, 23, 15, .55);
  color: #58170f; background: linear-gradient(155deg, #fbd0cb 0%, #f4b6b0 46%, #e89d96 100%); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .45), inset 0 -14px 18px -14px rgba(120, 40, 34, .3), 0 1px 3px rgba(3, 8, 32, .6); }
.lock-tile:hover { filter: brightness(1.05); }
.lock-tile:active { transform: scale(.985); }
.lock-tile.on, .lock-tile:focus-visible { outline: 2px solid #fff; outline-offset: 1px; }
.lock-top { position: absolute; top: 5px; left: 6px; right: 6px; display: flex; align-items: center; justify-content: space-between; gap: 3px; }
.lock-charge { display: flex; align-items: center; gap: 3px; font-size: 10.5px; font-weight: 600; line-height: 1; white-space: nowrap; }
.lock-unit { position: relative; font-size: 28px; font-weight: 700; letter-spacing: -.02em; line-height: 1; white-space: nowrap; text-shadow: 0 0 5px var(--c), 0 1px 2px rgba(5, 14, 60, .28); }
.lock-unit.four { font-size: 24px; letter-spacing: -.03em; }
.lock-unit.long { font-size: 13px; font-weight: 600; line-height: 1.1; white-space: normal; text-align: center; }
.lock-mark { position: absolute; right: 3px; bottom: 3px; opacity: .55; pointer-events: none; }
.lock-battery, .lock-wifi { display: block; flex: none; }
.bat-shell { fill: var(--shell); stroke: var(--edge); stroke-width: 1.2; }
.bat-cap { fill: var(--edge); }
.lock-battery.good .bat-level { fill: var(--good); }
.lock-battery.low { --edge: var(--low); } .lock-battery.low .bat-level { fill: var(--low); }
.lock-battery.crit { --edge: var(--crit); --shell: rgba(96, 0, 0, .78); } .lock-battery.crit .bat-level { fill: var(--crit); }
.lock-wifi path, .lock-wifi line { fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.lock-wifi circle { fill: currentColor; }
.lock-wifi > * { opacity: .22; } .lock-wifi > .lit, .lock-wifi > line { opacity: 1; }
.lock-wifi path.lit { stroke-width: 2.7; }
.lock-tile.is-up .lock-wifi:not(.weak) { color: #fff; filter: drop-shadow(0 0 2px rgba(255, 255, 255, .75)); }
.lock-wifi.weak { color: var(--low); } .lock-wifi.weak > * { opacity: .55; } .lock-wifi.weak > .lit { opacity: 1; }
@media (prefers-reduced-motion: reduce) { .lock-tile { transition: none; } .lock-tile:active { transform: none; } }

.lock-report { flex: none; align-self: flex-start; display: inline-flex; align-items: center; gap: 7px; margin-top: 10px; padding: 8px 13px; font: inherit; font-size: 12.5px; font-weight: 600; color: var(--text); background: var(--node); border: 1px solid var(--node-border); border-radius: 8px; cursor: pointer; transition: border-color .12s, background .12s; }
.lock-report:hover:not(:disabled) { border-color: var(--accent); background: var(--panel); }
.lock-report:disabled { opacity: .5; cursor: default; }
.lock-hero { display: flex; align-items: center; gap: 22px; padding: 8px 18px; background: var(--panel-2); border-radius: 12px; }
.lock-model { position: relative; flex: none; width: 230px; height: 230px; touch-action: none; }
.lock-model.turning { cursor: grab; }
.lock-model.turning:active { cursor: grabbing; }
.lock-model img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
.lock-model canvas { position: absolute; inset: 0; display: block; }
.lock-about { flex: 1; min-width: 0; }
.lock-about h2 { margin: 0; font-size: 20px; font-weight: 600; color: var(--text); }
.lock-about p { margin: 3px 0 14px; font-size: 12.5px; color: var(--muted); }
.lock-stats { display: flex; flex-wrap: wrap; gap: 6px; }
.lock-stat { --c: var(--muted); display: flex; flex-direction: column; justify-content: center; gap: 3px; min-width: 104px; padding: 9px 13px; font: inherit; font-variant-numeric: tabular-nums; text-align: left; color: var(--text); background: var(--node); border: 1px solid var(--line); border-radius: 10px; transition: border-color .12s; }
.lock-stat b { font-size: 21px; font-weight: 600; line-height: 1.05; letter-spacing: -.01em; }
.lock-stat span { display: flex; align-items: center; gap: 6px; font-size: 11.5px; color: var(--muted); white-space: nowrap; }
.lock-stat i { width: 8px; height: 8px; border-radius: 50%; background: var(--c); }
.lock-stat.up { --c: #6f9bff; } .lock-stat.down { --c: var(--lock-down); } .lock-stat.crit { --c: #ff6b63; } .lock-stat.low { --c: var(--bat-low); }
.lock-stat.weak i { background: none; box-shadow: inset 0 0 0 2px var(--bat-low); }
.lock-stat.down b, .lock-stat.crit b, .lock-stat.low b { color: var(--c); }
.lock-stat.none b { color: var(--text); } .lock-stat.none i { opacity: .35; }
button.lock-stat { cursor: pointer; }
button.lock-stat:hover { border-color: var(--node-border); }
.lock-stat.on { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }

/* The Intercom tab (intercomView.tsx): Devices and Events; a card per model on top, then Locks' numbers and tiles. */
.ic-page { padding-top: 0; gap: 12px; --ic-unknown: #c9b98a; scrollbar-gutter: stable; }
.ic-head.access-head { position: sticky; top: 0; z-index: 3; flex: none; margin: 0 -16px; background: var(--bg); }
.ic-head .brivo-tabs { padding-top: 10px; }
.ic-devices, .ic-events { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
/* Centred on one line, with room between them, sliding a page at a time where they do not all fit
   (ModelRow; CJ 2026-11-07). The view clips the cards past its edges but lets a card's lift and its
   pad's glow show over them. */
.ic-models { display: flex; flex-direction: column; align-items: center; gap: 14px; min-width: 0; }
.ic-models-view { max-width: 100%; overflow: clip; overflow-clip-margin: 40px; touch-action: pan-y; -webkit-user-select: none; user-select: none; }
.ic-models.sliding, .ic-models.sliding .ic-card { cursor: grabbing; }
.ic-models-track { display: flex; gap: var(--gap); transition: transform .45s cubic-bezier(.22, .8, .3, 1); }
.ic-models-track > .ic-card { flex: 0 0 var(--card); }
.ic-models-nav { display: flex; align-items: center; gap: 12px; }
.ic-models-step { display: grid; place-items: center; width: 24px; height: 24px; padding: 0; color: #9fb0e0; background: rgba(255, 255, 255, .02); border: 1px solid rgba(150, 172, 255, .22); border-radius: 50%; cursor: pointer; transition: border-color .15s, color .15s, background .15s; }
.ic-models-step:hover:not(:disabled) { color: #fff; border-color: var(--accent); background: rgba(122, 167, 255, .08); }
.ic-models-step:disabled { color: #4a557e; border-color: rgba(150, 172, 255, .1); cursor: default; }
.ic-models-dots { display: flex; align-items: center; gap: 10px; }
.ic-models-dots button { width: 10px; height: 10px; padding: 0; background: #3a4570; border: 0; border-radius: 5px; cursor: pointer; transition: width .3s, background .3s, box-shadow .3s; }
.ic-models-dots button:hover { background: #56628f; }
.ic-models-dots button.on { width: 30px; background: var(--accent); box-shadow: 0 0 10px rgba(122, 167, 255, .55); cursor: default; }
.ic-models-step:focus-visible, .ic-models-dots button:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) { .ic-models-track, .ic-models-dots button { transition: none; } }
/* A hero select (CJ 2026-11-07): each model floats free over a round pad, outside any box; the pad
   glows and casts a column of light while its card is the filter, and the model lifts a little
   under the pointer. Only the name plate below is a box. */
.ic-card { --pad-rim: rgba(150, 172, 255, .34); display: flex; flex-direction: column; min-width: 0; cursor: pointer; border-radius: 12px; }
.ic-card:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.ic-card.none { cursor: default; }
.ic-card-model { position: relative; height: 200px; }
.ic-card-model .lock-model, .ic-card-icon { position: absolute; inset: 0 0 50px; width: auto; height: auto; transition: transform .24s cubic-bezier(.2, .8, .3, 1.25); }
.ic-card-model .lock-model { touch-action: pan-y; }
.ic-card-model .lock-model.still { cursor: grab; }
.ic-card-model .lock-model.held { cursor: grabbing; }
.ic-card-model .lock-model img { object-position: 50% 96%; }
.ic-card-icon { display: grid; place-items: end center; padding-bottom: 6px; color: #6b78ad; }
.ic-card:not(.none):hover .lock-model, .ic-card:not(.none):hover .ic-card-icon { transform: translateY(-6px) scale(1.035); }
.ic-pad { position: absolute; left: 50%; bottom: 16px; width: min(160px, 74%); height: 30px; transform: translateX(-50%); border-radius: 50%; background: radial-gradient(ellipse at 50% 38%, #3a4880 0%, #27325f 52%, #1b2449 100%); box-shadow: inset 0 0 0 1.5px var(--pad-rim), inset 0 -5px 9px rgba(5, 8, 25, .45), 0 7px 0 #10162f, 0 7px 0 1.5px rgba(120, 140, 220, .16), 0 14px 18px rgba(0, 0, 0, .35); transition: box-shadow .25s, background .25s; }
/* The floating model's shadow on the pad, smaller while it is lifted. */
.ic-pad::before { content: ''; position: absolute; left: 27%; right: 27%; top: 20%; bottom: 28%; border-radius: 50%; background: radial-gradient(closest-side, rgba(4, 7, 22, .6), transparent); transition: transform .24s, opacity .24s; }
.ic-card:not(.none):hover .ic-pad::before { transform: scale(.82); opacity: .7; }
.ic-card:not(.none):hover .ic-pad { --pad-rim: rgba(170, 195, 255, .7); }
/* The column of light that rises from a chosen pad. */
.ic-pad::after { content: ''; position: absolute; left: 7%; right: 7%; bottom: 50%; height: 150px; border-radius: 0 0 50% 50% / 0 0 14px 14px; background: linear-gradient(to top, rgba(122, 167, 255, .34), rgba(122, 167, 255, .09) 55%, transparent); -webkit-mask-image: linear-gradient(to right, transparent, #000 22%, #000 78%, transparent); mask-image: linear-gradient(to right, transparent, #000 22%, #000 78%, transparent); opacity: 0; transition: opacity .3s; pointer-events: none; }
.ic-card.on .ic-pad { --pad-rim: var(--accent); background: radial-gradient(ellipse at 50% 40%, #7f9ff0 0%, #4467c4 45%, #26408c 100%); box-shadow: inset 0 0 0 1.5px var(--pad-rim), inset 0 0 12px rgba(200, 220, 255, .55), 0 7px 0 #1b2c66, 0 7px 0 1.5px rgba(122, 167, 255, .8), 0 0 22px 5px rgba(122, 167, 255, .45), 0 10px 40px 10px rgba(122, 167, 255, .28); }
.ic-card.on .ic-pad::after { opacity: 1; animation: ic-pad-beam 2.6s ease-in-out infinite; }
@keyframes ic-pad-beam { 50% { opacity: .6; } }
@media (prefers-reduced-motion: reduce) { .ic-card-model .lock-model, .ic-card-icon, .ic-pad, .ic-pad::before { transition: none; } .ic-card.on .ic-pad::after { animation: none; } }
.ic-card-about { display: flex; flex-direction: column; gap: 3px; padding: 9px 12px 11px; color: var(--text); background: var(--panel-2); border: 1px solid transparent; border-radius: 12px; transition: border-color .12s; }
.ic-card:not(.none):hover .ic-card-about { border-color: var(--node-border); }
.ic-card.on .ic-card-about { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.ic-card-about > * { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ic-card-about b { font-size: 14px; font-weight: 600; }
.ic-card-about span { font-size: 11.5px; color: var(--muted); font-variant-numeric: tabular-nums; }
.ic-card-about .ic-card-state { font-weight: 600; }
.ic-card-state.up { color: #5fd38a; } .ic-card-state.down { color: #ff6b63; } .ic-card-state.unknown { color: var(--ic-unknown); }
.ic-stats { flex: none; }
.lock-stat.unknown { --c: var(--ic-unknown); } .lock-stat.sip-ok { --c: #5fd38a; } .lock-stat.sip-bad { --c: #ff6b63; }
.lock-stat.sip-bad b { color: var(--c); } .lock-stat.sip-bad.none b { color: var(--text); }
.ic-page .bms-legend .unknown { --c: var(--ic-unknown); }
.ic-page .bms-legend .sip-ok { --c: #5fd38a; border-radius: 50%; }
.ic-page .bms-legend .sip-bad { --c: #ff6b63; border-radius: 50%; }
.ic-page .bms-legend .unread { --c: transparent; box-shadow: inset 0 0 0 1px #6b78ad; border-radius: 50%; }
.ic-clear { padding: 1px 8px; font: inherit; font-size: 11.5px; color: var(--accent); background: none; border: 1px solid var(--line); border-radius: 10px; cursor: pointer; }
.ic-clear:hover { border-color: var(--accent); }
.lock-tile.ic-tile.is-unknown { --c: #d9c98f; color: #3b2f0c; background: linear-gradient(155deg, #ebdfb0 0%, #d9c98f 46%, #c4b16f 100%); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .45), inset 0 -14px 18px -14px rgba(90, 70, 20, .3), 0 1px 3px rgba(3, 8, 32, .6); }
.ic-tile .lock-mark { display: flex; }
.ic-sip { display: flex; align-items: center; justify-content: center; width: 16px; height: 16px; border-radius: 50%; }
.ic-sip.registered { color: #0f3d24; background: #5fd38a; }
.ic-sip.unregistered { color: #fff; background: #e0362c; }
.ic-model-code { font-size: 9.5px; font-weight: 600; letter-spacing: .02em; opacity: .75; white-space: nowrap; }
.ic-silent.brivo-note { padding: 0; }
.ic-panels.bms-legend { margin-left: 0; flex-wrap: wrap; }
.ic-panels button span { font-variant-numeric: tabular-nums; opacity: .7; }
.ic-log { min-width: 0; }
.ic-table { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.ic-table th { position: sticky; top: 38px; background: #212b4d; text-align: left; font-weight: 500; color: #9aa4cb; padding: 9px 10px; z-index: 1; white-space: nowrap; }
.ic-table td { padding: 8px 10px; color: #e3e8f8; border-top: 1px solid #2a3560; vertical-align: top; }
.ic-table td.mono { font-family: ui-monospace, SFMono-Regular, monospace; font-size: 12px; white-space: nowrap; }
.ic-table td.muted-cell { color: #9aa4cb; }
.ic-table td.ic-photo { width: 64px; padding: 5px 4px 5px 10px; }
/* The Intercom tab's Directory (intercomView.tsx Directory): a monitor's name, then its state. */
.ic-dir-table td:first-child { width: 52px; }
.ic-dir-table .cd-link + .iot-pill { margin-left: 8px; }
.ic-directory h3 { display: flex; align-items: baseline; gap: 8px; margin: 0 0 6px; font-size: 12.5px; font-weight: 600; color: #e3e8f8; }
.ic-directory h3 .ic-dir-count { font-weight: 400; color: #9aa4cb; }
.ic-dir-h.bms-group { margin: 6px 0 -6px; }
.ic-users-table .ic-relay { display: block; white-space: nowrap; }
.ic-users-table .ic-chip { display: inline-block; margin: 0 4px 3px 0; padding: 1px 7px; border-radius: 3px; background: #2a3560; color: #cfd6f2; font-size: 11.5px; white-space: nowrap; }
.ic-users-table .dpl-secret code { font-family: ui-monospace, SFMono-Regular, monospace; font-size: 12px; }
.ic-dir-add { margin-left: auto; display: inline-flex; align-items: center; gap: 4px; padding: 3px 10px; border: 1px solid #34407a; border-radius: 5px; background: #1b2546; color: #cfd6f2; font-size: 12px; cursor: pointer; }
.ic-dir-add:hover { background: #253263; }
.ic-users-table td.ic-edit { width: 34px; text-align: right; }
.ic-users-table td.ic-edit button { display: inline-grid; place-items: center; width: 26px; height: 26px; border: 0; border-radius: 5px; background: none; color: #9aa4cb; cursor: pointer; }
.ic-users-table td.ic-edit button:hover { background: #2a3560; color: #fff; }
/* The door phone user form (doorUserForm.tsx). */
.du-box { width: min(560px, 94vw); max-height: 90vh; overflow: auto; color: #e3e8f8; }
.du-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 14px; margin: 4px 0 10px; }
.du-grid > label, .du-grid > fieldset { display: flex; flex-direction: column; gap: 4px; font-size: 12px; color: #9aa4cb; }
.du-grid > fieldset { grid-column: 1 / -1; flex-direction: row; flex-wrap: wrap; align-items: center; gap: 6px 14px; margin: 0; padding: 8px 10px; border: 1px solid #2a3560; border-radius: 6px; }
.du-grid legend { padding: 0 4px; font-size: 12px; color: #9aa4cb; }
.du-grid input:not([type="checkbox"]), .du-grid select { padding: 6px 8px; border: 1px solid #34407a; border-radius: 5px; background: #0d1530; color: #e3e8f8; font-size: 13px; }
.du-grid .du-check, .du-grid > label.du-check { flex-direction: row; align-items: center; gap: 6px; color: #e3e8f8; font-size: 12.5px; }
.du-note { margin: 0 0 10px; font-size: 11.5px; color: #8f9ac4; }
.du-grid input[aria-invalid="true"] { border-color: #f0525a; }
.du-result { display: flex; flex-direction: column; gap: 3px; margin: 0 0 8px; padding: 8px 10px; border-radius: 6px; font-size: 12.5px; line-height: 1.4; }
.du-result b { font-weight: 600; }
.du-result.ok { background: rgba(95, 211, 138, .12); color: #5fd38a; }
.du-result.bad { background: rgba(240, 82, 90, .12); border-left: 3px solid #f0525a; color: #ffb3ad; }
.du-result.bad b { color: #ff8a7a; }
.du-result span { color: #e3e8f8; }
.du-actions { display: flex; align-items: center; justify-content: flex-end; gap: 8px; }
.du-why { margin-right: auto; font-size: 12px; color: #9aa4cb; }
.du-actions button { padding: 6px 14px; border-radius: 5px; font-size: 12.5px; cursor: pointer; }
.du-cancel { border: 1px solid #34407a; background: none; color: #cfd6f2; }
.du-save { border: 0; background: var(--accent); color: #fff; font-weight: 600; }
.du-save:disabled { opacity: .45; cursor: default; }
@media (max-width: 560px) { .du-grid { grid-template-columns: 1fr; } }
.ic-photo img, .door-call-photo { display: block; width: 52px; height: 39px; object-fit: cover; border-radius: 4px; background: var(--panel-2); }
.ic-thumb { display: block; width: 52px; border-radius: 4px; }
.ic-thumb:hover { outline: 2px solid var(--accent); outline-offset: 1px; }
.ic-thumb.from-door { display: grid; place-items: center; width: 52px; height: 39px; color: #9aa4cb; background: var(--panel-2); cursor: zoom-in; }
.ic-thumb.from-door > * { grid-area: 1 / 1; }
.ic-thumb.from-door:hover { color: #eef1fa; }
.ic-peek-note { position: absolute; inset: 0; display: grid; place-items: center; }
.ic-pin { display: inline-flex; align-items: center; gap: 4px; margin-left: 8px; }
.ic-pin .mono { font-family: ui-monospace, SFMono-Regular, monospace; font-size: 12px; letter-spacing: .06em; }
.ic-pin-error { font-size: 11px; color: #ff8f8f; }
.ic-tools { display: flex; align-items: center; gap: 8px 16px; flex-wrap: wrap; }
.ic-tools .ic-panels { flex: 1 1 auto; }
/* Unmask passcodes: an iOS-style on/off switch at the row's right end (CJ 2026-11-07). */
.ic-unmask { position: relative; display: inline-flex; align-items: center; gap: 8px; margin-left: auto; font-size: 12px; color: #c9d0ea; cursor: pointer; user-select: none; }
.ic-unmask input { position: absolute; width: 1px; height: 1px; opacity: 0; margin: 0; }
/* A slim switch, Atlas blue when on (the tabs' underline; CJ 2026-11-07). */
.ic-switch { flex: none; position: relative; width: 26px; height: 14px; border-radius: 7px; background: #3a4672; transition: background .18s; }
.ic-switch::after { content: ''; position: absolute; top: 2px; left: 2px; width: 10px; height: 10px; border-radius: 50%; background: #e6e9f5; box-shadow: 0 1px 2px rgba(0, 0, 0, .35); transition: left .18s; }
.ic-unmask input:checked + .ic-switch { background: #3b82f6; }
.ic-unmask input:checked + .ic-switch::after { left: 14px; background: #fff; }
.ic-unmask input:focus-visible + .ic-switch { outline: 2px solid var(--accent); outline-offset: 2px; }
.ic-unmask input:disabled + .ic-switch { opacity: .6; }
@media (prefers-reduced-motion: reduce) { .ic-switch, .ic-switch::after { transition: none; } }
/* ── CCTV tab: the camera list beside the wall (cctvView.tsx) ── */
.iot.cctv { grid-template-columns: max-content minmax(0, 1fr); }
.iot-cats.cctv-list { padding: 0; gap: 0; overflow: hidden; }
.cctv-list-head { display: flex; align-items: center; gap: 6px; padding: 12px 10px 10px; border-bottom: 1px solid #2c3963; }
.cctv-list-head h2 { margin: 0; font-size: 15px; font-weight: 600; color: #eef1fa; }
.cctv-all { margin-left: auto; }
.cctv-n { flex: none; font-size: 12px; font-weight: 600; color: #5fd38a; font-variant-numeric: tabular-nums; }
.cctv-n.bad { color: #f0525a; }
.cctv-scroll { flex: 1; min-height: 0; overflow-y: auto; scrollbar-gutter: stable; padding: 6px 8px 10px; }
/* These invisible rows share the real rows' geometry, but occupy no height or tab stops. */
.cctv-list-size { display: grid; height: 0; overflow: hidden; visibility: hidden; pointer-events: none; }
.cctv-list-size > div { grid-area: 1 / 1; }
.cctv-size-check { flex: none; width: 13px; height: 13px; }
.cctv-none { padding: 12px 6px; font-size: 12.5px; color: #8f9ac4; }
.cctv-floor, .cctv-size-floor { display: flex; align-items: center; gap: 6px; padding: 2px 6px; border-radius: 6px; }
.cctv-floor:hover, .cctv-cam:hover { background: #2a3560; }
.cctv-floor-name, .cctv-size-floor-name { flex: 1; min-width: 0; display: inline-flex; align-items: center; gap: 4px; padding: 4px 0; border: 0; background: none; color: #eef1fa; font: inherit; font-size: 13px; font-weight: 600; text-align: left; white-space: nowrap; cursor: pointer; }
.cctv-floor-name svg, .cctv-size-floor-name svg { flex: none; color: #8f9ac4; }
.cctv-cam, .cctv-size-cam { display: flex; align-items: center; gap: 6px; padding: 0 6px 0 24px; border-radius: 6px; }
.cctv-cam.on { background: #2b4a7a; }
.cctv-cam button, .cctv-size-label { flex: 1; min-width: 0; display: inline-flex; align-items: center; gap: 6px; padding: 4px 0; border: 0; background: none; color: #e3e8f8; font: inherit; font-size: 12.5px; text-align: left; cursor: pointer; }
.cctv-cam button span, .cctv-size-label span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cctv-cam button span.none, .cctv-size-label span.none { font-style: italic; color: #8f9ac4; }
.cctv-list input[type='checkbox'] { flex: none; width: 13px; height: 13px; margin: 0; accent-color: #4f8cff; cursor: pointer; }
.iot-wall-area > .muted-cell { padding: 24px 20px; font-size: 13px; color: #9aa4cb; }
.cctv-source { margin: 0; padding: 8px 14px 10px; border: 0; border-bottom: 1px solid #2c3963; display: flex; flex-direction: column; gap: 4px; min-width: 0; contain: inline-size; }
.cctv-source legend { padding: 8px 0 2px; font-size: 11px; font-weight: 600; letter-spacing: .03em; color: #8f9ac4; }
.cctv-source > div { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; min-width: 0; }
.cctv-source label { flex: 0 1 auto; min-width: 0; display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; color: #e3e8f8; cursor: pointer; }
.cctv-source label.off { color: #8f9ac4; cursor: default; }
.cctv-source label span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cctv-source input[type='radio'] { flex: none; margin: 0; accent-color: #4f8cff; cursor: inherit; }
.cctv-source a { flex: none; display: inline-flex; color: #8f9ac4; }
.cctv-source a:hover { color: #eef1fa; }
.cctv-source small { flex-basis: 100%; padding-left: 20px; font-size: 11px; color: #f2b23c; }
.cctv-source small.via { color: #8f9ac4; }
.cctv-source button { margin: 2px 0 0 20px; padding: 3px 8px; border: 1px solid #3a4a80; border-radius: 6px; background: #26335f; color: #e3e8f8; font: inherit; font-size: 11.5px; cursor: pointer; }
.cctv-source button:hover:not(:disabled) { background: #31427a; }
.cctv-source button:disabled { opacity: .6; cursor: default; }

/* Web access in a device's panel (tunnelSwitch.tsx) */
.tunnel-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.tunnel-row a { color: var(--accent); display: inline-flex; align-items: center; gap: 4px; font-size: 12px; }
.tunnel-plain { font-size: 12px; }
.tunnel-row select { background: var(--panel-2, transparent); color: inherit; border: 1px solid var(--line, #33415c); border-radius: 6px; padding: 3px 6px; font-size: 12px; }
.tunnel-open { margin-bottom: 10px; }
.tunnel-other { margin-top: 6px; justify-content: flex-start; }
.tunnel-other input { width: 84px; background: var(--panel-2, transparent); color: inherit; border: 1px solid var(--line, #33415c); border-radius: 6px; padding: 3px 6px; font-size: 12px; }
.tunnel-switch { position: relative; width: 34px; height: 20px; flex: none; padding: 0; border: 0; border-radius: 10px; background: var(--line, #33415c); cursor: pointer; transition: background .15s; }
.tunnel-switch span { position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: transform .15s; }
.tunnel-switch.on { background: var(--accent); }
.tunnel-switch.on span { transform: translateX(14px); }
.tunnel-switch:disabled { opacity: .55; cursor: wait; }
.tunnel-note { margin: 6px 0 0; font-size: 11px; color: var(--muted); }
.tunnel-keep { display: inline-flex; align-items: center; gap: 6px; margin-top: 6px; font-size: 12px; cursor: pointer; }
.tunnel-keep input { margin: 0; }
.tunnel-error { margin: 6px 0 0; font-size: 11px; color: #ffb3a8; }

/* A camera's model in 3D (cameraTools.ts): hovering it shows its pin's label, and while one is
   being relocated the pins let presses through to it. */
/* A camera's icon hangs under its model (--cam-under), which it would otherwise cover. */
.mv3d-pin .mv-dev { translate: 0 var(--cam-under, 0); }
.mv3d-pin.cam3d-hover .mv-label { display: flex; }
.cam3d-relocating .mv3d-pin .mv-dev { pointer-events: none; }
canvas.cam3d-moving { cursor: grabbing; }
.cam3d-hint { position: absolute; left: 50%; bottom: 68px; transform: translateX(-50%); z-index: 6; padding: 7px 13px; border-radius: 8px;
  background: rgba(15, 21, 42, .94); color: #eef1fa; border: 1px solid rgba(76, 195, 138, .55); font-size: 12px; white-space: nowrap;
  box-shadow: 0 4px 14px rgba(5, 10, 25, .45); pointer-events: none; }

/* A camera's linked devices and the video of an access (cameraLinksPanel.tsx). */
.link-row { display: flex; align-items: center; gap: 6px; margin-bottom: 4px; }
.link-open { flex: 1; min-width: 0; display: flex; justify-content: space-between; gap: 8px; align-items: baseline; padding: 5px 8px; border: 1px solid var(--line); border-radius: 6px; background: none; color: inherit; font: inherit; font-size: 12px; text-align: left; cursor: pointer; }
.link-open:hover:not(:disabled) { border-color: var(--muted); }
.link-open b { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.link-open span { color: var(--muted); font-size: 11px; white-space: nowrap; }
.link-drop { display: grid; place-items: center; width: 22px; height: 22px; border: 0; border-radius: 5px; background: none; color: var(--muted); cursor: pointer; }
.link-drop:hover { color: inherit; background: var(--line); }
.link-add { width: 100%; margin-top: 2px; padding: 5px 6px; border: 1px solid var(--line); border-radius: 6px; background: none; color: var(--muted); font: inherit; font-size: 12px; }
.sh.link-clips { margin-top: 12px; }
.clip-line { display: flex; gap: 7px; width: 100%; padding: 5px 2px; border: 0; border-top: 1px solid var(--line); background: none; color: inherit; font: inherit; font-size: 12px; text-align: left; cursor: pointer; }
.clip-line:disabled { cursor: default; color: var(--muted); }
.clip-line svg { flex: none; margin-top: 2px; }
.clip-line b { display: block; font-weight: 600; }
.clip-line em { display: block; font-style: normal; font-size: 10.5px; color: var(--muted); }
.clip-play { display: inline-flex; align-items: center; gap: 4px; height: 20px; margin-left: 8px; padding: 0 9px 0 7px; border: 0; border-radius: 10px; background: linear-gradient(135deg, #4f8bff, #8a5cff); color: #fff; font: inherit; font-size: 10.5px; font-weight: 600; letter-spacing: .03em; line-height: 1; vertical-align: 1px; white-space: nowrap; cursor: pointer; box-shadow: 0 1px 6px rgba(79, 139, 255, .35); transition: box-shadow .12s ease, filter .12s ease; }
.clip-play svg { flex: none; }
.clip-play:hover { filter: brightness(1.1); box-shadow: 0 2px 12px rgba(122, 108, 255, .55); }
.clip-play:active { box-shadow: 0 1px 4px rgba(79, 139, 255, .35); }
.clip-play:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.clip-pending, .clip-pending:hover { background: #34436f; color: #dce5ff; cursor: default; box-shadow: none; filter: none; }
.clip-pending svg { animation: clip-pending-spin 1s linear infinite; }
@keyframes clip-pending-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .clip-pending svg { animation: none; } }
.clip-queued svg, .clip-none svg { animation: none; }
.clip-queued, .clip-queued:hover { background: #3d3a24; color: #f1e3a8; }
.clip-none, .clip-none:hover { background: none; color: var(--muted); box-shadow: inset 0 0 0 1px var(--line); }
.clip-view { position: fixed; inset: 0; z-index: 60; display: grid; place-items: center; background: rgba(5, 10, 24, .72); }
.clip-box { width: min(760px, 92vw); padding: 12px; border: 1px solid var(--line); border-radius: 10px; background: #111a33; }
.clip-box video { display: block; width: 100%; max-height: 72vh; border-radius: 6px; background: #000; }
.clip-head { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; font-size: 13px; }
.clip-head span { flex: 1; color: var(--muted); font-size: 12px; }
.clip-head button { display: grid; place-items: center; width: 24px; height: 24px; border: 0; border-radius: 5px; background: none; color: inherit; cursor: pointer; }

/* A measure in the side panel's Air quality section: pressing it opens its last day. */
.kv.air-line { width: 100%; border: 0; background: none; color: inherit; font-family: inherit; text-align: left; cursor: pointer; }
.kv.air-line.outside b { color: var(--bad); }
.demo-video { aspect-ratio: 16 / 9; background: #000; border-radius: 6px; overflow: hidden; }

/* The Sun panel on the Twin's Building view (sunPanel.tsx). */
.sunp { position: absolute; left: 12px; top: 12px; z-index: 6; width: 340px; max-height: calc(100% - 96px); overflow-y: auto; display: flex; flex-direction: column; gap: 8px; padding: 10px 12px 11px;
  border-radius: 10px; border: 1px solid #34406b; background: rgba(27, 35, 64, .94); color: #c9d1ef; font-size: 12px; box-shadow: 0 8px 24px rgba(0,0,0,.35); }
.sunp button { border: 1px solid #3a4778; border-radius: 6px; background: #232e58; color: #c9d1ef; font-size: 12px; padding: 3px 9px; }
.sunp button:hover { background: #2a3560; color: #fff; }
.sunp button.on { background: #3b82f6; border-color: #3b82f6; color: #fff; }
.sunp header { display: flex; align-items: center; gap: 6px; min-width: 0; color: var(--text); }
.sunp header svg { flex: none; color: #ffc65c; }
.sunp header span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted); }
.sunp header button { flex: none; display: inline-flex; padding: 2px; border: 0; background: transparent; color: var(--muted); }
.sunp-when { display: flex; align-items: center; gap: 6px; }
.sunp-when input { flex: 1; min-width: 0; padding: 3px 6px; border: 1px solid #3a4778; border-radius: 6px; background: #232e58; color: var(--text); font: inherit; color-scheme: dark; }
.sunp-when b { flex: none; min-width: 66px; text-align: right; color: var(--text); font-size: 14px; font-variant-numeric: tabular-nums; }
.sunp-when button { flex: none; display: inline-flex; align-items: center; }
.sunp-slider { position: relative; height: 20px; }
.sunp-slider::before { content: ''; position: absolute; left: 0; right: 0; top: 8px; height: 4px; border-radius: 2px; background: #2a3560; }
.sunp-daylight { position: absolute; top: 8px; height: 4px; border-radius: 2px; background: #ffc65c; }
.sunp-slider input { position: absolute; inset: 0; width: 100%; margin: 0; background: transparent; accent-color: #ffc65c; }
.sunp-times { display: flex; justify-content: space-between; color: var(--muted); font-size: 11px; font-variant-numeric: tabular-nums; }
.sunp-stats { display: grid; grid-template-columns: 1fr 1fr 1.4fr; gap: 6px; margin: 2px 0 0; }
.sunp-stats dt { color: var(--muted); font-size: 11px; }
.sunp-stats dd { margin: 0; color: var(--text); font-size: 17px; font-weight: 600; font-variant-numeric: tabular-nums; }
.sunp-stats small { color: var(--muted); font-size: 11px; font-weight: 400; }
.sunp-line { margin: 0; line-height: 1.4; }
.sunp-wait { margin: 0; color: var(--muted); }
.sunp-chart { margin: 0; display: flex; flex-direction: column; gap: 5px; }
.sunp-chart figcaption { display: flex; justify-content: space-between; gap: 8px; color: var(--muted); font-size: 11px; font-variant-numeric: tabular-nums; }
.sunp-chart figcaption b { color: var(--text); font-weight: 600; }
.sunp-grid { display: grid; grid-template-columns: 30px 1fr 42px 42px; gap: 2px 6px; align-items: center; }
.sunp-head { color: var(--muted); font-size: 10px; }
.sunp-axis { display: flex; justify-content: space-between; }
.sunp-axis i { font-style: normal; }
.sunp-num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.sunp-row { display: contents; }
.sunp-row b { color: var(--text); font-weight: 600; font-size: 11px; }
.sunp-cells { position: relative; display: flex; gap: 1px; height: 13px; }
.sunp-cells i { flex: 1; min-width: 0; border-radius: 1px; }
.sunp-cells i:hover { outline: 1px solid #fff; outline-offset: -1px; }
.sunp-cells u { position: absolute; top: -1px; bottom: -1px; width: 1px; background: #fff; pointer-events: none; }
.sunp-scale { display: flex; align-items: center; gap: 6px; color: var(--muted); font-size: 10px; }
.sunp-scale i { flex: 1; height: 6px; border-radius: 3px; }
.sunp-notes { display: flex; flex-direction: column; gap: 6px; }
.sunp-notes > button { display: inline-flex; align-items: center; gap: 4px; align-self: flex-start; padding: 2px 0; border: 0; background: transparent; color: var(--muted); }
.sunp-notes > button svg { transform: rotate(-90deg); transition: transform .12s; }
.sunp-notes.open > button svg { transform: none; }
.sunp-notes ul { margin: 0; padding-left: 15px; color: var(--muted); font-size: 11px; line-height: 1.4; }
.sunp-north { display: grid; grid-template-columns: 1fr 60px; gap: 2px 6px; align-items: center; font-size: 11px; }
.sunp-north span { grid-column: 1 / -1; display: inline-flex; align-items: center; gap: 4px; color: var(--muted); }
.sunp-north input { margin: 0; accent-color: #ffc65c; }
.sunp-north b { text-align: right; color: var(--text); font-variant-numeric: tabular-nums; }
.sunp-save, .sunp-place { display: flex; gap: 6px; }
.sunp-place input { flex: 1; min-width: 0; padding: 3px 6px; border: 1px solid #3a4778; border-radius: 6px; background: #232e58; color: var(--text); font: inherit; }
.sunp-error { margin: 0; color: var(--bad); font-size: 11px; }
/* An NVR's recorder sections (recorderPanel.tsx) */
.rec-findings { list-style: none; margin: 0 0 6px; padding: 0; display: flex; flex-direction: column; gap: 3px; font-size: 11.5px; }
.rec-findings li { display: flex; gap: 5px; align-items: flex-start; }
.rec-findings li svg { flex: none; margin-top: 2px; }
.rec-findings li.fault { color: #ffb3a8; } .rec-findings li.check { color: #f7e1a0; }
.rec-bad { color: var(--bad); }
.rec-sub { font-size: 11px; font-weight: 700; color: var(--muted); margin: 8px 0 3px; text-transform: uppercase; letter-spacing: .04em; }
.rec-line { font-size: 11px; margin: 1px 0 4px; }
.rec-array { margin-top: 6px; }
.rec-meter { height: 6px; border-radius: 3px; background: var(--panel-2); overflow: hidden; margin: 2px 0; }
.rec-meter i { display: block; height: 100%; background: var(--ok); }
.rec-meter i.full { background: var(--warn); }
.rec-swatch { display: inline-flex; align-items: center; gap: 5px; }
.rec-swatch::before { content: ''; width: 8px; height: 8px; border-radius: 2px; background: currentColor; }
.rec-swatch.a0, .rec-bay.a0, .rec-legend i.a0 { color: #6fa8ff; } .rec-swatch.a1, .rec-bay.a1, .rec-legend i.a1 { color: #b48cff; }
.rec-swatch.a2, .rec-bay.a2, .rec-legend i.a2 { color: #5fd3c6; } .rec-swatch.a3, .rec-bay.a3, .rec-legend i.a3 { color: #ffb86b; }
.rec-bays { display: grid; grid-template-columns: repeat(8, 1fr); gap: 3px; }
.rec-bay { font-size: 10.5px; text-align: center; padding: 3px 0; border-radius: 3px; border: 1px solid currentColor; font-variant-numeric: tabular-nums; }
.rec-bay.spare, .rec-legend i.spare { color: #7ed69a; }
.rec-bay.empty, .rec-legend i.empty { color: #5a6488; border-style: dashed; }
.rec-bay.free { color: var(--text); } .rec-bay.unlisted { color: #3a4470; border-style: dotted; }
.rec-bay.bad { background: rgba(255, 110, 90, .25); }
.rec-legend { display: flex; flex-wrap: wrap; gap: 4px 10px; font-size: 10.5px; margin-top: 4px; }
.rec-legend span { display: inline-flex; align-items: center; gap: 4px; }
.rec-legend i { width: 8px; height: 8px; border-radius: 2px; border: 1px solid currentColor; background: currentColor; }
.rec-legend i.empty { background: none; border-style: dashed; }
.rec-nic { margin-top: 4px; padding-top: 4px; border-top: 1px dashed var(--line); }
.rec-groups .kv { align-items: flex-start; }
.rec-group-text { color: var(--text) !important; font-size: 11.5px; }
.rec-toggle { display: flex; align-items: center; gap: 4px; margin-top: 8px; padding: 0; border: 0; background: none; color: var(--accent); font: inherit; font-size: 12px; cursor: pointer; }
.rec-cams { margin-top: 4px; max-height: 420px; overflow: auto; }
.rec-cam { display: grid; grid-template-columns: 1fr auto auto; gap: 8px; width: 100%; padding: 3px 2px; border: 0; border-bottom: 1px solid var(--line); background: none; color: inherit; font: inherit; font-size: 11.5px; text-align: left; cursor: pointer; }
.rec-cam:hover { background: var(--panel-2); }
.rec-cam.flag .rec-cam-state { color: var(--bad); }
.rec-cam-ip { color: var(--muted); font-variant-numeric: tabular-nums; }
.rec-cam-detail { padding: 4px 6px 8px; background: rgba(255, 255, 255, .03); border-bottom: 1px solid var(--line); }
.rec-week { display: flex; flex-direction: column; gap: 2px; margin: 4px 0 2px; }
.rec-week-row { display: grid; grid-template-columns: 56px 1fr; gap: 6px; align-items: center; font-size: 10.5px; color: var(--muted); }
.rec-day { position: relative; height: 8px; border-radius: 2px; background: var(--panel-2); }
.rec-day i { position: absolute; top: 0; bottom: 0; border-radius: 2px; background: #8fa2d8; }
.rec-day i.k-motion { background: #6fa8ff; } .rec-day i.k-timed { background: #7ed69a; } .rec-day i.k-alarm { background: #ffb86b; }
.rec-day i.k-motion-and-alarm, .rec-day i.k-motion-or-alarm { background: #b48cff; } .rec-day i.k-events { background: #5fd3c6; }
.rec-color { display: inline-block; width: 10px; height: 10px; margin-left: 6px; vertical-align: -1px; border: 1px solid var(--line); border-radius: 2px; }
.rec-cam-detail .kv b, .rec-groups .kv b, .rec-nic .kv b { word-break: normal; overflow-wrap: anywhere; }
.rec-cam-detail .kv span { flex: none; }
.rec-day i.k-armed { background: #f2c94c; }
.rec-groups .kv b { flex: none; white-space: nowrap; }
.clip-play + .clip-play { margin-left: 4px; }
/* A camera's linked doors over its picture and live video (cameraDoors.tsx): down its right side, pressed and held to open as
   on the Map; the door green or red as its board is online or offline, all green with a white door once opened, dim when
   Atlas cannot open it; the door's name, its board and what the hold is doing in a tip to its left. On a wall tile they take the top corner, and the tile's picture button (shown on hover) drops under
   them: 26px and a 7px gap a door. */
.cam-doors { position: absolute; right: 12px; top: 12px; z-index: 4; display: flex; flex-direction: column; gap: 9px; pointer-events: none; }
.cam-doors.tile { right: 5px; top: 5px; gap: 7px; }
.wall-pic:has(.cam-doors.tile > .cam-door:nth-child(1)) .cam-sync { top: 38px; }
.wall-pic:has(.cam-doors.tile > .cam-door:nth-child(2)) .cam-sync { top: 71px; }
.wall-pic:has(.cam-doors.tile > .cam-door:nth-child(3)) .cam-sync { top: 104px; }
.wall-pic:has(.cam-doors.tile > .cam-door:nth-child(4)) .cam-sync { top: 137px; }
:fullscreen .cam-doors:not(.tile) { right: 16px; top: 16px; }
/* The same button as the tile's picture button (.cam-sync): on a tile, the exact same size, colour and icon. */
.cam-door { position: relative; display: grid; place-items: center; width: 34px; height: 34px; padding: 0; border: 0;
  border-radius: 50%; background: rgba(15, 21, 48, .78); color: #eef1fa; cursor: pointer; pointer-events: auto; touch-action: none;
  user-select: none; -webkit-user-select: none; transition: background .12s, opacity .12s; }
.cam-doors.tile .cam-door { width: 26px; height: 26px; }
.cam-door.holdable:hover, .cam-door.hold-holding { background: #2d4d9a; }
.cam-door.off { opacity: .5; cursor: default; }
.cam-door.off:hover { opacity: .85; }
/* The door itself green while its board is online, red while offline (cloudHealth); white when not known. */
.cam-door.board-online { color: var(--ok); }
.cam-door.board-offline { color: var(--bad); }
/* Opened (held the whole time, being sent, confirming, then for its unlock time): all green, the door white, hover too. */
.cam-door:is(.open, .hold-opening, .hold-confirming, .hold-opened),
.cam-door:is(.open, .hold-opening, .hold-confirming, .hold-opened):hover { background: var(--ok); color: #fff; }
.cam-door .door-hold-ring { left: -5px; top: -5px; width: calc(100% + 10px); height: calc(100% + 10px); }
/* An empty ring still draws its round end as a dot: none until a press starts it. */
.cam-door.hold-idle .door-hold-ring, .cam-door.hold-short .door-hold-ring { visibility: hidden; }
.cam-door-tip { position: absolute; right: calc(100% + 9px); top: 50%; transform: translateY(-50%); display: none; flex-direction: column; gap: 1px;
  width: max-content; max-width: 260px; padding: 4px 9px; border-radius: 6px; background: rgba(15, 21, 42, .92); color: #eef1fa; font-size: 11.5px;
  font-weight: 400; line-height: 1.35; text-align: left; pointer-events: none; }
.cam-door-tip b { font-weight: 600; }
.cam-door-tip span { color: #b8c0e0; }
.cam-door-tip i { font-style: normal; }
.cam-door-tip i.board-online { color: var(--ok); }
.cam-door-tip i.board-offline { color: var(--bad); }
.cam-door.hold-failed .cam-door-tip span, .cam-door.hold-short .cam-door-tip span { color: #ffb4b4; }
.cam-doors.tile .cam-door-tip { max-width: 150px; padding: 3px 7px; font-size: 10.5px; }
.cam-door:hover .cam-door-tip, .cam-door:focus-visible .cam-door-tip, .cam-door:not(.hold-idle) .cam-door-tip { display: flex; }
/* Access Control's Events as one list of every access (accessView.tsx): the Intercom events switch above it, and with it on
   a narrow first column saying which system each access came from, a door for access control, a phone for an intercom. */
.ac-tools { padding: 8px 12px 6px; }
.brivo-table .ac-system { width: 22px; padding-right: 0; text-align: center; color: #7f8ab3; }
.brivo-table .ac-system svg { display: block; margin: 0 auto; }
.brivo-table tr.ac-intercom .ac-system { color: #a78bfa; }
.ac-ic-note { margin-left: -6px; font-size: 11.5px; color: #8f9ac4; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 50%; }
/* An intercom access's photo (photoPill.tsx): the video pill's shape (.clip-play) in its own colour; the picture opens on hover or a click. */
.photo-pill { display: inline-flex; align-items: center; gap: 4px; height: 20px; margin-left: 8px; padding: 0 9px 0 7px; border: 0; border-radius: 10px;
  background: linear-gradient(135deg, #0ea5a4, #22b8e6); color: #fff; font: inherit; font-size: 10.5px; font-weight: 600; letter-spacing: .03em; line-height: 1;
  vertical-align: 1px; white-space: nowrap; cursor: zoom-in; box-shadow: 0 1px 6px rgba(14, 165, 164, .35); transition: box-shadow .12s ease, filter .12s ease; }
.photo-pill svg { flex: none; }
.photo-pill:hover, .photo-pill.on { filter: brightness(1.1); box-shadow: 0 2px 12px rgba(34, 184, 230, .55); }
.ac-tools .ic-unmask.ac-pins { margin-left: 14px; }

/* ── Projects: a group's campus in 3D (campusView.tsx) ── */
.bp.has-campus { overflow: hidden; display: flex; flex-direction: column; padding-bottom: 18px; }
.bp.has-campus .bp-inner { max-width: none; width: 100%; flex: 1; min-height: 0; display: flex; flex-direction: column; }
.campus { flex: 1; min-height: 420px; display: grid; grid-template-columns: minmax(0, 1fr) 248px; gap: 14px; margin-top: 14px; }
.campus-scene { position: relative; min-height: 0; border-radius: 6px; overflow: hidden; border: 1px solid #2c3866; outline: none;
  background: radial-gradient(130% 95% at 50% 0%, #4a6196 0%, #2a3864 52%, #1b2340 100%); }
.campus-scene:focus-visible { box-shadow: 0 0 0 2px #3b82f6; }
.campus-canvas { position: absolute; inset: 0; width: 100% !important; height: 100% !important; display: block; cursor: grab; touch-action: none; }
.campus-canvas:active { cursor: grabbing; }
.campus-scene.can-open .campus-canvas { cursor: pointer; }
.campus-labels { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.campus-label { position: absolute; left: 0; top: 0; font-size: 10.5px; font-weight: 600; line-height: 1; letter-spacing: .04em; padding: 4px 7px;
  border-radius: 10px; background: rgba(12, 18, 40, .74); color: #eef2fc; border: 1px solid rgba(255, 255, 255, .2); white-space: nowrap; }
.campus-label.future { color: #b3bbd9; background: rgba(12, 18, 40, .55); border-color: rgba(255, 255, 255, .12); }
.campus-label.on { background: #3b82f6; border-color: #93c5fd; color: #fff; z-index: 1; }
.campus-stems { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.campus-stem line { stroke: rgba(12, 18, 40, .78); stroke-width: 1.5; }
.campus-stem circle { fill: #eef2fc; stroke: rgba(12, 18, 40, .85); stroke-width: 1.2; }
.campus-stem.future line { stroke: rgba(12, 18, 40, .55); }
.campus-stem.future circle { fill: #b3bbd9; }
.campus-label.context { color: #c3c9de; background: rgba(12, 18, 40, .5); border-color: rgba(255, 255, 255, .1); font-weight: 500; }
.campus-stem.context line { stroke: rgba(12, 18, 40, .45); }
.campus-stem.context circle { fill: #9aa3c2; }
.campus-stem.on line { stroke: #3b82f6; stroke-width: 2; }
.campus-stem.on circle { fill: #3b82f6; stroke: #dbeafe; }
.campus-tip { position: absolute; left: 0; top: 0; z-index: 3; pointer-events: none; display: flex; flex-direction: column; gap: 3px; min-width: 150px;
  background: rgba(13, 19, 42, .93); border: 1px solid #3a4677; border-radius: 6px; padding: 8px 10px; box-shadow: 0 6px 20px rgba(0, 0, 0, .35); }
.campus-tip b { color: #fff; font-size: 12.5px; font-weight: 600; }
.campus-tip em { font-style: normal; color: #93c5fd; font-size: 11px; }
.campus-state { font-size: 11px; color: #8f9ac4; }
.campus-state.active { color: #86efac; }
.campus-state.future { color: #c7d2fe; }
.campus-loading { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); z-index: 2; width: min(380px, 80%); display: flex; flex-direction: column;
  align-items: center; gap: 10px; text-align: center; font-size: 12.5px; color: #dfe5f7; background: rgba(13, 19, 42, .88); border: 1px solid #33407a;
  border-radius: 8px; padding: 18px 22px; }
.campus-loading > i { display: block; width: 100%; height: 4px; border-radius: 2px; background: #2b3767; overflow: hidden; }
.campus-loading > i > i { display: block; height: 100%; background: #3b82f6; transition: width .2s; }
.campus-loading small { color: #8f9ac4; font-size: 11px; }
.campus-loading.error { color: #fecaca; }
.campus-tools { position: absolute; right: 12px; top: 12px; z-index: 2; display: flex; gap: 6px; }
.campus-tools button { display: inline-flex; align-items: center; justify-content: center; gap: 5px; height: 30px; min-width: 30px; padding: 0 9px;
  background: rgba(13, 19, 42, .82); border: 1px solid #3a4677; color: #e3e8f8; border-radius: 5px; font-size: 12px; }
.campus-tools button:hover:not(:disabled) { border-color: #3b82f6; }
.campus-tools button:disabled { opacity: .5; }
.campus-help { position: absolute; left: 12px; bottom: 10px; margin: 0; font-size: 11px; color: rgba(227, 232, 248, .8); background: rgba(13, 19, 42, .55);
  padding: 3px 8px; border-radius: 4px; pointer-events: none; }
.campus-list { background: #212b4d; border-radius: 6px; padding: 12px 10px; overflow: auto; min-height: 0; }
.campus-list h2 { margin: 0 4px 8px; font-size: 11px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: #8f9ac4; }
.campus-list ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.campus-item { width: 100%; display: flex; align-items: center; gap: 9px; text-align: left; padding: 7px 8px; border-radius: 5px; background: transparent;
  border: 1px solid transparent; color: #e3e8f8; }
.campus-item > i { width: 8px; height: 8px; border-radius: 50%; background: #5b6690; flex: none; }
.campus-item.active > i { background: #4ade80; box-shadow: 0 0 0 3px rgba(74, 222, 128, .16); }
.campus-item.future > i { background: #a5b4fc; }
.campus-item > span { display: flex; flex-direction: column; min-width: 0; }
.campus-item b { font-weight: 500; font-size: 12.5px; }
.campus-item small { font-size: 11px; color: #8f9ac4; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.campus-item.context b { color: #b8c0dd; }
.campus-item:hover, .campus-item.lit { background: #2a3766; border-color: #3b82f6; }
.campus-item[aria-disabled='true'] { cursor: default; }
.campus-item[aria-disabled='true']:hover, .campus-item[aria-disabled='true'].lit { border-color: #46518a; }
.campus-item:focus-visible { outline: 2px solid #3b82f6; outline-offset: 1px; }
.campus-none { color: #8f9ac4; font-size: 11.5px; margin: 8px 4px; }
.campus-hold { position: fixed; z-index: 50; pointer-events: none; overflow: hidden; border-radius: 6px; transition: opacity .45s ease; }
.campus-hold img { width: 100%; height: 100%; object-fit: cover; display: block; }
.campus-hold span { position: absolute; left: 50%; bottom: 22px; transform: translateX(-50%); background: rgba(13, 19, 42, .86); color: #fff; font-size: 12.5px;
  padding: 6px 12px; border-radius: 14px; border: 1px solid #3a4677; }
.campus-hold.out { opacity: 0; }
@media (max-width: 860px) {
  .campus { grid-template-columns: 1fr; grid-template-rows: minmax(360px, 1fr) auto; }
  .campus-list { max-height: 220px; }
}
@media (prefers-reduced-motion: reduce) {
  .campus-hold { transition: none; }
}

/* ── Chain of events: Events list (accessView.tsx) ── */
/* The rail: a narrow first column where each visit's accesses are dots in a lane of their own (--lane, its colour --c),
   joined by a line through whatever is listed between them. Each cell draws only its own pieces, so rows of any height
   line up; nothing in it takes a z-index, so the sticky header stays over it. The dot sits level with the row's first line. */
/* --pill-grow: room for a followed dot's step past two digits (accessView.tsx sets it while one is followed). */
.iot .brivo-table th.ac-rail, .iot .brivo-table td.ac-rail { padding: 0; width: calc(var(--lanes, 1) * 12px + 8px + var(--pill-grow, 0px));
  min-width: calc(var(--lanes, 1) * 12px + 8px + var(--pill-grow, 0px)); }
/* The header cell keeps the header's sticky place; the body's cells hold their pieces, drawn past their edges over the row border. */
.iot .brivo-table td.ac-rail { position: relative; overflow: visible; --y: 16px; }
/* With the rail first, the system column is the second: it keeps its icon's width, not the IoT table's second column's. */
.iot .brivo-table td.ac-system { min-width: 0; }
.ac-rail .ac-line { position: absolute; left: calc(9px + var(--lane) * 12px); width: 2px; background: var(--c); border-radius: 1px; }
/* From the border above (-1px covers it) to the dot, from the dot down, or right through. */
.ac-rail .ac-line.full { top: -1px; bottom: 0; }
.ac-rail .ac-line.top { top: -1px; height: calc(var(--y) + 1px); }
.ac-rail .ac-line.bottom { top: var(--y); bottom: 0; }
/* Past a row that is not one of its accesses, a visit's line only passes by: faint and dotted. */
.ac-rail .ac-line.passing { background: none; width: 0; border-left: 2px dotted var(--c); opacity: .45; }
.brivo-table.ac-focus .ac-rail .ac-line.passing.on { opacity: .6; }
.brivo-table.ac-focus .ac-rail .ac-line.passing:not(.on) { opacity: .15; }
.ac-rail .ac-dot { position: absolute; left: calc(10px + var(--lane) * 12px); top: var(--y); transform: translate(-50%, -50%);
  width: 10px; height: 10px; min-width: 10px; padding: 0; border: 2px solid #1b2340; border-radius: 9px; background: var(--c);
  color: #0d1328; font: inherit; font-size: 10px; font-weight: 700; line-height: 1; cursor: pointer; }
.ac-rail .ac-dot::before { content: ''; position: absolute; inset: -5px; border-radius: 50%; }
.ac-rail .ac-dot:hover { box-shadow: 0 0 0 3px color-mix(in srgb, var(--c) 35%, transparent); }
.ac-rail .ac-dot:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
/* Hollow, so they do not read as joined: past the lanes a visit's dots stand loose, with no line, and the only access of
   its visit (a lone one, whose credential has other visits) has none to draw. */
.ac-rail .ac-dot.loose, .ac-rail .ac-dot.lone { background: #1b2340; border-color: var(--c); }
/* Followed: its dots show their step, filled whatever they were, the pill growing right from where the dot stood. Two
   digits stay inside the rail's lanes; past that the rail grows by --pill-grow, so a pill in the rightmost lane ends
   inside the When cell's padding, short of its time. */
.ac-rail .ac-dot.on { left: calc(4px + var(--lane) * 12px); transform: translateY(-50%); width: auto; height: 17px; min-width: 17px; padding: 0 4px;
  border-width: 1px; border-color: #0d1328; background: var(--c); display: inline-grid; place-items: center; }
/* Following a chain: its rows lit in its colour, every other row grayed out, and the rail's other lines and dots with them.
   At once, with no fade: a list of 2000 rows would fade thousands of cells. A grayed row holding an open video is not
   grayed: the clip opens inside its cell, which would take the clip down to the cell's opacity and under the rows after. */
.iot .brivo-table tr.ac-in-chain td { background: color-mix(in srgb, var(--c) 11%, #1b2340); }
.iot .brivo-table tr.ac-in-chain:hover td { background: color-mix(in srgb, var(--c) 19%, #1b2340); }
.iot .brivo-table.ac-focus tbody tr:not(.ac-in-chain):not(:has(.clip-view)) > td:not(.ac-rail) { opacity: .3; }
.brivo-table.ac-focus .ac-rail .ac-line:not(.on), .brivo-table.ac-focus .ac-rail .ac-dot:not(.on) { opacity: .3; }
/* The bar above the list: who is followed, when and where, how they are linked (.ac-chain), then what was refused, which
   accesses, Clear and Investigate journey (.ac-chain-act). It stays on top as the list scrolls, so Clear and Investigate
   journey are there at any depth, with the column headers sticking under it (--ac-bar-h, its height as the page measures
   it). Only the words give way: who and the facts, cut short (their titles hold them whole), share what the line leaves
   with the intercoms' note, each up to its own length, and neither counts when the bar's line breaks. The controls never
   do: a pane too narrow for them and the intercom switches puts the switches on a second line, never cut off, and the
   Intercom events switch stays at the right end of its line. */
.iot .ac-tools { position: sticky; top: 0; z-index: 2; background: #212b4d; }
.iot .brivo-table.ac-chained th { top: var(--ac-bar-h, 0px); }
.ac-chain { display: flex; align-items: center; flex: 1 1 0; max-width: max-content; flex-wrap: nowrap; gap: 10px; min-width: 0; overflow: hidden;
  padding: 3px; margin: -3px; font-size: 12px; color: #c9d0ea; }
.ac-chain-act { flex: none; display: inline-flex; align-items: center; gap: 10px; margin-right: auto; font-size: 12px; color: #c9d0ea; }
.ac-chain + .ac-chain-act { margin-left: -6px; }
.ac-tools .ac-ic-note { flex: 1 1 0; min-width: 0; max-width: max-content; }
.ac-chain-who, .ac-chain-facts, .ac-chain-note, .ac-chain-by { min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ac-chain-dot { flex: none; width: 10px; height: 10px; border-radius: 50%; background: var(--c); box-shadow: 0 0 0 3px color-mix(in srgb, var(--c) 22%, transparent); }
.ac-chain-who { font-weight: 600; color: #eef1fa; }
.ac-chain-facts { font-variant-numeric: tabular-nums; }
.ac-chain-note, .ac-chain-by { font-size: 11.5px; color: #8f9ac4; }
.ac-chain-act .iot-pill { flex: none; min-width: 0; }
.ac-scope { flex: none; display: inline-flex; border: 1px solid #34406b; border-radius: 6px; overflow: hidden; }
.ac-scope button { background: #18203d; border: 0; color: #9aa4cb; font: inherit; font-size: 11.5px; padding: 3px 9px; cursor: pointer; white-space: nowrap; }
.ac-scope button + button { border-left: 1px solid #34406b; }
.ac-scope button:hover { color: #eef1fa; }
.ac-scope button.on { background: #2b4a7a; color: #fff; }
.ac-chain-clear { flex: none; display: inline-grid; place-items: center; width: 22px; height: 22px; padding: 0; border: 1px solid #34406b; border-radius: 50%;
  background: #18203d; color: #9aa4cb; cursor: pointer; }
.ac-chain-clear:hover { color: #eef1fa; border-color: var(--accent); }
.ac-journey { flex: none; display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 11px; border: 1px solid #3b82f6; border-radius: 6px;
  background: #3b82f6; color: #fff; font: inherit; font-size: 12px; font-weight: 600; cursor: pointer; white-space: nowrap; }
.ac-journey:hover:not(:disabled) { background: #4b8ff8; }
.ac-journey:disabled { background: transparent; border-color: #34406b; color: #6f7aa3; cursor: default; }
.ac-scope button:focus-visible, .ac-chain-clear:focus-visible, .ac-journey:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }

/* ── Chain of events: Twin journey (twinJourney.tsx) ── */
/* A door's mark: the numbers of its accesses in a row over it, the one picked amber. On the 2D plan it keeps its size at any
   zoom (--inv) and stands on a stem above the door's pin; in 3D it is a pin's node, already standing over the door. */
.jr-mark { position: absolute; width: 0; height: 0; z-index: 6; transform: scale(var(--inv, 1)); }
.jr-mark.on { z-index: 7; }
.jr-mark-in { position: absolute; left: 0; bottom: 18px; transform: translateX(-50%); display: flex; align-items: center; gap: 2px; padding: 2px;
  border-radius: 999px; background: rgba(15, 21, 42, .92); border: 1px solid #2f7bf6; box-shadow: 0 3px 10px rgba(5, 10, 25, .5); white-space: nowrap; }
.jr-mark-in::after { content: ''; position: absolute; left: 50%; top: 100%; width: 2px; height: 17px; margin-left: -1px; background: #2f7bf6; pointer-events: none; }
.mv3d-pin .jr-mark { left: 0; top: 0; transform: none; pointer-events: auto; }
.mv3d-pin .jr-mark-in { bottom: 0; }
.mv3d-pin .jr-mark-in::after { display: none; }
.jr-n { display: inline-grid; place-items: center; min-width: 22px; height: 22px; padding: 0 5px; border: 0; border-radius: 999px; background: #2f7bf6;
  color: #fff; font: inherit; font-size: 11.5px; font-weight: 700; font-variant-numeric: tabular-nums; line-height: 1; cursor: pointer; }
.jr-n:hover { background: #4b8ff8; }
.jr-n.on { background: #f5b13d; color: #2b1d00; box-shadow: 0 0 0 2px #fff; }
.jr-n:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.jr-more { padding: 0 3px; color: #9aa4cb; font-size: 12px; cursor: default; }
/* The way between doors on the 2D plan, the 3D floor's blue: dashed where no way round the walls was found or after a long gap
   (nobody saw that time); the leg to the access picked amber. */
.jr-legs { position: absolute; left: 0; top: 0; pointer-events: none; }
.jr-legs polyline { fill: none; stroke: #2f7bf6; stroke-opacity: .85; stroke-width: 4; stroke-linejoin: round; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.jr-legs polyline.straight, .jr-legs polyline.long { stroke-dasharray: 7 6; stroke-linecap: butt; }
.jr-legs polyline.on { stroke: #f5b13d; stroke-opacity: 1; }
/* While a journey shows the devices stay as they are (CJ 2026-11-10: not see-through); only the 360 photos step back. */
.mv-canvas.journey .mv-360 { opacity: .35; }
/* Its count on each floor of the floor list. */
.mv-floor-jr { margin-left: 2px; padding: 0 4px; border-radius: 6px; background: #f5b13d; color: #2b1d00; font-size: 10px; font-style: normal; font-weight: 700; }
/* The banner is Pair Devices' (.mv-pairing); a journey that could not be read says so in red. */
.jr-banner.failed { border-color: #f0525a; }
.jr-banner .iot-pill { min-width: 0; margin-left: 6px; }
/* The list, over the canvas's right side below the banner: who, when, how linked, then each access. */
.jr-panel { position: absolute; right: 12px; top: 100px; z-index: 6; display: flex; flex-direction: column; width: 330px; max-width: calc(100% - 24px);
  max-height: calc(100% - 160px); border-radius: 10px; background: rgba(21, 28, 54, .96); border: 1px solid #34406b;
  box-shadow: 0 8px 24px rgba(0, 0, 0, .4); color: #c9d1ef; font-size: 12px; animation: mv-fade .25s ease; }
.jr-head { display: flex; align-items: center; gap: 9px; padding: 10px 10px 6px 12px; }
.jr-head > div { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.jr-who { display: flex; align-items: center; gap: 6px; min-width: 0; }
.jr-head b { min-width: 0; color: var(--text); font-size: 13px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.jr-who .iot-pill { flex: none; min-width: 0; }
/* The journey's count, time and credential: behind the info icon beside the name, a tooltip under the head when it is clicked. */
.jr-head { position: relative; }
.jr-info-btn { flex: none; display: inline-grid; place-items: center; width: 20px; height: 20px; padding: 0; border: 0; border-radius: 50%; background: none; color: #8f9ac4; cursor: pointer; }
.jr-info-btn:hover, .jr-info-btn[aria-expanded="true"] { background: #26315c; color: #fff; }
.jr-info-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.jr-tip { position: absolute; left: 10px; right: 10px; top: calc(100% - 3px); z-index: 12; padding: 10px 0 2px; border: 1px solid #46518a; border-radius: 9px; background: #0f1731;
  box-shadow: 0 12px 30px rgba(0, 0, 0, .55); color: #dfe5f8; font-size: 12px; font-weight: 400; animation: mv-fade .15s ease; }
.jr-tip::before { content: ''; position: absolute; left: calc(var(--jr-tip-x, 70px) - 10px); top: -5px; width: 8px; height: 8px; border-left: 1px solid #46518a; border-top: 1px solid #46518a;
  background: #0f1731; transform: translateX(-50%) rotate(45deg); }
.jr-tip .jr-account { margin: 0 12px 8px; padding: 7px 0 0; border-top: 1px solid #263058; border-radius: 0; background: none; }
@media (prefers-reduced-motion: reduce) { .jr-tip { animation: none; } }
.jr-head small { color: #8f9ac4; font-size: 11px; }
.jr-head small.jr-groups { color: #b9c3e6; font-size: 11.5px; overflow-wrap: anywhere; }
/* A Wi-Fi access point picked during a journey: its clients then, and the way back. */
.jr-back { flex: none; display: inline-grid; place-items: center; width: 26px; height: 26px; padding: 0; border: 1px solid #34406b; border-radius: 6px;
  background: #1c2547; color: #c9d1ef; cursor: pointer; }
.jr-back:hover { color: #fff; border-color: var(--accent); }
.jr-back:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.jr-wifi-count { display: flex; align-items: center; gap: 6px; }
.jr-clients { list-style: none; flex: 1; min-height: 0; margin: 0; padding: 6px 10px 10px; overflow-y: auto; overscroll-behavior: contain; border-top: 1px solid #2c3963; }
.jr-clients li { display: grid; grid-template-columns: 1fr auto; gap: 1px 10px; padding: 6px 4px; border-bottom: 1px solid #232e58; }
.jr-clients li b { min-width: 0; color: var(--text); font-size: 12.5px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.jr-clients li small { grid-column: 1 / -1; color: #8f9ac4; font-size: 11px; overflow-wrap: anywhere; }
.jr-client-on { color: #b9c3e6; font-size: 11.5px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.jr-panel[hidden] { display: none; }
/* The link button beside Share investigation: an icon alone. */
.jr-act.jr-linkbtn { width: 28px; padding: 0; justify-content: center; }
/* Under the accesses: the Wi-Fi devices on two or more access points along the way. */
.jr-moved { margin: 8px 6px 4px; padding: 8px 8px 6px; border-top: 1px solid #2c3963; }
.jr-moved h4 { display: flex; align-items: center; gap: 6px; margin: 0 0 6px; color: #dfe5f7; font-size: 12px; font-weight: 600; }
.jr-moved h4 i { padding: 0 6px; border-radius: 8px; background: #2a3a6e; color: #9fc0ff; font-size: 10.5px; font-style: normal; }
.jr-moved-none { color: #8f9ac4; font-size: 11.5px; }
.jr-moved-row { padding: 6px 0; border-top: 1px solid #232e58; }
.jr-moved-row:first-of-type { border-top: 0; }
.jr-moved-who { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 8px; }
.jr-moved-who b { color: var(--text); font-size: 12.5px; font-weight: 600; font-variant-numeric: tabular-nums; }
.jr-moved-who span { color: #8f9ac4; font-size: 11px; overflow-wrap: anywhere; }
.jr-moved-aps { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; }
.jr-moved-aps button { display: inline-flex; align-items: baseline; gap: 6px; padding: 2px 8px; border: 1px solid #34406b; border-radius: 9px; background: #1c2547; color: #a9b4dc;
  font: inherit; font-size: 10.5px; font-variant-numeric: tabular-nums; cursor: pointer; }
.jr-moved-aps button b { color: #dfe5f7; font-weight: 600; }
.jr-moved-aps button:hover { border-color: var(--accent); color: #fff; }
.jr-moved-aps button:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.jr-dot { flex: none; width: 10px; height: 10px; border-radius: 50%; background: #2f7bf6; box-shadow: 0 0 0 3px rgba(47, 123, 246, .25); }
/* A credential holder's avatar (holderAvatar.tsx): its photo ID in a white ring, or its initials on its own colour;
   on the Twin a small pin under it, its tip the avatar's own bottom middle. */
.ha { position: relative; display: inline-block; width: var(--ha, 36px); height: var(--ha, 36px); isolation: isolate; vertical-align: middle; }
.ha-face { position: relative; z-index: 1; display: grid; place-items: center; width: 100%; height: 100%; overflow: hidden; border: 2.5px solid #fff; border-radius: 50%;
  background: hsl(var(--ha-hue, 220) 48% 44%); color: #fff; box-shadow: 0 2px 8px rgba(8, 12, 30, .45); }
.ha-initials { font-size: calc(var(--ha, 36px) * .36); font-weight: 700; letter-spacing: .01em; line-height: 1; }
.ha-face img { display: block; width: 100%; height: 100%; object-fit: cover; }
.ha-pin { margin-bottom: calc(var(--ha, 36px) * .2); }
.ha-pin::after { content: ''; position: absolute; left: 50%; bottom: calc(var(--ha, 36px) * -.2 + 1px); z-index: 0; width: calc(var(--ha, 36px) * .3); height: calc(var(--ha, 36px) * .3);
  border-radius: 0 0 3px 0; background: #fff; box-shadow: 2px 2px 5px rgba(8, 12, 30, .3); transform: translateX(-50%) rotate(45deg); transform-origin: center; }
/* At the head of the journey's panel: pressed to set its photo ID; its remove button shows on hover. */
.jr-avatar { position: relative; flex: none; display: inline-flex; }
.jr-avatar-btn { display: inline-flex; padding: 0; border: 0; border-radius: 50%; background: none; cursor: pointer; }
.jr-avatar-btn:disabled { cursor: default; }
.jr-avatar-btn:not(:disabled):hover .ha-face { box-shadow: 0 0 0 2px var(--accent), 0 2px 8px rgba(8, 12, 30, .45); }
.jr-avatar-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.jr-avatar-x { position: absolute; right: -5px; top: -5px; z-index: 2; display: none; place-items: center; width: 17px; height: 17px; padding: 0; border: 1px solid #46518a; border-radius: 50%;
  background: #1c2547; color: #c9d1ef; cursor: pointer; }
.jr-avatar:hover .jr-avatar-x, .jr-avatar-x:focus-visible { display: grid; }
.jr-avatar-x:hover { color: #fff; border-color: var(--accent); }
/* On the Twin: over its door's numbers, its pin pointing down at them. */
.jr-holder { position: absolute; width: 0; height: 0; z-index: 8; transform: scale(var(--inv, 1)); pointer-events: none; }
.jr-holder-in { position: absolute; left: 0; bottom: 50px; display: inline-flex; padding: 0; border: 0; background: none; transform: translateX(-50%); cursor: pointer; pointer-events: auto; }
.jr-holder-in:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 50%; }
.mv3d-pin .jr-holder { left: 0; top: 0; transform: none; }
.mv3d-pin .jr-holder-in { bottom: 0; }
.jr-fold { flex: none; display: inline-grid; place-items: center; width: 24px; height: 24px; padding: 0; border: 1px solid #34406b; border-radius: 6px;
  background: #18203d; color: #9aa4cb; cursor: pointer; }
.jr-fold:hover { color: #eef1fa; border-color: var(--accent); }
.jr-fold:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
/* Illustrate and Share investigation, at the top of the journey's panel (twinJourney.tsx). */
.jr-actions { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 12px 9px; }
.jr-act { display: inline-flex; align-items: center; gap: 5px; height: 26px; padding: 0 11px 0 9px; border: 1px solid #3a4778; border-radius: 13px; background: #232e58; color: #dfe5f7; font: inherit; font-size: 11.5px; font-weight: 600; white-space: nowrap; cursor: pointer; transition: filter .12s ease, box-shadow .12s ease, border-color .12s ease; }
.jr-act svg { flex: none; }
.jr-act:hover:not(:disabled) { border-color: var(--accent); color: #fff; }
.jr-act.primary { border: 0; background: linear-gradient(135deg, #4f8bff, #8a5cff); color: #fff; box-shadow: 0 1px 6px rgba(79, 139, 255, .35); }
.jr-act.primary:hover:not(:disabled) { filter: brightness(1.1); box-shadow: 0 2px 12px rgba(122, 108, 255, .55); }
.jr-act:disabled { opacity: .5; cursor: default; }
.jr-act:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.jr-share { margin: -3px 12px 8px; color: #a9c4ff; font-size: 11px; line-height: 1.4; overflow-wrap: anywhere; }
.jr-share.bad { color: #ff9aa1; }
.jr-side .jr-actions { padding: 0 14px 10px; }
.jr-side .jr-share { margin: -4px 14px 9px; }
/* The illustration over the Twin's canvas (journeyFilmView.tsx): one picture, its bar under it. */
.jr-film { position: absolute; inset: 0; z-index: 40; display: flex; flex-direction: column; background: #1b2444; animation: jr-film-in .25s ease both; }
.jr-film canvas { flex: 1; min-height: 0; width: 100%; object-fit: contain; background: #1b2444; }
.jr-film-wait { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); padding: 7px 16px; border-radius: 999px; border: 1px solid #34406b; background: rgba(17, 26, 51, .92); color: #dfe5f7; font-size: 12.5px; pointer-events: none; }
.jr-film-bar { flex: none; display: flex; align-items: center; gap: 10px; padding: 8px 12px; border-top: 1px solid #2c3963; background: #141b34; }
.jr-film-btn { flex: none; display: inline-grid; place-items: center; width: 30px; height: 30px; padding: 0; border: 1px solid #34406b; border-radius: 50%; background: #232e58; color: #eef1fa; cursor: pointer; }
.jr-film-btn:hover { border-color: var(--accent); background: #2a3560; }
.jr-film-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.jr-film-btn:last-child { margin-left: auto; }
.jr-film-seek { flex: 1; min-width: 60px; height: 4px; accent-color: #4f8bff; cursor: pointer; }
.jr-film-time { flex: none; min-width: 92px; color: #a9b4dc; font-size: 12px; font-variant-numeric: tabular-nums; text-align: right; }
.jr-film-rec { display: inline-flex; align-items: center; gap: 8px; color: #ffd0d3; font-size: 12.5px; font-variant-numeric: tabular-nums; }
.jr-film-rec i { width: 10px; height: 10px; border-radius: 50%; background: #f0525a; animation: jr-film-rec 1s ease-in-out infinite; }
@keyframes jr-film-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes jr-film-rec { 50% { opacity: .25; } }
@media (prefers-reduced-motion: reduce) { .jr-film, .jr-film-rec i { animation: none; } }
.jr-sum { padding: 0 12px 8px; font-variant-numeric: tabular-nums; }
.jr-sum .iot-pill { min-width: 0; margin-left: 8px; }
.jr-span { margin-top: 2px; color: #8f9ac4; font-size: 11.5px; }
.jr-account { display: flex; flex-direction: column; gap: 3px; margin: 0 12px 8px; padding: 6px 8px; border-radius: 6px; background: #18203d; font-size: 11.5px; }
.jr-account span:not(.iot-pill) { margin-right: 4px; color: #8f9ac4; }
.jr-account .iot-pill { min-width: 0; margin-right: 6px; }
.jr-cred { display: flex; flex-direction: column; gap: 3px; }
.jr-cred + .jr-cred { margin-top: 4px; padding-top: 5px; border-top: 1px solid #263058; }
.jr-caveat { margin: 0 12px 8px; color: #8f9ac4; font-size: 10.5px; line-height: 1.4; }
.jr-stops { list-style: none; min-height: 0; margin: 0; padding: 6px 6px 8px; overflow-y: auto; overscroll-behavior: contain; border-top: 1px solid #2c3963; }
.jr-stop { padding: 4px 6px; border-radius: 7px; }
.jr-stop.on { background: #233061; box-shadow: inset 0 0 0 1px #f5b13d; }
.jr-day { margin: 6px 0 2px 30px; color: #e3e8f8; font-size: 11px; font-weight: 600; }
.jr-gap { margin: 0 0 3px 30px; color: #8f9ac4; font-size: 10.5px; font-variant-numeric: tabular-nums; }
.jr-gap.long { color: #f5c272; }
/* A change of floor between two accesses: stairs climbing or coming down, then from which level to which. Dashed, as an inferred leg
   is on the plan: no reader saw the stairs or the elevator. */
.jr-floors { display: flex; align-items: center; gap: 9px; margin: 2px 0 6px 30px; padding: 5px 9px 5px 7px; border: 1px dashed rgba(245, 194, 114, .5);
  border-radius: 7px; background: rgba(245, 177, 61, .07); color: #f5c272; }
.jr-stairs { flex: none; width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.jr-floors-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.jr-floors-way { display: flex; flex-wrap: wrap; align-items: center; gap: 5px; }
.jr-floors-way svg { flex: none; }
.jr-level { padding: 1px 6px; border-radius: 4px; background: rgba(245, 177, 61, .16); color: #fbe0b0; font-size: 11.5px; font-weight: 600;
  font-variant-numeric: tabular-nums; white-space: nowrap; }
.jr-floors small { color: #b8a27e; font-size: 10.5px; }
/* The change of floor and the cameras checked for it, one group in one border (CJ 2026-11-10). */
.jr-floorgroup { margin: 2px 0 6px 30px; border: 1px dashed rgba(245, 194, 114, .5); border-radius: 7px; background: rgba(245, 177, 61, .07); }
.jr-floorgroup .jr-floors { margin: 0; border: 0; background: none; }
.jr-floorgroup .jr-cam { margin: 0 6px 6px; }
.jr-floors small.jr-floors-seen { color: #d9c7a4; overflow-wrap: anywhere; }
.jr-floors small.jr-floors-seen.moved { color: #8fe3b4; }
.jr-floors small.jr-floors-seen.none, .jr-floors small.jr-floors-seen.wait { color: #b8a27e; }
.jr-row { display: flex; align-items: flex-start; gap: 8px; }
.jr-row > .jr-n { flex: none; margin-top: 1px; }
.jr-body { display: flex; flex-direction: column; flex: 1; gap: 2px; min-width: 0; }
.jr-when { display: flex; align-items: center; gap: 8px; }
.jr-time { color: var(--text); font-weight: 600; font-variant-numeric: tabular-nums; }
.jr-when .iot-pill { min-width: 0; }
.jr-door { color: #dbe2f7; overflow-wrap: anywhere; }
.jr-door span { color: #8f9ac4; }
.jr-unplaced, .jr-alt { color: #8f9ac4; font-size: 11px; }
.jr-unplaced { font-style: italic; }
.jr-near { padding-left: 8px; border-left: 2px solid #46518a; color: #c9d1ef; font-size: 11px; }
.jr-near.unknown, .jr-near.remote { border-left-color: #f2b23c; }
.jr-near.refused { border-left-color: var(--bad); }
.jr-video { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; }
.jr-video:empty { display: none; }
.jr-video .clip-play, .jr-video .clip-play + .clip-play { margin-left: 0; }
.jr-novideo { display: inline-flex; align-items: center; gap: 5px; color: #7d88b3; font-size: 11px; }
/* A clip made for another access within one entry, which this one shares: said so, and muted where its seconds miss this access. */
.jr-shared { color: #9aa4cb; font-size: 10.5px; }
.jr-shared.nocover { color: #7d88b3; font-style: italic; }
.jr-video .clip-play.jr-nocover { background: #2a3358; color: #c9d1ef; box-shadow: inset 0 0 0 1px #46518a; }
/* Queued and none: a status, not a spinner. */
.jr-queued svg, .jr-norec svg { animation: none; }
.jr-queued, .jr-queued:hover { background: #3d3a24; color: #f1e3a8; }
.jr-norec, .jr-norec:hover { background: none; color: var(--muted); box-shadow: inset 0 0 0 1px var(--line); }
@media (max-width: 900px) { .jr-panel { width: 280px; } }
/* In the side panel (journeySide.tsx): the panel's own column, its accesses scrolling under the head. */
.details.jr-side { display: flex; flex-direction: column; padding: 0; overflow: hidden; }
.jr-side .jr-panel { position: static; flex: 1; min-height: 0; width: auto; max-width: none; max-height: none; border: 0; border-radius: 0;
  background: none; box-shadow: none; animation: none; }
.jr-side .jr-head { padding: 14px 14px 8px; border-bottom: 0; }
.jr-side .jr-head b { font-size: 14px; }
.jr-side .jr-stops { flex: 1; }
.jr-doorbtn { margin-top: 4px; padding: 2px 8px; border: 1px solid #34406b; border-radius: 6px; background: none; color: #9fb6ff; font-size: 11px; cursor: pointer; }
.jr-doorbtn:hover { border-color: var(--accent); color: #eef1fa; }
.jr-doorbtn:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
@media (prefers-reduced-motion: reduce) { .jr-panel { animation: none; } }
/* Refresh, left of the Time Machine (ashSyncButton.tsx): spins while Ash syncs and Atlas exports. */
.actions button.ash-sync .spin { animation: wf-spin .9s linear infinite; }
.actions button.ash-sync.failed { border-color: #f0525a; color: #ff9aa0; }
@media (prefers-reduced-motion: reduce) { .actions button.ash-sync .spin { animation: none; } }

/* ── Camera coverage on the Twin (cameraCoverageLayer.tsx) ── */
/* 2D: each camera's view as cut by the walls, its wash fading from the camera, under the pins. The journey's camera amber, on top. */
.mv-camcov { position: absolute; left: 0; top: 0; overflow: visible; pointer-events: none; animation: mv-fade .35s ease; }
.mv-camcov stop { stop-color: rgb(225, 70, 70); }
.mv-camcov radialGradient.focus stop { stop-color: rgb(245, 177, 61); }
.mv-camcov polygon { stroke: rgba(225, 70, 70, .75); stroke-width: 1.5; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.mv-camcov polygon.focus { stroke: #f5b13d; stroke-width: 2.5; }
.mv-camcov-legend i.near { background: rgba(225, 70, 70, .5); }
.mv-camcov-legend i.far { background: linear-gradient(90deg, rgba(225, 70, 70, .32), rgba(225, 70, 70, .08)); }
@media (prefers-reduced-motion: reduce) { .mv-camcov { animation: none; } }

/* ── Path cameras in the journey (twinJourney.tsx, pathClipView.tsx) ── */
/* A camera between two accesses: the way drawn walks through its view, so it may show the credential (inferred). Dashed, as a way
   nobody saw is drawn; the one picked amber, as a picked access is. */
.jr-cam { display: flex; flex-wrap: wrap; align-items: center; gap: 3px 8px; margin: 0 0 4px 30px; padding: 4px 8px 5px 7px;
  border: 1px dashed rgba(122, 162, 255, .45); border-radius: 7px; background: rgba(79, 139, 255, .06); }
.jr-cam.on { border-style: solid; border-color: #f5b13d; background: rgba(245, 177, 61, .08); }
.jr-cam-pick { display: inline-flex; align-items: center; gap: 6px; min-width: 0; padding: 0; border: 0; background: none; color: #dbe2f7;
  font: inherit; font-size: 11.5px; cursor: pointer; }
.jr-cam-pick b { font-weight: 600; overflow-wrap: anywhere; }
.jr-cam-pick:hover b { color: #fff; text-decoration: underline; text-underline-offset: 2px; }
.jr-cam-pick:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
.jr-cam-icon { display: inline-flex; align-items: center; gap: 1px; padding: 2px 4px; border-radius: 5px; background: #2a3a6e; color: #9fc0ff; }
.jr-cam.on .jr-cam-icon { background: #f5b13d; color: #2b1d00; }
.jr-cam-when { color: #8f9ac4; font-size: 10.5px; font-variant-numeric: tabular-nums; }
.jr-whole { padding: 1px 7px; border: 1px solid #46518a; border-radius: 9px; background: none; color: #a9b4dc; font: inherit; font-size: 10.5px; cursor: pointer; }
.jr-whole:hover { color: #fff; border-color: var(--accent); }
.jr-whole:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.jr-cam-why { padding: 0 6px; border-radius: 8px; background: rgba(159, 192, 255, .12); color: #b9cdf7; font-size: 10.5px; }
.jr-stairs-s { fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.jr-cam-video { display: flex; flex-basis: 100%; flex-wrap: wrap; align-items: center; gap: 4px; }
.jr-cam-video:empty { display: none; }
.jr-cam-video .clip-play, .jr-cam-video .clip-play + .clip-play { margin-left: 0; }
/* Not asked for yet (a credential's every access, or past the first twelve legs): a quiet button, not the video's own. */
.jr-getvideo, .jr-getvideo:hover { background: #2a3358; color: #c9d1ef; box-shadow: inset 0 0 0 1px #46518a; filter: none; }
.jr-cam-note { color: #9aa4cb; font-size: 10.5px; }
.jr-cam-note.bad { color: #f2a3a7; }
/* The picked camera: the stretch of the way inside its view, over the way, and its mark standing over it (2D on a stem, 3D a pin's
   node). Its coverage is drawn forward by the Cameras layer (coverageFocus.ts). */
.jr-legs polyline.seen { stroke: #f5b13d; stroke-opacity: 1; stroke-width: 7; stroke-dasharray: none; stroke-linecap: round; }
.jr-cammark { position: absolute; width: 0; height: 0; z-index: 7; transform: scale(var(--inv, 1)); }
.jr-cammark-in { position: absolute; left: 0; bottom: 14px; transform: translateX(-50%); display: inline-flex; align-items: center; gap: 3px;
  padding: 3px 7px 3px 5px; border: 1px solid #f5b13d; border-radius: 999px; background: rgba(15, 21, 42, .92); color: #fbe0b0;
  font-size: 11px; white-space: nowrap; box-shadow: 0 3px 10px rgba(5, 10, 25, .5); pointer-events: none; }
.jr-cammark-in::after { content: ''; position: absolute; left: 50%; top: 100%; width: 2px; height: 13px; margin-left: -1px; background: #f5b13d; }
.jr-cammark-in b { margin-left: 2px; font-weight: 600; }
.mv3d-pin .jr-cammark { left: 0; top: 0; transform: none; }
.mv3d-pin .jr-cammark-in { bottom: 0; }
.mv3d-pin .jr-cammark-in::after { display: none; }
/* The path clip's player (pathClipView.tsx): the access clip's box, which part plays and when, and the parts to jump to. */
.pc-box { width: min(860px, 94vw); }
.pc-icon { display: inline-flex; gap: 1px; color: #9fc0ff; }
.pc-wait { display: grid; place-items: center; align-content: center; gap: 10px; aspect-ratio: 16 / 9; max-height: 72vh; padding: 16px;
  border-radius: 6px; background: #000; color: #9aa4cb; font-size: 12.5px; text-align: center; }
/* The end of the recording: back to its start, in the same view. */
.pc-again { display: inline-flex; align-items: center; gap: 5px; height: 26px; padding: 0 11px; border: 1px solid #46518a; border-radius: 6px;
  background: #2a3358; color: #c9d1ef; font: inherit; font-size: 12px; cursor: pointer; }
.pc-again:hover { border-color: var(--accent); color: #fff; }
.pc-again:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.pc-now { margin-top: 6px; color: #c9d1ef; font-size: 12px; font-variant-numeric: tabular-nums; }
.pc-parts { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 6px; }
.pc-part { min-width: 26px; height: 22px; padding: 0 6px; border: 1px solid #34406b; border-radius: 5px; background: #18203d; color: #c9d1ef;
  font: inherit; font-size: 11px; font-variant-numeric: tabular-nums; cursor: pointer; }
.pc-part:hover:not(:disabled) { border-color: var(--accent); color: #fff; }
.pc-part.on { border-color: #f5b13d; background: #f5b13d; color: #2b1d00; font-weight: 700; }
.pc-part.waiting { border-style: dashed; color: #8f9ac4; }
.pc-part:disabled { opacity: .4; text-decoration: line-through; cursor: default; }
.pc-part:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }

/* The VLAN screen (vlanScreen.tsx): over the view, opened from a VLAN tag, an SSID's or an apartment's VLAN. */
.vs-back { position: fixed; inset: 0; z-index: 60; background: rgba(8, 12, 28, .62); display: flex; align-items: flex-start; justify-content: center; padding: 56px 16px 24px; overflow-y: auto; }
.vs { width: min(980px, 100%); background: var(--bg); border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 24px 60px rgba(0, 0, 0, .5); padding: 16px 18px 18px; display: flex; flex-direction: column; gap: 14px; }
.vs-head { display: flex; align-items: center; gap: 12px; }
.vs-chip { min-width: 46px; height: 30px; padding: 0 8px; border-radius: 7px; display: inline-flex; align-items: center; justify-content: center; font: 700 14px ui-monospace, SFMono-Regular, Menlo, monospace; color: #10162c; background: #e7eaf5; }
.vs-title { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.vs-title b { font-size: 17px; font-weight: 700; }
.vs-title span { color: var(--muted); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vs-btn { background: transparent; border: 1px solid #34406b; border-radius: 7px; color: var(--muted); width: 30px; height: 30px; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; }
.vs-btn:hover { color: var(--text); border-color: #7d88b3; }
.vs-btn .spin { animation: wf-spin .9s linear infinite; }
.vs-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 8px; }
.vs-tile { background: var(--panel); border: 1px solid var(--line); border-radius: 9px; padding: 10px 12px; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.vs-tile b { font-size: 20px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.vs-tile span { font-size: 12px; color: var(--text); }
.vs-tile small { font-size: 11px; color: var(--muted); }
.vs-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 10px; }
.vs-card { background: var(--panel); border: 1px solid var(--line); border-radius: 9px; padding: 12px 14px; min-width: 0; }
.vs-sub { color: var(--muted); font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; margin: 12px 0 4px; }
.vs-note { color: var(--muted); font-size: 12px; margin: 4px 0; }
.vs-switches { display: flex; flex-wrap: wrap; gap: 5px; margin: 4px 0 8px; }
.vs-sw { background: var(--node); border: 1px solid #34406b; border-radius: 6px; color: var(--text); font-size: 11.5px; padding: 3px 7px; cursor: pointer; display: inline-flex; gap: 6px; }
.vs-sw span { color: var(--muted); }
.vs-sw:hover { border-color: var(--accent); }
.vs-table { width: 100%; border-collapse: collapse; font-size: 12px; }
.vs-table th { text-align: left; color: var(--muted); font-weight: 600; padding: 4px 6px; border-bottom: 1px solid var(--line); }
.vs-table td { padding: 4px 6px; border-bottom: 1px solid rgba(44, 57, 99, .5); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 280px; }
.vs-table td .dot { margin-right: 6px; width: 6px; height: 6px; }
.vs-table .n { text-align: right; }
.vs-table tr.pick { cursor: pointer; }
.vs-table tr.pick:hover td { background: rgba(122, 167, 255, .08); }
/* A VLAN that opens the VLAN screen: a port's tag, an SSID's or an apartment's VLAN. */
.rv-vl.vl-link { cursor: pointer; }
.rv-vl.vl-link:hover { outline: 1.5px solid var(--accent); outline-offset: 1px; }
.vl-open { background: transparent; border: 0; padding: 0; font: inherit; color: var(--accent); cursor: pointer; text-decoration: underline; text-underline-offset: 2px; }
.vlan-label.vl-link { cursor: pointer; }
.vlan-label.vl-link:hover { filter: brightness(1.2); }
/* The VLAN page over time: the period's graph, the moment it points at, its figures. */
.vs-period { margin-bottom: 4px; }
.vs-period .fw-legend { margin-left: auto; }
.vs-at { display: flex; align-items: baseline; gap: 10px; min-height: 20px; font-size: 12px; margin-bottom: 2px; }
.vs-at b { font-weight: 600; }
.vs-at span { color: var(--muted); }
.vs-hint { color: var(--muted); font-size: 11.5px; }
.vs-graph { display: block; width: 100%; height: auto; cursor: crosshair; touch-action: none; user-select: none; -webkit-user-select: none; }
/* A stretch marked by a drag, to zoom into, and what the graph is zoomed to. */
.vs-mark { fill: rgba(122, 167, 255, .16); stroke: var(--accent); stroke-width: 1; pointer-events: none; }
.vs-zoom { display: inline-flex; align-items: baseline; gap: 10px; font-size: 12px; }
.vs-zoom b { color: var(--text); font-size: 12px; font-weight: 600; }
.vs-graph.held { cursor: pointer; }
.vs-grid { stroke: var(--line); stroke-width: 1; opacity: .55; }
.vs-axis { stroke: #46527f; stroke-width: 1; }
.vs-tick { fill: var(--muted); font-size: 10.5px; }
.vs-line { fill: none; stroke-width: 1.6; stroke-linejoin: round; }
.vs-cross { stroke: #c9d2f3; stroke-width: 1; stroke-dasharray: 3 3; }
.vs-stats { display: flex; flex-direction: column; gap: 2px; margin-top: 6px; font-size: 11.5px; }
.vs-stat { display: flex; align-items: center; gap: 7px; }
.vs-stat i { width: 10px; height: 3px; border-radius: 2px; flex: none; }
.vs-stat b { font-weight: 600; min-width: 62px; }
.vs-stat span { color: var(--muted); }
.vs-where { color: var(--muted); margin-right: 5px; vertical-align: -2px; flex: none; }
.vs-sw .vs-where { margin-right: 0; }
.vs-now { margin-left: auto; font-weight: 400; font-size: 11.5px; }
.vs-table .vl-open { color: var(--text); text-decoration-color: rgba(122, 167, 255, .6); }
.vs-table .vl-open:hover { color: var(--accent); }
/* The Younity console's data switches (a building's client usage recording). */
.tn-dim { color: var(--muted); font-size: 12px; }
.tn-switch { display: inline-flex; align-items: center; gap: 7px; font-size: 12px; cursor: pointer; }
.tn-switch span { color: var(--muted); }
.tn-switch input:checked + span { color: var(--text); }
/* The VLANs tab (vlansView.tsx): every VLAN at the site, a row each. */
.vt { display: flex; flex-direction: column; gap: 10px; height: 100%; min-height: 0; padding: 14px 18px 0; overflow: hidden; }
.vt-bar { margin: 0; }
.vt-idle { margin-left: auto; }
.vt-tiles { flex: none; }
.vt-scroll { flex: 1; min-height: 0; overflow: auto; border: 1px solid var(--line); border-radius: 9px; background: var(--panel); }
.vt-table th { position: sticky; top: 0; background: var(--panel); cursor: pointer; user-select: none; white-space: nowrap; padding: 7px 8px; z-index: 1; }
.vt-table th svg { margin-left: 3px; vertical-align: -1px; color: var(--accent); }
.vt-table th:hover { color: var(--text); }
.vt-table td { padding: 5px 8px; max-width: 420px; }
.vt-table .rv-vl { display: inline-block; min-width: 40px; text-align: center; }
.vt-sub { color: var(--muted); font-size: 11px; margin-left: 8px; }
.vt .vs-note { margin: 0; }
.vt-scroll > .vs-note { padding: 14px; }
/* A list's sortable headers (sortHead.tsx), and the most demanding client at a moment. */
.vs-table th.sortable { cursor: pointer; user-select: none; white-space: nowrap; }
.vs-table th.sortable:hover { color: var(--text); }
.vs-table th.sortable svg { margin-left: 3px; vertical-align: -1px; color: var(--accent); }
.vs-top { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; margin: 2px 0 8px; padding: 7px 10px; border-radius: 7px; border: 1px solid rgba(122, 167, 255, .35); background: rgba(122, 167, 255, .08); font-size: 12px; }
.vs-top b { font-weight: 600; }
.vs-top .vl-open { font-weight: 600; }
.vs-table tr.top td { background: rgba(122, 167, 255, .07); }
.vs-table tr.top td:first-child { box-shadow: inset 2px 0 0 var(--accent); }

/* The permission matrix (orgSettings.tsx): a row per scope, None | Read | Edit, opening to sub-scopes. */
.tn-mx { margin: 8px 0 2px 24px; border: 1px solid #2a3560; border-radius: 8px; overflow: hidden; }
.tn-mx-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 5px 10px; min-height: 34px; }
.tn-mx-scope + .tn-mx-scope, .tn-mx-top + .tn-mx-scope { border-top: 1px solid #232d52; }
.tn-mx-top { font-size: 10.5px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); min-height: 26px; }
.tn-mx-cols { display: grid; grid-template-columns: repeat(3, 58px); text-align: center; padding: 0 3px; }
.tn-mx-cols i { font-style: normal; }
.tn-mx-name { display: inline-flex; align-items: center; gap: 7px; background: none; border: 0; color: var(--text); font-size: 13px; padding: 0; text-align: left; min-width: 0; }
button.tn-mx-name { cursor: pointer; }
.tn-mx-name svg { color: var(--muted); transition: transform .12s; flex: none; }
.tn-mx-scope.open > .tn-mx-row .tn-mx-name svg { transform: rotate(90deg); }
.tn-mx-subs { background: rgba(0, 0, 0, .14); padding: 2px 0 6px; }
.tn-mx-row.sub { padding-left: 30px; min-height: 30px; }
.tn-mx-row.sub .tn-mx-name { font-size: 12.5px; color: #c9d3f2; }
.tn-mx-targets { align-items: flex-start; justify-content: flex-start; padding-top: 6px; }
.tn-mx-targets .tn-chip { display: inline-flex; align-items: center; gap: 4px; }
.tn-mx-targets select { font-size: 12px; padding: 2px 6px; background: var(--panel-2); border: 1px solid #34406b; color: var(--text); border-radius: 6px; max-width: 240px; }
.tn-seg { display: grid; grid-template-columns: repeat(3, 58px); background: var(--panel-2); border: 1px solid #34406b; border-radius: 7px; padding: 2px; flex: none; }
.tn-seg button { background: none; border: 0; border-radius: 5px; color: var(--muted); font-size: 12px; padding: 3px 0; cursor: pointer; }
.tn-seg button:hover:not(:disabled) { color: var(--text); }
.tn-seg button.on { background: #2d4d9a; color: #fff; font-weight: 600; }
.tn-seg button:disabled { opacity: .35; cursor: not-allowed; }
.tn-seg-gap { display: block; }
.tn-mx-devs { display: flex; flex-direction: column; gap: 4px; min-width: 0; flex: 1; }
.tn-mx-dev { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 14px; font-size: 12.5px; }
.tn-mx-dev b { font-weight: 500; min-width: 150px; }
.tn-mx-dev .tn-check { font-size: 12px; color: #c9d3f2; }
.tn-mx-dev b { color: var(--text); }
.tn-role { margin: 0 0 10px; }
.tn-role > summary { cursor: pointer; padding: 8px 12px; font-size: 13px; display: flex; gap: 10px; align-items: baseline; }
.tn-role > summary span { color: var(--muted); font-size: 12px; }
.tn-role .tn-mx { margin: 4px 12px 12px; }
.tn-role > summary { list-style: none; }
.tn-role > summary::-webkit-details-marker { display: none; }
.tn-role > summary::before { content: '›'; color: var(--muted); display: inline-block; transition: transform .12s; }
.tn-role[open] > summary::before { transform: rotate(90deg); }

/* Schedules (orgSettings.tsx): the hours beside a permission, and the org's shifts and holidays. */
.tn-mx-row { flex-wrap: wrap; }
.tn-mx-row > .tn-when-btn { margin-left: auto; flex: none; }
.tn-mx-row > .tn-mx-name { flex: 1 1 auto; }
.tn-when-btn { display: inline-flex; align-items: center; gap: 5px; background: none; border: 1px solid transparent; border-radius: 6px; color: var(--muted); font-size: 11.5px; padding: 3px 7px; cursor: pointer; white-space: nowrap; max-width: 420px; overflow: hidden; text-overflow: ellipsis; }
.tn-when-btn:hover { color: var(--text); border-color: #34406b; }
.tn-when-btn.on { color: #ffd58a; border-color: #6b5a2c; background: rgba(255, 190, 80, .08); }
.tn-when-pop { order: 9; flex: 0 0 auto; margin: 6px 0 6px auto; width: min(460px, 100%); background: #1b2548; border: 1px solid #3a4a80; border-radius: 9px; padding: 10px 12px; }
.tn-mx-row:has(> .tn-when-pop)::after { content: ''; order: 8; flex: 0 0 100%; height: 0; }
.tn-when-pop table { border-collapse: collapse; width: 100%; }
.tn-when-pop th { font-size: 11.5px; font-weight: 500; color: #c9d3f2; padding: 4px 8px; text-align: center; white-space: nowrap; }
.tn-when-pop tbody th { text-align: left; }
.tn-when-pop tbody th span { display: block; color: var(--muted); font-size: 10.5px; font-weight: 400; }
.tn-when-pop td { text-align: center; padding: 4px 8px; }
.tn-when-foot { display: flex; align-items: center; gap: 8px; margin-top: 8px; font-size: 11.5px; }
.tn-when-foot .tn-muted { flex: 1; }
.tn-when-foot button { background: var(--panel-2); border: 1px solid #34406b; border-radius: 6px; color: var(--text); font-size: 12px; padding: 3px 9px; cursor: pointer; }
.tn-sched-shifts { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 10px 16px; }
.tn-sched-shifts label { display: flex; flex-direction: column; gap: 4px; font-size: 12px; color: var(--muted); }
.tn-sched-shifts label > span { display: flex; align-items: center; gap: 6px; color: var(--muted); }
.tn-sched-days { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 8px; margin: 12px 0 4px; font-size: 12.5px; }
.tn-sched-days .tn-chip { display: inline-flex; align-items: center; gap: 4px; margin: 0; }
.tn-sched input[type=time], .tn-sched input[type=date] { color-scheme: dark; }
.tn-sched-days > button { background: var(--panel-2); border: 1px solid #34406b; border-radius: 6px; color: var(--text); font-size: 12px; padding: 4px 10px; display: inline-flex; align-items: center; gap: 4px; }
.tn-sched-days > button:disabled { opacity: .5; }

/* The people pages (orgSettings.tsx, peopleTab.tsx, permMatrix.tsx, younity.tsx): tabs, one aligned
   list of people, a person's nested "where" table, and the permission matrix as one grid. */
.pp-page h1 { margin-bottom: 10px; }
.pp-tabs { display: flex; gap: 2px; border-bottom: 1px solid #2a3560; margin: 0 0 16px; }
.pp-tabs button { background: none; border: 0; border-bottom: 2px solid transparent; color: var(--muted); font-size: 13px; padding: 8px 14px; cursor: pointer; margin-bottom: -1px; }
.pp-tabs button:hover { color: #d9def2; }
.pp-tabs button.on { color: #fff; border-bottom-color: #3b82f6; }
.pp-tabs button span { margin-left: 6px; font-size: 11px; color: var(--muted); }
.pp-bar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; }
.pp-bar .tn-primary { margin-left: auto; }
.pp-search { display: flex; align-items: center; gap: 7px; background: var(--panel-2); border: 1px solid #34406b; border-radius: 7px; padding: 0 10px; color: var(--muted); flex: 0 1 300px; }
.pp-search input { background: none; border: 0; outline: 0; color: var(--text); font-size: 13px; padding: 7px 0; width: 100%; }
.pp-filters { display: flex; gap: 6px; flex-wrap: wrap; }
.pp-filters button { background: none; border: 1px solid #34406b; border-radius: 14px; color: var(--muted); font-size: 12px; padding: 3px 10px; cursor: pointer; }
.pp-filters button span { margin-left: 4px; opacity: .8; }
.pp-filters button.on { background: #2d4d9a; border-color: var(--accent); color: #fff; }
.pp-bulk { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; background: rgba(59, 130, 246, .12); border: 1px solid #3b5fb0; border-radius: 8px; padding: 7px 12px; margin-bottom: 10px; font-size: 13px; }
.pp-bulk button, .pp-foot button:not(.tn-primary), .pm-bar button { display: inline-flex; align-items: center; gap: 5px; background: var(--panel-2); border: 1px solid #34406b; border-radius: 6px; color: var(--text); font-size: 12.5px; padding: 5px 10px; cursor: pointer; }
.pp-bulk button:disabled { opacity: .5; cursor: progress; }
.pp-bulk .pp-clear { margin-left: auto; background: none; border-color: transparent; color: var(--muted); }
.pp-copy { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--muted); }
.pp-copy select, .pp-where select { background: var(--panel-2); border: 1px solid #34406b; border-radius: 6px; color: var(--text); font-size: 12.5px; padding: 4px 8px; max-width: 240px; }
.pp-table, .pp-where { border: 1px solid #2a3560; border-radius: 9px; overflow: hidden; background: var(--panel); }
.pp-row { display: grid; grid-template-columns: 22px minmax(200px, 1.25fr) minmax(170px, 1.3fr) minmax(170px, 1.3fr) 104px 124px; align-items: center; gap: 0 14px; padding: 8px 14px; font-size: 13px; min-height: 44px; }
.pp-row + .pp-row { border-top: 1px solid #232d52; }
.pp-row.head { font-size: 10.5px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); min-height: 32px; background: rgba(0, 0, 0, .12); }
.pp-row.can { cursor: pointer; }
.pp-row.can:hover { background: rgba(255, 255, 255, .03); }
.pp-row.off .pp-who b, .pp-row.off .pp-what, .pp-row.off .pp-chips { opacity: .55; }
.pp-group-h { padding: 7px 14px; font-size: 11.5px; font-weight: 600; color: #c9d3f2; background: rgba(0, 0, 0, .2); border-top: 1px solid #232d52; border-bottom: 1px solid #232d52; }
.pp-group-h span { color: var(--muted); font-weight: 400; margin-left: 5px; }
.pp-who { min-width: 0; }
.pp-who b { font-weight: 500; }
.pp-who small { display: block; color: var(--muted); font-size: 11.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pp-who i { font-style: normal; }
.pp-chips { display: flex; flex-wrap: wrap; gap: 4px; min-width: 0; }
.pp-chips i { font-style: normal; font-size: 11.5px; background: var(--panel-2); border: 1px solid #34406b; border-radius: 10px; padding: 1px 8px; white-space: nowrap; }
.pp-what, .pp-access { display: inline-flex; align-items: center; gap: 6px; min-width: 0; color: #c9d3f2; font-size: 12.5px; }
.pp-what svg, .pp-access svg { color: #ffd58a; flex: none; }
.pp-acts { display: flex; justify-content: flex-end; gap: 2px; }
.pp-acts button { background: none; border: 1px solid transparent; border-radius: 6px; color: var(--muted); padding: 5px 6px; cursor: pointer; display: inline-flex; }
.pp-acts button:hover { color: var(--text); border-color: #34406b; }
.pp-none { padding: 22px; text-align: center; color: var(--muted); font-size: 13px; }
.pp-person-head { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-bottom: 14px; }
.pp-person-head h2, .pp-sent-h { font-size: 17px; font-weight: 600; margin: 0; }
.pp-person-head h2 span { margin-left: 8px; font-size: 12.5px; font-weight: 400; color: var(--muted); }
.pp-person-head .pp-copy { margin-left: auto; }
.pp-back { display: inline-flex; align-items: center; gap: 3px; background: none; border: 1px solid #34406b; border-radius: 6px; color: var(--muted); font-size: 12.5px; padding: 4px 9px 4px 5px; cursor: pointer; }
.pp-back:hover { color: var(--text); }
.pp-field { display: flex; flex-direction: column; gap: 5px; font-size: 12px; color: var(--muted); margin-bottom: 12px; }
.pp-field textarea { background: var(--panel-2); border: 1px solid #34406b; border-radius: 7px; color: var(--text); font: inherit; font-size: 13px; padding: 8px 10px; resize: vertical; }
.pp-field em { color: #ffb4aa; font-style: normal; }
.pp-switch { display: flex; align-items: center; gap: 9px; background: var(--panel); border: 1px solid #2a3560; border-radius: 9px; padding: 10px 14px; margin-bottom: 12px; font-size: 13px; cursor: pointer; }
.pp-switch span { color: var(--muted); font-size: 12.5px; }
.pp-where-row { display: grid; grid-template-columns: 22px minmax(180px, 1.2fr) 200px minmax(200px, 2fr); align-items: center; gap: 0 14px; padding: 7px 14px; font-size: 13px; min-height: 40px; }
.pp-where-row + .pp-where-row, .pp-where-group + .pp-where-group, .pp-where-row.head + .pp-where-group { border-top: 1px solid #232d52; }
.pp-where-row.head { font-size: 10.5px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); min-height: 32px; background: rgba(0, 0, 0, .12); }
.pp-where-row.project { background: rgba(0, 0, 0, .2); min-height: 34px; font-size: 12.5px; }
.pp-where-row.on { background: rgba(59, 130, 246, .1); }
.pp-where-group .pp-bname { padding-left: 14px; }
.pp-matrix { margin-top: 16px; }
.pp-matrix h3 { font-size: 14px; font-weight: 600; margin: 0 0 8px; }
.pp-matrix h3 span { margin-left: 10px; font-size: 12px; font-weight: 400; color: #ffd58a; }
.pp-foot { display: flex; align-items: center; justify-content: flex-end; gap: 8px; margin-top: 16px; padding-top: 12px; border-top: 1px solid #2a3560; position: sticky; bottom: 0; background: #1b2340; padding-bottom: 12px; box-shadow: 0 40px 0 #1b2340; z-index: 5; }
.pp-foot .auth-error { margin-right: auto; }
.pp-sent { border: 1px solid #2a3560; border-radius: 9px; overflow: hidden; }
.pp-sent-row { display: grid; grid-template-columns: minmax(180px, 1fr) minmax(260px, 2.4fr) 96px; align-items: center; gap: 0 12px; padding: 8px 14px; font-size: 13px; }
.pp-sent-row + .pp-sent-row { border-top: 1px solid #232d52; }
.pp-sent-row input { background: #10162e; border: 1px solid #34406b; border-radius: 6px; color: var(--text); font: 12px ui-monospace, monospace; padding: 5px 8px; }
.pp-sent-row button { display: inline-flex; align-items: center; justify-content: center; gap: 5px; background: var(--panel-2); border: 1px solid #34406b; border-radius: 6px; color: var(--text); font-size: 12px; padding: 5px 8px; cursor: pointer; }
.pp-sent-row > span { grid-column: 2 / -1; }
/* The matrix: one grid all the way down, name | when | None Read Edit. */
.pm-bar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 8px; }
.pm-bar-label { font-size: 11.5px; color: var(--muted); }
.pm-bar-label.wide { margin-left: 14px; }
.pm-bar > .tn-when-btn { border-color: #34406b; }
.pm-bar > .tn-when-pop { flex: 0 0 auto; width: min(460px, 100%); margin: 2px 0 4px auto; order: 9; }
.pm-bar:has(> .tn-when-pop)::after { content: ''; order: 8; flex: 0 0 100%; height: 0; }
.pm { border: 1px solid #2a3560; border-radius: 9px; overflow: hidden; background: var(--panel); }
.pm-row { display: grid; grid-template-columns: minmax(0, 1fr) 180px; align-items: center; gap: 0 14px; padding: 5px 12px; min-height: 36px; }
.pm.timed .pm-row { grid-template-columns: minmax(0, 1fr) 220px 180px; }
.pm-row > .pm-name { grid-column: 1; grid-row: 1; }
.pm-row > .tn-seg, .pm-row > .pm-cols { grid-column: -2 / -1; grid-row: 1; }
.pm.timed .pm-row > .tn-when-btn, .pm.timed .pm-row > .pm-when-h { grid-column: 2; grid-row: 1; justify-self: start; }
.pm-row > .tn-when-pop { grid-column: 1 / -1; grid-row: 2; justify-self: end; margin: 6px 0; order: 0; }
.pm-head { font-size: 10.5px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); min-height: 30px; background: rgba(0, 0, 0, .12); }
.pm-cols { display: grid; grid-template-columns: repeat(3, 58px); text-align: center; padding: 0 3px; }
.pm-cols i { font-style: normal; }
.pm-group + .pm-group, .pm-head + .pm-group { border-top: 1px solid #2a3560; }
.pm-row.group { background: rgba(0, 0, 0, .2); }
.pm-scope { border-top: 1px solid #232d52; }
.pm-name { display: inline-flex; align-items: center; gap: 7px; background: none; border: 0; color: var(--text); font-size: 13px; padding: 0; text-align: left; min-width: 0; }
button.pm-name { cursor: pointer; }
.pm-name svg { color: var(--muted); flex: none; transition: transform .12s; }
.pm-name.open svg { transform: rotate(90deg); }
.pm-name .tn-muted { font-size: 11.5px; font-weight: 400; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pm-row.scope > .pm-name { padding-left: 18px; }
.pm-row.sub > .pm-name { padding-left: 38px; font-size: 12.5px; color: #c9d3f2; }
.pm-subs { background: rgba(0, 0, 0, .12); padding: 2px 0 6px; }
.pm-subs .tn-mx-targets { padding-left: 50px; }
.pp-go { background: none; border: 0; padding: 0; margin: 0 8px 0 0; color: #8fb3ff; font: inherit; cursor: pointer; text-align: left; }
.pp-go:hover { color: #c6d8ff; text-decoration: underline; }
.pp-chips button { font-size: 11.5px; background: var(--panel-2); border: 1px solid #34406b; border-radius: 10px; padding: 1px 8px; white-space: nowrap; color: var(--text); cursor: pointer; }
.pp-chips button:hover { border-color: var(--accent); color: #c6d8ff; }
.pp-search button { background: none; border: 0; color: var(--muted); font-size: 16px; cursor: pointer; padding: 0 2px; }
.pp-filters-row { margin: 0 0 10px; }
.pp-what .pp-go { margin: 0; }
.pp-what .pp-go:not(:last-of-type)::after { content: ','; color: var(--muted); }
.pp-what > i { font-style: normal; color: var(--muted); font-size: 12px; }
.pp-brow { grid-template-columns: 22px minmax(220px, 1.6fr) minmax(160px, 1fr) minmax(120px, .8fr) 60px; }
.pp-brow a { color: #8fb3ff; text-decoration: none; font-weight: 500; }
.pp-brow a:hover { text-decoration: underline; }
.pp-bar-note { margin: 0; flex: 1; }
.pp-where-row.out .pp-bname { color: var(--muted); }
.pp-matrix h3 { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 14px; }
.pp-matrix h3 .pp-together { font-size: 12.5px; font-weight: 400; color: #c9d3f2; margin-left: 6px; }
.pp-matrix h3 span { margin-left: 0; }

/* CCTV by the permission matrix (cctvExtras.tsx): camera groups, kept access clips, recorders. */
.cx-groups { display: flex; flex-wrap: wrap; align-items: center; gap: 5px; padding: 8px 14px 10px; border-bottom: 1px solid #2c3963; min-width: 0; }
.cx-groups .cx-label { display: inline-flex; align-items: center; gap: 5px; flex-basis: 100%; font-size: 11px; font-weight: 600; letter-spacing: .03em; color: #8f9ac4; }
.cx-groups button { display: inline-flex; align-items: center; gap: 5px; max-width: 100%; padding: 2px 9px; border: 1px solid #34406b; border-radius: 12px; background: #18203d; color: #e3e8f8; font: inherit; font-size: 12px; cursor: pointer; }
.cx-groups button span { color: #8f9ac4; font-variant-numeric: tabular-nums; }
.cx-groups button:hover { border-color: #6b78ad; }
.cx-groups button.on { border-color: var(--accent); background: #26335f; }
.cx-groups button.cx-edit { padding: 3px 6px; color: #9aa4cb; }
.cx-buttons { display: inline-flex; gap: 6px; }
.cx-buttons .iot-view { display: inline-flex; align-items: center; gap: 6px; width: auto; padding: 0 10px; font: inherit; font-size: 12px; }
.cx-panel { flex: 1; min-height: 0; overflow: auto; padding: 4px 20px 20px; display: flex; flex-direction: column; gap: 12px; }
.cx-panel-head { display: flex; align-items: baseline; gap: 12px; padding-top: 4px; }
.cx-panel-head b { flex: none; font-size: 14px; color: #eef1fa; }
.cx-panel-head .tn-muted { flex: 1; min-width: 0; }
.cx-panel-head button { flex: none; align-self: center; display: inline-grid; place-items: center; width: 28px; height: 26px; border: 1px solid #34406b; border-radius: 6px; background: #18203d; color: #9aa4cb; cursor: pointer; }
.cx-panel-head button:hover { color: #eef1fa; border-color: var(--accent); }
.cx-player { display: flex; flex-direction: column; gap: 6px; }
.cx-player video { width: 100%; max-height: 52vh; background: #000; border-radius: 8px; }
.cx-table { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.cx-table th { text-align: left; padding: 6px 10px; font-size: 11px; font-weight: 600; letter-spacing: .03em; color: #8f9ac4; border-bottom: 1px solid #2c3963; }
.cx-table td { padding: 6px 10px; border-bottom: 1px solid #263154; color: #e3e8f8; font-variant-numeric: tabular-nums; }
.cx-table tr.on td { background: #26335f; }
.cx-table td.muted-cell { color: var(--muted); padding: 18px 10px; }
.cx-recorder { border: 1px solid #2c3963; border-radius: 8px; padding: 12px 14px; display: flex; flex-direction: column; gap: 8px; }
.cx-recorder-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; }
.cx-recorder-head b { font-size: 13.5px; color: #eef1fa; }
.cx-recorder-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 12px 28px; }
.cx-recorder-grid h4 { margin: 0 0 6px; font-size: 11px; font-weight: 600; letter-spacing: .03em; color: #8f9ac4; }
.cx-line { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; gap: 10px; padding: 3px 0; font-size: 12.5px; color: #e3e8f8; }
.cx-line > span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cx-group-list { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.cx-group-list .tn-chip { margin: 0; cursor: pointer; }
.cx-group-list .tn-chip:hover { border-color: #6b78ad; }
.cx-group-list .tn-primary { display: inline-flex; align-items: center; gap: 5px; }
